Loading...
Searching...
No Matches
lwip_init_devs.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Google LLC
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include "lwip/netif/compat.h"
24#include "net/netdev.h"
25#include "xfa.h"
26
27void lwip_netif_init_devs(void);
28
38struct netif *lwip_add_ethernet(lwip_netif_t *netif, netdev_t *state);
39
40#if IS_USED(MODULE_LWIP_SIXLOWPAN)
49struct netif *lwip_add_6lowpan(lwip_netif_t *netif, netdev_t *state);
50#endif /* MODULE_LWIP_SIXLOWPAN */
51
52typedef void (*lwip_netif_setup_func_t)(void);
53
57#define LWIP_INIT_ETH_NETIF(func) \
58 XFA_USE_CONST(lwip_netif_setup_func_t, lwip_netif_eth_xfa); \
59 XFA_ADD_PTR(lwip_netif_eth_xfa, func, func, &func)
60
64#define LWIP_INIT_6LOWPAN_NETIF(func) \
65 XFA_USE_CONST(lwip_netif_setup_func_t, lwip_netif_6lowpan_xfa); \
66 XFA_ADD_PTR(lwip_netif_6lowpan_xfa, func, func, &func)
67
68#ifdef __cplusplus
69}
70#endif
71
lwIP definition based on common netif_t struct for network stack-independent API.
Definitions low-level network driver interface.
struct netdev netdev_t
Forward declaration for netdev struct.
Definition netdev.h:285
struct netif * lwip_add_ethernet(lwip_netif_t *netif, netdev_t *state)
Adds an Ethernet netif using the supplied netdev.
Representation of a network interface.
Definition compat.h:32
Cross File Arrays.