class PacketFu::TcpOption::SACKOK

Selective Acknowlegment OK option.

www.networksorcery.com/enp/protocol/tcp/option004.htm

Public Class Methods

new(args={}) click to toggle source
Calls superclass method PacketFu::TcpOption.new
# File lib/packetfu/protos/tcp/option.rb, line 185
def initialize(args={})
        super(
                args.merge(:kind => 4,
                                                         :optlen => 2)
        )
end

Public Instance Methods

decode() click to toggle source

SACKOK options with sizes other than 2 are malformed.

# File lib/packetfu/protos/tcp/option.rb, line 193
def decode
        if self[:optlen].to_i == 2
                "SACKOK"
        else
                "SACKOK-bad:#{self[:value]}"
        end
end