Versions in this module Expand all Collapse all v0 v0.4.0 Nov 14, 2019 Changes in this version + const ErrBadAS + const ErrBadISD + const ErrBindWithoutSvc + const ErrNilAddress + const ErrNoPorts + const ErrNoPublicAddress + const ErrNoValue + const ErrOverlappingAddress + const ErrSvcNone + const ErrZeroIP + const ErrZeroPort + type IATable interface + LookupID func(ia addr.IA, id uint64) (interface{}, bool) + LookupPublic func(ia addr.IA, public *net.UDPAddr) (interface{}, bool) + LookupService func(ia addr.IA, svc addr.HostSVC, bind net.IP) []interface{} + Register func(ia addr.IA, public *net.UDPAddr, bind net.IP, svc addr.HostSVC, ...) (RegReference, error) + func NewIATable(minPort, maxPort int) IATable + type IPTable map[string]interface + func (t IPTable) OverlapsWith(ip net.IP) bool + func (t IPTable) Route(ip net.IP) (interface{}, bool) + type Reference interface + Free func() + type RegReference interface + RegisterID func(id uint64) error + SVCAddr func() addr.HostSVC + UDPAddr func() *net.UDPAddr + type SCMPTable struct + func NewSCMPTable() *SCMPTable + func (t *SCMPTable) Lookup(id uint64) (interface{}, bool) + func (t *SCMPTable) Register(id uint64, value interface{}) error + func (t *SCMPTable) Remove(id uint64) + type SVCTable interface + Lookup func(svc addr.HostSVC, ip net.IP) []interface{} + Register func(svc addr.HostSVC, address *net.UDPAddr, value interface{}) (Reference, error) + String func() string + func NewSVCTable() SVCTable + type Table struct + func NewTable(minPort, maxPort int) *Table + func (t *Table) LookupID(id uint64) (interface{}, bool) + func (t *Table) LookupPublic(address *net.UDPAddr) (interface{}, bool) + func (t *Table) LookupService(svc addr.HostSVC, bind net.IP) []interface{} + func (t *Table) Register(public *net.UDPAddr, bind net.IP, svc addr.HostSVC, value interface{}) (*TableReference, error) + func (t *Table) Size() int + type TableReference struct + func (r *TableReference) Free() + func (r *TableReference) RegisterID(id uint64, value interface{}) error + func (r *TableReference) UDPAddr() *net.UDPAddr + type UDPPortAllocator struct + func NewUDPPortAllocator(min, max int) *UDPPortAllocator + func (a *UDPPortAllocator) Allocate(ip net.IP, t *UDPPortTable) (int, error) + type UDPPortTable struct + func NewUDPPortTable(minPort, maxPort int) *UDPPortTable + func NewUDPPortTableFromMap(minPort, maxPort int, v4, v6 map[int]IPTable) *UDPPortTable + func (t *UDPPortTable) Insert(address *net.UDPAddr, value interface{}) (*net.UDPAddr, error) + func (t *UDPPortTable) Lookup(address *net.UDPAddr) (interface{}, bool) + func (t *UDPPortTable) Remove(address *net.UDPAddr)