Class PacketFu::TcpFlags
In: lib/packetfu/tcp.rb
Parent: Struct.new(:urg, :ack, :psh, :rst, :syn, :fin)

Implements flags for TCPHeader.

Header Definition

 Fixnum (1 bit)  :urg
 Fixnum (1 bit)  :ack
 Fixnum (1 bit)  :psh
 Fixnum (1 bit)  :rst
 Fixnum (1 bit)  :syn
 Fixnum (1 bit)  :fin

Flags can typically be set by setting them either to 1 or 0, or to true or false.

Methods

ack=   fin=   new   psh=   read   rst=   syn=   to_i   urg=   zero_or_one  

Included Modules

StructFu

Public Class methods

Public Instance methods

Setter for the Acknowlege flag.

Setter for the Finish flag.

Setter for the Push flag.

Reads a string to populate the object.

Setter for the Reset flag.

Setter for the Synchronize flag.

Returns the TcpFlags as an integer. Also not a great candidate for to_s due to the short bitspace.

Setter for the Urgent flag.

Helper to determine if this flag is a 1 or a 0.

[Validate]