{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "ip_prefix",
  "description" : "Truncates an IP to a given prefix length.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "ip",
          "type" : "ip",
          "optional" : false,
          "description" : "IP address of type `ip` (both IPv4 and IPv6 are supported)."
        },
        {
          "name" : "prefixLengthV4",
          "type" : "integer",
          "optional" : false,
          "description" : "Prefix length for IPv4 addresses."
        },
        {
          "name" : "prefixLengthV6",
          "type" : "integer",
          "optional" : false,
          "description" : "Prefix length for IPv6 addresses."
        }
      ],
      "variadic" : false,
      "returnType" : "ip"
    }
  ],
  "examples" : [
    "ROW ip4 = to_ip(\"1.2.3.4\"), ip6 = TO_IP(\"fe80::cae2:65ff:fece:feb9\")\n| EVAL ip4_prefix = IP_PREFIX(ip4, 24, 0), ip6_prefix = IP_PREFIX(ip6, 0, 112);"
  ],
  "preview" : false,
  "snapshot_only" : false
}
