netif: Add getter for loopif for unit tests

This commit is contained in:
Dirk Ziegelmeier
2018-11-01 21:35:06 +01:00
parent 26a84d9307
commit 0c34597b9e
2 changed files with 13 additions and 0 deletions

View File

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