View Source OneDHCPD.Server (one_dhcpd v2.0.0)

This is the OneDHCPD Server.

Add it to a supervision tree in your application to use.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Return the server's name for the specified interface

Start a DHCP Server that works for one client.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

init(keyword()) :: {:ok, OneDHCPD.Server.State.t()}

Callback implementation for GenServer.init/1.

Specs

server_name(String.t()) :: atom()

Return the server's name for the specified interface

Link to this function

start_link(ifname, options)

View Source

Specs

start_link(
  String.t(),
  keyword()
) :: GenServer.on_start()

Start a DHCP Server that works for one client.

Options:

  • port: the port for the server (only specify if testing)
  • subnet: a /30 subnet to allocate addresses (default is {192, 168, 200, 0})