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

Go to the source code of this file.

Detailed Description

Defines the iSNS functions to register and query the iSNS server This code should be OS independant.

Definition in file ocs_isns.h.

Data Structures

struct  isns_hdr_t
 
struct  ocs_isns_ip_port_t
 
struct  ocs_isns_node_t
 

Macros

#define PDU_MEM_SIZE   1000
 
#define ISCSI_PROTOCOL   2
 
#define ISNS_ESI_PORT   5001
 
#define ISNS_ESI_INTERVAL   360
 
#define ISNS_VERSION   0x0001
 
#define ISNS_TRANSACTION_ID_1   0xdead
 
#define ISNS_TRANSACTION_ID_2   0xbeef
 
#define ISNS_STARTING_SEQ_ID   0x0000
 
#define ISNS_FUNC_DEV_ATTR_REG   0x0001
 
#define ISNS_FUNC_DEV_ATTR_QRY   0x0002
 
#define ISNS_FUNC_DEV_ATTR_DEREG   0x0004
 
#define ISNS_FLAG_FIRST   (1 << 10)
 
#define ISNS_FLAG_LAST   (1 << 11)
 
#define ISNS_FLAG_REPLACE   (1 << 12)
 
#define ISNS_FLAG_AUTEHNT_BLOCK   (1 << 13)
 
#define ISNS_FLAG_SERVER   (1 << 14)
 
#define ISNS_FLAG_CLIENT   (1 << 15)
 
#define ISNS_ENABLE_ESI   1
 
#define ISNS_KEEP_ALIVE_TIMER_PERIOD   30
 
#define ISNS_TAG_DELIMITER   0
 
#define ISNS_TAG_ENTITY_IDENTIFIER   1
 
#define ISNS_TAG_ENTITY_PROTOCOL   2
 
#define ISNS_TAG_MGMT_IP_ADDRESS   3
 
#define ISNS_TAG_TIMIMESTAMP   4
 
#define ISNS_TAG_PROTOCOL_RANGE   5
 
#define ISNS_TAG_REG_PERIOD   6
 
#define ISNS_TAG_ENTITY_INDEX   7
 
#define ISNS_TAG_ENTITY_NEXT_INDEX   8
 
#define ISNS_TAG_PORTAL_IP_ADDRESS   16
 
#define ISNS_TAG_PORTAL_TCP_PORT   17
 
#define ISNS_TAG_ESI_INTERVAL   19
 
#define ISNS_TAG_ESI_PORT   20
 
#define ISNS_TAG_PORTAL_INDEX   22
 
#define ISNS_TAG_SCN_PORT   23
 
#define ISNS_TAG_ISCSI_NAME   32
 
#define ISNS_TAG_ISCSI_NODE_TYPE   33
 
#define ISNS_TAG_ISCSI_ALIAS   34
 
#define ISNS_ERROR_UNKNOWN   1
 
#define ISNS_ERROR_MSG_FORMAT   2
 
#define ISNS_ERROR_INVALID_REG   3
 
#define ISNS_ERROR_RESERVED   4
 
#define ISNS_ERROR_INVALID_QUERY   5
 
#define ISNS_ERROR_SOURCE_UNKNOWN   6
 
#define ISNS_ERROR_SOURCE_ABSENT   7
 
#define ISNS_ERROR_SOURCE_UNATHORIZED   8
 
#define ISNS_ERROR_NO_SUCH_ENTRY   9
 
#define ISNS_ERROR_VERSION_NOT_SUPPORTED   10
 
#define ISNS_ERROR_INTERNAL_ERROR   11
 
#define ISNS_ERROR_BUSY   12
 
#define ISNS_ERROR_OPTION_NOT_UNDERSTOOD   13
 
#define ISNS_ERROR_INVALID_UPDATE   14
 
#define ISNS_ERROR_FUNC_ID   15
 
#define ISNS_ERROR_SCN_EVENT_REJ   16
 
#define ISNS_ERROR_SCN_REG_REJ   17
 
#define ISNS_ERROR_NOT_IMPL   18
 
#define ISNS_ERROR_DOMAIN_ID_UNAVAILABLE   19
 
#define ISNS_ERROR_UNALLCATED_DOMAIN_ID   20
 
#define ISNS_ERROR_ESI_UNAVAILABLE   21
 
#define ISNS_ERROR_INVALID_DEREG   22
 
#define ISNS_ERROR_REG_FEATURE_UNSUPPORTED   23
 
#define ocs_isns_log(os, fmt,...)
 

