mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 02:26:55 +08:00
opt.h, netif.h, netif.c, ethernetif.c: Add new configuration option to add a link callback in the netif struct, and functions to handle it. Be carefull for port maintainers to add the NETIF_FLAG_LINK_UP flag (like in ethernetif.c) if you want to be sure to be compatible with future changes...
This commit is contained in:
@@ -91,7 +91,7 @@ low_level_init(struct netif *netif)
|
||||
|
||||
/* device capabilities */
|
||||
/* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
|
||||
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
|
||||
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
|
||||
|
||||
/* Do whatever else is needed to initialize interface. */
|
||||
}
|
||||
@@ -241,7 +241,7 @@ ethernetif_input(struct netif *netif)
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
#else /* ETHARP_TCPIP_ETHINPUT */
|
||||
#if ETHARP_TCPIP_INPUT
|
||||
|
||||
Reference in New Issue
Block a user