Class: DHCP::ClientFQDNOption

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

Overview

Option that can be used to exchange information about a DHCPv4 client’s fully qualified domain name and about responsibility for updating the DNS RR related to the client’s address assignment.

See rfc4702 for full details

The code for this option is 81, and its minimun length is 3.

The default payload for this option is ‘etd’

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 = {}) ⇒ ClientFQDNOption

Returns a new instance of ClientFQDNOption.



393
394
395
396
397
# File 'lib/net/dhcp/options.rb', line 393

def initialize(params={})
  params[:type] =  $DHCP_CLIENTFQDN
  params[:payload] = params.fetch(:payload, 'etd'.unpack('C*'))
  super(params)
end

Instance Method Details

#to_sObject



399
400
401
# File 'lib/net/dhcp/options.rb', line 399

def to_s
  "Client Fully Qualified Domain Name = #{self.payload.pack('C*')}"
end