long2ip()

Converts any integer to an IPv4 address string.

Syntax

long2ip(LONG_INT)
Required Parameters
LONG_INT
Expression that returns a long integer. The function returns null if it receives an invalid value of any other type.

Usage

json "{}" | eval long2ip=long2ip(3232235521) => "192.168.0.1"
json "{}" | eval long2ip=long2ip(2130706433) => "127.0.0.1"
json "{}" | eval long2ip=long2ip(-1) => "255.255.255.255"
json "{}" | eval long2ip=long2ip(-1062731775) => "192.168.0.1"