diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-08-06 08:08:39 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-15 13:25:44 +0200 |
commit | 2eb27eecf011a06c01e58a735d8bf087d7519979 (patch) | |
tree | f0e4940b3df2cb3caaf99d9806dd738c906e609a /zebra/interface.h | |
parent | lib: replace if_add_hook with hook_* logic (diff) | |
download | frr-2eb27eecf011a06c01e58a735d8bf087d7519979.tar.xz frr-2eb27eecf011a06c01e58a735d8bf087d7519979.zip |
zebra: start detangling rtadv & irdp
Replace some cross-dependencies with hooks & move bits to where they
belong.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/interface.h')
-rw-r--r-- | zebra/interface.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/zebra/interface.h b/zebra/interface.h index 970c3c529..7b56dcd4a 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -23,10 +23,7 @@ #include "redistribute.h" #include "vrf.h" - -#ifdef HAVE_IRDP -#include "zebra/irdp.h" -#endif +#include "hook.h" #include "zebra/zebra_l2.h" @@ -202,6 +199,8 @@ typedef enum { ZEBRA_IF_SLAVE_OTHER, /* Something else - e.g., bond slave */ } zebra_slave_iftype_t; +struct irdp_interface; + /* `zebra' daemon local interface structure. */ struct zebra_if { /* Shutdown configuration. */ @@ -227,9 +226,7 @@ struct zebra_if { unsigned int ra_sent, ra_rcvd; #endif /* HAVE_RTADV */ -#ifdef HAVE_IRDP - struct irdp_interface irdp; -#endif + struct irdp_interface *irdp; #ifdef HAVE_STRUCT_SOCKADDR_DL union { @@ -273,6 +270,11 @@ struct zebra_if { struct interface *link; }; +DECLARE_HOOK(zebra_if_extra_info, (struct vty *vty, struct interface *ifp), + (vty, ifp)) +DECLARE_HOOK(zebra_if_config_wr, (struct vty *vty, struct interface *ifp), + (vty, ifp)) + static inline void zebra_if_set_ziftype(struct interface *ifp, zebra_iftype_t zif_type, zebra_slave_iftype_t zif_slave_type) |