The lease function receives the information detailed in --dhcp-script. It gets two arguments, firstly the action, which is a string containing, "add", "old" or "del", and secondly a table of tag value pairs. The tags mostly correspond to the environment variables detailed above, for instance the tag "domain" holds the same data as the environment variable DNSMASQ_DOMAIN. There are a few extra tags which hold the data supplied as arguments to --dhcp-script. These are mac_address, ip_address and hostname for IPv4, and client_duid, ip_address and hostname for IPv6.
The tftp function is called in the same way as the lease function, and the table holds the tags destination_address, file_name and file_size.
The arp and arp-old functions are called only when enabled with --script-arp and have a table which holds the tags mac_address and client_address.