devices

package
v0.0.0-...-42bfd3d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct{}

func (Bridge) Add

func (Bridge) Add(bridge, slaveIf *net.Interface) error

func (Bridge) Create

func (Bridge) Create(name string, ip net.IP, subnet *net.IPNet) (intf *net.Interface, err error)

Create creates a bridge device and returns the interface. If the device already exists, returns the existing interface.

func (Bridge) Destroy

func (Bridge) Destroy(bridge string) error
type Link struct {
}

func (Link) AddDefaultGW

func (Link) AddDefaultGW(intf *net.Interface, ip net.IP) error

func (Link) AddIP

func (Link) AddIP(intf *net.Interface, ip net.IP, subnet *net.IPNet) error

func (Link) InterfaceByName

func (Link) InterfaceByName(name string) (*net.Interface, bool, error)

func (Link) List

func (Link) List() (names []string, err error)

func (Link) SetMTU

func (Link) SetMTU(intf *net.Interface, mtu int) error

func (Link) SetNs

func (Link) SetNs(intf *net.Interface, ns int) error

func (Link) SetUp

func (Link) SetUp(intf *net.Interface) error

type VethCreator

type VethCreator struct{}

func (VethCreator) Create

func (VethCreator) Create(hostIfcName, containerIfcName string) (host, container *net.Interface, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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