diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-05-08 03:20:50 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-05-08 03:20:50 +0000 |
commit | 7031f62d9b750568b5e98bdb8c59c3c1a72e073d (patch) | |
tree | b8d037a539281e7f7592e3045fa59e445495f603 /networking/udhcp/static_leases.h | |
parent | 15fe2e11d7886d04450cabc8b40f0d396b6b6d85 (diff) |
add back in udhcp support
Diffstat (limited to 'networking/udhcp/static_leases.h')
-rw-r--r-- | networking/udhcp/static_leases.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/networking/udhcp/static_leases.h b/networking/udhcp/static_leases.h new file mode 100644 index 000000000..d06520b23 --- /dev/null +++ b/networking/udhcp/static_leases.h @@ -0,0 +1,25 @@ +/* static_leases.h */ +#ifndef _STATIC_LEASES_H +#define _STATIC_LEASES_H + +#include "dhcpd.h" + +/* Config file will pass static lease info to this function which will add it + * to a data structure that can be searched later */ +int addStaticLease(struct static_lease **lease_struct, uint8_t *mac, uint32_t *ip); + +/* Check to see if a mac has an associated static lease */ +uint32_t getIpByMac(struct static_lease *lease_struct, void *arg); + +/* Check to see if an ip is reserved as a static ip */ +uint32_t reservedIp(struct static_lease *lease_struct, uint32_t ip); + +#ifdef UDHCP_DEBUG +/* Print out static leases just to check what's going on */ +void printStaticLeases(struct static_lease **lease_struct); +#endif + +#endif + + + |