aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r--networking/udhcp/dhcpd.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 02e392aaf..b4e180882 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -74,8 +74,6 @@ struct server_config_t {
74#define SERVER_PORT 67 74#define SERVER_PORT 67
75#endif 75#endif
76 76
77extern struct dhcpOfferedAddr *leases;
78
79 77
80/*** leases.h ***/ 78/*** leases.h ***/
81 79
@@ -92,9 +90,15 @@ struct dhcpOfferedAddr {
92 * and optionally adjusted (current time subtracted) 90 * and optionally adjusted (current time subtracted)
93 * if server_config.remaining = 1 */ 91 * if server_config.remaining = 1 */
94 leasetime_t expires; 92 leasetime_t expires;
93 uint8_t hostname[20]; /* (size is a multiply of 4) */
95}; 94};
96 95
97struct dhcpOfferedAddr *add_lease(const uint8_t *chaddr, uint32_t yiaddr, leasetime_t leasetime) FAST_FUNC; 96extern struct dhcpOfferedAddr *leases;
97
98struct dhcpOfferedAddr *add_lease(
99 const uint8_t *chaddr, uint32_t yiaddr,
100 leasetime_t leasetime, uint8_t *hostname
101 ) FAST_FUNC;
98int lease_expired(struct dhcpOfferedAddr *lease) FAST_FUNC; 102int lease_expired(struct dhcpOfferedAddr *lease) FAST_FUNC;
99struct dhcpOfferedAddr *find_lease_by_chaddr(const uint8_t *chaddr) FAST_FUNC; 103struct dhcpOfferedAddr *find_lease_by_chaddr(const uint8_t *chaddr) FAST_FUNC;
100struct dhcpOfferedAddr *find_lease_by_yiaddr(uint32_t yiaddr) FAST_FUNC; 104struct dhcpOfferedAddr *find_lease_by_yiaddr(uint32_t yiaddr) FAST_FUNC;