class PacketFu::TcpOption::ECHOREPLY
Echo Reply option.
Public Class Methods
new(args={})
click to toggle source
Calls superclass method
PacketFu::TcpOption.new
# 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