aggr.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_H
#define _SYS_AGGR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/ethernet.h>
#ifdef __cplusplus
extern "C" {
#endif
/* control interface name */
#define AGGR_DEVNAME_CTL "ctl"
/*
* Transmit load balancing policies.
*/
#define AGGR_POLICY_L2 0x01
#define AGGR_POLICY_L3 0x02
#define AGGR_POLICY_L4 0x04
/*
* LACP mode and timer.
*/
typedef enum {
AGGR_LACP_OFF = 0,
AGGR_LACP_ACTIVE = 1,
typedef enum {
AGGR_LACP_TIMER_LONG = 0,
/*
* MAC port state.
*/
typedef enum {
/* Maximum number of ports per aggregation. */
#define AGGR_MAX_PORTS 256
/*
* LACP port state.
*/
typedef union {
struct {
#if defined(_BIT_FIELDS_HTOL)
#elif defined(_BIT_FIELDS_LTOH)
#else
#error "unknown bit fields ordering"
#endif
} bit;
/* one of the ports of a link aggregation group */
typedef struct laioc_port {
} laioc_port_t;
typedef struct laioc_create {
#ifdef _SYSCALL32
typedef struct laioc_create32 {
#endif /* _SYSCALL32 */
typedef struct laioc_delete {
#ifdef _SYSCALL32
typedef struct laioc_delete32 {
#endif /* _SYSCALL32 */
typedef enum aggr_link_duplex {
typedef enum aggr_link_state {
AGGR_LINK_STATE_UP = 1,
AGGR_LINK_STATE_DOWN = 2,
typedef struct laioc_info_port {
typedef struct laioc_info_group {
typedef struct laioc_info {
} laioc_info_t;
typedef struct laioc_add_rem {
} laioc_add_t;
#ifdef _SYSCALL32
typedef struct laioc_add_rem32 {
#endif /* _SYSCALL32 */
#define LAIOC_MODIFY_POLICY 0x01
#define LAIOC_MODIFY_MAC 0x02
#define LAIOC_MODIFY_LACP_MODE 0x04
#define LAIOC_MODIFY_LACP_TIMER 0x08
typedef struct laioc_modify {
#ifdef _SYSCALL32
typedef struct laioc_modify32 {
#endif /* _SYSCALL32 */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_AGGR_H */