Class: PacketProtocols::Arp

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/packet-protocols/arp.rb

Constant Summary collapse

HARDWARES =
{ ethernet: 1 }
PROTOCOLS =
{ ipv4: 0x0800 }
OPERATIONS =
{ request: 1, reply: 2 }

Instance Method Summary collapse

Instance Method Details

#ipv4_in_ethernet?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/packet-protocols/arp.rb', line 24

def ipv4_in_ethernet?
  hardware == :ethernet && protocol == :ipv4
end

#lengthObject



28
29
30
# File 'lib/packet-protocols/arp.rb', line 28

def length
  28
end