iproute2

package
v0.3.9-2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrSrch

func IsErrSrch(err error) bool

Types

type Address

type Address struct {
	*Link
	// contains filtered or unexported fields
}

func NewAddress

func NewAddress(ifname string, addresses ...string) *Address

func (*Address) Add

func (address *Address) Add() *Address

func (*Address) Del

func (address *Address) Del() *Address

func (*Address) Exact

func (address *Address) Exact() *Address

func (*Address) List4

func (address *Address) List4() ([]net.IPNet, error)
type Link struct {
	// contains filtered or unexported fields
}
func NewLink(ifname string) *Link

func (*Link) Address

func (l *Link) Address(address string) *Link

func (*Link) Down

func (l *Link) Down() *Link

func (*Link) Err

func (l *Link) Err() error

func (*Link) MTU

func (l *Link) MTU(mtu int) *Link

func (*Link) ResetErr

func (l *Link) ResetErr()

func (*Link) Up

func (l *Link) Up() *Link

type Route

type Route struct {
	*Link
}

func NewRoute

func NewRoute(ifname string) *Route

func (*Route) Add

func (route *Route) Add(netStr, maskStr, gwStr string) *Route

func (*Route) AddByCidr

func (route *Route) AddByCidr(cidr string, gwStr string) *Route

func (*Route) AddByIPNet

func (route *Route) AddByIPNet(ipnet *net.IPNet, gw net.IP) *Route

func (*Route) AddByRouteSpec

func (route *Route) AddByRouteSpec(r RouteSpec) *Route

func (*Route) Del

func (route *Route) Del(netStr, maskStr string) *Route

func (*Route) DelByCidr

func (route *Route) DelByCidr(cidr string) *Route

func (*Route) DelByIPNet

func (route *Route) DelByIPNet(ipnet *net.IPNet) *Route

func (*Route) List4

func (route *Route) List4() ([]RouteSpec, error)

type RouteSpec

type RouteSpec = netlink.Route

func RouteGetByDst

func RouteGetByDst(dstStr string) ([]RouteSpec, error)

Jump to

Keyboard shortcuts

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