line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: A.pm 49 2009-05-31 13:15:34Z VinsWorldcom $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::DNS::RR::A; |
5
|
6
|
|
|
6
|
|
30
|
use strict; use warnings; |
|
6
|
|
|
6
|
|
12
|
|
|
6
|
|
|
|
|
199
|
|
|
6
|
|
|
|
|
32
|
|
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
177
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
28
|
use Net::Frame::Layer qw(:consts :subs); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1398
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer Exporter); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
11
|
|
|
|
|
|
|
address |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
15
|
|
|
|
|
|
|
|
16
|
6
|
|
|
6
|
|
33
|
use Net::Frame::Layer::DNS; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
2000
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
|
|
|
|
|
|
shift->SUPER::new( |
20
|
1
|
|
|
1
|
1
|
27
|
address => '127.0.0.1', |
21
|
|
|
|
|
|
|
@_, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
0
|
sub getLength { 4 } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pack { |
28
|
2
|
|
|
2
|
1
|
126
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
|
|
6
|
$self->raw($self->SUPER::pack('a4', |
31
|
|
|
|
|
|
|
inetAton($self->address) |
32
|
|
|
|
|
|
|
)) or return; |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
89
|
return $self->raw; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub unpack { |
38
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
0
|
$self->address(inetNtoa(substr $self->raw, 0, 4)); |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
0
|
$self->payload(substr $self->raw, 4); |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
0
|
return $self; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub encapsulate { |
48
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
49
|
|
|
|
|
|
|
|
50
|
0
|
0
|
|
|
|
0
|
return $self->nextLayer if $self->nextLayer; |
51
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
0
|
if ($self->payload) { |
53
|
0
|
|
|
|
|
0
|
return 'DNS::RR'; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
0
|
NF_LAYER_NONE; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub print { |
60
|
2
|
|
|
2
|
1
|
202
|
my $self = shift; |
61
|
|
|
|
|
|
|
|
62
|
2
|
|
|
|
|
8
|
my $l = $self->layer; |
63
|
2
|
|
|
|
|
22
|
my $buf = sprintf |
64
|
|
|
|
|
|
|
"$l: address:%s", |
65
|
|
|
|
|
|
|
$self->address; |
66
|
|
|
|
|
|
|
|
67
|
2
|
|
|
|
|
341
|
return $buf; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |