"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 2 | /* static_leases.h */ |
| 3 | #ifndef _STATIC_LEASES_H |
| 4 | #define _STATIC_LEASES_H |
| 5 | |
| 6 | #include "dhcpd.h" |
| 7 | |
| 8 | /* Config file will pass static lease info to this function which will add it |
| 9 | * to a data structure that can be searched later */ |
| 10 | int addStaticLease(struct static_lease **lease_struct, uint8_t *mac, uint32_t *ip); |
| 11 | |
| 12 | /* Check to see if a mac has an associated static lease */ |
| 13 | uint32_t getIpByMac(struct static_lease *lease_struct, void *arg); |
| 14 | |
| 15 | /* Check to see if an ip is reserved as a static ip */ |
| 16 | uint32_t reservedIp(struct static_lease *lease_struct, uint32_t ip); |
| 17 | |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 18 | /* Print out static leases just to check what's going on (debug code) */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 19 | void printStaticLeases(struct static_lease **lease_struct); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 20 | |
| 21 | #endif |
| 22 | |
| 23 | |
| 24 | |