/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */ /* * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'. * * * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes * NCM: Network and Communications Management, Inc. * * BUT, I'm the one who modified it for ethernet, so: * (c) Copyright 1999, Thomas Davis, [email protected] * * This software may be used and distributed according to the terms * of the GNU Public License, incorporated herein by reference. * * 2003/03/18 - Amir Noam <amir.noam at intel dot com> * - Added support for getting slave's speed and duplex via ethtool. * Needed for 802.3ad and other future modes. * * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and * Shmulik Hen <shmulik.hen at intel dot com> * - Enable support of modes that need to use the unique mac address of * each slave. * * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and * Amir Noam <amir.noam at intel dot com> * - Moved driver's private data types to bonding.h * * 2003/03/18 - Amir Noam <amir.noam at intel dot com>, * Tsippy Mendelson <tsippy.mendelson at intel dot com> and * Shmulik Hen <shmulik.hen at intel dot com> * - Added support for IEEE 802.3ad Dynamic link aggregation mode. * * 2003/05/01 - Amir Noam <amir.noam at intel dot com> * - Added ABI version control to restore compatibility between * new/old ifenslave and new/old bonding. * * 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com> * - Code cleanup and style changes * * 2005/05/05 - Jason Gabler <jygabler at lbl dot gov> * - added definitions for various XOR hashing policies */ #ifndef _LINUX_IF_BONDING_H #define _LINUX_IF_BONDING_H #include <linux/if.h> #include <linux/types.h> #include <linux/if_ether.h> /* userland - kernel ABI version (2003/05/08) */ #define BOND_ABI_VERSION … /* * We can remove these ioctl definitions in 2.5. People should use the * SIOC*** versions of them instead */ #define BOND_ENSLAVE_OLD … #define BOND_RELEASE_OLD … #define BOND_SETHWADDR_OLD … #define BOND_SLAVE_INFO_QUERY_OLD … #define BOND_INFO_QUERY_OLD … #define BOND_CHANGE_ACTIVE_OLD … #define BOND_CHECK_MII_STATUS … #define BOND_MODE_ROUNDROBIN … #define BOND_MODE_ACTIVEBACKUP … #define BOND_MODE_XOR … #define BOND_MODE_BROADCAST … #define BOND_MODE_8023AD … #define BOND_MODE_TLB … #define BOND_MODE_ALB … /* each slave's link has 4 states */ #define BOND_LINK_UP … #define BOND_LINK_FAIL … #define BOND_LINK_DOWN … #define BOND_LINK_BACK … /* each slave has several states */ #define BOND_STATE_ACTIVE … #define BOND_STATE_BACKUP … #define BOND_DEFAULT_MAX_BONDS … #define BOND_DEFAULT_TX_QUEUES … #define BOND_DEFAULT_RESEND_IGMP … /* hashing types */ #define BOND_XMIT_POLICY_LAYER2 … #define BOND_XMIT_POLICY_LAYER34 … #define BOND_XMIT_POLICY_LAYER23 … #define BOND_XMIT_POLICY_ENCAP23 … #define BOND_XMIT_POLICY_ENCAP34 … #define BOND_XMIT_POLICY_VLAN_SRCMAC … /* 802.3ad port state definitions (43.4.2.2 in the 802.3ad standard) */ #define LACP_STATE_LACP_ACTIVITY … #define LACP_STATE_LACP_TIMEOUT … #define LACP_STATE_AGGREGATION … #define LACP_STATE_SYNCHRONIZATION … #define LACP_STATE_COLLECTING … #define LACP_STATE_DISTRIBUTING … #define LACP_STATE_DEFAULTED … #define LACP_STATE_EXPIRED … ifbond; ifslave; struct ad_info { … }; /* Embedded inside LINK_XSTATS_TYPE_BOND */ enum { … }; #define BOND_XSTATS_MAX … /* Embedded inside BOND_XSTATS_3AD */ enum { … }; #define BOND_3AD_STAT_MAX … #endif /* _LINUX_IF_BONDING_H */