Class: DHCP::DomainNameServerOption
- Defined in:
- lib/net/dhcp/options.rb
Overview
The domain name server option specifies a list of Domain Name System (STD 13, RFC 1035 [8]) name servers available to the client. Servers SHOULD be listed in order of preference.
The code for the domain name server option is 6. The minimum length for this option is 4 octets, and the length MUST always be a multiple of 4.
The default value for this option is 0.0.0.0
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ DomainNameServerOption
constructor
A new instance of DomainNameServerOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ DomainNameServerOption
Returns a new instance of DomainNameServerOption.
126 127 128 129 130 |
# File 'lib/net/dhcp/options.rb', line 126 def initialize(params={}) params[:type] = $DHCP_DNS params[:payload] = params.fetch(:payload, [0, 0, 0, 0]) super(params) end |
Instance Method Details
#to_s ⇒ Object
132 133 134 |
# File 'lib/net/dhcp/options.rb', line 132 def to_s() "Domain Name Server = #{self.payload.join('.')}" end |