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
Constant Summary collapse
- TYPE =
Option type value
3
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, #read, subclasses, #to_human
Methods inherited from Types::Fields
#[], #[]=, #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_fields, #read, #sz, #to_h, #to_s
Constructor Details
This class inherits a constructor from PacketGen::Header::DHCPv6::Option
Instance Attribute Details
#iaid ⇒ Integer
32-bit IAID field
172 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 172 define_field :iaid, Types::Int32 |
#options ⇒ String
options field
184 185 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 184 define_field :options, Types::String, builder: ->(h, t) { t.new length_from: -> { h[:length].to_i - 12 } } |
#t1 ⇒ Integer
32-bit T1 field
176 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 176 define_field :t1, Types::Int32 |
#t2 ⇒ Integer
32-bit T2 field
180 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 180 define_field :t2, Types::Int32 |
Instance Method Details
#human_data ⇒ String
Get human-readable data (IAID, T1 and T2)
189 190 191 |
# File 'lib/packetgen/header/dhcpv6/option.rb', line 189 def human_data '%#x,%u,%u' % [iaid, t1, t2] end |