cidr_match.asciidoc 408 B

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