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 
11 FILE_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 */
18 union 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) */
37 struct fcoe_map {
39 } __attribute__ (( packed ));
40 
41 /** An FCoE (fabric-assigned) MAC address */
42 struct fcoe_mac {
43  /** MAC address prefix */
44  struct fcoe_map map;
45  /** Port ID */
47 } __attribute__ (( packed ));
48 
49 /** An FCoE header */
50 struct 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 */
63 enum fcoe_sof {
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 */
72 struct fcoe_footer {
73  /** CRC */
75  /** End of frame marker */
77  /** Reserved */
79 } __attribute__ (( packed ));
80 
81 /** End of Frame marker value */
82 enum fcoe_eof {
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 */
#define __attribute__(x)
Definition: compiler.h:10
unsigned short uint16_t
Definition: stdint.h:11
An FCoE (fabric-assigned) MAC address.
Definition: fcoe.h:42
uint8_t mac[ETH_ALEN]
MAC address.
Definition: fcoe.h:26
fcoe_eof
End of Frame marker value.
Definition: fcoe.h:82
uint8_t version
FCoE frame version.
Definition: fcoe.h:52
An FCoE header.
Definition: fcoe.h:50
End of Frame Invalid.
Definition: fcoe.h:85
End of Frame Terminate.
Definition: fcoe.h:84
struct fc_port_id port_id
Port ID.
Definition: fcoe.h:46
struct fcoe_name::@524 fcoe
FCoE name.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
A Fibre Channel port identifier.
Definition: fc.h:37
Start of Frame Class F.
Definition: fcoe.h:64
uint16_t authority
Naming authority.
Definition: fcoe.h:24
fcoe_sof
Start of Frame marker values.
Definition: fcoe.h:63
unsigned char uint8_t
Definition: stdint.h:10
#define ETH_ALEN
Definition: if_ether.h:8
Fibre Channel.
unsigned int uint32_t
Definition: stdint.h:12
struct fc_name fc
Fibre Channel name.
Definition: fcoe.h:20
A Fibre Channel name.
Definition: fc.h:29
Start of Frame Initiate Class 3.
Definition: fcoe.h:67
uint8_t bytes[3]
Definition: fcoe.h:38
Start of Frame Initiate Class 2.
Definition: fcoe.h:65
uint8_t reserved[12]
Reserved.
Definition: fcoe.h:54
struct fcoe_map map
MAC address prefix.
Definition: fcoe.h:44
Start of Frame Normal Class 2.
Definition: fcoe.h:66
An FCoE MAC address prefix (FC-MAP)
Definition: fcoe.h:37
uint8_t sof
Start of Frame marker.
Definition: fcoe.h:56
End of Frame Abort.
Definition: fcoe.h:86
Start of Frame Normal Class 3.
Definition: fcoe.h:68
End of Frame Normal.
Definition: fcoe.h:83
An FCoE name.
Definition: fcoe.h:18