lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Setting NTP server address according to some conditions


From: simeon.trifonov
Subject: [lwip-users] Setting NTP server address according to some conditions
Date: Fri, 19 Apr 2019 10:33:50 +0300

Hi!

 

I’m using LWIP 2.0.3. In my code I have a static  NTP server address. But this address can be invalid or valid (depending what the user will write in it). If DHCP is enabled I want to reach the following behavior:

  • If the NTP server address is delivered via the DHCP, it will be set and used (it doesn’t matter what is the static address).
  • If the NTP server address is not delivered via the DHCP and the static NTP server address is invalid, the NTP will not be initialized.
  • If the NTP server address is not delivered, but the static NTP server address is valid, the NTP will be initialized and will use the static address.

To reach this, I need to decide what to do in the call of the function dhcp_set_ntp_address(). But there is no callback, so I cannot call my own code. How can I reach this behavior without modifying the original code of the stack (file sntp.c)?

 

Best regards!

SciMan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]