Documentation
¶
Index ¶
- Constants
- func CIDRStringToName(s string) string
- func CIDRToName(cidr *net.IPNet) string
- func CountFromMaskSize(version string, maskSize int) (*big.Int, error)
- func IPToName(ip net.IP) string
- func NameToCIDR(version, name string) (*net.IPNet, error)
- func NameToCIDRIP(version, name string) (*net.IPNet, error)
- func NameToIP(version, name string) (net.IP, error)
- func NamesToCIDRIPRanges(version string, names ...string) (*iprange.IPRanges, error)
- func NamesToIPIPRanges(version string, names ...string) (*iprange.IPRanges, error)
Constants ¶
View Source
const ( IPv4 = "IPv4" IPv6 = "IPv6" )
Variables ¶
This section is empty.
Functions ¶
func CIDRStringToName ¶
CIDRToName converts CIDR string to resource name.
func CIDRToName ¶
CIDRToName converts CIDR to resource name.
func CountFromMaskSize ¶
CountFromMaskSize calculates the number of IP addresses based on the size of the subnet mask.
func NameToCIDR ¶
NameToCIDR converts resource name to CIDR based on the IP version.
func NameToCIDRIP ¶
NameToCIDRIP converts resource name to IP address(CIDR) based on the IP version.
func NamesToCIDRIPRanges ¶
NamesToCIDRIPRanges converts resource names to IPRanges (CIDR) based on the IP version.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.