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