1 /* $NetBSD: ieee8023ad_lacp.h,v 1.2 2005/12/10 23:21:39 elad Exp $ */
4 * Copyright (c)2005 YAMAMOTO Takashi,
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 #ifndef _NET_AGR_IEEE8023AD_LACP_H_
30 #define _NET_AGR_IEEE8023AD_LACP_H_
35 * protocol definitions.
38 struct lacp_systemid
{
48 struct lacp_peerinfo
{
49 struct lacp_systemid lip_systemid
;
51 struct lacp_portid lip_portid
;
56 #define LACP_STATE_ACTIVITY (1<<0)
57 #define LACP_STATE_TIMEOUT (1<<1)
58 #define LACP_STATE_AGGREGATION (1<<2)
59 #define LACP_STATE_SYNC (1<<3)
60 #define LACP_STATE_COLLECTING (1<<4)
61 #define LACP_STATE_DISTRIBUTING (1<<5)
62 #define LACP_STATE_DEFAULTED (1<<6)
63 #define LACP_STATE_EXPIRED (1<<7)
66 #define LACP_STATE_BITS \
77 struct lacp_collectorinfo
{
78 uint16_t lci_maxdelay
;
83 struct ether_header ldu_eh
;
84 struct slowprothdr ldu_sph
;
86 struct tlvhdr ldu_tlv_actor
;
87 struct lacp_peerinfo ldu_actor
;
88 struct tlvhdr ldu_tlv_partner
;
89 struct lacp_peerinfo ldu_partner
;
90 struct tlvhdr ldu_tlv_collector
;
91 struct lacp_collectorinfo ldu_collector
;
92 struct tlvhdr ldu_tlv_term
;
96 #define LACP_TYPE_ACTORINFO 1
97 #define LACP_TYPE_PARTNERINFO 2
98 #define LACP_TYPE_COLLECTORINFO 3
100 /* timeout values (in sec) */
101 #define LACP_FAST_PERIODIC_TIME (1)
102 #define LACP_SLOW_PERIODIC_TIME (30)
103 #define LACP_SHORT_TIMEOUT_TIME (3 * LACP_FAST_PERIODIC_TIME)
104 #define LACP_LONG_TIMEOUT_TIME (3 * LACP_SLOW_PERIODIC_TIME)
105 #define LACP_CHURN_DETECTION_TIME (60)
106 #define LACP_AGGREGATE_WAIT_TIME (2)
108 #endif /* !_NET_AGR_IEEE8023AD_LACP_H_ */