class PacketFu::TcpOption::WS
Window Size option.
Public Class Methods
Source
# File lib/packetfu/protos/tcp/option.rb, line 159 def initialize(args={}) super( args.merge(:kind => 3, :optlen => 3 ) ) self[:value] = Int8.new(args[:value]) end
Calls superclass method
PacketFu::TcpOption::new
Public Instance Methods
Source
# File lib/packetfu/protos/tcp/option.rb, line 171 def decode if self[:optlen].to_i == 3 "WS:#{self[:value].to_i}" else "WS-bad:#{self[:value]}" end end
WS
options with lengths other than 3 are malformed.