iputils

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOriginAddrInvalidAddrChunk = errors.New("invalid address chunk in origin address")
View Source
var ErrOriginAddrInvalidPort = errors.New("invalid port in origin address")

Functions

This section is empty.

Types

type IP

type IP struct {
	net.IP
}

func (*IP) IsIPv6

func (ip *IP) IsIPv6() bool

func (*IP) ToString

func (ip *IP) ToString() string

type NeighborIPAddresses

type NeighborIPAddresses struct {
	IPs map[*IP]struct{}
}

func NewNeighborIPAddresses

func NewNeighborIPAddresses() *NeighborIPAddresses

func (*NeighborIPAddresses) Add

func (ips *NeighborIPAddresses) Add(ip *IP)

func (*NeighborIPAddresses) GetPreferredAddress

func (ips *NeighborIPAddresses) GetPreferredAddress(preferIPv6 bool) *IP

func (*NeighborIPAddresses) Len

func (ips *NeighborIPAddresses) Len() int

func (*NeighborIPAddresses) Remove

func (ips *NeighborIPAddresses) Remove(ip *IP)

func (*NeighborIPAddresses) Union added in v0.2.2

type OriginAddress

type OriginAddress struct {
	Addr       string
	Port       uint16
	PreferIPv6 bool
}

OriginAddress represents a tuple of a IP or hostname, port and IPv6 preference

func ParseOriginAddress

func ParseOriginAddress(s string) (*OriginAddress, error)

func (*OriginAddress) String

func (ra *OriginAddress) String() string

Jump to

Keyboard shortcuts

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