Class: Arp

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/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)


23
24
25
# File 'lib/arp.rb', line 23

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

#lengthObject



27
28
29
# File 'lib/arp.rb', line 27

def length
  28
end