3.14. OPENIPMI ADDRESSING
# d e f i n e I P M I _ S Y S T E M _ I N T E R F A C E _ A D D R _ T Y P E . . struct ipmi_system_interface_addr .
unsigned char lun;
The channel should be IPMI_BMC_CHANNEL and the lun should generally be zero. An IPMI address routes messages on the IPMB. The format is:
#define IPMI_IPMB_ADDR_TYPE # d e f i n e I P M I _ I P M B _ B R O A D C A S T _ A D D R _ T Y struct ipmi_ipmb_addr P E
u n s i g n e d c h a r s l a v e _ a d d r unsigned char lun; ;
The channel should be the IPMB bus channel number, the slave_address should be the IPMB address of the destination, and the lun should be the destination LUN. Notice that two address types can be used with this command, a normal IPMB message and a broadcast IPMB can be sent with this. Note that if you send a broadcast IPMB, you will receive a normal IPMB address in the response.
A LAN to system interface address is:
# d e f i n e I P M I _ L A N _ A D D R _ T Y P E . . struct ipmi_lan_addr .
unsigned unsigned unsigned unsigned unsigned
char privilege; char session_handle; char remote_SWID; char local_SWID; char lun;
This deviates a little from the IPMI spec. In the spec, the SWIDs used are the requester SWID and responder SWID. For this message, the remote SWID is other end and the local SWID is this end. This way, there is no confusion when sending and receiving messages, and no special handling of the SWIDs needs to be done.