mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-07-07 20:29:04 +00:00
Win32 port: add a dhcp_renew when the link become "up"...
This commit is contained in:
parent
4bad9aa105
commit
9b4be1bb96
@ -234,7 +234,16 @@ void status_callback(struct netif *netif)
|
|||||||
|
|
||||||
#if LWIP_NETIF_LINK_CALLBACK
|
#if LWIP_NETIF_LINK_CALLBACK
|
||||||
void link_callback(struct netif *netif)
|
void link_callback(struct netif *netif)
|
||||||
{ printf("link_callback==%s\n", netif_is_link_up(netif)?"UP":"DOWN");
|
{ if (netif_is_link_up(netif)) {
|
||||||
|
printf("link_callback==UP\n");
|
||||||
|
#if LWIP_DHCP
|
||||||
|
if (netif->dhcp != NULL) {
|
||||||
|
dhcp_renew(netif);
|
||||||
|
}
|
||||||
|
#endif /* LWIP_DHCP */
|
||||||
|
} else {
|
||||||
|
printf("link_callback==DOWN\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user