Adj: VFTs for adjacency sub-blocks
Change-Id: I85602b0178315023bb512babdd5b7dd4263a322d
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vnet/adj/adj_delegate.h b/src/vnet/adj/adj_delegate.h
index 1765120..9f7d8c6 100644
--- a/src/vnet/adj/adj_delegate.h
+++ b/src/vnet/adj/adj_delegate.h
@@ -91,6 +91,16 @@
};
} adj_delegate_t;
+/**
+ * An ADJ delegate virtual function table
+ */
+typedef void (*adj_delegate_last_lock_gone_t)(ip_adjacency_t *adj, adj_delegate_t *aed);
+typedef u8 * (*adj_delegate_format_t)(const adj_delegate_t *aed, u8 *s);
+typedef struct adj_delegate_vft_t_ {
+ adj_delegate_format_t adv_format;
+ adj_delegate_last_lock_gone_t adv_last_lock;
+} adj_delegate_vft_t;
+
extern void adj_delegate_remove(ip_adjacency_t *adj,
adj_delegate_type_t type);
@@ -99,6 +109,7 @@
extern adj_delegate_t *adj_delegate_get(const ip_adjacency_t *adj,
adj_delegate_type_t type);
-extern u8 *format_adj_deletegate(u8 * s, va_list * args);
+extern u8 *format_adj_delegate(u8 * s, va_list * args);
+extern void adj_delegate_register_type(adj_delegate_type_t type, const adj_delegate_vft_t *vft);
#endif