mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-24 15:14:06 +00:00
netif: Add getter for loopif for unit tests
This commit is contained in:
parent
26a84d9307
commit
0c34597b9e
@ -143,6 +143,14 @@ static err_t netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const i
|
||||
|
||||
static struct netif loop_netif;
|
||||
|
||||
#if LWIP_TESTMODE
|
||||
struct netif* netif_get_loopif(void)
|
||||
{
|
||||
return &loop_netif;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Initialize a lwip network interface structure for a loopback interface
|
||||
*
|
||||
|
@ -674,6 +674,11 @@ void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, c
|
||||
#define netif_invoke_ext_callback(netif, reason, args)
|
||||
#endif
|
||||
|
||||
#if LWIP_TESTMODE && LWIP_HAVE_LOOPIF
|
||||
struct netif* netif_get_loopif(void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user