Class: DHCP::RouterOption
Overview
The router option specifies a list of IP addresses for routers on the client’s subnet. Routers SHOULD be listed in order of preference.
The code for the router option is 3. The minimum length for the router 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 = {}) ⇒ RouterOption
constructor
A new instance of RouterOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ RouterOption
Returns a new instance of RouterOption.
105 106 107 108 109 |
# File 'lib/net/dhcp/options.rb', line 105 def initialize(params={}) params[:type] = $DHCP_ROUTER params[:payload] = params.fetch(:payload, [0, 0, 0, 0]) super(params) end |
Instance Method Details
#to_s ⇒ Object
111 112 113 |
# File 'lib/net/dhcp/options.rb', line 111 def to_s() "Router = #{self.payload.join('.')}" end |