dnsjit.lib.ip3
Ip address utility library
Usage
local ip = require("dnsjit.lib.ip")
print(ip.ipstring(ipv4_cdata))
print(ip.ip6string(ipv6_cdata), true)
Overview
A library to help with various IP address related tasks, such as printing them.
Functions
Ip.tostring(ip, pretty)-
Return an IPv4 or IPv6 address as a string. If it's an IPv6 address the optional argument pretty is true then return an easier to read IPv6 address. Return an empty string on invalid input.
Ip.ipstring(ip)-
Return a IPv4 address as a string. The input is a 4-byte cdata array.
Ip.ip6string(ip6, pretty)-
Return the IPv6 address as a string. The input is a 16-byte cdata array. If pretty is true then return an easier to read IPv6 address.
AUTHORS and CONTRIBUTORS
Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC)
Maintained by DNS-OARC
https://www.dns-oarc.net/
Releases
2 releases since Debian 12 (Bookworm); the text changed 1 time.