diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-01 21:05:57 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-01 21:05:57 +0400 |
commit | c82b5108e1a40f3b299043770e01d7d7db35de04 (patch) | |
tree | 35039a36868df644b8e5ffc766c1b0c921c88ab5 /networking/udhcp/dhcpd.h | |
parent | dc7a5eae36d31f5cfc301de2499329b8a03ea660 (diff) |
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.h | 18 |
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 { 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); |