| 1 |
package DNS::LDNS::RData; |
| 2 |
|
| 3 |
use 5.008008; |
| 4 |
use strict; |
| 5 |
use warnings; |
| 6 |
|
| 7 |
use DNS::LDNS; |
| 8 |
|
| 9 |
our $VERSION = '0.61'; |
| 10 |
|
| 11 |
sub new { |
| 12 |
my ($class, $type, $str) = @_; |
| 13 |
return _new($type, $str); |
| 14 |
} |
| 15 |
|
| 16 |
sub cat { |
| 17 |
my ($self, $other) = @_; |
| 18 |
|
| 19 |
my $s = _cat($self, $other); |
| 20 |
$DNS::LDNS::last_status = $s; |
| 21 |
return $s; |
| 22 |
} |
| 23 |
|
| 24 |
sub nsec3_hash_name { |
| 25 |
my ($self, $algorithm, $iterations, $salt) = @_; |
| 26 |
return DNS::LDNS::GC::own( |
| 27 |
$self->_nsec3_hash_name($algorithm, $iterations, $salt), $self); |
| 28 |
} |
| 29 |
|
| 30 |
sub DESTROY { |
| 31 |
DNS::LDNS::GC::free($_[0]); |
| 32 |
} |
| 33 |
|
| 34 |
1; |
| 35 |
__END__ |
| 36 |
|
| 37 |
=head1 NAME |
| 38 |
|
| 39 |
DNS::LDNS::RData - Rdata field or a dname in an rr |
| 40 |
|
| 41 |
=head1 SYNOPSIS |
| 42 |
|
| 43 |
use DNS::LDNS ':all' |
| 44 |
|
| 45 |
my rd = new DNS::LDNS::RData(rdf_type, str) |
| 46 |
rd2 = rd->clone |
| 47 |
|
| 48 |
rdf_type = rd->type |
| 49 |
rd->set_type(rdf_type) |
| 50 |
|
| 51 |
rd->print(\*FILE) |
| 52 |
str = rd->to_string |
| 53 |
|
| 54 |
count = rd->label_count |
| 55 |
rd2 = rd->label(pos) |
| 56 |
|
| 57 |
bool = rd->is_wildcard |
| 58 |
bool = rd->matches_wildcard(wildcard) |
| 59 |
bool = rd->is_subdomain(parent) |
| 60 |
|
| 61 |
rd2 = rd->left_chop |
| 62 |
|
| 63 |
status = rd->cat(rd2) |
| 64 |
rd->compare(rd2) |
| 65 |
rd2 = rd->address_reverse |
| 66 |
rd2 = rd->dname_reverse |
| 67 |
|
| 68 |
rd2 = rd->nsec3_hash_name(name, algorithm, iterations, salt) |
| 69 |
|
| 70 |
epoch = rd->to_unix_time |
| 71 |
( epoch = rd->2native_time_t ) |
| 72 |
|
| 73 |
rr_type = rd->to_rr_type |
| 74 |
|
| 75 |
=head1 SEE ALSO |
| 76 |
|
| 77 |
http://www.nlnetlabs.nl/projects/ldns |
| 78 |
|
| 79 |
=head1 AUTHOR |
| 80 |
|
| 81 |
Erik Pihl Ostlyngen, E<lt>[email protected]<gt> |
| 82 |
|
| 83 |
=head1 COPYRIGHT AND LICENSE |
| 84 |
|
| 85 |
Copyright (C) 2013 by UNINETT Norid AS |
| 86 |
|
| 87 |
This library is free software; you can redistribute it and/or modify |
| 88 |
it under the same terms as Perl itself, either Perl version 5.14.2 or, |
| 89 |
at your option, any later version of Perl 5 you may have available. |
| 90 |
|
| 91 |
=cut |