+enum macvlan_opt {
+ MACVLAN_OPT_MACADDR = (1 << 0),
+};
+
+struct macvlan_config {
+ const char *mode;
+
+ enum macvlan_opt flags;
+ unsigned char macaddr[6];
+};
+
+enum veth_opt {
+ VETH_OPT_MACADDR = (1 << 0),
+ VETH_OPT_PEER_NAME = (1 << 1),
+ VETH_OPT_PEER_MACADDR = (1 << 2),
+};
+
+struct veth_config {
+ enum veth_opt flags;
+
+ unsigned char macaddr[6];
+ char peer_name[IFNAMSIZ];
+ unsigned char peer_macaddr[6];
+};
+
+enum vlan_proto {
+ VLAN_PROTO_8021Q = 0x8100,
+ VLAN_PROTO_8021AD = 0x88A8
+};
+
+struct vlan_qos_mapping {
+ struct vlist_simple_node node; /* entry in vlandev_config->{e,in}gress_qos_mapping_list */
+ uint32_t from;
+ uint32_t to;
+};
+
+struct vlandev_config {
+ enum vlan_proto proto;
+ uint16_t vid;
+ struct vlist_simple_tree ingress_qos_mapping_list; /* list of struct vlan_qos_mapping */
+ struct vlist_simple_tree egress_qos_mapping_list; /* list of struct vlan_qos_mapping */
+};
+
+enum bonding_mode {
+ BONDING_MODE_BALANCE_RR,
+ BONDING_MODE_ACTIVE_BACKUP,
+ BONDING_MODE_BALANCE_XOR,
+ BONDING_MODE_BROADCAST,
+ BONDING_MODE_8023AD,
+ BONDING_MODE_BALANCE_TLB,
+ BONDING_MODE_BALANCE_ALB,
+ __BONDING_MODE_MAX,
+};
+
+struct bonding_config {
+ enum bonding_mode policy;
+ const char *xmit_hash_policy;
+ bool all_ports_active;
+ int min_links;
+ const char *ad_actor_system;
+ int ad_actor_sys_prio;
+ const char *ad_select;
+ const char *lacp_rate;
+ int packets_per_port;
+ int lp_interval;
+ bool dynamic_lb;
+ int resend_igmp;
+ int num_peer_notif;
+ const char *primary;
+ const char *primary_reselect;
+ const char *failover_mac;
+ bool monitor_arp;
+ int monitor_interval;
+ struct blob_attr *arp_target;
+ bool arp_all_targets;
+ const char *arp_validate;
+ bool use_carrier;
+ int updelay;
+ int downdelay;
+};
+
+static inline int system_get_addr_family(unsigned int flags)
+{
+ if ((flags & DEVADDR_FAMILY) == DEVADDR_INET6)
+ return AF_INET6;
+ else
+ return AF_INET;
+}
+
+static inline int system_get_addr_len(unsigned int flags)
+{
+ if ((flags & DEVADDR_FAMILY) != DEVADDR_INET6)
+ return sizeof(struct in_addr);
+ else
+ return sizeof(struct in6_addr);
+}
+
+extern const char * const bonding_policy_str[__BONDING_MODE_MAX];
+