ldns(3)
π NAME π
ldns_rdf, ldns_rdf_type β rdata field type. That's the whole thing bestie, and honestly? It's giving foundational.
Welcome to ldns(3), the page where we talk about the little byte-blobs that make up your resource records. Grab a boba, we're going in. π§β¨
πΈ SYNOPSIS πΈ
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
π¦ DESCRIPTION π¦
β¨ ldns_rdf β¨
Resource record data field. Main character energy, lowkey.
The data is a network ordered array of bytes, and its size is specified by the (16-bit) size field. To correctly parse it, use the type specified in the (16-bit) type field with a value from \ref ldns_rdf_type. No cap, that's the whole trick.
struct ldns_struct_rdf
{
The size of the data (in octets):
size_t _size;
The type of the data:
ldns_rdf_type _type;
Pointer to the data (raw octets):
void *_data;
};
typedef struct ldns_struct_rdf ldns_rdf;
So like β _size is how many octets, _type is the flavor, _data is the raw octets pointing at all of it. Periodt. π
π ldns_rdf_type π
The different types of RDATA fields. Here's the full enum, every single member, not skipping a one, because we don't gatekeep:
enum ldns_enum_rdf_type
{
none:
LDNS_RDF_TYPE_NONE,
domain name:
LDNS_RDF_TYPE_DNAME,
8 bits:
LDNS_RDF_TYPE_INT8,
16 bits:
LDNS_RDF_TYPE_INT16,
32 bits:
LDNS_RDF_TYPE_INT32,
64 bits:
LDNS_RDF_TYPE_INT64,
A record:
LDNS_RDF_TYPE_A,
AAAA record:
LDNS_RDF_TYPE_AAAA,
txt string:
LDNS_RDF_TYPE_STR,
apl data:
LDNS_RDF_TYPE_APL,
b32 string:
LDNS_RDF_TYPE_B32_EXT,
b64 string:
LDNS_RDF_TYPE_B64,
hex string:
LDNS_RDF_TYPE_HEX,
nsec type codes:
LDNS_RDF_TYPE_NSEC,
LDNS_RDF_TYPE_BITMAP = LDNS_RDF_TYPE_NSEC,
a RR type:
LDNS_RDF_TYPE_TYPE,
a class:
LDNS_RDF_TYPE_CLASS,
certificate algorithm:
LDNS_RDF_TYPE_CERT_ALG,
a key algorithm:
LDNS_RDF_TYPE_ALG,
unknown types:
LDNS_RDF_TYPE_UNKNOWN,
time (32 bits):
LDNS_RDF_TYPE_TIME,
period:
LDNS_RDF_TYPE_PERIOD,
tsig time 48 bits:
LDNS_RDF_TYPE_TSIGTIME,
/** Represents the Public Key Algorithm, HIT and Public Key
fields
for the HIP RR types. A HIP specific rdf type is used
because of
the unusual layout in wireformat (see RFC 5205 Section
5) */
LDNS_RDF_TYPE_HIP,
/** variable length any type rdata where the length
is specified by the first 2 bytes */
LDNS_RDF_TYPE_INT16_DATA,
protocol and port bitmaps:
LDNS_RDF_TYPE_SERVICE,
location data:
LDNS_RDF_TYPE_LOC,
well known services:
LDNS_RDF_TYPE_WKS,
NSAP:
LDNS_RDF_TYPE_NSAP,
ATMA:
LDNS_RDF_TYPE_ATMA,
IPSECKEY:
LDNS_RDF_TYPE_IPSECKEY,
nsec3 hash salt:
LDNS_RDF_TYPE_NSEC3_SALT,
nsec3 base32 string (with length byte on wire:
LDNS_RDF_TYPE_NSEC3_NEXT_OWNER,
/** 4 shorts represented as 4 * 16 bit hex numbers
* separated by colons. For NID and L64.
*/
LDNS_RDF_TYPE_ILNP64,
6 * 8 bit hex numbers separated by dashes. For EUI48.:
LDNS_RDF_TYPE_EUI48,
8 * 8 bit hex numbers separated by dashes. For EUI64.:
LDNS_RDF_TYPE_EUI64,
Character string without quotes.:
LDNS_RDF_TYPE_UNQUOTED,
/** A non-zero sequence of US-ASCII letters and numbers in
lower case.
* For CAA.
*/
LDNS_RDF_TYPE_TAG,
/** A <character-string> encoding of the value field as
specified
* [RFC1035], Section 5.1., encoded as remaining rdata.
* For CAA.
*/
LDNS_RDF_TYPE_LONG_STR,
/** Since RFC7218 TLSA records can be given with mnemonics,
* hence these rdata field types. But as with DNSKEYs, the
output
* is always numeric.
*/
LDNS_RDF_TYPE_CERTIFICATE_USAGE,
LDNS_RDF_TYPE_SELECTOR,
LDNS_RDF_TYPE_MATCHING_TYPE,
draft-ietf-mboned-driad-amt-discovery *:
LDNS_RDF_TYPE_AMTRELAY,
draft-ietf-dnsop-svcb-https *:
LDNS_RDF_TYPE_SVCPARAMS,
draft-johnson-dns-ipn-cla-07 *:
LDNS_RDF_TYPE_IPN
};
typedef enum ldns_enum_rdf_type ldns_rdf_type;
That's the entire roster, bestie β from LDNS_RDF_TYPE_NONE all the way down to LDNS_RDF_TYPE_IPN, and yes LDNS_RDF_TYPE_BITMAP is literally just LDNS_RDF_TYPE_NSEC wearing a different outfit. π
π AUTHOR π
The ldns team at NLnet Labs. Legends only, we stan. π«Ά
π REPORTING BUGS π
Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues. Found a gremlin? Tell the team, don't suffer in silence. Not me letting a bug fester π
π COPYRIGHT π
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. Read it and weep β no take-backs, no promises, fr fr. π
β SEE ALSO β
Okay so the original really does repeat a bunch of these, and we're keeping every single one because the rules are the rules:
ldns_rdf_set_sizeldns_rdf_set_typeldns_rdf_set_dataldns_rdf_sizeldns_rdf_get_typeldns_rdf_dataldns_rdf_compareldns_rdf_newldns_rdf_cloneldns_rdf_new_frm_dataldns_rdf_new_frm_strldns_rdf_new_frm_fpldns_rdf_freeldns_rdf_deep_freeldns_rdf_printldns_native2rdf_int8ldns_native2rdf_int16ldns_native2rdf_int32ldns_native2rdf_int16_dataldns_rdf2native_int8ldns_rdf2native_int16ldns_rdf2native_int32ldns_rdf2native_sockaddr_storageldns_rdf2native_time_tldns_native2rdf_int8ldns_native2rdf_int16ldns_native2rdf_int32ldns_native2rdf_int16_dataldns_rdf2native_int8ldns_rdf2native_int16ldns_rdf2native_int32ldns_rdf2native_sockaddr_storageldns_rdf2native_time_tldns_native2rdf_int8ldns_native2rdf_int16ldns_native2rdf_int32ldns_native2rdf_int16_dataldns_rdf2native_int8ldns_rdf2native_int16ldns_rdf2native_int32ldns_rdf2native_sockaddr_storageldns_rdf2native_time_t
(yes, the same ones three times over β iconic, honestly π«Ά)
And also perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
π§ REMARKS π§
This manpage was automatically generated from the ldns source code. Machines wrote it, we just gave it a glow-up. β¨
okay bestie that's the whole ldns(3) page, no crumbs left π
this one's stamped 30 May 2006 and the manual name is ldns(3) β go forth and parse those rdata fields, you're gonna slay ππ
π¦ where this page comes from
- arch rolling: ldns 1.9.2-1 Β· custom:BSD
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- nixos 26.05: ldns 1.9.2
- nixpkgs unstable: ldns 1.9.2
- ubuntu stonking: libldns-dev 1.9.2-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms