View Source OneDHCPD.Server (one_dhcpd v2.0.1)

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.

@spec init(keyword()) :: {:ok, OneDHCPD.Server.State.t()} | {:stop, atom()}

Callback implementation for GenServer.init/1.

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

Return the server's name for the specified interface

Link to this function

start_link(ifname, options)

View Source
@spec 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})