Documentation ¶
Overview ¶
Package options contains all the general options for configuring the general objects like hosts, switches, routers and interfaces
Index ¶
- Constants
- Variables
- func Customize[T any](opts []T, extraOptions ...T) []T
- func Filter(h g.FilterHook, stmts ...filters.Statement) g.FilterRule
- type Address
- type AgingTime
- type EmptyDir
- type ExistingDockerContainer
- type ExistingNamespace
- type FullyRandomNAT
- type GoBuildFlags
- type Group
- type HardwareAddress
- type HelloTime
- type MTU
- type MulticastSnooping
- type NSPrefix
- type Netem
- type NetemOption
- type PeerHardwareAddress
- type Persistent
- type PersistentNAT
- type RandomNAT
- type RedirectToLog
- type Route
- type SourcePortRange
- type Tbf
- type TbfOption
- type TxQLen
- type VLANFiltering
Constants ¶
const ( SouthBound = Group(g.DeviceGroupSouthBound) NorthBound = Group(g.DeviceGroupNorthBound) )
Variables ¶
var BuildFlagsDebug = GoBuildFlags{"-gcflags", "-N -l"} //nolint:gochecknoglobals
BuildFlagsDebug builds the Go binary without compiler optimizations like inlining to improve debugging.
Functions ¶
func Customize ¶
func Customize[T any](opts []T, extraOptions ...T) []T
Customize clones and extends a list of options without altering the list of base options.
func Filter ¶
func Filter(h g.FilterHook, stmts ...filters.Statement) g.FilterRule
Types ¶
type Address ¶
Address assigns an network address (IP layer) to the interface.
func AddressIPv4 ¶
func (Address) ApplyInterface ¶
type AgingTime ¶
AgingTime configures the bridge's FDB entries ageing time, ie the number of seconds a MAC address will be kept in the FDB after a packet has been received from that address. After this time has passed, entries are cleaned up.
func (AgingTime) ApplyBridge ¶
type EmptyDir ¶
type EmptyDir string
Mount an empty dir to shadow parts of the root filesystem
func (EmptyDir) ApplyBaseNode ¶
type ExistingDockerContainer ¶
type ExistingDockerContainer string
Name of an existing Docker container which is used for this node
func (ExistingDockerContainer) ApplyBaseNode ¶
func (d ExistingDockerContainer) ApplyBaseNode(n *g.BaseNode)
type ExistingNamespace ¶
type ExistingNamespace string
The name of an existing network namespace which is used instead of creating a new one.
func (ExistingNamespace) ApplyBaseNode ¶
func (e ExistingNamespace) ApplyBaseNode(n *g.BaseNode)
type FullyRandomNAT ¶
type FullyRandomNAT bool
func (FullyRandomNAT) ApplyNAT ¶
func (frn FullyRandomNAT) ApplyNAT(n *g.NAT)
type GoBuildFlags ¶
type GoBuildFlags []string
func BuildFlags ¶
func BuildFlags(flags ...string) GoBuildFlags
func (GoBuildFlags) ApplyGoBuildFlags ¶
func (bf GoBuildFlags) ApplyGoBuildFlags(d *g.GoBuildFlags)
type Group ¶
type Group g.DeviceGroup
type HardwareAddress ¶
type HardwareAddress net.HardwareAddr
func AddressMAC ¶
func AddressMAC(s string) HardwareAddress
func AddressMACBytes ¶
func AddressMACBytes(b []byte) HardwareAddress
func (HardwareAddress) ApplyLink ¶
func (a HardwareAddress) ApplyLink(la *nl.LinkAttrs)
type HelloTime ¶
HelloTime sets the time in seconds between hello packets sent by the bridge, when it is a root bridge or a designated bridges. Only relevant if STP is enabled. Valid values are between 1 and 10 seconds.
func (HelloTime) ApplyBridge ¶
type MulticastSnooping ¶
type MulticastSnooping bool
MulticastSnooping configures multicast snooping.
func (MulticastSnooping) ApplyBridge ¶
func (mcs MulticastSnooping) ApplyBridge(b *nl.Bridge)
type Netem ¶
type Netem nl.NetemQdiscAttrs
func WithNetem ¶
func WithNetem(opts ...NetemOption) Netem
func (Netem) ApplyInterface ¶
type NetemOption ¶
type NetemOption interface {
ApplyNetem(n *Netem)
}
type PeerHardwareAddress ¶
type PeerHardwareAddress net.HardwareAddr
func (PeerHardwareAddress) ApplyVeth ¶
func (p PeerHardwareAddress) ApplyVeth(v *nl.Veth)
type Persistent ¶
type Persistent bool
Persistent keeps a network from being torn down.
func (Persistent) ApplyNetwork ¶
func (p Persistent) ApplyNetwork(n *g.Network)
type PersistentNAT ¶
type PersistentNAT bool
func (PersistentNAT) ApplyNAT ¶
func (pn PersistentNAT) ApplyNAT(n *g.NAT)
type RedirectToLog ¶
type RedirectToLog bool
Redirect output of sub-processes to log
func (RedirectToLog) ApplyBaseNode ¶
func (l RedirectToLog) ApplyBaseNode(n *gont.BaseNode)
func (RedirectToLog) ApplyCmd ¶
func (l RedirectToLog) ApplyCmd(c *gont.Cmd)
func (RedirectToLog) ApplyNetwork ¶
func (l RedirectToLog) ApplyNetwork(n *gont.Network)
type SourcePortRange ¶
func (SourcePortRange) ApplyNAT ¶
func (spr SourcePortRange) ApplyNAT(n *g.NAT)
type Tbf ¶
func (Tbf) ApplyInterface ¶
type VLANFiltering ¶
type VLANFiltering bool
VLANfiltering configures VLAN filtering. When disabled, the bridge will not consider the VLAN tag when handling packets
func (VLANFiltering) ApplyBridge ¶
func (vf VLANFiltering) ApplyBridge(b *nl.Bridge)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package capture contains the options to configure to packet capturing
|
Package capture contains the options to configure to packet capturing |
Package filters contains the options for configuring NFTables filtering
|
Package filters contains the options for configuring NFTables filtering |
Package tc contains the options for configuring per-interface Traffic Control (TC) queuing disciplines
|
Package tc contains the options for configuring per-interface Traffic Control (TC) queuing disciplines |