MPLS Mcast
[vpp.git] / src / vnet / adj / adj_mcast.h
index 40d4431..bfb0d6f 100644 (file)
@@ -26,6 +26,7 @@
 #define __ADJ_MCAST_H__
 
 #include <vnet/adj/adj_types.h>
+#include <vnet/adj/adj_midchain.h>
 
 /**
  * @brief
@@ -68,10 +69,36 @@ extern void adj_mcast_update_rewrite(adj_index_t adj_index,
                                      u8 offset,
                                      u32 mask);
 
+/**
+ * @brief
+ *  Update the rewrite string for an existing adjacecny and
+ *  Convert the adjacency into a midchain
+ *
+ * @param
+ *  The index of the adj to update
+ *
+ * @param
+ *  The new rewrite
+ */
+extern void adj_mcast_midchain_update_rewrite(adj_index_t adj_index,
+                                              adj_midchain_fixup_t fixup,
+                                              adj_flags_t flags,
+                                              u8 *rewrite,
+                                              u8 offset,
+                                              u32 mask);
+/**
+ * @brief Walk the multicast Adjacencies on a given interface
+ */
+extern void adj_mcast_walk (u32 sw_if_index,
+                            fib_protocol_t adj_nh_proto,
+                            adj_walk_cb_t cb,
+                            void *ctx);
+
 /**
  * @brief Format/display a mcast adjacency.
  */
 extern u8* format_adj_mcast(u8* s, va_list *ap);
+extern u8* format_adj_mcast_midchain(u8* s, va_list *ap);
 
 /**
  * @brief Get the sze of the mcast adj DB. Test purposes only.