OneDHCPD.Server (one_dhcpd v3.0.0)

Copy Markdown View Source

This is the OneDHCPD Server.

Add it to a supervision tree in your application to use. E.g.,

{OneDHCPD.Server, ["usb0", [subnet: {172, 31, 246, 64}]}

Summary

Functions

Start a DHCP Server that works for one client

Types

t()

@type t() :: %OneDHCPD.Server{
  ifname: String.t(),
  our_ip_address: :inet.ip4_address(),
  socket: any(),
  subnet: :inet.ip4_address(),
  subnet_mask: :inet.ip4_address(),
  their_ip_address: :inet.ip4_address()
}

Functions

start_link(ifname, options)

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

Start a DHCP Server that works for one client

Options:

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