bridge

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultMTU is the default MTU for new bridge interfaces.
	DefaultMTU = 1500
)

Variables

View Source
var (
	// ErrIPAddrEmpty holds the error for when the ip address is empty.
	ErrIPAddrEmpty = errors.New("ip address cannot be empty")
	// ErrNameEmpty holds the error for when the name is empty.
	ErrNameEmpty = errors.New("name cannot be empty")
)

Functions

func Delete

func Delete(name string) error

Delete removes the bridge by the specified name.

func Init

func Init(opt Opt) (*net.Interface, error)

Init creates a bridge with the name specified if it does not exist.

Types

type Opt

type Opt struct {
	MTU    int
	IPAddr string
	Name   string
}

Opt holds the options for the bridge interface.

Jump to

Keyboard shortcuts

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