fflibnet

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPv4Addrs added in v0.2.0

func GetIPv4Addrs(ifname string) ([]netlink.Addr, error)
func GetNIdFromLink(ifname string) (uint8, error)

func IncIP

func IncIP(ip net.IP)

func ParseBridgeFlag added in v0.4.0

func ParseBridgeFlag(s string) (uint16, error)

func ParseBridgeState added in v0.4.0

func ParseBridgeState(s string) (int, error)

func StringBridgeFlag added in v0.4.0

func StringBridgeFlag(v uint16) string

func StringBridgeState added in v0.4.0

func StringBridgeState(v int) string

func StringBridgeStates added in v0.4.0

func StringBridgeStates(v int, delim string) string

func ToBroadcast

func ToBroadcast(nw *net.IPNet) net.IP

Types

type IPGenerator

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

func NewIPGenerator

func NewIPGenerator(nw *net.IPNet) *IPGenerator

func (*IPGenerator) IsBroadcast

func (g *IPGenerator) IsBroadcast(ip net.IP) bool

func (*IPGenerator) NextIP

func (g *IPGenerator) NextIP() (net.IP, error)

func (*IPGenerator) Reset

func (g *IPGenerator) Reset()

type IPMap

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

IPMap

func NewIPMap

func NewIPMap(generator IPMapGenerator) *IPMap

func (*IPMap) Contains

func (m *IPMap) Contains(key net.IP) bool

func (*IPMap) Free

func (m *IPMap) Free(key net.IP)

func (*IPMap) Value

func (m *IPMap) Value(key net.IP) (net.IP, error)

func (*IPMap) Walk

func (m *IPMap) Walk(f func(string, net.IP) bool)

type IPMapDefaultGenerator

type IPMapDefaultGenerator struct{}

Generator (default)

func NewIPMapDefaultGenerator

func NewIPMapDefaultGenerator() *IPMapDefaultGenerator

func (*IPMapDefaultGenerator) Free

func (g *IPMapDefaultGenerator) Free(key net.IP, val net.IP)

func (*IPMapDefaultGenerator) New

func (g *IPMapDefaultGenerator) New(key net.IP) (net.IP, error)

type IPMapGenerator

type IPMapGenerator interface {
	New(net.IP) (net.IP, error)
	Free(net.IP, net.IP)
}

Generator interface

type IPMapIPNetGenerator

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

Generator (tield IP Network)

func NewIPMapIPNetGenerator

func NewIPMapIPNetGenerator(nw *net.IPNet) *IPMapIPNetGenerator

func (*IPMapIPNetGenerator) Free

func (g *IPMapIPNetGenerator) Free(key net.IP, val net.IP)

func (*IPMapIPNetGenerator) New

func (g *IPMapIPNetGenerator) New(key net.IP) (net.IP, error)

type IPMapPoolGenerator

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

Generator (Pool)

func NewIPMapPoolGenerator

func NewIPMapPoolGenerator() *IPMapPoolGenerator

func (*IPMapPoolGenerator) Add

func (m *IPMapPoolGenerator) Add(val net.IP)

func (*IPMapPoolGenerator) AddIPNet

func (m *IPMapPoolGenerator) AddIPNet(nw *net.IPNet)

func (*IPMapPoolGenerator) Free

func (m *IPMapPoolGenerator) Free(key net.IP, val net.IP)

func (*IPMapPoolGenerator) New

func (m *IPMapPoolGenerator) New(key net.IP) (net.IP, error)

Jump to

Keyboard shortcuts

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