blob: 0079f30f1a687de98deaeb482a9544e43384f62e [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_IF_BONDING_H
20#define _LINUX_IF_BONDING_H
21#include <linux/if.h>
22#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#include <linux/if_ether.h>
24#define BOND_ABI_VERSION 2
25#define BOND_ENSLAVE_OLD (SIOCDEVPRIVATE)
26#define BOND_RELEASE_OLD (SIOCDEVPRIVATE + 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define BOND_SETHWADDR_OLD (SIOCDEVPRIVATE + 2)
28#define BOND_SLAVE_INFO_QUERY_OLD (SIOCDEVPRIVATE + 11)
29#define BOND_INFO_QUERY_OLD (SIOCDEVPRIVATE + 12)
30#define BOND_CHANGE_ACTIVE_OLD (SIOCDEVPRIVATE + 13)
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define BOND_CHECK_MII_STATUS (SIOCGMIIPHY)
32#define BOND_MODE_ROUNDROBIN 0
33#define BOND_MODE_ACTIVEBACKUP 1
34#define BOND_MODE_XOR 2
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define BOND_MODE_BROADCAST 3
36#define BOND_MODE_8023AD 4
37#define BOND_MODE_TLB 5
38#define BOND_MODE_ALB 6
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define BOND_LINK_UP 0
40#define BOND_LINK_FAIL 1
41#define BOND_LINK_DOWN 2
42#define BOND_LINK_BACK 3
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define BOND_STATE_ACTIVE 0
44#define BOND_STATE_BACKUP 1
45#define BOND_DEFAULT_MAX_BONDS 1
46#define BOND_DEFAULT_TX_QUEUES 16
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define BOND_DEFAULT_RESEND_IGMP 1
48#define BOND_XMIT_POLICY_LAYER2 0
49#define BOND_XMIT_POLICY_LAYER34 1
50#define BOND_XMIT_POLICY_LAYER23 2
Christopher Ferris38062f92014-07-09 15:33:25 -070051#define BOND_XMIT_POLICY_ENCAP23 3
52#define BOND_XMIT_POLICY_ENCAP34 4
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070053#define LACP_STATE_LACP_ACTIVITY 0x1
54#define LACP_STATE_LACP_TIMEOUT 0x2
55#define LACP_STATE_AGGREGATION 0x4
56#define LACP_STATE_SYNCHRONIZATION 0x8
57#define LACP_STATE_COLLECTING 0x10
58#define LACP_STATE_DISTRIBUTING 0x20
59#define LACP_STATE_DEFAULTED 0x40
60#define LACP_STATE_EXPIRED 0x80
Ben Cheng655a7c02013-10-16 16:09:24 -070061typedef struct ifbond {
Tao Baod7db5942015-01-28 10:07:51 -080062 __s32 bond_mode;
Tao Baod7db5942015-01-28 10:07:51 -080063 __s32 num_slaves;
64 __s32 miimon;
Ben Cheng655a7c02013-10-16 16:09:24 -070065} ifbond;
66typedef struct ifslave {
Tao Baod7db5942015-01-28 10:07:51 -080067 __s32 slave_id;
68 char slave_name[IFNAMSIZ];
69 __s8 link;
70 __s8 state;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 link_failure_count;
Ben Cheng655a7c02013-10-16 16:09:24 -070072} ifslave;
Ben Cheng655a7c02013-10-16 16:09:24 -070073struct ad_info {
Tao Baod7db5942015-01-28 10:07:51 -080074 __u16 aggregator_id;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u16 ports;
76 __u16 actor_key;
77 __u16 partner_key;
78 __u8 partner_system[ETH_ALEN];
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
Christopher Ferris24f97eb2019-05-20 12:58:13 -070080enum {
81 BOND_XSTATS_UNSPEC,
82 BOND_XSTATS_3AD,
83 __BOND_XSTATS_MAX
84};
85#define BOND_XSTATS_MAX (__BOND_XSTATS_MAX - 1)
86enum {
87 BOND_3AD_STAT_LACPDU_RX,
88 BOND_3AD_STAT_LACPDU_TX,
89 BOND_3AD_STAT_LACPDU_UNKNOWN_RX,
90 BOND_3AD_STAT_LACPDU_ILLEGAL_RX,
91 BOND_3AD_STAT_MARKER_RX,
92 BOND_3AD_STAT_MARKER_TX,
93 BOND_3AD_STAT_MARKER_RESP_RX,
94 BOND_3AD_STAT_MARKER_RESP_TX,
95 BOND_3AD_STAT_MARKER_UNKNOWN_RX,
96 BOND_3AD_STAT_PAD,
97 __BOND_3AD_STAT_MAX
98};
99#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#endif