ip: add VNET_IP_TABLE_ADD_DEL_FUNCTION
vrf table may be dynamically added or deleted. When the table is deleted,
clients who use the corresponding vrf table may need a callback to
do the clean up. The mechanism added here is cloned from
VNET_SW_INTERFACE_ADD_DEL_FUNCTION.
Type: improvement
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I08635c715cd7361a6c359b90890dd3545b0da94c
diff --git a/src/vnet/vnet.h b/src/vnet/vnet.h
index 3b20f71..42f7333 100644
--- a/src/vnet/vnet.h
+++ b/src/vnet/vnet.h
@@ -47,6 +47,7 @@
#include <vnet/config.h>
#include <vnet/interface.h>
#include <vnet/api_errno.h>
+#include <vnet/ip/ip_table.h>
typedef struct vnet_main_t
{
@@ -71,6 +72,9 @@
uword *interface_tag_by_sw_if_index;
+ _vnet_ip_table_function_list_elt_t
+ * ip_table_add_del_functions[VNET_ITF_FUNC_N_PRIO];
+
/*
* Last "api" error, preserved so we can issue reasonable diagnostics
* at or near the top of the food chain