Class: PacketGen::Header::DHCP::Options
- Inherits:
-
Types::Array
- Object
- Types::Array
- PacketGen::Header::DHCP::Options
- Defined in:
- lib/packetgen/header/dhcp/options.rb
Overview
Container class for DHCP Options.
Add DHCP options to an Options
instance
= PacketGen::Header::DHCP::Options.new
# Add a lease_time option
<< { type: 'lease_time', value: 3600 }
# Add a domain option. Here, use integer type
<< { type: 15, value: 'example.net'}
# Add an end option
<< { type: 'end' }
# And finish with padding
<< { type: 'pad' }
Constant Summary
Constants inherited from Types::Array
Constants included from Types::LengthFrom
Types::LengthFrom::MAX_SZ_TO_READ
Method Summary
Methods inherited from Types::Array
#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #initialize, #initialize_copy, #last, #push, #read, set_of, set_of_klass, #size, #sz, #to_a, #to_human, #to_s
Methods included from Types::LengthFrom
#initialize_length_from, #read_with_length_from, #sz_to_read
Methods included from Types::Fieldable
#format_inspect, #read, #sz, #to_human, #to_s, #type_name
Constructor Details
This class inherits a constructor from PacketGen::Types::Array