Documentation ¶
Overview ¶
Package nethelpers provides types and type wrappers to support network resources.
Index ¶
- Constants
- func ADSelectStrings() []string
- func ARPAllTargetsStrings() []string
- func ARPValidateStrings() []string
- func AddressFlagStrings() []string
- func AddressSortAlgorithmStrings() []string
- func BondModeStrings() []string
- func BondXmitHashPolicyStrings() []string
- func ConntrackStateStrings() []string
- func DefaultActionStrings() []string
- func DuplexStrings() []string
- func FailOverMACStrings() []string
- func FamilyStrings() []string
- func JoinHostPort[T ints](host string, port T) string
- func LACPRateStrings() []string
- func LinkFlagStrings() []string
- func LinkTypeStrings() []string
- func MatchOperatorStrings() []string
- func NfTablesChainHookStrings() []string
- func NfTablesChainPriorityStrings() []string
- func NfTablesVerdictStrings() []string
- func OperationalStateStrings() []string
- func PortStrings() []string
- func PrimaryReselectStrings() []string
- func ProtocolStrings() []string
- func RouteFlagStrings() []string
- func RouteProtocolStrings() []string
- func RouteTypeStrings() []string
- func RoutingTableStrings() []string
- func ScopeStrings() []string
- func StatusStrings() []string
- func VLANLinkName(base string, vlanID uint16) string
- func VLANProtocolStrings() []string
- type ADSelect
- type ARPAllTargets
- type ARPValidate
- type AddressFlag
- type AddressFlags
- type AddressSortAlgorithm
- type BondMode
- type BondXmitHashPolicy
- type ConntrackState
- type DefaultAction
- type DeviceInfo
- type Duplex
- type FailOverMAC
- type Family
- type HardwareAddr
- type LACPRate
- type LinkFlag
- type LinkFlags
- type LinkType
- type MatchOperator
- type NfTablesChainHook
- type NfTablesChainPriority
- type NfTablesChainType
- type NfTablesVerdict
- type OperationalState
- type Port
- type PrimaryReselect
- type Protocol
- type RouteFlag
- type RouteFlags
- type RouteProtocol
- type RouteType
- type RoutingTable
- type Scope
- type Status
- type VLANProtocol
Constants ¶
const RouteFlagsMask = RouteNotify | RouteCloned | RouteEqualize | RoutePrefix
RouteFlagsMask is a supported set of flags to manage.
Variables ¶
This section is empty.
Functions ¶
func ADSelectStrings ¶ added in v1.7.0
func ADSelectStrings() []string
ADSelectStrings returns a slice of all String values of the enum
func ARPAllTargetsStrings ¶ added in v1.7.0
func ARPAllTargetsStrings() []string
ARPAllTargetsStrings returns a slice of all String values of the enum
func ARPValidateStrings ¶ added in v1.7.0
func ARPValidateStrings() []string
ARPValidateStrings returns a slice of all String values of the enum
func AddressFlagStrings ¶ added in v1.7.0
func AddressFlagStrings() []string
AddressFlagStrings returns a slice of all String values of the enum
func AddressSortAlgorithmStrings ¶ added in v1.9.0
func AddressSortAlgorithmStrings() []string
AddressSortAlgorithmStrings returns a slice of all String values of the enum
func BondModeStrings ¶ added in v1.7.0
func BondModeStrings() []string
BondModeStrings returns a slice of all String values of the enum
func BondXmitHashPolicyStrings ¶ added in v1.7.0
func BondXmitHashPolicyStrings() []string
BondXmitHashPolicyStrings returns a slice of all String values of the enum
func ConntrackStateStrings ¶ added in v1.7.0
func ConntrackStateStrings() []string
ConntrackStateStrings returns a slice of all String values of the enum
func DefaultActionStrings ¶ added in v1.7.0
func DefaultActionStrings() []string
DefaultActionStrings returns a slice of all String values of the enum
func DuplexStrings ¶ added in v1.7.0
func DuplexStrings() []string
DuplexStrings returns a slice of all String values of the enum
func FailOverMACStrings ¶ added in v1.7.0
func FailOverMACStrings() []string
FailOverMACStrings returns a slice of all String values of the enum
func FamilyStrings ¶ added in v1.7.0
func FamilyStrings() []string
FamilyStrings returns a slice of all String values of the enum
func JoinHostPort ¶
JoinHostPort is a wrapper around net.JoinHostPort which accepts port any integer type.
func LACPRateStrings ¶ added in v1.7.0
func LACPRateStrings() []string
LACPRateStrings returns a slice of all String values of the enum
func LinkFlagStrings ¶ added in v1.7.0
func LinkFlagStrings() []string
LinkFlagStrings returns a slice of all String values of the enum
func LinkTypeStrings ¶ added in v1.7.0
func LinkTypeStrings() []string
LinkTypeStrings returns a slice of all String values of the enum
func MatchOperatorStrings ¶ added in v1.7.0
func MatchOperatorStrings() []string
MatchOperatorStrings returns a slice of all String values of the enum
func NfTablesChainHookStrings ¶ added in v1.7.0
func NfTablesChainHookStrings() []string
NfTablesChainHookStrings returns a slice of all String values of the enum
func NfTablesChainPriorityStrings ¶ added in v1.7.0
func NfTablesChainPriorityStrings() []string
NfTablesChainPriorityStrings returns a slice of all String values of the enum
func NfTablesVerdictStrings ¶ added in v1.7.0
func NfTablesVerdictStrings() []string
NfTablesVerdictStrings returns a slice of all String values of the enum
func OperationalStateStrings ¶ added in v1.7.0
func OperationalStateStrings() []string
OperationalStateStrings returns a slice of all String values of the enum
func PortStrings ¶ added in v1.7.0
func PortStrings() []string
PortStrings returns a slice of all String values of the enum
func PrimaryReselectStrings ¶ added in v1.7.0
func PrimaryReselectStrings() []string
PrimaryReselectStrings returns a slice of all String values of the enum
func ProtocolStrings ¶ added in v1.7.0
func ProtocolStrings() []string
ProtocolStrings returns a slice of all String values of the enum
func RouteFlagStrings ¶ added in v1.7.0
func RouteFlagStrings() []string
RouteFlagStrings returns a slice of all String values of the enum
func RouteProtocolStrings ¶ added in v1.7.0
func RouteProtocolStrings() []string
RouteProtocolStrings returns a slice of all String values of the enum
func RouteTypeStrings ¶ added in v1.7.0
func RouteTypeStrings() []string
RouteTypeStrings returns a slice of all String values of the enum
func RoutingTableStrings ¶ added in v1.7.0
func RoutingTableStrings() []string
RoutingTableStrings returns a slice of all String values of the enum
func ScopeStrings ¶ added in v1.7.0
func ScopeStrings() []string
ScopeStrings returns a slice of all String values of the enum
func StatusStrings ¶ added in v1.7.0
func StatusStrings() []string
StatusStrings returns a slice of all String values of the enum
func VLANLinkName ¶ added in v1.5.2
VLANLinkName builds a VLAN link name out of the base device name and VLAN ID.
The function takes care of the maximum length of the link name.
func VLANProtocolStrings ¶ added in v1.7.0
func VLANProtocolStrings() []string
VLANProtocolStrings returns a slice of all String values of the enum
Types ¶
type ADSelect ¶
type ADSelect uint8
ADSelect is ADSelect.
const ( ADSelectStable ADSelect = iota // stable ADSelectBandwidth // bandwidth ADSelectCount // count )
ADSelect constants.
func ADSelectByName ¶
ADSelectByName parses ADSelect.
func ADSelectString ¶
ADSelectString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ADSelectValues ¶
func ADSelectValues() []ADSelect
ADSelectValues returns all values of the enum
func (ADSelect) IsAADSelect ¶
IsAADSelect returns "true" if the value is listed in the enum definition. "false" otherwise
func (ADSelect) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for ADSelect
func (*ADSelect) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for ADSelect
type ARPAllTargets ¶
type ARPAllTargets uint32
ARPAllTargets is an ARP targets mode.
const ( ARPAllTargetsAny ARPAllTargets = iota // any ARPAllTargetsAll // all )
ARPAllTargets contants.
func ARPAllTargetsByName ¶
func ARPAllTargetsByName(a string) (ARPAllTargets, error)
ARPAllTargetsByName parses ARPAllTargets.
func ARPAllTargetsString ¶
func ARPAllTargetsString(s string) (ARPAllTargets, error)
ARPAllTargetsString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ARPAllTargetsValues ¶
func ARPAllTargetsValues() []ARPAllTargets
ARPAllTargetsValues returns all values of the enum
func (ARPAllTargets) IsAARPAllTargets ¶
func (i ARPAllTargets) IsAARPAllTargets() bool
IsAARPAllTargets returns "true" if the value is listed in the enum definition. "false" otherwise
func (ARPAllTargets) MarshalText ¶
func (i ARPAllTargets) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ARPAllTargets
func (ARPAllTargets) String ¶
func (i ARPAllTargets) String() string
func (*ARPAllTargets) UnmarshalText ¶
func (i *ARPAllTargets) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ARPAllTargets
type ARPValidate ¶
type ARPValidate uint32
ARPValidate is an ARP Validation mode.
const ( ARPValidateNone ARPValidate = iota // none ARPValidateActive // active ARPValidateBackup // backup ARPValidateAll // all )
ARPValidate constants.
func ARPValidateByName ¶
func ARPValidateByName(a string) (ARPValidate, error)
ARPValidateByName parses ARPValidate.
func ARPValidateString ¶
func ARPValidateString(s string) (ARPValidate, error)
ARPValidateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ARPValidateValues ¶
func ARPValidateValues() []ARPValidate
ARPValidateValues returns all values of the enum
func (ARPValidate) IsAARPValidate ¶
func (i ARPValidate) IsAARPValidate() bool
IsAARPValidate returns "true" if the value is listed in the enum definition. "false" otherwise
func (ARPValidate) MarshalText ¶
func (i ARPValidate) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ARPValidate
func (ARPValidate) String ¶
func (i ARPValidate) String() string
func (*ARPValidate) UnmarshalText ¶
func (i *ARPValidate) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ARPValidate
type AddressFlag ¶
type AddressFlag uint32
AddressFlag wraps IFF_* constants.
const ( AddressTemporary AddressFlag = 1 << iota // temporary AddressNoDAD // nodad AddressOptimistic // optimistic AddressDADFailed // dadfailed AddressHome // homeaddress AddressDeprecated // deprecated AddressTentative // tentative AddressPermanent // permanent AddressManagementTemp // mngmtmpaddr AddressNoPrefixRoute // noprefixroute AddressMCAutoJoin // mcautojoin AddressStablePrivacy // stableprivacy )
AddressFlag constants.
func AddressFlagString ¶
func AddressFlagString(s string) (AddressFlag, error)
AddressFlagString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func AddressFlagValues ¶
func AddressFlagValues() []AddressFlag
AddressFlagValues returns all values of the enum
func (AddressFlag) IsAAddressFlag ¶
func (i AddressFlag) IsAAddressFlag() bool
IsAAddressFlag returns "true" if the value is listed in the enum definition. "false" otherwise
func (AddressFlag) MarshalText ¶
func (i AddressFlag) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for AddressFlag
func (AddressFlag) String ¶
func (i AddressFlag) String() string
func (*AddressFlag) UnmarshalText ¶
func (i *AddressFlag) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for AddressFlag
type AddressFlags ¶
type AddressFlags uint32
AddressFlags is a bitmask of AddressFlag.
func AddressFlagsString ¶
func AddressFlagsString(s string) (AddressFlags, error)
AddressFlagsString converts string representation of flags into AddressFlags.
func (AddressFlags) MarshalText ¶
func (flags AddressFlags) MarshalText() ([]byte, error)
MarshalText implements text.Marshaler.
func (AddressFlags) String ¶
func (flags AddressFlags) String() string
func (*AddressFlags) UnmarshalText ¶
func (flags *AddressFlags) UnmarshalText(b []byte) error
UnmarshalText implements text.Unmarshaler.
type AddressSortAlgorithm ¶ added in v1.9.0
type AddressSortAlgorithm int
AddressSortAlgorithm is an internal address sorting algorithm.
const ( AddressSortAlgorithmV1 AddressSortAlgorithm = iota // v1 AddressSortAlgorithmV2 // v2 )
AddressSortAlgorithm contants.
func AddressSortAlgorithmString ¶ added in v1.9.0
func AddressSortAlgorithmString(s string) (AddressSortAlgorithm, error)
AddressSortAlgorithmString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func AddressSortAlgorithmValues ¶ added in v1.9.0
func AddressSortAlgorithmValues() []AddressSortAlgorithm
AddressSortAlgorithmValues returns all values of the enum
func (AddressSortAlgorithm) IsAAddressSortAlgorithm ¶ added in v1.9.0
func (i AddressSortAlgorithm) IsAAddressSortAlgorithm() bool
IsAAddressSortAlgorithm returns "true" if the value is listed in the enum definition. "false" otherwise
func (AddressSortAlgorithm) MarshalText ¶ added in v1.9.0
func (i AddressSortAlgorithm) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for AddressSortAlgorithm
func (AddressSortAlgorithm) String ¶ added in v1.9.0
func (i AddressSortAlgorithm) String() string
func (*AddressSortAlgorithm) UnmarshalText ¶ added in v1.9.0
func (i *AddressSortAlgorithm) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for AddressSortAlgorithm
type BondMode ¶
type BondMode uint8
BondMode is a bond mode.
const ( BondModeRoundrobin BondMode = iota // balance-rr BondModeActiveBackup // active-backup BondModeXOR // balance-xor BondModeBroadcast // broadcast BondMode8023AD // 802.3ad BondModeTLB // balance-tlb BondModeALB // balance-alb )
BondMode constants.
See linux/if_bonding.h.
func BondModeByName ¶
BondModeByName converts string bond mode into a constant.
func BondModeString ¶
BondModeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func BondModeValues ¶
func BondModeValues() []BondMode
BondModeValues returns all values of the enum
func (BondMode) IsABondMode ¶
IsABondMode returns "true" if the value is listed in the enum definition. "false" otherwise
func (BondMode) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for BondMode
func (*BondMode) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for BondMode
type BondXmitHashPolicy ¶
type BondXmitHashPolicy uint8
BondXmitHashPolicy is a bond hash policy.
const ( BondXmitPolicyLayer2 BondXmitHashPolicy = iota // layer2 BondXmitPolicyLayer34 // layer3+4 BondXmitPolicyLayer23 // layer2+3 BondXmitPolicyEncap23 // encap2+3 BondXmitPolicyEncap34 // encap3+4 )
Bond hash policy constants.
func BondXmitHashPolicyByName ¶
func BondXmitHashPolicyByName(policy string) (BondXmitHashPolicy, error)
BondXmitHashPolicyByName parses bond hash policy.
func BondXmitHashPolicyString ¶
func BondXmitHashPolicyString(s string) (BondXmitHashPolicy, error)
BondXmitHashPolicyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func BondXmitHashPolicyValues ¶
func BondXmitHashPolicyValues() []BondXmitHashPolicy
BondXmitHashPolicyValues returns all values of the enum
func (BondXmitHashPolicy) IsABondXmitHashPolicy ¶
func (i BondXmitHashPolicy) IsABondXmitHashPolicy() bool
IsABondXmitHashPolicy returns "true" if the value is listed in the enum definition. "false" otherwise
func (BondXmitHashPolicy) MarshalText ¶
func (i BondXmitHashPolicy) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for BondXmitHashPolicy
func (BondXmitHashPolicy) String ¶
func (i BondXmitHashPolicy) String() string
func (*BondXmitHashPolicy) UnmarshalText ¶
func (i *BondXmitHashPolicy) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for BondXmitHashPolicy
type ConntrackState ¶ added in v1.6.0
type ConntrackState uint32
ConntrackState is a conntrack state.
const ( ConntrackStateNew ConntrackState = 0x08 // new ConntrackStateRelated ConntrackState = 0x04 // related ConntrackStateEstablished ConntrackState = 0x02 // established ConntrackStateInvalid ConntrackState = 0x01 // invalid )
ConntrackState constants.
func ConntrackStateString ¶ added in v1.6.0
func ConntrackStateString(s string) (ConntrackState, error)
ConntrackStateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ConntrackStateValues ¶ added in v1.6.0
func ConntrackStateValues() []ConntrackState
ConntrackStateValues returns all values of the enum
func (ConntrackState) IsAConntrackState ¶ added in v1.6.0
func (i ConntrackState) IsAConntrackState() bool
IsAConntrackState returns "true" if the value is listed in the enum definition. "false" otherwise
func (ConntrackState) MarshalText ¶ added in v1.6.0
func (i ConntrackState) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ConntrackState
func (ConntrackState) String ¶ added in v1.6.0
func (i ConntrackState) String() string
func (*ConntrackState) UnmarshalText ¶ added in v1.6.0
func (i *ConntrackState) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ConntrackState
type DefaultAction ¶ added in v1.6.0
type DefaultAction int
DefaultAction is a default firewall action.
const ( DefaultActionAccept DefaultAction = iota // accept DefaultActionBlock // block )
DefaultAction constants.
func DefaultActionString ¶ added in v1.6.0
func DefaultActionString(s string) (DefaultAction, error)
DefaultActionString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func DefaultActionValues ¶ added in v1.6.0
func DefaultActionValues() []DefaultAction
DefaultActionValues returns all values of the enum
func (DefaultAction) IsADefaultAction ¶ added in v1.6.0
func (i DefaultAction) IsADefaultAction() bool
IsADefaultAction returns "true" if the value is listed in the enum definition. "false" otherwise
func (DefaultAction) MarshalText ¶ added in v1.6.0
func (i DefaultAction) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for DefaultAction
func (DefaultAction) String ¶ added in v1.6.0
func (i DefaultAction) String() string
func (*DefaultAction) UnmarshalText ¶ added in v1.6.0
func (i *DefaultAction) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for DefaultAction
type DeviceInfo ¶
DeviceInfo contains device hardware information that can be read from /sys/.
func GetDeviceInfo ¶
func GetDeviceInfo(deviceName string) (*DeviceInfo, error)
GetDeviceInfo get additional device information by reading /sys/ directory.
type Duplex ¶
Duplex wraps ethtool.Duplex for YAML marshaling.
const ( Half Duplex = Duplex(ethtool.Half) // Half Full Duplex = Duplex(ethtool.Full) // Full Unknown Duplex = Duplex(ethtool.Unknown) // Unknown )
Possible Duplex type values.
func DuplexString ¶
DuplexString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Duplex) IsADuplex ¶
IsADuplex returns "true" if the value is listed in the enum definition. "false" otherwise
func (Duplex) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Duplex
func (*Duplex) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Duplex
type FailOverMAC ¶
type FailOverMAC uint8
FailOverMAC is a MAC failover mode.
const ( FailOverMACNone FailOverMAC = iota // none FailOverMACActive // active FailOverMACFollow // follow )
FailOverMAC constants.
func FailOverMACByName ¶
func FailOverMACByName(f string) (FailOverMAC, error)
FailOverMACByName parses FailOverMac.
func FailOverMACString ¶
func FailOverMACString(s string) (FailOverMAC, error)
FailOverMACString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func FailOverMACValues ¶
func FailOverMACValues() []FailOverMAC
FailOverMACValues returns all values of the enum
func (FailOverMAC) IsAFailOverMAC ¶
func (i FailOverMAC) IsAFailOverMAC() bool
IsAFailOverMAC returns "true" if the value is listed in the enum definition. "false" otherwise
func (FailOverMAC) String ¶
func (i FailOverMAC) String() string
type Family ¶
type Family uint8
Family is a network family.
func FamilyString ¶
FamilyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Family) IsAFamily ¶
IsAFamily returns "true" if the value is listed in the enum definition. "false" otherwise
func (Family) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Family
func (*Family) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Family
type HardwareAddr ¶
type HardwareAddr net.HardwareAddr
HardwareAddr wraps net.HardwareAddr for YAML marshaling.
func (HardwareAddr) MarshalText ¶
func (addr HardwareAddr) MarshalText() ([]byte, error)
MarshalText implements text.Marshaler interface.
func (HardwareAddr) String ¶
func (addr HardwareAddr) String() string
func (*HardwareAddr) UnmarshalText ¶
func (addr *HardwareAddr) UnmarshalText(b []byte) error
UnmarshalText implements text.Unmarshaler interface.
type LACPRate ¶
type LACPRate uint8
LACPRate is a LACP rate.
func LACPRateByName ¶
LACPRateByName parses LACPRate.
func LACPRateString ¶
LACPRateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LACPRateValues ¶
func LACPRateValues() []LACPRate
LACPRateValues returns all values of the enum
func (LACPRate) IsALACPRate ¶
IsALACPRate returns "true" if the value is listed in the enum definition. "false" otherwise
func (LACPRate) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LACPRate
func (*LACPRate) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LACPRate
type LinkFlag ¶
type LinkFlag uint32
LinkFlag wraps IFF_* constants.
const ( LinkUp LinkFlag = 1 << iota // UP LinkBroadcast // BROADCAST LinkDebug // DEBUG LinkLoopback // LOOPBACK LinkPointToPoint // POINTTOPOINT LinkNoTrailers // NOTRAILERS LinkRunning // RUNNING LinkNoArp // NOARP LinkPromisc // PROMISC LinkAllMulti // ALLMULTI LinkMaster // MASTER LinkSlave // SLAVE LinkMulticase // MULTICAST LinkPortsel // PORTSEL LinKAutoMedia // AUTOMEDIA LinkDynamic // DYNAMIC LinkLowerUp // LOWER_UP LinkDormant // DORMANT LinkEcho // ECHO )
LinkFlag constants.
func LinkFlagString ¶
LinkFlagString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LinkFlagValues ¶
func LinkFlagValues() []LinkFlag
LinkFlagValues returns all values of the enum
func (LinkFlag) IsALinkFlag ¶
IsALinkFlag returns "true" if the value is listed in the enum definition. "false" otherwise
func (LinkFlag) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LinkFlag
func (*LinkFlag) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LinkFlag
type LinkFlags ¶
type LinkFlags uint32
LinkFlags is a bitmask of LinkFlags.
func LinkFlagsString ¶
LinkFlagsString parses string representation of LinkFlags.
func (LinkFlags) MarshalText ¶
MarshalText implements text.Marshaler.
func (*LinkFlags) UnmarshalText ¶
UnmarshalText implements text.Unmarshaler.
type LinkType ¶
type LinkType uint16
LinkType is a link type.
const ( LinkNetrom LinkType = 0 // netrom LinkEther LinkType = 1 // ether LinkEether LinkType = 2 // eether LinkAx25 LinkType = 3 // ax25 LinkPronet LinkType = 4 // pronet LinkChaos LinkType = 5 // chaos LinkIee802 LinkType = 6 // ieee802 LinkArcnet LinkType = 7 // arcnet LinkAtalk LinkType = 8 // atalk LinkDlci LinkType = 15 // dlci LinkAtm LinkType = 19 // atm LinkMetricom LinkType = 23 // metricom LinkIeee1394 LinkType = 24 // ieee1394 LinkEui64 LinkType = 27 // eui64 LinkInfiniband LinkType = 32 // infiniband LinkSlip LinkType = 256 // slip LinkCslip LinkType = 257 // cslip LinkSlip6 LinkType = 258 // slip6 LinkCslip6 LinkType = 259 // cslip6 LinkRsrvd LinkType = 260 // rsrvd LinkAdapt LinkType = 264 // adapt LinkRose LinkType = 270 // rose LinkX25 LinkType = 271 // x25 LinkHwx25 LinkType = 272 // hwx25 LinkCan LinkType = 280 // can LinkPpp LinkType = 512 // ppp LinkCisco LinkType = 513 // cisco LinkHdlc LinkType = 513 // hdlc LinkLapb LinkType = 516 // lapb LinkDdcmp LinkType = 517 // ddcmp LinkRawhdlc LinkType = 518 // rawhdlc LinkTunnel LinkType = 768 // ipip LinkTunnel6 LinkType = 769 // tunnel6 LinkFrad LinkType = 770 // frad LinkSkip LinkType = 771 // skip LinkLoopbck LinkType = 772 // loopback LinkLocaltlk LinkType = 773 // localtlk LinkFddi LinkType = 774 // fddi LinkBif LinkType = 775 // bif LinkSit LinkType = 776 // sit LinkIpddp LinkType = 777 // ip/ddp LinkIpgre LinkType = 778 // gre LinkPimreg LinkType = 779 // pimreg LinkHippi LinkType = 780 // hippi LinkAsh LinkType = 781 // ash LinkEconet LinkType = 782 // econet LinkIrda LinkType = 783 // irda LinkFcpp LinkType = 784 // fcpp LinkFcal LinkType = 785 // fcal LinkFcpl LinkType = 786 // fcpl LinkFcfabric LinkType = 787 // fcfb_0 LinkFcfabric1 LinkType = LinkFcfabric + 1 // fcfb_1 LinkFcfabric2 LinkType = LinkFcfabric + 2 // fcfb_2 LinkFcfabric3 LinkType = LinkFcfabric + 3 // fcfb_3 LinkFcfabric4 LinkType = LinkFcfabric + 4 // fcfb_4 LinkFcfabric5 LinkType = LinkFcfabric + 5 // fcfb_5 LinkFcfabric6 LinkType = LinkFcfabric + 6 // fcfb_6 LinkFcfabric7 LinkType = LinkFcfabric + 7 // fcfb_7 LinkFcfabric8 LinkType = LinkFcfabric + 8 // fcfb_8 LinkFcfabric9 LinkType = LinkFcfabric + 9 // fcfb_9 LinkFcfabric10 LinkType = LinkFcfabric + 10 // fcfb_10 LinkFcfabric11 LinkType = LinkFcfabric + 11 // fcfb_11 LinkFcfabric12 LinkType = LinkFcfabric + 12 // fcfb_12 LinkIee802tr LinkType = 800 // tr LinkIee80211 LinkType = 801 // ieee802.11 LinkIee80211prism LinkType = 802 // ieee802.11_prism LinkIee80211Radiotap LinkType = 803 // ieee802.11_radiotap LinkIee8021154 LinkType = 804 // ieee802.15.4 LinkIee8021154monitor LinkType = 805 // ieee802.15.4_monitor LinkPhonet LinkType = 820 // phonet LinkPhonetpipe LinkType = 821 // phonet_pipe LinkCaif LinkType = 822 // caif LinkIP6gre LinkType = 823 // ip6gre LinkNetlink LinkType = 824 // netlink Link6Lowpan LinkType = 825 // 6lowpan LinkVoid LinkType = 65535 // void LinkNone LinkType = 65534 // nohdr )
LinkType constants.
func LinkTypeString ¶
LinkTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LinkTypeValues ¶
func LinkTypeValues() []LinkType
LinkTypeValues returns all values of the enum
func (LinkType) IsALinkType ¶
IsALinkType returns "true" if the value is listed in the enum definition. "false" otherwise
func (LinkType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LinkType
func (*LinkType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LinkType
type MatchOperator ¶ added in v1.6.0
type MatchOperator int
MatchOperator is a netfilter match operator.
const ( OperatorEqual MatchOperator = 0 // == OperatorNotEqual MatchOperator = 1 // != )
MatchOperator constants.
func MatchOperatorString ¶ added in v1.6.0
func MatchOperatorString(s string) (MatchOperator, error)
MatchOperatorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func MatchOperatorValues ¶ added in v1.6.0
func MatchOperatorValues() []MatchOperator
MatchOperatorValues returns all values of the enum
func (MatchOperator) IsAMatchOperator ¶ added in v1.6.0
func (i MatchOperator) IsAMatchOperator() bool
IsAMatchOperator returns "true" if the value is listed in the enum definition. "false" otherwise
func (MatchOperator) MarshalText ¶ added in v1.6.0
func (i MatchOperator) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for MatchOperator
func (MatchOperator) String ¶ added in v1.6.0
func (i MatchOperator) String() string
func (*MatchOperator) UnmarshalText ¶ added in v1.6.0
func (i *MatchOperator) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for MatchOperator
type NfTablesChainHook ¶ added in v1.6.0
type NfTablesChainHook uint32
NfTablesChainHook wraps nftables.ChainHook for YAML marshaling.
const ( ChainHookPrerouting NfTablesChainHook = 0 // prerouting ChainHookInput NfTablesChainHook = 1 // input ChainHookForward NfTablesChainHook = 2 // forward ChainHookOutput NfTablesChainHook = 3 // output ChainHookPostrouting NfTablesChainHook = 4 // postrouting )
Constants copied from nftables to provide Stringer interface.
func NfTablesChainHookString ¶ added in v1.6.0
func NfTablesChainHookString(s string) (NfTablesChainHook, error)
NfTablesChainHookString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NfTablesChainHookValues ¶ added in v1.6.0
func NfTablesChainHookValues() []NfTablesChainHook
NfTablesChainHookValues returns all values of the enum
func (NfTablesChainHook) IsANfTablesChainHook ¶ added in v1.6.0
func (i NfTablesChainHook) IsANfTablesChainHook() bool
IsANfTablesChainHook returns "true" if the value is listed in the enum definition. "false" otherwise
func (NfTablesChainHook) MarshalText ¶ added in v1.6.0
func (i NfTablesChainHook) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for NfTablesChainHook
func (NfTablesChainHook) String ¶ added in v1.6.0
func (i NfTablesChainHook) String() string
func (*NfTablesChainHook) UnmarshalText ¶ added in v1.6.0
func (i *NfTablesChainHook) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for NfTablesChainHook
type NfTablesChainPriority ¶ added in v1.6.0
type NfTablesChainPriority int32
NfTablesChainPriority wraps nftables.ChainPriority for YAML marshaling.
const ( ChainPriorityFirst NfTablesChainPriority = math.MinInt32 // first ChainPriorityConntrackDefrag NfTablesChainPriority = -400 // conntrack-defrag ChainPriorityRaw NfTablesChainPriority = -300 // raw ChainPrioritySELinuxFirst NfTablesChainPriority = -225 // selinux-first ChainPriorityConntrack NfTablesChainPriority = -200 // conntrack ChainPriorityMangle NfTablesChainPriority = -150 // mangle ChainPriorityNATDest NfTablesChainPriority = -100 // nat-dest ChainPriorityFilter NfTablesChainPriority = 0 // filter ChainPrioritySecurity NfTablesChainPriority = 50 // security ChainPriorityNATSource NfTablesChainPriority = 100 // nat-source ChainPrioritySELinuxLast NfTablesChainPriority = 225 // selinux-last ChainPriorityConntrackHelper NfTablesChainPriority = 300 // conntrack-helper ChainPriorityLast NfTablesChainPriority = math.MaxInt32 // last )
Constants copied from nftables to provide Stringer interface.
func NfTablesChainPriorityString ¶ added in v1.6.0
func NfTablesChainPriorityString(s string) (NfTablesChainPriority, error)
NfTablesChainPriorityString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NfTablesChainPriorityValues ¶ added in v1.6.0
func NfTablesChainPriorityValues() []NfTablesChainPriority
NfTablesChainPriorityValues returns all values of the enum
func (NfTablesChainPriority) IsANfTablesChainPriority ¶ added in v1.6.0
func (i NfTablesChainPriority) IsANfTablesChainPriority() bool
IsANfTablesChainPriority returns "true" if the value is listed in the enum definition. "false" otherwise
func (NfTablesChainPriority) MarshalText ¶ added in v1.6.0
func (i NfTablesChainPriority) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for NfTablesChainPriority
func (NfTablesChainPriority) String ¶ added in v1.6.0
func (i NfTablesChainPriority) String() string
func (*NfTablesChainPriority) UnmarshalText ¶ added in v1.6.0
func (i *NfTablesChainPriority) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for NfTablesChainPriority
type NfTablesChainType ¶ added in v1.6.0
type NfTablesChainType = string
NfTablesChainType defines what this chain will be used for. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Base_chain_types
const ( ChainTypeFilter NfTablesChainType = "filter" ChainTypeRoute NfTablesChainType = "route" ChainTypeNAT NfTablesChainType = "nat" )
Possible ChainType values.
type NfTablesVerdict ¶ added in v1.6.0
type NfTablesVerdict int64
NfTablesVerdict wraps nftables.Verdict for YAML marshaling.
const ( VerdictDrop NfTablesVerdict = 0 // drop VerdictAccept NfTablesVerdict = 1 // accept )
Constants copied from nftables to provide Stringer interface.
func NfTablesVerdictString ¶ added in v1.6.0
func NfTablesVerdictString(s string) (NfTablesVerdict, error)
NfTablesVerdictString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NfTablesVerdictValues ¶ added in v1.6.0
func NfTablesVerdictValues() []NfTablesVerdict
NfTablesVerdictValues returns all values of the enum
func (NfTablesVerdict) IsANfTablesVerdict ¶ added in v1.6.0
func (i NfTablesVerdict) IsANfTablesVerdict() bool
IsANfTablesVerdict returns "true" if the value is listed in the enum definition. "false" otherwise
func (NfTablesVerdict) MarshalText ¶ added in v1.6.0
func (i NfTablesVerdict) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for NfTablesVerdict
func (NfTablesVerdict) String ¶ added in v1.6.0
func (i NfTablesVerdict) String() string
func (*NfTablesVerdict) UnmarshalText ¶ added in v1.6.0
func (i *NfTablesVerdict) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for NfTablesVerdict
type OperationalState ¶
type OperationalState uint8
OperationalState wraps rtnetlink.OperationalState for YAML marshaling.
const ( OperStateUnknown OperationalState = OperationalState(rtnetlink.OperStateUnknown) // unknown OperStateNotPresent OperationalState = OperationalState(rtnetlink.OperStateNotPresent) // notPresent OperStateDown OperationalState = OperationalState(rtnetlink.OperStateDown) // down OperStateLowerLayerDown OperationalState = OperationalState(rtnetlink.OperStateLowerLayerDown) // lowerLayerDown OperStateTesting OperationalState = OperationalState(rtnetlink.OperStateTesting) // testing OperStateDormant OperationalState = OperationalState(rtnetlink.OperStateDormant) // dormant OperStateUp OperationalState = OperationalState(rtnetlink.OperStateUp) // up )
Constants copied from rtnetlink to provide Stringer interface.
func OperationalStateString ¶
func OperationalStateString(s string) (OperationalState, error)
OperationalStateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func OperationalStateValues ¶
func OperationalStateValues() []OperationalState
OperationalStateValues returns all values of the enum
func (OperationalState) IsAOperationalState ¶
func (i OperationalState) IsAOperationalState() bool
IsAOperationalState returns "true" if the value is listed in the enum definition. "false" otherwise
func (OperationalState) MarshalText ¶
func (i OperationalState) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for OperationalState
func (OperationalState) String ¶
func (i OperationalState) String() string
func (*OperationalState) UnmarshalText ¶
func (i *OperationalState) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for OperationalState
type Port ¶
Port wraps ethtool.Port for YAML marshaling.
const ( TwistedPair Port = Port(ethtool.TwistedPair) AUI Port = Port(ethtool.AUI) MII Port = Port(ethtool.MII) Fibre Port = Port(ethtool.Fibre) //nolint:misspell BNC Port = Port(ethtool.BNC) DirectAttach Port = Port(ethtool.DirectAttach) None Port = Port(ethtool.None) Other Port = Port(ethtool.Other) )
Possible Port type values.
func PortString ¶
PortString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Port) IsAPort ¶
IsAPort returns "true" if the value is listed in the enum definition. "false" otherwise
func (Port) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Port
func (*Port) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Port
type PrimaryReselect ¶
type PrimaryReselect uint8
PrimaryReselect is an ARP targets mode.
const ( PrimaryReselectAlways PrimaryReselect = iota // always PrimaryReselectBetter // better PrimaryReselectFailure // failure )
PrimaryReslect constants.
func PrimaryReselectByName ¶
func PrimaryReselectByName(p string) (PrimaryReselect, error)
PrimaryReselectByName parses PrimaryReselect.
func PrimaryReselectString ¶
func PrimaryReselectString(s string) (PrimaryReselect, error)
PrimaryReselectString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func PrimaryReselectValues ¶
func PrimaryReselectValues() []PrimaryReselect
PrimaryReselectValues returns all values of the enum
func (PrimaryReselect) IsAPrimaryReselect ¶
func (i PrimaryReselect) IsAPrimaryReselect() bool
IsAPrimaryReselect returns "true" if the value is listed in the enum definition. "false" otherwise
func (PrimaryReselect) MarshalText ¶
func (i PrimaryReselect) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for PrimaryReselect
func (PrimaryReselect) String ¶
func (i PrimaryReselect) String() string
func (*PrimaryReselect) UnmarshalText ¶
func (i *PrimaryReselect) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for PrimaryReselect
type Protocol ¶ added in v1.6.0
type Protocol uint8
Protocol is a inet protocol.
const ( ProtocolICMP Protocol = 0x1 // icmp ProtocolTCP Protocol = 0x6 // tcp ProtocolUDP Protocol = 0x11 // udp ProtocolICMPv6 Protocol = 0x3a // icmpv6 )
Protocol constants.
func ProtocolString ¶ added in v1.6.0
ProtocolString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ProtocolValues ¶ added in v1.6.0
func ProtocolValues() []Protocol
ProtocolValues returns all values of the enum
func (Protocol) IsAProtocol ¶ added in v1.6.0
IsAProtocol returns "true" if the value is listed in the enum definition. "false" otherwise
func (Protocol) MarshalText ¶ added in v1.6.0
MarshalText implements the encoding.TextMarshaler interface for Protocol
func (*Protocol) UnmarshalText ¶ added in v1.6.0
UnmarshalText implements the encoding.TextUnmarshaler interface for Protocol
type RouteFlag ¶
type RouteFlag uint32
RouteFlag wraps RTM_F_* constants.
const ( RouteNotify RouteFlag = 256 << iota // notify RouteCloned // cloned RouteEqualize // equalize RoutePrefix // prefix RouteLookupTable // lookup_table RouteFIBMatch // fib_match RouteOffload // offload RouteTrap // trap )
RouteFlag constants.
func RouteFlagString ¶
RouteFlagString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RouteFlagValues ¶
func RouteFlagValues() []RouteFlag
RouteFlagValues returns all values of the enum
func (RouteFlag) IsARouteFlag ¶
IsARouteFlag returns "true" if the value is listed in the enum definition. "false" otherwise
func (RouteFlag) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for RouteFlag
func (*RouteFlag) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for RouteFlag
type RouteFlags ¶
type RouteFlags uint32
RouteFlags is a bitmask of RouteFlag.
func RouteFlagsString ¶
func RouteFlagsString(s string) (RouteFlags, error)
RouteFlagsString parses string representation into RouteFlags.
func (RouteFlags) Equal ¶
func (flags RouteFlags) Equal(other RouteFlags) bool
Equal tests for RouteFlags equality ignoring flags not managed by this implementation.
func (RouteFlags) MarshalText ¶
func (flags RouteFlags) MarshalText() ([]byte, error)
MarshalText implements text.Marshaler.
func (RouteFlags) String ¶
func (flags RouteFlags) String() string
func (*RouteFlags) UnmarshalText ¶
func (flags *RouteFlags) UnmarshalText(b []byte) error
UnmarshalText implements text.Unmarshaler.
type RouteProtocol ¶
type RouteProtocol uint8
RouteProtocol is a routing protocol.
const ( ProtocolUnspec RouteProtocol = 0 // unspec ProtocolRedirect RouteProtocol = 1 // redirect ProtocolKernel RouteProtocol = 2 // kernel ProtocolBoot RouteProtocol = 3 // boot ProtocolStatic RouteProtocol = 4 // static ProtocolRA RouteProtocol = 9 // ra ProtocolMRT RouteProtocol = 10 // mrt ProtocolZebra RouteProtocol = 11 // zebra ProtocolBird RouteProtocol = 12 // bird ProtocolDnrouted RouteProtocol = 13 // dnrouted ProtocolXorp RouteProtocol = 14 // xorp ProtocolNTK RouteProtocol = 15 // ntk ProtocolDHCP RouteProtocol = 16 // dhcp ProtocolMRTD RouteProtocol = 17 // mrtd ProtocolKeepalived RouteProtocol = 18 // keepalived ProtocolBabel RouteProtocol = 42 // babel ProtocolOpenr RouteProtocol = 99 // openr ProtocolBGP RouteProtocol = 186 // bgp ProtocolISIS RouteProtocol = 187 // isis ProtocolOSPF RouteProtocol = 188 // ospf ProtocolRIP RouteProtocol = 189 // rip ProtocolEIGRP RouteProtocol = 192 // eigrp )
RouteType constants.
func RouteProtocolString ¶
func RouteProtocolString(s string) (RouteProtocol, error)
RouteProtocolString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RouteProtocolValues ¶
func RouteProtocolValues() []RouteProtocol
RouteProtocolValues returns all values of the enum
func (RouteProtocol) IsARouteProtocol ¶
func (i RouteProtocol) IsARouteProtocol() bool
IsARouteProtocol returns "true" if the value is listed in the enum definition. "false" otherwise
func (RouteProtocol) MarshalText ¶
func (i RouteProtocol) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for RouteProtocol
func (RouteProtocol) String ¶
func (i RouteProtocol) String() string
func (*RouteProtocol) UnmarshalText ¶
func (i *RouteProtocol) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for RouteProtocol
type RouteType ¶
type RouteType uint8
RouteType is a route type.
const ( TypeUnspec RouteType = iota // unspec TypeUnicast // unicast TypeLocal // local TypeBroadcast // broadcast TypeAnycast // anycast TypeMulticast // multicast TypeBlackhole // blackhole TypeUnreachable // unreachable TypeProhibit // prohibit TypeThrow // throw TypeNAT // nat TypeXResolve // xresolve )
RouteType constants.
func RouteTypeString ¶
RouteTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RouteTypeValues ¶
func RouteTypeValues() []RouteType
RouteTypeValues returns all values of the enum
func (RouteType) IsARouteType ¶
IsARouteType returns "true" if the value is listed in the enum definition. "false" otherwise
func (RouteType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for RouteType
func (*RouteType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for RouteType
type RoutingTable ¶
type RoutingTable uint32
RoutingTable is a routing table ID.
const ( TableUnspec RoutingTable = 0 // unspec TableDefault RoutingTable = 253 // default TableMain RoutingTable = 254 // main TableLocal RoutingTable = 255 // local )
RoutingTable constants.
func RoutingTableString ¶
func RoutingTableString(s string) (RoutingTable, error)
RoutingTableString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func RoutingTableValues ¶
func RoutingTableValues() []RoutingTable
RoutingTableValues returns all values of the enum
func (RoutingTable) IsARoutingTable ¶
func (i RoutingTable) IsARoutingTable() bool
IsARoutingTable returns "true" if the value is listed in the enum definition. "false" otherwise
func (RoutingTable) MarshalText ¶
func (i RoutingTable) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for RoutingTable
func (RoutingTable) String ¶
func (i RoutingTable) String() string
func (*RoutingTable) UnmarshalText ¶
func (i *RoutingTable) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for RoutingTable
type Scope ¶
type Scope uint8
Scope is an address scope.
const ( ScopeGlobal Scope = 0 // global ScopeSite Scope = 200 // site ScopeLink Scope = 253 // link ScopeHost Scope = 254 // host ScopeNowhere Scope = 255 // nowhere )
Scope constants.
func ScopeString ¶
ScopeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Scope) IsAScope ¶
IsAScope returns "true" if the value is listed in the enum definition. "false" otherwise
func (Scope) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Scope
func (*Scope) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Scope
type Status ¶
type Status int
Status is a network status.
Please see resources/network/status.go.
const ( StatusAddresses Status = 1 // addresses StatusConnectivity Status = 2 // connectivity StatusHostname Status = 3 // hostname StatusEtcFiles Status = 4 // etcfiles )
Status constants.
func StatusString ¶
StatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Status) IsAStatus ¶
IsAStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (Status) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Status
func (*Status) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Status
type VLANProtocol ¶
type VLANProtocol uint16
VLANProtocol is a VLAN protocol.
const ( VLANProtocol8021Q VLANProtocol = 33024 // 802.1q VLANProtocol8021AD VLANProtocol = 34984 // 802.1ad )
VLANProtocol constants.
func VLANProtocolString ¶
func VLANProtocolString(s string) (VLANProtocol, error)
VLANProtocolString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func VLANProtocolValues ¶
func VLANProtocolValues() []VLANProtocol
VLANProtocolValues returns all values of the enum
func (VLANProtocol) IsAVLANProtocol ¶
func (i VLANProtocol) IsAVLANProtocol() bool
IsAVLANProtocol returns "true" if the value is listed in the enum definition. "false" otherwise
func (VLANProtocol) MarshalText ¶
func (i VLANProtocol) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for VLANProtocol
func (VLANProtocol) String ¶
func (i VLANProtocol) String() string
func (*VLANProtocol) UnmarshalText ¶
func (i *VLANProtocol) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for VLANProtocol
Source Files ¶
- address_flags.go
- addresssortalgorithm.go
- adselect.go
- arpalltargets.go
- arpalltargets_enumer.go
- arpvalidate.go
- bondmode.go
- bondxmithashpolicy.go
- conntrack_state.go
- default_action.go
- device.go
- duplex.go
- failovermac.go
- failovermac_enumer.go
- family.go
- host_port.go
- hwaddr.go
- lacprate.go
- linkflag.go
- linktype.go
- match_operator.go
- nethelpers.go
- nftables_chain_hook.go
- nftables_chain_priority.go
- nftables_chain_type.go
- nftables_verdict.go
- operstate.go
- port.go
- primaryreselect.go
- protocol.go
- routeflags.go
- routeprotocol.go
- routetype.go
- routingtable.go
- scope.go
- status.go
- vlan.go
- vlanprotocol.go