line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::RP; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: RP.pm 1898 2023-02-15 14:27:22Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
102
|
|
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
|
|
|
|
|
38
|
|
19
|
1
|
|
|
1
|
|
423
|
use Net::DNS::Mailbox; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
357
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
23
|
1
|
|
|
1
|
|
3
|
my ( $self, $data, $offset ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
8
|
( $self->{mbox}, $offset ) = Net::DNS::Mailbox2535->decode( $data, $offset ); |
26
|
1
|
|
|
|
|
5
|
$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
|
|
9
|
my ( $self, $offset, @opaque ) = @_; |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
|
|
9
|
my $txtdname = $self->{txtdname}; |
35
|
5
|
|
|
|
|
12
|
my $rdata = $self->{mbox}->encode( $offset, @opaque ); |
36
|
5
|
|
|
|
|
13
|
$rdata .= $txtdname->encode( $offset + length($rdata), @opaque ); |
37
|
5
|
|
|
|
|
17
|
return $rdata; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
42
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
25
|
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
|
|
|
|
|
2
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub mbox { |
58
|
4
|
|
|
4
|
1
|
13
|
my ( $self, @value ) = @_; |
59
|
4
|
|
|
|
|
6
|
for (@value) { $self->{mbox} = Net::DNS::Mailbox2535->new($_) } |
|
2
|
|
|
|
|
6
|
|
60
|
4
|
100
|
|
|
|
23
|
return $self->{mbox} ? $self->{mbox}->address : undef; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub txtdname { |
65
|
4
|
|
|
4
|
1
|
1122
|
my ( $self, @value ) = @_; |
66
|
4
|
|
|
|
|
8
|
for (@value) { $self->{txtdname} = Net::DNS::DomainName2535->new($_) } |
|
2
|
|
|
|
|
22
|
|
67
|
4
|
100
|
|
|
|
20
|
return $self->{txtdname} ? $self->{txtdname}->name : undef; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
__END__ |