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

Inherits:
Option
  • Object
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

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

#iaidInteger

32-bit IAID field

Returns:

  • (Integer)


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

define_attr :iaid, BinStruct::Int32

#optionsString

options field

Returns:

  • (String)


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

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

#t1Integer

32-bit T1 field

Returns:

  • (Integer)


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

define_attr :t1, BinStruct::Int32

#t2Integer

32-bit T2 field

Returns:

  • (Integer)


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

define_attr :t2, BinStruct::Int32

Instance Method Details

#human_dataString

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

Returns:

  • (String)

Since:

  • 2.5.0



161
162
163
# File 'lib/packetgen/header/dhcpv6/option.rb', line 161

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