Class: PacketGen::Header::DHCPv6::ElapsedTime

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

Overview

DHCPv6 Elapsed Time option

Since:

  • 2.5.0

Direct Known Subclasses

StatusCode

Constant Summary collapse

TYPE =

Option type value

Since:

  • 2.5.0

8

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

#[], #[]=, #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

#valueInteger

16-bit value

Returns:

  • (Integer)


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

define_field :value, Types::Int16

Instance Method Details

#human_dataString

Get human-readable data (value)

Returns:

  • (String)

Since:

  • 2.5.0



333
334
335
# File 'lib/packetgen/header/dhcpv6/option.rb', line 333

def human_data
  value.to_s
end