Class: PacketFu::TcpOption::NOP

Inherits:
PacketFu::TcpOption show all
Defined in:
lib/packetfu/protos/tcp/option.rb

Overview

No Operation option. Usually used to pad out options to fit a 4-byte alignment.

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

Instance Attribute Summary

Attributes inherited from PacketFu::TcpOption

#kind, #optlen, #value

Instance Method Summary collapse

Methods inherited from PacketFu::TcpOption

#encode, #has_optlen?, #has_value?, #read, #to_s

Methods included from StructFu

#body=, #clone, #set_endianness, #sz, #typecast

Methods inherited from Struct

#force_binary

Constructor Details

#initialize(args = {}) ⇒ NOP

Returns a new instance of NOP.



118
119
120
121
122
# File 'lib/packetfu/protos/tcp/option.rb', line 118

def initialize(args={})
  super(
    args.merge(:kind => 1)
  )
end

Instance Method Details

#decodeObject



124
125
126
# File 'lib/packetfu/protos/tcp/option.rb', line 124

def decode
  "NOP"
end