linux

package
v0.0.0-...-682ebcb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DHCP_SERVER_PORT = 67
	DHCP_IFNAME      = "dhcp0"
)
View Source
const (
	VXLAN_PORT = 4789
	VXLAN_TTL  = 5
)
View Source
const MAX_LENGTH = unix.IFNAMSIZ - 1

Variables

This section is empty.

Functions

func CompactIfName

func CompactIfName(name, prefix, suffix string) string

func ConfigureVtep

func ConfigureVtep(
	sw *models.Switch, port *models.SwitchPort,
	encapIfindex int, encapAddr netip.Addr,
) (vxlan *netlink.Vxlan, err error)

Create and configure a Linux VXLAN interface using a multicast group address and VNI derived from the logical switch name.

func EnsureNetns

func EnsureNetns(name string) (netns.NsHandle, *netlink.Handle, error)

Create a netns and return a netlink socket to interacting with it.

func PrepareDhcpNetns

func PrepareDhcpNetns(
	zone *models.DHCPZone, name string,
) (veth *netlink.Veth, err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL