diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-11-02 13:49:28 -0700 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2023-11-02 17:10:43 -0700 |
| commit | d889055d8e8d87cac0f4a7086e5b453bbe2d0f79 (patch) | |
| tree | 0fb96873f9b22943218f7c7d876839470370ca5f /ripd | |
| parent | 8e3a96e846a15f34384a20a3ede2e894d7e97253 (diff) | |
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 'ripd')
| -rw-r--r-- | ripd/rip_interface.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 505290ed31..93494549cc 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1118,6 +1118,8 @@ void rip_if_init(void) /* Install interface node. */ if_cmd_init_default(); - if_zapi_callbacks(rip_ifp_create, rip_ifp_up, - rip_ifp_down, rip_ifp_destroy); + hook_register_prio(if_real, 0, rip_ifp_create); + hook_register_prio(if_up, 0, rip_ifp_up); + hook_register_prio(if_down, 0, rip_ifp_down); + hook_register_prio(if_unreal, 0, rip_ifp_destroy); } |
