Class: DHCP::MaximumMsgSizeOption
- Defined in:
- lib/net/dhcp/options.rb
Overview
from rfc2132: This option specifies the maximum length DHCP message that it is willing to accept. The length is specified as an unsigned 16-bit integer. A client may use the maximum DHCP message size option in DHCPDISCOVER or DHCPREQUEST messages, but should not use the option in DHCPDECLINE messages.
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ MaximumMsgSizeOption
constructor
A new instance of MaximumMsgSizeOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ MaximumMsgSizeOption
Returns a new instance of MaximumMsgSizeOption.
493 494 495 496 497 |
# File 'lib/net/dhcp/options.rb', line 493 def initialize(params={}) params[:type] = $DHCP_MAXMSGSIZE params[:payload] = params.fetch(:payload, [1024].pack('n').unpack('C*')) super(params) end |
Instance Method Details
#to_s ⇒ Object
499 500 501 |
# File 'lib/net/dhcp/options.rb', line 499 def to_s "Maximum Message Size = #{self.payload}" end |