Versions in this module Expand all Collapse all v1 v1.0.0 Jun 8, 2021 Changes in this version + const IPv4PrefixLen + const IPv6PrefixLen + func Compare(a, b *Prefix) int + type Cursor struct + func NewCursor(ps []Prefix) *Cursor + func Parse(s string) (*Cursor, error) + func (c *Cursor) First() *Position + func (c *Cursor) Last() *Position + func (c *Cursor) List() []Prefix + func (c *Cursor) Next() *Position + func (c *Cursor) Pos() *Position + func (c *Cursor) Prev() *Position + func (c *Cursor) Reset(ps []Prefix) + func (c *Cursor) Set(pos *Position) error + type Position struct + IP net.IP + Prefix Prefix + func (p *Position) IsBroadcast() bool + func (p *Position) IsSubnetRouterAnycast() bool + type Prefix struct + func Aggregate(ps []Prefix) []Prefix + func NewPrefix(n *net.IPNet) *Prefix + func Summarize(first, last net.IP) []Prefix + func Supernet(ps []Prefix) *Prefix + func (p *Prefix) Contains(q *Prefix) bool + func (p *Prefix) Equal(q *Prefix) bool + func (p *Prefix) Exclude(q *Prefix) []Prefix + func (p *Prefix) Hostmask() net.IPMask + func (p *Prefix) Last() net.IP + func (p *Prefix) Len() int + func (p *Prefix) MarshalBinary() ([]byte, error) + func (p *Prefix) MarshalText() ([]byte, error) + func (p *Prefix) NumNodes() *big.Int + func (p *Prefix) Overlaps(q *Prefix) bool + func (p *Prefix) Subnets(n int) []Prefix + func (p *Prefix) UnmarshalBinary(b []byte) error + func (p *Prefix) UnmarshalText(txt []byte) error + func (p Prefix) String() string