class PacketFu::TcpOption::ECHO

Echo option.

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

Public Class Methods

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

Public Instance Methods

decode() click to toggle source

ECHO options with lengths other than 6 are malformed.

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