Sha256: 837f506fcac739dd49b6e35c3c5f0bffb72004e7c014cc9981096449e42b1169
Contents?: true
Size: 786 Bytes
Versions: 17
Compression:
Stored size: 786 Bytes
Contents
require 'bindata' require 'pio/ethernet_header' require 'pio/type/ip_address' require 'pio/type/mac_address' module Pio class Arp # ARP parser. class Format < BinData::Record include EthernetHeader endian :big ethernet_header ether_type: EtherType::ARP uint16 :hardware_type, value: 1 uint16 :protocol_type, value: 0x0800 uint8 :hardware_length, value: 6 uint8 :protocol_length, value: 4 uint16 :operation mac_address :sender_hardware_address ip_address :sender_protocol_address mac_address :target_hardware_address ip_address :target_protocol_address def message_type operation end def to_binary to_binary_s + "\000" * (64 - num_bytes) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems