Documentation ¶
Index ¶
- Constants
- func AnyInterface(ifaces []Interface, predicate func(Interface) bool) bool
- func DefaultDestinationRoute(family int) *net.IPNet
- func WithAdapter(adapter adapter) option
- type Ethtool
- type Feature
- type IP
- type IPAddress
- type IfaceMetadata
- type Interface
- type LinuxIfaceStack
- type LinuxStack
- type LinuxStackIP4
- type LinuxStackIP6
- type NMState
- type Route
- type Routes
- type Spec
- type Status
- type TapDevice
Constants ¶
View Source
const ( TypeVETH = "veth" TypeBridge = "bridge" TypeDummy = "dummy" TypeTap = "tap" )
View Source
const ( IfaceStateUnknown = "unknown" IfaceStateUp = "up" IfaceStateDown = "down" IfaceStateAbsent = "absent" )
Variables ¶
This section is empty.
Functions ¶
func DefaultDestinationRoute ¶
func WithAdapter ¶
func WithAdapter(adapter adapter) option
Types ¶
type IfaceMetadata ¶
type IfaceMetadata struct { // Pid refers to the process ID of the virt-launcher. Pid int // NetworkName refers to the logical network interface name which is associated with the interface spec. NetworkName string }
IfaceMetadata includes extra data which is piggyback on the nmstate object. Users of the nmstate object can use it to store data and use it in some scenarios (e.g. creating the tap device).
type Interface ¶
type Interface struct { Name string `json:"name"` Index int `json:"index,omitempty"` TypeName string `json:"type,omitempty"` State string `json:"state,omitempty"` MacAddress string `json:"mac-address,omitempty"` CopyMacFrom string `json:"copy-mac-from,omitempty"` MTU int `json:"mtu,omitempty"` Controller string `json:"controller,omitempty"` Ethtool Ethtool `json:"ethtool,omitempty"` Tap *TapDevice `json:"tap,omitempty"` IPv4 IP `json:"IPv4,omitempty"` IPv6 IP `json:"IPv6,omitempty"` LinuxStack LinuxIfaceStack `json:"linux-stack,omitempty"` Metadata *IfaceMetadata }
type LinuxIfaceStack ¶
type LinuxStack ¶
type LinuxStack struct { IPv4 LinuxStackIP4 `json:"ipv4,omitempty"` IPv6 LinuxStackIP6 `json:"ipv6,omitempty"` }
type LinuxStackIP4 ¶
type LinuxStackIP4 struct { ArpIgnore *procsys.ArpReplyMode `json:"arp-ignore,omitempty"` Forwarding *bool `json:"forwarding,omitempty"` PingGroupRange []int `json:"ping-group-range,omitempty"` UnprivilegedPortStart *int `json:"unprivileged-port-start,omitempty"` }
type LinuxStackIP6 ¶
type LinuxStackIP6 struct {
Forwarding *bool `json:"forwarding,omitempty"`
}
type Spec ¶
type Spec struct { Interfaces []Interface `json:"interfaces,omitempty"` LinuxStack LinuxStack `json:"linux-stack,omitempty"` }
type Status ¶
type Status struct { Interfaces []Interface `json:"interfaces"` Routes Routes `json:"routes"` LinuxStack LinuxStack `json:"linux-stack,omitempty"` }
Click to show internal directories.
Click to hide internal directories.