cidr

package
v0.0.0-...-17b02d1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IpCidrSet

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

func NewIpCidrSet

func NewIpCidrSet() *IpCidrSet

func ReadIpCidrSet

func ReadIpCidrSet(r io.Reader) (ss *IpCidrSet, err error)

func (*IpCidrSet) AddIpCidr

func (set *IpCidrSet) AddIpCidr(ipCidr netip.Prefix) (err error)

func (*IpCidrSet) AddIpCidrForString

func (set *IpCidrSet) AddIpCidrForString(ipCidr string) error

func (*IpCidrSet) Foreach

func (set *IpCidrSet) Foreach(f func(prefix netip.Prefix) bool)

func (*IpCidrSet) IsContain

func (set *IpCidrSet) IsContain(ip netip.Addr) bool

func (*IpCidrSet) IsContainForString

func (set *IpCidrSet) IsContainForString(ipString string) bool

func (*IpCidrSet) IsEmpty

func (set *IpCidrSet) IsEmpty() bool

func (*IpCidrSet) MatchIp

func (set *IpCidrSet) MatchIp(ip netip.Addr) bool

MatchIp implements C.IpMatcher

func (*IpCidrSet) Merge

func (set *IpCidrSet) Merge() error

func (*IpCidrSet) ToIPSet

func (set *IpCidrSet) ToIPSet() *netipx.IPSet

ToIPSet not safe convert to *netipx.IPSet be careful, must be used after Merge

func (*IpCidrSet) WriteBin

func (ss *IpCidrSet) WriteBin(w io.Writer) (err error)

Jump to

Keyboard shortcuts

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