Farly/ASA/PortFormatter.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/ICMPFormatter.pm ↑ Summary Farly/ASA/ProtocolFormatter.pm »
1 package Farly::ASA::PortFormatter;
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 "aol" => 5190,
11 "bgp" => 179,
12 "biff" => 512,
13 "bootpc" => 68,
14 "bootps" => 67,
15 "chargen" => 19,
16 "cifs" => 3020,
17 "citrix-ica" => 1494,
18 "ctiqbe" => 2748,
19 "daytime" => 13,
20 "discard" => 9,
21 "dnsix" => 195,
22 "domain" => 53,
23 "echo" => 7,
24 "exec" => 512,
25 "finger" => 79,
26 "ftp" => 21,
27 "ftp-data" => 20,
28 "gopher" => 70,
29 "h323" => 1720,
30 "hostname" => 101,
31 "https" => 443,
32 "ident" => 113,
33 "imap4" => 143,
34 "irc" => 194,
35 "isakmp" => 500,
36 "kerberos" => 750,
37 "klogin" => 543,
38 "kshell" => 544,
39 "ldap" => 389,
40 "ldaps" => 636,
41 "login" => 513,
42 "lotusnotes" => 1352,
43 "lpd" => 515,
44 "mobile-ip" => 434,
45 "nameserver" => 42,
46 "netbios-dgm" => 138,
47 "netbios-ns" => 137,
48 "netbios-ssn" => 139,
49 "nfs" => 2049,
50 "nntp" => 119,
51 "ntp" => 123,
52 "pcanywhere-data" => 5631,
53 "pcanywhere-status" => 5632,
54 "pim-auto-rp" => 496,
55 "pop2" => 109,
56 "pop3" => 110,
57 "pptp" => 1723,
58 "radius" => 1645,
59 "radius-acct" => 1646,
60 "rip" => 520,
61 "rsh" => 514,
62 "rtsp" => 554,
63 "secureid-udp" => 5510,
64 "sip" => 5060,
65 "sip" => 5060,
66 "smtp" => 25,
67 "snmp" => 161,
68 "snmptrap" => 162,
69 "sqlnet" => 1521,
70 "ssh" => 22,
71 "sunrpc" => 111,
72 "syslog" => 514,
73 "tacacs" => 49,
74 "talk" => 517,
75 "telnet" => 23,
76 "tftp" => 69,
77 "time" => 37,
78 "uucp" => 540,
79 "who" => 513,
80 "whois" => 43,
81 "www" => 80,
82 "xdmcp" => 177,
83 };
84
85 11 our $Int_To_String = { reverse %$String_To_Int };
86
87 19 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
88 19 return bless {}, $_[0];
89 }
90
91 25 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
92 25 return $Int_To_String->{ $_[1] };
93 }
94
95 121 ▶sub as_integer {
Subroutine as_integer: called CC=1 SCAR=0.0
Pod documented
96 121 return $String_To_Int->{ $_[1] };
97 }
98
99 11 1;
100 __END__
« Farly/ASA/ICMPFormatter.pm ↑ Summary Farly/ASA/ProtocolFormatter.pm »