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

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

Overview

DHCPv6 Option Request Option

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Instance Attribute Summary collapse

Attributes inherited from Option

#length, #type

Instance Method Summary collapse

Methods inherited from Option

human_type, initialize, new, subclasses, to_human

Instance Attribute Details

#optionsBinStruct::ArrayOfInt16

Returns:

  • (BinStruct::ArrayOfInt16)

Since:

  • 2.5.0

  • 4.1.0 Type BinStruct::ArrayOfInt16 instead of custom RequestedOptions (deleted)



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

define_attr :options, BinStruct::ArrayOfInt16, builder: ->(h, t) { t.new(length_from: h[:length]) }

Instance Method Details

#human_dataString

Get human-readable data

Returns:

  • (String)

Since:

  • 2.5.0



234
235
236
# File 'lib/packetgen/header/dhcpv6/option.rb', line 234

def human_data
  self[:options].to_human
end