Documentation ¶
Index ¶
- Constants
- func DetectDefaultMTU(_ int) (int, error)
- func DetectMTU(ip net.IP, _ int) (int, error)
- func Table(str string) (int, error)
- type BSDLink
- func (d *BSDLink) AddAddress(ip net.IPNet) error
- func (d *BSDLink) AddRoute(dst net.IPNet, gw net.IP, table int) error
- func (d *BSDLink) Close() error
- func (d *BSDLink) DeleteAddress(ip net.IPNet) error
- func (d *BSDLink) DeleteRoute(dst net.IPNet, table int) error
- func (d *BSDLink) Flags() net.Flags
- func (d *BSDLink) Index() int
- func (d *BSDLink) MTU() int
- func (d *BSDLink) Name() string
- func (d *BSDLink) SetDown() error
- func (d *BSDLink) SetMTU(mtu int) error
- func (d *BSDLink) SetUp() error
- func (d *BSDLink) Type() string
- type Link
Constants ¶
View Source
const (
EthernetMTU = 1500
)
View Source
const (
TypeWireGuard = "wireguard"
)
Variables ¶
This section is empty.
Functions ¶
func DetectDefaultMTU ¶
Types ¶
type BSDLink ¶
type BSDLink struct {
// contains filtered or unexported fields
}
func CreateWireGuardLink ¶
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.