class Pio::Dhcp::Frame

Dhcp frame parser.

Constants

OPTION_FIELD_LENGTH

Public Instance Methods

to_binary() click to toggle source
# File lib/pio/dhcp/frame.rb, line 28
def to_binary
  to_binary_s
end

Private Instance Methods

ff_and_padding() click to toggle source
# File lib/pio/dhcp/frame.rb, line 34
def ff_and_padding
  padding_length = OPTION_FIELD_LENGTH - dhcp.optional_tlvs.num_bytes - 1
  [0xFF].pack('C') + (padding_length > 0 ? "\x00" * padding_length : '')
end