iPXE
Data Structures | Defines | 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...

Defines

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

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)

Define Documentation

#define FIP_VERSION   0x10

FIP frame version.

Definition at line 47 of file fip.h.

Referenced by fcoe_deliver(), fcoe_fip_parse(), fcoe_fip_tx_keepalive(), fcoe_fip_tx_solicitation(), and fcoe_fip_tx_vlan().

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

FIP descriptor type is critical.

Definition at line 121 of file fip.h.

Referenced by fcoe_fip_parse().

#define FIP_DEFAULT_PRIORITY   128

Default FIP priority.

Definition at line 139 of file fip.h.

#define FIP_LOWEST_PRIORITY   255

Lowest FIP priority.

Definition at line 142 of file fip.h.

Referenced by fcoe_reset().

#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 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

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.

              {
        FIP_CODE_DISCOVERY = 0x0001,    /**< Discovery */
        FIP_CODE_ELS = 0x0002,          /**< Extended link services */
        FIP_CODE_MAINTAIN = 0x0003,     /**< Maintain virtual links */
        FIP_CODE_VLAN = 0x0004,         /**< VLAN */
};

FIP protocol subcode for discovery.

Enumerator:
FIP_DISCOVERY_SOLICIT 

Discovery solicitation.

FIP_DISCOVERY_ADVERTISE 

Discovery advertisement.

Definition at line 58 of file fip.h.

                           {
        FIP_DISCOVERY_SOLICIT = 0x01,   /**< Discovery solicitation */
        FIP_DISCOVERY_ADVERTISE = 0x02, /**< Discovery advertisement */
};

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.

                     {
        FIP_ELS_REQUEST = 0x01,         /**< ELS request */
        FIP_ELS_RESPONSE = 0x02,        /**< ELS response */
};

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.

                          {
        FIP_MAINTAIN_KEEP_ALIVE = 0x01, /**< Keep alive */
        FIP_MAINTAIN_CLEAR_LINKS = 0x02,/**< Clear virtual links */
};

FIP protocol subcode for VLAN.

Enumerator:
FIP_VLAN_REQUEST 

VLAN request.

FIP_VLAN_NOTIFY 

VLAN notification.

Definition at line 76 of file fip.h.

                      {
        FIP_VLAN_REQUEST = 0x01,        /**< VLAN request */
        FIP_VLAN_NOTIFY = 0x02,         /**< VLAN notification */
};
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.

               {
        FIP_FP  = 0x8000,               /**< Fabric-provided MAC address */
        FIP_SP  = 0x4000,               /**< Server-provided MAC address */
        FIP_A   = 0x0004,               /**< Available for login */
        FIP_S   = 0x0002,               /**< Solicited */
        FIP_F   = 0x0001,               /**< Forwarder */
};
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.

              {
        FIP_RESERVED = 0x00,            /**< Reserved */
        FIP_PRIORITY = 0x01,            /**< Priority */
        FIP_MAC_ADDRESS = 0x02,         /**< MAC address */
        FIP_FC_MAP = 0x03,              /**< FC-MAP */
        FIP_NAME_ID = 0x04,             /**< Name identifier */
        FIP_FABRIC = 0x05,              /**< Fabric */
        FIP_MAX_FCOE_SIZE = 0x06,       /**< Max FCoE size */
        FIP_FLOGI = 0x07,               /**< FLOGI */
        FIP_NPIV_FDISC = 0x08,          /**< NPIV FDISC */
        FIP_LOGO = 0x09,                /**< LOGO */
        FIP_ELP = 0x0a,                 /**< ELP */
        FIP_VX_PORT_ID = 0x0b,          /**< Vx port identification */
        FIP_FKA_ADV_P = 0x0c,           /**< FKA ADV period */
        FIP_VENDOR_ID = 0x0d,           /**< Vendor ID */
        FIP_VLAN = 0x0e,                /**< VLAN */
        FIP_NUM_DESCRIPTOR_TYPES
};

FIP FKA ADV period flags.

Enumerator:
FIP_NO_KEEPALIVE 

Do not send keepalives.

Definition at line 321 of file fip.h.

                         {
        FIP_NO_KEEPALIVE = 0x01,        /**< Do not send keepalives */
};

Function Documentation

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_VLAN  ,
vlan   
)