aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-10-08 08:49:26 +0000
committerEric Andersen <andersen@codepoet.org>2004-10-08 08:49:26 +0000
commitabf58d6ba5df9bbe04c4c7008cbbc8c7dc626392 (patch)
treec64a5328d250449c9a4e3964d59a657543e06440 /networking/udhcp/dhcpd.h
parent751750e3ee0195eef802a1554e97712285bf8fd7 (diff)
downloadbusybox-w32-abf58d6ba5df9bbe04c4c7008cbbc8c7dc626392.tar.gz
busybox-w32-abf58d6ba5df9bbe04c4c7008cbbc8c7dc626392.tar.bz2
busybox-w32-abf58d6ba5df9bbe04c4c7008cbbc8c7dc626392.zip
Wade Berrier writes:
Hello, Here's a patch for a first attempt at static leases for udhcpd. Included in the tarball are 2 files (static_leases.c, static_leases.h) and a patch against the latest cvs. In the config file you can configure static leases with the following format: static_lease 00:60:08:11:CE:4E 192.168.0.54 static_lease 00:60:08:11:CE:3E 192.168.0.44 Comments/suggestions/improvements are welcome. Wade
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r--networking/udhcp/dhcpd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 39658a8ff..c47f6aa3f 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -99,6 +99,12 @@ struct option_set {
99 struct option_set *next; 99 struct option_set *next;
100}; 100};
101 101
102struct static_lease {
103 uint8_t *mac;
104 uint32_t *ip;
105 struct static_lease *next;
106};
107
102struct server_config_t { 108struct server_config_t {
103 uint32_t server; /* Our IP, in network order */ 109 uint32_t server; /* Our IP, in network order */
104 uint32_t start; /* Start address of leases, network order */ 110 uint32_t start; /* Start address of leases, network order */
@@ -124,6 +130,7 @@ struct server_config_t {
124 uint32_t siaddr; /* next server bootp option */ 130 uint32_t siaddr; /* next server bootp option */
125 char *sname; /* bootp server name */ 131 char *sname; /* bootp server name */
126 char *boot_file; /* bootp boot file option */ 132 char *boot_file; /* bootp boot file option */
133 struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */
127}; 134};
128 135
129extern struct server_config_t server_config; 136extern struct server_config_t server_config;