summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj_midchain.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-26 07:02:58 +0000
committerDamjan Marion <dmarion@me.com>2019-03-26 16:33:28 +0000
commit4c3ba81709bab8f9fcdef650e7f742fe9ddbae32 (patch)
treefb8dba665f570749b785bd5dc76dfce317367fca /src/vnet/adj/adj_midchain.h
parentaf3f0783b0ef189d54bb8fdf0a112347a420e9bb (diff)
ADJ: midchain delegate to performing stacking
this can be used by e.g. tunnels so it doesn't need to be implemented for each tunnel type. Change-Id: I0790f89aa49f83421612b35108cce67693285999 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj_midchain.h')
-rw-r--r--src/vnet/adj/adj_midchain.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/adj/adj_midchain.h b/src/vnet/adj/adj_midchain.h
index 24fea427a6b..1f5deaecd95 100644
--- a/src/vnet/adj/adj_midchain.h
+++ b/src/vnet/adj/adj_midchain.h
@@ -118,4 +118,25 @@ extern void adj_midchain_module_init(void);
*/
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);
+
#endif