#include "lwip/opt.h"
#include "lwip/api_msg.h"
#include "lwip/netifapi.h"
#include "lwip/pbuf.h"
#include "lwip/api.h"
#include "lwip/sys.h"
#include "lwip/timers.h"
#include "lwip/netif.h"
Go to the source code of this file.
◆ LOCK_TCPIP_CORE
#define LOCK_TCPIP_CORE |
( |
| ) |
|
◆ LWIP_TCPIP_THREAD_ALIVE
#define LWIP_TCPIP_THREAD_ALIVE |
( |
| ) |
|
Define this to something that triggers a watchdog. This is called from tcpip_thread after processing a message.
Definition at line 54 of file tcpip.h.
◆ TCPIP_APIMSG
#define TCPIP_APIMSG |
( |
|
m | ) |
tcpip_apimsg(m) |
◆ TCPIP_APIMSG_ACK
◆ tcpip_callback
◆ TCPIP_NETIFAPI
#define TCPIP_NETIFAPI |
( |
|
m | ) |
tcpip_netifapi(m) |
◆ TCPIP_NETIFAPI_ACK
◆ UNLOCK_TCPIP_CORE
#define UNLOCK_TCPIP_CORE |
( |
| ) |
|
◆ tcpip_callback_fn
typedef void(* tcpip_callback_fn) (void *ctx) |
◆ tcpip_init_done_fn
typedef void(* tcpip_init_done_fn) (void *arg) |
Function prototype for the init_done function passed to tcpip_init
Definition at line 76 of file tcpip.h.
◆ tcpip_msg_type
Enumerator |
---|
TCPIP_MSG_INPKT | |
TCPIP_MSG_CALLBACK | |
TCPIP_MSG_CALLBACK_STATIC | |
Definition at line 117 of file tcpip.h.
◆ mem_free_callback()
err_t mem_free_callback |
( |
void * |
m | ) |
|
A simple wrapper function that allows you to free heap memory from interrupt context.
- Parameters
-
- Returns
- ERR_OK if callback could be enqueued, an err_t if not
Definition at line 506 of file tcpip.c.
◆ pbuf_free_callback()
A simple wrapper function that allows you to free a pbuf from interrupt context.
- Parameters
-
p | The pbuf (chain) to be dereferenced. |
- Returns
- ERR_OK if callback could be enqueued, an err_t if not
Definition at line 493 of file tcpip.c.
◆ tcpip_callback_with_block()
Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access.
- Parameters
-
f | the function to call |
ctx | parameter passed to f |
block | 1 to block until the request is posted, 0 to non-blocking mode |
- Returns
- ERR_OK if the function was called, another err_t if not
Definition at line 211 of file tcpip.c.
◆ tcpip_callbackmsg_delete()
void tcpip_callbackmsg_delete |
( |
struct tcpip_callback_msg * |
msg | ) |
|
◆ tcpip_callbackmsg_new()
struct tcpip_callback_msg * tcpip_callbackmsg_new |
( |
tcpip_callback_fn |
function, |
|
|
void * |
ctx |
|
) |
| |
Allocate a structure for a static callback message and initialize it. This is intended to be used to send "static" messages from interrupt context.
- Parameters
-
function | the function to call |
ctx | parameter passed to function |
- Returns
- a struct pointer to pass to tcpip_trycallback().
Definition at line 408 of file tcpip.c.
◆ tcpip_init()
Initialize this module:
- initialize all sub modules
- start the tcpip_thread
- Parameters
-
initfunc | a function to call when tcpip_thread is running and finished initializing |
arg | argument to pass to initfunc |
Definition at line 455 of file tcpip.c.
◆ tcpip_input()
Pass a received packet to tcpip_thread for input processing
- Parameters
-
p | the 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) |
inp | the network interface on which the packet was received |
Definition at line 161 of file tcpip.c.
◆ tcpip_trycallback()
err_t tcpip_trycallback |
( |
struct tcpip_callback_msg * |
msg | ) |
|
Try to post a callback-message to the tcpip_thread mbox This is intended to be used to send "static" messages from interrupt context.
- Parameters
-
msg | pointer to the message to post |
- Returns
- sys_mbox_trypost() return code
Definition at line 438 of file tcpip.c.