]>
Commit | Line | Data |
---|---|---|
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 | 12 | typedef 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 | 46 | DEFINE_NETDEV_CAST(BOND, Bond); |
aa9f1140 TG |
47 | extern const NetDevVTable bond_vtable; |
48 | ||
4799f19e YW |
49 | int link_set_bond(Link *link); |
50 | ||
538f15cf YW |
51 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_mode); |
52 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_xmit_hash_policy); | |
53 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_lacp_rate); | |
54 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_ad_select); | |
55 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_fail_over_mac); | |
56 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_validate); | |
57 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_all_targets); | |
58 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_primary_reselect); | |
59 | CONFIG_PARSER_PROTOTYPE(config_parse_arp_ip_target_address); | |
60 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_sys_prio); | |
61 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_user_port_key); | |
62 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_system); |