Sha256: 6dfccde7636c49d648ae553767eae687cc6f9488949581df225b865ab58adf29

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

require 'bindata'
require 'pio/ethernet_header'
require 'pio/ipv4_header'
require 'pio/udp_header'

module Pio
  # UDP packet format
  class Udp < BinData::Record
    include EthernetHeader
    include IPv4Header
    include UdpHeader

    endian :big
    ethernet_header ether_type: EthernetHeader::ETHER_TYPE_IP
    ipv4_header ip_protocol: IPv4Header::IP_PROTOCOL_UDP
    udp_header
    rest :udp_payload
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pio-0.16.0 lib/pio/udp.rb