Documentation ¶
Index ¶
- Constants
- Variables
- func Filter(h g.FilterHook, stmts ...filters.Statement) g.FilterRule
- type Address
- type AgingTime
- type EmptyDir
- type ExistingDockerContainer
- type ExistingNetworkNamespace
- type FullyRandomNAT
- type GoBuildFlags
- type Group
- type HardwareAddress
- type HelloTime
- type MTU
- type MulticastSnooping
- type Netem
- type NetemOption
- type PeerHardwareAddress
- type Persistent
- type PersistentNAT
- type RandomNAT
- type RedirectToLog
- type Route
- type Slice
- type SourcePortRange
- type Tbf
- type TbfOption
- type TxQLen
- type VLANFiltering
Constants ¶
const ( SouthBound = Group(g.DeviceGroupSouthBound) NorthBound = Group(g.DeviceGroupNorthBound) )
const HostNamespace = ExistingNetworkNamespace("host")
HostNamespace creates the node using the network namespace of the calling process
Variables ¶
var BuildFlagsDebug = GoBuildFlags{"-gcflags", "all=-N -l"} //nolint:gochecknoglobals
BuildFlagsDebug builds the Go binary without compiler optimizations like inlining to improve debugging.
Functions ¶
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 aging 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 ExistingNetworkNamespace ¶ added in v2.10.0
type ExistingNetworkNamespace string
The name of an existing network namespace which is used instead of creating a new one.
func (ExistingNetworkNamespace) ApplyBaseNode ¶ added in v2.10.0
func (e ExistingNetworkNamespace) 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 *g.BaseNode)
func (RedirectToLog) ApplyCmd ¶
func (l RedirectToLog) ApplyCmd(c *g.Cmd)
func (RedirectToLog) ApplyNetwork ¶
func (l RedirectToLog) ApplyNetwork(n *g.Network)
type Slice ¶ added in v2.10.0
type Slice string
Slice set the systemd slice / CGroup in which all processes of this node, network or command are started.
func (Slice) ApplyBaseNode ¶ added in v2.10.0
func (Slice) ApplyNetwork ¶ added in v2.10.0
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 |