network

package
v1.6.2-0...-3fc5278 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The functions will be mocked during the testing
	ReadFile           = utils.ReadFileNoLinks
	ReadDir            = os.ReadDir
	Readlink           = os.Readlink
	Stat               = os.Stat
	Glob               = filepath.Glob
	CollectEthtoolData = tool.CollectEthtoolData
)
View Source
var NETROOT string = filepath.Join("/sys", "class", "net")

Functions

This section is empty.

Types

type IPAddress

type IPAddress struct {
	IpAddress   string
	NetPrefBits int32
	ConfigMode  proto.ConfigMode
}

type Network

type Network struct {
	Name                string
	PciID               string
	Mac                 string
	LinkState           bool
	CurrentSpeed        uint64
	CurrentDuplex       string
	SupportedLinkMode   []string
	AdvertisingLinkMode []string
	Features            []string
	SriovEnabled        bool
	SriovNumVfs         uint32
	SriovVfsTotal       uint32
	PeerName            string
	PeerDescription     string
	PeerMac             string
	PeerManagementIP    string
	PeerPort            string
	IpAddresses         []*IPAddress
	Mtu                 uint32
	BmcNet              bool
}

func GetNICList

func GetNICList(executor hda_utils.CmdExecutor) ([]*Network, proto.BmInfo_BmType, string, error)

Jump to

Keyboard shortcuts

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