|
From: | Jonathan D |
Subject: | [lwip-users] DHCP state change callback |
Date: | Tue, 30 May 2023 12:15:27 +0000 |
Hi all,
I'm using LwIP 2.1.3 and I haven't find a way to have a function called when the DHCP state change (to report it on the app side).
I have tried with callback related to LWIP_NETIF_STATUS_CALLBACK or LWIP_NETIF_EXT_STATUS_CALLBACK without success.
Is there a better way than polling like this ?
```
dhcp = netif_dhcp_data(netif);
if (dhcp != NULL && dhcp->state == DHCP_STATE_BOUND)
{
if (!isDhcpReportedAsBound())
{
SetDhcpBounded(TRUE);
}
}
else if (isDhcpReportedAsBound())
{
SetDhcpBounded(FALSE);
}
```
Thank you
|
[Prev in Thread] | Current Thread | [Next in Thread] |