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

Go to the source code of this file.

Detailed Description

OCS VPD parser

Definition in file ocs_vpd.h.

Data Structures

struct  vpdbuf_t
 VPD buffer structure. More...
 

Macros

#define VPD_LARGE_RESOURCE_TYPE_ID_STRING_TAG   0x82
 
#define VPD_LARGE_RESOURCE_TYPE_R_TAG   0x90
 
#define VPD_LARGE_RESOURCE_TYPE_W_TAG   0x91
 
#define VPD_SMALL_RESOURCE_TYPE_END_TAG   0x78
 

Functions

static int vpdnext (vpdbuf_t *vpd)
 return next VPD byte More...
 
static int vpddone (vpdbuf_t *vpd)
 return true if no more vpd buffer data More...
 
static uint8_t * vpdref (vpdbuf_t *vpd)
 return pointer to current VPD data location More...
 
static uint8_t * ocs_find_vpd (uint8_t *vpddata, uint32_t vpddata_length, const char *key)
 find a VPD entry More...
 

Macro Details

#define VPD_LARGE_RESOURCE_TYPE_ID_STRING_TAG   0x82

Definition at line 105 of file ocs_vpd.h.

#define VPD_LARGE_RESOURCE_TYPE_R_TAG   0x90

Definition at line 106 of file ocs_vpd.h.

#define VPD_LARGE_RESOURCE_TYPE_W_TAG   0x91

Definition at line 107 of file ocs_vpd.h.

#define VPD_SMALL_RESOURCE_TYPE_END_TAG   0x78

Definition at line 108 of file ocs_vpd.h.

Function Details

static uint8_t* ocs_find_vpd ( uint8_t *  vpddata,
uint32_t  vpddata_length,
const char *  key 
)
inlinestatic

find a VPD entry

Finds a VPD entry given the two character code

Parameters
vpddatapointer to raw vpd data buffer
vpddata_lengthlength of vpddata buffer in bytes
keykey to look up
Returns
returns a pointer to the key location or NULL if not found or checksum error

Definition at line 123 of file ocs_vpd.h.

static int vpddone ( vpdbuf_t *  vpd)
inlinestatic

return true if no more vpd buffer data

return true if the vpd buffer data has been completely consumed

Parameters
vpdpointer to vpd buffer
Returns
returns true if no more data

Definition at line 85 of file ocs_vpd.h.

static int vpdnext ( vpdbuf_t *  vpd)
inlinestatic

return next VPD byte

Returns next VPD byte and updates accumulated checksum

Parameters
vpdpointer to vpd buffer
Returns
returns next byte for success, or a negative error code value for failure.

Definition at line 64 of file ocs_vpd.h.

static uint8_t* vpdref ( vpdbuf_t *  vpd)
inlinestatic

return pointer to current VPD data location

Returns a pointer to the current location in the VPD data

Parameters
vpdpointer to vpd buffer
Returns
pointer to current VPD data location

Definition at line 100 of file ocs_vpd.h.