iPXE
|
Fibre Channel. More...
#include <stdint.h>
#include <ipxe/refcnt.h>
#include <ipxe/list.h>
#include <ipxe/tables.h>
#include <ipxe/interface.h>
#include <ipxe/retry.h>
#include <ipxe/socket.h>
Go to the source code of this file.
Data Structures | |
struct | fc_name |
A Fibre Channel name. More... | |
struct | fc_port_id |
A Fibre Channel port identifier. More... | |
struct | sockaddr_fc |
Fibre Channel socket address. More... | |
struct | fc_link_state |
A Fibre Channel link state nonitor. More... | |
struct | fc_frame_header |
A Fibre Channel Frame Header. More... | |
struct | fc_responder |
A Fibre Channel responder. More... | |
struct | fc_port |
A Fibre Channel port. More... | |
struct | fc_peer |
A Fibre Channel peer. More... | |
struct | fc_ulp |
A Fibre Channel upper-layer protocol. More... | |
struct | fc_ulp_user |
A Fibre Channel upper-layer protocol user. More... | |
Macros | |
#define | FC_NAME_STRLEN 23 /* "xx:xx:xx:xx:xx:xx:xx:xx" */ |
Length of Fibre Channel name text. More... | |
#define | FC_PORT_ID_STRLEN 9 /* "xx.xx.xx" */ |
Length of Fibre Channel port identifier next. More... | |
#define | FC_LINK_RETRY_DELAY ( 2 * TICKS_PER_SEC ) |
Delay between failed link-up attempts. More... | |
#define | FC_R_CTL_ROUTING_MASK 0xf0 |
Fibre Channel Routing Control Routing mask. More... | |
#define | FC_R_CTL_INFO_MASK 0x07 |
Fibre Channel Routing Control Information mask. More... | |
#define | FC_RX_ID_UNKNOWN 0xffff |
Responder exchange identifier used before first response. More... | |
#define | FC_RESPONDERS __table ( struct fc_responder, "fc_responders" ) |
Fibre Channel responder table. More... | |
#define | __fc_responder __table_entry ( FC_RESPONDERS, 01 ) |
Declare a Fibre Channel responder. More... | |
Enumerations | |
enum | fc_r_ctl_routing { FC_R_CTL_DATA = 0x00, FC_R_CTL_ELS = 0x20, FC_R_CTL_FC4_LINK = 0x30, FC_R_CTL_VIDEO = 0x40, FC_R_CTL_EH = 0x50, FC_R_CTL_BLS = 0x80, FC_R_CTL_LINK_CTRL = 0xc0, FC_R_CTL_EXT_ROUTE = 0xf0 } |
Fibre Channel Routing Control Routing. More... | |
enum | fc_r_ctl_info { FC_R_CTL_UNCAT = 0x00, FC_R_CTL_SOL_DATA = 0x01, FC_R_CTL_UNSOL_CTRL = 0x02, FC_R_CTL_SOL_CTRL = 0x03, FC_R_CTL_UNSOL_DATA = 0x04, FC_R_CTL_DATA_DESC = 0x05, FC_R_CTL_UNSOL_CMD = 0x06, FC_R_CTL_CMD_STAT = 0x07 } |
Fibre Channel Routing Control Information. More... | |
enum | fc_type { FC_TYPE_BLS = 0x00, FC_TYPE_ELS = 0x01, FC_TYPE_FCP = 0x08, FC_TYPE_CT = 0x20 } |
Fibre Channel Data Structure Type. More... | |
enum | fc_f_ctl_es { FC_F_CTL_ES_RESPONDER = 0x80, FC_F_CTL_ES_RECIPIENT = 0x40, FC_F_CTL_ES_FIRST = 0x20, FC_F_CTL_ES_LAST = 0x10, FC_F_CTL_ES_END = 0x08, FC_F_CTL_ES_TRANSFER = 0x01 } |
Fibre Channel Frame Control - Exchange and Sequence. More... | |
enum | fc_f_ctl_misc { FC_F_CTL_MISC_REL_OFF = 0x08 } |
Fibre Channel Frame Control - Miscellaneous. More... | |
enum | fc_port_flags { FC_PORT_HAS_FABRIC = 0x0001, FC_PORT_HAS_NS = 0x0002 } |
Fibre Channel port flags. More... | |
enum | fc_ulp_flags { FC_ULP_ORIGINATED_LOGIN_OK = 0x0001 } |
Fibre Channel upper-layer protocol flags. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
const char * | fc_id_ntoa (const struct fc_port_id *id) |
Format Fibre Channel port ID. More... | |
int | fc_id_aton (const char *id_text, struct fc_port_id *id) |
Parse Fibre Channel port ID. More... | |
const char * | fc_ntoa (const struct fc_name *wwn) |
Format Fibre Channel WWN. More... | |
int | fc_aton (const char *wwn_text, struct fc_name *wwn) |
Parse Fibre Channel WWN. More... | |
struct sockaddr * | fc_fill_sockaddr (struct sockaddr_fc *sa_fc, struct fc_port_id *id) |
Fill Fibre Channel socket address. More... | |
static int | fc_link_ok (struct fc_link_state *link) |
Check Fibre Channel link state. More... | |
int | fc_xchg_originate (struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id, unsigned int type) |
Originate a new Fibre Channel exchange. More... | |
static struct fc_port * | fc_port_get (struct fc_port *port) |
Get reference to Fibre Channel port. More... | |
static void | fc_port_put (struct fc_port *port) |
Drop reference to Fibre Channel port. More... | |
int | fc_port_login (struct fc_port *port, struct fc_port_id *port_id, const struct fc_name *link_node_wwn, const struct fc_name *link_port_wwn, int has_fabric) |
Log in Fibre Channel port. More... | |
void | fc_port_logout (struct fc_port *port, int rc) |
Log out Fibre Channel port. More... | |
int | fc_port_open (struct interface *transport, const struct fc_name *node_wwn, const struct fc_name *port_wwn, const char *name) |
Create Fibre Channel port. More... | |
struct fc_port * | fc_port_find (const char *name) |
Find Fibre Channel port by name. More... | |
static struct fc_peer * | fc_peer_get (struct fc_peer *peer) |
Get reference to Fibre Channel peer. More... | |
static void | fc_peer_put (struct fc_peer *peer) |
Drop reference to Fibre Channel peer. More... | |
struct fc_peer * | fc_peer_get_wwn (const struct fc_name *port_wwn) |
Get Fibre Channel peer by node name. More... | |
struct fc_peer * | fc_peer_get_port_id (struct fc_port *port, const struct fc_port_id *peer_port_id) |
Get Fibre Channel peer by port ID. More... | |
int | fc_peer_login (struct fc_peer *peer, struct fc_port *port, struct fc_port_id *port_id) |
Log in Fibre Channel peer. More... | |
void | fc_peer_logout (struct fc_peer *peer, int rc) |
Log out Fibre Channel peer. More... | |
static struct fc_ulp * | fc_ulp_get (struct fc_ulp *ulp) |
Get reference to Fibre Channel upper-layer protocol. More... | |
static void | fc_ulp_put (struct fc_ulp *ulp) |
Drop reference to Fibre Channel upper-layer protocol. More... | |
static struct fc_ulp_user * | fc_ulp_user_get (struct fc_ulp_user *user) |
Get reference to Fibre Channel upper-layer protocol user. More... | |
static void | fc_ulp_user_put (struct fc_ulp_user *user) |
Drop reference to Fibre Channel upper-layer protocol user. More... | |
static void | fc_ulp_user_init (struct fc_ulp_user *user, void(*examine)(struct fc_ulp_user *user), struct refcnt *refcnt) |
Initialise Fibre Channel upper-layer protocol user. More... | |
struct fc_ulp * | fc_ulp_get_wwn_type (const struct fc_name *port_wwn, unsigned int type) |
Get Fibre Channel upper-layer protocol by port name and type. More... | |
struct fc_ulp * | fc_ulp_get_port_id_type (struct fc_port *port, const struct fc_port_id *peer_port_id, unsigned int type) |
Get Fibre Channel upper-layer protocol by port ID and type. More... | |
void | fc_ulp_attach (struct fc_ulp *ulp, struct fc_ulp_user *user) |
Attach Fibre Channel upper-layer protocol user. More... | |
void | fc_ulp_detach (struct fc_ulp_user *user) |
Detach Fibre Channel upper-layer protocol user. More... | |
int | fc_ulp_login (struct fc_ulp *ulp, const void *param, size_t param_len, int originated) |
Log in Fibre Channel upper-layer protocol. More... | |
void | fc_ulp_logout (struct fc_ulp *ulp, int rc) |
Log out Fibre Channel upper-layer protocol. More... | |
Variables | |
struct fc_port_id | fc_empty_port_id |
Unassigned port ID. More... | |
struct fc_port_id | fc_f_port_id |
F_Port contoller port ID. More... | |
struct fc_port_id | fc_gs_port_id |
Generic services port ID. More... | |
struct fc_port_id | fc_ptp_low_port_id |
Point-to-point low port ID. More... | |
struct fc_port_id | fc_ptp_high_port_id |
Point-to-point high port ID. More... | |
struct list_head | fc_ports |
struct list_head | fc_peers |
Fibre Channel.
Definition in file fc.h.
#define FC_NAME_STRLEN 23 /* "xx:xx:xx:xx:xx:xx:xx:xx" */ |
#define FC_PORT_ID_STRLEN 9 /* "xx.xx.xx" */ |
#define FC_LINK_RETRY_DELAY ( 2 * TICKS_PER_SEC ) |
#define FC_R_CTL_ROUTING_MASK 0xf0 |
#define FC_R_CTL_INFO_MASK 0x07 |
#define FC_RX_ID_UNKNOWN 0xffff |
#define FC_RESPONDERS __table ( struct fc_responder, "fc_responders" ) |
#define __fc_responder __table_entry ( FC_RESPONDERS, 01 ) |
enum fc_r_ctl_routing |
Fibre Channel Routing Control Routing.
Definition at line 160 of file fc.h.
enum fc_r_ctl_info |
Fibre Channel Routing Control Information.
Definition at line 175 of file fc.h.
enum fc_type |
enum fc_f_ctl_es |
Fibre Channel Frame Control - Exchange and Sequence.
Definition at line 198 of file fc.h.
enum fc_f_ctl_misc |
enum fc_port_flags |
enum fc_ulp_flags |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
const char* fc_id_ntoa | ( | const struct fc_port_id * | id | ) |
Format Fibre Channel port ID.
id | Fibre Channel port ID |
id_text | Port ID text |
Definition at line 92 of file fc.c.
References FC_PORT_ID_STRLEN, id, and snprintf().
Referenced by fc_els_flogi_rx(), fc_els_logo_rx_request(), fc_els_plogi_rx(), fc_ns_query_deliver(), fc_peer_login(), fc_port_deliver(), fc_port_login(), fc_xchg_originate(), fc_xchg_respond(), fcels(), fcpeerstat(), and fcportstat().
int fc_id_aton | ( | const char * | id_text, |
struct fc_port_id * | id | ||
) |
Parse Fibre Channel port ID.
id_text | Port ID text |
id | Fibre Channel port ID |
rc | Return status code |
Definition at line 107 of file fc.c.
References EINVAL, id, and strtoul().
Referenced by parse_fc_port_id().
const char* fc_ntoa | ( | const struct fc_name * | wwn | ) |
Format Fibre Channel WWN.
wwn | Fibre Channel WWN |
wwn_text | WWN text |
Definition at line 127 of file fc.c.
References FC_NAME_STRLEN, snprintf(), and wwn.
Referenced by fc_els_flogi_rx(), fc_els_logo_rx_request(), fc_els_plogi_rx(), fc_ns_query(), fc_ns_query_deliver(), fc_peer_close(), fc_peer_create(), fc_peer_examine(), fc_peer_login(), fc_peer_logout(), fc_peer_plogi(), fc_port_login(), fc_port_open(), fc_ulp_close(), fc_ulp_create(), fc_ulp_examine(), fc_ulp_login(), fc_ulp_logout(), fcoe_probe(), fcpdev_open(), fcpeerstat(), and fcportstat().
int fc_aton | ( | const char * | wwn_text, |
struct fc_name * | wwn | ||
) |
Parse Fibre Channel WWN.
wwn_text | WWN text |
wwn | Fibre Channel WWN |
rc | Return status code |
Definition at line 144 of file fc.c.
References EINVAL, strtoul(), and wwn.
Referenced by fcp_parse_uri().
struct sockaddr* fc_fill_sockaddr | ( | struct sockaddr_fc * | sa_fc, |
struct fc_port_id * | id | ||
) |
Fill Fibre Channel socket address.
sa_fc | Fibre Channel socket address to fill in |
id | Fibre Channel port ID |
sa | Socket address |
Definition at line 165 of file fc.c.
References AF_FC, container_of, fc, memcpy(), memset(), sa, sockaddr_fc::sfc_family, sockaddr_fc::sfc_port_id, typeof(), and u.
Referenced by fc_els_tx(), and fc_xchg_rx().
|
inlinestatic |
Check Fibre Channel link state.
link | Fibre Channel link state monitor |
link_up | Link is up |
Definition at line 108 of file fc.h.
References link.
Referenced by fc_els_plogi_rx(), fc_els_prli_rx(), fc_els_prli_tx(), fc_peer_examine(), fc_peer_login(), fc_peer_logout(), fc_port_close(), fc_port_examine(), fc_port_login(), fc_port_window_changed(), fc_ulp_examine(), fc_ulp_login(), fc_ulp_logout(), fcels_exec(), fcpdev_examine(), fcpdev_identify_device(), fcpdev_window(), fcpeerstat(), and fcportstat().
int fc_xchg_originate | ( | struct interface * | parent, |
struct fc_port * | port, | ||
struct fc_port_id * | peer_port_id, | ||
unsigned int | type | ||
) |
Originate a new Fibre Channel exchange.
parent | Interface to which to attach |
port | Fibre Channel port |
peer_port_id | Peer port ID |
xchg_id | Exchange ID, or negative error |
Definition at line 728 of file fc.c.
References DBGC2, ENOMEM, fc_id_ntoa(), fc_xchg_create(), FC_XCHG_ORIGINATOR, FC_XCHG_SEQ_FIRST, FC_XCHG_SEQ_INITIATIVE, fc_exchange::flags, intf_plug_plug(), fc_exchange::peer_port_id, port, type, fc_exchange::type, fc_exchange::ulp, and fc_exchange::xchg_id.
Referenced by fc_els_step(), fc_ns_query_step(), and fcpdev_scsi_command().
Get reference to Fibre Channel port.
port | Fibre Channel port |
port | Fibre Channel port |
Definition at line 304 of file fc.h.
Referenced by fc_els_create(), fc_ns_query(), fc_peer_login(), and fc_xchg_create().
|
inlinestatic |
Drop reference to Fibre Channel port.
port | Fibre Channel port |
Definition at line 315 of file fc.h.
Referenced by fc_els_free(), fc_ns_query_free(), fc_peer_logout(), and fc_xchg_free().
int fc_port_login | ( | struct fc_port * | port, |
struct fc_port_id * | port_id, | ||
const struct fc_name * | link_node_wwn, | ||
const struct fc_name * | link_port_wwn, | ||
int | has_fabric | ||
) |
Log in Fibre Channel port.
port | Fibre Channel port |
port_id | Local port ID |
link_node_wwn | Link node name |
link_port_wwn | Link port name |
has_fabric | Link is to a fabric |
rc | Return status code |
Definition at line 941 of file fc.c.
References DBGC, ECANCELED, fc_els_plogi(), fc_gs_port_id, fc_id_ntoa(), fc_link_examine(), fc_link_ok(), fc_link_up(), fc_ntoa(), fc_peer_get(), fc_peer_put(), fc_peers, FC_PORT_HAS_FABRIC, FC_PORT_HAS_NS, fc_port_logout(), fc_ptp_high_port_id, fc_ptp_low_port_id, intf_restart(), fc_peer::list, list_for_each_entry_safe, memcmp(), memcpy(), peer, port, fc_peer::port_id, rc, strerror(), and tmp.
Referenced by fc_els_flogi_rx().
void fc_port_logout | ( | struct fc_port * | port, |
int | rc | ||
) |
Log out Fibre Channel port.
port | Fibre Channel port |
rc | Reason for logout |
Definition at line 1039 of file fc.c.
References DBGC, fc_link_err(), fc_link_examine(), fc_peer_get(), fc_peer_put(), fc_peers, fc_peer::list, list_for_each_entry_safe, memset(), peer, port, rc, strerror(), and tmp.
Referenced by fc_els_logo_logout(), fc_port_close(), fc_port_examine(), fc_port_flogi_done(), fc_port_login(), and fc_port_window_changed().
int fc_port_open | ( | struct interface * | transport, |
const struct fc_name * | node_wwn, | ||
const struct fc_name * | port_wwn, | ||
const char * | name | ||
) |
Create Fibre Channel port.
transport | Transport interface |
node | Fibre Channel node name |
port | Fibre Channel port name |
name | Symbolic port name |
rc | Return status code |
Definition at line 1189 of file fc.c.
References DBGC, ENOMEM, fc_link_init(), fc_ntoa(), fc_port_examine(), fc_port_flogi_desc, fc_port_ns_plogi_desc, fc_port_transport_desc, fc_ports, INIT_LIST_HEAD, intf_init(), intf_plug_plug(), list_add_tail, memcpy(), name, fc_port::node_wwn, NULL, port, fc_port::port_wwn, ref_init, ref_put, snprintf(), fc_port::transport, and zalloc().
Referenced by fcoe_expired().
struct fc_port* fc_port_find | ( | const char * | name | ) |
Find Fibre Channel port by name.
name | Fibre Channel port name |
port | Fibre Channel port, or NULL |
Definition at line 1224 of file fc.c.
References fc_ports, fc_port::list, list_for_each_entry, name, NULL, port, and strcmp().
Referenced by parse_fc_port().
Get reference to Fibre Channel peer.
peer | Fibre Channel peer |
peer | Fibre Channel peer |
Definition at line 379 of file fc.h.
Referenced by fc_ns_query(), fc_peer_get_port_id(), fc_peer_get_wwn(), fc_peer_login(), fc_port_login(), fc_port_logout(), and fc_ulp_create().
|
inlinestatic |
Drop reference to Fibre Channel peer.
peer | Fibre Channel peer |
Definition at line 390 of file fc.h.
Referenced by fc_els_logo_logout(), fc_els_plogi_rx(), fc_ns_query_free(), fc_peer_logout(), fc_port_login(), fc_port_logout(), fc_ulp_free(), fc_ulp_get_port_id_type(), and fc_ulp_get_wwn_type().
Get Fibre Channel peer by node name.
port_wwn | Node name |
peer | Fibre Channel peer, or NULL |
Definition at line 1516 of file fc.c.
References fc_peer_create(), fc_peer_get(), fc_peers, fc_peer::list, list_for_each_entry, memcmp(), NULL, peer, and fc_peer::port_wwn.
Referenced by fc_els_plogi_rx(), and fc_ulp_get_wwn_type().
struct fc_peer* fc_peer_get_port_id | ( | struct fc_port * | port, |
const struct fc_port_id * | peer_port_id | ||
) |
Get Fibre Channel peer by port ID.
port | Fibre Channel port |
peer_port_id | Peer port ID |
peer | Fibre Channel peer, or NULL |
Definition at line 1541 of file fc.c.
References fc_peer_get(), fc_peers, fc_peer::list, list_for_each_entry, memcmp(), NULL, peer, and port.
Referenced by fc_els_logo_logout(), and fc_ulp_get_port_id_type().
int fc_peer_login | ( | struct fc_peer * | peer, |
struct fc_port * | port, | ||
struct fc_port_id * | port_id | ||
) |
Log in Fibre Channel peer.
peer | Fibre Channel peer |
port | Fibre Channel port |
port_id | Port ID |
rc | Return status code |
Definition at line 1300 of file fc.c.
References assert(), DBGC, fc_id_ntoa(), fc_link_examine(), fc_link_ok(), fc_link_up(), fc_ntoa(), fc_peer_get(), fc_peer_logout(), fc_port_get(), fc_ulp_get(), fc_ulp_put(), fc_ulp::link, fc_ulp::list, list_for_each_entry_safe, memcmp(), memcpy(), NULL, peer, port, and tmp.
Referenced by fc_els_plogi_rx().
void fc_peer_logout | ( | struct fc_peer * | peer, |
int | rc | ||
) |
Log out Fibre Channel peer.
peer | Fibre Channel peer |
rc | Reason for logout |
Definition at line 1347 of file fc.c.
References DBGC, fc_link_err(), fc_link_examine(), fc_link_ok(), fc_ntoa(), fc_peer_close(), fc_peer_put(), fc_port_put(), fc_ulp_get(), fc_ulp_put(), fc_ulp::link, fc_ulp::list, list_for_each_entry_safe, NULL, peer, rc, strerror(), and tmp.
Referenced by fc_els_logo_logout(), fc_peer_decrement(), fc_peer_examine(), fc_peer_login(), fc_peer_plogi(), and fc_peer_plogi_done().
Get reference to Fibre Channel upper-layer protocol.
ulp | Fibre Channel upper-layer protocol |
ulp | Fibre Channel upper-layer protocol |
Definition at line 474 of file fc.h.
References ref_get, and fc_ulp::refcnt.
Referenced by fc_peer_login(), fc_peer_logout(), fc_ulp_attach(), fc_ulp_get_type(), and fc_ulp_login().
|
inlinestatic |
Drop reference to Fibre Channel upper-layer protocol.
ulp | Fibre Channel upper-layer protocol |
Definition at line 485 of file fc.h.
References ref_put, and fc_ulp::refcnt.
Referenced by fc_els_prli_rx(), fc_els_prli_tx(), fc_peer_login(), fc_peer_logout(), fc_ulp_detach(), fc_ulp_get_port_id_type(), fc_ulp_get_wwn_type(), fc_ulp_logout(), and fcpdev_open().
|
inlinestatic |
Get reference to Fibre Channel upper-layer protocol user.
user | Fibre Channel upper-layer protocol user |
user | Fibre Channel upper-layer protocol user |
Definition at line 496 of file fc.h.
References ref_get, and fc_ulp_user::refcnt.
Referenced by fc_ulp_login(), and fc_ulp_logout().
|
inlinestatic |
Drop reference to Fibre Channel upper-layer protocol user.
user | Fibre Channel upper-layer protocol user |
Definition at line 507 of file fc.h.
References ref_put, and fc_ulp_user::refcnt.
Referenced by fc_ulp_login(), and fc_ulp_logout().
|
inlinestatic |
Initialise Fibre Channel upper-layer protocol user.
user | Fibre Channel upper-layer protocol user |
examine | Examine link state method |
refcnt | Containing object reference count, or NULL |
Definition at line 519 of file fc.h.
References fc_ulp_user::examine, refcnt, and fc_ulp_user::refcnt.
Referenced by fcpdev_open().
Get Fibre Channel upper-layer protocol by port name and type.
port_wwn | Port name |
type | Type |
ulp | Fibre Channel upper-layer protocol, or NULL |
Definition at line 1880 of file fc.c.
References fc_peer_get_wwn(), fc_peer_put(), fc_ulp_get_type(), fc_ulp_put(), NULL, peer, fc_peer::port_wwn, and type.
Referenced by fcpdev_open().
struct fc_ulp* fc_ulp_get_port_id_type | ( | struct fc_port * | port, |
const struct fc_port_id * | peer_port_id, | ||
unsigned int | type | ||
) |
Get Fibre Channel upper-layer protocol by port ID and type.
port | Fibre Channel port |
peer_port_id | Peer port ID |
type | Type |
ulp | Fibre Channel upper-layer protocol, or NULL |
Definition at line 1915 of file fc.c.
References fc_peer_get_port_id(), fc_peer_put(), fc_ulp_get_type(), fc_ulp_put(), NULL, peer, port, and type.
Referenced by fc_els_prli_rx(), and fc_els_prli_tx().
void fc_ulp_attach | ( | struct fc_ulp * | ulp, |
struct fc_ulp_user * | user | ||
) |
Attach Fibre Channel upper-layer protocol user.
ulp | Fibre Channel upper-layer protocol |
user | Fibre Channel upper-layer protocol user |
Definition at line 1607 of file fc.c.
References assert(), fc_peer_increment(), fc_ulp_get(), fc_ulp_user::list, list_add, NULL, fc_ulp::peer, fc_ulp_user::ulp, and fc_ulp::users.
Referenced by fcpdev_open().
void fc_ulp_detach | ( | struct fc_ulp_user * | user | ) |
Detach Fibre Channel upper-layer protocol user.
user | Fibre Channel upper-layer protocol user |
Definition at line 1625 of file fc.c.
References fc_peer_decrement(), fc_ulp_logout(), fc_ulp_put(), fc_ulp::list, fc_ulp_user::list, list_check_contains_entry, list_del, list_empty, NULL, fc_ulp::peer, fc_ulp_user::ulp, and fc_ulp::users.
Referenced by fcpdev_close().
Log in Fibre Channel upper-layer protocol.
ulp | Fibre Channel upper-layer protocol |
param | Service parameters |
param_len | Length of service parameters |
originated | Login was originated by us |
rc | Return status code |
Definition at line 1657 of file fc.c.
References assert(), DBGC, DBGC_HDA, ENOMEM, fc_ulp_user::examine, fc_link_ok(), fc_link_start(), fc_link_stop(), fc_link_up(), fc_ntoa(), fc_ulp_get(), fc_ulp_logout(), FC_ULP_ORIGINATED_LOGIN_OK, fc_ulp_user_get(), fc_ulp_user_put(), fc_ulp::flags, fc_ulp::link, fc_ulp_user::list, list_for_each_entry_safe, malloc(), memcmp(), memcpy(), NULL, param, fc_ulp::param, fc_ulp::param_len, fc_ulp::peer, fc_peer::port_wwn, tmp, fc_ulp::type, fc_ulp_user::ulp, and fc_ulp::users.
Referenced by fc_els_prli_rx().
void fc_ulp_logout | ( | struct fc_ulp * | ulp, |
int | rc | ||
) |
Log out Fibre Channel upper-layer protocol.
ulp | Fibre Channel upper-layer protocol |
rc | Reason for logout |
Definition at line 1727 of file fc.c.
References DBGC, fc_ulp_user::examine, fc_link_err(), fc_link_ok(), fc_ntoa(), fc_ulp_close(), fc_ulp_put(), fc_ulp_user_get(), fc_ulp_user_put(), fc_ulp::flags, free, fc_ulp::link, fc_ulp_user::list, list_empty, list_for_each_entry_safe, NULL, fc_ulp::param, fc_ulp::param_len, fc_ulp::peer, fc_peer::port_wwn, rc, strerror(), tmp, fc_ulp::type, fc_ulp_user::ulp, and fc_ulp::users.
Referenced by fc_els_prli_rx(), fc_ulp_detach(), fc_ulp_examine(), fc_ulp_login(), and fc_ulp_prli_done().
struct fc_port_id fc_empty_port_id |
Unassigned port ID.
Definition at line 65 of file fc.c.
Referenced by fc_port_deliver(), and fcels_exec().
struct fc_port_id fc_f_port_id |
F_Port contoller port ID.
Definition at line 68 of file fc.c.
Referenced by fc_els_flogi(), fc_els_logo_logout(), fc_port_deliver(), and fcels_exec().
struct fc_port_id fc_gs_port_id |
Generic services port ID.
Definition at line 71 of file fc.c.
Referenced by fc_ns_query_step(), and fc_port_login().
struct fc_port_id fc_ptp_low_port_id |
struct fc_port_id fc_ptp_high_port_id |
struct list_head fc_ports |
Referenced by fc_peer_examine(), fc_port_find(), fc_port_open(), fcels_exec(), and fcstat_exec().
struct list_head fc_peers |
Referenced by fc_peer_create(), fc_peer_get_port_id(), fc_peer_get_wwn(), fc_port_login(), fc_port_logout(), and fcstat_exec().