network

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureBridgePort added in v1.1.0

func ConfigureBridgePort(linkname string, attrs *BridgeDeviceAttrs) error

func ConfigureRouter

func ConfigureRouter(linkname string, attrs *RouterDeviceAttrs) error

func ConfigureVlanPort

func ConfigureVlanPort(linkname string, attrs *VlanDeviceAttrs) error

func ConfigureVxlanPort

func ConfigureVxlanPort(linkname string, attrs *VxlanDeviceAttrs) error

func CreateBridgeIfNotExist

func CreateBridgeIfNotExist(linkname string) (netlink.Link, error)

func CreateVxlanIfNotExist

func CreateVxlanIfNotExist(linkname string, vni uint32, srcIP net.IP) (netlink.Link, error)

func DeconfigureBridgePort added in v1.1.0

func DeconfigureBridgePort(linkname string, brname string) error

func DeconfigureRouter

func DeconfigureRouter(linkname string) error

func DeconfigureVlanPort

func DeconfigureVlanPort(linkname string, vlan_id uint32) error

func DeconfigureVxlanPort

func DeconfigureVxlanPort(linkname string, vni uint32) error

func RemoveLinkIfExist

func RemoveLinkIfExist(linkname string) error

Types

type BridgeDeviceAttrs added in v1.1.0

type BridgeDeviceAttrs struct {
	Ifname string
	MTU    uint32
}

type RouterDeviceAttrs

type RouterDeviceAttrs struct {
	MTU uint32
}

type VlanDeviceAttrs

type VlanDeviceAttrs struct {
	VlanID uint32
	MTU    uint32
	Parent string
}

type VxlanDeviceAttrs

type VxlanDeviceAttrs struct {
	VNI   uint32
	MTU   uint32
	Local net.IP
}

Jump to

Keyboard shortcuts

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