aboutsummaryrefslogtreecommitdiff
path: root/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-05-14 18:41:34 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-05-14 18:41:34 +0000
commit65be028f32ed37dce84f6328d4a7172132c8c224 (patch)
tree4edff3f361b23a13a9807a3a0906f9026c3a81a5 /contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
parent04f3ab9612d73d7516f230df46e860daf892dc71 (diff)
import ldns 1.6.17vendor/ldns/1.6.17
Notes
Notes: svn path=/vendor/ldns/dist/; revision=266072 svn path=/vendor/ldns/1.6.17/; revision=266073; tag=vendor/ldns/1.6.17
Diffstat (limited to 'contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm')
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm91
1 files changed, 91 insertions, 0 deletions
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
new file mode 100644
index 000000000000..76ef5ebac861
--- /dev/null
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
@@ -0,0 +1,91 @@
+package DNS::LDNS::RData;
+
+use 5.008008;
+use strict;
+use warnings;
+
+use DNS::LDNS;
+
+our $VERSION = '0.06';
+
+sub new {
+ my ($class, $type, $str) = @_;
+ return _new($type, $str);
+}
+
+sub cat {
+ my ($self, $other) = @_;
+
+ my $s = _cat($self, $other);
+ $DNS::LDNS::last_status = $s;
+ return $s;
+}
+
+sub nsec3_hash_name {
+ my ($self, $algorithm, $iterations, $salt) = @_;
+ return DNS::LDNS::GC::own(
+ $self->_nsec3_hash_name($algorithm, $iterations, $salt), $self);
+}
+
+sub DESTROY {
+ DNS::LDNS::GC::free($_[0]);
+}
+
+1;
+__END__
+
+=head1 NAME
+
+DNS::LDNS::RData - Rdata field or a dname in an rr
+
+=head1 SYNOPSIS
+
+ 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
+
+=head1 SEE ALSO
+
+http://www.nlnetlabs.nl/projects/ldns
+
+=head1 AUTHOR
+
+Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
+
+=head1 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.
+
+=cut