Class: PacketGen::Header::DHCPv6::IANA
- Inherits:
-
Option
- Object
- Types::Fields
- Option
- PacketGen::Header::DHCPv6::IANA
- Defined in:
- lib/packetgen/header/dhcpv6/option.rb
Overview
DHCPv6 Identity Association for Non-temporary Addresses Option
Instance Attribute Summary collapse
-
#iaid ⇒ Integer
32-bit IAID field.
-
#options ⇒ String
options field.
-
#t1 ⇒ Integer
32-bit T1 field.
-
#t2 ⇒ Integer
32-bit T2 field.
Attributes inherited from Option
Instance Method Summary collapse
-
#human_data ⇒ String
Get human-readable data (IAID, T1 and T2).
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
#iaid ⇒ Integer
32-bit IAID field
143 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 143 define_field :iaid, Types::Int32 |
#options ⇒ String
options field
155 156 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 155 define_field :options, Types::String, builder: ->(h, t) { t.new length_from: -> { h[:length].to_i - 12 } } |
Instance Method Details
#human_data ⇒ String
Get human-readable data (IAID, T1 and T2)
160 161 162 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 160 def human_data '%#x,%u,%u' % [iaid, t1, t2] end |