DHCPSD_LUA(8)

NAME
lua - lookup IP address and configure DHCP options using Lua

DESCRIPTION
lua will load /usr/pkg/etc/dhcpsd/dhcp.lua. It should define the function configure_pools.() It could also define the functions lookup_hostname(), lookup_ip_address() and add_dhcp_options().

You could define the function commit_lease() which is called each time a DHCP lease is committed in various states. You could use this function to maintain a DNS server for the IP address leased. It is recommended you pay attention to the flags as you don't want to insert an OFFERED ip address into DNS for example.

If you define commit_lease(), the you should also define the function expire_lease().

All these functions are optional, and if undefined OR return a nil or zero value then dhcpsd will proceed to the next plugin.

A table called dhcp is provided which exposes some functions to query the incoming DHCP message and manipulate the outgoing DHCP reply. For expire_lease() you cannot query any DHCP message as there is none, just the lease.

SEE ALSO
dhcpsd(8).

AUTHORS
Roy Marples <roy@marples.name>

BUGS
Please report them to https://roy.marples.name/projects/dhcpsd