#ifdef'ed out netif callback functions
This commit is contained in:
@@ -324,6 +324,7 @@ bool lwip_is_netif_up(void *n)
|
|||||||
/**
|
/**
|
||||||
* Called when a netif is removed (ZTS_EVENT_NETIF_INTERFACE_REMOVED)
|
* Called when a netif is removed (ZTS_EVENT_NETIF_INTERFACE_REMOVED)
|
||||||
*/
|
*/
|
||||||
|
#if LWIP_NETIF_REMOVE_CALLBACK
|
||||||
static void netif_remove_callback(struct netif *n)
|
static void netif_remove_callback(struct netif *n)
|
||||||
{
|
{
|
||||||
// Called from core, no need to lock
|
// Called from core, no need to lock
|
||||||
@@ -339,10 +340,12 @@ static void netif_remove_callback(struct netif *n)
|
|||||||
ifd->mac = lwip_htonl(ifd->mac) >> 16;
|
ifd->mac = lwip_htonl(ifd->mac) >> 16;
|
||||||
postEvent(ZTS_EVENT_NETIF_REMOVED, (void*)ifd);
|
postEvent(ZTS_EVENT_NETIF_REMOVED, (void*)ifd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a link is brought up or down (ZTS_EVENT_NETIF_LINK_UP, ZTS_EVENT_NETIF_LINK_DOWN)
|
* Called when a link is brought up or down (ZTS_EVENT_NETIF_LINK_UP, ZTS_EVENT_NETIF_LINK_DOWN)
|
||||||
*/
|
*/
|
||||||
|
#if LWIP_NETIF_LINK_CALLBACK
|
||||||
static void netif_link_callback(struct netif *n)
|
static void netif_link_callback(struct netif *n)
|
||||||
{
|
{
|
||||||
// Called from core, no need to lock
|
// Called from core, no need to lock
|
||||||
@@ -367,6 +370,7 @@ static void netif_link_callback(struct netif *n)
|
|||||||
postEvent(ZTS_EVENT_NETIF_LINK_DOWN, (void*)ifd);
|
postEvent(ZTS_EVENT_NETIF_LINK_DOWN, (void*)ifd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void lwip_set_callbacks(struct netif *n)
|
void lwip_set_callbacks(struct netif *n)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,17 +128,23 @@ void lwip_start_dhcp(void *netif);
|
|||||||
* - Interface is up/down (ZTS_EVENT_NETIF_UP, ZTS_EVENT_NETIF_DOWN)
|
* - Interface is up/down (ZTS_EVENT_NETIF_UP, ZTS_EVENT_NETIF_DOWN)
|
||||||
* - Address changes while up (ZTS_EVENT_NETIF_NEW_ADDRESS)
|
* - Address changes while up (ZTS_EVENT_NETIF_NEW_ADDRESS)
|
||||||
*/
|
*/
|
||||||
|
#if LWIP_NETIF_STATUS_CALLBACK
|
||||||
static void netif_status_callback(struct netif *netif);
|
static void netif_status_callback(struct netif *netif);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Called when a netif is removed (ZTS_EVENT_NETIF_INTERFACE_REMOVED)
|
* @brief Called when a netif is removed (ZTS_EVENT_NETIF_INTERFACE_REMOVED)
|
||||||
*/
|
*/
|
||||||
|
#if LWIP_NETIF_REMOVE_CALLBACK
|
||||||
static void netif_remove_callback(struct netif *netif);
|
static void netif_remove_callback(struct netif *netif);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Called when a link is brought up or down (ZTS_EVENT_NETIF_LINK_UP, ZTS_EVENT_NETIF_LINK_DOWN)
|
* @brief Called when a link is brought up or down (ZTS_EVENT_NETIF_LINK_UP, ZTS_EVENT_NETIF_LINK_DOWN)
|
||||||
*/
|
*/
|
||||||
|
#if LWIP_NETIF_LINK_CALLBACK
|
||||||
static void netif_link_callback(struct netif *netif);
|
static void netif_link_callback(struct netif *netif);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set up an interface in the network stack for the VirtualTap.
|
* @brief Set up an interface in the network stack for the VirtualTap.
|
||||||
|
|||||||
Reference in New Issue
Block a user