Functions

int32_t ocs_isns_initialize (ocs_iscsi_t *)
 Initialize the iSNS module. More...
 
int32_t ocs_isns_teardown (ocs_iscsi_t *)
 Shutdown the iSNS module. More...
 
int8_t ocs_isns_register (ocs_iscsi_t *, uint8_t, uint8_t, ocs_ip_address_t *, char *)
 Sends the DevAttrReg message to the iSNS server. More...
 
void * ocs_isns_qry_tgts (ocs_iscsi_t *, ocs_ip_address_t *, uint16_t *)
 Sends the DevAttrReg message to the iSNS server. More...
 
int8_t ocs_isns_deregister (ocs_t *, ocs_ip_address_t *, char *)
 Sends the DevDereg message to the iSNS server. More...
 
char * ocs_get_iscsi_name (ocs_iscsi_t *, void *, uint16_t)
 Gets the iscsi name of a given node. More...
 
uint16_t ocs_get_iscsi_ipp_count (ocs_iscsi_t *, void *, uint16_t)
 Gets the count of the ip_port structs in a given node. More...
 
char * ocs_get_ip (ocs_iscsi_t *, void *, uint16_t, uint16_t)
 Gets the ip address of a given isns node. More...
 
uint16_t ocs_get_port (ocs_iscsi_t *, void *, uint16_t, uint16_t)
 Gets the port of a given isns node. More...
 
void ocs_str_to_ip_struct (ocs_iscsi_t *, char *, ocs_ip_address_t *)
 Converts a string ip into an ip struct. More...
 

Macro Details

#define ISCSI_PROTOCOL   2

Definition at line 46 of file ocs_isns.h.

#define ISNS_ENABLE_ESI   1

Definition at line 70 of file ocs_isns.h.

#define ISNS_ERROR_BUSY   12

Definition at line 107 of file ocs_isns.h.

#define ISNS_ERROR_DOMAIN_ID_UNAVAILABLE   19

Definition at line 114 of file ocs_isns.h.

#define ISNS_ERROR_ESI_UNAVAILABLE   21

Definition at line 116 of file ocs_isns.h.

#define ISNS_ERROR_FUNC_ID   15

Definition at line 110 of file ocs_isns.h.

#define ISNS_ERROR_INTERNAL_ERROR   11

Definition at line 106 of file ocs_isns.h.

#define ISNS_ERROR_INVALID_DEREG   22

Definition at line 117 of file ocs_isns.h.

#define ISNS_ERROR_INVALID_QUERY   5

Definition at line 100 of file ocs_isns.h.

#define ISNS_ERROR_INVALID_REG   3

Definition at line 98 of file ocs_isns.h.

#define ISNS_ERROR_INVALID_UPDATE   14

Definition at line 109 of file ocs_isns.h.

#define ISNS_ERROR_MSG_FORMAT   2

Definition at line 97 of file ocs_isns.h.

#define ISNS_ERROR_NO_SUCH_ENTRY   9

Definition at line 104 of file ocs_isns.h.

#define ISNS_ERROR_NOT_IMPL   18

Definition at line 113 of file ocs_isns.h.

#define ISNS_ERROR_OPTION_NOT_UNDERSTOOD   13

Definition at line 108 of file ocs_isns.h.

#define ISNS_ERROR_REG_FEATURE_UNSUPPORTED   23

Definition at line 118 of file ocs_isns.h.

#define ISNS_ERROR_RESERVED   4

Definition at line 99 of file ocs_isns.h.

#define ISNS_ERROR_SCN_EVENT_REJ   16

Definition at line 111 of file ocs_isns.h.

#define ISNS_ERROR_SCN_REG_REJ   17

Definition at line 112 of file ocs_isns.h.

#define ISNS_ERROR_SOURCE_ABSENT   7

Definition at line 102 of file ocs_isns.h.

#define ISNS_ERROR_SOURCE_UNATHORIZED   8

Definition at line 103 of file ocs_isns.h.

#define ISNS_ERROR_SOURCE_UNKNOWN   6

Definition at line 101 of file ocs_isns.h.

#define ISNS_ERROR_UNALLCATED_DOMAIN_ID   20

Definition at line 115 of file ocs_isns.h.

#define ISNS_ERROR_UNKNOWN   1

Definition at line 96 of file ocs_isns.h.

#define ISNS_ERROR_VERSION_NOT_SUPPORTED   10

Definition at line 105 of file ocs_isns.h.

