Documentation ¶
Index ¶
- Constants
- func DetectDefaultMTU(_ int) (int, error)
- func DetectMTU(ip net.IP, _ int) (int, error)
- func Table(str string) (int, error)
- type Link
- type LinuxLink
- func (d *LinuxLink) AddAddress(ip net.IPNet) error
- func (d *LinuxLink) AddRoute(dst net.IPNet, gw net.IP, table int) error
- func (d *LinuxLink) Close() error
- func (d *LinuxLink) DeleteAddress(ip net.IPNet) error
- func (d *LinuxLink) DeleteRoute(dst net.IPNet, table int) error
- func (d *LinuxLink) Flags() net.Flags
- func (d *LinuxLink) Index() int
- func (d *LinuxLink) MTU() int
- func (d *LinuxLink) Name() string
- func (d *LinuxLink) SetDown() error
- func (d *LinuxLink) SetMTU(mtu int) error
- func (d *LinuxLink) SetUp() error
- func (d *LinuxLink) Type() string
Constants ¶
View Source
const (
EthernetMTU = 1500
)
View Source
const (
RouteProtocol = 98
)
View Source
const (
TypeWireGuard = "wireguard"
)
Variables ¶
This section is empty.
Functions ¶
func DetectDefaultMTU ¶
Types ¶
type Link ¶
type Link interface { Close() error Name() string Index() int MTU() int Flags() net.Flags Type() string SetMTU(mtu int) error SetUp() error SetDown() error AddAddress(ip net.IPNet) error AddRoute(dst net.IPNet, gw net.IP, table int) error DeleteAddress(ip net.IPNet) error DeleteRoute(dst net.IPNet, table int) error }
Click to show internal directories.
Click to hide internal directories.