diff options
| author | Peter Lawrence <[email protected]> | 2021-10-15 20:10:19 -0500 |
|---|---|---|
| committer | Peter Lawrence <[email protected]> | 2021-10-19 11:29:51 -0500 |
| commit | d42b5604ce6ccdd9c5acba009e6a3d95c27ca573 (patch) | |
| tree | 688158c9ada4e17a7a1b1750a9e5444f1968acf1 /lib/networking/dhserver.c | |
| parent | 4bfab30c02279a0530e1a56f4a7c539f2d35a293 (diff) | |
net_lwip_webserver: allow users to enable LWIP_IP6 if desired
Diffstat (limited to 'lib/networking/dhserver.c')
| -rw-r--r-- | lib/networking/dhserver.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/networking/dhserver.c b/lib/networking/dhserver.c index 9287858ea..590739236 100644 --- a/lib/networking/dhserver.c +++ b/lib/networking/dhserver.c @@ -96,19 +96,19 @@ static const dhcp_config_t *config = NULL; char magic_cookie[] = {0x63,0x82,0x53,0x63}; -static ip_addr_t get_ip(const uint8_t *pnt) +static ip4_addr_t get_ip(const uint8_t *pnt) { - ip_addr_t result; + ip4_addr_t result; memcpy(&result, pnt, sizeof(result)); return result; } -static void set_ip(uint8_t *pnt, ip_addr_t value) +static void set_ip(uint8_t *pnt, ip4_addr_t value) { memcpy(pnt, &value.addr, sizeof(value.addr)); } -static dhcp_entry_t *entry_by_ip(ip_addr_t ip) +static dhcp_entry_t *entry_by_ip(ip4_addr_t ip) { int i; for (i = 0; i < config->num_entry; i++) @@ -162,11 +162,11 @@ uint8_t *find_dhcp_option(uint8_t *attrs, int size, uint8_t attr) int fill_options(void *dest, uint8_t msg_type, const char *domain, - ip_addr_t dns, + ip4_addr_t dns, int lease_time, - ip_addr_t serverid, - ip_addr_t router, - ip_addr_t subnet) + ip4_addr_t serverid, + ip4_addr_t router, + ip4_addr_t subnet) { uint8_t *ptr = (uint8_t *)dest; /* ACK message type */ |
