lwIP  2.0.2
Lightweight IP stack
OS mode (TCPIP thread)


#define tcpip_callback(f, ctx)   tcpip_callback_with_block(f, ctx, 1)


err_t tcpip_input (struct pbuf *p, struct netif *inp)
void tcpip_init (tcpip_init_done_fn initfunc, void *arg)

Detailed Description

Use this mode if you run an OS on your system. It is recommended to use an RTOS that correctly handles priority inversion and to use LWIP_TCPIP_CORE_LOCKING.
Porting: implement all functions in Porting (system abstraction layer).
You can use Callback-style APIs together with tcpip_callback, and all Sequential-style APIs.

Macro Definition Documentation

◆ tcpip_callback

#define tcpip_callback (   f,
)    tcpip_callback_with_block(f, ctx, 1)

Function Documentation

◆ tcpip_init()

void tcpip_init ( tcpip_init_done_fn  initfunc,
void *  arg 

Initialize this module:

  • initialize all sub modules
  • start the tcpip_thread
initfunca function to call when tcpip_thread is running and finished initializing
argargument to pass to initfunc

◆ tcpip_input()

err_t tcpip_input ( struct pbuf p,
struct netif inp 

Pass a received packet to tcpip_thread for input processing with ethernet_input or ip_input. Don't call directly, pass to netif_add() and call netif->input().

pthe received packet, p->payload pointing to the Ethernet header or to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or NETIF_FLAG_ETHERNET flags)
inpthe network interface on which the packet was received