iPXE
Data Structures | Macros | Enumerations | Functions
fip.h File Reference
#include <stdint.h>
#include <ipxe/fc.h>
#include <ipxe/fcels.h>
#include <ipxe/fcoe.h>

Go to the source code of this file.

Data Structures

struct  fip_header
 A FIP frame header. More...
 
struct  fip_common
 FIP descriptor common fields. More...
 
struct  fip_priority
 A FIP priority descriptor. More...
 
struct  fip_mac_address
 A FIP MAC address descriptor. More...
 
struct  fip_fc_map
 A FIP FC-MAP descriptor. More...
 
struct  fip_name_id
 A FIP name identifier descriptor. More...
 
struct  fip_fabric
 A FIP fabric descriptor. More...
 
struct  fip_max_fcoe_size
 A FIP max FCoE size descriptor. More...
 
struct  fip_els
 A FIP descriptor containing an encapsulated ELS frame. More...
 
struct  fip_login
 A FIP descriptor containing an encapsulated login frame. More...
 
struct  fip_logo_request
 A FIP descriptor containing an encapsulated LOGO request frame. More...
 
struct  fip_logo_response
 A FIP descriptor containing an encapsulated LOGO response frame. More...
 
struct  fip_elp
 A FIP descriptor containing an encapsulated ELP frame. More...
 
struct  fip_ls_rjt
 A FIP descriptor containing an encapsulated LS_RJT frame. More...
 
struct  fip_vx_port_id
 A FIP Vx port identification descriptor. More...
 
struct  fip_fka_adv_p
 A FIP FKA ADV period descriptor. More...
 
struct  fip_vendor_id
 A FIP vendor ID descriptor. More...
 
struct  fip_vlan
 A FIP VLAN descriptor. More...
 
union  fip_descriptor
 A FIP descriptor. More...
 
struct  fip_descriptors
 A FIP descriptor set. More...
 

Macros

#define FIP_VERSION   0x10
 FIP frame version. More...
 
#define FIP_IS_CRITICAL(type)   ( (type) <= 0x7f )
 FIP descriptor type is critical. More...
 
#define FIP_DEFAULT_PRIORITY   128
 Default FIP priority. More...
 
#define FIP_LOWEST_PRIORITY   255
 Lowest FIP priority. More...
 
#define FIP_DESCRIPTOR(type, name)
 Define a function to extract a specific FIP descriptor type from a list. More...
 

Enumerations

enum  fip_code { FIP_CODE_DISCOVERY = 0x0001, FIP_CODE_ELS = 0x0002, FIP_CODE_MAINTAIN = 0x0003, FIP_CODE_VLAN = 0x0004 }
 FIP protocol code. More...
 
enum  fip_discovery_subcode { FIP_DISCOVERY_SOLICIT = 0x01, FIP_DISCOVERY_ADVERTISE = 0x02 }
 FIP protocol subcode for discovery. More...
 
enum  fip_els_subcode { FIP_ELS_REQUEST = 0x01, FIP_ELS_RESPONSE = 0x02 }
 FIP protocol subcode for extended link services. More...
 
enum  fip_vitality_subcode { FIP_MAINTAIN_KEEP_ALIVE = 0x01, FIP_MAINTAIN_CLEAR_LINKS = 0x02 }
 FIP protocol subcode for keep alive / clear links. More...
 
enum  fip_vlan_subcode { FIP_VLAN_REQUEST = 0x01, FIP_VLAN_NOTIFY = 0x02 }
 FIP protocol subcode for VLAN. More...
 
enum  fip_flags {
  FIP_FP = 0x8000, FIP_SP = 0x4000, FIP_A = 0x0004, FIP_S = 0x0002,
  FIP_F = 0x0001
}
 FIP flags. More...
 
