aggr_lacp.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_AGGR_LACP_H
#define _SYS_AGGR_LACP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/ethernet.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* 802.3ad LACP version number
*/
#define LACP_SUBTYPE 0x1
/*
*/
/*
* Length fields as per 802.3ad.
*/
#define LACP_COLLECTOR_INFO_LEN 0x10
#define LACP_TERMINATOR_INFO_LEN 0x00
/* LACP Receive State Machine states */
typedef enum {
LACP_INITIALIZE = 0,
LACP_PORT_DISABLED = 1,
LACP_EXPIRED = 2,
LACP_DISABLED = 3,
LACP_DEFAULTED = 4,
LACP_CURRENT = 5
#define LACP_RECEIVE_STATE_STRINGS { \
"LACP_INITIALIZE", \
"LACP_PORT_DISABLED", \
"LACP_EXPIRED", \
"LACP_DISABLED", \
"LACP_DEFAULTED", \
"LACP_CURRENT" \
}
/* LACP Periodic State Machine states */
typedef enum {
LACP_NO_PERIODIC = 0,
LACP_FAST_PERIODIC = 1,
LACP_SLOW_PERIODIC = 2,
LACP_PERIODIC_TX = 3
#define LACP_PERIODIC_STRINGS { \
"LACP_NO_PERIODIC", \
"LACP_FAST_PERIODIC", \
"LACP_SLOW_PERIODIC", \
"LACP_PERIODIC_TX" \
}
/* LACP Mux State Machine states */
typedef enum {
LACP_DETACHED = 0,
LACP_WAITING = 1,
LACP_ATTACHED = 2,
#define LACP_MUX_STRINGS { \
"LACP_DETACHED", \
"LACP_WAITING", \
"LACP_ATTACHED", \
"LACP_COLLECTING_DISTRIBUTING" \
}
/* LACP Churn State Machine states */
typedef enum {
LACP_NO_ACTOR_CHURN = 0,
LACP_ACTOR_CHURN = 2
/*
* 802.3ad timer constants. (IEEE 802.3ad: section 43.4.4)
*
* All timers specified have a implementation tolerance of +- 250 ms.
*/
/*
* 802.3ad Variables associated with the system (section 43.4.5)
*/
typedef struct system_info {
typedef struct lacp_timer {
} lacp_timer_t;
/*
* 802.3ad Variables associated with each aggregation (section 43.4.6)
* Note: These are on a per aggregation basis.
*/
typedef struct Agg {
} Agg_t;
/*
* 802.3ad Variables used for managing the operation of
* the state machines (section 43.4.8)
* Note: These are on a per port basis.
*/
typedef enum {
AGGR_UNSELECTED, /* aggregator not selected */
AGGR_SELECTED, /* aggregator selected */
AGGR_STANDBY /* port in standby */
typedef struct state_machine {
partner_churn : 1,
pad_bits : 24;
/* "Ready" is accessed from the aggregator structure */
/*
* 802.3ad Variables associated with each port (section 43.4.7)
*/
typedef struct aggr_lacp_port {
/*
* partner information
*/
/*
* State machine and Timer information.
*/
typedef struct lacp_stats_s {
} lacp_stats_t;
/*
* 802.3ad protocol information
*/
/*
*/
typedef struct link_info {
} link_info_t;
/*
* Link Aggregation Control Protocol (LACPDU) structure
*/
typedef struct lacp {
} lacp_t;
/*
* Marker protocol
*/
#define MARKER_SUBTYPE 0x2
#define MARKER_INFO_RESPONSE_LENGTH 16
/*
* marker TLV_type
*/
typedef struct marker_pdu {
} marker_pdu_t;
/*
* 802.3ad Link Aggregation Group Identifier (IEEE 802.3ad 43.3.6)
* port identifire = port priority and port number.
*/
typedef struct lag_id {
} lag_id_t;
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_AGGR_LACP_H */