Class: PacketGen::Header::DHCPv6::IANA

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

Overview

DHCPv6 Identity Association for Non-temporary Addresses Option

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Constant Summary collapse

TYPE =

Option type value

Since:

  • 2.5.0

3

Instance Attribute Summary collapse

Attributes inherited from Option

#data, #length, #type

Instance Method Summary collapse

Methods inherited from Option

#human_type, #initialize, new, #read, 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?, #read, #sz, #to_h, #to_s

Constructor Details

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

Instance Attribute Details

#iaidInteger

32-bit IAID field

Returns:

  • (Integer)


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

define_field :iaid, Types::Int32

#optionsString

options field

Returns:

  • (String)


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

define_field :options, Types::String,
builder: ->(h, t) { t.new length_from: -> { h[:length].to_i - 12 } }

#t1Integer

32-bit T1 field

Returns:

  • (Integer)


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

define_field :t1, Types::Int32

#t2Integer

32-bit T2 field

Returns:

  • (Integer)


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

define_field :t2, Types::Int32

Instance Method Details

#human_dataString

Get human-readable data (IAID, T1 and T2)

Returns:

  • (String)

Since:

  • 2.5.0



185
186
187
# File 'lib/packetgen/header/dhcpv6/option.rb', line 185

def human_data
  '%#x,%u,%u' % [iaid, t1, t2]
end