iPXE
eth_slow.h
Go to the documentation of this file.
1#ifndef _IPXE_ETH_SLOW_H
2#define _IPXE_ETH_SLOW_H
4/** @file
5 *
6 * Ethernet slow protocols
7 *
8 */
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13/** Slow protocols header */
15 /** Slow protocols subtype */
17 /** Subtype version number */
19} __attribute__ (( packed ));
20
21/** LACP subtype */
22#define ETH_SLOW_SUBTYPE_LACP 1
23
24/** LACP version number */
25#define ETH_SLOW_LACP_VERSION 1
26
27/** Marker subtype */
28#define ETH_SLOW_SUBTYPE_MARKER 2
29
30/** Marker version number */
31#define ETH_SLOW_MARKER_VERSION 1
32
33/** TLV (type, length, value) header */
35 /** Type
36 *
37 * This is an ETH_SLOW_TLV_XXX constant.
38 */
40 /** Length
41 *
42 * The length includes the TLV header (except for a TLV
43 * terminator, which has a length of zero).
44 */
46} __attribute__ (( packed ));
47
48/** Terminator type */
49#define ETH_SLOW_TLV_TERMINATOR 0
50
51/** Terminator length */
52#define ETH_SLOW_TLV_TERMINATOR_LEN 0
53
54/** LACP actor type */
55#define ETH_SLOW_TLV_LACP_ACTOR 1
56
57/** LACP actor length */
58#define ETH_SLOW_TLV_LACP_ACTOR_LEN \
59 ( sizeof ( struct eth_slow_lacp_entity_tlv ) )
60
61/** LACP partner type */
62#define ETH_SLOW_TLV_LACP_PARTNER 2
63
64/** LACP partner length */
65#define ETH_SLOW_TLV_LACP_PARTNER_LEN \
66 ( sizeof ( struct eth_slow_lacp_entity_tlv ) )
67
68/** LACP collector type */
69#define ETH_SLOW_TLV_LACP_COLLECTOR 3
70
71/** LACP collector length */
72#define ETH_SLOW_TLV_LACP_COLLECTOR_LEN \
73 ( sizeof ( struct eth_slow_lacp_collector_tlv ) )
74
75/** Marker request type */
76#define ETH_SLOW_TLV_MARKER_REQUEST 1
77
78/** Marker request length */
79#define ETH_SLOW_TLV_MARKER_REQUEST_LEN \
80 ( sizeof ( struct eth_slow_marker_tlv ) )
81
82/** Marker response type */
83#define ETH_SLOW_TLV_MARKER_RESPONSE 2
84
85/** Marker response length */
86#define ETH_SLOW_TLV_MARKER_RESPONSE_LEN \
87 ( sizeof ( struct eth_slow_marker_tlv ) )
88
89/** Terminator TLV */
91 /** TLV header */
93} __attribute__ (( packed ));
94
95/** LACP entity (actor or partner) TLV */
97 /** TLV header */
99 /** System priority
100 *
101 * Used to determine the order in which ports are selected for
102 * aggregation.
103 */
105 /** System identifier
106 *
107 * Used to uniquely identify the system (i.e. the entity with
108 * potentially multiple ports).
109 */
111 /** Key
112 *
113 * Used to uniquely identify a group of aggregatable ports
114 * within a system.
115 */
117 /** Port priority
118 *
119 * Used to determine the order in which ports are selected for
120 * aggregation.
121 */
123 /** Port identifier
124 *
125 * Used to uniquely identify a port within a system.
126 */
128 /** State
129 *
130 * This is the bitwise OR of zero or more LACP_STATE_XXX
131 * constants.
132 */
134 /** Reserved */
136} __attribute__ (( packed ));
137
138/** Maximum system priority */
139#define LACP_SYSTEM_PRIORITY_MAX 0xffff
140
141/** Maximum port priority */
142#define LACP_PORT_PRIORITY_MAX 0xff
143
144/** LACP entity is active
145 *
146 * Represented by the state character "A"/"a"
147 */
148#define LACP_STATE_ACTIVE 0x01
149
150/** LACP timeout is short
151 *
152 * Short timeout is one second, long timeout is 30s
153 *
154 * Represented by the state character "F"/"f"
155 */
156#define LACP_STATE_FAST 0x02
157
158/** LACP link is aggregateable
159 *
160 * Represented by the state characters "G"/"g"
161 */
162#define LACP_STATE_AGGREGATABLE 0x04
163
164/** LACP link is in synchronisation
165 *
166 * Represented by the state characters "S"/"s"
167 */
168#define LACP_STATE_IN_SYNC 0x08
169
170/** LACP link is collecting (receiving)
171 *
172 * Represented by the state characters "C"/"c"
173 */
174#define LACP_STATE_COLLECTING 0x10
175
176/** LACP link is distributing (transmitting)
177 *
178 * Represented by the state characters "D"/"d"
179 */
180#define LACP_STATE_DISTRIBUTING 0x20
181
182/** LACP entity is using defaulted partner information
183 *
184 * Represented by the state characters "L"/"l"
185 */
186#define LACP_STATE_DEFAULTED 0x40
187
188/** LACP entity receive state machine is in EXPIRED
189 *
190 * Represented by the state characters "X"/"x"
191 */
192#define LACP_STATE_EXPIRED 0x80
193
194/** LACP fast interval (1 second) */
195#define LACP_INTERVAL_FAST 1
196
197/** LACP slow interval (30 seconds) */
198#define LACP_INTERVAL_SLOW 30
199
200/** LACP collector TLV */
202 /** TLV header */
204 /** Maximum delay (in 10us increments) */
206 /** Reserved */
208} __attribute__ (( packed ));
209
210/** Marker TLV */
212 /** TLV header */
214 /** Requester port */
216 /** Requester system */
218 /** Requester transaction ID */
220 /** Padding */
222} __attribute__ (( packed ));
223
224/** LACP packet */
226 /** Slow protocols header */
228 /** Actor information */
230 /** Partner information */
232 /** Collector information */
234 /** Terminator */
236 /** Reserved */
238} __attribute__ (( packed ));
239
240/** Marker packet */
242 /** Slow protocols header */
244 /** Marker information */
246 /** Terminator */
248 /** Reserved */
250} __attribute__ (( packed ));
251
252/** Slow protocols packet */
254 /** Slow protocols header */
256 /** LACP packet */
258 /** Marker packet */
260} __attribute__ (( packed ));
261
262#endif /* _IPXE_ETH_SLOW_H */
unsigned short uint16_t
Definition stdint.h:11
unsigned int uint32_t
Definition stdint.h:12
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define ETH_ALEN
Definition if_ether.h:9
#define __attribute__(x)
Definition compiler.h:10
Slow protocols header.
Definition eth_slow.h:14
uint8_t subtype
Slow protocols subtype.
Definition eth_slow.h:16
uint8_t version
Subtype version number.
Definition eth_slow.h:18
LACP collector TLV.
Definition eth_slow.h:201
uint16_t max_delay
Maximum delay (in 10us increments)
Definition eth_slow.h:205
struct eth_slow_tlv_header tlv
TLV header.
Definition eth_slow.h:203
uint8_t reserved[12]
Reserved.
Definition eth_slow.h:207
LACP entity (actor or partner) TLV.
Definition eth_slow.h:96
uint16_t port
Port identifier.
Definition eth_slow.h:127
struct eth_slow_tlv_header tlv
TLV header.
Definition eth_slow.h:98
uint8_t system[ETH_ALEN]
System identifier.
Definition eth_slow.h:110
uint16_t port_priority
Port priority.
Definition eth_slow.h:122
uint8_t reserved[3]
Reserved.
Definition eth_slow.h:135
uint8_t state
State.
Definition eth_slow.h:133
uint16_t system_priority
System priority.
Definition eth_slow.h:104
LACP packet.
Definition eth_slow.h:225
struct eth_slow_lacp_entity_tlv partner
Partner information.
Definition eth_slow.h:231
struct eth_slow_lacp_collector_tlv collector
Collector information.
Definition eth_slow.h:233
struct eth_slow_terminator_tlv terminator
Terminator.
Definition eth_slow.h:235
struct eth_slow_lacp_entity_tlv actor
Actor information.
Definition eth_slow.h:229
uint8_t reserved[50]
Reserved.
Definition eth_slow.h:237
struct eth_slow_header header
Slow protocols header.
Definition eth_slow.h:227
Marker TLV.
Definition eth_slow.h:211
uint8_t system[ETH_ALEN]
Requester system.
Definition eth_slow.h:217
uint16_t port
Requester port.
Definition eth_slow.h:215
uint32_t xact
Requester transaction ID.
Definition eth_slow.h:219
uint16_t pad
Padding.
Definition eth_slow.h:221
struct eth_slow_tlv_header tlv
TLV header.
Definition eth_slow.h:213
Marker packet.
Definition eth_slow.h:241
struct eth_slow_marker_tlv marker
Marker information.
Definition eth_slow.h:245
uint8_t reserved[90]
Reserved.
Definition eth_slow.h:249
struct eth_slow_terminator_tlv terminator
Terminator.
Definition eth_slow.h:247
struct eth_slow_header header
Slow protocols header.
Definition eth_slow.h:243
Terminator TLV.
Definition eth_slow.h:90
struct eth_slow_tlv_header tlv
TLV header.
Definition eth_slow.h:92
TLV (type, length, value) header.
Definition eth_slow.h:34
uint8_t type
Type.
Definition eth_slow.h:39
uint8_t length
Length.
Definition eth_slow.h:45
Slow protocols packet.
Definition eth_slow.h:253
struct eth_slow_header header
Slow protocols header.
Definition eth_slow.h:255
struct eth_slow_lacp lacp
LACP packet.
Definition eth_slow.h:257
struct eth_slow_marker marker
Marker packet.
Definition eth_slow.h:259