--- zzzz-none-000/linux-4.4.60/include/uapi/linux/if_bonding.h 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/include/uapi/linux/if_bonding.h 2018-11-08 13:36:17.000000000 +0000 @@ -70,6 +70,7 @@ #define BOND_MODE_8023AD 4 #define BOND_MODE_TLB 5 #define BOND_MODE_ALB 6 /* TLB + RLB (receive load balancing) */ +#define BOND_MODE_L2DA 7 /* each slave's link has 4 states */ #define BOND_LINK_UP 0 /* link is up and running */ @@ -116,6 +117,21 @@ __u8 partner_system[ETH_ALEN]; }; +#ifdef __KERNEL__ +struct bond_cb { + void (*bond_cb_link_up)(struct net_device *slave); + void (*bond_cb_link_down)(struct net_device *slave); + void (*bond_cb_enslave)(struct net_device *slave); + void (*bond_cb_release)(struct net_device *slave); + void (*bond_cb_delete_by_slave)(struct net_device *slave); + void (*bond_cb_delete_by_mac)(uint8_t *mac_addr); +}; + +extern int bond_register_cb(struct bond_cb *cb); +extern void bond_unregister_cb(void); +extern int bond_get_id(struct net_device *bond_dev); +#endif /* __KERNEL__ */ + #endif /* _LINUX_IF_BONDING_H */ /*