dhcp: merge most of static_leases.c into dhcpd.c
function old new delta read_staticlease 121 222 +101 add_static_lease 48 - -48 log_static_leases 68 - -68 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/0 up/down: 101/-116) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -102,20 +102,7 @@ struct dyn_lease *find_lease_by_mac(const uint8_t *mac) FAST_FUNC;
|
||||
struct dyn_lease *find_lease_by_nip(uint32_t nip) FAST_FUNC;
|
||||
uint32_t find_free_or_expired_nip(const uint8_t *safe_mac, unsigned arpping_ms) FAST_FUNC;
|
||||
|
||||
|
||||
/* Config file parser will pass static lease info to this function
|
||||
* which will add it to a data structure that can be searched later */
|
||||
void add_static_lease(struct static_lease **st_lease_pp, uint8_t *mac, uint32_t nip) FAST_FUNC;
|
||||
/* Find static lease IP by mac */
|
||||
uint32_t get_static_nip_by_mac(struct static_lease *st_lease, void *arg) FAST_FUNC;
|
||||
/* Check to see if an IP is reserved as a static IP */
|
||||
int is_nip_reserved(struct static_lease *st_lease, uint32_t nip) FAST_FUNC;
|
||||
/* Print out static leases just to check what's going on (debug code) */
|
||||
#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
|
||||
void log_static_leases(struct static_lease **st_lease_pp) FAST_FUNC;
|
||||
#else
|
||||
# define log_static_leases(st_lease_pp) ((void)0)
|
||||
#endif
|
||||
|
||||
POP_SAVED_FUNCTION_VISIBILITY
|
||||
|
||||
|
Reference in New Issue
Block a user