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

Go to the source code of this file.

Detailed Description

iSCSI transport API

Definition in file ocs_xport.c.

Data Structures

struct  ocs_xport_gen_arg_t
 

Functions

ocs_xport_t * ocs_xport_alloc (ocs_t *ocs)
 allocate a transport object More...
 
static void ocs_xport_cxn_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
int32_t ocs_xport_control (ocs_xport_t *xport, ocs_xport_ctrl_e cmd,...)
 Perform transport attach function. 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...
 
void ocs_xport_free (ocs_xport_t *xport)
 free a transport object More...
 

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_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.

static void ocs_xport_cxn_cb ( void *  ul_arg,
int32_t  status,
uint32_t  ext_status,
void *  params 
)
static

Definition at line 73 of file ocs_xport.c.

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.