diff options
author | Matthew Smith <mgsmith@netgate.com> | 2021-06-22 09:36:50 -0500 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2021-06-24 07:14:16 +0000 |
commit | 2d9ae462ea455a8bd88fe96b31bf51197ecacf71 (patch) | |
tree | b3379517a5d47ca3c7ac825b3d9f9437e4b79077 /src/plugins/linux-cp/lcp_interface.h | |
parent | 9f562cd9e651df8579ea05f5f3b77b8b912938c2 (diff) |
linux-cp: add callbacks for pair management
Type: improvement
Allow callbacks to be registered which will be called when an
interface pair is added or deleted.
Change-Id: I1c413ac2ada802021f9e56e2f878ce67e5eda2f5
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/plugins/linux-cp/lcp_interface.h')
-rw-r--r-- | src/plugins/linux-cp/lcp_interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/linux-cp/lcp_interface.h b/src/plugins/linux-cp/lcp_interface.h index be566a07cb6..bed30248845 100644 --- a/src/plugins/linux-cp/lcp_interface.h +++ b/src/plugins/linux-cp/lcp_interface.h @@ -150,6 +150,16 @@ lcp_itf_pair_find_by_host (u32 host_sw_if_index) void lcp_set_auto_intf (u8 is_auto); int lcp_auto_intf (void); +typedef void (*lcp_itf_pair_add_cb_t) (lcp_itf_pair_t *); +typedef void (*lcp_itf_pair_del_cb_t) (lcp_itf_pair_t *); + +typedef struct lcp_itf_pair_vft +{ + lcp_itf_pair_add_cb_t pair_add_fn; + lcp_itf_pair_del_cb_t pair_del_fn; +} lcp_itf_pair_vft_t; + +void lcp_itf_pair_register_vft (lcp_itf_pair_vft_t *lcp_itf_vft); /* * fd.io coding-style-patch-verification: ON * |