.\" Copyright (c) 2018-2022, OARC, Inc. .\" All rights reserved. .\" .\" This file is part of dnsjit. .\" .\" dnsjit is free software: you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation, either version 3 of the License, or .\" (at your option) any later version. .\" .\" dnsjit is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with dnsjit. If not, see . .\" .TH dnsjit.lib.ip 3 "1.2.3" "dnsjit" .SH NAME dnsjit.lib.ip \- IP address utility library .SH SYNOPSIS local ip = require("dnsjit.lib.ip") print(ip.ipstring(ipv4_cdata)) print(ip.ip6string(ipv6_cdata), true) .SH DESCRIPTION A library to help with various IP address related tasks, such as printing them. .SS Functions .TP .BR Ip.tostring "(ip, pretty)" Return an IPv4 or IPv6 address as a string. If it's an IPv6 address the optional argument .I pretty is true then return an easier to read IPv6 address. Return an empty string on invalid input. .TP .BR Ip.ipstring "(ip)" Return a IPv4 address as a string. The input is a 4-byte cdata array. .TP .BR Ip.ip6string "(ip6, pretty)" Return the IPv6 address as a string. The input is a 16-byte cdata array. If .I pretty is true then return an easier to read IPv6 address. .SH SEE ALSO .BR dnsjit.core.object.ip (3), .BR dnsjit.core.object.ip6 (3) .SH AUTHORS and CONTRIBUTORS Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC) .LP Maintained by DNS-OARC .LP .RS .I https://www.dns-oarc.net/ .RE .LP .SH BUGS For issues and feature requests please use: .LP .RS \fIhttps://github.com/DNS-OARC/dnsjit/issues\fP .RE .LP For question and help please use: .LP .RS \fIadmin@dns-oarc.net\fP .RE .LP