VintageNet.ToElixir.UdhcpdHandler behaviour (vintage_net v0.9.3) View Source
A behaviour for handling notifications from udhcpd
Example
defmodule MyApp.UdhcpdHandler do
@behaviour VintageNet.ToElixir.UdhcpdHandler
@impl VintageNet.ToElixir.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
Functions
Called internally by vintage_net to dispatch calls
Callbacks
The DHCP lease file was updated
Link to this section Types
Specs
update_data() :: map()
Link to this section Functions
Specs
dispatch(atom(), VintageNet.ifname(), Path.t()) :: :ok
Called internally by vintage_net to dispatch calls
Link to this section Callbacks
Specs
lease_update(VintageNet.ifname(), Path.t()) :: :ok
The DHCP lease file was updated