ReactOS 0.4.16-dev-226-g79f2289
|
#include "lwip/opt.h"
#include "lwip/sys.h"
#include "lwip/memp.h"
#include "lwip/mem.h"
#include "lwip/pbuf.h"
#include "lwip/tcpip.h"
#include "lwip/init.h"
#include "netif/etharp.h"
#include "netif/ppp_oe.h"
Go to the source code of this file.
Functions | |
static void | tcpip_thread (void *arg) |
err_t | tcpip_input (struct pbuf *p, struct netif *inp) |
err_t | tcpip_callback_with_block (tcpip_callback_fn function, void *ctx, u8_t block) |
struct tcpip_callback_msg * | tcpip_callbackmsg_new (tcpip_callback_fn function, void *ctx) |
void | tcpip_callbackmsg_delete (struct tcpip_callback_msg *msg) |
err_t | tcpip_trycallback (struct tcpip_callback_msg *msg) |
void | tcpip_init (tcpip_init_done_fn initfunc, void *arg) |
static void | pbuf_free_int (void *p) |
err_t | pbuf_free_callback (struct pbuf *p) |
err_t | mem_free_callback (void *m) |
Variables | |
static tcpip_init_done_fn | tcpip_init_done |
static void * | tcpip_init_done_arg |
static sys_mbox_t | mbox |
Sequential API Main thread module
Definition in file tcpip.c.
A simple wrapper function that allows you to free heap memory from interrupt context.
m | the heap memory to free |
Definition at line 509 of file tcpip.c.
A simple wrapper function that allows you to free a pbuf from interrupt context.
p | The pbuf (chain) to be dereferenced. |
Definition at line 496 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 483 of file tcpip.c.
Referenced by pbuf_free_callback().
err_t tcpip_callback_with_block | ( | tcpip_callback_fn | function, |
void * | ctx, | ||
u8_t | 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.
f | the function to call |
ctx | parameter passed to f |
block | 1 to block until the request is posted, 0 to non-blocking mode |
Definition at line 214 of file tcpip.c.
Referenced by LibTCPBind(), LibTCPClose(), LibTCPConnect(), LibTCPFreeSocket(), LibTCPListen(), LibTCPSend(), LibTCPShutdown(), LibTCPSocket(), mem_free_callback(), and pbuf_free_callback().
Free a callback message allocated by tcpip_callbackmsg_new().
msg | the message to free |
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.
function | the function to call |
ctx | parameter passed to function |
Definition at line 411 of file tcpip.c.
void tcpip_init | ( | tcpip_init_done_fn | initfunc, |
void * | arg | ||
) |
Initialize this module:
initfunc | a function to call when tcpip_thread is running and finished initializing |
arg | argument to pass to initfunc |
Definition at line 458 of file tcpip.c.
Referenced by LibIPInitialize().
Pass a received packet to tcpip_thread for input processing
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 164 of file tcpip.c.
Referenced by netif_init(), and TCPRegisterInterface().
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 77 of file tcpip.c.
Referenced by tcpip_init().
Try to post a callback-message to the tcpip_thread mbox This is intended to be used to send "static" messages from interrupt context.
msg | pointer to the message to post |
Definition at line 441 of file tcpip.c.
|
static |
Definition at line 58 of file tcpip.c.
Referenced by sys_arch_mbox_fetch(), sys_arch_mbox_tryfetch(), sys_mbox_free(), sys_mbox_new(), sys_mbox_post(), sys_mbox_set_invalid(), sys_mbox_trypost(), sys_mbox_valid(), tcpip_callback_with_block(), tcpip_init(), tcpip_input(), tcpip_thread(), and tcpip_trycallback().
|
static |
Definition at line 56 of file tcpip.c.
Referenced by tcpip_init(), and tcpip_thread().
|
static |
Definition at line 57 of file tcpip.c.
Referenced by tcpip_init(), and tcpip_thread().