#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"Classes | |
| struct | tcpip_msg |
Defines | |
| #define | LWIP_TCPIP_THREAD_ALIVE() |
| Define this to something that triggers a watchdog. | |
| #define | LOCK_TCPIP_CORE() |
| #define | UNLOCK_TCPIP_CORE() |
| #define | TCPIP_APIMSG(m) tcpip_apimsg(m) |
| #define | TCPIP_APIMSG_ACK(m) sys_sem_signal(&m->conn->op_completed) |
| #define | TCPIP_NETIFAPI(m) tcpip_netifapi(m) |
| #define | TCPIP_NETIFAPI_ACK(m) sys_sem_signal(&m->sem) |
| #define | tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) |
Typedefs | |
| typedef void(* | tcpip_init_done_fn )(void *arg) |
| Function prototype for the init_done function passed to tcpip_init. | |
| typedef void(* | tcpip_callback_fn )(void *ctx) |
| Function prototype for functions passed to tcpip_callback(). | |
Enumerations | |
| enum | tcpip_msg_type { TCPIP_MSG_API, TCPIP_MSG_INPKT, TCPIP_MSG_TIMEOUT, TCPIP_MSG_UNTIMEOUT, TCPIP_MSG_CALLBACK } |
Functions | |
| void | tcpip_init (tcpip_init_done_fn tcpip_init_done, void *arg) |
Initialize this module:
| |
| err_t | tcpip_apimsg (struct api_msg *apimsg) |
| 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 | 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. | |
| err_t | tcpip_timeout (u32_t msecs, sys_timeout_handler h, void *arg) |
| err_t | tcpip_untimeout (sys_timeout_handler h, void *arg) |
| #define LOCK_TCPIP_CORE | ( | ) |
| #define LWIP_TCPIP_THREAD_ALIVE | ( | ) |
Define this to something that triggers a watchdog.
This is called from tcpip_thread after processing a message.
| #define TCPIP_APIMSG | ( | m | ) | tcpip_apimsg(m) |
| #define TCPIP_APIMSG_ACK | ( | m | ) | sys_sem_signal(&m->conn->op_completed) |
| #define tcpip_callback | ( | f, | ||
| ctx | ||||
| ) | tcpip_callback_with_block(f, ctx, 1) |
| #define TCPIP_NETIFAPI | ( | m | ) | tcpip_netifapi(m) |
| #define TCPIP_NETIFAPI_ACK | ( | m | ) | sys_sem_signal(&m->sem) |
| #define UNLOCK_TCPIP_CORE | ( | ) |
| typedef void(* tcpip_callback_fn)(void *ctx) |
Function prototype for functions passed to tcpip_callback().
| typedef void(* tcpip_init_done_fn)(void *arg) |
Function prototype for the init_done function passed to tcpip_init.
| enum tcpip_msg_type |
| err_t mem_free_callback | ( | void * | m | ) |
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. |
| err_t tcpip_apimsg | ( | struct api_msg * | 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.
| f | the function to call | |
| ctx | parameter passed to f | |
| block | 1 to block until the request is posted, 0 to non-blocking mode |
| 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 |
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 |
| err_t tcpip_timeout | ( | u32_t | msecs, | |
| sys_timeout_handler | h, | |||
| void * | arg | |||
| ) |
| err_t tcpip_untimeout | ( | sys_timeout_handler | h, | |
| void * | arg | |||
| ) |
1.7.1