feat: add full Zonemaster stack with Docker and Spanish UI

- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:19:24 +02:00
commit 8d4eaa1489
1567 changed files with 204155 additions and 0 deletions

View File

@@ -0,0 +1,313 @@
package Zonemaster::LDNS::Packet;
use strict;
use warnings;
use Zonemaster::LDNS;
use Zonemaster::LDNS::RRList;
use MIME::Base64;
sub TO_JSON {
my ( $self ) = @_;
return {
'Zonemaster::LDNS::Packet' => {
data => encode_base64( $self->wireformat, '' ),
answerfrom => $self->answerfrom,
timestamp => $self->timestamp,
querytime => $self->querytime,
}
};
}
sub data {
my ( $self ) = @_;
return $self->wireformat;
}
sub question_rrlist {
my ( $self ) = @_;
my @records = sort $self->question();
return Zonemaster::LDNS::RRList->new( \@records );
}
sub answer {
my ( $self ) = @_;
my @records = $self->answer_unfiltered;
for ( my $i = $#records ; $i >= 0 ; --$i ) {
if ( !$records[$i]->check_rd_count()
|| ( $records[$i]->type() eq 'DNSKEY' && $records[$i]->keysize() == -1 ) )
{
splice @records, $i, 1;
}
}
return @records;
}
sub answer_rrlist {
my ( $self ) = @_;
my @records = sort $self->answer();
return Zonemaster::LDNS::RRList->new( \@records );
}
sub authority {
my ( $self ) = @_;
my @records = $self->authority_unfiltered;
for ( my $i = $#records ; $i >= 0 ; --$i ) {
if ( !$records[$i]->check_rd_count() ) {
splice @records, $i, 1;
}
}
return @records;
}
sub authority_rrlist {
my ( $self ) = @_;
my @records = sort $self->authority();
return Zonemaster::LDNS::RRList->new( \@records );
}
sub additional {
my ( $self ) = @_;
my @records = $self->additional_unfiltered;
for ( my $i = $#records ; $i >= 0 ; --$i ) {
if ( !$records[$i]->check_rd_count() ) {
splice @records, $i, 1;
}
}
return @records;
}
sub additional_rrlist {
my ( $self ) = @_;
my @records = sort $self->additional();
return Zonemaster::LDNS::RRList->new( \@records );
}
1;
=head1 NAME
Zonemaster::LDNS::Packet - objects representing DNS packets
=head1 SYNOPSIS
my $p = $resolver->query('www.iis.se');
foreach my $rr ($p->answer) {
say $rr->string if $rr->type eq 'A';
}
=head1 CLASS METHODS
=over
=item new($name, $type, $class)
Creates a new L<Zonemaster::LDNS::Packet> object, holding nothing but a query record for the provided triplet.
C<$name> corresponds to the QNAME. C<$type> and C<$class> are optional, and default to A and IN respectively.
=item new_from_wireformat($data)
Creates a new L<Zonemaster::LDNS::Packet> object from the given wireformat data, if possible. Throws an exception if not.
=back
=head1 INSTANCE METHODS
=over
=item rcode([$string])
Returns the packet RCODE. If given an argument, tries to set the RCODE to the
relevant value. If the given string isn't recognized as an RCODE, an exception
will be thrown.
=item opcode([$string])
Returns the packet OPCODE. If given an argument, tries to set the OPCODE to the
relevant value. If the given string isn't recognized as an OPCODE, an exception
will be thrown.
=item id([$value])
Returns the packet id number. If given an argument, sets the ID value to that
value.
=item qr()
=item aa()
=item tc()
=item rd()
=item cd()
=item ra()
=item ad()
=item do()
Reads and/or sets the equivalently named flags.
=item size()
Returns the length of the packet's wireformat form in octets.
=item edns_size()
Gets and/or sets the EDNS0 UDP size.
=item edns_rcode()
Gets and/or sets the EDNS0 Extended RCODE field.
=item ends_z()
Gets and/or sets the EDNS0 Z bits.
=item edns_data()
Gets and/or sets the EDNS0 RDATA. See LDNS.xs for more details.
=item needs_edns()
This method returns true if the packet has the DO flag set, an EDNS0 size set,
and EDNS0 extended RCODE set or if the OPT pseudo-RR has one or more RDATA
fields. It can fail to correctly flag a packet with an OPT pseudo-RR as having
EDNS, if the pseudo-RR specifies an UDP size of zero, an extended RCODE of zero
and the DO flag is unset. Since any UDP size less than 512 must be interpreted
as 512, packets like that should be very rare in practice if they exist at all.
Note that the OPT pseudo-RR is not visible as an RR in the packet, nor is it
included in the RR count header fields.
=item has_edns()
An alias for needs_edns().
=item edns_version($version)
Get or set the EDNS version in the packet. For incoming packets, returns 0 if
the packet does not have an OPT pseudo-RR and 0 if it's an EDNS0 packet. It's
thus rather pointless until such time as EDNS1 is defined.
=item set_edns_present
Set edns_present flag to true.
This flag can be set when creating a packet with EDNS corner cases data that
could not be detected by need_edns/has_edns methods.
When set, need_edns/has_edns methods return true value.
=item unset_edns_present
Set edns_present flag to false.
=item querytime([$value])
Returns the time the query this packet is the answer to took to execute, in
milliseconds. If given a value, sets the querytime to that value.
=item answerfrom($ipaddr)
Returns and optionally sets the IP address the packet was received from. If an attempt is made to set it to a string that cannot be parsed as an
IPv4 or IPv6 address, an exception is thrown.
=item timestamp($time)
The time when the query was sent or received (the ldns docs don't specify), as a floating-point value on the Unix time_t scale (that is, the same
kind of value used by L<Time::HiRes::time()>). Conversion effects between floating-point and C<struct timeval> means that the precision of the
value is probably not reliable at the microsecond level, even if you computer's clock happen to be.
=item all()
Returns a L<Zonemaster::LDNS::RRList> object, containing the resource records from all sections except for the question section.
=item question()
Returns a list of objects representing the RRs in the question section. They will be of classes appropriate to their types, but all will have
L<Zonemaster::LDNS::RR> as a base class.
=item question_rrlist()
Similar to L<question()>, but instead returns a single (and sorted) L<Zonemaster::LDNS::RRList> object.
=item answer()
Similar to L<answer_unfiltered()>, but ignores incomplete resource records.
=item answer_rrlist()
Similar to L<answer()>, but instead returns a single (and sorted) L<Zonemaster::LDNS::RRList> object.
=item answer_unfiltered()
Returns a list of objects representing the RRs in the answer section. They will be of classes appropriate to their types, but all will have
L<Zonemaster::LDNS::RR> as a base class.
=item authority()
Similar to L<authority_unfiltered()>, but ignores incomplete resource records.
=item authority_rrlist()
Similar to L<authority()>, but instead returns a single (and sorted) L<Zonemaster::LDNS::RRList> object.
=item authority_unfiltered()
Returns a list of objects representing the RRs in the authority section. They will be of classes appropriate to their types, but all will have
L<Zonemaster::LDNS::RR> as a base class.
=item additional()
Similar to L<additional_unfiltered()>, but ignores incomplete resource records.
=item additional_rrlist()
Similar to L<additional()>, but instead returns a single (and sorted) L<Zonemaster::LDNS::RRList> object.
=item additional_unfiltered()
Returns a list of objects representing the RRs in the additional section. They will be of classes appropriate to their types, but all will have
L<Zonemaster::LDNS::RR> as a base class.
=item unique_push($section, $rr)
Push an RR object into the given section, if an identical RR isn't already present. If the section isn't one of "question", "answer", "authority"
or "additional" an exception will be thrown. C<$rr> must be a L<Zonemaster::LDNS::RR> subclass.
=item string()
Returns a string with the packet and its contents in common presentation format.
=item wireformat()
Returns a Perl string holding the packet in wire format.
=item type()
Returns the ldns library's guess as to the content of the packet. One of the strings C<question>, C<referral>, C<answer>, C<nxdomain>, C<nodata> or C<unknown>.
=back

