Class: DHCP::BroadcastAddressOption
- Defined in:
- lib/net/dhcp/options.rb
Overview
This option specifies the broadcast address in use on the client’s subnet. Legal values for broadcast addresses are specified in section 3.2.1.3 of [4].
The code for this option is 28, and its length is 4.
The default value for this option is 255.255.255.255
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ BroadcastAddressOption
constructor
A new instance of BroadcastAddressOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ BroadcastAddressOption
Returns a new instance of BroadcastAddressOption.
183 184 185 186 187 |
# File 'lib/net/dhcp/options.rb', line 183 def initialize(params={}) params[:type] = $DHCP_BROADCASTADDR params[:payload] = params.fetch(:payload, [255, 255, 255, 255]) super(params) end |
Instance Method Details
#to_s ⇒ Object
189 190 191 |
# File 'lib/net/dhcp/options.rb', line 189 def to_s() "Broadcast Adress = #{self.payload.join('.')}" end |