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:
fbernon
2007-07-13 15:00:40 +00:00
parent 6a452951f5
commit 116bcb9dfb
5 changed files with 91 additions and 19 deletions

View File

@@ -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