line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::RP; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
22
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
11
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: RP.pm 1898 2023-02-15 14:27:22Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
93
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::RP - DNS RP resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
7
|
use integer; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
36
|
use Net::DNS::DomainName; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
19
|
1
|
|
|
1
|
|
420
|
use Net::DNS::Mailbox; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
374
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
23
|
1
|
|
|
1
|
|
2
|
my ( $self, $data, $offset ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
8
|
( $self->{mbox}, $offset ) = Net::DNS::Mailbox2535->decode( $data, $offset ); |
26
|
1
|
|
|
|
|
6
|
$self->{txtdname} = Net::DNS::DomainName2535->decode( $data, $offset ); |
27
|
1
|
|
|
|
|
3
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
32
|
5
|
|
|
5
|
|
11
|
my ( $self, $offset, @opaque ) = @_; |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
|
|
7
|
my $txtdname = $self->{txtdname}; |
35
|
5
|
|
|
|
|
12
|
my $rdata = $self->{mbox}->encode( $offset, @opaque ); |
36
|
5
|
|
|
|
|
14
|
$rdata .= $txtdname->encode( $offset + length($rdata), @opaque ); |
37
|
5
|
|
|
|
|
16
|
return $rdata; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
42
|
2
|
|
|
2
|
|
2
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
18
|
my @rdata = ( $self->{mbox}->string, $self->{txtdname}->string ); |
45
|
2
|
|
|
|
|
8
|
return @rdata; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
50
|
1
|
|
|
1
|
|
3
|
my ( $self, @argument ) = @_; |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
|
|
2
|
for (qw(mbox txtdname)) { $self->$_( shift @argument ) } |
|
2
|
|
|
|
|
6
|
|
53
|
1
|
|
|
|
|
3
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub mbox { |
58
|
4
|
|
|
4
|
1
|
14
|
my ( $self, @value ) = @_; |
59
|
4
|
|
|
|
|
6
|
for (@value) { $self->{mbox} = Net::DNS::Mailbox2535->new($_) } |
|
2
|
|
|
|
|
8
|
|
60
|
4
|
100
|
|
|
|
21
|
return $self->{mbox} ? $self->{mbox}->address : undef; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub txtdname { |
65
|
4
|
|
|
4
|
1
|
833
|
my ( $self, @value ) = @_; |
66
|
4
|
|
|
|
|
8
|
for (@value) { $self->{txtdname} = Net::DNS::DomainName2535->new($_) } |
|
2
|
|
|
|
|
9
|
|
67
|
4
|
100
|
|
|
|
19
|
return $self->{txtdname} ? $self->{txtdname}->name : undef; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
__END__ |