This page explains how to use the ipv4_is_match function in APL.
The ipv4_is_match
function in APL helps you determine whether a given IPv4 address matches a specific IPv4 pattern. This function is especially useful for tasks that involve IP address filtering, including network security analyses, log file inspections, and geo-locational data processing. By specifying patterns that include wildcards or CIDR notations, you can efficiently check if an IP address falls within defined ranges or meets specific conditions.
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
Splunk SPL users
The ipv4_is_match
function in APL resembles the cidrmatch
function in Splunk SPL. Both functions assess whether an IP address falls within a designated CIDR range, but ipv4_is_match
also supports wildcard pattern matching, providing additional flexibility.
ANSI SQL users
ANSI SQL lacks a direct equivalent to the ipv4_is_match
function, but you can replicate similar functionality with a combination of LIKE
and range checking. However, these approaches can be complex and less efficient than ipv4_is_match
, which simplifies CIDR and wildcard-based IP matching.
192.168.1.0/24
).192.168.1.0/24
).true
if the IPv4 addresses match.false
otherwise.null
if the conversion of an IPv4 string wasn’t successful.The ipv4_is_match
function allows you to identify traffic based on IP addresses, enabling faster identification of traffic patterns and potential issues.
Query
Output
_time | id | status | method | uri | is_match |
---|---|---|---|---|---|
2023-11-11T13:20:14 | 203.0.113.45 | 403 | GET | /admin | true |
2023-11-11T13:30:32 | 203.0.113.101 | 401 | POST | /restricted | true |
This page explains how to use the ipv4_is_match function in APL.
The ipv4_is_match
function in APL helps you determine whether a given IPv4 address matches a specific IPv4 pattern. This function is especially useful for tasks that involve IP address filtering, including network security analyses, log file inspections, and geo-locational data processing. By specifying patterns that include wildcards or CIDR notations, you can efficiently check if an IP address falls within defined ranges or meets specific conditions.
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
Splunk SPL users
The ipv4_is_match
function in APL resembles the cidrmatch
function in Splunk SPL. Both functions assess whether an IP address falls within a designated CIDR range, but ipv4_is_match
also supports wildcard pattern matching, providing additional flexibility.
ANSI SQL users
ANSI SQL lacks a direct equivalent to the ipv4_is_match
function, but you can replicate similar functionality with a combination of LIKE
and range checking. However, these approaches can be complex and less efficient than ipv4_is_match
, which simplifies CIDR and wildcard-based IP matching.
192.168.1.0/24
).192.168.1.0/24
).true
if the IPv4 addresses match.false
otherwise.null
if the conversion of an IPv4 string wasn’t successful.The ipv4_is_match
function allows you to identify traffic based on IP addresses, enabling faster identification of traffic patterns and potential issues.
Query
Output
_time | id | status | method | uri | is_match |
---|---|---|---|---|---|
2023-11-11T13:20:14 | 203.0.113.45 | 403 | GET | /admin | true |
2023-11-11T13:30:32 | 203.0.113.101 | 401 | POST | /restricted | true |