X hits on this document

PDF document

February 10, 2006 - page 90 / 238

597 views

0 shares

0 downloads

0 comments

90 / 238

78

CHAPTER 3. IPMI INTERFACES

Handling Incoming Traps

OpenIPMI has some ability to handle SNMP traps. It does not implement its own SNMP stack though, so it cannot do all the work for you. Indeed, different SNMP exist and OpenIPMI would not want to presume that you would only use one of them. Also, since the SNMP trap port is fixed, some cooperative mechanism may be required between different pieces of software. You must have your own stack, like NetSNMP[3], and

catch the traps with that. Once you have a trap, you must call:

unsigned int

_ _ src addr len,

int

src_addr_type,

long

specific,

unsigned char

*data,

unsigned int

data_len);

i n t i p m i _ h a n d l e _ s n m p _ t r a p _ d a t a ( v o i d

* s r c _ a d d r ,

Where src_addr is the IP source address (struct sockaddr_in) and length is the length of the address structure. Only IP is supported for now, so src_addr_type must be IPMI_EXTERN_ADDR_IP. The specific field is the field of the same name from the SNMP Protocol Data Unit (PDU). The data field is a pointer to the user data from the SNMP PDU, and the length of that data is in data_len.

The data in the trap is not enough information to fully decode the event, so currently an incoming trap will only cause an SEL fetch on the proper SEL. OpenIPMI will automatically send the PET Acknowledge command described in Table 3.35.

Note that SNMP traps can only be recieved on one port, and that port is privileged, so you must run as root to receive SNMP traps.

      • 3.13.5

        The Alert Immediate Command

    • 3.14

      OpenIPMI Addressing

The OpenIPMI driver and library use a common addressing scheme. This attempts to normalize the mes- saging from the user’s point of view. The message data will look the same no matter where you send it. The only difference is the message.

The main OpenIPMI address structure is:

struct {

i p m i _ a d d r

int

addr_type;

short

channel;

char

_ data[IPMI MAX

};

_

SIZE];

ADDR

_

The addr_type and channel are common to all OpenIPMI addresses. You have to look at the addr_type to determine the type of address being used and cast it to the proper address. The specific messages are overlays on this structure.

A system interface address is used to route the message to the local management controller. It is:

Document info
Document views597
Page views597
Page last viewedTue Dec 06 16:22:16 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments