summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj_delegate.h
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-02-15 16:14:56 +0100
committerOle Trøan <otroan@employees.org>2018-02-15 19:13:26 +0000
commita44b015aa012d3b07ed873925d47c6d5955b7dd2 (patch)
treec5fe04939f0f8f55d8ba3dd18e659795ff1209c0 /src/vnet/adj/adj_delegate.h
parent4ca80c49f68eba65c5bd3106d3b7e865d045a1f8 (diff)
Adj: VFTs for adjacency sub-blocks
Change-Id: I19390f87343bacea84b49fc5d08af38875fdafdd Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj_delegate.h')
-rw-r--r--src/vnet/adj/adj_delegate.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vnet/adj/adj_delegate.h b/src/vnet/adj/adj_delegate.h
index 176512039d6..9f7d8c64afc 100644
--- a/src/vnet/adj/adj_delegate.h
+++ b/src/vnet/adj/adj_delegate.h
@@ -91,6 +91,16 @@ typedef struct adj_delegate_t_
};
} 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_find_or_add(ip_adjacency_t *adj,
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