iproute2

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 4 Imported by: 2

README

QEMU

Dependency packages

  • iproute2
apt install -y \
    iproute2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

func NewBridge

func NewBridge(name string) (*Bridge, error)

func (*Bridge) Delete

func (b *Bridge) Delete() error

ip link del name $name

func (Bridge) GetIPv4

func (b Bridge) GetIPv4() (string, error)

func (Bridge) GetIPv6

func (b Bridge) GetIPv6() (string, error)

func (*Bridge) ListSlaves

func (b *Bridge) ListSlaves() ([]string, error)

ip link list

func (Bridge) Name

func (b Bridge) Name() string

func (*Bridge) SetAddress

func (b *Bridge) SetAddress(addr string) error

ip addr replace $addr dev $name Golang の net ライブラリはCIDRを一つの型として扱えるものがないので、stringを受け取る Example:

192.168.0.1/24

func (*Bridge) Up

func (b *Bridge) Up() error

ip link set dev $name up

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

func GetInterface

func GetInterface(name string) (*Interface, error)

func (Interface) Name

func (i Interface) Name() string

func (*Interface) SetMaster

func (i *Interface) SetMaster(b *Bridge) error

func (Interface) Up

func (i Interface) Up() error

type Tap

type Tap struct {
	// contains filtered or unexported fields
}

func NewTap

func NewTap(name string) (*Tap, error)

func (*Tap) Delete

func (t *Tap) Delete() error

func (Tap) Name

func (t Tap) Name() string

func (*Tap) SetMaster

func (t *Tap) SetMaster(b *Bridge) error

func (*Tap) Up

func (t *Tap) Up() error

type Vlan

type Vlan struct {
	// contains filtered or unexported fields
}

func NewVlan

func NewVlan(i *Interface, id int) (*Vlan, error)

func (*Vlan) Delete

func (v *Vlan) Delete() error

func (*Vlan) Name

func (v *Vlan) Name() string

func (*Vlan) SetMaster

func (v *Vlan) SetMaster(b *Bridge) error

func (*Vlan) Up

func (v *Vlan) Up() error

ip link set dev $name up

Jump to

Keyboard shortcuts

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