Class: PacketGen::Header::TCP::MSS
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Maximum Segment 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 = {}) ⇒ MSS
constructor
A new instance of MSS.
- #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 = {}) ⇒ MSS
Returns a new instance of MSS.
161 162 163 164 |
# File 'lib/packetgen/header/tcp/option.rb', line 161 def initialize(={}) super .merge!(kind: MSS_KIND, length: 4) self[:value] = Int16.new([:value]) end |
Instance Method Details
#to_human ⇒ String
167 168 169 |
# File 'lib/packetgen/header/tcp/option.rb', line 167 def to_human "MSS:#{value}" end |