Class: PacketGen::Header::TCP::ECHOREPLY
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Echo Reply TCP option
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
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ECHOREPLY
constructor
A new instance of ECHOREPLY.
- #to_human ⇒ String
Methods inherited from Option
#has_length?, #inspect, #read, #to_s
Methods included from StructFu
#body=, #clone, #set_endianness, #sz, #to_s, #typecast
Methods inherited from Struct
Constructor Details
#initialize(options = {}) ⇒ ECHOREPLY
Returns a new instance of ECHOREPLY.
225 226 227 228 |
# File 'lib/packetgen/header/tcp/option.rb', line 225 def initialize(={}) super .merge!(kind: ECHOREPLY_KIND, length: 6) self[:value] = Int32.new([:value]) end |
Instance Method Details
#to_human ⇒ String
231 232 233 |
# File 'lib/packetgen/header/tcp/option.rb', line 231 def to_human "WS:#{value}" end |