class PacketFu::TcpOption::WS
Window Size option.
Public Class Methods
new(args={})
click to toggle source
Calls superclass method
PacketFu::TcpOption.new
# 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
Public Instance Methods
decode()
click to toggle source
WS options with lengths other than 3 are malformed.
# 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
value=(i)
click to toggle source
# File lib/packetfu/protos/tcp/option.rb, line 168 def value=(i); typecast i; end