/* *Thisisanoverlayforalltheaddresstypes,soit'seasyto *determinetheactualaddresstype.Thisiskindoflikeaddresses *workforsockets.
*/ #define IPMI_MAX_ADDR_SIZE 32 struct ipmi_addr { /* Try to take these from the "Channel Medium Type" table
in section 6.5 of the IPMI 1.5 manual. */ int addr_type; short channel; char data[IPMI_MAX_ADDR_SIZE];
};
/* *Whentheaddressisnotused,thetypewillbesettothisvalue. *ThechannelistheBMC'schannelnumberforthechannel(usually *0),orIPMC_BMC_CHANNELifcommunicatingdirectlywiththeBMC.
*/ #define IPMI_SYSTEM_INTERFACE_ADDR_TYPE 0x0c struct ipmi_system_interface_addr { int addr_type; short channel; unsignedchar lun;
};
/* An IPMB Address. */ #define IPMI_IPMB_ADDR_TYPE 0x01 /* Used for broadcast get device id as described in section 17.9 of the
IPMI 1.5 manual. */ #define IPMI_IPMB_BROADCAST_ADDR_TYPE 0x41 struct ipmi_ipmb_addr { int addr_type; short channel; unsignedchar slave_addr; unsignedchar lun;
};
/* *Receivetypesformessagescomingfromthereceiveinterface.This *isusedforthereceivein-kernelinterfaceandinthereceive *IOCTL. * *The"IPMI_RESPONSE_RESPONSE_TYPE"isalittlestrangesounding,but *itallowsyoutogetthemessageresultswhenyousendaresponse *message.
*/ #define IPMI_RESPONSE_RECV_TYPE 1/* A response to a command */ #define IPMI_ASYNC_EVENT_RECV_TYPE 2/* Something from the event queue */ #define IPMI_CMD_RECV_TYPE 3/* A command from somewhere else */ #define IPMI_RESPONSE_RESPONSE_TYPE 4/* The response for asentresponse,givingany errorstatusforsendingthe response.Whenyousenda responsemessage,thiswill
be returned. */ #define IPMI_OEM_RECV_TYPE 5/* The response for OEM Channels */
/* Note that async events and received commands do not have a completion
code as the first byte of the incoming data, unlike a response. */
/* The magic IOCTL value for this interface. */ #define IPMI_IOC_MAGIC 'i'
/* Messages sent to the interface are this format. */ struct ipmi_req { unsignedchar __user *addr; /* Address to send the message to. */ unsignedint addr_len;
long msgid; /* The sequence number for the message. This exactvaluewillbereportedbackinthe responsetothisrequestifitisacommand. Ifitisaresponse,thiswillbeusedas
the sequence value for the response. */
/* Messages sent to the interface with timing parameters are this
format. */ struct ipmi_req_settime { struct ipmi_req req;
/* See ipmi_request_settime() above for details on these
values. */ int retries; unsignedint retry_time_ms;
}; /* *Sendamessagetotheinterfaceswithtimingparameters.errorvalues *are: *-EFAULT-anaddresssuppliedwasinvalid. *-EINVAL-Theaddresssuppliedwasnotvalid,orthecommand *wasnotallowed. *-EMSGSIZE-Themessagetowastoolarge. *-ENOMEM-Bufferscouldnotbeallocatedforthecommand.
*/ #define IPMICTL_SEND_COMMAND_SETTIME _IOR(IPMI_IOC_MAGIC, 21, \ struct ipmi_req_settime)
/* Messages received from the interface are this format. */ struct ipmi_recv { int recv_type; /* Is this a command, response or an
asyncronous event. */
unsignedchar __user *addr; /* Address the message was from is put here.Thecallermustsupplythe
memory. */ unsignedint addr_len; /* The size of the address buffer. Thecallersuppliesthefullbuffer length,thisvalueisupdatedto theactualmessagelengthwhenthe
message is received. */
long msgid; /* The sequence number specified in the request ifthisisaresponse.Ifthisisacommand, thiswillbethesequencenumberfromthe
command. */
struct ipmi_msg msg; /* The data field must point to a buffer. Thedata_sizefieldmustbesettothe sizeofthemessagebuffer.The callersuppliesthefullbuffer length,thisvalueisupdatedtothe actualmessagelengthwhenthemessage
is received. */
};
/* *Receiveamessage.errorvalues: *-EAGAIN-nomessagesinthequeue. *-EFAULT-anaddresssuppliedwasinvalid. *-EINVAL-Theaddresssuppliedwasnotvalid. *-EMSGSIZE-Themessagetowastoolargetofitintothemessagebuffer,
* the message will be left in the buffer. */ #define IPMICTL_RECEIVE_MSG _IOWR(IPMI_IOC_MAGIC, 12, \ struct ipmi_recv)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.