Erik Ekman 2816ade5f8 pkg/lwip: Start rework of netif initialisation
Use separate files with auto_init
Proof of concept with only moving netdev_tap
2021-08-20 14:56:46 +02:00

39 lines
848 B
C

/*
* Copyright (C) Google LLC
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_auto_init_lwip_netif
* @{
*
* @file
* @brief Initializes the supported network interfaces for lwIP
* @author Erik Ekman <eekman@google.com>
*/
#include "kernel_defines.h"
#include "lwip_init_devs.h"
#include "lwip/netif/netdev.h"
/**
* @brief Initializes network interfaces
*/
void lwip_netif_init_devs(void)
{
if (IS_USED(MODULE_NETDEV_TAP)) {
extern void auto_init_netdev_tap(void);
auto_init_netdev_tap();
}
}
struct netif *lwip_add_ethernet(struct netif *netif, netdev_t *state)
{
return netif_add_noaddr(netif, state, lwip_netdev_init, tcpip_input);
}
/**@}*/