aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_bonding.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/if_bonding.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/if_bonding.h')
-rw-r--r--include/linux/if_bonding.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h
new file mode 100644
index 000000000000..57024ce2c74f
--- /dev/null
+++ b/include/linux/if_bonding.h
@@ -0,0 +1,117 @@
1/*
2 * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.
3 *
4 *
5 * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
6 * NCM: Network and Communications Management, Inc.
7 *
8 * BUT, I'm the one who modified it for ethernet, so:
9 * (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
10 *
11 * This software may be used and distributed according to the terms
12 * of the GNU Public License, incorporated herein by reference.
13 *
14 * 2003/03/18 - Amir Noam <amir.noam at intel dot com>
15 * - Added support for getting slave's speed and duplex via ethtool.
16 * Needed for 802.3ad and other future modes.
17 *
18 * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and
19 * Shmulik Hen <shmulik.hen at intel dot com>
20 * - Enable support of modes that need to use the unique mac address of
21 * each slave.
22 *
23 * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and
24 * Amir Noam <amir.noam at intel dot com>
25 * - Moved driver's private data types to bonding.h
26 *
27 * 2003/03/18 - Amir Noam <amir.noam at intel dot com>,
28 * Tsippy Mendelson <tsippy.mendelson at intel dot com> and
29 * Shmulik Hen <shmulik.hen at intel dot com>
30 * - Added support for IEEE 802.3ad Dynamic link aggregation mode.
31 *
32 * 2003/05/01 - Amir Noam <amir.noam at intel dot com>
33 * - Added ABI version control to restore compatibility between
34 * new/old ifenslave and new/old bonding.
35 *
36 * 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com>
37 * - Code cleanup and style changes
38 */
39
40#ifndef _LINUX_IF_BONDING_H
41#define _LINUX_IF_BONDING_H
42
43#include <linux/if.h>
44#include <linux/types.h>
45#include <linux/if_ether.h>
46
47/* userland - kernel ABI version (2003/05/08) */
48#define BOND_ABI_VERSION 2
49
50/*
51 * We can remove these ioctl definitions in 2.5. People should use the
52 * SIOC*** versions of them instead
53 */
54#define BOND_ENSLAVE_OLD (SIOCDEVPRIVATE)
55#define BOND_RELEASE_OLD (SIOCDEVPRIVATE + 1)
56#define BOND_SETHWADDR_OLD (SIOCDEVPRIVATE + 2)
57#define BOND_SLAVE_INFO_QUERY_OLD (SIOCDEVPRIVATE + 11)
58#define BOND_INFO_QUERY_OLD (SIOCDEVPRIVATE + 12)
59#define BOND_CHANGE_ACTIVE_OLD (SIOCDEVPRIVATE + 13)
60
61#define BOND_CHECK_MII_STATUS (SIOCGMIIPHY)
62
63#define BOND_MODE_ROUNDROBIN 0
64#define BOND_MODE_ACTIVEBACKUP 1
65#define BOND_MODE_XOR 2
66#define BOND_MODE_BROADCAST 3
67#define BOND_MODE_8023AD 4
68#define BOND_MODE_TLB 5
69#define BOND_MODE_ALB 6 /* TLB + RLB (receive load balancing) */
70
71/* each slave's link has 4 states */
72#define BOND_LINK_UP 0 /* link is up and running */
73#define BOND_LINK_FAIL 1 /* link has just gone down */
74#define BOND_LINK_DOWN 2 /* link has been down for too long time */
75#define BOND_LINK_BACK 3 /* link is going back */
76
77/* each slave has several states */
78#define BOND_STATE_ACTIVE 0 /* link is active */
79#define BOND_STATE_BACKUP 1 /* link is backup */
80
81#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */
82
83typedef struct ifbond {
84 __s32 bond_mode;
85 __s32 num_slaves;
86 __s32 miimon;
87} ifbond;
88
89typedef struct ifslave
90{
91 __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */
92 char slave_name[IFNAMSIZ];
93 __s8 link;
94 __s8 state;
95 __u32 link_failure_count;
96} ifslave;
97
98struct ad_info {
99 __u16 aggregator_id;
100 __u16 ports;
101 __u16 actor_key;
102 __u16 partner_key;
103 __u8 partner_system[ETH_ALEN];
104};
105
106#endif /* _LINUX_IF_BONDING_H */
107
108/*
109 * Local variables:
110 * version-control: t
111 * kept-new-versions: 5
112 * c-indent-level: 8
113 * c-basic-offset: 8
114 * tab-width: 8
115 * End:
116 */
117