DHCP threaded operations

The last piece of the DHCP server is actually a set of operations that are used to keep things running.

Because the DHCP server is threaded, these operations are actually set up as threads that occasionally do things to make sure everything is together.
main thread
This thread handles signals. For example,
  • A SIGHUP (-1) causes a refresh of all databases in the configuration file.
  • A SIGTERM (-15) will cause the server to gracefully stop.
  • A SIGUSR1 (-30) will cause the server to dump the configuration database
src thread
This thread handles the SRC requests (such as startsrc, stopsrc, lssrc, traceson, and refresh).
dadmin thread
This thread interfaces with the dadmin client program and the DHCP server. The dadmin tool can be used to get status as well as modify the database to avoid editing the database files manually. With the addition of the dadmin and src threads, the server can handle service requests and still handle client requests.
garbage thread
This thread runs timers that periodically clean the database, save the database, purge clients that do not have addresses, and remove reserved addresses that have been in reserve state for too long. All these timers are configurable.
packet processors
Each of these can handle a request from a DHCPv6 client. The number of packet processors required is somewhat load and machine-dependent. The number of these is configurable; the default is 1. The maximum number of packet threads is 50.
logging threads
In a system where significant amounts of data is being logged to log files, the number of logging threads can be increased more than the default (1) to max (50).
table manager thread
This thread ensures that the dhcpsdv6 daemon does not process duplicate packets.
process threads
These threads process the DHCPv6 client packets.
reconfigure thread
This thread manages client reconfiguration when the server is refreshed (with the dadmin -x 6 -i command, for example).