class PacketProtocols::Tcp

Public Instance Methods

header_length_in_bytes() click to toggle source

virtual assert: :checksum_valid?

# File lib/packet-protocols/tcp.rb, line 29
def header_length_in_bytes
  data_offset * 4
end
length() click to toggle source
# File lib/packet-protocols/tcp.rb, line 37
def length
  header_length_in_bytes + options_length_in_bytes + payload.length
end
options_length_in_bytes() click to toggle source
# File lib/packet-protocols/tcp.rb, line 33
def options_length_in_bytes
  header_length_in_bytes - options.rel_offset
end