Class: DHCP::UUIDGUIDOption

Inherits:
Option
  • Object
show all
Defined in:
lib/net/dhcp/options.rb

Overview

Octet “t” describes the type of the machine identifier in the remaining octets in this option. 0 (zero) is the only value defined for this octet at the present time, and it describes the remaining octets as a 16-octet Globally Unique Identifier (GUID). Octet “n” is 17 for type 0. (One definition of GUID can be found in Appendix A of the EFI specification [4].)

See rfc4578 for full details

The code for this option is 97, and its length is 17: 1 for the type of identifier and 16 for a Globally Unique Identifier.

The default payload for this option is 0, [0x69]*16

Instance Attribute Summary

Attributes inherited from Option

#len, #payload, #type

Instance Method Summary collapse

Methods inherited from Option

#eql?, #pack, #to_a

Constructor Details

#initialize(params = {}) ⇒ UUIDGUIDOption

Returns a new instance of UUIDGUIDOption.



475
476
477
478
479
# File 'lib/net/dhcp/options.rb', line 475

def initialize(params={})
  params[:type] =  $DHCP_UUIDGUID
  params[:payload] = params.fetch(:payload, [0]+[0x69]*16)
  super(params)
end

Instance Method Details

#to_sObject



480
481
482
# File 'lib/net/dhcp/options.rb', line 480

def to_s
  "UUID/GUID Client Identifier = #{self.payload}"
end