Class: Blondy::DHCPD::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/blondy/dhcpd/dispatcher.rb

Class Method Summary collapse

Class Method Details

.dispatch(data, ip, port) ⇒ Object

Raises:



10
11
12
13
14
15
# File 'lib/blondy/dhcpd/dispatcher.rb', line 10

def dispatch(data, ip, port)
  @data = DHCP::Message.from_udp_payload(data) rescue raise(IncorrectMessage, 'Incorrect message received.')
  raise(IncorrectMessage, 'Incorrect message received.') unless @data
  set_hwaddr
  reply
end