enum  fip_type {
  FIP_RESERVED = 0x00, FIP_PRIORITY = 0x01, FIP_MAC_ADDRESS = 0x02, FIP_FC_MAP = 0x03,
  FIP_NAME_ID = 0x04, FIP_FABRIC = 0x05, FIP_MAX_FCOE_SIZE = 0x06, FIP_FLOGI = 0x07,
  FIP_NPIV_FDISC = 0x08, FIP_LOGO = 0x09, FIP_ELP = 0x0a, FIP_VX_PORT_ID = 0x0b,
  FIP_FKA_ADV_P = 0x0c, FIP_VENDOR_ID = 0x0d, FIP_VLAN = 0x0e, FIP_NUM_DESCRIPTOR_TYPES
}
 FIP descriptor types. More...
 
enum  fip_fka_adv_p_flags { FIP_NO_KEEPALIVE = 0x01 }
 FIP FKA ADV period flags. More...
 

Functions

 FIP_DESCRIPTOR (FIP_PRIORITY, priority)
 
 FIP_DESCRIPTOR (FIP_MAC_ADDRESS, mac_address)
 
 FIP_DESCRIPTOR (FIP_FC_MAP, fc_map)
 
 FIP_DESCRIPTOR (FIP_NAME_ID, name_id)
 
 FIP_DESCRIPTOR (FIP_FABRIC, fabric)
 
 FIP_DESCRIPTOR (FIP_MAX_FCOE_SIZE, max_fcoe_size)
 
 FIP_DESCRIPTOR (FIP_FLOGI, flogi)
 
 FIP_DESCRIPTOR (FIP_FLOGI, flogi_request)
 
 FIP_DESCRIPTOR (FIP_FLOGI, flogi_ls_acc)
 
 FIP_DESCRIPTOR (FIP_FLOGI, flogi_ls_rjt)
 
 FIP_DESCRIPTOR (FIP_NPIV_FDISC, npiv_fdisc)
 
 FIP_DESCRIPTOR (FIP_NPIV_FDISC, npiv_fdisc_request)
 
 FIP_DESCRIPTOR (FIP_NPIV_FDISC, npiv_fdisc_ls_acc)
 
 FIP_DESCRIPTOR (FIP_NPIV_FDISC, npiv_fdisc_ls_rjt)
 
 FIP_DESCRIPTOR (FIP_LOGO, logo)
 
 FIP_DESCRIPTOR (FIP_LOGO, logo_request)
 
 FIP_DESCRIPTOR (FIP_LOGO, logo_ls_acc)
 
 FIP_DESCRIPTOR (FIP_LOGO, logo_ls_rjt)
 
 FIP_DESCRIPTOR (FIP_ELP, elp)
 
 FIP_DESCRIPTOR (FIP_ELP, elp_request)
 
 FIP_DESCRIPTOR (FIP_ELP, elp_ls_acc)
 
 FIP_DESCRIPTOR (FIP_ELP, elp_ls_rjt)
 
 FIP_DESCRIPTOR (FIP_VX_PORT_ID, vx_port_id)
 
 FIP_DESCRIPTOR (FIP_FKA_ADV_P, fka_adv_p)
 
 FIP_DESCRIPTOR (FIP_VENDOR_ID, vendor_id)
 
 FIP_DESCRIPTOR (FIP_VLAN, vlan)
 

Macro Definition Documentation

◆ FIP_VERSION

#define FIP_VERSION   0x10

FIP frame version.

Definition at line 47 of file fip.h.

◆ FIP_IS_CRITICAL

#define FIP_IS_CRITICAL (   type)    ( (type) <= 0x7f )

FIP descriptor type is critical.

Definition at line 121 of file fip.h.

◆ FIP_DEFAULT_PRIORITY

#define FIP_DEFAULT_PRIORITY   128

Default FIP priority.

Definition at line 139 of file fip.h.

◆ FIP_LOWEST_PRIORITY

#define FIP_LOWEST_PRIORITY   255

Lowest FIP priority.

Definition at line 142 of file fip.h.

◆ FIP_DESCRIPTOR

