Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_xport.h File Reference

Go to the source code of this file.

Data Structures

struct  ocs_xport_t
 
union  ocs_xport_stats_t
 

Enumerations

enum  ocs_xport_ctrl_e {
  OCS_XPORT_CONNECT =1, OCS_XPORT_DISCONNECT, OCS_XPORT_UPLOAD, OCS_XPORT_REG_UNSOL_INI_CB,
  OCS_XPORT_PORT_ONLINE
}
 
enum  ocs_xport_status_e { OCS_XPORT_PORT_STATUS }
 

Functions

ocs_xport_t * ocs_xport_alloc (ocs_t *ocs)
 allocate a transport object More...
 
int32_t ocs_xport_status (ocs_xport_t *xport, ocs_xport_status_e cmd, ocs_xport_stats_t *result)
 Return status on a link. More...
 
int32_t ocs_xport_control (ocs_xport_t *xport, ocs_xport_ctrl_e cmd,...)
 Perform transport attach function. More...
 
void ocs_xport_free (ocs_xport_t *xport)
 free a transport object More...
 
int32_t ocs_xport_attach (ocs_xport_t *xport)
 
int32_t ocs_xport_detach (ocs_xport_t *xport)
 

Enumeration Details

Enumerator
OCS_XPORT_CONNECT 
OCS_XPORT_DISCONNECT 
OCS_XPORT_UPLOAD 
OCS_XPORT_REG_UNSOL_INI_CB 
OCS_XPORT_PORT_ONLINE 

Definition at line 46 of file ocs_xport.h.

Enumerator
OCS_XPORT_PORT_STATUS 

Definition at line 54 of file ocs_xport.h.

Function Details

ocs_xport_t* ocs_xport_alloc ( ocs_t *  ocs)

allocate a transport object

A transport object is allocated, and associated with a device instance.

Parameters
ocspointer to device instance
Returns
pointer to allocated transport object, or NULL if failed.

Definition at line 60 of file ocs_xport.c.

int32_t ocs_xport_attach ( ocs_xport_t *  xport)
int32_t ocs_xport_control ( ocs_xport_t *  xport,
ocs_xport_ctrl_e  cmd,
  ... 
)

Perform transport attach function.

Perform attach function, which for the FC transport makes a HAL call to bring up the link

Parameters
xportpointer to transport object
cmdcommand to execute

ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_ONLINE) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_OFFLINE) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_SHUTDOWN) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_POST_NODE_EVENT, ocs_node_t *node, ocs_sm_event_t, void *context)

Returns
returns 0 for success, a negative error code value for failure.

Definition at line 100 of file ocs_xport.c.

int32_t ocs_xport_detach ( ocs_xport_t *  xport)
void ocs_xport_free ( ocs_xport_t *  xport)

free a transport object

The transport object is free'd

Parameters
xportpointer to transport object
Returns
none

Definition at line 471 of file ocs_xport.c.

int32_t ocs_xport_status ( ocs_xport_t *  xport,
ocs_xport_status_e  cmd,
ocs_xport_stats_t *  result 
)

Return status on a link.

Description
Returns status information about a link.
Parameters
xportPointer to transport object.
cmdCommand to execute.
resultPointer to result value.

ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_PORT_STATUS)

Returns
Returns 0 on success, or a negative error code value on failure.

Definition at line 426 of file ocs_xport.c.