Documentation
¶
Index ¶
- Constants
- Variables
- func RenderTable(headers []string, rows []map[string]string) string
- func RenderTableStream(headers []string, rowSeq iter.Seq[map[string]string]) error
- func SensorFilterOptionIsReadingValid(sensor *types.Sensor) bool
- func SensorFilterOptionIsSensorType(sensorTypes ...types.SensorType) func(sensor *types.Sensor) bool
- func SensorFilterOptionIsThreshold(sensor *types.Sensor) bool
- func WithCommandContext(ctx context.Context, commandContext *CommandContext) context.Context
- type AuthCodeMultiSessionInput
- type AuthCodeSingleSessionInput
- type Client
- func (c *Client) ActivateDCMIPowerLimit(ctx context.Context, activate bool) (response *dcmi.ActivateDCMIPowerLimitResponse, err error)
- func (c *Client) ActivatePayload(ctx context.Context, request *transport.ActivatePayloadRequest) (response *transport.ActivatePayloadResponse, err error)
- func (c *Client) ActivateSession(ctx context.Context) (response *app.ActivateSessionResponse, err error)
- func (c *Client) AddSELEntry(ctx context.Context, sel *types.SEL) (response *storage.AddSELEntryResponse, err error)
- func (c *Client) AlertImmediate(ctx context.Context, request *sensor.AlertImmediateRequest) (response *sensor.AlertImmediateResponse, err error)
- func (c *Client) ArmPEFPostponeTimer(ctx context.Context, timeout uint8) (response *sensor.ArmPEFPostponeTimerResponse, err error)
- func (c *Client) BuildIPMIRequest(ctx context.Context, reqCmd types.Request) (*types.IPMIRequest, error)
- func (c *Client) BuildRmcpRequest(ctx context.Context, reqCmd types.Request) (*types.Rmcp, error)
- func (c *Client) ChassisControl(ctx context.Context, control chassis.ChassisControl) (response *chassis.ChassisControlResponse, err error)
- func (c *Client) ChassisIdentify(ctx context.Context, interval uint8, force bool) (response *chassis.ChassisIdentifyResponse, err error)
- func (c *Client) ChassisReset(ctx context.Context) (response *chassis.ChassisResetResponse, err error)
- func (c *Client) ClearMessageFlags(ctx context.Context, request *sensor.ClearMessageFlagsRequest) (response *sensor.ClearMessageFlagsResponse, err error)
- func (c *Client) ClearSEL(ctx context.Context, reservationID uint16) (response *storage.ClearSELResponse, err error)
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) CloseSession(ctx context.Context, request *app.CloseSessionRequest) (response *app.CloseSessionResponse, err error)
- func (c *Client) ColdReset(ctx context.Context) (err error)
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) Connect15(ctx context.Context) error
- func (c *Client) Connect20(ctx context.Context) error
- func (c *Client) ConnectAuto(ctx context.Context) error
- func (c *Client) ConnectOpen(ctx context.Context, devnum int32) error
- func (c *Client) ConnectTool(ctx context.Context, devnum int32) error
- func (c *Client) DeactivatePayload(ctx context.Context, request *transport.DeactivatePayloadRequest) (response *transport.DeactivatePayloadResponse, err error)
- func (c *Client) Debug(header string, object any)
- func (c *Client) DebugBytes(header string, data []byte, width int)
- func (c *Client) Debugf(format string, object ...any)
- func (c *Client) DebugfGreen(format string, object ...any)
- func (c *Client) DebugfRed(format string, object ...any)
- func (c *Client) DebugfYellow(format string, object ...any)
- func (c *Client) DeleteSELEntry(ctx context.Context, recordID uint16, reservationID uint16) (response *storage.DeleteSELEntryResponse, err error)
- func (c *Client) DisableUser(ctx context.Context, userID uint8) (err error)
- func (c *Client) EnableMessageChannelReceive(ctx context.Context, channelNumber uint8, channelState uint8) (response *app.EnableMessageChannelReceiveResponse, err error)
- func (c *Client) EnableUser(ctx context.Context, userID uint8) (err error)
- func (c *Client) Exchange(ctx context.Context, request types.Request, response types.Response) error
- func (c *Client) GetACPIPowerState(ctx context.Context) (response *chassis.GetACPIPowerStateResponse, err error)
- func (c *Client) GetAllChannelCipherSuites(ctx context.Context, channelNumber uint8) ([]types.CipherSuiteRecord, error)
- func (c *Client) GetBMCGlobalEnables(ctx context.Context) (response *sensor.GetBMCGlobalEnablesResponse, err error)
- func (c *Client) GetBTInterfaceCapabilities(ctx context.Context) (response *app.GetBTInterfaceCapabilitiesResponse, err error)
- func (c *Client) GetChannelAccess(ctx context.Context, channelNumber uint8, ...) (response *app.GetChannelAccessResponse, err error)
- func (c *Client) GetChannelAuthenticationCapabilities(ctx context.Context, channelNumber uint8, privilegeLevel types.PrivilegeLevel) (response *app.GetChannelAuthenticationCapabilitiesResponse, err error)
- func (c *Client) GetChannelCipherSuites(ctx context.Context, channelNumber uint8, index uint8) (response *app.GetChannelCipherSuitesResponse, err error)
- func (c *Client) GetChannelInfo(ctx context.Context, channelNumber uint8) (response *app.GetChannelInfoResponse, err error)
- func (c *Client) GetChannelOEMPayloadInfo(ctx context.Context, request *transport.GetChannelOEMPayloadInfoRequest) (response *transport.GetChannelOEMPayloadInfoResponse, err error)
- func (c *Client) GetChannelPayloadSupport(ctx context.Context, channelNumber uint8) (response *transport.GetChannelPayloadSupportResponse, err error)
- func (c *Client) GetChannelPayloadVersion(ctx context.Context, channelNumber uint8, payloadType types.PayloadType) (response *transport.GetChannelPayloadVersionResponse, err error)
- func (c *Client) GetChassisCapabilities(ctx context.Context) (response *chassis.GetChassisCapabilitiesResponse, err error)
- func (c *Client) GetChassisStatus(ctx context.Context) (response *chassis.GetChassisStatusResponse, err error)
- func (c *Client) GetCommandEnables(ctx context.Context, channelNumber uint8, ...) (response *app.GetCommandEnablesResponse, err error)
- func (c *Client) GetCommandSubfunctionEnables(ctx context.Context, request *app.GetCommandSubfunctionEnablesRequest) (response *app.GetCommandSubfunctionEnablesResponse, err error)
- func (c *Client) GetCommandSubfunctionSupport(ctx context.Context, channelNumber uint8, netFn types.NetFn, lun uint8, ...) (response *app.GetCommandSubfunctionSupportResponse, err error)
- func (c *Client) GetCommandSupport(ctx context.Context, channelNumber uint8, ...) (response *app.GetCommandSupportResponse, err error)
- func (c *Client) GetConfigurableCommandSubfunctions(ctx context.Context, request *app.GetConfigurableCommandSubfunctionsRequest) (response *app.GetConfigurableCommandSubfunctionsResponse, err error)
- func (c *Client) GetConfigurableCommands(ctx context.Context, channelNumber uint8, ...) (response *app.GetConfigurableCommandsResponse, err error)
- func (c *Client) GetCurrentSessionInfo(ctx context.Context) (response *app.GetSessionInfoResponse, err error)
- func (c *Client) GetDCMIAssetTag(ctx context.Context, offset uint8) (response *dcmi.GetDCMIAssetTagResponse, err error)
- func (c *Client) GetDCMIAssetTagFull(ctx context.Context) (assetTagRaw []byte, typeLength types.TypeLength, err error)
- func (c *Client) GetDCMICapParam(ctx context.Context, paramSelector types.DCMICapParamSelector) (response *dcmi.GetDCMICapParamResponse, err error)
- func (c *Client) GetDCMICapParamFor(ctx context.Context, param types.DCMICapParameter) error
- func (c *Client) GetDCMICapParams(ctx context.Context) (*types.DCMICapParams, error)
- func (c *Client) GetDCMICapParamsFor(ctx context.Context, dcmiCapParams *types.DCMICapParams) error
- func (c *Client) GetDCMIConfigParam(ctx context.Context, paramSelector types.DCMIConfigParamSelector, ...) (response *dcmi.GetDCMIConfigParamResponse, err error)
- func (c *Client) GetDCMIConfigParamFor(ctx context.Context, param types.DCMIConfigParameter) error
- func (c *Client) GetDCMIConfigParams(ctx context.Context) (*types.DCMIConfigParams, error)
- func (c *Client) GetDCMIConfigParamsFor(ctx context.Context, dcmiConfigParams *types.DCMIConfigParams) error
- func (c *Client) GetDCMIMgmtControllerIdentifier(ctx context.Context, offset uint8) (response *dcmi.GetDCMIMgmtControllerIdentifierResponse, err error)
- func (c *Client) GetDCMIMgmtControllerIdentifierFull(ctx context.Context) ([]byte, error)
- func (c *Client) GetDCMIPowerLimit(ctx context.Context) (response *dcmi.GetDCMIPowerLimitResponse, err error)
- func (c *Client) GetDCMIPowerReading(ctx context.Context) (response *dcmi.GetDCMIPowerReadingResponse, err error)
- func (c *Client) GetDCMISensorInfo(ctx context.Context, request *dcmi.GetDCMISensorInfoRequest) (response *dcmi.GetDCMISensorInfoResponse, err error)
- func (c *Client) GetDCMISensors(ctx context.Context, entityIDs ...types.EntityID) ([]*types.SDR, error)
- func (c *Client) GetDCMITemperatureReadings(ctx context.Context, request *dcmi.GetDCMITemperatureReadingsRequest) (response *dcmi.GetDCMITemperatureReadingsResponse, err error)
- func (c *Client) GetDCMITemperatureReadingsForEntities(ctx context.Context, entityIDs ...types.EntityID) ([]dcmi.DCMITemperatureReading, error)
- func (c *Client) GetDCMIThermalLimit(ctx context.Context, entityID types.EntityID, ...) (response *dcmi.GetDCMIThermalLimitResponse, err error)
- func (c *Client) GetDeviceGUID(ctx context.Context) (response *app.GetDeviceGUIDResponse, err error)
- func (c *Client) GetDeviceID(ctx context.Context) (response *app.GetDeviceIDResponse, err error)
- func (c *Client) GetDeviceSDR(ctx context.Context, recordID uint16) (response *storage.GetDeviceSDRResponse, err error)
- func (c *Client) GetDeviceSDRBySensorID(ctx context.Context, sensorNumber uint8) (*types.SDR, error)
- func (c *Client) GetDeviceSDRInfo(ctx context.Context, getSDRCount bool) (response *storage.GetDeviceSDRInfoResponse, err error)
- func (c *Client) GetDeviceSDRs(ctx context.Context, recordTypes ...types.SDRRecordType) ([]*types.SDR, error)
- func (c *Client) GetEventReceiver(ctx context.Context) (response *sensor.GetEventReceiverResponse, err error)
- func (c *Client) GetFRU(ctx context.Context, deviceID uint8, deviceName string) (*types.FRU, error)
- func (c *Client) GetFRUAreaBoard(ctx context.Context, deviceID uint8, offset uint16) (*types.FRUBoardInfoArea, error)
- func (c *Client) GetFRUAreaChassis(ctx context.Context, deviceID uint8, offset uint16) (*types.FRUChassisInfoArea, error)
- func (c *Client) GetFRUAreaMultiRecords(ctx context.Context, deviceID uint8, offset uint16) ([]*types.FRUMultiRecord, error)
- func (c *Client) GetFRUAreaProduct(ctx context.Context, deviceID uint8, offset uint16) (*types.FRUProductInfoArea, error)
- func (c *Client) GetFRUData(ctx context.Context, deviceID uint8) ([]byte, error)
- func (c *Client) GetFRUInventoryAreaInfo(ctx context.Context, fruDeviceID uint8) (response *storage.GetFRUInventoryAreaInfoResponse, err error)
- func (c *Client) GetFRUs(ctx context.Context) ([]*types.FRU, error)
- func (c *Client) GetIPStatistics(ctx context.Context, channelNumber uint8, clearAllStatistics bool) (response *transport.GetIPStatisticsResponse, err error)
- func (c *Client) GetLanConfig(ctx context.Context, channelNumber uint8) (*types.LanConfig, error)
- func (c *Client) GetLanConfigParam(ctx context.Context, channelNumber uint8, ...) (response *transport.GetLanConfigParamResponse, err error)
- func (c *Client) GetLanConfigParamFor(ctx context.Context, channelNumber uint8, param types.LanConfigParameter) error
- func (c *Client) GetLanConfigParams(ctx context.Context, channelNumber uint8) (*types.LanConfigParams, error)
- func (c *Client) GetLanConfigParamsFor(ctx context.Context, channelNumber uint8, ...) error
- func (c *Client) GetLanConfigParamsFull(ctx context.Context, channelNumber uint8) (*types.LanConfigParams, error)
- func (c *Client) GetLastProcessedEventId(ctx context.Context) (response *sensor.GetLastProcessedEventIdResponse, err error)
- func (c *Client) GetMessage(ctx context.Context) (response *sensor.GetMessageResponse, err error)
- func (c *Client) GetMessageFlags(ctx context.Context) (response *sensor.GetMessageFlagsResponse, err error)
- func (c *Client) GetNetFnSupport(ctx context.Context, channelNumber uint8) (response *app.GetNetFnSupportResponse, err error)
- func (c *Client) GetPEFCapabilities(ctx context.Context) (response *sensor.GetPEFCapabilitiesResponse, err error)
- func (c *Client) GetPEFConfigParam(ctx context.Context, getRevisionOnly bool, ...) (response *sensor.GetPEFConfigParamResponse, err error)
- func (c *Client) GetPEFConfigParamFor(ctx context.Context, param types.PEFConfigParameter) error
- func (c *Client) GetPEFConfigParams(ctx context.Context) (pefConfigParams *types.PEFConfigParams, err error)
- func (c *Client) GetPEFConfigParamsFor(ctx context.Context, pefConfigParams *types.PEFConfigParams) error
- func (c *Client) GetPOHCounter(ctx context.Context) (response *chassis.GetPOHCounterResponse, err error)
- func (c *Client) GetPayloadActivationStatus(ctx context.Context, payloadType types.PayloadType) (response *transport.GetPayloadActivationStatusResponse, err error)
- func (c *Client) GetPayloadInstanceInfo(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8) (response *transport.GetPayloadInstanceInfoResponse, err error)
- func (c *Client) GetSDR(ctx context.Context, recordID uint16) (response *storage.GetSDRResponse, err error)
- func (c *Client) GetSDRBySensorID(ctx context.Context, sensorNumber uint8) (*types.SDR, error)
- func (c *Client) GetSDRBySensorName(ctx context.Context, sensorName string) (*types.SDR, error)
- func (c *Client) GetSDREnhanced(ctx context.Context, recordID uint16) (*types.SDR, error)
- func (c *Client) GetSDRHeader(ctx context.Context, recordID uint16) (*types.SDRHeader, uint16, error)
- func (c *Client) GetSDRParsed(ctx context.Context, recordID uint16) (*types.SDR, error)
- func (c *Client) GetSDRRepoAllocInfo(ctx context.Context) (response *storage.GetSDRRepoAllocInfoResponse, err error)
- func (c *Client) GetSDRRepoInfo(ctx context.Context) (response *storage.GetSDRRepoInfoResponse, err error)
- func (c *Client) GetSDRs(ctx context.Context, recordTypes ...types.SDRRecordType) ([]*types.SDR, error)
- func (c *Client) GetSDRsMap(ctx context.Context) (types.SDRMapBySensorNumber, error)
- func (c *Client) GetSDRsRaw(ctx context.Context, recordTypes ...types.SDRRecordType) ([]*types.SDR, error)
- func (c *Client) GetSDRsStream(ctx context.Context, recordTypes ...types.SDRRecordType) iter.Seq[*types.Result[types.SDR]]
- func (c *Client) GetSELAllocInfo(ctx context.Context) (response *storage.GetSELAllocInfoResponse, err error)
- func (c *Client) GetSELEntries(ctx context.Context, startRecordID uint16) ([]*types.SEL, error)
- func (c *Client) GetSELEntriesStream(ctx context.Context, startRecordID uint16) iter.Seq[*types.Result[types.SEL]]
- func (c *Client) GetSELEntry(ctx context.Context, reservationID uint16, recordID uint16) (response *storage.GetSELEntryResponse, err error)
- func (c *Client) GetSELInfo(ctx context.Context) (response *storage.GetSELInfoResponse, err error)
- func (c *Client) GetSELTime(ctx context.Context) (response *storage.GetSELTimeResponse, err error)
- func (c *Client) GetSELTimeUTCOffset(ctx context.Context) (response *storage.GetSELTimeUTCOffsetResponse, err error)
- func (c *Client) GetSOLConfigParam(ctx context.Context, channelNumber uint8, ...) (response *transport.GetSOLConfigParamResponse, err error)
- func (c *Client) GetSOLConfigParamFor(ctx context.Context, channelNumber uint8, param types.SOLConfigParameter) error
- func (c *Client) GetSOLConfigParams(ctx context.Context, channelNumber uint8) (*types.SOLConfigParams, error)
- func (c *Client) GetSOLConfigParamsFor(ctx context.Context, channelNumber uint8, ...) error
- func (c *Client) GetSelfTestResults(ctx context.Context) (response *app.GetSelfTestResultsResponse, err error)
- func (c *Client) GetSensorByID(ctx context.Context, sensorNumber uint8) (*types.Sensor, error)
- func (c *Client) GetSensorByName(ctx context.Context, sensorName string) (*types.Sensor, error)
- func (c *Client) GetSensorEventEnable(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorEventEnableResponse, err error)
- func (c *Client) GetSensorEventStatus(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorEventStatusResponse, err error)
- func (c *Client) GetSensorHysteresis(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorHysteresisResponse, err error)
- func (c *Client) GetSensorReading(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorReadingResponse, err error)
- func (c *Client) GetSensorReadingFactors(ctx context.Context, sensorNumber uint8, reading uint8) (response *sensor.GetSensorReadingFactorsResponse, err error)
- func (c *Client) GetSensorThresholds(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorThresholdsResponse, err error)
- func (c *Client) GetSensorType(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorTypeResponse, err error)
- func (c *Client) GetSensors(ctx context.Context, filterOptions ...SensorFilterOption) ([]*types.Sensor, error)
- func (c *Client) GetSensorsAny(ctx context.Context, filterOptions ...SensorFilterOption) ([]*types.Sensor, error)
- func (c *Client) GetSensorsAnyStream(ctx context.Context, filterOptions ...SensorFilterOption) iter.Seq[*types.Result[types.Sensor]]
- func (c *Client) GetSensorsStream(ctx context.Context, filterOptions ...SensorFilterOption) iter.Seq[*types.Result[types.Sensor]]
- func (c *Client) GetSessionChallenge(ctx context.Context) (response *app.GetSessionChallengeResponse, err error)
- func (c *Client) GetSessionInfo(ctx context.Context, request *app.GetSessionInfoRequest) (response *app.GetSessionInfoResponse, err error)
- func (c *Client) GetSupermicroBiosVersion(ctx context.Context) (response *oem.CommandGetSupermicroBiosVersionResponse, err error)
- func (c *Client) GetSystemBootOptionsParam(ctx context.Context, paramSelector types.BootOptionParamSelector, ...) (response *chassis.GetSystemBootOptionsParamResponse, err error)
- func (c *Client) GetSystemBootOptionsParamFor(ctx context.Context, param types.BootOptionParameter) error
- func (c *Client) GetSystemBootOptionsParams(ctx context.Context) (*types.BootOptionsParams, error)
- func (c *Client) GetSystemBootOptionsParamsFor(ctx context.Context, bootOptionsParams *types.BootOptionsParams) error
- func (c *Client) GetSystemGUID(ctx context.Context) (response *app.GetSystemGUIDResponse, err error)
- func (c *Client) GetSystemInfo(ctx context.Context) (*types.SystemInfo, error)
- func (c *Client) GetSystemInfoParam(ctx context.Context, paramSelector types.SystemInfoParamSelector, ...) (response *app.GetSystemInfoParamResponse, err error)
- func (c *Client) GetSystemInfoParamFor(ctx context.Context, param types.SystemInfoParameter) error
- func (c *Client) GetSystemInfoParams(ctx context.Context) (*types.SystemInfoParams, error)
- func (c *Client) GetSystemInfoParamsFor(ctx context.Context, params *types.SystemInfoParams) error
- func (c *Client) GetSystemInterfaceCapabilities(ctx context.Context, interfaceType app.SystemInterfaceType) (response *app.GetSystemInterfaceCapabilitiesResponse, err error)
- func (c *Client) GetSystemRestartCause(ctx context.Context) (response *chassis.GetSystemRestartCauseResponse, err error)
- func (c *Client) GetUserAccess(ctx context.Context, channelNumber uint8, userID uint8) (response *app.GetUserAccessResponse, err error)
- func (c *Client) GetUserPayloadAccess(ctx context.Context, channelNumber uint8, userID uint8) (response *app.GetUserPayloadAccessResponse, err error)
- func (c *Client) GetUsername(ctx context.Context, userID uint8) (response *app.GetUsernameResponse, err error)
- func (c *Client) GetUsers(ctx context.Context, channelNumber uint8) ([]*app.User, error)
- func (c *Client) GetWatchdogTimer(ctx context.Context) (response *app.GetWatchdogTimerResponse, err error)
- func (c *Client) ManufacturingTestOn(ctx context.Context) (response *app.ManufacturingTestOnResponse, err error)
- func (c *Client) MasterWriteRead(ctx context.Context, request *app.MasterWriteReadRequest) (*app.MasterWriteReadResponse, error)
- func (c *Client) OpenSession(ctx context.Context) (response *rmcpplus.OpenSessionResponse, err error)
- func (c *Client) PETAcknowledge(ctx context.Context, request *sensor.PETAcknowledgeRequest) (response *sensor.PETAcknowledgeResponse, err error)
- func (c *Client) ParseRmcpResponse(ctx context.Context, msg []byte, cmd types.Command, response types.Response) error
- func (c *Client) PlatformEventMessage(ctx context.Context, request *sensor.PlatformEventMessageRequest) (response *sensor.PlatformEventMessageResponse, err error)
- func (c *Client) RAKPMessage1(ctx context.Context) (response *rmcpplus.RAKPMessage2, err error)
- func (c *Client) RAKPMessage3(ctx context.Context) (response *rmcpplus.RAKPMessage4, err error)
- func (c *Client) RawCommand(ctx context.Context, netFn types.NetFn, cmd uint8, data []byte, name string) (response *CommandRawResponse, err error)
- func (c *Client) ReadEventMessageBuffer(ctx context.Context) (response *sensor.ReadEventMessageBufferResponse, err error)
- func (c *Client) ReadFRUData(ctx context.Context, fruDeviceID uint8, readOffset uint16, readCount uint8) (response *storage.ReadFRUDataResponse, err error)
- func (c *Client) RearmSensorEvents(ctx context.Context, request *sensor.RearmSensorEventsRequest) (response *sensor.RearmSensorEventsResponse, err error)
- func (c *Client) ReserveDeviceSDRRepo(ctx context.Context) (response *storage.ReserveDeviceSDRRepoResponse, err error)
- func (c *Client) ReserveSDRRepo(ctx context.Context) (response *storage.ReserveSDRRepoResponse, err error)
- func (c *Client) ReserveSEL(ctx context.Context) (response *storage.ReserveSELResponse, err error)
- func (c *Client) ResetWatchdogTimer(ctx context.Context) (response *app.ResetWatchdogTimerResponse, err error)
- func (c *Client) RmcpPing(ctx context.Context) (response *RmcpPingResponse, err error)
- func (c *Client) SOLActivate(ctx context.Context, in io.Reader, out io.Writer, opts *SOLActivateOptions) error
- func (c *Client) SOLActivating(ctx context.Context, request *transport.SOLActivatingRequest) (response *transport.SOLActivatingResponse, err error)
- func (c *Client) SOLPayload(ctx context.Context, request *types.SOLPayloadRequest) (response *types.SOLPayloadResponse, err error)
- func (c *Client) SendMessage(ctx context.Context, channelNumber uint8, authenticated bool, encrypted bool, ...) (response *app.SendMessageResponse, err error)
- func (c *Client) SessionPrivilegeLevel() types.PrivilegeLevel
- func (c *Client) SetACPIPowerState(ctx context.Context, request *chassis.SetACPIPowerStateRequest) (err error)
- func (c *Client) SetBMCGlobalEnables(ctx context.Context, enableSystemEventLogging bool, ...) (response *sensor.SetBMCGlobalEnablesResponse, err error)
- func (c *Client) SetBootDevice(ctx context.Context, bootDeviceSelector types.BootDeviceSelector, ...) error
- func (c *Client) SetBootParamBootFlags(ctx context.Context, bootFlags *types.BootOptionParam_BootFlags) error
- func (c *Client) SetBootParamClearAck(ctx context.Context, by types.BootInfoAcknowledgeBy) error
- func (c *Client) SetBootParamSetInProgress(ctx context.Context, setInProgress types.SetInProgressState) error
- func (c *Client) SetChannelAccess(ctx context.Context, request *app.SetChannelAccessRequest) (response *app.SetChannelAccessResponse, err error)
- func (c *Client) SetChannelSecurityKeys(ctx context.Context, request *transport.SetChannelSecurityKeysRequest) (response *transport.SetChannelSecurityKeysResponse, err error)
- func (c *Client) SetChassisCapabilities(ctx context.Context, request *chassis.SetChassisCapabilitiesRequest) (response *chassis.SetChassisCapabilitiesResponse, err error)
- func (c *Client) SetCommandEnables(ctx context.Context, request *app.SetCommandEnablesRequest) (response *app.SetCommandEnablesResponse, err error)
- func (c *Client) SetCommandSubfunctionEnables(ctx context.Context, request *app.SetCommandSubfunctionEnablesRequest) (response *app.SetCommandSubfunctionEnablesResponse, err error)
- func (c *Client) SetDCMIAssetTag(ctx context.Context, offset uint8, writeBytes uint8, assetTag []byte) (response *dcmi.SetDCMIAssetTagResponse, err error)
- func (c *Client) SetDCMIAssetTagFull(ctx context.Context, assetTag []byte) (err error)
- func (c *Client) SetDCMIConfigParam(ctx context.Context, paramSelector types.DCMIConfigParamSelector, ...) (response *dcmi.SetDCMIConfigParamResponse, err error)
- func (c *Client) SetDCMIConfigParamFor(ctx context.Context, param types.DCMIConfigParameter) (response *dcmi.SetDCMIConfigParamResponse, err error)
- func (c *Client) SetDCMIMgmtControllerIdentifier(ctx context.Context, offset uint8, writeBytes uint8, idStr []byte) (response *dcmi.SetDCMIMgmtControllerIdentifierResponse, err error)
- func (c *Client) SetDCMIMgmtControllerIdentifierFull(ctx context.Context, idStr []byte) (err error)
- func (c *Client) SetDCMIPowerLimit(ctx context.Context, request *dcmi.SetDCMIPowerLimitRequest) (response *dcmi.SetDCMIPowerLimitResponse, err error)
- func (c *Client) SetDCMIThermalLimit(ctx context.Context, request *dcmi.SetDCMIThermalLimitRequest) (response *dcmi.SetDCMIThermalLimitResponse, err error)
- func (c *Client) SetEventReceiver(ctx context.Context, slaveAddress uint8, lun uint8) (response *sensor.SetEventReceiverResponse, err error)
- func (c *Client) SetEventReceiverDisable(ctx context.Context, lun uint8) (response *sensor.SetEventReceiverResponse, err error)
- func (c *Client) SetFrontPanelEnables(ctx context.Context, disableSleepButton bool, disableDiagnosticButton bool, ...) (response *chassis.SetFrontPanelEnablesResponse, err error)
- func (c *Client) SetLanConfigParam(ctx context.Context, channelNumber uint8, ...) (response *transport.SetLanConfigParamResponse, err error)
- func (c *Client) SetLanConfigParamFor(ctx context.Context, channelNumber uint8, param types.LanConfigParameter) error
- func (c *Client) SetLastProcessedEventId(ctx context.Context, recordID uint16, byBMC bool) (response *sensor.SetLastProcessedEventIdResponse, err error)
- func (c *Client) SetPEFConfigParam(ctx context.Context, paramSelector types.PEFConfigParamSelector, ...) (response *sensor.SetPEFConfigParamResponse, err error)
- func (c *Client) SetPowerCycleInterval(ctx context.Context, intervalInSec uint8) (response *chassis.SetPowerCycleIntervalResponse, err error)
- func (c *Client) SetPowerRestorePolicy(ctx context.Context, policy chassis.PowerRestorePolicy) (response *chassis.SetPowerRestorePolicyResponse, err error)
- func (c *Client) SetSELTime(ctx context.Context, t time.Time) (response *storage.SetSELTimeResponse, err error)
- func (c *Client) SetSELTimeUTCOffset(ctx context.Context, minutesOffset int16) (response *storage.SetSELTimeUTCOffsetResponse, err error)
- func (c *Client) SetSOLConfigParam(ctx context.Context, channelNumber uint8, ...) (response *transport.SetSOLConfigParamResponse, err error)
- func (c *Client) SetSOLConfigParamFor(ctx context.Context, channelNumber uint8, param types.SOLConfigParameter) error
- func (c *Client) SetSensorEventEnable(ctx context.Context, request *sensor.SetSensorEventEnableRequest) (response *sensor.SetSensorEventEnableResponse, err error)
- func (c *Client) SetSensorHysteresis(ctx context.Context, sensorNumber uint8, positiveHysteresis uint8, ...) (response *sensor.SetSensorHysteresisResponse, err error)
- func (c *Client) SetSensorReadingAndEventStatus(ctx context.Context, request *sensor.SetSensorReadingAndEventStatusRequest) (response *sensor.SetSensorReadingAndEventStatusResponse, err error)
- func (c *Client) SetSensorThresholds(ctx context.Context, request *sensor.SetSensorThresholdsRequest) (response *sensor.SetSensorThresholdsResponse, err error)
- func (c *Client) SetSensorType(ctx context.Context, sensorNumber uint8, sensorType types.SensorType, ...) (response *sensor.SetSensorTypeResponse, err error)
- func (c *Client) SetSessionPrivilegeLevel(ctx context.Context, privilegeLevel types.PrivilegeLevel) (response *app.SetSessionPrivilegeLevelResponse, err error)
- func (c *Client) SetSystemBootOptionsParam(ctx context.Context, request *chassis.SetSystemBootOptionsParamRequest) (response *chassis.SetSystemBootOptionsParamResponse, err error)
- func (c *Client) SetSystemBootOptionsParamFor(ctx context.Context, param types.BootOptionParameter) error
- func (c *Client) SetSystemInfoParam(ctx context.Context, paramSelector types.SystemInfoParamSelector, ...) (response *app.SetSystemInfoParamResponse, err error)
- func (c *Client) SetSystemInfoParamFor(ctx context.Context, param types.SystemInfoParameter) error
- func (c *Client) SetUserAccess(ctx context.Context, request *app.SetUserAccessRequest) (response *app.SetUserAccessResponse, err error)
- func (c *Client) SetUserPassword(ctx context.Context, userID uint8, password string, stored20 bool) (response *app.SetUserPasswordResponse, err error)
- func (c *Client) SetUserPayloadAccess(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8) (response *app.SetUserPayloadAccessResponse, err error)
- func (c *Client) SetUsername(ctx context.Context, userID uint8, username string) (response *app.SetUsernameResponse, err error)
- func (c *Client) SetWatchdogTimer(ctx context.Context) (response *app.SetWatchdogTimerResponse, err error)
- func (c *Client) SuspendARPs(ctx context.Context, channelNumber uint8, suspendARP bool, ...) (response *transport.SuspendARPsResponse, err error)
- func (c *Client) SuspendResumePayloadEncryption(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8, ...) (response *transport.SuspendResumePayloadEncryptionResponse, err error)
- func (c *Client) TestUserPassword(ctx context.Context, userID uint8, password string, stored20 bool) (response *app.SetUserPasswordResponse, err error)
- func (c *Client) ValidateRAKP2(ctx context.Context, rakp2 *rmcpplus.RAKPMessage2) (bool, error)
- func (c *Client) ValidateRAKP4(ctx context.Context, response *rmcpplus.RAKPMessage4) (bool, error)
- func (c *Client) WarmReset(ctx context.Context) (err error)
- func (c *Client) WithBufferSize(bufferSize int) *Client
- func (c *Client) WithCipherSuiteID(cipherSuiteID ...types.CipherSuiteID) *Client
- func (c *Client) WithDebug(debug bool) *Client
- func (c *Client) WithInterface(intf Interface) *Client
- func (c *Client) WithMaxPrivilegeLevel(privilegeLevel types.PrivilegeLevel) *Client
- func (c *Client) WithOpenBackend(pref string) *Client
- func (c *Client) WithRequesterAddr(requesterAddr, requesterLUN uint8)
- func (c *Client) WithResponderAddr(responderAddr, responderLUN uint8)
- func (c *Client) WithRetry(retryCount int) *Client
- func (c *Client) WithTimeout(timeout time.Duration) *Client
- func (c *Client) WithUDPProxy(proxy proxy.Dialer) *Client
- func (c *Client) WriteFRUData(ctx context.Context, fruDeviceID uint8, writeOffset uint16, writeData []byte) (response *storage.WriteFRUDataResponse, err error)
- type CommandContext
- func (cmdCtx *CommandContext) WithRequesterAddr(requesterAddr uint8) *CommandContext
- func (cmdCtx *CommandContext) WithRequesterLUN(requesterLUN uint8) *CommandContext
- func (cmdCtx *CommandContext) WithResponderAddr(responderAddr uint8) *CommandContext
- func (cmdCtx *CommandContext) WithResponderLUN(responderLUN uint8) *CommandContext
- type CommandRawRequest
- type CommandRawResponse
- type Interface
- type RmcpPingRequest
- type RmcpPingResponse
- type SOLActivateOptions
- type SensorFilterOption
- type UDPClient
- func (c *UDPClient) Close() error
- func (c *UDPClient) Exchange(ctx context.Context, reader io.Reader) ([]byte, error)
- func (c *UDPClient) ExchangeUntilMatch(ctx context.Context, reader io.Reader, ...) ([]byte, error)
- func (c *UDPClient) LocalIPPort() (string, int)
- func (c *UDPClient) RemoteIP() string
- func (c *UDPClient) SetBufferSize(bufferSize int) *UDPClient
- func (c *UDPClient) SetProxy(proxy proxy.Dialer) *UDPClient
- func (c *UDPClient) SetTimeout(timeout time.Duration) *UDPClient
Constants ¶
const ( InterfaceLan Interface = "lan" InterfaceLanplus Interface = "lanplus" InterfaceOpen Interface = "open" InterfaceTool Interface = "tool" // OpenBackend* are the supported values for Client.openBackendPref // (Windows only). They select which Microsoft_IPMI WMI transport the // Open Interface uses on Windows. Linux ignores the field. // They alias the backend names defined in pkg/open. OpenBackendAuto string = open.BackendAuto OpenBackendCOM string = open.BackendCOM OpenBackendPowerShell string = open.BackendPowerShell // OpenBackendPower is a deprecated alias of OpenBackendPowerShell. OpenBackendPower string = open.BackendPowerShell DefaultKeepAliveIntervalSec int = 30 DefaultBufferSize int = 4096 // https://github.com/ipmitool/ipmitool/blob/IPMITOOL_1_8_19/src/plugins/lanplus/lanplus.h#L68 // https://github.com/ipmitool/ipmitool/blob/IPMITOOL_1_8_19/src/plugins/lan/lan.c#L68 // https://github.com/ipmitool/ipmitool/blob/IPMITOOL_1_8_19/src/plugins/open/open.c#L87 DefaultLanTimeoutSec int = 2 DefaultLanRetries int = 4 DefaultLanplusTimeoutSec int = 1 DefaultLanplusRetries int = 4 DefaultOpenTimeoutSec int = 15 DefaultOpenRetries int = 0 )
const ( IPMIVersion15 = 0x15 IPMIVersion20 = 0x20 )
Variables ¶
var ErrRAKPAuthentication = errors.New("RAKP authentication failed")
ErrRAKPAuthentication reports that a RAKP authentication code or integrity check did not match.
Functions ¶
func RenderTable ¶
RenderTable formats a table from a slice of rows. The Headers is a slice of strings, the order of the headers is the order of the columns in the table. Each row is represented as a map, the keys of the map are the headers of the table.
func RenderTableStream ¶
func SensorFilterOptionIsSensorType ¶
func SensorFilterOptionIsSensorType(sensorTypes ...types.SensorType) func(sensor *types.Sensor) bool
Sensor is matched if the sensor type of the sensor is one of the given sensor types.
func WithCommandContext ¶
func WithCommandContext(ctx context.Context, commandContext *CommandContext) context.Context
WithCommandContext adds a CommandContext to the provided context.Context.
Types ¶
type AuthCodeMultiSessionInput ¶
type AuthCodeMultiSessionInput = crypto.MultiSessionInput
Re-export v1.5 AuthCode input types from the shared crypto package.
type AuthCodeSingleSessionInput ¶
type AuthCodeSingleSessionInput = crypto.SingleSessionInput
Re-export v1.5 AuthCode input types from the shared crypto package.
type Client ¶
type Client struct {
Host string
Port int
Username string
Password string
Interface Interface
// contains filtered or unexported fields
}
func NewOpenClient ¶
func NewToolClient ¶
NewToolClient creates an IPMI client based ipmitool. You should pass the file path of ipmitool binary or path of a wrapper script that would be executed.
func (*Client) ActivateDCMIPowerLimit ¶
func (c *Client) ActivateDCMIPowerLimit(ctx context.Context, activate bool) (response *dcmi.ActivateDCMIPowerLimitResponse, err error)
ActivateDCMIPowerLimit activate or deactivate the power limit set. Setting the param 'activate' to true means to activate the power limit, false means to deactivate the power limit
func (*Client) ActivatePayload ¶
func (c *Client) ActivatePayload(ctx context.Context, request *transport.ActivatePayloadRequest) (response *transport.ActivatePayloadResponse, err error)
func (*Client) ActivateSession ¶
func (c *Client) ActivateSession(ctx context.Context) (response *app.ActivateSessionResponse, err error)
ActivateSession is only used for IPMI v1.5
func (*Client) AddSELEntry ¶
func (*Client) AlertImmediate ¶
func (c *Client) AlertImmediate(ctx context.Context, request *sensor.AlertImmediateRequest) (response *sensor.AlertImmediateResponse, err error)
func (*Client) ArmPEFPostponeTimer ¶
func (*Client) BuildIPMIRequest ¶
func (c *Client) BuildIPMIRequest(ctx context.Context, reqCmd types.Request) (*types.IPMIRequest, error)
BuildIPMIRequest creates an IPMIRequest for a Command Request, filling in checksum fields.
func (*Client) BuildRmcpRequest ¶
BuildRmcpRequest builds an RMCP packet for the given command request.
func (*Client) ChassisControl ¶
func (c *Client) ChassisControl(ctx context.Context, control chassis.ChassisControl) (response *chassis.ChassisControlResponse, err error)
func (*Client) ChassisIdentify ¶
func (c *Client) ChassisIdentify(ctx context.Context, interval uint8, force bool) (response *chassis.ChassisIdentifyResponse, err error)
This command causes the chassis to physically identify itself by a mechanism chosen by the system implementation; such as turning on blinking user-visible lights or emitting beeps via a speaker, LCD panel, etc.
func (*Client) ChassisReset ¶
func (c *Client) ChassisReset(ctx context.Context) (response *chassis.ChassisResetResponse, err error)
ChassisReset sends the legacy Chassis Reset command.
func (*Client) ClearMessageFlags ¶
func (c *Client) ClearMessageFlags(ctx context.Context, request *sensor.ClearMessageFlagsRequest) (response *sensor.ClearMessageFlagsResponse, err error)
func (*Client) CloseSession ¶
func (c *Client) CloseSession(ctx context.Context, request *app.CloseSessionRequest) (response *app.CloseSessionResponse, err error)
func (*Client) Connect15 ¶
13.14 IPMI v1.5 LAN Session Activation 1. RmcpPresencePing - RmcpPresencePong 2. Get Channel Authentication Capabilities 3. Get Session Challenge 4. Activate Session
func (*Client) ConnectAuto ¶
ConnectAuto detects the IPMI version supported by BMC by using GetChannelAuthenticationCapabilities command, then decide to use v1.5 or v2.0 for subsequent requests.
func (*Client) ConnectOpen ¶
ConnectOpen try to initialize the client by open the device of linux ipmi driver.
func (*Client) ConnectTool ¶
ConnectTool try to initialize the client.
func (*Client) DeactivatePayload ¶
func (c *Client) DeactivatePayload(ctx context.Context, request *transport.DeactivatePayloadRequest) (response *transport.DeactivatePayloadResponse, err error)
func (*Client) DebugBytes ¶
DebugBytes print byte slices with a fixed width of bytes on each line.
func (*Client) DebugfGreen ¶
func (*Client) DebugfYellow ¶
func (*Client) DeleteSELEntry ¶
func (*Client) DisableUser ¶
func (*Client) EnableMessageChannelReceive ¶
func (*Client) EnableUser ¶
func (*Client) GetACPIPowerState ¶
func (c *Client) GetACPIPowerState(ctx context.Context) (response *chassis.GetACPIPowerStateResponse, err error)
This command is provided to allow system software to tell a controller the present ACPI power state of the system.
func (*Client) GetAllChannelCipherSuites ¶
func (*Client) GetBMCGlobalEnables ¶
func (*Client) GetBTInterfaceCapabilities ¶
func (*Client) GetChannelAccess ¶
func (c *Client) GetChannelAccess(ctx context.Context, channelNumber uint8, accessOption types.ChannelAccessOption) (response *app.GetChannelAccessResponse, err error)
func (*Client) GetChannelAuthenticationCapabilities ¶
func (c *Client) GetChannelAuthenticationCapabilities(ctx context.Context, channelNumber uint8, privilegeLevel types.PrivilegeLevel) (response *app.GetChannelAuthenticationCapabilitiesResponse, err error)
GetChannelAuthenticationCapabilities is used to retrieve capability information about the channel that the message is delivered over, or for a particular channel. The command returns the authentication algorithm support for the given privilege level.
This command is sent in unauthenticated (clear) format.
When activating a session, the privilege level passed in this command will normally be the same Requested Maximum Privilege level that will be used for a subsequent Activate Session command.
func (*Client) GetChannelCipherSuites ¶
func (c *Client) GetChannelCipherSuites(ctx context.Context, channelNumber uint8, index uint8) (response *app.GetChannelCipherSuitesResponse, err error)
This command can be executed prior to establishing a session with the BMC. The command is used to look up what authentication, integrity, and confidentiality algorithms are supported. The algorithms are used in combination as 'Cipher Suites'. This command only applies to implementations that support IPMI v2.0/RMCP+ sessions.
func (*Client) GetChannelInfo ¶
func (*Client) GetChannelOEMPayloadInfo ¶
func (c *Client) GetChannelOEMPayloadInfo(ctx context.Context, request *transport.GetChannelOEMPayloadInfoRequest) (response *transport.GetChannelOEMPayloadInfoResponse, err error)
func (*Client) GetChannelPayloadSupport ¶
func (*Client) GetChannelPayloadVersion ¶
func (c *Client) GetChannelPayloadVersion(ctx context.Context, channelNumber uint8, payloadType types.PayloadType) (response *transport.GetChannelPayloadVersionResponse, err error)
func (*Client) GetChassisCapabilities ¶
func (*Client) GetChassisStatus ¶
func (*Client) GetCommandEnables ¶
func (*Client) GetCommandSubfunctionEnables ¶
func (c *Client) GetCommandSubfunctionEnables(ctx context.Context, request *app.GetCommandSubfunctionEnablesRequest) (response *app.GetCommandSubfunctionEnablesResponse, err error)
func (*Client) GetCommandSubfunctionSupport ¶
func (*Client) GetCommandSupport ¶
func (*Client) GetConfigurableCommandSubfunctions ¶
func (c *Client) GetConfigurableCommandSubfunctions(ctx context.Context, request *app.GetConfigurableCommandSubfunctionsRequest) (response *app.GetConfigurableCommandSubfunctionsResponse, err error)
func (*Client) GetConfigurableCommands ¶
func (*Client) GetCurrentSessionInfo ¶
func (*Client) GetDCMIAssetTag ¶
func (c *Client) GetDCMIAssetTag(ctx context.Context, offset uint8) (response *dcmi.GetDCMIAssetTagResponse, err error)
GetDCMIAssetTag sends a DCMI "Get Asset Tag" command.
func (*Client) GetDCMIAssetTagFull ¶
func (*Client) GetDCMICapParam ¶
func (c *Client) GetDCMICapParam(ctx context.Context, paramSelector types.DCMICapParamSelector) (response *dcmi.GetDCMICapParamResponse, err error)
func (*Client) GetDCMICapParamFor ¶
func (*Client) GetDCMICapParams ¶
func (*Client) GetDCMICapParamsFor ¶
func (*Client) GetDCMIConfigParam ¶
func (c *Client) GetDCMIConfigParam(ctx context.Context, paramSelector types.DCMIConfigParamSelector, setSelector uint8) (response *dcmi.GetDCMIConfigParamResponse, err error)
func (*Client) GetDCMIConfigParamFor ¶
func (*Client) GetDCMIConfigParams ¶
func (*Client) GetDCMIConfigParamsFor ¶
func (*Client) GetDCMIMgmtControllerIdentifier ¶
func (c *Client) GetDCMIMgmtControllerIdentifier(ctx context.Context, offset uint8) (response *dcmi.GetDCMIMgmtControllerIdentifierResponse, err error)
GetDCMIMgmtControllerIdentifier sends a DCMI "Get Management Controller Identifier" command.
func (*Client) GetDCMIMgmtControllerIdentifierFull ¶
func (*Client) GetDCMIPowerLimit ¶
func (c *Client) GetDCMIPowerLimit(ctx context.Context) (response *dcmi.GetDCMIPowerLimitResponse, err error)
GetDCMIPowerLimit sends a DCMI "Get Power Limit" command.
func (*Client) GetDCMIPowerReading ¶
func (c *Client) GetDCMIPowerReading(ctx context.Context) (response *dcmi.GetDCMIPowerReadingResponse, err error)
GetDCMIPowerReading sends a DCMI "Get Power Reading" command.
func (*Client) GetDCMISensorInfo ¶
func (c *Client) GetDCMISensorInfo(ctx context.Context, request *dcmi.GetDCMISensorInfoRequest) (response *dcmi.GetDCMISensorInfoResponse, err error)
GetDCMISensorInfo sends a DCMI "Get Sensor Info" command.
func (*Client) GetDCMISensors ¶
func (*Client) GetDCMITemperatureReadings ¶
func (c *Client) GetDCMITemperatureReadings(ctx context.Context, request *dcmi.GetDCMITemperatureReadingsRequest) (response *dcmi.GetDCMITemperatureReadingsResponse, err error)
func (*Client) GetDCMITemperatureReadingsForEntities ¶
func (*Client) GetDCMIThermalLimit ¶
func (c *Client) GetDCMIThermalLimit(ctx context.Context, entityID types.EntityID, entityInstance types.EntityInstance) (response *dcmi.GetDCMIThermalLimitResponse, err error)
func (*Client) GetDeviceGUID ¶
func (*Client) GetDeviceID ¶
func (*Client) GetDeviceSDR ¶
func (*Client) GetDeviceSDRBySensorID ¶
func (*Client) GetDeviceSDRInfo ¶
func (*Client) GetDeviceSDRs ¶
func (*Client) GetEventReceiver ¶
func (*Client) GetFRU ¶
GetFRU return FRU for the specified deviceID. The deviceName is not a must, pass empty string if not known.
func (*Client) GetFRUAreaBoard ¶
func (*Client) GetFRUAreaChassis ¶
func (*Client) GetFRUAreaMultiRecords ¶
func (*Client) GetFRUAreaProduct ¶
func (*Client) GetFRUData ¶
GetFRUData return all data bytes, the data size is firstly determined by GetFRUInventoryAreaInfoResponse.AreaSizeBytes
func (*Client) GetFRUInventoryAreaInfo ¶
func (*Client) GetIPStatistics ¶
func (*Client) GetLanConfig ¶
func (*Client) GetLanConfigParam ¶
func (*Client) GetLanConfigParamFor ¶
func (c *Client) GetLanConfigParamFor(ctx context.Context, channelNumber uint8, param types.LanConfigParameter) error
GetLanConfigParamFor get the lan config for a specific parameter.
The param is a pointer to a struct that implements the LanConfigParameter interface.
func (*Client) GetLanConfigParams ¶
func (*Client) GetLanConfigParamsFor ¶
func (c *Client) GetLanConfigParamsFor(ctx context.Context, channelNumber uint8, lanConfigParams *types.LanConfigParams) error
GetLanConfigParamsFor get the lan config params. You can initialize specific fields of LanConfigParams struct, which indicates to only get params for those fields.
func (*Client) GetLanConfigParamsFull ¶
func (*Client) GetLastProcessedEventId ¶
func (*Client) GetMessage ¶
func (*Client) GetMessageFlags ¶
func (*Client) GetNetFnSupport ¶
func (*Client) GetPEFCapabilities ¶
func (*Client) GetPEFConfigParam ¶
func (*Client) GetPEFConfigParamFor ¶
func (*Client) GetPEFConfigParams ¶
func (*Client) GetPEFConfigParamsFor ¶
func (*Client) GetPOHCounter ¶
func (c *Client) GetPOHCounter(ctx context.Context) (response *chassis.GetPOHCounterResponse, err error)
This command returns the present reading of the POH (Power-On Hours) counter, plus the number of counts per hour.
func (*Client) GetPayloadActivationStatus ¶
func (c *Client) GetPayloadActivationStatus(ctx context.Context, payloadType types.PayloadType) (response *transport.GetPayloadActivationStatusResponse, err error)
func (*Client) GetPayloadInstanceInfo ¶
func (c *Client) GetPayloadInstanceInfo(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8) (response *transport.GetPayloadInstanceInfoResponse, err error)
func (*Client) GetSDR ¶
func (c *Client) GetSDR(ctx context.Context, recordID uint16) (response *storage.GetSDRResponse, err error)
GetSDR returns raw SDR record.
func (*Client) GetSDRBySensorID ¶
func (*Client) GetSDRBySensorName ¶
func (*Client) GetSDREnhanced ¶
func (*Client) GetSDRHeader ¶
func (c *Client) GetSDRHeader(ctx context.Context, recordID uint16) (*types.SDRHeader, uint16, error)
GetSDRHeader returns the 5-byte SDR record header and next record ID via a partial Get SDR (v2.0§33.12). Used to skip non-matching records without fetching the full body.
func (*Client) GetSDRParsed ¶
GetSDRParsed fetches and parses a full SDR record without enhancing sensor readings.
func (*Client) GetSDRRepoAllocInfo ¶
func (*Client) GetSDRRepoInfo ¶
func (*Client) GetSDRs ¶
func (c *Client) GetSDRs(ctx context.Context, recordTypes ...types.SDRRecordType) ([]*types.SDR, error)
GetSDRs fetches the SDR records with the specified RecordTypes. The parameter is a slice of SDRRecordType used as filter. Empty means to get all SDR records.
Matching Full/Compact records are enhanced with live sensor readings. Prefer GetSDRsRaw when only record metadata is needed (e.g. FRU enumeration).
func (*Client) GetSDRsMap ¶
GetSDRsMap returns all Full/Compact SDRs grouped by GeneratorID and SensorNumber. The sensor name can only be got from SDR record. So use this method to construct a map from which you can get sensor name.
func (*Client) GetSDRsRaw ¶
func (c *Client) GetSDRsRaw(ctx context.Context, recordTypes ...types.SDRRecordType) ([]*types.SDR, error)
GetSDRsRaw is like GetSDRs but does not enhance sensor readings. When recordTypes is non-empty, non-matching records are skipped with a header-only Get SDR peek (ipmitool fru print style), avoiding full-body fetches and Get Sensor Reading for unrelated sensors.
func (*Client) GetSDRsStream ¶
func (*Client) GetSELAllocInfo ¶
func (*Client) GetSELEntries ¶
GetSELEntries return all SEL records starting from the specified recordID. Pass 0 means retrieve all SEL entries starting from the first record.
func (*Client) GetSELEntriesStream ¶
func (*Client) GetSELEntry ¶
func (c *Client) GetSELEntry(ctx context.Context, reservationID uint16, recordID uint16) (response *storage.GetSELEntryResponse, err error)
The reservationID is only required for partial Get, use 0000h otherwise.
func (*Client) GetSELInfo ¶
func (*Client) GetSELTime ¶
func (*Client) GetSELTimeUTCOffset ¶
func (c *Client) GetSELTimeUTCOffset(ctx context.Context) (response *storage.GetSELTimeUTCOffsetResponse, err error)
GetSELTimeUTCOffset is used to retrieve the SEL Time UTC Offset (timezone)
func (*Client) GetSOLConfigParam ¶
func (c *Client) GetSOLConfigParam(ctx context.Context, channelNumber uint8, paramSelector types.SOLConfigParamSelector, setSelector, blockSelector uint8) (response *transport.GetSOLConfigParamResponse, err error)
func (*Client) GetSOLConfigParamFor ¶
func (*Client) GetSOLConfigParams ¶
func (*Client) GetSOLConfigParamsFor ¶
func (*Client) GetSelfTestResults ¶
func (*Client) GetSensorByID ¶
GetSensorByID returns the sensor with current reading and status by specified sensor number.
func (*Client) GetSensorByName ¶
GetSensorByName returns the sensor with current reading and status by specified sensor name.
func (*Client) GetSensorEventEnable ¶
func (*Client) GetSensorEventStatus ¶
func (*Client) GetSensorHysteresis ¶
func (c *Client) GetSensorHysteresis(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorHysteresisResponse, err error)
This command retrieves the present hysteresis values for the specified sensor. If the sensor hysteresis values are "fixed", then the hysteresis values can be obtained from the SDR for the sensor.
func (*Client) GetSensorReading ¶
func (*Client) GetSensorReadingFactors ¶
func (c *Client) GetSensorReadingFactors(ctx context.Context, sensorNumber uint8, reading uint8) (response *sensor.GetSensorReadingFactorsResponse, err error)
This command returns the Sensor Reading Factors fields for the specified reading value on the specified sensor.
func (*Client) GetSensorThresholds ¶
func (c *Client) GetSensorThresholds(ctx context.Context, sensorNumber uint8) (response *sensor.GetSensorThresholdsResponse, err error)
This command retrieves the threshold for the given sensor.
func (*Client) GetSensorType ¶
func (*Client) GetSensors ¶
func (c *Client) GetSensors(ctx context.Context, filterOptions ...SensorFilterOption) ([]*types.Sensor, error)
GetSensors retrieves all sensors with their current readings and status.
Filter behavior:
- If no filter options are provided, returns all sensors
- If filter options are provided, returns only sensors that pass ALL filters (logical AND)
- For logical OR filtering, use GetSensorsAny instead
Example usage:
// Get all fan sensors
sensors, err := client.GetSensors(ctx, types.SensorFilterOptionIsSensorType(types.SensorTypeFan))
// Get all temperature sensors with valid readings
sensors, err := client.GetSensors(ctx,
types.SensorFilterOptionIsSensorType(types.SensorTypeTemperature),
types.SensorFilterOptionIsReadingValid)
func (*Client) GetSensorsAny ¶
func (c *Client) GetSensorsAny(ctx context.Context, filterOptions ...SensorFilterOption) ([]*types.Sensor, error)
GetSensorsAny retrieves all sensors with their current readings and status.
Filter behavior:
- If no filter options are provided, returns all sensors
- If filter options are provided, returns sensors that pass ANY of the filters (logical OR)
- For logical AND filtering, use GetSensors instead
Example usage:
// Get sensors that are either temperature or voltage sensors
sensors, err := client.GetSensorsAny(ctx,
types.SensorFilterOptionIsSensorType(types.SensorTypeTemperature),
types.SensorFilterOptionIsSensorType(types.SensorTypeVoltage))
func (*Client) GetSensorsAnyStream ¶
func (c *Client) GetSensorsAnyStream(ctx context.Context, filterOptions ...SensorFilterOption) iter.Seq[*types.Result[types.Sensor]]
GetSensorsAnyStream behaves like GetSensorsAny, but returns an iterator of sensors instead of a slice.
func (*Client) GetSensorsStream ¶
func (c *Client) GetSensorsStream(ctx context.Context, filterOptions ...SensorFilterOption) iter.Seq[*types.Result[types.Sensor]]
GetSensorsStream behaves like GetSensors, but returns an iterator of sensors instead of a slice.
func (*Client) GetSessionChallenge ¶
func (c *Client) GetSessionChallenge(ctx context.Context) (response *app.GetSessionChallengeResponse, err error)
The command selects which of the BMC-supported authentication types the Remote Console would like to use, and a username that selects which set of user information should be used for the session
func (*Client) GetSessionInfo ¶
func (c *Client) GetSessionInfo(ctx context.Context, request *app.GetSessionInfoRequest) (response *app.GetSessionInfoResponse, err error)
func (*Client) GetSupermicroBiosVersion ¶
func (*Client) GetSystemBootOptionsParam ¶
func (c *Client) GetSystemBootOptionsParam(ctx context.Context, paramSelector types.BootOptionParamSelector, setSelector uint8, blockSelector uint8) (response *chassis.GetSystemBootOptionsParamResponse, err error)
func (*Client) GetSystemBootOptionsParamFor ¶
func (*Client) GetSystemBootOptionsParams ¶
GetSystemBootOptionsParams get all parameters of boot options.
func (*Client) GetSystemBootOptionsParamsFor ¶
func (*Client) GetSystemGUID ¶
func (*Client) GetSystemInfo ¶
func (*Client) GetSystemInfoParam ¶
func (c *Client) GetSystemInfoParam(ctx context.Context, paramSelector types.SystemInfoParamSelector, setSelector uint8, blockSelector uint8) (response *app.GetSystemInfoParamResponse, err error)
func (*Client) GetSystemInfoParamFor ¶
func (*Client) GetSystemInfoParams ¶
func (*Client) GetSystemInfoParamsFor ¶
func (*Client) GetSystemInterfaceCapabilities ¶
func (c *Client) GetSystemInterfaceCapabilities(ctx context.Context, interfaceType app.SystemInterfaceType) (response *app.GetSystemInterfaceCapabilitiesResponse, err error)
func (*Client) GetSystemRestartCause ¶
func (*Client) GetUserAccess ¶
func (*Client) GetUserPayloadAccess ¶
func (*Client) GetUsername ¶
func (*Client) GetWatchdogTimer ¶
func (*Client) ManufacturingTestOn ¶
func (c *Client) ManufacturingTestOn(ctx context.Context) (response *app.ManufacturingTestOnResponse, err error)
If the device supports a "manufacturing test mode", this command is reserved to turn that mode on.
func (*Client) MasterWriteRead ¶
func (c *Client) MasterWriteRead(ctx context.Context, request *app.MasterWriteReadRequest) (*app.MasterWriteReadResponse, error)
func (*Client) OpenSession ¶
func (*Client) PETAcknowledge ¶
func (c *Client) PETAcknowledge(ctx context.Context, request *sensor.PETAcknowledgeRequest) (response *sensor.PETAcknowledgeResponse, err error)
func (*Client) ParseRmcpResponse ¶
func (c *Client) ParseRmcpResponse(ctx context.Context, msg []byte, cmd types.Command, response types.Response) error
ParseRmcpResponse parses a raw RMCP response message into the given Response. cmd identifies the request for command-specific completion-code naming.
func (*Client) PlatformEventMessage ¶
func (c *Client) PlatformEventMessage(ctx context.Context, request *sensor.PlatformEventMessageRequest) (response *sensor.PlatformEventMessageResponse, err error)
func (*Client) RAKPMessage1 ¶
func (*Client) RAKPMessage3 ¶
RAKPMessage3 sends RAKP Message 3 and validates RAKP Message 4.
func (*Client) RawCommand ¶
func (*Client) ReadEventMessageBuffer ¶
func (*Client) ReadFRUData ¶
func (c *Client) ReadFRUData(ctx context.Context, fruDeviceID uint8, readOffset uint16, readCount uint8) (response *storage.ReadFRUDataResponse, err error)
The command returns the specified data from the FRU Inventory Info area.
func (*Client) RearmSensorEvents ¶
func (c *Client) RearmSensorEvents(ctx context.Context, request *sensor.RearmSensorEventsRequest) (response *sensor.RearmSensorEventsResponse, err error)
func (*Client) ReserveDeviceSDRRepo ¶
func (*Client) ReserveSDRRepo ¶
func (*Client) ReserveSEL ¶
func (*Client) ResetWatchdogTimer ¶
func (*Client) RmcpPing ¶
func (c *Client) RmcpPing(ctx context.Context) (response *RmcpPingResponse, err error)
func (*Client) SOLActivate ¶
func (c *Client) SOLActivate(ctx context.Context, in io.Reader, out io.Writer, opts *SOLActivateOptions) error
SOLActivate activates the SOL payload and runs an interactive session.
func (*Client) SOLActivating ¶
func (c *Client) SOLActivating(ctx context.Context, request *transport.SOLActivatingRequest) (response *transport.SOLActivatingResponse, err error)
func (*Client) SOLPayload ¶
func (c *Client) SOLPayload(ctx context.Context, request *types.SOLPayloadRequest) (response *types.SOLPayloadResponse, err error)
SOLPayload exchanges a single SOL payload packet over an active RMCP+ session.
func (*Client) SendMessage ¶
func (*Client) SessionPrivilegeLevel ¶
func (c *Client) SessionPrivilegeLevel() types.PrivilegeLevel
func (*Client) SetACPIPowerState ¶
func (c *Client) SetACPIPowerState(ctx context.Context, request *chassis.SetACPIPowerStateRequest) (err error)
This command is provided to allow system software to tell a controller the present ACPI power state of the system.
func (*Client) SetBMCGlobalEnables ¶
func (*Client) SetBootDevice ¶
func (c *Client) SetBootDevice(ctx context.Context, bootDeviceSelector types.BootDeviceSelector, bootType types.BIOSBootType, persist bool) error
SetBootDevice set the boot device for next boot. persist of false means it applies to next boot only. persist of true means this setting is persistent for all future boots.
func (*Client) SetBootParamBootFlags ¶
func (*Client) SetBootParamClearAck ¶
func (*Client) SetBootParamSetInProgress ¶
func (*Client) SetChannelAccess ¶
func (c *Client) SetChannelAccess(ctx context.Context, request *app.SetChannelAccessRequest) (response *app.SetChannelAccessResponse, err error)
func (*Client) SetChannelSecurityKeys ¶
func (c *Client) SetChannelSecurityKeys(ctx context.Context, request *transport.SetChannelSecurityKeysRequest) (response *transport.SetChannelSecurityKeysResponse, err error)
func (*Client) SetChassisCapabilities ¶
func (c *Client) SetChassisCapabilities(ctx context.Context, request *chassis.SetChassisCapabilitiesRequest) (response *chassis.SetChassisCapabilitiesResponse, err error)
func (*Client) SetCommandEnables ¶
func (c *Client) SetCommandEnables(ctx context.Context, request *app.SetCommandEnablesRequest) (response *app.SetCommandEnablesResponse, err error)
func (*Client) SetCommandSubfunctionEnables ¶
func (c *Client) SetCommandSubfunctionEnables(ctx context.Context, request *app.SetCommandSubfunctionEnablesRequest) (response *app.SetCommandSubfunctionEnablesResponse, err error)
func (*Client) SetDCMIAssetTag ¶
func (*Client) SetDCMIAssetTagFull ¶
func (*Client) SetDCMIConfigParam ¶
func (c *Client) SetDCMIConfigParam(ctx context.Context, paramSelector types.DCMIConfigParamSelector, setSelector uint8, paramData []byte) (response *dcmi.SetDCMIConfigParamResponse, err error)
func (*Client) SetDCMIConfigParamFor ¶
func (c *Client) SetDCMIConfigParamFor(ctx context.Context, param types.DCMIConfigParameter) (response *dcmi.SetDCMIConfigParamResponse, err error)
func (*Client) SetDCMIMgmtControllerIdentifier ¶
func (*Client) SetDCMIMgmtControllerIdentifierFull ¶
func (*Client) SetDCMIPowerLimit ¶
func (c *Client) SetDCMIPowerLimit(ctx context.Context, request *dcmi.SetDCMIPowerLimitRequest) (response *dcmi.SetDCMIPowerLimitResponse, err error)
SetDCMIPowerLimit sends a DCMI "Set Power Limit" command.
func (*Client) SetDCMIThermalLimit ¶
func (c *Client) SetDCMIThermalLimit(ctx context.Context, request *dcmi.SetDCMIThermalLimitRequest) (response *dcmi.SetDCMIThermalLimitResponse, err error)
func (*Client) SetEventReceiver ¶
func (*Client) SetEventReceiverDisable ¶
func (*Client) SetFrontPanelEnables ¶
func (c *Client) SetFrontPanelEnables(ctx context.Context, disableSleepButton bool, disableDiagnosticButton bool, disableResetButton bool, disablePoweroffButton bool) (response *chassis.SetFrontPanelEnablesResponse, err error)
The following command is used to enable or disable the buttons on the front panel of the chassis.
func (*Client) SetLanConfigParam ¶
func (c *Client) SetLanConfigParam(ctx context.Context, channelNumber uint8, paramSelector types.LanConfigParamSelector, configData []byte) (response *transport.SetLanConfigParamResponse, err error)
func (*Client) SetLanConfigParamFor ¶
func (*Client) SetLastProcessedEventId ¶
func (*Client) SetPEFConfigParam ¶
func (c *Client) SetPEFConfigParam(ctx context.Context, paramSelector types.PEFConfigParamSelector, paramData []byte) (response *sensor.SetPEFConfigParamResponse, err error)
func (*Client) SetPowerCycleInterval ¶
func (*Client) SetPowerRestorePolicy ¶
func (c *Client) SetPowerRestorePolicy(ctx context.Context, policy chassis.PowerRestorePolicy) (response *chassis.SetPowerRestorePolicyResponse, err error)
func (*Client) SetSELTime ¶
func (*Client) SetSELTimeUTCOffset ¶
func (c *Client) SetSELTimeUTCOffset(ctx context.Context, minutesOffset int16) (response *storage.SetSELTimeUTCOffsetResponse, err error)
SetSELTimeUTCOffset sets the UTC offset (timezone) associated with SEL Time.
func (*Client) SetSOLConfigParam ¶
func (c *Client) SetSOLConfigParam(ctx context.Context, channelNumber uint8, paramSelector types.SOLConfigParamSelector, paramData []byte) (response *transport.SetSOLConfigParamResponse, err error)
func (*Client) SetSOLConfigParamFor ¶
func (*Client) SetSensorEventEnable ¶
func (c *Client) SetSensorEventEnable(ctx context.Context, request *sensor.SetSensorEventEnableRequest) (response *sensor.SetSensorEventEnableResponse, err error)
func (*Client) SetSensorHysteresis ¶
func (c *Client) SetSensorHysteresis(ctx context.Context, sensorNumber uint8, positiveHysteresis uint8, negativeHysteresis uint8) (response *sensor.SetSensorHysteresisResponse, err error)
This command provides a mechanism for setting the hysteresis values associated with the thresholds of a sensor that has threshold based event generation.
func (*Client) SetSensorReadingAndEventStatus ¶
func (c *Client) SetSensorReadingAndEventStatus(ctx context.Context, request *sensor.SetSensorReadingAndEventStatusRequest) (response *sensor.SetSensorReadingAndEventStatusResponse, err error)
func (*Client) SetSensorThresholds ¶
func (c *Client) SetSensorThresholds(ctx context.Context, request *sensor.SetSensorThresholdsRequest) (response *sensor.SetSensorThresholdsResponse, err error)
func (*Client) SetSensorType ¶
func (c *Client) SetSensorType(ctx context.Context, sensorNumber uint8, sensorType types.SensorType, eventReadingType types.EventReadingType) (response *sensor.SetSensorTypeResponse, err error)
func (*Client) SetSessionPrivilegeLevel ¶
func (c *Client) SetSessionPrivilegeLevel(ctx context.Context, privilegeLevel types.PrivilegeLevel) (response *app.SetSessionPrivilegeLevelResponse, err error)
func (*Client) SetSystemBootOptionsParam ¶
func (c *Client) SetSystemBootOptionsParam(ctx context.Context, request *chassis.SetSystemBootOptionsParamRequest) (response *chassis.SetSystemBootOptionsParamResponse, err error)
This command is used to set parameters that direct the system boot following a system power up or reset. The boot flags only apply for one system restart. It is the responsibility of the system BIOS to read these settings from the BMC and then clear the boot flags
func (*Client) SetSystemBootOptionsParamFor ¶
func (*Client) SetSystemInfoParam ¶
func (c *Client) SetSystemInfoParam(ctx context.Context, paramSelector types.SystemInfoParamSelector, paramData []byte) (response *app.SetSystemInfoParamResponse, err error)
func (*Client) SetSystemInfoParamFor ¶
func (*Client) SetUserAccess ¶
func (c *Client) SetUserAccess(ctx context.Context, request *app.SetUserAccessRequest) (response *app.SetUserAccessResponse, err error)
func (*Client) SetUserPassword ¶
func (*Client) SetUserPayloadAccess ¶
func (c *Client) SetUserPayloadAccess(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8) (response *app.SetUserPayloadAccessResponse, err error)
func (*Client) SetUsername ¶
func (*Client) SetWatchdogTimer ¶
func (*Client) SuspendARPs ¶
func (*Client) SuspendResumePayloadEncryption ¶
func (c *Client) SuspendResumePayloadEncryption(ctx context.Context, payloadType types.PayloadType, payloadInstance uint8, operation transport.PayloadEncryptionOperation) (response *transport.SuspendResumePayloadEncryptionResponse, err error)
func (*Client) TestUserPassword ¶
func (*Client) ValidateRAKP2 ¶
ValidateRAKP2 validates RAKP Message 2 returned by BMC.
func (*Client) ValidateRAKP4 ¶
func (*Client) WithBufferSize ¶
func (*Client) WithCipherSuiteID ¶
func (c *Client) WithCipherSuiteID(cipherSuiteID ...types.CipherSuiteID) *Client
WithCipherSuiteID sets one or more custom cipher suite which is used during OpenSession command. It is only valid for client with IPMI lanplus interface. For the custom cipherSuiteID to take effect, you must call WithCipherSuiteID before calling Connect method.
func (*Client) WithInterface ¶
func (*Client) WithMaxPrivilegeLevel ¶
func (c *Client) WithMaxPrivilegeLevel(privilegeLevel types.PrivilegeLevel) *Client
WithMaxPrivilegeLevel sets a specified session privilege level to use.
func (*Client) WithOpenBackend ¶
WithOpenBackend selects the Windows Open Interface transport. Accepted values: "" / OpenBackendAuto (default; native COM with PowerShell fallback), OpenBackendCOM, OpenBackendPowerShell. No-op on non-Windows platforms. Must be called before Connect.
func (*Client) WithRequesterAddr ¶
func (*Client) WithResponderAddr ¶
type CommandContext ¶
type CommandContext struct {
// contains filtered or unexported fields
}
CommandContext represents the specific context used for IPMI command exchanges. It stores addressing information needed for certain IPMI commands, particularly sensor-related operations.
The context contains: - responderAddr: The address of the responding device (e.g., BMC) - responderLUN: The Logical Unit Number of the responding device - requesterAddr: The address of the requesting device - requesterLUN: The Logical Unit Number of the requesting device
This context is essential for commands that require specific addressing information, such as GetSensorReading and other sensor-related operations.
func GetCommandContext ¶
func GetCommandContext(ctx context.Context) *CommandContext
GetCommandContext retrieves the CommandContext from the provided context.Context.
func (*CommandContext) WithRequesterAddr ¶
func (cmdCtx *CommandContext) WithRequesterAddr(requesterAddr uint8) *CommandContext
func (*CommandContext) WithRequesterLUN ¶
func (cmdCtx *CommandContext) WithRequesterLUN(requesterLUN uint8) *CommandContext
func (*CommandContext) WithResponderAddr ¶
func (cmdCtx *CommandContext) WithResponderAddr(responderAddr uint8) *CommandContext
func (*CommandContext) WithResponderLUN ¶
func (cmdCtx *CommandContext) WithResponderLUN(responderLUN uint8) *CommandContext
type CommandRawRequest ¶
func (*CommandRawRequest) Command ¶
func (req *CommandRawRequest) Command() types.Command
func (*CommandRawRequest) Pack ¶
func (req *CommandRawRequest) Pack() []byte
type CommandRawResponse ¶
type CommandRawResponse struct {
Response []byte
}
func (*CommandRawResponse) Format ¶
func (res *CommandRawResponse) Format() string
func (*CommandRawResponse) Unpack ¶
func (res *CommandRawResponse) Unpack(msg []byte) error
type RmcpPingRequest ¶
type RmcpPingRequest struct {
}
13.2.3 RMCP/ASF Presence Ping Message
func (*RmcpPingRequest) Command ¶
func (req *RmcpPingRequest) Command() types.Command
func (*RmcpPingRequest) Pack ¶
func (req *RmcpPingRequest) Pack() []byte
type RmcpPingResponse ¶
type RmcpPingResponse struct {
// If no OEM-specific capabilities exist, this field contains the ASF IANA (4542) and the OEM-defined field is set to all zeroes (00000000h). Otherwise, this field contains the OEM's IANA Enterprise Number and the OEM-defined field contains the OEM-specific capabilities.
OEMIANA uint32
// Not used for IPMI.
// This field can contain OEM-defined values; the definition of these values is left to the manufacturer identified by the preceding IANA Enterprise number.
OEMDefined uint32
IPMISupported bool
ASFVersion uint8
RMCPSecurityExtensionsSupported bool
DMTFDashSupported bool
// Reserved for future definition by ASF specification,
// set to 00 00 00 00 00 00h, six bytes
Reserved []byte
}
func (*RmcpPingResponse) Format ¶
func (res *RmcpPingResponse) Format() string
func (*RmcpPingResponse) Unpack ¶
func (res *RmcpPingResponse) Unpack(msg []byte) error
type SOLActivateOptions ¶
type SOLActivateOptions struct {
// PayloadInstance is the SOL payload instance (1–0x3f). Zero means use default 1.
PayloadInstance uint8
// PollInterval is how often to send an empty SOL packet to poll for inbound data.
// Zero selects a default (100ms).
PollInterval time.Duration
// OnActivated is called once after Activate Payload (SOL) succeeds and before the session loop.
OnActivated func(payloadInstance uint8, in io.Reader, out io.Writer, res *transport.ActivatePayloadResponse)
// OnDeactivated is called once after the session loop ends.
OnDeactivated func(payloadInstance uint8, in io.Reader, out io.Writer, res *transport.ActivatePayloadResponse)
}
SOLActivateOptions configures Client.SOLActivate.
type SensorFilterOption ¶
type UDPClient ¶
type UDPClient struct {
// Target Host
Host string
// Target Port
Port int
// contains filtered or unexported fields
}
UDPClient exposes some common methods for communicating with UDP target addr.
func NewUDPClient ¶
func (*UDPClient) Exchange ¶
Exchange performs a synchronous UDP query. It sends the request, and waits for a reply. Exchange does not retry a failed query. The sent content is read from reader.
func (*UDPClient) ExchangeUntilMatch ¶
func (c *UDPClient) ExchangeUntilMatch(ctx context.Context, reader io.Reader, match func(recv []byte) (ok bool, err error)) ([]byte, error)
ExchangeUntilMatch sends the payload read from reader as a single UDP datagram, then reads repeatedly until match returns true for some received datagram, or until the overall deadline elapses (the same deadline rules as Exchange: min of context deadline and client timeout). Datagrams for which match returns (false, nil) are discarded and reading continues.
Unlike Exchange, which returns the first datagram unconditionally, ExchangeUntilMatch filters inbound traffic: stray packets, unrelated replies, or multiplexed traffic on the same socket can be skipped by returning (false, nil) from match. If the deadline passes with no matching datagram, the returned error indicates that no datagram satisfied match before the deadline.
If match returns a non-nil error, that error is returned immediately. When match returns (true, nil), the corresponding datagram's payload is returned.
func (*UDPClient) LocalIPPort ¶
func (*UDPClient) SetBufferSize ¶
Source Files
¶
- api_app.go
- api_chassis.go
- api_dcmi.go
- api_oem.go
- api_sensor.go
- api_storage.go
- api_transport.go
- client.go
- client_auth_code.go
- client_command_context.go
- cmd_get_frus.go
- cmd_get_sensors.go
- cmd_open_session.go
- cmd_rakp_message_1_2.go
- cmd_rakp_message_3_4.go
- cmd_raw.go
- cmd_rmcp_ping_request.go
- cmd_sol_activate.go
- errors.go
- helpers.go
- interface_lan.go
- interface_system.go
- interface_system_linux.go
- interface_tool.go
- session_crypto_client.go
- transport_methods.go
- udpclient.go