Documentation ¶
Index ¶
- Constants
- func DeleteVDPADevice(vDPADevName string) error
- type Action
- type ActionPolice
- type Addr
- type Bridge
- type Class
- type ClassHTB
- type Dummy
- type Filter
- type Gretap
- type Link
- func (l *Link) BridgeLinkSetHairpin(hairpin bool) error
- func (l *Link) BridgeLinkSetIsolated(isolated bool) error
- func (l *Link) BridgeVLANAdd(vid string, pvid bool, untagged bool, self bool) error
- func (l *Link) BridgeVLANDelete(vid string, self bool) error
- func (l *Link) Delete() error
- func (l *Link) GetVFInfo(vfID int) (VirtFuncInfo, error)
- func (l *Link) SetAddress(address net.HardwareAddr) error
- func (l *Link) SetAllMulticast(enabled bool) error
- func (l *Link) SetDown() error
- func (l *Link) SetMTU(mtu uint32) error
- func (l *Link) SetMaster(master string) error
- func (l *Link) SetName(newName string) error
- func (l *Link) SetNetns(netns string) error
- func (l *Link) SetNoMaster() error
- func (l *Link) SetTXQueueLength(queueLength uint32) error
- func (l *Link) SetUp() error
- func (l *Link) SetVfAddress(vf string, address string) error
- func (l *Link) SetVfSpoofchk(vf string, mode string) error
- func (l *Link) SetVfVlan(vf string, vlan string) error
- type LinkInfo
- type Macvlan
- type Macvtap
- type MgmtVDPADev
- type Neigh
- type NeighProxy
- type NeighbourIPState
- type Qdisc
- type QdiscHTB
- type Route
- type Tuntap
- type U32Filter
- type VDPADev
- type Veth
- type VhostVDPA
- type VirtFuncInfo
- type Vlan
- type Vxlan
Constants ¶
const FamilyV4 = "-4"
FamilyV4 represents IPv4 protocol family.
const FamilyV6 = "-6"
FamilyV6 represents IPv6 protocol family.
const NeighbourIPStateDelay = "DELAY"
NeighbourIPStateDelay neighbor entry validation is currently delayed.
const NeighbourIPStateFailed = "FAILED"
NeighbourIPStateFailed max number of probes exceeded without success, neighbor validation has ultimately failed.
const NeighbourIPStateIncomplete = "INCOMPLETE"
NeighbourIPStateIncomplete the neighbour entry has not (yet) been validated/resolved.
const NeighbourIPStateNoARP = "NOARP"
NeighbourIPStateNoARP the neighbour entry is valid. No attempts to validate this entry will be made but it can be removed when its lifetime expires.
const NeighbourIPStateNone = "NONE"
NeighbourIPStateNone this is a pseudo state used when initially creating a neighbour entry or after trying to remove it before it becomes free to do so.
const NeighbourIPStatePermanent = "PERMANENT"
NeighbourIPStatePermanent the neighbour entry is valid forever and can be only be removed administratively.
const NeighbourIPStateProbe = "PROBE"
NeighbourIPStateProbe neighbor is being probed.
const NeighbourIPStateReachable = "REACHABLE"
NeighbourIPStateReachable the neighbour entry is valid until the reachability timeout expires.
const NeighbourIPStateStale = "STALE"
NeighbourIPStateStale the neighbour entry is valid but suspicious.
Variables ¶
This section is empty.
Functions ¶
func DeleteVDPADevice ¶
DeleteVDPADevice deletes a vDPA management device.
Types ¶
type ActionPolice ¶
ActionPolice represents an action of 'police' type.
func (*ActionPolice) AddAction ¶
func (a *ActionPolice) AddAction() []string
AddAction generates a part of command specific for 'police' action.
type Bridge ¶
type Bridge struct {
Link
}
Bridge represents arguments for link device of type bridge.
type Link ¶
type Link struct { Name string MTU uint32 Parent string Address net.HardwareAddr TXQueueLength uint32 AllMutlicast bool Master string Up bool }
Link represents base arguments for link device.
func (*Link) BridgeLinkSetHairpin ¶
BridgeLinkSetHairpin sets bridge 'hairpin' attribute on a port.
func (*Link) BridgeLinkSetIsolated ¶
BridgeLinkSetIsolated sets bridge 'isolated' attribute on a port.
func (*Link) BridgeVLANAdd ¶
BridgeVLANAdd adds a new vlan filter entry.
func (*Link) BridgeVLANDelete ¶
BridgeVLANDelete removes an existing vlan filter entry.
func (*Link) GetVFInfo ¶
func (l *Link) GetVFInfo(vfID int) (VirtFuncInfo, error)
GetVFInfo returns info about virtual function.
func (*Link) SetAddress ¶
func (l *Link) SetAddress(address net.HardwareAddr) error
SetAddress sets the address of the link device.
func (*Link) SetAllMulticast ¶
SetAllMulticast when enabled instructs network driver to retrieve all multicast packets from the network to the kernel for further processing.
func (*Link) SetNoMaster ¶
SetNoMaster removes the master of the link device.
func (*Link) SetTXQueueLength ¶
SetTXQueueLength sets the txqueuelen of the link device.
func (*Link) SetVfAddress ¶
SetVfAddress changes the address for the specified vf.
func (*Link) SetVfSpoofchk ¶
SetVfSpoofchk turns packet spoof checking on or off for the specified VF.
type LinkInfo ¶
type LinkInfo struct { InterfaceName string `json:"ifname"` Link string `json:"link"` Master string `json:"master"` Address string `json:"address"` TXQueueLength uint32 `json:"txqlen"` MTU uint32 `json:"mtu"` OperationalState string `json:"operstate"` Info struct { Kind string `json:"info_kind"` SlaveKind string `json:"info_slave_kind"` Data struct { Protocol string `json:"protocol"` ID int `json:"id"` } `json:"info_data"` } `json:"linkinfo"` }
LinkInfo represents the IP link details.
func GetLinkInfoByName ¶
GetLinkInfoByName returns the detailed information for the given link.
type Macvtap ¶
type Macvtap struct {
Macvlan
}
Macvtap represents arguments for link of type macvtap.
type MgmtVDPADev ¶
MgmtVDPADev represents the vDPA management device information.
func ListVDPAMgmtDevices ¶
func ListVDPAMgmtDevices() ([]*MgmtVDPADev, error)
ListVDPAMgmtDevices returns the list of all vDPA management devices.
type Neigh ¶
type Neigh struct { DevName string Addr net.IP MAC net.HardwareAddr State NeighbourIPState }
Neigh represents arguments for neighbour manipulation.
type NeighProxy ¶
NeighProxy represents arguments for neighbour proxy manipulation.
func (*NeighProxy) Show ¶
func (n *NeighProxy) Show() ([]NeighProxy, error)
Show list neighbour proxy entries.
type NeighbourIPState ¶
type NeighbourIPState string
NeighbourIPState can be { PERMANENT | NOARP | REACHABLE | STALE | NONE | INCOMPLETE | DELAY | PROBE | FAILED }.
type Route ¶
type Route struct { DevName string Route string Table string Src string Proto string Family string Via string }
Route represents arguments for route manipulation.
type VDPADev ¶
type VDPADev struct { // Name of the vDPA created device. e.g. "vdpa0" (note: the iproute2 associated command would look like `vdpa dev add mgmtdev pci/<PCI_SLOT_NAME> name vdpa0 max_vqp <MAX_VQP>`). Name string // Max VQs supported by the vDPA device. MaxVQs uint32 // Associated vDPA management device. MgmtDev *MgmtVDPADev // Associated vhost-vdpa device. VhostVDPA *VhostVDPA }
VDPADev represents the vDPA device information.
func AddVDPADevice ¶
AddVDPADevice adds a new vDPA device.
func ListVDPADevices ¶
ListVDPADevices returns the list of all vDPA devices.
type VirtFuncInfo ¶
type VirtFuncInfo struct { VF int `json:"vf"` Address string `json:"address"` MAC string `json:"mac"` // Deprecated VLANs []map[string]int `json:"vlan_list"` SpoofCheck bool `json:"spoofchk"` }
VirtFuncInfo holds information about vf.