Module: Pio::Type::EthernetHeader

Included in:
Arp::Format, Dhcp::Frame, Icmp::Format, Lldp::Frame
Defined in:
lib/pio/type/ethernet_header.rb

Overview

Adds ethernet_header macro.

Instance Method Summary collapse

Instance Method Details

#ethernet_header(options) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/pio/type/ethernet_header.rb', line 9

def ethernet_header(options)
  class_eval do
    mac_address :destination_mac
    mac_address :source_mac
    uint16 :ether_type, value: options[:ether_type]
  end
end