#define FIP_DESCRIPTOR (   type,
  name 
)
Value:
static inline __attribute__ (( always_inline )) \
typeof ( ( ( union fip_descriptor * ) NULL )->name ) * \
fip_ ## name ( struct fip_descriptors *descs ) { \
return &(descs->desc[type]->name); \
}
#define __attribute__(x)
Definition: compiler.h:10
const char * name
Definition: ath9k_hw.c:1984
A FIP descriptor set.
Definition: fip.h:406
union fip_descriptor * desc[FIP_NUM_DESCRIPTOR_TYPES]
Descriptors, indexed by type.
Definition: fip.h:408
uint32_t type
Operating system type.
Definition: ena.h:12
A FIP descriptor.
Definition: fip.h:348
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Define a function to extract a specific FIP descriptor type from a list.

Parameters
typeDescriptor type
nameDescriptor name
finderDescriptor finder

Definition at line 418 of file fip.h.

Enumeration Type Documentation

◆ fip_code

enum fip_code

FIP protocol code.

Enumerator
FIP_CODE_DISCOVERY 

Discovery.

FIP_CODE_ELS 

Extended link services.

FIP_CODE_MAINTAIN 

Maintain virtual links.

FIP_CODE_VLAN 

VLAN.

Definition at line 50 of file fip.h.

50  {
51  FIP_CODE_DISCOVERY = 0x0001, /**< Discovery */
52  FIP_CODE_ELS = 0x0002, /**< Extended link services */
53  FIP_CODE_MAINTAIN = 0x0003, /**< Maintain virtual links */
54  FIP_CODE_VLAN = 0x0004, /**< VLAN */
55 };
Maintain virtual links.
Definition: fip.h:53
VLAN.
Definition: fip.h:54
Extended link services.
Definition: fip.h:52
Discovery.
Definition: fip.h:51

◆ fip_discovery_subcode

FIP protocol subcode for discovery.

Enumerator
FIP_DISCOVERY_SOLICIT 

Discovery solicitation.

FIP_DISCOVERY_ADVERTISE 

Discovery advertisement.

Definition at line 58 of file fip.h.

58  {
59  FIP_DISCOVERY_SOLICIT = 0x01, /**< Discovery solicitation */
60  FIP_DISCOVERY_ADVERTISE = 0x02, /**< Discovery advertisement */
61 };
Discovery advertisement.
Definition: fip.h:60
Discovery solicitation.
Definition: fip.h:59

◆ fip_els_subcode

FIP protocol subcode for extended link services.

Enumerator
FIP_ELS_REQUEST 

ELS request.

FIP_ELS_RESPONSE 

ELS response.

Definition at line 64 of file fip.h.

64  {
65  FIP_ELS_REQUEST = 0x01, /**< ELS request */
66  FIP_ELS_RESPONSE = 0x02, /**< ELS response */
67 };
ELS response.
Definition: fip.h:66
ELS request.
Definition: fip.h:65

◆ fip_vitality_subcode

FIP protocol subcode for keep alive / clear links.

Enumerator
FIP_MAINTAIN_KEEP_ALIVE 

Keep alive.

FIP_MAINTAIN_CLEAR_LINKS 

Clear virtual links.

Definition at line 70 of file fip.h.

70  {
71  FIP_MAINTAIN_KEEP_ALIVE = 0x01, /**< Keep alive */
72  FIP_MAINTAIN_CLEAR_LINKS = 0x02,/**< Clear virtual links */
73 };
Keep alive.
Definition: fip.h:71
Clear virtual links.
Definition: fip.h:72

◆ fip_vlan_subcode

FIP protocol subcode for VLAN.

Enumerator
FIP_VLAN_REQUEST 

VLAN request.

FIP_VLAN_NOTIFY 

VLAN notification.

Definition at line 76 of file fip.h.

76  {
77  FIP_VLAN_REQUEST = 0x01, /**< VLAN request */
78  FIP_VLAN_NOTIFY = 0x02, /**< VLAN notification */
79 };
VLAN request.
Definition: fip.h:77
VLAN notification.
Definition: fip.h:78

◆ fip_flags

enum fip_flags

FIP flags.

Enumerator
FIP_FP 

Fabric-provided MAC address.

FIP_SP 

Server-provided MAC address.

FIP_A 

Available for login.

FIP_S 

Solicited.

FIP_F 

Forwarder.

Definition at line 82 of file fip.h.

82  {
83  FIP_FP = 0x8000, /**< Fabric-provided MAC address */
84  FIP_SP = 0x4000, /**< Server-provided MAC address */
85  FIP_A = 0x0004, /**< Available for login */
86  FIP_S = 0x0002, /**< Solicited */
87  FIP_F = 0x0001, /**< Forwarder */
88 };
Forwarder.
Definition: fip.h:87
Available for login.
Definition: fip.h:85
Solicited.
Definition: fip.h:86
Fabric-provided MAC address.
Definition: fip.h:83
Server-provided MAC address.
Definition: fip.h:84

◆ fip_type

enum fip_type

FIP descriptor types.

Enumerator
FIP_RESERVED 

Reserved.

FIP_PRIORITY 

Priority.

FIP_MAC_ADDRESS 

MAC address.

FIP_FC_MAP 

FC-MAP.

FIP_NAME_ID 

Name identifier.

FIP_FABRIC 

Fabric.

FIP_MAX_FCOE_SIZE 

Max FCoE size.

FIP_FLOGI 

FLOGI.

FIP_NPIV_FDISC 

NPIV FDISC.

FIP_LOGO 

LOGO.

FIP_ELP 

ELP.

FIP_VX_PORT_ID 

Vx port identification.

FIP_FKA_ADV_P 

FKA ADV period.

FIP_VENDOR_ID 

Vendor ID.

FIP_VLAN 

VLAN.

FIP_NUM_DESCRIPTOR_TYPES 

Definition at line 101 of file fip.h.

101  {
102  FIP_RESERVED = 0x00, /**< Reserved */
103  FIP_PRIORITY = 0x01, /**< Priority */
104  FIP_MAC_ADDRESS = 0x02, /**< MAC address */
105  FIP_FC_MAP = 0x03, /**< FC-MAP */
106  FIP_NAME_ID = 0x04, /**< Name identifier */
107  FIP_FABRIC = 0x05, /**< Fabric */
108  FIP_MAX_FCOE_SIZE = 0x06, /**< Max FCoE size */
109  FIP_FLOGI = 0x07, /**< FLOGI */
110  FIP_NPIV_FDISC = 0x08, /**< NPIV FDISC */
111  FIP_LOGO = 0x09, /**< LOGO */
112  FIP_ELP = 0x0a, /**< ELP */
113  FIP_VX_PORT_ID = 0x0b, /**< Vx port identification */
114  FIP_FKA_ADV_P = 0x0c, /**< FKA ADV period */
115  FIP_VENDOR_ID = 0x0d, /**< Vendor ID */
116  FIP_VLAN = 0x0e, /**< VLAN */
118 };
Reserved.
Definition: fip.h:102
Vx port identification.
Definition: fip.h:113
MAC address.
Definition: fip.h:104
FLOGI.
Definition: fip.h:109
Max FCoE size.
Definition: fip.h:108
LOGO.
Definition: fip.h:111
Name identifier.
Definition: fip.h:106
VLAN.
Definition: fip.h:116
Fabric.
Definition: fip.h:107
Vendor ID.
Definition: fip.h:115
FC-MAP.
Definition: fip.h:105
Priority.
Definition: fip.h:103
ELP.
Definition: fip.h:112
NPIV FDISC.
Definition: fip.h:110
FKA ADV period.
Definition: fip.h:114

◆ fip_fka_adv_p_flags

FIP FKA ADV period flags.

Enumerator
FIP_NO_KEEPALIVE 

Do not send keepalives.

Definition at line 321 of file fip.h.

321  {
322  FIP_NO_KEEPALIVE = 0x01, /**< Do not send keepalives */
323 };
Do not send keepalives.
Definition: fip.h:322

Function Documentation

◆ FIP_DESCRIPTOR() [1/26]

