IP manipulation routines
List of Global Functions
BitsToIPv4 - Converts 32 bit binary number to its IPv4 repserentation.
Check - Check syntax of IP address
Check4 - Check syntax of IPv4 address
Check6 - Check syntax of IPv6 address
ComputeBroadcast - Compute IPv4 broadcast address from ip4 address and network mask.
ComputeNetwork - Compute IPv4 network address from ip4 address and network mask.
IPv4ToBits - Converts IPv4 into its 32 bit binary representation.
ToHex - Converts IPv4 address from string to hex format
ToInteger - Convert IPv4 address from string to integer
ToString - Convert IPv4 address from integer to string
Valid4 - Describe a valid IPv4 address
List of Global Variables
Converts 32 bit binary number to its IPv4 repserentation.
Function parameters
string bits
Return value
string - ipv4
Example 18.
BitsToIPv4("10111100000110001110001100000101") -> "188.24.227.5" BitsToIPv4("00110101000110001110001001100101") -> "53.24.226.101"
Check syntax of IP address
Function parameters
string ip
Return value
boolean - true if correct
Check syntax of IPv4 address
Function parameters
string ip
Return value
boolean - true if correct
Check syntax of IPv6 address
Function parameters
string ip
Return value
boolean - true if correct
Compute IPv4 broadcast address from ip4 address and network mask.
Function parameters
string ip
string mask
Return value
string - computed broadcast
Compute IPv4 network address from ip4 address and network mask.
Function parameters
string ip
string mask
Return value
string - computed subnet
Converts IPv4 into its 32 bit binary representation.
Function parameters
string ipv4
Return value
string - binary
Example 19.
IPv4ToBits("80.25.135.2") -> "01010000000110011000011100000010" IPv4ToBits("172.24.233.211") -> "10101100000110001110100111010011"
Converts IPv4 address from string to hex format
Function parameters
string ip
Return value
string - representing IP in Hex
Convert IPv4 address from string to integer
Function parameters
string ip
Return value
integer - ip address as integer
Convert IPv4 address from integer to string
Function parameters
integer ip
Return value
string - ip address as string