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

Go to the source code of this file.

Detailed Description

ocs_mgmt top level functions for iSCSI

Definition in file ocs_mgmt.c.

Data Structures

struct  ocs_mgmt_fw_write_result_t
 
struct  ocs_mgmt_get_profile_list_result_t
 
struct  ocs_mgmt_get_active_profile_result_t
 
struct  ocs_mgmt_set_active_profile_result_t
 
struct  ocs_mgmt_get_port_protocol_result_t
 
struct  ocs_mgmt_set_port_protocol_result_t
 
struct  ocs_mgmt_linkcfg_map_t
 HAL link config enum to mgmt string value mapping. More...
 
struct  ocs_mgmt_linkcfg_arg_t
 Link configuration callback argument. More...
 
struct  ocs_mgmt_get_linkcfg_result_t
 
struct  ocs_mgmt_set_linkcfg_result_t
 

Macros

#define FW_WRITE_BUFSIZE   64*1024
 
#define MAX_LINE_SIZE   520
 
#define BUFFER_SIZE   MAX_LINE_SIZE*40
 
#define MAX_PROFILE_LENGTH   5
 
#define SFP_BYTES   256
 

Functions

static void get_desc (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_rev (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_rev2 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_ipl (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sli4_intf_reg (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_phy_port_num (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_asic_id_reg (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_enable_ini (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_enable_tgt (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_enable_sgl_chaining (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_max_sge_size (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_num_tgts (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_local_ip (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_local_subnet (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_vendor (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_device (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_subsystem_vendor (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_subsystem_device (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_businfo (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sfp_a0 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sfp_a2 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_mq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_cq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_wq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_io_trace (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_sm_trace (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_scsi_tgt_trace (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_mac_address (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_profile_list (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get list of profiles. More...
 
static void get_active_profile (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get active profile. More...
 
static void get_port_protocol (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_driver_version (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_chip_type (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_jumbo_frames (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_gateway (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_data_digest (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_header_digest (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_tcp_window_size (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_tcp_window_scale (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_max_cxns_per_session (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_require_chap (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_linkcfg (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get current link configuration. More...
 
static int set_debug_mq_dump (ocs_t *, char *, char *)
 
static int set_debug_cq_dump (ocs_t *, char *, char *)
 
static int set_debug_wq_dump (ocs_t *, char *, char *)
 
static int set_debug_io_trace (ocs_t *, char *, char *)
 
static int set_debug_sm_trace (ocs_t *, char *, char *)
 
static int set_debug_scsi_tgt_trace (ocs_t *, char *, char *)
 
static int set_mac_address (ocs_t *, char *, char *)
 
static int set_active_profile (ocs_t *ocs, char *name, char *value)
 Set active profile. More...
 
static int set_port_protocol (ocs_t *ocs, char *name, char *value)
 Set port profile. More...
 
static int set_jumbo_frames (ocs_t *, char *, char *)
 
static int set_gateway (ocs_t *, char *, char *)
 
static int set_data_digest (ocs_t *, char *, char *)
 
static int set_header_digest (ocs_t *, char *, char *)
 
static int set_tcp_window_size (ocs_t *, char *, char *)
 
static int set_tcp_window_scale (ocs_t *, char *, char *)
 
static int set_max_cxns_per_session (ocs_t *, char *, char *)
 
static int set_require_chap (ocs_t *, char *, char *)
 
static int set_linkcfg (ocs_t *ocs, char *name, char *value)
 Set linkcfg config value. More...
 
static int32_t ocs_mgmt_iclusttgt_entry_add (ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length)
 
static int32_t ocs_mgmt_iclusttgt_entry_del (ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length)
 
static int32_t ocs_mgmt_iclusttgt_entry_get (ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length)
 
static int32_t ocs_mgmt_iclusttgt_clear (ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length)
 
static int ocs_mgmt_firmware_write (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int ocs_mgmt_firmware_reset (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int32_t ocs_mgmt_ip_add (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_ip_get (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_ip_remove (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_chap_add_user (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_chap_remove_user (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
int32_t ocs_iscsi_chap_list_count (ocs_t *ocs)
 Returns the count of chap_list. More...
 
static int32_t ocs_mgmt_chap_show_list (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 Copy the chap_list to user supplied buffer. More...
 
static int32_t ocs_mgmt_listen_start (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_listen_stop (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t)
 
static int32_t ocs_mgmt_route_table_del_entry (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_len, void *arg_out, uint32_t arg_out_len)
 
static int32_t ocs_mgmt_route_table_add_entry (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_len, void *arg_out, uint32_t arg_out_len)
 
static int32_t ocs_mgmt_route_table_read (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_len, void *arg_out, uint32_t arg_out_len)
 
static int32_t ocs_mgmt_vlan_add (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 Add VLAN tag will actually creates an interface along with VLAN ID Rule 1: Cannot set VLAN on default interface in I+T profile. VLAN can only be added by creating an additional interface handle. Rule 2: An interface can only has one VLAN. More...
 
static int32_t ocs_mgmt_vlan_del (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 Delete VLAN will actually deletes the interface handle of vlan This function first removes the IP addresses configured on the interface handle and then delete iface. More...
 
static int32_t ocs_mgmt_vlan_show (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 
static void ocs_mgmt_fw_write_cb (int32_t status, uint32_t actual_write_length, void *arg)
 
void ocs_mgmt_get_list (ocs_t *ocs, ocs_textbuf_t *textbuf)
 get a list of mgmt items supported by the driver More...
 
int ocs_mgmt_get (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 return the value of a mgmt item More...
 
void ocs_mgmt_get_all (ocs_t *ocs, ocs_textbuf_t *textbuf)
 
int ocs_mgmt_set (ocs_t *ocs, char *name, char *value)
 set the value of a mgmt item More...
 
int ocs_mgmt_exec (ocs_t *ocs, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 perform a management action More...
 
static void ocs_mgmt_get_profile_list_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static void ocs_mgmt_get_active_profile_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static void ocs_mgmt_set_active_profile_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static void ocs_mgmt_get_port_protocol_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static void ocs_mgmt_set_port_protocol_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static ocs_hal_linkcfg_e ocs_hal_linkcfg_from_mgmt (const char *mgmt_str)
 Get the HAL linkcfg enum from the mgmt config string. More...
 
static const char * ocs_mgmt_from_hal_linkcfg (ocs_hal_linkcfg_e linkcfg)
 Get the mgmt string value from the HAL linkcfg enum. More...
 
static void ocs_mgmt_get_linkcfg_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static void ocs_mgmt_set_linkcfg_cb (void *ul_arg, int32_t status, uint32_t ext_status, void *params)
 
static int32_t ocs_iscsi_is_ipaddr_listening (ocs_iscsi_t *iscsi, ocs_hal_portal_t portal, ocs_ip_address_t *ip)
 
static int32_t ocs_iscsi_get_subnet_ip_address (ocs_iscsi_t *iscsi, ocs_hal_portal_t portal, ocs_ip_address_t *subnet, ocs_ip_address_t *ip)
 
static int32_t ocs_iscsi_ip_get_copy_to_user (ocs_t *ocs, char *userbuff, uint32_t userbuff_len, uint32_t *bytes_copied, uint32_t num_ips, ocs_ip_address_subnet_t *ipsub)
 
static int32_t ocs_mgmt_route_parse_params (ocs_t *ocs, char *cmd_params, uint32_t params_len, char *ip_addr, char *netmask, char *gateway)
 

Variables

ocs_mgmt_table_entry_t mgmt_table []
 
static ocs_mgmt_linkcfg_map_t mgmt_linkcfg_map []
 

Macro Details

#define BUFFER_SIZE   MAX_LINE_SIZE*40
#define FW_WRITE_BUFSIZE   64*1024

Definition at line 748 of file ocs_mgmt.c.

#define MAX_LINE_SIZE   520
#define MAX_PROFILE_LENGTH   5

Definition at line 945 of file ocs_mgmt.c.

#define SFP_BYTES   256

Definition at line 2935 of file ocs_mgmt.c.

Function Details

static void get_active_profile ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get active profile.

Description
This is a management action handler to get the currently active profile for an SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufThe textbuf to which the result is written.
Returns
Returns 0 on success, non-zero on failure.

Definition at line 962 of file ocs_mgmt.c.

static void get_asic_id_reg ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2768 of file ocs_mgmt.c.

static void get_businfo ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2888 of file ocs_mgmt.c.

static void get_chip_type ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2775 of file ocs_mgmt.c.

static void get_data_digest ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1215 of file ocs_mgmt.c.

static void get_debug_cq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2984 of file ocs_mgmt.c.

static void get_debug_io_trace ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2999 of file ocs_mgmt.c.

static void get_debug_mq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2976 of file ocs_mgmt.c.

static void get_debug_scsi_tgt_trace ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 3013 of file ocs_mgmt.c.

static void get_debug_sm_trace ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 3006 of file ocs_mgmt.c.

static void get_debug_wq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2992 of file ocs_mgmt.c.

static void get_desc ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2686 of file ocs_mgmt.c.

static void get_driver_version ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2680 of file ocs_mgmt.c.

static void get_enable_ini ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2894 of file ocs_mgmt.c.

static void get_enable_sgl_chaining ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2906 of file ocs_mgmt.c.

static void get_enable_tgt ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2900 of file ocs_mgmt.c.

static void get_fw_rev ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2692 of file ocs_mgmt.c.

static void get_fw_rev2 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2698 of file ocs_mgmt.c.

static void get_gateway ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1331 of file ocs_mgmt.c.

static void get_header_digest ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1240 of file ocs_mgmt.c.

static void get_ipl ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2704 of file ocs_mgmt.c.

static void get_jumbo_frames ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1190 of file ocs_mgmt.c.

static void get_linkcfg ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get current link configuration.

Description
This is a management action handler to get the current slink configuration for an SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufThe textbuf to which the result is written.
Returns
Returns 0 on success, non-zero on failure.

Definition at line 1509 of file ocs_mgmt.c.

static void get_local_ip ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2924 of file ocs_mgmt.c.

static void get_local_subnet ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2930 of file ocs_mgmt.c.

static void get_mac_address ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 3020 of file ocs_mgmt.c.

static void get_max_cxns_per_session ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1309 of file ocs_mgmt.c.

static void get_max_sge_size ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2912 of file ocs_mgmt.c.

static void get_num_tgts ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2918 of file ocs_mgmt.c.

static void get_pci_device ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2871 of file ocs_mgmt.c.

static void get_pci_subsystem_device ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2883 of file ocs_mgmt.c.

static void get_pci_subsystem_vendor ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2877 of file ocs_mgmt.c.

static void get_pci_vendor ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2865 of file ocs_mgmt.c.

static void get_phy_port_num ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2755 of file ocs_mgmt.c.

static void get_pn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2728 of file ocs_mgmt.c.

static void get_port_protocol ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1072 of file ocs_mgmt.c.

static void get_profile_list ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get list of profiles.

Description
This is a management action handler to get the list of profiles supported by the SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufThe textbuf to which the result is written.
Returns
none

Definition at line 880 of file ocs_mgmt.c.

static void get_require_chap ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1380 of file ocs_mgmt.c.

static void get_sfp_a0 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2938 of file ocs_mgmt.c.

static void get_sfp_a2 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2957 of file ocs_mgmt.c.

static void get_sli4_intf_reg ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2748 of file ocs_mgmt.c.

static void get_sn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2710 of file ocs_mgmt.c.

static void get_tcp_window_scale ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1287 of file ocs_mgmt.c.

static void get_tcp_window_size ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1265 of file ocs_mgmt.c.

static ocs_hal_linkcfg_e ocs_hal_linkcfg_from_mgmt ( const char *  mgmt_str)
static

Get the HAL linkcfg enum from the mgmt config string.

Parameters
mgmt_strmgmt string value.
Returns
Returns the HAL linkcfg enum corresponding to clp_str.

Definition at line 1433 of file ocs_mgmt.c.

int32_t ocs_iscsi_chap_list_count ( ocs_t *  ocs)

Returns the count of chap_list.

Definition at line 1155 of file ocs_iscsi_api.c.

static int32_t ocs_iscsi_get_subnet_ip_address ( ocs_iscsi_t *  iscsi,
ocs_hal_portal_t  portal,
ocs_ip_address_t *  subnet,
ocs_ip_address_t *  ip 
)
static

Definition at line 1896 of file ocs_mgmt.c.

static int32_t ocs_iscsi_ip_get_copy_to_user ( ocs_t *  ocs,
char *  userbuff,
uint32_t  userbuff_len,
uint32_t *  bytes_copied,
uint32_t  num_ips,
ocs_ip_address_subnet_t *  ipsub 
)
static

Definition at line 2020 of file ocs_mgmt.c.

static int32_t ocs_iscsi_is_ipaddr_listening ( ocs_iscsi_t *  iscsi,
ocs_hal_portal_t  portal,
ocs_ip_address_t *  ip 
)
static

Definition at line 1871 of file ocs_mgmt.c.

static int32_t ocs_mgmt_chap_add_user ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 3159 of file ocs_mgmt.c.

static int32_t ocs_mgmt_chap_remove_user ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 3187 of file ocs_mgmt.c.

static int32_t ocs_mgmt_chap_show_list ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Copy the chap_list to user supplied buffer.

Return At first stage (when arg_in and arg_out NULL), return count of items in chap_list At Second stage, return zero on successful copy, otherwise a negative value.

Definition at line 3218 of file ocs_mgmt.c.

static int32_t ocs_mgmt_firmware_reset ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 713 of file ocs_mgmt.c.

static int32_t ocs_mgmt_firmware_write ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 758 of file ocs_mgmt.c.

static const char* ocs_mgmt_from_hal_linkcfg ( ocs_hal_linkcfg_e  linkcfg)
static

Get the mgmt string value from the HAL linkcfg enum.

Parameters
linkcfgHAL linkcfg enum.
Returns
Returns the mgmt string value corresponding to the given HAL linkcfg.

Definition at line 1453 of file ocs_mgmt.c.

static void ocs_mgmt_fw_write_cb ( int32_t  status,
uint32_t  actual_write_length,
void *  arg 
)
static

Definition at line 834 of file ocs_mgmt.c.

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

Definition at line 929 of file ocs_mgmt.c.

void ocs_mgmt_get_all ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf 
)

Definition at line 396 of file ocs_mgmt.c.

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

Definition at line 1481 of file ocs_mgmt.c.

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

Definition at line 1055 of file ocs_mgmt.c.

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

Definition at line 851 of file ocs_mgmt.c.

static int32_t ocs_mgmt_iclusttgt_clear ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 2668 of file ocs_mgmt.c.

static int32_t ocs_mgmt_iclusttgt_entry_add ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 2473 of file ocs_mgmt.c.

static int32_t ocs_mgmt_iclusttgt_entry_del ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 2531 of file ocs_mgmt.c.

static int32_t ocs_mgmt_iclusttgt_entry_get ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 2596 of file ocs_mgmt.c.

static int32_t ocs_mgmt_ip_add ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1756 of file ocs_mgmt.c.

static int32_t ocs_mgmt_ip_get ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 2091 of file ocs_mgmt.c.

static int32_t ocs_mgmt_ip_remove ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1921 of file ocs_mgmt.c.

static int32_t ocs_mgmt_listen_start ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1597 of file ocs_mgmt.c.

static int32_t ocs_mgmt_listen_stop ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1677 of file ocs_mgmt.c.

static int32_t ocs_mgmt_route_parse_params ( ocs_t *  ocs,
char *  cmd_params,
uint32_t  params_len,
char *  ip_addr,
char *  netmask,
char *  gateway 
)
static

Definition at line 2243 of file ocs_mgmt.c.

static int32_t ocs_mgmt_route_table_add_entry ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_len,
void *  arg_out,
uint32_t  arg_out_len 
)
static

Definition at line 2353 of file ocs_mgmt.c.

static int32_t ocs_mgmt_route_table_del_entry ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_len,
void *  arg_out,
uint32_t  arg_out_len 
)
static

Definition at line 2280 of file ocs_mgmt.c.

static int32_t ocs_mgmt_route_table_read ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_len,
void *  arg_out,
uint32_t  arg_out_len 
)
static

Definition at line 2426 of file ocs_mgmt.c.

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

Definition at line 991 of file ocs_mgmt.c.

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

Definition at line 1540 of file ocs_mgmt.c.

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

Definition at line 1120 of file ocs_mgmt.c.

static int32_t ocs_mgmt_vlan_add ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Add VLAN tag will actually creates an interface along with VLAN ID Rule 1: Cannot set VLAN on default interface in I+T profile. VLAN can only be added by creating an additional interface handle. Rule 2: An interface can only has one VLAN.

Definition at line 3300 of file ocs_mgmt.c.

static int32_t ocs_mgmt_vlan_del ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Delete VLAN will actually deletes the interface handle of vlan This function first removes the IP addresses configured on the interface handle and then delete iface.

Definition at line 3240 of file ocs_mgmt.c.

static int32_t ocs_mgmt_vlan_show ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 3329 of file ocs_mgmt.c.

static int32_t set_active_profile ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set active profile.

Description
This is a management action handler to set the currently active profile for an SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
valueNew value to set the profile to.
Returns
Returns 0 on success, non-zero on failure.

Definition at line 1018 of file ocs_mgmt.c.

static int32_t set_data_digest ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1221 of file ocs_mgmt.c.

static int set_debug_cq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3069 of file ocs_mgmt.c.

static int set_debug_io_trace ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3105 of file ocs_mgmt.c.

static int set_debug_mq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3051 of file ocs_mgmt.c.

static int set_debug_scsi_tgt_trace ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3141 of file ocs_mgmt.c.

static int set_debug_sm_trace ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3123 of file ocs_mgmt.c.

static int set_debug_wq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3087 of file ocs_mgmt.c.

static int32_t set_gateway ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1343 of file ocs_mgmt.c.

static int32_t set_header_digest ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1246 of file ocs_mgmt.c.

static int32_t set_jumbo_frames ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1196 of file ocs_mgmt.c.

static int set_linkcfg ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set linkcfg config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
valueValue to which the linkcfg is set.
Returns
Returns 0 on success.

Definition at line 1562 of file ocs_mgmt.c.

static int set_mac_address ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 3034 of file ocs_mgmt.c.

static int32_t set_max_cxns_per_session ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1315 of file ocs_mgmt.c.

static int32_t set_port_protocol ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set port profile.

Description
This is a management action handler to set the current port protocol. Input value should be one of iSCSI, FC, or FCoE.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
valueThe value to be assigned
Returns
Returns 0 on success, non-zero on failure.

Definition at line 1146 of file ocs_mgmt.c.

static int set_require_chap ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1386 of file ocs_mgmt.c.

static int32_t set_tcp_window_scale ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1293 of file ocs_mgmt.c.

static int32_t set_tcp_window_size ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 1271 of file ocs_mgmt.c.

Variable Details

ocs_mgmt_table_entry_t mgmt_table[]

Definition at line 187 of file ocs_mgmt.c.