Class: PacketGen::Header::TCP::WS
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Window Size 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 = {}) ⇒ WS
constructor
A new instance of WS.
- #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 = {}) ⇒ WS
Returns a new instance of WS.
176 177 178 179 |
# File 'lib/packetgen/header/tcp/option.rb', line 176 def initialize(={}) super .merge!(kind: WS_KIND, length: 3) self[:value] = Int8.new([:value]) end |
Instance Method Details
#to_human ⇒ String
182 183 184 |
# File 'lib/packetgen/header/tcp/option.rb', line 182 def to_human "WS:#{value}" end |