IP functions
IP functions
This section explains how to use IP functions in APL.
The table summarizes the IP functions available in APL.
Function | Description |
---|---|
format_ipv4 | Parses input with a netmask and returns string representing IPv4 address. |
geo_info_from_ip_address | Extracts geographical, geolocation, and network information from IP addresses. |
has_any_ipv4 | Returns a Boolean value indicating whether the specified column contains any of the given IPv4 addresses. |
has_any_ipv4_prefix | Returns a Boolean value indicating whether the IPv4 address matches any of the specified prefixes. |
has_ipv4 | Returns a Boolean value indicating whether the given IPv4 address is valid and found in the source text. |
has_ipv4_prefix | Returns a Boolean value indicating whether the given IPv4 address starts with a specified prefix. |
ipv4_compare | Compares two IPv4 addresses. |
ipv4_is_in_range | Checks if IPv4 string address is in IPv4-prefix notation range. |
ipv4_is_in_any_range | Returns a Boolean value indicating whether the given IPv4 address is in any specified range. |
ipv4_is_match | Returns a Boolean value indicating whether the given IPv4 matches the specified pattern. |
ipv4_is_private | Checks if IPv4 string address belongs to a set of private network IPs. |
ipv4_netmask_suffix | Returns the value of the IPv4 netmask suffix from IPv4 string address. |
parse_ipv4 | Converts input to long (signed 64-bit) number representation. |
parse_ipv4_mask | Converts input string and IP-prefix mask to long (signed 64-bit) number representation. |
IP-prefix notation
You can define IP addresses with IP-prefix notation using a slash (/
) character. The IP address to the left of the slash is the base IP address. The number (1 to 32) to the right of the slash is the number of contiguous bits in the netmask. For example, 192.168.2.0/24
has an associated net/subnetmask containing 24 contiguous bits or 255.255.255.0
in dotted decimal format.
Was this page helpful?