Class: PacketGen::Header::TCP::ECHOREPLY

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

Overview

Echo Reply 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 = {}) ⇒ ECHOREPLY

Returns a new instance of ECHOREPLY.

See Also:



229
230
231
232
# File 'lib/packetgen/header/tcp/option.rb', line 229

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

Instance Method Details

#to_humanString

Get human-readable description

Returns:

  • (String)


236
237
238
# File 'lib/packetgen/header/tcp/option.rb', line 236

def to_human
  "WS:#{value}"
end