DNS::LDNS::RData(3)
π DNS::LDNS::RData β the manual page, but make it cute π
okay bestie, welcome to DNS::LDNS::RData(3) from the User Contributed Perl Documentation girlies π this is the little page that explains RData β aka the rdata field, or a dname, inside an rr. yes it's giving "DNS internals" and yes you're gonna slay it. β¨
β¨ NAME β¨
DNS::LDNS::RData β Rdata field or a dname in an rr π
π¦ SYNOPSIS π¦
here's the whole vibe, copy-paste ready, no cap:
use DNS::LDNS ':all'
my rd = new DNS::LDNS::RData(rdf_type, str)
rd2 = rd->clone
rdf_type = rd->type
rd->set_type(rdf_type)
rd->print(\*FILE)
str = rd->to_string
count = rd->label_count
rd2 = rd->label(pos)
bool = rd->is_wildcard
bool = rd->matches_wildcard(wildcard)
bool = rd->is_subdomain(parent)
rd2 = rd->left_chop
status = rd->cat(rd2)
rd->compare(rd2)
rd2 = rd->address_reverse
rd2 = rd->dname_reverse
rd2 = rd->nsec3_hash_name(name, algorithm, iterations, salt)
epoch = rd->to_unix_time
( epoch = rd->2native_time_t )
rr_type = rd->to_rr_type
so like, what's happening here π
- You build one with
new DNS::LDNS::RData(rdf_type, str)β give it a type and a string, boom, you got an object. Or you canrd->clonean existing one if you want a twin. main character duplication energy π rd->typereads the rdf type,rd->set_type(rdf_type)sets it. read it, write it, obsessed.rd->print(\*FILE)dumps it out to a filehandle, andrd->to_stringgives you the string version instead. lowkey both are useful.- Labelling era:
rd->label_counttells you how many labels there are,rd->label(pos)hands you the one at pos. - Wildcard checks bestie!!
rd->is_wildcard,rd->matches_wildcard(wildcard), andrd->is_subdomain(parent)β all returning bools, all doing exactly what they say π«Ά rd->left_chopβ literally chops from the left. iconic behaviour.- The duo:
rd->cat(rd2)concatenates and gives you back a status, andrd->compare(rd2)compares. and thenrd->address_reverseandrd->dname_reverseflip things around for you π - NSEC3 moment:
rd->nsec3_hash_name(name, algorithm, iterations, salt)β give it a name, algorithm, iterations and salt, get back a hashed name. it's giving cryptography, it's giving slay π§ - Time stuff:
rd->to_unix_timegives you anepoch, and there'srd->2native_time_tfor the same energy. - And finally
rd->to_rr_typehands you back anrr_type. cute.
fr fr, just follow the signature order and you're golden β the args are positional, no named-arg nonsense here.
π SEE ALSO π
go touch grass at the source, bestie:
π AUTHOR π
Erik Pihl Ostlyngen, <erik.ostlyngen@uninett.no> β the legend who wrote this. shoutout π«‘
π COPYRIGHT AND LICENSE π
Copyright (C) 2013 by UNINETT Norid AS
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
so yeah, it's free software, same terms as Perl, version 5.14.2 or any later version you have. you're covered, you're safe, you're thriving π
and that's the page, bestie!! this was DNS::LDNS::RData(3) from perl v5.42.2, dated 2026-06-11 β tysm for reading, go write some rdata, ily, periodt π
β¨πΈ
π¦ where this page comes from
- fedora 43: perl-ldns 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: perl-ldns 1.9.2-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms