1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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
|