]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/netdev/bond.h
license: LGPL-2.1+ -> LGPL-2.1-or-later
[thirdparty/systemd.git] / src / network / netdev / bond.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
fc2f9534
LP
2#pragma once
3
9aa5d8ba 4#include <netinet/in.h>
f2000933
YW
5#include <linux/if_bonding.h>
6
5fe5908e
SS
7#include "bond-util.h"
8#include "macro.h"
f2000933 9#include "netdev.h"
674c96fc 10#include "ordered-set.h"
3be1d7e0 11
634f0f98 12typedef struct Bond {
aa9f1140
TG
13 NetDev meta;
14
15 BondMode mode;
227cdf2c 16 BondXmitHashPolicy xmit_hash_policy;
fb1021a2 17 BondLacpRate lacp_rate;
81bd37a8
SS
18 BondAdSelect ad_select;
19 BondFailOverMac fail_over_mac;
20 BondArpValidate arp_validate;
21 BondArpAllTargets arp_all_targets;
22 BondPrimaryReselect primary_reselect;
23
fde60a42
SS
24 int tlb_dynamic_lb;
25
81bd37a8
SS
26 bool all_slaves_active;
27
28 unsigned resend_igmp;
29 unsigned packets_per_slave;
30 unsigned num_grat_arp;
31 unsigned min_links;
d9c52fa0 32
99f68ef0
TJ
33 uint16_t ad_actor_sys_prio;
34 uint16_t ad_user_port_key;
1e2a490e 35 struct ether_addr ad_actor_system;
99f68ef0 36
d9c52fa0
SS
37 usec_t miimon;
38 usec_t updelay;
39 usec_t downdelay;
81bd37a8
SS
40 usec_t arp_interval;
41 usec_t lp_interval;
42
674c96fc 43 OrderedSet *arp_ip_targets;
634f0f98 44} Bond;
aa9f1140 45
634f0f98 46DEFINE_NETDEV_CAST(BOND, Bond);
aa9f1140
TG
47extern const NetDevVTable bond_vtable;
48
4799f19e
YW
49int link_set_bond(Link *link);
50
538f15cf
YW
51CONFIG_PARSER_PROTOTYPE(config_parse_bond_mode);
52CONFIG_PARSER_PROTOTYPE(config_parse_bond_xmit_hash_policy);
53CONFIG_PARSER_PROTOTYPE(config_parse_bond_lacp_rate);
54CONFIG_PARSER_PROTOTYPE(config_parse_bond_ad_select);
55CONFIG_PARSER_PROTOTYPE(config_parse_bond_fail_over_mac);
56CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_validate);
57CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_all_targets);
58CONFIG_PARSER_PROTOTYPE(config_parse_bond_primary_reselect);
59CONFIG_PARSER_PROTOTYPE(config_parse_arp_ip_target_address);
60CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_sys_prio);
61CONFIG_PARSER_PROTOTYPE(config_parse_ad_user_port_key);
62CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_system);