Documentation ¶
Index ¶
- func DeriveGatewayIP(cidr string) string
- func GetIPAtIndex(ipNet net.IPNet, index int64) net.IP
- func GetNextIP(ip net.IP) net.IP
- func IPs2str(ips []net.IP) []string
- func IPsHasAll(a []net.IP, b []net.IP) bool
- func IPsIntersect(a []net.IP, b []net.IP) bool
- func IPv6(ip net.IP) bool
- func NetEqual(ipn1 *net.IPNet, ipn2 *net.IPNet) bool
- func ToIP(addr string) (net.IP, error)
- func ToIPMap(addrs []net.IP) map[string]net.IP
- func ToIPs(addrs []string) ([]net.IP, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveGatewayIP ¶ added in v1.2.0
DeriveGatewayIP gateway ip from cidr
func GetIPAtIndex ¶ added in v1.2.1
GetIPAtIndex get the IP by index in the range of ipNet. The index is start with 0.
func GetNextIP ¶ added in v1.4.1
GetNextIP returns the next IP from the given IP address. If the given IP is the last IP of a v4 or v6 range, the same IP is returned.
func IPsIntersect ¶
IPsIntersect return is 2 set is intersect
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.