Methods

Class/Module Index [+]

Quicksearch

PacketFu::TcpOption::ECHOREPLY

Echo Reply option.

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

Public Class Methods

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

Public Instance Methods

decode() click to toggle source

ECHOREPLY options with lengths other than 6 are malformed.

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.