ReactOS 0.4.16-dev-823-g9a093ec
|
#include "lwip/opt.h"
#include "lwip/priv/tcpip_priv.h"
#include "lwip/sys.h"
#include "lwip/memp.h"
#include "lwip/mem.h"
#include "lwip/init.h"
#include "lwip/ip.h"
#include "lwip/pbuf.h"
#include "lwip/etharp.h"
#include "netif/ethernet.h"
Go to the source code of this file.
Macros | |
#define | TCPIP_MSG_VAR_REF(name) API_VAR_REF(name) |
#define | TCPIP_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct tcpip_msg, name) |
#define | TCPIP_MSG_VAR_ALLOC(name) API_VAR_ALLOC(struct tcpip_msg, MEMP_TCPIP_MSG_API, name, ERR_MEM) |
#define | TCPIP_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_TCPIP_MSG_API, name) |
#define | TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg) |
Variables | |
static tcpip_init_done_fn | tcpip_init_done |
static void * | tcpip_init_done_arg |
static sys_mbox_t | tcpip_mbox |
Sequential API Main thread module
Definition in file tcpip.c.
#define TCPIP_MBOX_FETCH | ( | mbox, | |
msg | |||
) | sys_mbox_fetch(mbox, msg) |
#define TCPIP_MSG_VAR_FREE | ( | name | ) | API_VAR_FREE(MEMP_TCPIP_MSG_API, name) |
A simple wrapper function that allows you to free heap memory from interrupt context.
m | the heap memory to free |
A simple wrapper function that allows you to free a pbuf from interrupt context.
p | The pbuf (chain) to be dereferenced. |
Definition at line 688 of file tcpip.c.
Referenced by LibTCPGetDataFromConnectionQueue().
Simple callback function used with tcpip_callback to free a pbuf (pbuf_free has a wrong signature for tcpip_callback)
p | The pbuf (chain) to be dereferenced. |
Definition at line 675 of file tcpip.c.
Referenced by pbuf_free_callback().
err_t tcpip_api_call | ( | tcpip_api_call_fn | fn, |
struct tcpip_api_call_data * | call | ||
) |
Synchronously calls function in TCPIP thread and waits for its completion. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.
fn | Function to call |
call | Call parameters |
Definition at line 478 of file tcpip.c.
err_t tcpip_callback_wait | ( | tcpip_callback_fn | function, |
void * | ctx | ||
) |
Sends a message to TCPIP thread to call a function. Caller thread blocks until the function returns. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.
function | the function to call |
ctx | parameter passed to f |
Definition at line 610 of file tcpip.c.
Pass a received packet to tcpip_thread for input processing
p | the received packet |
inp | the network interface on which the packet was received |
input_fn | input function to call |
Definition at line 245 of file tcpip.c.
Referenced by tcpip_input().
err_t tcpip_send_msg_wait_sem | ( | tcpip_callback_fn | fn, |
void * | apimsg, | ||
sys_sem_t * | sem | ||
) |
Sends a message to TCPIP thread to call a function. Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.
fn | function to be called from TCPIP thread |
apimsg | argument to API function |
sem | semaphore to wait on |
Definition at line 442 of file tcpip.c.
The main lwIP thread. This thread has exclusive access to lwIP core functions (unless access to them is not locked). Other threads communicate with this thread using message boxes.
It also starts all the timers to make sure they are running in the right thread context.
arg | unused argument |
Definition at line 127 of file tcpip.c.
Referenced by tcpip_init().
Definition at line 156 of file tcpip.c.
Referenced by tcpip_thread().
|
static |
Definition at line 59 of file tcpip.c.
Referenced by tcpip_init(), and tcpip_thread().
|
static |
Definition at line 60 of file tcpip.c.
Referenced by tcpip_init(), and tcpip_thread().
|
static |
Definition at line 61 of file tcpip.c.
Referenced by tcpip_api_call(), tcpip_callback(), tcpip_callback_wait(), tcpip_callbackmsg_trycallback(), tcpip_callbackmsg_trycallback_fromisr(), tcpip_init(), tcpip_inpkt(), tcpip_send_msg_wait_sem(), tcpip_thread(), and tcpip_try_callback().