Sha256: 27985544004a82e6d1ff6ad1a433de6f82e307b01040cd0ac058a79846c88862

Contents?: true

Size: 345 Bytes

Versions: 7

Compression:

Stored size: 345 Bytes

Contents

require 'pio/type/mac_address'

module Pio
  module Type
    # Adds ethernet_header macro.
    module EthernetHeader
      def ethernet_header(options)
        class_eval do
          mac_address :destination_mac
          mac_address :source_mac
          uint16 :ether_type, value: options[:ether_type]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pio-0.11.2 lib/pio/type/ethernet_header.rb
pio-0.11.1 lib/pio/type/ethernet_header.rb
pio-0.11.0 lib/pio/type/ethernet_header.rb
pio-0.10.1 lib/pio/type/ethernet_header.rb
pio-0.10.0 lib/pio/type/ethernet_header.rb
pio-0.9.0 lib/pio/type/ethernet_header.rb
pio-0.8.2 lib/pio/type/ethernet_header.rb