dnsjit.lib.ip(3)

πŸ“¦
version 1.5.1 Β· 5 versions
, in epel 10, epel 9, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– dnsjit.lib.ip β€” the manual, but make it cute

okay bestie, welcome to dnsjit.lib.ip(3), aka the IP address utility library from dnsjit. it's giving "small but mighty". let's get into it 🫢


✨ NAME ✨

dnsjit.lib.ip β€” an IP address utility library. that's the whole vibe. it helps you do IP-address-y tasks, and yes, printing them counts as a task πŸ’…


✨ SYNOPSIS ✨

local ip = require("dnsjit.lib.ip")
print(ip.ipstring(ipv4_cdata))
print(ip.ip6string(ipv6_cdata), true)

look at that. three lines and you're already printing addresses like a main character ✨


✨ DESCRIPTION ✨

so this is a library that helps with various IP address related tasks, such as printing them. that's it, that's the job, and it does it slayfully πŸ’–

🌸 Functions 🌸

  • Ip.tostring(ip, pretty) β€” returns an IPv4 or IPv6 address as a string. if the address is an IPv6 one and the optional argument pretty is true, then you get back an easier to read IPv6 address (obsessed). and if the input is invalid? you get an empty string. no drama, just empty. periodt πŸŽ€
  • Ip.ipstring(ip) β€” returns an IPv4 address as a string. heads up bestie, the input has to be a 4-byte cdata array. four bytes. that's the whole thing πŸ‘‘
  • Ip.ip6string(ip6, pretty) β€” returns the IPv6 address as a string. the input here is a 16-byte cdata array (yes, sixteen, it's the big one). if pretty is true, you get back an easier to read IPv6 address. it's giving readable 🌈

✨ SEE ALSO ✨

go read those too, they're the sisters of this page πŸ’œ


✨ AUTHORS and CONTRIBUTORS ✨

shoutout to the icons who made this:

  • Jerry LundstrΓΆm (DNS-OARC)
  • TomΓ‘Ε‘ KΕ™Γ­ΕΎek (CZ.NIC)
  • Petr Ε paček (ISC)

maintained by DNS-OARC 🫢

https://www.dns-oarc.net/

✨ BUGS ✨

found a bug? got a feature request? do not suffer in silence, bestie. for issues and feature requests please use:

https://codeberg.org/DNS-OARC/dnsjit/issues

and for questions and help please use:

admin@dns-oarc.net
ngl they're very nice, just tell them what's up πŸ’–

that's the whole page, no cap. this was dnsjit.lib.ip(3), version 1.5.1 β€” thanks for reading, you ate πŸŽ€βœ¨πŸ‘‘