smbios

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadStructures

func ReadStructures() (*EntryPoint, []*Structure, error)

ReadStructures 读取smbios结构数据

func U16

func U16(data []byte) uint16

U16 bytes to uint16

func U32

func U32(data []byte) uint32

U32 bytes to uint32

func U64

func U64(data []byte) uint64

U64 bytes to uint64

Types

type EntryPoint added in v0.1.4

type EntryPoint struct {
	Address  int `json:"address,omitempty"`
	Size     int `json:"size,omitempty"`
	Major    int `json:"major,omitempty"`
	Minor    int `json:"minor,omitempty"`
	Revision int `json:"revision,omitempty"`
}

EntryPoint EPS

func NewEntryPoint added in v0.1.4

func NewEntryPoint(major, minor, rev, addr, size int) *EntryPoint

NewEntryPoint todo

type Header struct {
	Type   uint8
	Length uint8
	Handle uint16
}

A Header is a Structure's header.

func (*Header) String added in v0.1.3

func (h *Header) String() string

type Structure

type Structure struct {
	Header    Header
	Formatted []byte
	Strings   []string
	// contains filtered or unexported fields
}

A Structure is an SMBIOS structure.

func (*Structure) DataLength added in v0.1.3

func (s *Structure) DataLength() int

DataLength data长度

func (*Structure) FormattedCount

func (s *Structure) FormattedCount() int

FormattedCount 格式化数据队列长度, 避免索引出界

func (*Structure) GetByte added in v0.1.4

func (s *Structure) GetByte(index int) byte

GetByte todo

func (*Structure) GetBytes added in v0.1.4

func (s *Structure) GetBytes(start, end int) []byte

GetBytes todo

func (*Structure) GetString

func (s *Structure) GetString(offset int) string

GetString todo

func (*Structure) IsOverFlow added in v0.1.3

func (s *Structure) IsOverFlow(index int) bool

IsOverFlow 判断是否越界

func (*Structure) String added in v0.1.3

func (s *Structure) String() string

func (*Structure) Type added in v0.1.3

func (s *Structure) Type() uint8

Type 协议Header

func (*Structure) U16 added in v0.1.4

func (s *Structure) U16(start, end int) uint16

U16 todo

func (*Structure) U32 added in v0.1.4

func (s *Structure) U32(start, end int) uint32

U32 todo

func (*Structure) U64 added in v0.1.4

func (s *Structure) U64(start, end int) uint64

U64 todo

type StructureType

type StructureType byte

StructureType Structure definition type

const (
	BIOS StructureType = iota
	System
	BaseBoard
	Chassis
	Processor
	Controller
	Module
	Cache
	PortConnector
	SystemSlots
	OnBoardDevices
	OEMStrings
	SystemConfigurationOptions
	BIOSLanguage
	GroupAssociations
	SystemEventLog
	PhysicalMemoryArray
	MemoryDevice
	Bit32MemoryError
	MemoryArrayMappedAddress
	MemoryDeviceMappedAddress
	BuiltInPointingDevice
	PortableBattery
	SystemReset
	HardwareSecurity
	SystemPowerControls
	VoltageProbe
	CoolingDevice
	TemperatureProbe
	ElectricalCurrentProbe
	OutOfBandRemoteAccess
	BootIntegrityServices
	SystemBoot
	Bit64MemoryError
	ManagementDevice
	ManagementDeviceComponent
	ManagementDeviceThresholdData
	MemoryChannel
	IPMIDevice
	PowerSupply
	AdditionalInformation
	OnBoardDevicesExtendedInformation
	ManagementControllerHostInterface               /*42*/
	Inactive                          StructureType = 126
	EndOfTable                        StructureType = 127
)

func (StructureType) String

func (b StructureType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL