Class: PacketGen::Header::DHCPv6::ORO
- Inherits:
-
Option
- Object
- Types::Fields
- Option
- PacketGen::Header::DHCPv6::ORO
- Defined in:
- lib/packetgen/header/dhcpv6/option.rb
Overview
DHCPv6 Option Request Option
Instance Attribute Summary collapse
Attributes inherited from Option
Instance Method Summary collapse
-
#human_data ⇒ String
Get human-readable data.
-
#read(str) ⇒ self
Populate object from
str.
Methods inherited from Option
#human_type, #initialize, new, subclasses, #to_human
Methods inherited from Types::Fields
#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #initialize, #inspect, #offset_of, #optional?, #optional_fields, #present?, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field
Constructor Details
This class inherits a constructor from PacketGen::Header::DHCPv6::Option
Instance Attribute Details
#options ⇒ RequestedOptions
233 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 233 define_field :options, RequestedOptions |
Instance Method Details
#human_data ⇒ String
Get human-readable data
247 248 249 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 247 def human_data self[:options].to_human end |
#read(str) ⇒ self
Populate object from str
238 239 240 241 242 243 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 238 def read(str) self[:type].read str[0, 2] self[:length].read str[2, 2] self[:options].read str[4, self.length] self end |