driver

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MTU = 1500
)

Variables

View Source
var (
	LINK_IP = &net.IPNet{
		IP:   net.IPv4(169, 254, 1, 1),
		Mask: net.CIDRMask(32, 32),
	}
)

Functions

func SetupVethPair

func SetupVethPair(contVethName, pairName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error)

Types

type NetnsDriver

type NetnsDriver interface {
	Setup(hostVeth string,
		containerVeth string,
		ipv4Addr *net.IPNet,
		gateway net.IP,
		extraRoutes []*types.Route,
		deviceId int,
		ingress uint64,
		egress uint64,
		netNS ns.NetNS) error
	Teardown(hostVeth string, containerVeth string, netNS ns.NetNS) error
}

NetnsDriver to config container netns interface and routes

var NicDriver NetnsDriver = &rawNicDriver{}
var VethDriver NetnsDriver = &vethDriver{}

Jump to

Keyboard shortcuts

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