Class: PacketGen::Header::TCP::Options
- Inherits:
-
BinStruct::Array
- Object
- BinStruct::Array
- PacketGen::Header::TCP::Options
- Defined in:
- lib/packetgen/header/tcp/options.rb
Overview
Container for TCP options in TCP header.
Class Method Summary collapse
-
.option_classes ⇒ Array<Class>
Get Option subclasses.
Class Method Details
.option_classes ⇒ Array<Class>
Get PacketGen::Header::TCP::Option subclasses
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/packetgen/header/tcp/options.rb', line 29 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 |