From d889055d8e8d87cac0f4a7086e5b453bbe2d0f79 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 2 Nov 2023 13:49:28 -0700 Subject: lib: convert if_zapi_callbacks into actual hooks ...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter --- pbrd/pbr_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pbrd') diff --git a/pbrd/pbr_main.c b/pbrd/pbr_main.c index c4708d3f0..6699079a6 100644 --- a/pbrd/pbr_main.c +++ b/pbrd/pbr_main.c @@ -158,8 +158,10 @@ int main(int argc, char **argv, char **envp) access_list_init(); pbr_nht_init(); pbr_map_init(); - if_zapi_callbacks(pbr_ifp_create, pbr_ifp_up, - pbr_ifp_down, pbr_ifp_destroy); + hook_register_prio(if_real, 0, pbr_ifp_create); + hook_register_prio(if_up, 0, pbr_ifp_up); + hook_register_prio(if_down, 0, pbr_ifp_down); + hook_register_prio(if_unreal, 0, pbr_ifp_destroy); pbr_zebra_init(); pbr_vrf_init(); pbr_vty_init(); -- cgit v1.2.3