cidr_match.asciidoc 419 B

12345678910111213141516
  1. [discrete]
  2. [[esql-cidr_match]]
  3. === `CIDR_MATCH`
  4. Returns `true` if the provided IP is contained in one of the provided CIDR
  5. blocks.
  6. `CIDR_MATCH` accepts two or more arguments. The first argument is the IP
  7. address of type `ip` (both IPv4 and IPv6 are supported). Subsequent arguments
  8. are the CIDR blocks to test the IP against.
  9. [source,esql]
  10. ----
  11. FROM hosts
  12. | WHERE CIDR_MATCH(ip, "127.0.0.2/32", "127.0.0.3/32")
  13. ----