cidr_match.asciidoc 588 B

12345678910111213141516171819202122232425262728293031323334
  1. [discrete]
  2. [[esql-cidr_match]]
  3. === `CIDR_MATCH`
  4. *Syntax*
  5. [source,esql]
  6. ----
  7. CIDR_MATCH(ip, block1[, ..., blockN])
  8. ----
  9. *Parameters*
  10. `ip`::
  11. IP address of type `ip` (both IPv4 and IPv6 are supported).
  12. `blockX`::
  13. CIDR block to test the IP against.
  14. *Description*
  15. Returns `true` if the provided IP is contained in one of the provided CIDR
  16. blocks.
  17. *Example*
  18. [source.merge.styled,esql]
  19. ----
  20. include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs]
  21. ----
  22. [%header.monospaced.styled,format=dsv,separator=|]
  23. |===
  24. include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs-result]
  25. |===