.\" 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.core.object.dns.label 3 "1.2.3" "dnsjit" .SH NAME dnsjit.core.object.dns.label \- Container of a DNS label .SH DESCRIPTION The object that describes a DNS label. To extract a domain name label first check that .I have_dn is set, then use .I "offset + 1" to indicate where in the payload the label start and .I length for how many bytes long it is. .SS Attributes .TP is_end .TP have_length Set if there is a length. .TP have_offset Set if there is an offset. .TP have_extension_bits Set if there is extension bits. .TP have_dn Set if the label contained a domain name. .TP extension_bits The extension bits. .TP length The length of the domain name. .TP offset If .I have_dn is set then this contains the offset within the payload to where this label start otherwise it contains the offset to another label. .SS Functions .TP .BR Label.new "(size)" Create a new array of labels. .TP .BR Label.tostring "(dns, labels, num_labels, offset_labels)" Returns labels as a string and an offset to the next label. The string may be nil if the first label was an offset. The offset may be nil if the last label was an extension bits or end marker. .TP .BR Label.tooffstr "(dns, labels, num_labels, offset_labels)" Returns labels as a string which also includes a textual notation of the offset in the form of .IR "label" . .SH SEE ALSO .BR dnsjit.core.object.dns (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