Documentation ¶
Overview ¶
Package ipmi implements functions to communicate with the OpenIPMI driver interface. For a detailed description of OpenIPMI, see http://openipmi.sourceforge.net/IPMI.pdf
Index ¶
- Constants
- type ChassisStatus
- type Command
- type DevID
- type Event
- type IPMI
- func (i *IPMI) EnableSEL() (bool, error)
- func (i *IPMI) GetChassisStatus() (*ChassisStatus, error)
- func (i *IPMI) GetDeviceID() (*DevID, error)
- func (i *IPMI) GetLanConfig(channel byte, param byte) ([]byte, error)
- func (i *IPMI) GetSELInfo() (*SELInfo, error)
- func (i *IPMI) LogSystemEvent(e *Event) error
- func (i *IPMI) RawCmd(param []byte) ([]byte, error)
- func (i *IPMI) RawSendRecv(msg Msg) ([]byte, error)
- func (i *IPMI) SendRecv(netfn NetFn, cmd Command, data []byte) ([]byte, error)
- func (i *IPMI) SetSystemFWVersion(version string) error
- func (i *IPMI) ShutoffWatchdog() error
- func (i *IPMI) WatchdogRunning() (bool, error)
- type Msg
- type NetFn
- type OEMNontsEvent
- type OEMTsEvent
- type SELInfo
- type StandardEvent
Constants ¶
const ( // IPM Device "Global" Commands BMC_GET_DEVICE_ID Command = 0x01 // BMC Device and Messaging Commands BMC_SET_WATCHDOG_TIMER Command = 0x24 BMC_GET_WATCHDOG_TIMER Command = 0x25 BMC_SET_GLOBAL_ENABLES Command = 0x2E BMC_GET_GLOBAL_ENABLES Command = 0x2F SET_SYSTEM_INFO_PARAMETERS Command = 0x58 BMC_ADD_SEL Command = 0x44 // Chassis Device Commands BMC_GET_CHASSIS_STATUS Command = 0x01 // SEL device Commands BMC_GET_SEL_INFO Command = 0x40 //LAN Device Commands BMC_GET_LAN_CONFIG Command = 0x02 IPM_WATCHDOG_NO_ACTION = 0x00 IPM_WATCHDOG_SMS_OS = 0x04 IPM_WATCHDOG_CLEAR_SMS_OS = 0x10 ADTL_SEL_DEVICE = 0x04 EN_SYSTEM_EVENT_LOGGING = 0x08 // SEL // STD_TYPE = 0x02 OEM_NTS_TYPE = 0xFB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChassisStatus ¶
type Event ¶
type Event struct { RecordID uint16 RecordType uint8 StandardEvent OEMTsEvent OEMNontsEvent }
Event is included three kinds of events, Standard, OEM timestamped and OEM non-timestamped
The record type decides which event should be used
type IPMI ¶
IPMI represents access to the IPMI interface.
func (*IPMI) GetChassisStatus ¶
func (i *IPMI) GetChassisStatus() (*ChassisStatus, error)
func (*IPMI) GetDeviceID ¶
func (*IPMI) GetSELInfo ¶
func (*IPMI) LogSystemEvent ¶
LogSystemEvent adds an SEL (System Event Log) entry.
func (*IPMI) RawSendRecv ¶
RawSendRecv sends the IPMI message, receives the response, and returns the response data.
func (*IPMI) SendRecv ¶
SendRecv sends the IPMI message, receives the response, and returns the response data. This is recommended for use unless the user must be able to specify the data pointer and length on their own.
func (*IPMI) SetSystemFWVersion ¶
SetSystemFWVersion sets the provided system firmware version to BMC via IPMI.
func (*IPMI) ShutoffWatchdog ¶
func (*IPMI) WatchdogRunning ¶
type OEMNontsEvent ¶
type OEMNontsEvent struct {
OEMNontsDefinedData [13]uint8
}
OEMNonTsEvent is a non-timestamped OEM-custom event.
It holds 13 bytes of OEM-defined arbitrary data.
type OEMTsEvent ¶
OEMTsEvent is a timestamped OEM-custom event.
It holds 6 bytes of OEM-defined arbitrary data.