Documentation ¶
Overview ¶
Package iputil contains helper functions for IPv4 address manipulations
Index ¶
- func FirstAdr(subnet *net.IPNet) uint32
- func IPMaskToString(mask *net.IPMask) string
- func IPToUint32(ip *net.IP) uint32
- func IncrIP(ip *net.IP, offset uint32) *net.IP
- func IsIPv4(ip *net.IP) bool
- func IsIPv4Net(ipnet *net.IPNet) bool
- func LastAdr(subnet *net.IPNet) uint32
- func NumAdr(subnet *net.IPNet) uint64
- func Overlap(subnet1, subnet2 *net.IPNet) bool
- func Uint32ToIP(adr uint32) *net.IP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPMaskToString ¶ added in v0.2.2
IPMaskToString converts giver IPMask to dotted decimal format or returns nil for non-IPv4 masks
func IPToUint32 ¶
IPToUint32 converts IPv4 address from net.IP to uint32 format
func Uint32ToIP ¶
Uint32ToIP converts IPv4 address from uint32 to net.IP format
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.