X hits on this document

PDF document

February 10, 2006 - page 102 / 238





102 / 238


6.3.1 6.3.2

Dynamic Device SDR Repositories Commands for Device SDR Repositories


Records in an SDR Repository


Section 7.8 on entities and section 8.7 on sensors describe the specific records in SDR repositories. They all follow a general format, though; this section describes that format.

Each SDR has three parts: A header, a key, and a body. Note that all multi-byte values in SDRs are little-endian unless specified otherwise. The header is:

0-1 2

3 4

Record ID. This is the number used to fetch the record from the SDR repository. IPMI Version. This is the IPMI version the record is specified under. Record Type. This tells the specific type of record contained in the SDR; it gives the

format of the data after the header. Record Size. This is the number of bytes in the SDR, not including the header.

Table 6.1: The SDR header

The key and body are dependent on the record type and are defined in the specific record definitions. Table 6.2 shows the various record types supported by IPMI. To fetch an SDR, first fetch the SDR header. Once the size is known the rest of the SDR can be fetched.


Dealing with SDR Repositories in OpenIPMI

SDRs can be rather difficult to deal with. OpenIPMI hides most, if not all, of the difficulty from the user. It fetches the SDRs, decodes them, create entities and sensors as necessary, and reports those to the user. The user of OpenIPMI will not have to know anything about SDRs, in general.

The type used by OpenIPMI to hold an SDR repository is ipmi_sdr_info_t. The type used to hold individual SDRs is ipmi_sdr_t. The internals of ipmi_sdr_info_t are opaque, you can only use functions to manipulate it. The internals of ipmi_sdr_t are not (currently) opaque, you can access the internals directly.


Getting an SDR Repository

If you need access to the SDRs for a system, you can get the main SDRs by calling:

i p m i _ s d r _ t * i p m i _ d o m a i n _ g e t _ m a i n _ s d r s ( i p m i _ d o m a i n _ t * d o m a i n ) ;

You can get the SDRs for an MC with the following:

ipmi_sdr_t *ipmi_mc_get_sdrs(ipmi_domain_t *domain);

These are the pre-fetched copies that OpenIPMI holds. You can also fetch your own copy of an SDR repository using the following call to create it:

Document info
Document views275
Page views275
Page last viewedFri Oct 21 18:28:59 UTC 2016