udwIPNet

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPNet

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

func GetIpv4RootIpNet

func GetIpv4RootIpNet() IPNet

func GetIpv6RootIpNet

func GetIpv6RootIpNet() IPNet

func MustParseIPNet

func MustParseIPNet(s string) IPNet

func NewIPNetFromIPAndPrefix

func NewIPNetFromIPAndPrefix(ip net.IP, prefix int) IPNet

func NewIPNetFromIPAndPrefixString

func NewIPNetFromIPAndPrefixString(s string) IPNet

func ParseIPNetDefault32

func ParseIPNetDefault32(s string) (IPNet, error)

func (IPNet) ContainIP

func (net IPNet) ContainIP(ip net.IP) bool

func (IPNet) ContainIPNet

func (thisIpnet IPNet) ContainIPNet(ipnet IPNet) bool

func (IPNet) Equal

func (thisIpNet IPNet) Equal(ipnet IPNet) bool

func (IPNet) GetIP

func (ipnet IPNet) GetIP() net.IP

func (IPNet) GetIPString

func (ipnet IPNet) GetIPString() string

func (IPNet) GetIpByteLen

func (ipnet IPNet) GetIpByteLen() int

func (IPNet) GetMaskIpString

func (ipnet IPNet) GetMaskIpString() string

func (IPNet) GetMaskPrefixInIpv6

func (ipnet IPNet) GetMaskPrefixInIpv6() int

func (IPNet) GetParentIpNet

func (thisIpNet IPNet) GetParentIpNet() IPNet

func (IPNet) GetPrefix

func (ipnet IPNet) GetPrefix() int

func (IPNet) IsRootIpNet

func (thisIpNet IPNet) IsRootIpNet() bool

func (IPNet) String

func (net IPNet) String() string

func (IPNet) ToGoIPNet

func (thisIpNet IPNet) ToGoIPNet() *net.IPNet

type IPNetSet

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

func NewAllPassIPNet

func NewAllPassIPNet() *IPNetSet

func NewIpSetFromIpAndPrefixList

func NewIpSetFromIpAndPrefixList(ipPrefixList []string) *IPNetSet

func (*IPNetSet) ContainIP

func (set *IPNetSet) ContainIP(ip net.IP) bool

func (*IPNetSet) GetIPNetList

func (set *IPNetSet) GetIPNetList() []IPNet

func (*IPNetSet) MergeIPNet

func (set *IPNetSet) MergeIPNet(ipnet IPNet)

func (*IPNetSet) RemoveIPNet

func (set *IPNetSet) RemoveIPNet(ipnet IPNet)

func (*IPNetSet) SimpleIpNet

func (set *IPNetSet) SimpleIpNet()

func (*IPNetSet) String

func (set *IPNetSet) String() string

type Ipv4Net

type Ipv4Net uint64

func MustParseIpv4Net

func MustParseIpv4Net(s string) Ipv4Net

func NewIpv4NetFromIP

func NewIpv4NetFromIP(s string) Ipv4Net

func NewIpv4NetFromIPAndPrefixString

func NewIpv4NetFromIPAndPrefixString(s string) Ipv4Net

func NewIpv4NetFromUint32IpAndPrefix

func NewIpv4NetFromUint32IpAndPrefix(ip uint32, prefix int) Ipv4Net

func (Ipv4Net) ContainIP

func (thisIpnet Ipv4Net) ContainIP(ip net.IP) bool

func (Ipv4Net) ContainIPNet

func (thisIpnet Ipv4Net) ContainIPNet(ipnet Ipv4Net) bool

func (Ipv4Net) ContainUint32Ip

func (thisIpnet Ipv4Net) ContainUint32Ip(ip uint32) bool

func (Ipv4Net) Equal

func (thisIpNet Ipv4Net) Equal(ipnet Ipv4Net) bool

func (Ipv4Net) GetIp

func (thisIpNet Ipv4Net) GetIp() net.IP

func (Ipv4Net) GetMaskIpString

func (thisIpNet Ipv4Net) GetMaskIpString() string

func (Ipv4Net) GetPrefix

func (thisIpNet Ipv4Net) GetPrefix() int

func (Ipv4Net) GetUint32Ip

func (thisIpNet Ipv4Net) GetUint32Ip() uint32

func (Ipv4Net) String

func (thisIpNet Ipv4Net) String() string

func (Ipv4Net) ToGoIPNet

func (thisIpNet Ipv4Net) ToGoIPNet() *net.IPNet

type Ipv4NetSet

type Ipv4NetSet struct {
	List []Ipv4Net
	// contains filtered or unexported fields
}

func NewAllPassIpv4Net

func NewAllPassIpv4Net() *Ipv4NetSet

func (*Ipv4NetSet) ContainIP

func (set *Ipv4NetSet) ContainIP(ip net.IP) bool

func (*Ipv4NetSet) GetIpv4NetList

func (set *Ipv4NetSet) GetIpv4NetList() []Ipv4Net

func (*Ipv4NetSet) MergeIPNet

func (set *Ipv4NetSet) MergeIPNet(ipnet Ipv4Net)

func (*Ipv4NetSet) RemoveIPNet

func (set *Ipv4NetSet) RemoveIPNet(ipnet Ipv4Net)

func (*Ipv4NetSet) RemoveIp

func (set *Ipv4NetSet) RemoveIp(ip net.IP)

func (*Ipv4NetSet) RemoveIpString

func (set *Ipv4NetSet) RemoveIpString(ipString string)

func (*Ipv4NetSet) Sort

func (set *Ipv4NetSet) Sort()

func (*Ipv4NetSet) String

func (set *Ipv4NetSet) String() string

Jump to

Keyboard shortcuts

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