Deprecated fork of old network stack source from github. Please use official library instead: https://mbed.org/users/mbed_official/code/EthernetInterface/
Sequential API Main thread module. More...
Go to the source code of this file.
Functions | |
static void | tcpip_thread (void *arg) |
The main lwIP thread. | |
err_t | tcpip_input (struct pbuf *p, struct netif *inp) |
Pass a received packet to tcpip_thread for input processing. | |
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. | |
err_t | tcpip_timeout (u32_t msecs, sys_timeout_handler h, void *arg) |
call sys_timeout in tcpip_thread | |
err_t | tcpip_untimeout (sys_timeout_handler h, void *arg) |
call sys_untimeout in tcpip_thread | |
err_t | tcpip_apimsg (struct api_msg *apimsg) |
Call the lower part of a netconn_* function This function is then running in the thread context of tcpip_thread and has exclusive access to lwIP core code. | |
err_t | tcpip_apimsg_lock (struct api_msg *apimsg) |
Call the lower part of a netconn_* function This function has exclusive access to lwIP core code by locking it before the function is called. | |
err_t | tcpip_netifapi (struct netifapi_msg *netifapimsg) |
Much like tcpip_apimsg, but calls the lower part of a netifapi_* function. | |
err_t | tcpip_netifapi_lock (struct netifapi_msg *netifapimsg) |
Call the lower part of a netifapi_* function This function has exclusive access to lwIP core code by locking it before the function is called. | |
void | tcpip_init (tcpip_init_done_fn initfunc, void *arg) |
Initialize this module:
| |
static void | pbuf_free_int (void *p) |
Simple callback function used with tcpip_callback to free a pbuf (pbuf_free has a wrong signature for tcpip_callback) | |
err_t | pbuf_free_callback (struct pbuf *p) |
A simple wrapper function that allows you to free a pbuf from interrupt context. | |
err_t | mem_free_callback (void *m) |
A simple wrapper function that allows you to free heap memory from interrupt context. | |
Variables | |
sys_mutex_t | lock_tcpip_core |
The global semaphore to lock the stack. |
Detailed Description
Sequential API Main thread module.
Definition in file tcpip.c.
Function Documentation
err_t mem_free_callback | ( | void * | m ) |
err_t pbuf_free_callback | ( | struct pbuf * | p ) |
static void pbuf_free_int | ( | void * | p ) | [static] |
err_t tcpip_apimsg | ( | struct api_msg * | apimsg ) |
Call the lower part of a netconn_* function This function is then running in the thread context of tcpip_thread and has exclusive access to lwIP core code.
- Parameters:
-
apimsg a struct containing the function to call and its parameters
- Returns:
- ERR_OK if the function was called, another err_t if not
err_t tcpip_apimsg_lock | ( | struct api_msg * | apimsg ) |
Call the lower part of a netconn_* function This function has exclusive access to lwIP core code by locking it before the function is called.
- Parameters:
-
apimsg a struct containing the function to call and its parameters
- Returns:
- ERR_OK (only for compatibility fo tcpip_apimsg())
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.
- 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
void tcpip_init | ( | tcpip_init_done_fn | initfunc, |
void * | arg | ||
) |
err_t tcpip_input | ( | struct pbuf * | p, |
struct netif * | inp | ||
) |
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
err_t tcpip_netifapi | ( | struct netifapi_msg * | netifapimsg ) |
err_t tcpip_netifapi_lock | ( | struct netifapi_msg * | netifapimsg ) |
Call the lower part of a netifapi_* function This function has exclusive access to lwIP core code by locking it before the function is called.
- Parameters:
-
netifapimsg a struct containing the function to call and its parameters
- Returns:
- ERR_OK (only for compatibility fo tcpip_netifapi())
static void tcpip_thread | ( | void * | arg ) | [static] |
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.
- Parameters:
-
arg unused argument
err_t tcpip_timeout | ( | u32_t | msecs, |
sys_timeout_handler | h, | ||
void * | arg | ||
) |
err_t tcpip_untimeout | ( | sys_timeout_handler | h, |
void * | arg | ||
) |
Variable Documentation
sys_mutex_t lock_tcpip_core |
Generated on Tue Jul 12 2022 23:10:20 by 1.7.2