X hits on this document

PDF document

February 10, 2006 - page 104 / 238

576 views

0 shares

0 downloads

0 comments

104 / 238

92

CHAPTER 6. SDR REPOSITORIES

ipmi_mc_t

*mc,

unsigned int

lun,

int

sensor,

i n t i p m i _ s d r _ i n f o _ a l l o c ( i p m i _ d o m a i n _ t

*domain,

ipmi_sdr_info_t **new_sdrs);

If you want the main SDRs held on an MC, set the sensor value to false (zero). If you want the device SDRs, set the value to true (one). After you allocate an SDR info structure, you can use the following call to fetch it:

_ _ _ _ _ typedef void (*ipmi sdrs fetched_t)(ipmi sdr info t *sdrs,

int

err,

int

changed,

unsigned int void *sdrs, i n t i p m i _ s d r _ f e t c h ( i p m i _ s d r _ i n f o _ t i p m i _ s d r s _ f e t c h e d _ t h a n d l e r ,

count, *cb_data);

void

* c b _ d a t a ) ;

If you allocate your own SDR info structure, you should destroy it when you are done with it with the following call:

t y p e d e f v o i d ( * i p m i _ s d r _ d e s t r o y e d _ t ) ( i p m i _ s d r _ i n f o _ t * s d r s , v o i d * c b _ d a t a ) ;

i n t i p m i _ s d r _ i n f o _ d e s t r o y ( i p m i _ s d r _ i n f o _ t

*sdrs,

i p m i _ s d r _ d e s t r o y e d _ t h a n d l e r ,

void

* c b _ d a t a ) ;

Note that you should not destroy an SDR repository you fetched from the domain or MC. Those are managed by OpenIPMI; if you destroy them you will cause problems.

Note that an SDR repository from a MC or domain is dynamic; it may change because OpenIPMI rescans the SDRs to make sure they haven’t changed.

6.5.2

SDR

Repository Information

General SDR info is available about the repository once the fetch is complete. The format of the functions to get them are all

int ipmi_sdr_get_xxx(ipmi_sdr_info_t *sdr, int *val); where the xxx is replaced by the item you wish to get. Valid items are:

major version

minor version

overflow

The major IPMI version the SDR repository supports, like 1 for IPMI 1.0 and 1.5, and 2 for IPMI 2.0. The minor IPMI version the SDR repository supports, like 0 for IPMI 1.0 and 2.0, and 5 for IPMI 1.5. An SDR write operation has failed to do lack of space.

Document info
Document views576
Page views576
Page last viewedMon Dec 05 11:40:41 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments