Documentation
¶
Index ¶
- Constants
- Variables
- func Contains(start, end, ip net.IP) bool
- func IPLess(a, b net.IP) bool
- func IPNetMaskLess(a, b *net.IPNet) bool
- func IPv4StrToUint32(ipStr string) uint32
- func IPv4ToUint32(ip net.IP) uint32
- func IsFirstIP(ip net.IP, ipv6 bool) bool
- func IsLastIP(ip net.IP, ipv6 bool) bool
- func LastIP(ipNet *net.IPNet) net.IP
- func NextIP(ip net.IP) net.IP
- func PrefixSameLength(start, end net.IP) int
- func PrevIP(ip net.IP) net.IP
- func SuffixZeroLength(ip net.IP) int
- func Uint32ToIPv4(uip uint32) net.IP
- func Uint64ToIP(uip uint64) net.IP
- func Uint64ToIP2(high, low uint64) net.IP
- type Range
- type Ranges
Constants ¶
View Source
const MaxIPv4Uint32 = 4294967295
Variables ¶
Functions ¶
func IPNetMaskLess ¶
IPNetMaskLess CIDR大小比较 IPv4 < IPv6 ones越大,子网范围越小
func IPv4StrToUint32 ¶
IPv4StrToUint32 IPv4字符串 转换为 uint32 (syntactic sugar)
func Uint64ToIP2 ¶ added in v0.1.2
Uint64ToIP2 uint64 转换为 IP
Types ¶
Click to show internal directories.
Click to hide internal directories.