Loading...
Searching...
No Matches
lwIP netdev adapter

netdev adapter for lwIP More...

Detailed Description

netdev adapter for lwIP

Files

file  netdev.h
 lwIP netdev adapter definitions
 

Macros

#define LWIP_NETDEV_BUFLEN   (ETHERNET_MAX_LEN)
 Length of the temporary copying buffer for receival.
 
#define LWIP_NETDEV_NAME   "lwip_netdev_mux"
 Name of the netdev adapter thread.
 
#define LWIP_NETDEV_PRIO   (THREAD_PRIORITY_MAIN - 4)
 Priority of the netdev adapter thread.
 
#define LWIP_NETDEV_STACKSIZE   (THREAD_STACKSIZE_DEFAULT)
 Stack size of the netdev adapter thread.
 

Functions

err_t lwip_netdev_init (struct netif *netif)
 Initializes the netdev adapter.
 

Macro Definition Documentation

◆ LWIP_NETDEV_BUFLEN

#define LWIP_NETDEV_BUFLEN   (ETHERNET_MAX_LEN)

Length of the temporary copying buffer for receival.

Note
It should be as long as the maximum packet length of all the netdev you use.

Definition at line 38 of file netdev.h.

◆ LWIP_NETDEV_NAME

#define LWIP_NETDEV_NAME   "lwip_netdev_mux"

Name of the netdev adapter thread.

Definition at line 44 of file netdev.h.

◆ LWIP_NETDEV_PRIO

#define LWIP_NETDEV_PRIO   (THREAD_PRIORITY_MAIN - 4)

Priority of the netdev adapter thread.

Definition at line 49 of file netdev.h.

◆ LWIP_NETDEV_STACKSIZE

#define LWIP_NETDEV_STACKSIZE   (THREAD_STACKSIZE_DEFAULT)

Stack size of the netdev adapter thread.

Definition at line 55 of file netdev.h.

Function Documentation

◆ lwip_netdev_init()

err_t lwip_netdev_init ( struct netif * netif)

Initializes the netdev adapter.

Should be passed to lwIP's netif_add() with the state parameter parameter of that function set to an existing netdev_t instance

Precondition
netif->state is set to an existing netdev_t instance. netif->state->context pointing to the lwip_netif_t containing this netif.
Parameters
[in]netifThe network interface intended to be initialized.
Returns
ERR_OK on success.
ERR_IF on error.