Class: PacketGen::Header::DHCPv6::DUID_EN

Inherits:
DUID show all
Defined in:
lib/packetgen/header/dhcpv6/duid.rb

Overview

DUID Based on Enterprise Number

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Constant Summary

Constants inherited from DUID

PacketGen::Header::DHCPv6::DUID::TYPES

Instance Attribute Summary collapse

Attributes inherited from DUID

#body, #type

Instance Method Summary collapse

Methods inherited from DUID

#human_type, #read

Methods included from Types::Fieldable

#format_inspect, #read, #sz, #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::Types::Fields

Instance Attribute Details

#enInteger

32-bit entreprise number

Returns:

  • (Integer)


119
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 119

define_field :en, Types::Int32

#identifierString

Returns:

  • (String)


122
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 122

define_field :identifier, Types::String

Instance Method Details

#to_humanString

Get human-readable DUID description

Returns:

  • (String)

Since:

  • 2.5.0



126
127
128
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 126

def to_human
  'DUID_EN<%#x,%s>' % [en, identifier]
end