View Source VintageNet.OSEventDispatcher.UdhcpdHandler behaviour (vintage_net v0.12.0)
A behaviour for handling notifications from udhcpd
example
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
@callback lease_update(VintageNet.ifname(), Path.t()) :: :ok
The DHCP lease file was updated