Class: PacketGen::Header::DHCPv6::ORO

Inherits:
Option show all
Defined in:
lib/packetgen/header/dhcpv6/option.rb

Overview

DHCPv6 Option Request Option

Since:

  • 2.5.0

Constant Summary collapse

TYPE =

Option type value

Since:

  • 2.5.0

6

Instance Attribute Summary collapse

Attributes inherited from Option

#data, #length, #type

Instance Method Summary collapse

Methods inherited from Option

#human_type, #initialize, new, subclasses, #to_human

Methods inherited from Types::Fields

#[], #[]=, #bits_on, #body=, define_bit_fields_on, define_field, define_field_after, define_field_before, delete_field, #fields, #force_binary, inherited, #initialize, #inspect, #is_optional?, #is_present?, #offset_of, #optional?, #optional_fields, #present?, #sz, #to_h, #to_s

Constructor Details

This class inherits a constructor from PacketGen::Header::DHCPv6::Option

Instance Attribute Details

#optionsRequestedOptions

Returns:



265
# File 'lib/packetgen/header/dhcpv6/option.rb', line 265

define_field :options, RequestedOptions

Instance Method Details

#human_dataString

Get human-readable data

Returns:

  • (String)

Since:

  • 2.5.0



279
280
281
# File 'lib/packetgen/header/dhcpv6/option.rb', line 279

def human_data
  self[:options].to_human
end

#read(str) ⇒ self

Populate object from str

Parameters:

  • str (String)

Returns:

  • (self)

Since:

  • 2.5.0



270
271
272
273
274
275
# File 'lib/packetgen/header/dhcpv6/option.rb', line 270

def read(str)
  self[:type].read str[0, 2]
  self[:length].read str[2, 2]
  self[:options].read str[4, self.length]
  self
end