FreeRTOS+TCP: events on DHCP lease expired and IP address conflict detection

rbos36 wrote on Wednesday, October 31, 2018:

In our application, we use DHCP to get an IP address. IP connectivity (via wired Ethernet) is essential for our application, so we want to know if the network is ‘up’; i.e. PHY is connected and up, and we have a valid IP address.

We have seen some corner cases in which we got IP address conflicts.

When thinking about this, my conclusion is that we should be able to detect at least the following cases:

  1. DHCP lease renewal has failed, e.g. because the DCHP server is down;
  2. IP address conflict is detected; an ARP probe after DHCP grant could be used for this, refer to

As far as I can tell, the +TCP stack does not contain a mechanism for communicating these cases to the application, e.g. via vApplicationIPNetworkEventHook().

I am wondering, do others agree and if so, could these features be added to the +TCP stack?

rtel wrote on Friday, November 02, 2018:

As I recall the DCHP has callbacks that could be used to test if the IP address was already in use by, for example, trying to contact the same address.

rbos36 wrote on Tuesday, November 13, 2018:

Hi Richard, thanks. I could not find DHCP callbacks in the sources (+TCP v10.0.0) or the documentation. Do you maybe have pointers (docs, sources) to existing DHCP callbacks?