summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
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 7c4fe69..05e3cf0 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -27,23 +27,24 @@ struct static_lease {
struct server_config_t {
uint32_t server; /* Our IP, in network order */
- uint32_t start; /* Start address of leases, network order */
- uint32_t end; /* End of leases, network order */
+ /* start,end are in host order: we need to compare start <= ip <= end */
+ uint32_t start_ip; /* Start address of leases, in host order */
+ uint32_t end_ip; /* End of leases, in host order */
struct option_set *options; /* List of DHCP options loaded from the config file */
char *interface; /* The name of the interface to use */
int ifindex; /* Index number of the interface to use */
uint8_t arp[6]; /* Our arp address */
- unsigned long lease; /* lease time in seconds (host order) */
- unsigned long max_leases; /* maximum number of leases (including reserved address) */
char remaining; /* should the lease file be interpreted as lease time remaining, or
* as the time the lease expires */
+ unsigned long lease; /* lease time in seconds (host order) */
+ unsigned long max_leases; /* maximum number of leases (including reserved address) */
unsigned long auto_time; /* how long should udhcpd wait before writing a config file.
* if this is zero, it will only write one on SIGUSR1 */
unsigned long decline_time; /* how long an address is reserved if a client returns a
* decline message */
unsigned long conflict_time; /* how long an arp conflict offender is leased for */
unsigned long offer_time; /* how long an offered address is reserved */
- unsigned long min_lease; /* minimum lease a client can request*/
+ unsigned long min_lease; /* minimum lease a client can request */
char *lease_file;
char *pidfile;
char *notify_file; /* What to run whenever leases are written */
@@ -95,13 +96,6 @@ int send_inform(struct dhcpMessage *oldpacket);
/*** files.h ***/
-struct config_keyword {
- const char *keyword;
- int (* const handler)(const char *line, void *var);
- void *var;
- const char *def;
-};
-
int read_config(const char *file);
void write_leases(void);
void read_leases(const char *file);