line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Farly::ASA::ICMPFormatter;
|
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
18021
|
use 5.008008;
|
|
10
|
|
|
|
|
34
|
|
|
10
|
|
|
|
|
400
|
|
4
|
10
|
|
|
10
|
|
52
|
use strict;
|
|
10
|
|
|
|
|
1340
|
|
|
10
|
|
|
|
|
313
|
|
5
|
10
|
|
|
10
|
|
51
|
use warnings;
|
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
2179
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.26';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $String_To_Int = {
|
10
|
|
|
|
|
|
|
"echo-reply" => 0,
|
11
|
|
|
|
|
|
|
"unreachable" => 3,
|
12
|
|
|
|
|
|
|
"source-quench" => 4,
|
13
|
|
|
|
|
|
|
"redirect" => 5,
|
14
|
|
|
|
|
|
|
"alternate-address" => 6,
|
15
|
|
|
|
|
|
|
"echo" => 8,
|
16
|
|
|
|
|
|
|
"router-advertisement" => 9,
|
17
|
|
|
|
|
|
|
"router-solicitation" => 10,
|
18
|
|
|
|
|
|
|
"time-exceeded" => 11,
|
19
|
|
|
|
|
|
|
"parameter-problem" => 12,
|
20
|
|
|
|
|
|
|
"timestamp-request" => 13,
|
21
|
|
|
|
|
|
|
"timestamp-reply" => 14,
|
22
|
|
|
|
|
|
|
"information-request" => 15,
|
23
|
|
|
|
|
|
|
"information-reply" => 16,
|
24
|
|
|
|
|
|
|
"mask-request" => 17,
|
25
|
|
|
|
|
|
|
"mask-reply" => 18,
|
26
|
|
|
|
|
|
|
"traceroute" => 30,
|
27
|
|
|
|
|
|
|
"conversion-error" => 31,
|
28
|
|
|
|
|
|
|
"mobile-redirect" => 32,
|
29
|
|
|
|
|
|
|
};
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our $Int_To_String = { reverse %$String_To_Int };
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new {
|
34
|
9
|
|
|
9
|
0
|
416
|
return bless {}, $_[0];
|
35
|
|
|
|
|
|
|
}
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub as_string {
|
38
|
3
|
|
|
3
|
1
|
678
|
return $Int_To_String->{ $_[1] };
|
39
|
|
|
|
|
|
|
}
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub as_integer {
|
42
|
41
|
|
|
41
|
1
|
372
|
return $String_To_Int->{ $_[1] };
|
43
|
|
|
|
|
|
|
}
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1;
|
46
|
|
|
|
|
|
|
__END__
|