summaryrefslogtreecommitdiff
path: root/zebra/interface.h
diff options
context:
space:
mode:
authorDinesh Dutt <didutt@gmail.com>2018-11-10 15:54:43 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-12 11:40:33 -0500
commitb9368db98c961678f030e1a27202e89b5e1ef6bf (patch)
tree9c8d4203207e8f9648b9a28b656394d0b4b0d4c1 /zebra/interface.h
parent5c5e0c0b352c75b9615d3a41714c2b0b21b67cba (diff)
zebra: Let zebra know about bond and blond slave intf types
The interface type can be a bond or a bond slave, add some code to note this and to display it as part of a show interface command. Signed-off-by: Dinesh Dutt <didutt@gmail.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/interface.h')
-rw-r--r--zebra/interface.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/interface.h b/zebra/interface.h
index e4c05e8dc4..01dd697772 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -1,3 +1,4 @@
+
/* Interface function header.
* Copyright (C) 1999 Kunihiro Ishiguro
*
@@ -192,6 +193,8 @@ typedef enum {
ZEBRA_IF_VLAN, /* VLAN sub-interface */
ZEBRA_IF_MACVLAN, /* MAC VLAN interface*/
ZEBRA_IF_VETH, /* VETH interface*/
+ ZEBRA_IF_BOND, /* Bond */
+ ZEBRA_IF_BOND_SLAVE, /* Bond */
} zebra_iftype_t;
/* Zebra "slave" interface type */
@@ -199,6 +202,7 @@ typedef enum {
ZEBRA_IF_SLAVE_NONE, /* Not a slave */
ZEBRA_IF_SLAVE_VRF, /* Member of a VRF */
ZEBRA_IF_SLAVE_BRIDGE, /* Member of a bridge */
+ ZEBRA_IF_SLAVE_BOND, /* Bond member */
ZEBRA_IF_SLAVE_OTHER, /* Something else - e.g., bond slave */
} zebra_slave_iftype_t;
@@ -268,6 +272,8 @@ struct zebra_if {
*/
struct zebra_l2info_brslave brslave_info;
+ struct zebra_l2info_bondslave bondslave_info;
+
/* Link fields - for sub-interfaces. */
ifindex_t link_ifindex;
struct interface *link;
@@ -324,6 +330,10 @@ static inline void zebra_if_set_ziftype(struct interface *ifp,
#define IS_ZEBRA_IF_VRF_SLAVE(ifp) \
(((struct zebra_if *)(ifp->info))->zif_slave_type == ZEBRA_IF_SLAVE_VRF)
+#define IS_ZEBRA_IF_BOND_SLAVE(ifp) \
+ (((struct zebra_if *)(ifp->info))->zif_slave_type \
+ == ZEBRA_IF_SLAVE_BOND)
+
extern void zebra_if_init(void);
extern struct interface *if_lookup_by_index_per_ns(struct zebra_ns *, uint32_t);