ldns(3)

πŸ“¦
version 1.9.2 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ ldns(3) β€” Library Functions Manual πŸ‘‘

okay bestie, gather round, because this is the ldns page for packet types and honestly? it's giving foundational. you found the Library Functions Manual entry ldns(3), and we're about to get into it. no cap. πŸ’–


✨ NAME ✨

ldns_pkt, ldns_pkt_section, ldns_pkt_type β€” request or answer packets types πŸ¦‹


🌸 SYNOPSIS 🌸

#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

 ldns_pkt_section();

 ldns_pkt_type();

like yes, that's the whole vibe up top, keep scrolling for the tea ⬇️


πŸ’… DESCRIPTION πŸ’…

πŸŽ€ ldns_pkt πŸŽ€

DNS packet ⭐

This structure contains a complete DNS packet (either a query or an answer).

It is the complete representation of what you actually send to a nameserver, and what it sends back (assuming you are the client here). literally the whole conversation, in one struct. iconic.

struct ldns_struct_pkt
{
     Header section:
     ldns_hdr *_header;
     /* extra items needed in a packet */
     an rdf (A or AAAA) with the IP address of the server it is
from:
     ldns_rdf *_answerfrom;
        Timestamp of the time the packet was sent or created:
     struct timeval timestamp;
     The duration of the query this packet is an answer to:
     uint32_t _querytime;
     The size of the wire format of the packet in octets:
     size_t _size;
     Optional tsig rr:
     ldns_rr *_tsig_rr;
     EDNS0 available buffer size, see RFC2671:
     uint16_t _edns_udp_size;
     EDNS0 Extended rcode:
     uint8_t _edns_extended_rcode;
     EDNS Version:
     uint8_t _edns_version;
     /* OPT pseudo-RR presence flag */
     uint8_t _edns_present;
     Reserved EDNS data bits:
     uint16_t _edns_z;
     Arbitrary EDNS rdata:
     ldns_rdf *_edns_data;
     Structed EDNS data:
     ldns_edns_option_list *_edns_list;
     Question section:
     ldns_rr_list   *_question;
     Answer section:
     ldns_rr_list   *_answer;
     Authority section:
     ldns_rr_list   *_authority;
     Additional section:
     ldns_rr_list   *_additional;
};
typedef struct ldns_struct_pkt ldns_pkt;

so yeah β€” header, the rdf with the server's IP, the timestamp, the query duration, the wire size, optional tsig, a whole EDNS situation (buffer size, extended rcode, version, the presence flag, reserved bits, arbitrary rdata, structed data), and then the four sections: question, answer, authority, additional. main character struct energy, fr fr. πŸ‘‘


πŸ¦‹ ldns_pkt_section() πŸ¦‹

listed right there in the synopsis, bestie. that's the mention it gets. πŸ™ˆ


πŸ¦‹ ldns_pkt_type() πŸ¦‹

same deal β€” it's in the synopsis, and that's all this page says about it. πŸ’œ


🫢 AUTHOR 🫢

The ldns team at NLnet Labs.


😭 REPORTING BUGS 😭

Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues

(they wanna hear from you, ngl β€” bugs are not the vibe but reporting them is πŸ’–)


Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

⚠️ bestie that "NO warranty" is in all caps for a reason. if it breaks, it's on you. periodt.

🌈 SEE ALSO 🌈

go read all of these, they're the extended universe:

ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new,
ldns_pkt_query_new_frm_str, ldns_pkt_reply_type, ldns_pkt_id,
ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd,
ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode,
ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount,
ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig,
ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority,
ldns_pkt_additional, ldns_pkt_get_section_clone,
ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type,
ldns_pkt_rr_list_by_name_and_type, ldns_pkt_set_flags, ldns_pkt_set_id,
ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd,
ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode,
ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount,
ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom,
ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count,
ldns_pkt_set_tsig, ldns_pkt_edns, ldns_pkt_edns_udp_size,
ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z,
ldns_pkt_edns_unassigned, ldns_pkt_edns_data,
ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode,
ldns_pkt_set_edns_version, ldns_pkt_set_edns_z,
ldns_pkt_set_edns_unassigned, ldns_pkt_set_edns_data.

And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. 🧚


⭐ REMARKS ⭐

This manpage was automatically generated from the ldns source code. (so if a sentence feels a little robot-coded, that's why β€” the robot did it, not me 😭)


and that's the whole page, bestie!! this lil' slice of ldns(3) is dated 30 May 2006 and it's part of the ldns library functions manual β€” yeah, it's an elder but it still ate. go forth and slay your packets πŸ’…βœ¨πŸŽ€πŸ¦‹