Class: DHCP::DomainNameOption
Overview
This option specifies the domain name that client should use when resolving hostnames via the Domain Name System.
The code for this option is 15. Its minimum length is 1.
The default value for this option is “nomejortu.com”
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ DomainNameOption
constructor
A new instance of DomainNameOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ DomainNameOption
Returns a new instance of DomainNameOption.
164 165 166 167 168 |
# File 'lib/net/dhcp/options.rb', line 164 def initialize(params={}) params[:type] = $DHCP_DOMAINNAME params[:payload] = params.fetch(:payload, 'nomejortu.com'.unpack('C*')) super(params) end |
Instance Method Details
#to_s ⇒ Object
170 171 172 |
# File 'lib/net/dhcp/options.rb', line 170 def to_s() "Domain Name = #{self.payload.pack('C*')}" end |