VintageNet.OSEventDispatcher.UdhcpdHandler behaviour (vintage_net v0.11.3) View Source

A behaviour for handling notifications from udhcpd

Example

defmodule MyApp.UdhcpdHandler do
  @behaviour VintageNet.OSEventDispatcher.UdhcpdHandler

  @impl VintageNet.OSEventDispatcher.UdhcpdHandler
  def lease_update(ifname, report_data) do
    ...
  end
end

To have VintageNet invoke it, add the following to your config.exs:

config :vintage_net, udhcpd_handler: MyApp.UdhcpdHandler

Link to this section Summary

Callbacks

The DHCP lease file was updated

Link to this section Callbacks

Specs

lease_update(VintageNet.ifname(), Path.t()) :: :ok

The DHCP lease file was updated