adj_flags_t flags,
u8 *rewrite);
+/**
+ * @brief
+ * Return the adjacency's next node to its default value
+ *
+ * @param adj_index
+ * The index of the neighbour adjacency.
+ */
+extern void adj_nbr_midchain_reset_next_node(adj_index_t adj_index);
+
+/**
+ * @brief
+ * Update the VLIB node to which packets are sent post processing
+ *
+ * @param adj_index
+ * The index of the neighbour adjacency.
+ *
+ * @param node node-index to send to
+ */
+extern void adj_nbr_midchain_update_next_node(adj_index_t adj_index,
+ u32 node_index);
+
/**
* @brief
* [re]stack a midchain. 'Stacking' is the act of forming parent-child
* The FIB entry to stack on
*
* @param fct
- * The chain type to use from the fib entry fowarding
+ * The chain type to use from the fib entry forwarding
*/
extern void adj_nbr_midchain_stack_on_fib_entry(adj_index_t adj_index,
fib_node_index_t fei,
*/
extern u8* format_adj_midchain(u8* s, va_list *ap);
+/**
+ * @brief
+ * create/attach a midchain delegate and stack it on the prefix passed
+ * @param ai - the index of the adjacency to stack
+ * @param fib_index - The FIB index of the prefix on which to stack
+ * @param pfx - The prefix on which to stack
+ */
+extern void adj_midchain_delegate_stack(adj_index_t ai,
+ u32 fib_index,
+ const fib_prefix_t *pfx);
+
+/**
+ * @brief restack a midchain delegate
+ */
+extern void adj_midchain_delegate_restack(adj_index_t ai);
+
+/**
+ * @brief unstack a midchain delegate (this stacks it on a drop)
+ */
+extern void adj_midchain_delegate_unstack(adj_index_t ai);
+
+extern u8 adj_is_midchain (adj_index_t ai);
+
#endif