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
committerNeale Ranns <nranns@cisco.com>2018-02-16 13:45:05 +0000
commit793c7fe5fcb224c8bf8f9a051be82eef5fd62ca1 (patch)
tree40f8c53b961ca4184e630571cf2d2fc0d1596a02 /src/vnet/adj/adj_delegate.h
parentc819fc612f9a79eaba2981dc2e8f7c31552db5ea (diff)
Adj: VFTs for adjacency sub-blocks
Change-Id: I85602b0178315023bb512babdd5b7dd4263a322d 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