X hits on this document

PDF document

February 10, 2006 - page 44 / 238

578 views

0 shares

0 downloads

0 comments

44 / 238

32

CHAPTER 3. IPMI INTERFACES

Setting val to true turns on events, setting it to false turns off events. Multiple users may register to receive events; they will all get all events. Note that this is for receiving asyncronous events through the interface. The events also go into the event log as described in chapter 10, but that is a different thing. If you receive an event through this interface, you will also get it in the event log. Section 10.1 describes the format of events.

Receiving Commands and Responding

Commands sent to Logical Unit Number (LUN) two of a management controller will generally be routed to the driver. If the driver does not have a registered user for that command, it will respond that it does not handle that command.

If you wish to receive commands, you must register to receive those commands. The cmdspec structure defines commands the program wishes to receive:

struct ipmi_cmdspec {

unsigned char netfn; unsigned char cmd;

};

These are registered with the following ioctl:

rv = ioctl(fd, IPMICTL_REGISTER_FOR_CMD, &cmdspec);

To remove a registered command, use the following:

rv = ioctl(fd, IPMICTL_UNREGISTER_FOR_CMD, &cmdspec);

If you receive a message, you must send a response. The driver makes this easy, you can always use the received address to send the response to. The program in Appendix J receives one message, sends a response, and exits. When you response, you must supply the msgid that came into the command.

Overriding Default Timing Values

Be default, commands over IPMB get resent up to 5 times with a 1 second timeout between the sends. For very select applications, this is not suitable. Primarily, some applications need to only send once, they have a higher-level resend mechanism and the OpenIPMI resends will only get in the way.

Note that responses over IPMB will not get timed or resent. The user may modify the timing values two different ways. The user can set the default resend and retry times for a file descriptor with the following structure:

s t r u c t i p m i _ t i m i n g _ p a r m s

{

int

retries;

u n s i g n e d i n t r e t r y _ t i m e _ m s ;

};

T h e r e t r i e s p a r m i s t h e n u m b e r o f t i m e s t h e m e s s a g e w i l l b e r e s e n t . T h e r e t r y _ t i m e _ m s i s t h e t i m in milliseconds between resends. To get and set the parameters, use the following: e

Document info
Document views578
Page views578
Page last viewedMon Dec 05 12:38:24 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments