class PacketProtocols::Ipv4

Constants

PROTOCOLS

Public Instance Methods

header_length_in_bytes() click to toggle source

virtual assert: :checksum_valid?

# File lib/packet-protocols/ipv4.rb, line 36
def header_length_in_bytes
  header_length * 4
end
length() click to toggle source
# File lib/packet-protocols/ipv4.rb, line 44
def length
  total_length
end
options_length_in_bytes() click to toggle source
# File lib/packet-protocols/ipv4.rb, line 40
def options_length_in_bytes
  header_length_in_bytes - options.rel_offset
end