Class: PacketGen::Header::TCP::SACK
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Selective Acknowledgment 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 = {}) ⇒ SACK
constructor
A new instance of SACK.
Methods inherited from Option
#has_length?, #inspect, #read, #to_human, #to_s
Methods included from StructFu
#body=, #clone, #set_endianness, #sz, #to_s, #typecast
Methods inherited from Struct
Constructor Details
#initialize(options = {}) ⇒ SACK
Returns a new instance of SACK.
200 201 202 203 |
# File 'lib/packetgen/header/tcp/option.rb', line 200 def initialize(={}) super .merge!(kind: SACK_KIND) self[:length].read(2) if self[:value].to_s == '' end |