|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-devel] Missing 'dhcp6_set_ntp_servers()' |
Date: | Mon, 27 Aug 2018 17:04:56 +0200 |
When experimenting with IPv6 and most features enabled
(including 'LWIP_DHCP6_GET_NTP_SRV=1'), I get a
link error:
dhcp6.obj : error LNK2019: unresolved external symbol
_dhcp6_set_ntp_servers referenced in function _dhcp6_recv
I'm not sure if the NTP-address in dhcp6_recv() is always an
IPv6-address, so just patched it like this:
--- a/src/apps/sntp/sntp.c 2018-04-26 13:57:15
+++ b/src/apps/sntp/sntp.c 2018-08-16 11:38:48
@@ -816,6 +816,15 @@
}
#endif /* LWIP_DHCP && SNTP_GET_SERVERS_FROM_DHCP */
+#if LWIP_DHCP6_GET_NTP_SRV
+void
+dhcp6_set_ntp_servers(u8_t num, const ip_addr_t *server)
+{
+ (void) server;
+ LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp: got NTP server #%u via DHCPv6\n", num));
+}
+#endif
+
-------
This works in my Windows test-app since I use lwIP as a static-lib.
This patch fails if my app uses a lwIP.dll.
But IMHO it's strange that a lwipcore6 file should call into an
APPFILE like this. Same issue with 'LWIP_DHCP_GET_NTP_SRV=1' in
'core/ipv4/dhcp.c'.
Perhaps there should be 2 func-pointers defined in lwIP for
sntp.c to hook into?
--
--gv
--
--gv
_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel
[Prev in Thread] | Current Thread | [Next in Thread] |