line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::AFSDB; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
67
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: AFSDB.pm 1898 2023-02-15 14:27:22Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
7
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
101
|
|
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
|
|
|
|
|
5
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
37
|
use Net::DNS::DomainName; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
456
|
|
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
|
|
|
|
|
6
|
$self->{hostname} = Net::DNS::DomainName2535->decode( $data, $offset + 2 ); |
26
|
1
|
|
|
|
|
3
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
31
|
5
|
|
|
5
|
|
13
|
my ( $self, $offset, @opaque ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
7
|
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
|
|
4
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
|
|
3
|
my $hostname = $self->{hostname}; |
42
|
2
|
|
|
|
|
5
|
return join ' ', $self->subtype, $hostname->string; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
47
|
1
|
|
|
1
|
|
3
|
my ( $self, @argument ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
3
|
for (qw(subtype hostname)) { $self->$_( shift @argument ) } |
|
2
|
|
|
|
|
5
|
|
50
|
1
|
|
|
|
|
3
|
return; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub subtype { |
55
|
11
|
|
|
11
|
1
|
26
|
my ( $self, @value ) = @_; |
56
|
11
|
|
|
|
|
22
|
for (@value) { $self->{subtype} = 0 + $_ } |
|
2
|
|
|
|
|
6
|
|
57
|
11
|
|
100
|
|
|
51
|
return $self->{subtype} || 0; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub hostname { |
62
|
4
|
|
|
4
|
1
|
868
|
my ( $self, @value ) = @_; |
63
|
4
|
|
|
|
|
7
|
for (@value) { $self->{hostname} = Net::DNS::DomainName2535->new($_) } |
|
2
|
|
|
|
|
13
|
|
64
|
4
|
100
|
|
|
|
19
|
return $self->{hostname} ? $self->{hostname}->name : undef; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
__END__ |