Versions in this module Expand all Collapse all v1 v1.0.0 Feb 6, 2018 Changes in this version + const AFI_IP + const AFI_IP6 + const AFI_MAX + var MaskBits = []byte + var MaskReverseBits = []byte + func CopyIP(ip net.IP) net.IP + func IPNetFromPrefix(p *Prefix) net.IPNet + func ParseIPv4(s string) net.IP + func SameIp(a net.IP, b net.IP) bool + type Prefix struct + Length int + func NewPrefixAFI(afi int) *Prefix + func ParsePrefix(s string) (*Prefix, error) + func PrefixFromIPNet(net net.IPNet) *Prefix + func PrefixFromIPPrefixlen(ip net.IP, len int) *Prefix + func PrefixFromNode(n *PtreeNode) *Prefix + func (p *Prefix) AFI() int + func (p *Prefix) ApplyMask() *Prefix + func (p *Prefix) ApplyReverseMask() *Prefix + func (p *Prefix) ByteLength() int + func (p *Prefix) Copy() *Prefix + func (p *Prefix) Equal(x *Prefix) bool + func (p *Prefix) IsDefault() bool + func (p *Prefix) MarshalJSON() ([]byte, error) + func (p *Prefix) Match(q *Prefix) bool + func (p *Prefix) String() string + type Ptree struct + func NewPtree(maxKeyBits int) *Ptree + func (this *Ptree) Acquire(key []byte, keyLength int) *PtreeNode + func (this *Ptree) AcquireByIPv4(key []byte) *PtreeNode + func (this *Ptree) AcquireByIPv6(key []byte) *PtreeNode + func (this *Ptree) AcquireByMaxBits(key []byte) *PtreeNode + func (this *Ptree) AcquireByUint32(keyInt uint32) *PtreeNode + func (this *Ptree) AcquireWithItem(key []byte, keyLength int, v interface{}) *PtreeNode + func (this *Ptree) Lookup(key []byte, keyLength int) *PtreeNode + func (this *Ptree) LookupByIPv4(key []byte) *PtreeNode + func (this *Ptree) LookupByIPv6(key []byte) *PtreeNode + func (this *Ptree) LookupByMaxBits(key []byte) *PtreeNode + func (this *Ptree) LookupByUint32(keyInt uint32) *PtreeNode + func (this *Ptree) LookupTop() *PtreeNode + func (this *Ptree) Match(key []byte, keyLength int) *PtreeNode + func (this *Ptree) MatchIPv4(key []byte) *PtreeNode + func (this *Ptree) MatchIPv6(key []byte) *PtreeNode + func (this *Ptree) Next(node *PtreeNode) *PtreeNode + func (this *Ptree) Release(node *PtreeNode) + func (this *Ptree) ReleaseByUint32(keyInt uint32) + func (this *Ptree) ReleaseWithItem(key []byte, keyLength int, v interface{}) + func (this *Ptree) ReverseOrderSet() + func (this *Ptree) Top() *PtreeNode + type PtreeNode struct + Item interface{} + func NewPtreeNode(key []byte, keyLength int) *PtreeNode + func (n *PtreeNode) Key() []byte + func (n *PtreeNode) KeyLength() int + func (node *PtreeNode) Refcnt() uint32