line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: TimeExceed.pm 56 2015-01-20 18:55:33Z gomor $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::ICMPv4::TimeExceed; |
5
|
3
|
|
|
3
|
|
5927
|
use strict; use warnings; |
|
3
|
|
|
3
|
|
5
|
|
|
3
|
|
|
|
|
107
|
|
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
86
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
686
|
use Net::Frame::Layer qw(:consts); |
|
3
|
|
|
|
|
58682
|
|
|
3
|
|
|
|
|
1151
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
11
|
|
|
|
|
|
|
unused |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
1
|
|
|
1
|
1
|
23
|
my $self = shift->SUPER::new( |
18
|
|
|
|
|
|
|
unused => 0, |
19
|
|
|
|
|
|
|
@_, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
169
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
0
|
sub getLength { 4 } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pack { |
28
|
1
|
|
|
1
|
1
|
7
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
1
|
50
|
|
|
|
4
|
$self->raw($self->SUPER::pack('N', $self->unused)) |
31
|
|
|
|
|
|
|
or return; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
50
|
return $self->raw; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub unpack { |
37
|
1
|
|
|
1
|
1
|
9
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
1
|
50
|
|
|
|
4
|
my ($unused, $payload) = $self->SUPER::unpack('N a*', $self->raw) |
40
|
|
|
|
|
|
|
or return; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
24
|
$self->unused($unused); |
43
|
1
|
|
|
|
|
10
|
$self->payload($payload); |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
7
|
return $self; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub encapsulate { |
49
|
1
|
|
|
1
|
1
|
335
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
1
|
50
|
|
|
|
10
|
return $self->nextLayer if $self->nextLayer; |
52
|
|
|
|
|
|
|
|
53
|
1
|
50
|
|
|
|
22
|
if ($self->payload) { |
54
|
0
|
|
|
|
|
0
|
my $pLen = length($self->payload); |
55
|
0
|
0
|
|
|
|
0
|
if ($pLen < 40) { |
56
|
0
|
|
|
|
|
0
|
$self->payload($self->payload.("\x00" x (40 - $pLen))); |
57
|
|
|
|
|
|
|
} |
58
|
0
|
|
|
|
|
0
|
return 'IPv4'; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
51
|
return NF_LAYER_NONE; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub print { |
65
|
1
|
|
|
1
|
1
|
4
|
my $self = shift; |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
6
|
my $l = $self->layer; |
68
|
1
|
|
|
|
|
15
|
return sprintf "$l: unused:%d", $self->unused; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__ |