Class: PacketGen::Header::TCP::Options
- Inherits:
-
Types::Array
- Object
- Types::Array
- PacketGen::Header::TCP::Options
- Defined in:
- lib/packetgen/header/tcp/options.rb
Overview
Container for TCP options in TCP header.
Constant Summary
Constants inherited from Types::Array
Constants included from Types::LengthFrom
Types::LengthFrom::MAX_SZ_TO_READ
Class Method Summary collapse
-
.option_classes ⇒ Array<Class>
Get Option subclasses.
Methods inherited from Types::Array
#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #initialize, #initialize_copy, #last, #push, #read, set_of, set_of_klass, #size, #sz, #to_a, #to_human, #to_s
Methods included from Types::LengthFrom
#initialize_length_from, #read_with_length_from, #sz_to_read
Methods included from Types::Fieldable
#format_inspect, #read, #sz, #to_human, #to_s, #type_name
Constructor Details
This class inherits a constructor from PacketGen::Types::Array
Class Method Details
.option_classes ⇒ Array<Class>
Get PacketGen::Header::TCP::Option subclasses
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/packetgen/header/tcp/options.rb', line 21 def self.option_classes return @klasses if defined? @klasses @klasses = [] Option.constants.each do |cst| next unless cst.to_s.end_with? '_KIND' optname = cst.to_s.sub('_KIND', '') @klasses[Option.const_get(cst)] = TCP.const_get(optname) end @klasses end |