FIP_DESCRIPTOR ( FIP_PRIORITY  ,
priority   
)

◆ FIP_DESCRIPTOR() [2/26]

FIP_DESCRIPTOR ( FIP_MAC_ADDRESS  ,
mac_address   
)

◆ FIP_DESCRIPTOR() [3/26]

FIP_DESCRIPTOR ( FIP_FC_MAP  ,
fc_map   
)

◆ FIP_DESCRIPTOR() [4/26]

FIP_DESCRIPTOR ( FIP_NAME_ID  ,
name_id   
)

◆ FIP_DESCRIPTOR() [5/26]

FIP_DESCRIPTOR ( FIP_FABRIC  ,
fabric   
)

◆ FIP_DESCRIPTOR() [6/26]

FIP_DESCRIPTOR ( FIP_MAX_FCOE_SIZE  ,
max_fcoe_size   
)

◆ FIP_DESCRIPTOR() [7/26]

FIP_DESCRIPTOR ( FIP_FLOGI  ,
flogi   
)

◆ FIP_DESCRIPTOR() [8/26]

FIP_DESCRIPTOR ( FIP_FLOGI  ,
flogi_request   
)

◆ FIP_DESCRIPTOR() [9/26]

FIP_DESCRIPTOR ( FIP_FLOGI  ,
flogi_ls_acc   
)

◆ FIP_DESCRIPTOR() [10/26]

FIP_DESCRIPTOR ( FIP_FLOGI  ,
flogi_ls_rjt   
)

◆ FIP_DESCRIPTOR() [11/26]

FIP_DESCRIPTOR ( FIP_NPIV_FDISC  ,
npiv_fdisc   
)

◆ FIP_DESCRIPTOR() [12/26]

FIP_DESCRIPTOR ( FIP_NPIV_FDISC  ,
npiv_fdisc_request   
)

◆ FIP_DESCRIPTOR() [13/26]

FIP_DESCRIPTOR ( FIP_NPIV_FDISC  ,
npiv_fdisc_ls_acc   
)

◆ FIP_DESCRIPTOR() [14/26]

FIP_DESCRIPTOR ( FIP_NPIV_FDISC  ,
npiv_fdisc_ls_rjt   
)

◆ FIP_DESCRIPTOR() [15/26]

FIP_DESCRIPTOR ( FIP_LOGO  ,
logo   
)

◆ FIP_DESCRIPTOR() [16/26]

FIP_DESCRIPTOR ( FIP_LOGO  ,
logo_request   
)

◆ FIP_DESCRIPTOR() [17/26]

FIP_DESCRIPTOR ( FIP_LOGO  ,
logo_ls_acc   
)

◆ FIP_DESCRIPTOR() [18/26]

FIP_DESCRIPTOR ( FIP_LOGO  ,
logo_ls_rjt   
)

◆ FIP_DESCRIPTOR() [19/26]

FIP_DESCRIPTOR ( FIP_ELP  ,
elp   
)

◆ FIP_DESCRIPTOR() [20/26]

FIP_DESCRIPTOR ( FIP_ELP  ,
elp_request   
)

◆ FIP_DESCRIPTOR() [21/26]

FIP_DESCRIPTOR ( FIP_ELP  ,
elp_ls_acc   
)

◆ FIP_DESCRIPTOR() [22/26]

FIP_DESCRIPTOR ( FIP_ELP  ,
elp_ls_rjt   
)

◆ FIP_DESCRIPTOR() [23/26]

FIP_DESCRIPTOR ( FIP_VX_PORT_ID  ,
vx_port_id   
)

◆ FIP_DESCRIPTOR() [24/26]

FIP_DESCRIPTOR ( FIP_FKA_ADV_P  ,
fka_adv_p   
)

◆ FIP_DESCRIPTOR() [25/26]

FIP_DESCRIPTOR ( FIP_VENDOR_ID  ,
vendor_id   
)

◆ FIP_DESCRIPTOR() [26/26]

FIP_DESCRIPTOR ( FIP_VLAN  ,
vlan   
)