diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2023-11-02 21:49:28 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2023-11-03 01:10:43 +0100 |
commit | d889055d8e8d87cac0f4a7086e5b453bbe2d0f79 (patch) | |
tree | 0fb96873f9b22943218f7c7d876839470370ca5f /sharpd/sharp_zebra.c | |
parent | Merge pull request #14546 from adrianomarto/ospf6-point-to-multipoint (diff) | |
download | frr-d889055d8e8d87cac0f4a7086e5b453bbe2d0f79.tar.xz frr-d889055d8e8d87cac0f4a7086e5b453bbe2d0f79.zip |
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 <equinox@opensourcerouting.org>
Diffstat (limited to 'sharpd/sharp_zebra.c')
-rw-r--r-- | sharpd/sharp_zebra.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index c095fec17..30bf4f30e 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -1077,8 +1077,10 @@ void sharp_zebra_init(void) { struct zclient_options opt = {.receive_notify = true}; - if_zapi_callbacks(sharp_ifp_create, sharp_ifp_up, sharp_ifp_down, - sharp_ifp_destroy); + hook_register_prio(if_real, 0, sharp_ifp_create); + hook_register_prio(if_up, 0, sharp_ifp_up); + hook_register_prio(if_down, 0, sharp_ifp_down); + hook_register_prio(if_unreal, 0, sharp_ifp_destroy); zclient = zclient_new(master, &opt, sharp_handlers, array_size(sharp_handlers)); |