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

Go to the source code of this file.

Detailed Description

Declarations for the common functions used by ocs_mgmt.

Definition in file ocs_mgmt.h.

Data Structures

struct  ocs_mgmt_table_entry_t
 
struct  ocs_mgmt_functions_t
 

Macros

#define OCS_MGMT_MAX_NAME   128
 
#define OCS_MGMT_MAX_VALUE   128
 
#define MGMT_MODE_RD   4
 
#define MGMT_MODE_WR   2
 
#define MGMT_MODE_EX   1
 
#define MGMT_MODE_RW   (MGMT_MODE_RD | MGMT_MODE_WR)
 
#define OCS_ISCSI_MGMT_CMD_PARAMS_LEN   256
 
#define SFP_PAGE_SIZE   128
 
#define SFP_PAGE_A0   0xa0
 
#define SFP_PAGE_A2   0xa2
 

Typedefs

typedef void(* ocs_mgmt_get_func )(ocs_t *, char *, ocs_textbuf_t *)
 
typedef int(* ocs_mgmt_set_func )(ocs_t *, char *, char *)
 
typedef int(* ocs_mgmt_action_func )(ocs_t *, char *, void *, uint32_t, void *, uint32_t)
 
typedef void(* ocs_mgmt_get_list_handler )(ocs_textbuf_t *textbuf, void *object)
 
typedef void(* ocs_mgmt_get_all_handler )(ocs_textbuf_t *textbuf, void *object)
 
typedef int(* ocs_mgmt_get_handler )(ocs_textbuf_t *, char *parent, char *name, void *object)
 
typedef int(* ocs_mgmt_set_handler )(char *parent, char *name, char *value, void *object)
 
typedef int(* ocs_mgmt_exec_handler )(char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *object)
 

Functions

void ocs_mgmt_start_section (ocs_textbuf_t *textbuf, const char *name, int index)
 Generate the beginning of a numbered section in a management XML document. More...
 
void ocs_mgmt_start_unnumbered_section (ocs_textbuf_t *textbuf, const char *name)
 Generate the beginning of an unnumbered section in a management XML document. More...
 
void ocs_mgmt_end_section (ocs_textbuf_t *textbuf, const char *name, int index)
 Generate the indexed end of a section in a management XML document. More...
 
void ocs_mgmt_end_unnumbered_section (ocs_textbuf_t *textbuf, const char *name)
 Generate the end of a section in a management XML document. More...
 
void ocs_mgmt_emit_property_name (ocs_textbuf_t *textbuf, int access, const char *name)
 Generate a property, with no value, in a management XML document. More...
 
void ocs_mgmt_emit_string (ocs_textbuf_t *textbuf, int access, const char *name, const char *value)
 Generate a property with a string value in a management XML document. More...
 
 __attribute__ ((format(printf, 4, 5))) extern void ocs_mgmt_emit_int(ocs_textbuf_t *textbuf
 
int const char const char void ocs_mgmt_emit_boolean (ocs_textbuf_t *textbuf, int access, const char *name, const int value)
 Generate a property with a boolean value in a management XML document. More...
 
int parse_wwn (char *wwn_in, uint64_t *wwn_out)
 parse a WWN from a string into a 64-bit value More...
 
void ocs_mgmt_get_list (ocs_t *ocs, ocs_textbuf_t *textbuf)
 Get a list of options supported by the driver. More...
 
void ocs_mgmt_get_all (ocs_t *ocs, ocs_textbuf_t *textbuf)
 
int ocs_mgmt_get (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Return the value of a management item. More...
 
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...
 
int32_t ocs_mgmt_get_sfp (ocs_t *ocs, uint16_t page, void *buf, uint32_t buf_len)
 

Variables

int access
 
int const char * name
 
int const char const char * fmt
 

Macro Details

#define MGMT_MODE_EX   1

Definition at line 49 of file ocs_mgmt.h.

#define MGMT_MODE_RD   4

Definition at line 47 of file ocs_mgmt.h.

#define MGMT_MODE_RW   (MGMT_MODE_RD | MGMT_MODE_WR)

Definition at line 50 of file ocs_mgmt.h.

#define MGMT_MODE_WR   2

Definition at line 48 of file ocs_mgmt.h.

#define OCS_ISCSI_MGMT_CMD_PARAMS_LEN   256

Definition at line 52 of file ocs_mgmt.h.

#define OCS_MGMT_MAX_NAME   128

Definition at line 44 of file ocs_mgmt.h.

#define OCS_MGMT_MAX_VALUE   128

Definition at line 45 of file ocs_mgmt.h.

#define SFP_PAGE_A0   0xa0

Definition at line 55 of file ocs_mgmt.h.

#define SFP_PAGE_A2   0xa2

Definition at line 56 of file ocs_mgmt.h.

#define SFP_PAGE_SIZE   128

Definition at line 54 of file ocs_mgmt.h.

Type Details

typedef int(* ocs_mgmt_action_func)(ocs_t *, char *, void *, uint32_t, void *, uint32_t)

Definition at line 63 of file ocs_mgmt.h.

typedef int(* ocs_mgmt_exec_handler)(char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *object)

Definition at line 79 of file ocs_mgmt.h.

typedef void(* ocs_mgmt_get_all_handler)(ocs_textbuf_t *textbuf, void *object)

Definition at line 76 of file ocs_mgmt.h.

typedef void(* ocs_mgmt_get_func)(ocs_t *, char *, ocs_textbuf_t *)

Definition at line 61 of file ocs_mgmt.h.

typedef int(* ocs_mgmt_get_handler)(ocs_textbuf_t *, char *parent, char *name, void *object)

Definition at line 77 of file ocs_mgmt.h.

typedef void(* ocs_mgmt_get_list_handler)(ocs_textbuf_t *textbuf, void *object)

Definition at line 75 of file ocs_mgmt.h.

typedef int(* ocs_mgmt_set_func)(ocs_t *, char *, char *)

Definition at line 62 of file ocs_mgmt.h.

typedef int(* ocs_mgmt_set_handler)(char *parent, char *name, char *value, void *object)

Definition at line 78 of file ocs_mgmt.h.

Function Details

__attribute__ ( (format(printf, 4, 5))  )
void ocs_mgmt_get_all ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf 
)

Definition at line 632 of file ocs_mgmt.c.

int32_t ocs_mgmt_get_sfp ( ocs_t *  ocs,
uint16_t  page,
void *  buf,
uint32_t  buf_len 
)

Definition at line 1165 of file ocs_mgmt.c.

int parse_wwn ( char *  wwn_in,
uint64_t *  wwn_out 
)

parse a WWN from a string into a 64-bit value

Given a pointer to a string, parse the string into a 64-bit WWN value. The format of the string must be xx:xx:xx:xx:xx:xx:xx:xx

Parameters
wwn_inpointer to the string to be parsed
wwn_outpointer to uint64_t in which to put the parsed result
Returns
0 if successful, non-zero if the WWN is malformed and couldn't be parsed

Definition at line 3047 of file ocs_mgmt.c.

Variable Details

int access

Definition at line 99 of file ocs_mgmt.h.

int const char const char* fmt

Definition at line 99 of file ocs_mgmt.h.

int const char* name

Definition at line 99 of file ocs_mgmt.h.