X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fadj%2Fadj_mcast.h;h=286901d24a106e8a2af34a07dd126d14c6c77e93;hb=7c03ed47d5acfa39820f9553999caa01cf47dba4;hp=40d4431335708f5e71716ff31ffe74b7a9e925e2;hpb=2e7fbcc08152da5c6a17ed80ba08cd37edec6c8c;p=vpp.git diff --git a/src/vnet/adj/adj_mcast.h b/src/vnet/adj/adj_mcast.h index 40d44313357..286901d24a1 100644 --- a/src/vnet/adj/adj_mcast.h +++ b/src/vnet/adj/adj_mcast.h @@ -26,6 +26,7 @@ #define __ADJ_MCAST_H__ #include +#include /** * @brief @@ -59,19 +60,52 @@ extern adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto, * @param * The offset in the rewrite a which to write in packet's * IP Address - * - * @param - * The mask to apply to the packet berfore the rewrite. */ extern void adj_mcast_update_rewrite(adj_index_t adj_index, u8 *rewrite, - u8 offset, - u32 mask); + u8 offset); + +/** + * @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 fixup + * The function that will be invoked at paket switch time to 'fixup' + * the rewrite applied with necessary per-packet info (i.e. length, checksums). + * @param fixup_data + * Context data set by the caller that is provided as an argument in the + * fixup function. + * + * @param flags + * Flags controlling the adjacency behaviour + * + * @param + * The new rewrite + */ +extern void adj_mcast_midchain_update_rewrite(adj_index_t adj_index, + adj_midchain_fixup_t fixup, + const void *fixup_data, + 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.