blob: bc6137de3798c7e9e08a7b2863df0ea8019b2623 [file] [log] [blame]
Russ Dillf5ecd432002-10-31 19:21:27 +00001udhcp server (udhcpd)
2--------------------
3
4The only command line argument to udhcpd is an optional specifed
5config file. If no config file is specified, udhcpd uses the default
6config file, /etc/udhcpd.conf. Ex:
7
8udhcpd /etc/udhcpd.eth1.conf
9
10The udhcp server employs a number of simple config files:
11
12udhcpd.leases
13------------
14
15The udhcpd.leases behavior is designed for an embedded system. The
16file is written either every auto_time seconds, or when a SIGUSR1
17is received (the auto_time timer restarts if a SIGUSR1 is received).
18If you send a SIGTERM to udhcpd directly after a SIGUSR1, udhcpd will
19finish writing the leases file and wait for the aftermentioned script
20to be executed and finish before quiting, so you do not need to sleep
21between sending signals. When the file is written, a script can be
22optionally called to commit the file to flash. Lease times are stored
23in the file by time remaining in lease (for systems without clock
24that works when there is no power), or by the absolute time that it
25expires in seconds from epoch. In the remaining format, expired leases
26are stored as zero. The file is of the format:
27
2816 byte MAC
294 byte ip address
30u32 expire time
3116 byte MAC
324 byte ip address
33u32 expire time
34.
35etc.
36
37example: hexdump udhcpd.leases
38
390000000 1000 c95a 27d9 0000 0000 0000 0000 0000
400000010 a8c0 150a 0d00 2d29 5000 23fc 8566 0000
410000020 0000 0000 0000 0000 a8c0 140a 0d00 4e29
420000030
43
44
45udhcpd.conf
46----------
47
48The format is fairly simple, there is a sample file with all the
49available options and comments describing them in samples/udhcpd.conf
50
51compile time options
52-------------------
53
54dhcpd.h contains the other two compile time options:
55
56 LEASE_TIME: The default lease time if not specified in the config
57 file.
58
59 DHCPD_CONFIG_FILE: The defualt config file to use.