Module: Pio::UdpHeader

Includes:
Payload
Included in:
Dhcp::Frame, Udp
Defined in:
lib/pio/udp_header.rb

Overview

UDP Header Format.

Defined Under Namespace

Classes: PseudoUdpHeader

Class Method Summary collapse

Methods included from Payload

#binary_after

Class Method Details

.included(klass) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/pio/udp_header.rb', line 20

def self.included(klass)
  def klass.udp_header
    uint16 :udp_source_port
    uint16 :udp_destination_port
    uint16 :udp_length, initial_value: :calculate_udp_length
    uint16 :udp_checksum, initial_value: :calculate_udp_checksum
  end
end