line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: rdata.pm 49 2009-05-31 13:15:34Z VinsWorldcom $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::DNS::RR::rdata; |
5
|
6
|
|
|
6
|
|
38
|
use strict; use warnings; |
|
6
|
|
|
6
|
|
12
|
|
|
6
|
|
|
|
|
143
|
|
|
6
|
|
|
|
|
29
|
|
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
152
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
29
|
use Net::Frame::Layer qw(:consts :subs); |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
1016
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer Exporter); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
11
|
|
|
|
|
|
|
rdata |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
15
|
|
|
|
|
|
|
|
16
|
6
|
|
|
6
|
|
42
|
use Net::Frame::Layer::DNS; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
1021
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub unpack { |
19
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# must include rdlength on calls to DNS::RR::rdata |
22
|
0
|
0
|
|
|
|
|
my ($rdlength, $rdata) = |
23
|
|
|
|
|
|
|
$self->SUPER::unpack('n a*', $self->raw) |
24
|
|
|
|
|
|
|
or return; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
$self->rdata(CORE::unpack "H*", (substr $rdata, 0, $rdlength)); |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
$self->payload(substr $self->raw, $rdlength+2); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub encapsulate { |
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
0
|
0
|
|
|
|
|
return $self->nextLayer if $self->nextLayer; |
37
|
|
|
|
|
|
|
|
38
|
0
|
0
|
|
|
|
|
if ($self->payload) { |
39
|
0
|
|
|
|
|
|
return 'DNS::RR'; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
NF_LAYER_NONE; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub print { |
46
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $l = $self->layer; |
49
|
0
|
|
|
|
|
|
my $buf = sprintf |
50
|
|
|
|
|
|
|
"$l: rdata:%s", |
51
|
|
|
|
|
|
|
$self->rdata; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
return $buf; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |