Class: DHCP::ACK

Inherits:
Message show all
Defined in:
lib/net/dhcp/core.rb

Overview

Server to client with configuration parameters, including committed network address.

By default an ACK message will contain a Server Identifier (0.0.0.0) and a Domain Name (‘nomejortu.com’) option.

Instance Attribute Summary

Attributes inherited from Message

#chaddr, #ciaddr, #flags, #fname, #giaddr, #hlen, #hops, #htype, #op, #options, #secs, #siaddr, #sname, #xid, #yiaddr

Instance Method Summary collapse

Methods inherited from Message

#==, #eql?, from_udp_payload, #pack, #to_s

Constructor Details

#initialize(params = {}) ⇒ ACK

Returns a new instance of ACK.



324
325
326
327
328
329
330
331
332
# File 'lib/net/dhcp/core.rb', line 324

def initialize(params={})
  params[:op] = $DHCP_OP_REPLY
  params[:options] = params.fetch(:options, [
  MessageTypeOption.new({:payload=>[$DHCP_MSG_ACK]}), 
  ServerIdentifierOption.new,
  DomainNameOption.new
  ])
  super(params)
end