35 lines
588 B
Plaintext
35 lines
588 B
Plaintext
[discrete]
|
|
[[esql-cidr_match]]
|
|
=== `CIDR_MATCH`
|
|
|
|
*Syntax*
|
|
|
|
[source,esql]
|
|
----
|
|
CIDR_MATCH(ip, block1[, ..., blockN])
|
|
----
|
|
|
|
*Parameters*
|
|
|
|
`ip`::
|
|
IP address of type `ip` (both IPv4 and IPv6 are supported).
|
|
|
|
`blockX`::
|
|
CIDR block to test the IP against.
|
|
|
|
*Description*
|
|
|
|
Returns `true` if the provided IP is contained in one of the provided CIDR
|
|
blocks.
|
|
|
|
*Example*
|
|
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs-result]
|
|
|===
|