Class: PacketGen::Header::TCP::MSS

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

Overview

Maximum Segment 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

Constructor Details

#initialize(options = {}) ⇒ MSS

Returns a new instance of MSS.

See Also:



159
160
161
162
# File 'lib/packetgen/header/tcp/option.rb', line 159

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

Instance Method Details

#to_humanString

Get human-readable description

Returns:

  • (String)


166
167
168
# File 'lib/packetgen/header/tcp/option.rb', line 166

def to_human
  "MSS:#{value}"
end