pciaddr

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 4 Imported by: 0

Documentation

Overview

Package pciaddr parses and validates PCI addresses.

Index

Constants

This section is empty.

Variables

View Source
var ErrPCIAddress = errors.New("bad PCI address")

ErrPCIAddress indicates the input PCI address is invalid.

Functions

This section is empty.

Types

type PCIAddress

type PCIAddress struct {
	Domain   uint16
	Bus      uint8
	Slot     uint8
	Function uint8
}

PCIAddress represents a PCI address.

func MustParse

func MustParse(input string) (a PCIAddress)

MustParse parses a PCI string. Panics on failure.

func Parse

func Parse(input string) (a PCIAddress, e error)

Parse parses a PCI address.

func (PCIAddress) MarshalText

func (a PCIAddress) MarshalText() (text []byte, e error)

MarshalText implements encoding.TextMarshaler interface.

func (PCIAddress) String

func (a PCIAddress) String() string

String returns the PCI address in 0000:00:01.0 format.

func (*PCIAddress) UnmarshalText

func (a *PCIAddress) UnmarshalText(text []byte) (e error)

UnmarshalText implements encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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