#include <vnet/adj/adj.h>
-/**
- * @brief Flags controlling the midchain adjacency
- */
-typedef enum adj_midchain_flag_t_
-{
- /**
- * No flags
- */
- ADJ_MIDCHAIN_FLAG_NONE = 0,
-
- /**
- * Packets TX through the midchain do not increment the interface
- * counters. This should be used when the adj is associated with an L2
- * interface and that L2 interface is in a bridege domain. In that case
- * the packet will have traversed the interface's TX node, and hence have
- * been counted, before it traverses ths midchain
- */
- ADJ_MIDCHAIN_FLAG_NO_COUNT = (1 << 0),
-} adj_midchain_flag_t;
-
/**
* @brief
* Convert an existing neighbour adjacency into a midchain
* @param adj_index
* The index of the neighbour adjacency.
*
- * @param post_rewrite_node
- * The VLIB graph node that provides the post-encap fixup.
- * where 'fixup' is e.g., correcting chksum, length, etc.
+ * @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 rewrite
* The rewrite.
*/
extern void adj_nbr_midchain_update_rewrite(adj_index_t adj_index,
adj_midchain_fixup_t fixup,
- adj_midchain_flag_t flags,
+ const void *fixup_data,
+ adj_flags_t flags,
u8 *rewrite);
/**