Documentation
¶
Overview ¶
Package iptool provides tools for working with IP addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool interface { // IsPrivate checks whether the given IP address is private, meaning it's // using one of the addresses designated by IANA as not routable on the Internet, // or the address of one of the interfaces on the current host. // // Specifically, it considers an IP private if it matches any of these conditions: // - Is an IPv4 special use address as defined in https://tools.ietf.org/html/rfc5735#section-3 // - Is an IPv6 special use address as defined in https://tools.ietf.org/html/rfc5156 // - Is an address assigned to any of the current machine's network interfaces IsPrivate(addr *net.IPAddr) bool }
Click to show internal directories.
Click to hide internal directories.