View File

@@ -0,0 +1,207 @@
package Zonemaster::LDNS::RR;
use strict;
use warnings;
use Zonemaster::LDNS::RR::A;
use Zonemaster::LDNS::RR::A6;
use Zonemaster::LDNS::RR::AAAA;
use Zonemaster::LDNS::RR::AFSDB;
use Zonemaster::LDNS::RR::APL;
use Zonemaster::LDNS::RR::ATMA;
use Zonemaster::LDNS::RR::CAA;
use Zonemaster::LDNS::RR::CDNSKEY;
use Zonemaster::LDNS::RR::CDS;
use Zonemaster::LDNS::RR::CERT;
use Zonemaster::LDNS::RR::CNAME;
use Zonemaster::LDNS::RR::DHCID;
use Zonemaster::LDNS::RR::DLV;
use Zonemaster::LDNS::RR::DNAME;
use Zonemaster::LDNS::RR::DNSKEY;
use Zonemaster::LDNS::RR::DS;
use Zonemaster::LDNS::RR::EID;
use Zonemaster::LDNS::RR::EUI48;
use Zonemaster::LDNS::RR::EUI64;
use Zonemaster::LDNS::RR::GID;
use Zonemaster::LDNS::RR::GPOS;
use Zonemaster::LDNS::RR::HINFO;
use Zonemaster::LDNS::RR::HIP;
use Zonemaster::LDNS::RR::HTTPS;
use Zonemaster::LDNS::RR::IPSECKEY;
use Zonemaster::LDNS::RR::ISDN;
use Zonemaster::LDNS::RR::KEY;
use Zonemaster::LDNS::RR::KX;
use Zonemaster::LDNS::RR::L32;
use Zonemaster::LDNS::RR::L64;
use Zonemaster::LDNS::RR::LOC;
use Zonemaster::LDNS::RR::LP;
use Zonemaster::LDNS::RR::MAILA;
use Zonemaster::LDNS::RR::MAILB;
use Zonemaster::LDNS::RR::MB;
use Zonemaster::LDNS::RR::MD;
use Zonemaster::LDNS::RR::MF;
use Zonemaster::LDNS::RR::MG;
use Zonemaster::LDNS::RR::MINFO;
use Zonemaster::LDNS::RR::MR;
use Zonemaster::LDNS::RR::MX;
use Zonemaster::LDNS::RR::NAPTR;
use Zonemaster::LDNS::RR::NID;
use Zonemaster::LDNS::RR::NIMLOC;
use Zonemaster::LDNS::RR::NINFO;
use Zonemaster::LDNS::RR::NS;
use Zonemaster::LDNS::RR::NSAP;
use Zonemaster::LDNS::RR::NSEC;
use Zonemaster::LDNS::RR::NSEC3;
use Zonemaster::LDNS::RR::NSEC3PARAM;
use Zonemaster::LDNS::RR::NULL;
use Zonemaster::LDNS::RR::NXT;
use Zonemaster::LDNS::RR::PTR;
use Zonemaster::LDNS::RR::PX;
use Zonemaster::LDNS::RR::RKEY;
use Zonemaster::LDNS::RR::RP;
use Zonemaster::LDNS::RR::RRSIG;
use Zonemaster::LDNS::RR::RT;
use Zonemaster::LDNS::RR::SIG;
use Zonemaster::LDNS::RR::SINK;
use Zonemaster::LDNS::RR::SOA;
use Zonemaster::LDNS::RR::SPF;
use Zonemaster::LDNS::RR::SRV;
use Zonemaster::LDNS::RR::SSHFP;
use Zonemaster::LDNS::RR::SVCB;
use Zonemaster::LDNS::RR::TA;
use Zonemaster::LDNS::RR::TALINK;
use Zonemaster::LDNS::RR::TKEY;
use Zonemaster::LDNS::RR::TLSA;
use Zonemaster::LDNS::RR::TXT;
use Zonemaster::LDNS::RR::TYPE;
use Zonemaster::LDNS::RR::UID;
use Zonemaster::LDNS::RR::UINFO;
use Zonemaster::LDNS::RR::UNSPEC;
use Zonemaster::LDNS::RR::URI;
use Zonemaster::LDNS::RR::WKS;
use Zonemaster::LDNS::RR::X25;
use Carp;
use overload '<=>' => \&do_compare, 'cmp' => \&do_compare, '""' => \&to_string;
sub new {
my ( $class, $string ) = @_;
if ( $string ) {
return $class->new_from_string( $string );
}
else {
croak "Must provide string to create RR";
}
}
sub name {
my ( $self ) = @_;
return $self->owner;
}
sub do_compare {
my ( $self, $other, $swapped ) = @_;
return $self->compare( $other );
}
sub to_string {
my ( $self ) = @_;
return $self->string;
}
1;
=head1 NAME
Zonemaster::LDNS::RR - common baseclass for all classes representing resource records.
=head1 SYNOPSIS
my $rr = Zonemaster::LDNS::RR->new('www.iis.se IN A 91.226.36.46');
=head1 OVERLOADS
This class overloads stringify and comparisons ('""', '<=>' and 'cmp').
=head1 CLASS METHOD
=over
=item new($string)
Creates a new RR object, which is an instance of a suitable subclass of
L<Zonemaster::LDNS::RR>, given a string representing an RR in common
presentation format.
If a subclass of L<Zonemaster::LDNS::RR> exists that is suitable for the
resource records type (e.g. L<Zonemaster::LDNS::RR::AAAA>,
L<Zonemaster::LDNS::RR::TXT>, etc.), then the resulting object is an instance
of that subclass.
If no such subclass exists (e.g. when passed a resource record of an unknown
type or a type not yet supported by Zonemaster-LDNS), the resulting object is
an instance of L<Zonemaster::LDNS::RR>. The instance methods defined in this
class will still work, but there is no support for structured access to the
resource records RDATA.
=back
=head1 INSTANCE METHODS
=over
=item owner()
Returns the owner name of the RR.
=item name()
An alias of L<owner()>.
=item ttl()
Returns the ttl of the RR.
=item type()
Return the type of the RR.
=item class()
Returns the class of the RR.
=item string()
Returns a string with the RR in presentation format.
=item compare($other)
Compares two L<Zonemaster::LDNS::RR>. The TTL field is ignored, and the comparison of domain names is case insensitive.
Returns an integer, where 0 indicates equality.
=item do_compare($other)
Calls the XS C<compare> method with the arguments it needs, rather than the ones overloading gives.
=item to_string
Calls the XS C<string> method with the arguments it needs, rather than the ones overloading gives. Functionally identical to L<string()> from the
Perl level, except for being a tiny little bit slower.
=item rd_count()
The number of RDATA objects in this RR.
=item rdf($postion)
The raw data of the RDATA object in the given position. The first item is in
position 0. If an attempt is made to fetch RDATA from a position that doesn't
have any, an exception will be thrown.
=back

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::A;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::A - Type A record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item address()
Returns the address.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::A6;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::A6 - Type A6 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::AAAA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::AAAA - Type AAAA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item address()
Returns the address.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::AFSDB;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::AFSDB - Type AFSDB record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::APL;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::APL - Type APL record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::ATMA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::ATMA - Type ATMA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::CAA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::CAA - Type CAA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,24 @@
package Zonemaster::LDNS::RR::CDNSKEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR::DNSKEY';
1;
=head1 NAME
Zonemaster::LDNS::RR::CDNSKEY - Type CDNSKEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR::DNSKEY>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No other specific methods implemented.
Note that the inherited parent methods L<Zonemaster::LDNS::RR::DNSKEY/keytag()> and L<Zonemaster::LDNS::RR::DNSKEY/ds($hash)> will always return 0, as LDNS currently only supports the DNSKEY RR type for those methods.
=cut

View File

@@ -0,0 +1,24 @@
package Zonemaster::LDNS::RR::CDS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR::DS';
1;
=head1 NAME
Zonemaster::LDNS::RR::CDS - Type CDS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR::DS>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No other specific methods implemented.
Note that the inherited parent methods L<Zonemaster::LDNS::RR::DS/verify($other)> will always return false, as LDNS currently only supports the DS and DNSKEY RR types for this method.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::CERT;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::CERT - Type CERT record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::CNAME;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::CNAME - Type CNAME record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item cname()
Returns the canonical name.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::DHCID;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::DHCID - Type DHCID record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::DLV;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::DLV - Type DLV record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::DNAME;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::DNAME - Type DNAME record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item dname()
Returns the delegation name, i.e. the <target> field from the RDATA of a DNAME record.
=back

View File

@@ -0,0 +1,116 @@
package Zonemaster::LDNS::RR::DNSKEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
sub keysize {
my ( $self ) = @_;
my $algo = $self->algorithm;
my $data = $self->keydata;
# RSA variants
if ( $algo == 1 || $algo == 5 || $algo == 7 || $algo == 8 || $algo == 10 ) {
# Read first byte
return -1
if length $data < 1;
my $byte = unpack( "c1", $data );
my $remaining;
if ( $byte > 0 ) {
$remaining = length( $data ) - 1 - $byte;
}
else {
# Read bytes 1 and 2 as big-endian
return -1
if length $data < 3;
my $short = unpack( "x1s>1", $data );
$remaining = length( $data ) - 3 - $short;
}
if ( $remaining < 0 ) {
return -1;
}
else {
return 8 * $remaining;
}
}
# DSA variants
elsif ( $algo == 3 || $algo == 6 ) {
# Read first byte (the T value)
return -1
if length $data < 1;
return unpack( "c1", $data );
}
# Diffie-Hellman
elsif ( $algo == 2 ) {
# Read bytes 4 and 5 as big-endian
return -1
if length $data < 6;
return unpack( "x4s>1", $data );
}
# No idea what this is
else {
return 0;
}
}
1;
=head1 NAME
Zonemaster::LDNS::RR::DNSKEY - Type DNSKEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item flags()
Returns the flag field as a number.
=item protocol()
Returns the protocol number.
=item algorithm()
Returns the algorithm number.
=item keydata()
Returns the cryptographic key in binary form.
=item hexkeydata()
Returns the cryptographic key as a hexadecimal string.
=item keytag()
Calculates the keytag.
=item ds($hash)
Returns a L<Zonemaster::LDNS::RR::DS> record matching this key. The argument must be one of the strings 'sha1', 'sha256', 'sha384' or 'gost'. GOST may not
be available, depending on how you ldns library was compiled.
=item keysize()
The size of the key stored in the record. For RSA variants, it's the length in bits of the prime number. For DSA variants, it's the key's "T" value
(see RFC2536). For DH, it's the value of the "prime length" field (and probably useless, since DH keys can't have signature records).
If there is insufficient data in the public key field to calculate the key size, C<-1> is returned.
=back

View File

@@ -0,0 +1,47 @@
package Zonemaster::LDNS::RR::DS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::DS - Type DS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item keytag()
Returns the keytag value.
=item algorithm()
Returns the algorithm number.
=item digtype()
Returns the numeric digest type.
=item digest()
Returns the cryptographic digest in binary form.
=item hexdigest()
Returns the cryptographic digest as a hexadecimal string.
=item verify($other)
Checks if the current object is derived from the other object (if it's a DNSKEY) or was derived from the same DNSKEY as the other object (if it's a
DS). If used with any other type of RR, it always returns false.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::EID;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::EID - Type EID record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::EUI48;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::EUI48 - Type EUI48 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::EUI64;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::EUI64 - Type EUI64 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::GID;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::GID - Type GID record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::GPOS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::GPOS - Type GPOS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::HINFO;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::HINFO - Type HINFO record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::HIP;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::HIP - Type HIP record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::HTTPS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::HTTPS - Type HTTPS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::IPSECKEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::IPSECKEY - Type IPSECKEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::ISDN;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::ISDN - Type ISDN record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,40 @@
package Zonemaster::LDNS::RR::KEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::KEY - Type KEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item flags()
Returns the flag field as a number.
=item protocol()
Returns the protocol number.
=item algorithm()
Returns the algorithm number.
=item keydata()
Returns the cryptographic key in binary form.
=back
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::KX;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::KX - Type KX record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::L32;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::L32 - Type L32 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::L64;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::L64 - Type L64 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::LOC;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::LOC - Type LOC record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::LP;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::LP - Type LP record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MAILA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MAILA - Type MAILA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MAILB;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MAILB - Type MAILB record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MB;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MB - Type MB record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MD;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MD - Type MD record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MF;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MF - Type MF record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MG;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MG - Type MG record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MINFO;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MINFO - Type MINFO record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::MR;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MR - Type MR record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,30 @@
package Zonemaster::LDNS::RR::MX;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::MX - Type MX record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item exchange()
Returns the name of the mail server.
=item preference()
Returns the preference value of the record.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NAPTR;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NAPTR - Type NAPTR record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NID;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NID - Type NID record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NIMLOC;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NIMLOC - Type NIMLOC record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NINFO;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NINFO - Type NINFO record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::NS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NS - Type NS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item nsdname()
Returns the name of the nameserver.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NSAP;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NSAP - Type NSAP record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,47 @@
package Zonemaster::LDNS::RR::NSEC;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
sub nxtdname {
return $_[0]->next;
}
1;
=head1 NAME
Zonemaster::LDNS::RR::NSEC - Type NSEC record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item next()
Returns the next name.
=item nxtdname()
Alias for C<next()>.
=item typelist()
Returns a string with the typelist. The string has the type names separated by spaces.
=item typehref()
Returns a reference to a hash, where the keys are the type names and the corresponding values are true. That is, if you look for a type in this hash
you get a true value back if the record covers it and false if not.
=item covers($name)
Returns true or false depending on if the record covers the given name or not.
=back

View File

@@ -0,0 +1,62 @@
package Zonemaster::LDNS::RR::NSEC3;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NSEC3 - Type NSEC3 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item algorithm()
Returns the algorithm number.
=item flags()
Returns the flags field.
=item optout()
Returns the optout flag.
=item iterations()
Returns the iteration count.
=item salt()
Returns the contents of the salt field as a binary string, if non-empty; otherwise, returns an empty string. If there was a problem accessing the salt field, returns undef.
=item next_owner()
Returns the next hashed owner name field, in binary form. To convert the return value to the human-readable presentation format, use L<MIME::Base32/encode_base32hex>.
=item typelist()
Returns the typelist as a space-separated string.
=item typehref()
Returns the typelist as a reference to a hash where the included types are keys storing true values.
=item covers($name)
Returns true or false depending on if the record covers the given name or not.
=item hash_name($name)
Computes and returns a hash, in canonical form, of the given name using the parameters (algorithm, iterations, salt) of the resource record.
=back

View File

@@ -0,0 +1,42 @@
package Zonemaster::LDNS::RR::NSEC3PARAM;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NSEC3PARAM - Type NSEC3PARAM record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item algorithm()
Returns the algorithm number.
=item flags()
Returns the flags field.
=item iterations()
Returns the iteration count.
=item salt()
Returns the contents of the salt field as a binary string, if non-empty; otherwise, returns an empty string.
=item hash_name($name)
Computes and returns a hash, in canonical form, of the given name using the parameters (algorithm, iterations, salt) of the resource record.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NULL;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NULL - Type NULL record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::NXT;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::NXT - Type NXT record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,26 @@
package Zonemaster::LDNS::RR::PTR;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::PTR - Type PTR record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item ptrdname()
Returns the domain name.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::PX;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::PX - Type PX record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::RKEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::RKEY - Type RKEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::RP;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::RP - Type RP record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,91 @@
package Zonemaster::LDNS::RR::RRSIG;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
sub verify {
my ( $self, $rrset, $keys ) = @_;
my $msg = '';
return $self->verify_time( $rrset, $keys, time(), $msg );
}
sub verify_str {
my ( $self, $rrset, $keys ) = @_;
my $msg = '';
$self->verify_time( $rrset, $keys, time(), $msg );
return $msg;
}
1;
=head1 NAME
Zonemaster::LDNS::RR::RRSIG - Type RRSIG record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item typecovered()
Returns a string with the name of the RR type this signature covers.
=item algorithm()
Returns the algorithm number.
=item labels()
Returns the number of labels that was used to calculate the signature.
=item origttl()
Returns the original TTL value.
=item expiration()
Returns the expiration time, as a time_t.
=item inception()
Returns the inception time, as a time_t.
=item keytag()
Returns the keytag.
=item signer()
Returns the signer name.
=item signature()
Returns the cryptographic signture in binary form.
=item verify($rrset_ref, $key_ref)
Cryptographically verifies that the signature in this object matches the given RRset and at least one of the given keys. C<$rrset_ref> should be a
reference to an array of RR objects, and C<$key_ref> a reference to an array of L<Zonemaster::LDNS::RR::DNSKEY> objects. This method simply returns a true
or false value, depending on the result och the check.
=item verify_str($rrset_ref, $key_ref)
Takes exactly the same arguments as L<verify()> and performs the same action, but instead of true/false it returns a string describing the result.
In the case of a successful result the message will be "All OK". For negative results, the string will describe the reason the verification failed.
=item verify_time($rrset_ref, $key_ref, $time, $msg)
This is the XS method doing the work for the previous two methods. C<$rrset_ref> and C<$key_ref> are the same as for the other methods. C<$time> is
the C<time_t> value for which the validation should be made (for the previous two methods it is set to the current computer time). C<$msg> should be
a writable scalar, and the string message describing the result will be but in it. The return value from the method is true/false.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::RT;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::RT - Type RT record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,58 @@
package Zonemaster::LDNS::RR::SIG;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SIG - Type SIG record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item typecovered()
Returns a string with the name of the RR type this signature covers.
=item algorithm()
Returns the algorithm number.
=item labels()
Returns the number of labels that was used to calculate the signature.
=item origttl()
Returns the original TTL value.
=item expiration()
Returns the expiration time, as a time_t.
=item inception()
Returns the inception time, as a time_t.
=item keytag()
Returns the keytag.
=item signer()
Returns the signer name.
=item signature()
Returns the cryptographic signture in binary form.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::SINK;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SINK - Type SINK record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,44 @@
package Zonemaster::LDNS::RR::SOA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SOA - Type SOA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item mname()
Returns the master server name.
=item rname()
Returns the contact mail address, in DNAME format.
=item serial()
Returns the serial number.
=item refresh()
=item retry()
=item refresh()
=item minimum()
Returns the respective timing values from the record.
=back

View File

@@ -0,0 +1,38 @@
package Zonemaster::LDNS::RR::SPF;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
sub spfdata() {
my ($rr) = @_;
return join( "", map { substr($rr->rdf($_ - 1), 1) } 1..$rr->rd_count() );
}
1;
=head1 NAME
Zonemaster::LDNS::RR::SPF - Type SPF record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item spfdata()
Returns the concatenation of all the strings composing the data of the resource record.
For example, if an SPF resource record has the following presentation format:
test.example. 3600 IN SPF "v=spf1 " "mx " "a " "-all"
then C<spfdata()> returns the string C<"v=spf1 mx a -all">.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::SRV;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SRV - Type SRV record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::SSHFP;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SSHFP - Type SSHFP record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::SVCB;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::SVCB - Type SVCB record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::TA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::TA - Type TA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::TALINK;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::TALINK - Type TALINK record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::TKEY;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::TKEY - Type TKEY record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::TLSA;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::TLSA - Type TLSA record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,38 @@
package Zonemaster::LDNS::RR::TXT;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
sub txtdata() {
my ($rr) = @_;
return join( "", map { substr($rr->rdf($_ - 1), 1) } 1..$rr->rd_count() );
}
1;
=head1 NAME
Zonemaster::LDNS::RR::TXT - Type TXT record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
=over
=item txtdata()
Returns the concatenation of all the strings composing the data of the resource record.
For example, if a TXT resource record has the following presentation format:
txt.test.example. 3600 IN TXT "I " "am " "split up in " "lit" "tle pieces"
then C<txtdata()> returns the string C<"I am split up in little pieces">.
=back

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::TYPE;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::TYPE - Type TYPE record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::UID;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::UID - Type UID record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::UINFO;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::UINFO - Type UINFO record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::UNSPEC;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::UNSPEC - Type UNSPEC record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::URI;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::URI - Type URI record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::WKS;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::WKS - Type WKS record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,22 @@
package Zonemaster::LDNS::RR::X25;
use strict;
use warnings;
use parent 'Zonemaster::LDNS::RR';
1;
=head1 NAME
Zonemaster::LDNS::RR::X25 - Type X25 record
=head1 DESCRIPTION
A subclass of L<Zonemaster::LDNS::RR>, so it has all the methods of that class available in addition to the ones documented here.
=head1 METHODS
No RDATA methods implemented yet.
=cut