#define ISNS_ESI_INTERVAL   360

Definition at line 48 of file ocs_isns.h.

#define ISNS_ESI_PORT   5001

Definition at line 47 of file ocs_isns.h.

#define ISNS_FLAG_AUTEHNT_BLOCK   (1 << 13)

Definition at line 65 of file ocs_isns.h.

#define ISNS_FLAG_CLIENT   (1 << 15)

Definition at line 67 of file ocs_isns.h.

#define ISNS_FLAG_FIRST   (1 << 10)

Definition at line 62 of file ocs_isns.h.

#define ISNS_FLAG_LAST   (1 << 11)

Definition at line 63 of file ocs_isns.h.

#define ISNS_FLAG_REPLACE   (1 << 12)

Definition at line 64 of file ocs_isns.h.

#define ISNS_FLAG_SERVER   (1 << 14)

Definition at line 66 of file ocs_isns.h.

#define ISNS_FUNC_DEV_ATTR_DEREG   0x0004

Definition at line 60 of file ocs_isns.h.

#define ISNS_FUNC_DEV_ATTR_QRY   0x0002

Definition at line 59 of file ocs_isns.h.

#define ISNS_FUNC_DEV_ATTR_REG   0x0001

Definition at line 58 of file ocs_isns.h.

#define ISNS_KEEP_ALIVE_TIMER_PERIOD   30

Definition at line 73 of file ocs_isns.h.

#define ISNS_STARTING_SEQ_ID   0x0000

Definition at line 55 of file ocs_isns.h.

#define ISNS_TAG_DELIMITER   0

Definition at line 76 of file ocs_isns.h.

#define ISNS_TAG_ENTITY_IDENTIFIER   1

Definition at line 77 of file ocs_isns.h.

#define ISNS_TAG_ENTITY_INDEX   7

Definition at line 83 of file ocs_isns.h.

#define ISNS_TAG_ENTITY_NEXT_INDEX   8

Definition at line 84 of file ocs_isns.h.

#define ISNS_TAG_ENTITY_PROTOCOL   2

Definition at line 78 of file ocs_isns.h.

#define ISNS_TAG_ESI_INTERVAL   19

Definition at line 87 of file ocs_isns.h.

#define ISNS_TAG_ESI_PORT   20

Definition at line 88 of file ocs_isns.h.

#define ISNS_TAG_ISCSI_ALIAS   34

Definition at line 93 of file ocs_isns.h.

#define ISNS_TAG_ISCSI_NAME   32

Definition at line 91 of file ocs_isns.h.

#define ISNS_TAG_ISCSI_NODE_TYPE   33

Definition at line 92 of file ocs_isns.h.

#define ISNS_TAG_MGMT_IP_ADDRESS   3

Definition at line 79 of file ocs_isns.h.

#define ISNS_TAG_PORTAL_INDEX   22

Definition at line 89 of file ocs_isns.h.

#define ISNS_TAG_PORTAL_IP_ADDRESS   16

Definition at line 85 of file ocs_isns.h.

#define ISNS_TAG_PORTAL_TCP_PORT   17

Definition at line 86 of file ocs_isns.h.

#define ISNS_TAG_PROTOCOL_RANGE   5

Definition at line 81 of file ocs_isns.h.

#define ISNS_TAG_REG_PERIOD   6

Definition at line 82 of file ocs_isns.h.

#define ISNS_TAG_SCN_PORT   23

Definition at line 90 of file ocs_isns.h.

#define ISNS_TAG_TIMIMESTAMP   4

Definition at line 80 of file ocs_isns.h.

#define ISNS_TRANSACTION_ID_1   0xdead

Definition at line 52 of file ocs_isns.h.

#define ISNS_TRANSACTION_ID_2   0xbeef

Definition at line 53 of file ocs_isns.h.

#define ISNS_VERSION   0x0001

Definition at line 50 of file ocs_isns.h.

#define ocs_isns_log (   os,
  fmt,
  ... 
)
Value:
do { \
ocs_log_info(os, fmt, ##__VA_ARGS__); \
} while (0)
#define OCS_DEBUG_ENABLE_ISNS_LOG
Definition: ocs_debug.h:161
int ocs_debug_is_enabled(uint32_t mask)
return true if debug bits are enabled
Definition: ocs_debug.c:122
const char const char * fmt
Definition: ocs_ddump.h:54

Definition at line 166 of file ocs_isns.h.

#define PDU_MEM_SIZE   1000

Definition at line 45 of file ocs_isns.h.