Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStandardized ¶
CheckStandardized checks if the IP stored in object is the first IP in range or not @input ip uint32: The IP address in integer representation @input netmask uint32: The netmask of the CIDR range @returns error: If not the first IP in range, an error is returned. Else, return value is nil
func ConvertIPToString ¶
ConvertIPToString converts an integer IP address to its string representation @param ip uint32: IP address in integer representation @returns string: IP address in string representation
func GetCIDRRangeLength ¶
GetCIDRRangeLength calculates the number of IP addresses in that CIDR range @input mask uint8: The mask for the CIDR range @returns uint32: The length of the CIDR range
func GetNetmask ¶
GetNetmask takes the mask number as input and creates the netmask from it @input mask uint8: The mask for the CIDR range @returns uint32: The integer representation of the netmask
func Standardize ¶
Standardize converts the IP to the first IP address of the CIDR range @input ip uint32: The IP address in integer representation @input netmask uint32: The netmask of the CIDR range @returns uint32: First IP in CIDR range
Types ¶
This section is empty.