mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 00:53:37 +08:00
added functions dhcp/autoip_supplied_address() to check for the source of address assignemnt (replacement for NETIF_FLAG_DHCP)
This commit is contained in:
@@ -520,4 +520,21 @@ autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr)
|
||||
}
|
||||
}
|
||||
|
||||
/** check if AutoIP supplied netif->ip_addr
|
||||
*
|
||||
* @param netif the netif to check
|
||||
* @return 1 if AutoIP supplied netif->ip_addr (state BOUND),
|
||||
* 0 otherwise
|
||||
*/
|
||||
u8_t
|
||||
autoip_supplied_address(struct netif *netif)
|
||||
{
|
||||
if ((netif != NULL) && (netif->autoip != NULL)) {
|
||||
if (netif->autoip->state == AUTOIP_STATE_BOUND) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* LWIP_IPV4 && LWIP_AUTOIP */
|
||||
|
||||
Reference in New Issue
Block a user