line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::HINFO; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: HINFO.pm 1896 2023-01-30 12:59:25Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
92
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::HINFO - DNS HINFO resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
7
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
473
|
use Net::DNS::Text; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
407
|
|
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->{cpu}, $offset ) = Net::DNS::Text->decode( $data, $offset ); |
25
|
1
|
|
|
|
|
4
|
( $self->{os}, $offset ) = Net::DNS::Text->decode( $data, $offset ); |
26
|
1
|
|
|
|
|
3
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
31
|
5
|
|
|
5
|
|
8
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
12
|
return join '', $self->{cpu}->encode, $self->{os}->encode; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
38
|
2
|
|
|
2
|
|
3
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
2
|
|
|
|
|
6
|
return join ' ', $self->{cpu}->string, $self->{os}->string; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
45
|
1
|
|
|
1
|
|
3
|
my ( $self, @argument ) = @_; |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
3
|
$self->cpu( shift @argument ); |
48
|
1
|
|
|
|
|
3
|
$self->os(@argument); |
49
|
1
|
|
|
|
|
2
|
return; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub cpu { |
54
|
4
|
|
|
4
|
1
|
15
|
my ( $self, @value ) = @_; |
55
|
4
|
|
|
|
|
8
|
for (@value) { $self->{cpu} = Net::DNS::Text->new($_) } |
|
2
|
|
|
|
|
6
|
|
56
|
4
|
100
|
|
|
|
18
|
return $self->{cpu} ? $self->{cpu}->value : undef; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub os { |
61
|
4
|
|
|
4
|
1
|
823
|
my ( $self, @value ) = @_; |
62
|
4
|
|
|
|
|
8
|
for (@value) { $self->{os} = Net::DNS::Text->new($_) } |
|
2
|
|
|
|
|
6
|
|
63
|
4
|
100
|
|
|
|
15
|
return $self->{os} ? $self->{os}->value : undef; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
__END__ |