summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-07-01 17:05:57 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-07-01 17:05:57 +0000
commitc82b5108e1a40f3b299043770e01d7d7db35de04 (patch)
tree35039a36868df644b8e5ffc766c1b0c921c88ab5 /networking/udhcp/dhcpd.h
parentdc7a5eae36d31f5cfc301de2499329b8a03ea660 (diff)
downloadbusybox-w32-c82b5108e1a40f3b299043770e01d7d7db35de04.tar.gz
busybox-w32-c82b5108e1a40f3b299043770e01d7d7db35de04.tar.bz2
busybox-w32-c82b5108e1a40f3b299043770e01d7d7db35de04.zip
udhcp: new config option "Rewrite the lease file at every new acknowledge"
(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB)) udhcp: consistently treat server_config.start/end IPs as host-order fix IP parsing for 64bit machines fix unsafe hton macro usage in read_opt() do not chdir("/") when daemonizing fix help text
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r--networking/udhcp/dhcpd.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 7c4fe695a..05e3cf004 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -27,23 +27,24 @@ struct static_lease {
27 27
28struct server_config_t { 28struct server_config_t {
29 uint32_t server; /* Our IP, in network order */ 29 uint32_t server; /* Our IP, in network order */
30 uint32_t start; /* Start address of leases, network order */ 30 /* start,end are in host order: we need to compare start <= ip <= end */
31 uint32_t end; /* End of leases, network order */ 31 uint32_t start_ip; /* Start address of leases, in host order */
32 uint32_t end_ip; /* End of leases, in host order */
32 struct option_set *options; /* List of DHCP options loaded from the config file */ 33 struct option_set *options; /* List of DHCP options loaded from the config file */
33 char *interface; /* The name of the interface to use */ 34 char *interface; /* The name of the interface to use */
34 int ifindex; /* Index number of the interface to use */ 35 int ifindex; /* Index number of the interface to use */
35 uint8_t arp[6]; /* Our arp address */ 36 uint8_t arp[6]; /* Our arp address */
36 unsigned long lease; /* lease time in seconds (host order) */
37 unsigned long max_leases; /* maximum number of leases (including reserved address) */
38 char remaining; /* should the lease file be interpreted as lease time remaining, or 37 char remaining; /* should the lease file be interpreted as lease time remaining, or
39 * as the time the lease expires */ 38 * as the time the lease expires */
39 unsigned long lease; /* lease time in seconds (host order) */
40 unsigned long max_leases; /* maximum number of leases (including reserved address) */
40 unsigned long auto_time; /* how long should udhcpd wait before writing a config file. 41 unsigned long auto_time; /* how long should udhcpd wait before writing a config file.
41 * if this is zero, it will only write one on SIGUSR1 */ 42 * if this is zero, it will only write one on SIGUSR1 */
42 unsigned long decline_time; /* how long an address is reserved if a client returns a 43 unsigned long decline_time; /* how long an address is reserved if a client returns a
43 * decline message */ 44 * decline message */
44 unsigned long conflict_time; /* how long an arp conflict offender is leased for */ 45 unsigned long conflict_time; /* how long an arp conflict offender is leased for */
45 unsigned long offer_time; /* how long an offered address is reserved */ 46 unsigned long offer_time; /* how long an offered address is reserved */
46 unsigned long min_lease; /* minimum lease a client can request*/ 47 unsigned long min_lease; /* minimum lease a client can request */
47 char *lease_file; 48 char *lease_file;
48 char *pidfile; 49 char *pidfile;
49 char *notify_file; /* What to run whenever leases are written */ 50 char *notify_file; /* What to run whenever leases are written */
@@ -95,13 +96,6 @@ int send_inform(struct dhcpMessage *oldpacket);
95 96
96/*** files.h ***/ 97/*** files.h ***/
97 98
98struct config_keyword {
99 const char *keyword;
100 int (* const handler)(const char *line, void *var);
101 void *var;
102 const char *def;
103};
104
105int read_config(const char *file); 99int read_config(const char *file);
106void write_leases(void); 100void write_leases(void);
107void read_leases(const char *file); 101void read_leases(const char *file);