Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
IPv4CIDRToRange
Introduced in: v20.1.0 Takes an IPv4 address with its Classless Inter-Domain Routing (CIDR) prefix length and returns the subnet’s address range as a tuple of two IPv4 values: the first and last addresses in that subnet. For the IPv6 version seeIPv6CIDRToRange.
Syntax
Tuple(IPv4, IPv4)
Examples
Usage example
Query
Response
IPv4NumToString
Introduced in: v1.1.0 Converts a 32-bit integer to its IPv4 address string representation in dotted decimal notation (A.B.C.D format). Interprets the input using big-endian byte ordering. SyntaxINET_NTOA
Arguments
num— IPv4 address as UInt32 number.UInt32
0 if the format is invalid. String
Examples
Usage example
Query
Response
IPv4NumToStringClassC
Introduced in: v1.1.0 Converts a 32-bit integer to its IPv4 address string representation in dotted decimal notation (A.B.C.D format), similar toIPv4NumToString but using xxx instead of the last octet.
Syntax
num— IPv4 address as UInt32 number.UInt32
String
Examples
Basic example with aggregation
Query
Response
IPv4StringToNum
Introduced in: v1.1.0 Converts an IPv4 address string in dotted decimal notation (A.B.C.D format) to its corresponding 32-bit integer representation. (The reverse ofIPv4NumToString).
If the IPv4 address has an invalid format, an exception is thrown.
Syntax
INET_ATON
Arguments
string— IPv4 address string.String
UInt32
Examples
Usage example
Query
Response
IPv4StringToNumOrDefault
Introduced in: v22.3.0 Converts an IPv4 address string in dotted decimal notation (A.B.C.D format) to its corresponding 32-bit integer representation but if the IPv4 address has an invalid format, it returns0.
Syntax
string— IPv4 address string.String
0 if invalid. UInt32
Examples
Example with an invalid address
Query
Response
IPv4StringToNumOrNull
Introduced in: v22.3.0 Converts a 32-bit integer to its IPv4 address string representation in dotted decimal notation (A.B.C.D format) but if the IPv4 address has an invalid format, it returnsNULL.
Syntax
string— IPv4 address string.String
NULL if invalid. Nullable(UInt32)
Examples
Example with an invalid address
Query
Response
IPv4ToIPv6
Introduced in: v1.1.0 Interprets a (big endian) 32-bit number as an IPv4 address, which is then interpreted as the corresponding IPv6 address inFixedString(16) format.
Syntax
x— IPv4 address.UInt32
FixedString(16)
Examples
Usage example
Query
Response
IPv6CIDRToRange
Introduced in: v20.1.0 Takes an IPv6 address with its Classless Inter-Domain Routing (CIDR) prefix length and returns the subnet’s address range as a tuple of two IPv6 values: the lowest and highest addresses in that subnet. For the IPv4 version seeIPv4CIDRToRange.
Syntax
Tuple(IPv6, IPv6)
Examples
Usage example
Query
Response
IPv6NumToString
Introduced in: v1.1.0 Converts an IPv6 address from binary format (FixedString(16)) to its standard text representation. IPv4-mapped IPv6 addresses are displayed in the format::ffff:111.222.33.44.
Syntax
INET6_NTOA
Arguments
x— IPv6 address in binary format.FixedString(16)orIPv6
String
Examples
Usage example
Query
Response
Query
Response
Query
Response
IPv6StringToNum
Introduced in: v1.1.0 Converts an IPv6 address from its standard text representation to binary format (FixedString(16)).
Accepts IPv4-mapped IPv6 addresses in the format ::ffff:111.222.33.44..
If the IPv6 address has an invalid format, an exception is thrown.
If the input string contains a valid IPv4 address, returns its IPv6 equivalent.
HEX can be uppercase or lowercase.
Syntax
INET6_ATON
Arguments
string— IPv6 address string.String
FixedString(16)
Examples
Basic example
Query
Response
IPv6StringToNumOrDefault
Introduced in: v22.3.0 Converts an IPv6 address from its standard text representation to binary format (FixedString(16)).
Accepts IPv4-mapped IPv6 addresses in the format ::ffff:111.222.33.44..
If the IPv6 address has an invalid format, it returns the default value ::.
Syntax
string— IPv6 address string.String
FixedString(16)
Examples
Basic example with invalid address
Query
Response
IPv6StringToNumOrNull
Introduced in: v22.3.0 Converts an IPv6 address from its standard text representation to binary format (FixedString(16)).
Accepts IPv4-mapped IPv6 addresses in the format ::ffff:111.222.33.44..
If the IPv6 address has an invalid format, it returns NULL.
Syntax
string— IPv6 address string.String
NULL if invalid. Nullable(FixedString(16))
Examples
Basic example with invalid address
Query
Response
cutIPv6
Introduced in: v1.1.0 Accepts aFixedString(16) value containing the IPv6 address in binary format.
Returns a string containing the address of the specified number of bytes removed in text format.
Syntax
x— IPv6 address in binary format.FixedString(16)orIPv6bytesToCutForIPv6— Number of bytes to cut for IPv6.UInt8bytesToCutForIPv4— Number of bytes to cut for IPv4.UInt8
String
Examples
Usage example
Query
Response
isIPAddressInRange
Introduced in: v21.4.0 Determines if an IP address is contained in a network represented in the Classless Inter-Domain Routing (CIDR) notation. This function accepts both IPv4 and IPv6 addresses (and networks) represented as strings. It returns0 if the IP version of the address and the CIDR don’t match.
Syntax
1 if the IP version of the address and the CIDR match, otherwise 0. UInt8
Examples
IPv4 address in range
Query
Response
Query
Response
Query
Response
isIPv4String
Introduced in: v21.1.0 Determines whether the input string is an IPv4 address or not. For the IPv6 version seeisIPv6String.
Syntax
string— IP address string to check.String
1 if string is IPv4 address, otherwise 0. UInt8
Examples
Usage example
Query
Response
isIPv6String
Introduced in: v21.1.0 Determines whether the input string is an IPv6 address or not. For the IPv4 version seeisIPv4String.
Syntax
string— IP address string to check.String
1 if string is IPv6 address, otherwise 0. UInt8
Examples
Usage example
Query
Response
toIPv4
Introduced in: v20.1.0 Converts a string or a UInt32 form of IPv4 address to type IPv4. It is similar toIPv4StringToNum and IPv4NumToString functions but it supports both string and unsigned integer data types as input arguments.
Syntax
x— An IPv4 addressStringorUInt8/16/32
IPv4
Examples
Usage example
Query
Response
Query
Response
Query
Response
toIPv4OrDefault
Introduced in: v22.3.0 Converts a string or a UInt32 form of an IPv4 address toIPv4 type.
If the IPv4 address has an invalid format, it returns 0.0.0.0 (0 IPv4), or the provided IPv4 default.
Syntax
string— IP address string to convert.Stringdefault— Optional. The value to return if string is an invalid IPv4 address.IPv4
IPv4
Examples
Valid and invalid IPv4 strings
Query
Response
toIPv4OrNull
Introduced in: v22.3.0 Converts an input value to a value of typeIPv4 but returns NULL in case of an error.
Like toIPv4 but returns NULL instead of throwing an exception on conversion errors.
Supported arguments:
- String representations of IPv4 addresses in dotted decimal notation.
- Integer representations of IPv4 addresses.
NULL):
- Invalid IP address formats.
- IPv6 addresses.
- Out-of-range values.
- Malformed addresses.
NULL. IPv4 or NULL
Examples
Usage example
Query
Response
toIPv4OrZero
Introduced in: v23.1.0 Converts an input value to a value of type IPv4 but returns zero IPv4 address in case of an error. LiketoIPv4 but returns zero IPv4 address (0.0.0.0) instead of throwing an exception on conversion errors.
Supported arguments:
- String representations of IPv4 addresses in dotted decimal notation.
- Integer representations of IPv4 addresses.
- Invalid IP address formats.
- IPv6 addresses.
- Out-of-range values.
0.0.0.0). IPv4
Examples
Usage example
Query
Response
toIPv6
Introduced in: v20.1.0 onverts a string or aUInt128 form of IPv6 address to IPv6 type.
For strings, if the IPv6 address has an invalid format, returns an empty value.
Similar to IPv6StringToNum and IPv6NumToString functions, which convert IPv6 address to and from binary format (i.e. FixedString(16)).
If the input string contains a valid IPv4 address, then the IPv6 equivalent of the IPv4 address is returned.
Syntax
IPv6
Examples
Usage example
Query
Response
Query
Response
toIPv6OrDefault
Introduced in: v22.3.0 Converts a string or a UInt128 form of IPv6 address toIPv6 type.
If the IPv6 address has an invalid format, it returns :: (0 IPv6) or the provided IPv6 default.
Syntax
string— IP address string to convert. -default— Optional. The value to return if string has an invalid format.
:: or the provided optional default if argument string has an invalid format. IPv6
Examples
Valid and invalid IPv6 strings
Query
Response
toIPv6OrNull
Introduced in: v22.3.0 Converts an input value to a value of typeIPv6 but returns NULL in case of an error.
Like toIPv6 but returns NULL instead of throwing an exception on conversion errors.
Supported arguments:
- String representations of IPv6 addresses in standard notation.
- String representations of IPv4 addresses (converted to IPv4-mapped IPv6).
- Binary representations of IPv6 addresses.
NULL):
- Invalid IP address formats.
- Malformed IPv6 addresses.
- Out-of-range values.
- Invalid notation.
x— A string representation of an IPv6 or IPv4 address.String
NULL. IPv6 or NULL
Examples
Usage example
Query
Response
toIPv6OrZero
Introduced in: v23.1.0 Converts an input value to a value of type IPv6 but returns zero IPv6 address in case of an error. LiketoIPv6 but returns zero IPv6 address (::) instead of throwing an exception on conversion errors.
Supported arguments:
- String representations of IPv6 addresses in standard notation.
- String representations of IPv4 addresses (converted to IPv4-mapped IPv6).
- Binary representations of IPv6 addresses.
- Invalid IP address formats.
- Malformed IPv6 addresses.
- Out-of-range values.
x— A string representation of an IPv6 or IPv4 address.String
::). IPv6
Examples
Usage example
Query
Response