File: README.udhcpd

package info (click to toggle)
udhcp 0.9.8cvs20050124-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 464 kB
  • ctags: 356
  • sloc: ansic: 2,774; makefile: 243; sh: 195
file content (59 lines) | stat: -rw-r--r-- 1,802 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
udhcp server (udhcpd)
--------------------

The only command line argument to udhcpd is an optional specifed
config file. If no config file is specified, udhcpd uses the default
config file, /etc/udhcpd.conf. Ex:

udhcpd /etc/udhcpd.eth1.conf

The udhcp server employs a number of simple config files:

udhcpd.leases
------------

The udhcpd.leases behavior is designed for an embedded system. The
file is written either every auto_time seconds, or when a SIGUSR1
is received (the auto_time timer restarts if a SIGUSR1 is received).
If you send a SIGTERM to udhcpd directly after a SIGUSR1, udhcpd will
finish writing the leases file and wait for the aftermentioned script
to be executed and finish before quiting, so you do not need to sleep
between sending signals. When the file is written, a script can be
optionally called to commit the file to flash. Lease times are stored
in the file by time remaining in lease (for systems without clock
that works when there is no power), or by the absolute time that it
expires in seconds from epoch. In the remaining format, expired leases
are stored as zero. The file is of the format:

16 byte MAC
4 byte ip address
u32 expire time
16 byte MAC
4 byte ip address
u32 expire time
.
etc.

example: hexdump udhcpd.leases

0000000 1000 c95a 27d9 0000 0000 0000 0000 0000
0000010 a8c0 150a 0d00 2d29 5000 23fc 8566 0000
0000020 0000 0000 0000 0000 a8c0 140a 0d00 4e29
0000030


udhcpd.conf
----------

The format is fairly simple, there is a sample file with all the
available options and comments describing them in samples/udhcpd.conf

compile time options
-------------------

dhcpd.h contains the other two compile time options:

	LEASE_TIME: The default lease time if not specified in the config
	file.

	DHCPD_CONFIG_FILE: The defualt config file to use.