common

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PodIfaceEth0 = "eth0"
	PodIfaceEth1 = "eth1"
)

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