Class: PacketGen::Header::DHCPv6::IATA

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

Overview

DHCPv6 Identity Association for Temporary Addresses Option

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

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 included from Types::Fieldable

#format_inspect, #read, #sz, #to_human, #to_s, #type_name

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?, #read, 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

#iaidInteger

32-bit IAID field

Returns:

  • (Integer)


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

define_field :iaid, Types::Int32

#optionsString

options field

Returns:

  • (String)


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

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

Instance Method Details

#human_dataString

Get human-readable data (IAID)

Returns:

  • (String)

Since:

  • 2.5.0



183
184
185
# File 'lib/packetgen/header/dhcpv6/option.rb', line 183

def human_data
  '%#x' % iaid
end