iPXE
fcoe.h
Go to the documentation of this file.
1#ifndef _IPXE_FCOE_H
2#define _IPXE_FCOE_H
3
4/**
5 * @file
6 *
7 * Fibre Channel over Ethernet
8 *
9 */
10
11FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12
13#include <stdint.h>
14#include <ipxe/fc.h>
15#include <ipxe/if_ether.h>
16
17/** An FCoE name */
18union fcoe_name {
19 /** Fibre Channel name */
20 struct fc_name fc;
21 /** FCoE name */
22 struct {
23 /** Naming authority */
25 /** MAC address */
27 } __attribute__ (( packed )) fcoe;
28};
29
30/** IEEE 48-bit address */
31#define FCOE_AUTHORITY_IEEE 0x1000
32
33/** IEEE extended */
34#define FCOE_AUTHORITY_IEEE_EXTENDED 0x2000
35
36/** An FCoE MAC address prefix (FC-MAP) */
37struct fcoe_map {
39} __attribute__ (( packed ));
40
41/** An FCoE (fabric-assigned) MAC address */
42struct fcoe_mac {
43 /** MAC address prefix */
44 struct fcoe_map map;
45 /** Port ID */
47} __attribute__ (( packed ));
48
49/** An FCoE header */
51 /** FCoE frame version */
53 /** Reserved */
55 /** Start of Frame marker */
57} __attribute__ (( packed ));
58
59/** FCoE frame version */
60#define FCOE_FRAME_VER 0x00
61
62/** Start of Frame marker values */
64 FCOE_SOF_F = 0x28, /**< Start of Frame Class F */
65 FCOE_SOF_I2 = 0x2d, /**< Start of Frame Initiate Class 2 */
66 FCOE_SOF_N2 = 0x35, /**< Start of Frame Normal Class 2 */
67 FCOE_SOF_I3 = 0x2e, /**< Start of Frame Initiate Class 3 */
68 FCOE_SOF_N3 = 0x36, /**< Start of Frame Normal Class 3 */
69};
70
71/** An FCoE footer */
73 /** CRC */
75 /** End of frame marker */
77 /** Reserved */
79} __attribute__ (( packed ));
80
81/** End of Frame marker value */
83 FCOE_EOF_N = 0x41, /**< End of Frame Normal */
84 FCOE_EOF_T = 0x42, /**< End of Frame Terminate */
85 FCOE_EOF_NI = 0x49, /**< End of Frame Invalid */
86 FCOE_EOF_A = 0x50, /**< End of Frame Abort */
87};
88
89/** FCoE VLAN priority */
90#define FCOE_VLAN_PRIORITY 3
91
92#endif /* _IPXE_FCOE_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
Fibre Channel.
fcoe_eof
End of Frame marker value.
Definition fcoe.h:82
@ FCOE_EOF_T
End of Frame Terminate.
Definition fcoe.h:84
@ FCOE_EOF_N
End of Frame Normal.
Definition fcoe.h:83
@ FCOE_EOF_A
End of Frame Abort.
Definition fcoe.h:86
@ FCOE_EOF_NI
End of Frame Invalid.
Definition fcoe.h:85
fcoe_sof
Start of Frame marker values.
Definition fcoe.h:63
@ FCOE_SOF_I2
Start of Frame Initiate Class 2.
Definition fcoe.h:65
@ FCOE_SOF_I3
Start of Frame Initiate Class 3.
Definition fcoe.h:67
@ FCOE_SOF_N3
Start of Frame Normal Class 3.
Definition fcoe.h:68
@ FCOE_SOF_F
Start of Frame Class F.
Definition fcoe.h:64
@ FCOE_SOF_N2
Start of Frame Normal Class 2.
Definition fcoe.h:66
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define ETH_ALEN
Definition if_ether.h:9
#define __attribute__(x)
Definition compiler.h:10
A Fibre Channel name.
Definition fc.h:30
A Fibre Channel port identifier.
Definition fc.h:38
An FCoE header.
Definition fcoe.h:50
uint8_t version
FCoE frame version.
Definition fcoe.h:52
uint8_t sof
Start of Frame marker.
Definition fcoe.h:56
uint8_t reserved[12]
Reserved.
Definition fcoe.h:54
An FCoE (fabric-assigned) MAC address.
Definition fcoe.h:42
struct fc_port_id port_id
Port ID.
Definition fcoe.h:46
struct fcoe_map map
MAC address prefix.
Definition fcoe.h:44
An FCoE MAC address prefix (FC-MAP)
Definition fcoe.h:37
uint8_t bytes[3]
Definition fcoe.h:38
An FCoE name.
Definition fcoe.h:18
uint8_t mac[ETH_ALEN]
MAC address.
Definition fcoe.h:26
struct fc_name fc
Fibre Channel name.
Definition fcoe.h:20
struct fcoe_name::@146233060014345030116354157144043320206274366016 fcoe
FCoE name.
uint16_t authority
Naming authority.
Definition fcoe.h:24