]>
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 | |
b33bba04 SS |
37 | uint8_t arp_missed_max; |
38 | ||
d9c52fa0 SS |
39 | usec_t miimon; |
40 | usec_t updelay; | |
41 | usec_t downdelay; | |
81bd37a8 SS |
42 | usec_t arp_interval; |
43 | usec_t lp_interval; | |
00386d5b | 44 | usec_t peer_notify_delay; |
81bd37a8 | 45 | |
674c96fc | 46 | OrderedSet *arp_ip_targets; |
634f0f98 | 47 | } Bond; |
aa9f1140 | 48 | |
634f0f98 | 49 | DEFINE_NETDEV_CAST(BOND, Bond); |
aa9f1140 TG |
50 | extern const NetDevVTable bond_vtable; |
51 | ||
538f15cf YW |
52 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_mode); |
53 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_xmit_hash_policy); | |
54 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_lacp_rate); | |
55 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_ad_select); | |
56 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_fail_over_mac); | |
57 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_validate); | |
58 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_arp_all_targets); | |
59 | CONFIG_PARSER_PROTOTYPE(config_parse_bond_primary_reselect); | |
60 | CONFIG_PARSER_PROTOTYPE(config_parse_arp_ip_target_address); | |
61 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_sys_prio); | |
62 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_user_port_key); | |
63 | CONFIG_PARSER_PROTOTYPE(config_parse_ad_actor_system); |