diff --git a/docs/user/ppl/functions/ip.rst b/docs/user/ppl/functions/ip.rst index ff6d929d45..3387974af5 100644 --- a/docs/user/ppl/functions/ip.rst +++ b/docs/user/ppl/functions/ip.rst @@ -14,18 +14,25 @@ CIDRMATCH Description >>>>>>>>>>> -Usage: cidrmatch(ip, cidr) returns whether the given IP address is within the specified CIDR IP address range. Supports both IPv4 and IPv6 addresses. +Usage: `cidrmatch(ip, cidr)` checks if `ip` is within the specified `cidr` range. Argument type: STRING, STRING Return type: BOOLEAN -Example:: +Example: - os> source=weblogs | where cidrmatch(host, "199.120.110.0/24") | fields host ; + os> source=weblogs | where cidrmatch(host, '199.120.110.0/24') | fields host fetched rows / total rows = 1/1 +----------------+ | host | |----------------| | 199.120.110.21 | +----------------+ + +Note: + - `ip` can be an IPv4 or an IPv6 address + - `cidr` can be an IPv4 or an IPv6 block + - `ip` and `cidr` must be either both IPv4 or both IPv6 + - `ip` and `cidr` must both be valid and non-empty/non-null +