View File

@@ -0,0 +1,100 @@
package Zonemaster::LDNS::RRList;
use strict;
use warnings;
use overload '<=>' => \&do_compare, 'cmp' => \&do_compare, '""' => \&to_string;
sub do_compare {
my ( $self, $other, $swapped ) = @_;
return $self->compare( $other );
}
sub to_string {
my ( $self ) = @_;
return $self->string;
}
1;
=head1 NAME
Zonemaster::LDNS::RRList - class representing lists of resource records.
=head1 SYNOPSIS
my $rrlist = Zonemaster::LDNS::RRList->new( $rrs_aref );
=head1 CLASS METHODS
=over
=item new()
Creates a new empty L<Zonemaster::LDNS::RRList> object.
=item new($rrs)
Creates a new L<Zonemaster::LDNS::RRList> object for the given resource records.
Takes a reference to an array of L<Zonemaster::LDNS::RR> objects.
Returns a L<Zonemaster::LDNS::RRList> object.
=back
=head1 INSTANCE METHODS
=over
=item count()
Returns the number of RRs in the list.
=item compare($other)
Compares two L<Zonemaster::LDNS::RRList>. The order of L<Zonemaster::LDNS::RR> objects in the list does not matter.
The TTL field is ignored, and the comparison of domain names is case insensitive.
Returns an integer, where 0 indicates equality.
=item get($pos)
my $rr = Zonemaster::LDNS::RRList->get( 0 );
Retrieves the RR in the given position from the list.
Takes an integer.
Returns a L<Zonemaster::LDNS::RR> object, or C<undef> if there was no RR.
=item push($rr)
Pushes an RR onto the list.
=item pop()
Pops an RR off the list.
=item is_rrset()
Returns true or false depending on if the list is an RRset or not.
Note that the underlying LDNS function appears to have a bug as the comparison of the owner name field is case sensitive. See https://github.com/NLnetLabs/ldns/pull/251.
=item string()
Returns a string with the list of RRs in presentation format.
=item do_compare($other)
Calls the XS C<compare> method with the arguments it needs, rather than the ones overloading gives.
=item to_string
Calls the XS C<string> method with the arguments it needs, rather than the ones overloading gives. Functionally identical to L<string()> from the
Perl level, except for being a tiny little bit slower.
=back