Class: CiscoAclIntp::AceTcpProtoSpec
- Inherits:
-
AceTcpUdpProtoSpec
- Object
- AccessControlContainer
- AceSpecBase
- AceProtoSpecBase
- AceTcpUdpProtoSpec
- CiscoAclIntp::AceTcpProtoSpec
- Defined in:
- lib/cisco_acl_intp/acespec_proto.rb
Overview
TCP protocol number/name container
Constant Summary collapse
- TCP_PROTO_TABLE =
convert table of tcp port/name
{ 'bgp' => 179, 'chargen' => 19, 'cmd' => 514, 'daytime' => 13, 'discard' => 9, 'domain' => 53, 'drip' => 3949, 'echo' => 7, 'exec' => 512, 'finger' => 79, 'ftp' => 21, 'ftp-data' => 20, 'gopher' => 70, 'hostname' => 101, 'ident' => 113, 'irc' => 194, 'klogin' => 543, 'kshell' => 544, 'login' => 513, 'lpd' => 515, 'nntp' => 119, 'pim-auto-rp' => 496, 'pop2' => 109, 'pop3' => 110, 'smtp' => 25, 'sunrpc' => 111, 'tacacs' => 49, 'talk' => 517, 'telnet' => 23, 'time' => 37, 'uucp' => 540, 'whois' => 43, 'www' => 80 }.freeze
Constants inherited from AceProtoSpecBase
CiscoAclIntp::AceProtoSpecBase::DUMMY_PROTO_TABLE
Constants inherited from AccessControlContainer
CiscoAclIntp::AccessControlContainer::TERM_COLOR_TABLE
Instance Attribute Summary
Attributes inherited from AceProtoSpecBase
#max_num, #name, #number, #protocol
Class Method Summary collapse
-
.valid_name?(name) ⇒ Boolean
Check the port name is known or not.
Instance Method Summary collapse
-
#initialize(proto_id = nil) ⇒ AceTcpProtoSpec
constructor
Constructor.
-
#proto_table ⇒ Hash
Protocol Table.
Methods inherited from AceProtoSpecBase
#<=>, #==, #define_param_by_integer, #define_param_by_string, #max?, #min?, #name_to_number, #number_to_name, #to_i, #to_s, #valid_name?, #valid_range?
Methods inherited from AccessControlContainer
#clean_acl_string, disable_color, #generate_tag_footer, #generate_tag_header, #generate_tagged_str, #method_missing, #to_s
Constructor Details
#initialize(proto_id = nil) ⇒ AceTcpProtoSpec
Constructor
132 133 134 135 |
# File 'lib/cisco_acl_intp/acespec_proto.rb', line 132 def initialize(proto_id = nil) super @protocol = :tcp end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CiscoAclIntp::AccessControlContainer
Class Method Details
.valid_name?(name) ⇒ Boolean
Check the port name is known or not.
146 147 148 |
# File 'lib/cisco_acl_intp/acespec_proto.rb', line 146 def self.valid_name?(name) TCP_PROTO_TABLE.key?(name) end |
Instance Method Details
#proto_table ⇒ Hash
Protocol Table
139 140 141 |
# File 'lib/cisco_acl_intp/acespec_proto.rb', line 139 def proto_table TCP_PROTO_TABLE end |