common

package
v0.1.0-beta.20 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodIfaceEth0 = "eth0"
)

Variables

This section is empty.

Functions

func AddrListByName

func AddrListByName(iface string, family int) ([]netlink.Addr, error)

func GetPodNativeIP

func GetPodNativeIP(podNS ns.NetNS, family int) (net.IP, error)

getPodNativeIP returns IP on Pod iface eth0 NOTE: will return nil if no IP allocated on pod eth0 iface.

func GetVlanIfaceOnHost

func GetVlanIfaceOnHost(
	master string, mtu int, vlanID int,
) (*types100.Interface, error)

GetVlanIfaceOnHost gets the VLAN interface <ifname>.<vlanID> (eth0.100) on host and create if not exists.

func SetPromiscOn

func SetPromiscOn(iface string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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