diff options
author | Denys Vlasenko | 2010-03-26 10:09:34 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-03-26 10:09:34 +0100 |
commit | 385b4562e39e373761fd62b0990dce02ff96661f (patch) | |
tree | 5446c10cd8fbde102f59705a9c0419227707c520 /networking/udhcp/leases.c | |
parent | 968951fd0ced7d0d4b81c0ee4466eada93ae4128 (diff) | |
download | busybox-385b4562e39e373761fd62b0990dce02ff96661f.zip busybox-385b4562e39e373761fd62b0990dce02ff96661f.tar.gz |
udhcp: cosmetic cleanups; one case of s/full_read/xread/
function old new delta
dumpleases_main 632 623 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/leases.c')
-rw-r--r-- | networking/udhcp/leases.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c index 81acb99..4999d80 100644 --- a/networking/udhcp/leases.c +++ b/networking/udhcp/leases.c @@ -1,15 +1,12 @@ /* vi: set sw=4 ts=4: */ /* - * leases.c -- tools to manage DHCP leases * Russ Dill <Russ.Dill@asu.edu> July 2001 * * Licensed under GPLv2, see file LICENSE in this tarball for details. */ - #include "common.h" #include "dhcpd.h" - /* Find the oldest expired lease, NULL if there are no expired leases */ static struct dyn_lease *oldest_expired_lease(void) { @@ -28,7 +25,6 @@ static struct dyn_lease *oldest_expired_lease(void) return oldest_lease; } - /* Clear out all leases with matching nonzero chaddr OR yiaddr. * If chaddr == NULL, this is a conflict lease. */ @@ -45,8 +41,7 @@ static void clear_leases(const uint8_t *chaddr, uint32_t yiaddr) } } - -/* Add a lease into the table, clearing out any old ones +/* Add a lease into the table, clearing out any old ones. * If chaddr == NULL, this is a conflict lease. */ struct dyn_lease* FAST_FUNC add_lease( @@ -84,14 +79,12 @@ struct dyn_lease* FAST_FUNC add_lease( return oldest; } - /* True if a lease has expired */ int FAST_FUNC is_expired_lease(struct dyn_lease *lease) { return (lease->expires < (leasetime_t) time(NULL)); } - /* Find the first lease that matches MAC, NULL if no match */ struct dyn_lease* FAST_FUNC find_lease_by_mac(const uint8_t *mac) { @@ -104,7 +97,6 @@ struct dyn_lease* FAST_FUNC find_lease_by_mac(const uint8_t *mac) return NULL; } - /* Find the first lease that matches IP, NULL is no match */ struct dyn_lease* FAST_FUNC find_lease_by_nip(uint32_t nip) { @@ -117,7 +109,6 @@ struct dyn_lease* FAST_FUNC find_lease_by_nip(uint32_t nip) return NULL; } - /* Check if the IP is taken; if it is, add it to the lease table */ static int nobody_responds_to_arp(uint32_t nip, const uint8_t *safe_mac) { @@ -138,7 +129,6 @@ static int nobody_responds_to_arp(uint32_t nip, const uint8_t *safe_mac) return 0; } - /* Find a new usable (we think) address */ uint32_t FAST_FUNC find_free_or_expired_nip(const uint8_t *safe_mac) { |