pci

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *idsdb.DB
View Source
var ErrDeviceNotFound = errors.New("PCI device not found")

Functions

This section is empty.

Types

type Address

type Address struct {
	Domain   uint16
	Bus      uint8
	Device   uint8
	Function uint8
}

func AddressFromHex

func AddressFromHex(s string) (*Address, error)

func (*Address) Prefix

func (a *Address) Prefix() string

func (*Address) String

func (a *Address) String() string

type Device

type Device struct {
	// contains filtered or unexported fields
}

func DeviceList

func DeviceList() ([]*Device, error)

func LookupDevice

func LookupDevice(hexaddr string) (*Device, error)

func (*Device) AddrBus

func (d *Device) AddrBus() uint8

func (*Device) AddrDevice

func (d *Device) AddrDevice() uint8

func (*Device) AddrDomain

func (d *Device) AddrDomain() uint16

func (*Device) AddrFunction

func (d *Device) AddrFunction() uint8

func (*Device) AssignDriver

func (d *Device) AssignDriver(n string) error

func (*Device) Class

func (d *Device) Class() uint32

func (*Device) ClassHex

func (d *Device) ClassHex() string

func (*Device) ClassName

func (d *Device) ClassName() string

func (*Device) CurrentDriver

func (d *Device) CurrentDriver() string

func (*Device) Device

func (d *Device) Device() uint16

func (*Device) DeviceHex

func (d *Device) DeviceHex() string

func (*Device) DeviceName

func (d *Device) DeviceName() string

func (*Device) Enabled

func (d *Device) Enabled() bool

func (*Device) FullPath

func (d *Device) FullPath() string

func (*Device) HasMultifunctionFeature

func (d *Device) HasMultifunctionFeature() bool

func (*Device) Parent

func (d *Device) Parent() *Device

func (*Device) String

func (d *Device) String() string

func (*Device) SubclassName

func (d *Device) SubclassName() string

func (*Device) Subdevices

func (d *Device) Subdevices() []*Device

func (*Device) UnbindDriver

func (d *Device) UnbindDriver() error

func (*Device) Vendor

func (d *Device) Vendor() uint16

func (*Device) VendorHex

func (d *Device) VendorHex() string

func (*Device) VendorName

func (d *Device) VendorName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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