Loading...
Searching...
No Matches
lwip_init_devs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) Google LLC
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "lwip/netif/compat.h"
27#include "net/netdev.h"
28#include "xfa.h"
29
30void lwip_netif_init_devs(void);
31
41struct netif *lwip_add_ethernet(lwip_netif_t *netif, netdev_t *state);
42
43#if IS_USED(MODULE_LWIP_SIXLOWPAN)
52struct netif *lwip_add_6lowpan(lwip_netif_t *netif, netdev_t *state);
53#endif /* MODULE_LWIP_SIXLOWPAN */
54
55typedef void (*lwip_netif_setup_func_t)(void);
56
60#define LWIP_INIT_ETH_NETIF(func) \
61 XFA_USE_CONST(lwip_netif_setup_func_t, lwip_netif_eth_xfa); \
62 XFA_ADD_PTR(lwip_netif_eth_xfa, func, func, &func)
63
67#define LWIP_INIT_6LOWPAN_NETIF(func) \
68 XFA_USE_CONST(lwip_netif_setup_func_t, lwip_netif_6lowpan_xfa); \
69 XFA_ADD_PTR(lwip_netif_6lowpan_xfa, func, func, &func)
70
71#ifdef __cplusplus
72}
73#endif
74
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:288
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:35
Cross File Arrays.