aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 13:24:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 13:24:03 +0200
commit6947d2c7e194e3be31eed1c75260e15fca1a2568 (patch)
treeff4d67b49e0e7e02e29ecc090db619a39b24498d /networking/udhcp/dhcpd.h
parent2b0e95780863da44f6a9244699ece8620a599e19 (diff)
downloadbusybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.tar.gz
busybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.tar.bz2
busybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.zip
udhcp: logging improvements, field and variable renames
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r--networking/udhcp/dhcpd.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 7776708cf..42a4b2782 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -46,15 +46,15 @@ struct server_config_t {
46 /* start,end are in host order: we need to compare start <= ip <= end */ 46 /* start,end are in host order: we need to compare start <= ip <= end */
47 uint32_t start_ip; /* start address of leases, in host order */ 47 uint32_t start_ip; /* start address of leases, in host order */
48 uint32_t end_ip; /* end of leases, in host order */ 48 uint32_t end_ip; /* end of leases, in host order */
49 uint32_t lease; /* lease time in seconds (host order) */ 49 uint32_t max_lease_sec; /* maximum lease time (host order) */
50 uint32_t max_leases; /* maximum number of leases (including reserved address) */ 50 uint32_t min_lease_sec; /* minimum lease time a client can request */
51 uint32_t max_leases; /* maximum number of leases (including reserved addresses) */
51 uint32_t auto_time; /* how long should udhcpd wait before writing a config file. 52 uint32_t auto_time; /* how long should udhcpd wait before writing a config file.
52 * if this is zero, it will only write one on SIGUSR1 */ 53 * if this is zero, it will only write one on SIGUSR1 */
53 uint32_t decline_time; /* how long an address is reserved if a client returns a 54 uint32_t decline_time; /* how long an address is reserved if a client returns a
54 * decline message */ 55 * decline message */
55 uint32_t conflict_time; /* how long an arp conflict offender is leased for */ 56 uint32_t conflict_time; /* how long an arp conflict offender is leased for */
56 uint32_t offer_time; /* how long an offered address is reserved */ 57 uint32_t offer_time; /* how long an offered address is reserved */
57 uint32_t min_lease; /* minimum lease time a client can request */
58 uint32_t siaddr_nip; /* "next server" bootp option */ 58 uint32_t siaddr_nip; /* "next server" bootp option */
59 char *lease_file; 59 char *lease_file;
60 char *pidfile; 60 char *pidfile;
@@ -89,24 +89,24 @@ struct dyn_lease {
89 /* We use lease_mac[6], since e.g. ARP probing uses 89 /* We use lease_mac[6], since e.g. ARP probing uses
90 * only 6 first bytes anyway. We check received dhcp packets 90 * only 6 first bytes anyway. We check received dhcp packets
91 * that their hlen == 6 and thus chaddr has only 6 significant bytes 91 * that their hlen == 6 and thus chaddr has only 6 significant bytes
92 * (dhcp packet has chaddr[16]) 92 * (dhcp packet has chaddr[16], not [6])
93 */ 93 */
94 uint8_t lease_mac[6]; 94 uint8_t lease_mac[6];
95 uint8_t hostname[20]; 95 uint8_t hostname[20];
96 uint8_t pad[2]; 96 uint8_t pad[2];
97 /* total size is a multiply of 4 */ 97 /* total size is a multiply of 4 */
98}; 98} PACKED;
99 99
100extern struct dyn_lease *leases; 100extern struct dyn_lease *g_leases;
101 101
102struct dyn_lease *add_lease( 102struct dyn_lease *add_lease(
103 const uint8_t *chaddr, uint32_t yiaddr, 103 const uint8_t *chaddr, uint32_t yiaddr,
104 leasetime_t leasetime, uint8_t *hostname 104 leasetime_t leasetime, uint8_t *hostname
105 ) FAST_FUNC; 105 ) FAST_FUNC;
106int lease_expired(struct dyn_lease *lease) FAST_FUNC; 106int is_expired_lease(struct dyn_lease *lease) FAST_FUNC;
107struct dyn_lease *find_lease_by_chaddr(const uint8_t *chaddr) FAST_FUNC; 107struct dyn_lease *find_lease_by_mac(const uint8_t *mac) FAST_FUNC;
108struct dyn_lease *find_lease_by_yiaddr(uint32_t yiaddr) FAST_FUNC; 108struct dyn_lease *find_lease_by_nip(uint32_t nip) FAST_FUNC;
109uint32_t find_free_or_expired_address(const uint8_t *chaddr) FAST_FUNC; 109uint32_t find_free_or_expired_nip(const uint8_t *safe_mac) FAST_FUNC;
110 110
111 111
112/*** static_leases.h ***/ 112/*** static_leases.h ***/