Class: PacketGen::Header::TCP::WS

Inherits:
Option show all
Defined in:
lib/packetgen/header/tcp/option.rb

Overview

Window Size TCP option

Author:

  • Sylvain Daubert

Constant Summary

Constants inherited from Option

Option::ECHOREPLY_KIND, Option::ECHO_KIND, Option::EOL_KIND, Option::MSS_KIND, Option::NOP_KIND, Option::SACKOK_KIND, Option::SACK_KIND, Option::TS_KIND, Option::WS_KIND

Instance Attribute Summary

Attributes inherited from Option

#kind, #length, #value

Instance Method Summary collapse

Methods inherited from Option

#inspect, #length?, #old_set_value, #to_s

Methods included from Types::Fieldable

#format_inspect, #read, #sz, #to_s, #type_name

Methods inherited from Types::Fields

#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field

Constructor Details

#initialize(options = {}) ⇒ WS

Returns a new instance of WS.

See Also:



168
169
170
171
# File 'lib/packetgen/header/tcp/option.rb', line 168

def initialize(options={})
  super
  self[:value] = Types::Int8.new(options[:value])
end

Instance Method Details

#to_humanString

Returns:

  • (String)


174
175
176
# File 'lib/packetgen/header/tcp/option.rb', line 174

def to_human
  "WS:#{value}"
end