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

Go to the source code of this file.

Detailed Description

Defines the iSCSI connection managment functions. Internally a state machine is used to send the mailbox commands. This code should be OS independant.

Definition in file ocs_cxn.h.

Functions

int32_t ocs_cxn_initialize (ocs_iscsi_t *)
 Initialize the iSCSI connection objects. More...
 
void ocs_cxn_teardown (ocs_iscsi_t *)
 Free the iSCSI connection objects. More...
 
ocs_cxn_t * ocs_cxn_alloc (ocs_iscsi_t *iscsi, uint32_t conn_hdl)
 Allocates a connection and initializes the fields as required. More...
 
int32_t ocs_cxn_connect (ocs_iscsi_t *iscsi, ocs_hal_ip_address_t *remote_ip, uint16_t tcp_port, char *tgt_name)
 Log an initiator into the specified target address. More...
 
int32_t ocs_cxn_new_tgt_connection (ocs_iscsi_t *iscsi, uint32_t cid)
 Function to receive new TCP connections. More...
 
int32_t ocs_cxn_close (ocs_cxn_t *cxn, uint8_t sendRst)
 Issues a request to the HAL to close the connection. More...
 
void ocs_cxn_force_free (ocs_cxn_t *cxn)
 Free memory resources of a node object. More...
 
int ocs_ddump_node (ocs_textbuf_t *textbuf, ocs_node_t *node)
 Generate node ddump data. More...
 

Function Details

ocs_cxn_t* ocs_cxn_alloc ( ocs_iscsi_t *  iscsi,
uint32_t  conn_hdl 
)

Allocates a connection and initializes the fields as required.

Parameters
iscsiPointer to the iSCSI structure that represents this device.
conn_hdlConnection handle from the firmware.
Returns
Returns 0 on success.

Definition at line 1666 of file ocs_cxn.c.

void ocs_cxn_force_free ( ocs_cxn_t *  cxn)

Free memory resources of a node object.

Description
The node object's child objects are freed after which the node object is freed.
Parameters
cxnPointer to connection.
Returns
None.

Definition at line 174 of file ocs_cxn.c.

int32_t ocs_cxn_initialize ( ocs_iscsi_t *  iscsi)

Initialize the iSCSI connection objects.

Parameters
iscsiPointer to the iSCSI object.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 121 of file ocs_cxn.c.

void ocs_cxn_teardown ( ocs_iscsi_t *  iscsi)

Free the iSCSI connection objects.

Parameters
iscsiPointer to the iSCSI object.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 155 of file ocs_cxn.c.

int ocs_ddump_node ( ocs_textbuf_t *  textbuf,
ocs_node_t *  node 
)

Generate node ddump data.

Description
Generates the node ddump data.
Parameters
textbufPointer to text buffer.
nodePointer to node context.
Returns
Returns 0 on success, or a negative value on failure.

Definition at line 1738 of file ocs_cxn.c.