Class: DHCP::ParameterRequestListOption
- Defined in:
- lib/net/dhcp/options.rb
Overview
This option is used by a DHCP client to request values for specified configuration parameters. The list of requested parameters is specified as n octets, where each octet is a valid DHCP option code as defined in this document.
The client MAY list the options in order of preference. The DHCP server is not required to return the options in the requested order, but MUST try to insert the requested options in the order requested by the client.
The code for this option is 55. Its minimum length is 1.
The default value is: $DHCP_SUBNETMASK | $DHCP_ROUTER | $DHCP_DNS | $DHCP_DOMAINNAME
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ParameterRequestListOption
constructor
A new instance of ParameterRequestListOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ ParameterRequestListOption
Returns a new instance of ParameterRequestListOption.
308 309 310 311 312 |
# File 'lib/net/dhcp/options.rb', line 308 def initialize(params={}) params[:type] = $DHCP_PARAMREQUEST params[:payload] = params.fetch(:payload, [$DHCP_SUBNETMASK, $DHCP_ROUTER, $DHCP_DNS, $DHCP_DOMAINNAME]) super(params) end |
Instance Method Details
#to_s ⇒ Object
314 315 316 |
# File 'lib/net/dhcp/options.rb', line 314 def to_s "Parameter Request List = #{self.payload.join(',')}" end |