Farly/ASA/ProtocolFormatter.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Farly/ASA/PortFormatter.pm ↑ Summary Farly/Object/Ref.pm »
1 package Farly::ASA::ProtocolFormatter;
2
3 11 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 11 our $VERSION = '0.26';
8
9 11 our $String_To_Int = {
10 "ah" => 51,
11 "eigrp" => 88,
12 "esp" => 50,
13 "ipsec" => 50,
14 "gre" => 47,
15 "pptp" => 47,
16 "icmp" => 1,
17 "icmp6" => 58,
18 "igmp" => 2,
19 "igrp" => 9,
20 "ip" => 0,
21 "ipinip" => 4,
22 "nos" => 94,
23 "ospf" => 89,
24 "pcp" => 108,
25 "pim" => 103,
26 "snp" => 109,
27 "tcp" => 6,
28 "udp" => 17,
29 };
30
31 11 our $Int_To_String = { reverse %$String_To_Int };
32
33 15 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
34 15 return bless {}, $_[0];
35 }
36
37 17 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
38 17 return $Int_To_String->{ $_[1] };
39 }
40
41 328 ▶sub as_integer {
Subroutine as_integer: called CC=1 SCAR=0.0
Pod documented
42 328 return $String_To_Int->{ $_[1] };
43 }
44
45 11 1;
46 __END__
« Farly/ASA/PortFormatter.pm ↑ Summary Farly/Object/Ref.pm »