net

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddress

func AddAddress(name string, addrs string) error

func AddDefaultRoutes

func AddDefaultRoutes(iface config.NetIface) error

func Clear

func Clear(c *config.Config)

Remove interface which is created for container but allocated under host

func CreateIface

func CreateIface(c *config.Config, iface *config.NetIface) error

func DeleteInterface

func DeleteInterface(name string) error

func FindFreePodIPs

func FindFreePodIPs(hostIpsText string) (string, error)

func SetInterfaceUp

func SetInterfaceUp(name string) error

func SetName

func SetName(c *config.Config, oldName string, newName string) error

func SetNs

func SetNs(iface config.NetIface, pid int) error

func WaitInterface added in v1.3.0

func WaitInterface(name string) error

Types

type IP_TYPE

type IP_TYPE uint8
const (
	IP_TYPE_V4 IP_TYPE = 4
	IP_TYPE_V6 IP_TYPE = 6
)

type Ifname

type Ifname struct {
	Host string
	Cont string
}

func NewIfName

func NewIfName(c *config.Config) Ifname

type InerfaceType

type InerfaceType uint8
const (
	InterfaceTypeBridge InerfaceType = iota
	InterfaceTypeVeth
	InterfaceTypeMacvlan
)

type NetInterface

type NetInterface struct {
	PeerName string
	netlink.LinkAttrs
	InterfaceType InerfaceType
}

Jump to

Keyboard shortcuts

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