dnsjit.cor....dns.label(3)
π dnsjit.core.object.dns.label β the DNS label container, bestie edition π
okay so real quick, this page lives in the dnsjit.cor....dns.label(3) corner of the Library Functions Manual and it's all about one lil' guy: the DNS label. let's get into it π
β¨ NAME β¨
dnsjit.core.object.dns.label β a container of a DNS label π·οΈ
π¦ DESCRIPTION π¦
so this is the object that describes a DNS label, periodt. if you wanna extract a domain name label, first check that have_dn is set β vibe check first, always β then use offset + 1 to say where in the payload the label actually starts, and length for how many bytes long it is. no cap, that's the whole trick π
πΈ Attributes πΈ
is_endβ yeah it's just... there. sitting pretty. (that's all the docs say bestie, I'm not making stuff up π)have_lengthβ set if there's a length. slay.have_offsetβ set if there's an offset. iconic.have_extension_bitsβ set if there are extension bits. okurr.have_dnβ set if the label contained a domain name. πextension_bitsβ the extension bits themselves, obviously.lengthβ the length of the domain name.offsetβ so ifhave_dnis set, this holds the offset within the payload to where this label starts. otherwise? it holds the offset to another label. two moods, one field β¨
π Functions π
Label.new(size)β makes you a brand new array of labels. fresh out the box, size-many of them π«ΆLabel.tostring(dns, labels, num_labels, offset_labels)β returns the labels as a string plus an offset pointing to the next label. it takeslabels, which is an array of labels returned by any of the parse functions, andnum_labels, the number of labels in that array. the optionaloffset_labelslets you skip some labels at the start (very "I'm not reading allat" of you, and honestly valid). heads up though: the return string may benilif the first label was an offset, and the return offset may benilif the last label was an extension bits or end marker πLabel.torfc1035(dns, labels, num_labels, offset_labels)β same energy but it returns an RFC1035 domain name of the labels and an offset to the next label. takeslabels, an array of labels returned by any of the parse functions, andnum_labels, number of labels in the array. optionaloffset_labelscan be used to skip labels at the start. the return string may benilif the first label was an offset, and the return offset may benilif the last label was an extension bits or end marker πLabel.tooffstr(dns, labels, num_labels, offset_labels)β returns the labels as a string that also includes a textual notation of the offset, in the form<offset>label. takeslabels, an array of labels returned by any of the parse functions, andnum_labels, the number of labels in the array. optionaloffset_labelscan be used to skip labels at the start. cute lil annotated vibes π
π SEE ALSO π
π AUTHORS and CONTRIBUTORS π
the icons who built 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 something broken or got a feature request? for issues and feature requests please use:
https://codeberg.org/DNS-OARC/dnsjit/issues
got questions or need help? for question and help please use:
admin@dns-oarc.net
and that's the whole page bestie, no notes π this was dnsjit version 1.5.1, straight from the dnsjit.cor....dns.label(3) manual β go forth and parse those labels, you absolute main character π
β¨π¦
π¦ where this page comes from
- epel 10: dnsjit 1.5.1-2.el10_2 Β· GPL-3.0-or-later
- epel 9: dnsjit 1.5.1-2.el9 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- ubuntu resolute: dnsjit 1.5.1-2 Β· GPL-3.0-or-later
- ubuntu stonking: dnsjit-dev 1.5.1-6 Β· GPL-3.0-or-later
- Copyright (c) 2018-2026 OARC, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms