MeterLogger
Functions | Variables
tcpip.c File Reference
#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"
Include dependency graph for tcpip.c:

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)
 
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
 

Detailed Description

Sequential API Main thread module

Definition in file tcpip.c.

Function Documentation

◆ 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
mthe heap memory to free
Returns
ERR_OK if callback could be enqueued, an err_t if not

Definition at line 455 of file tcpip.c.

References mem_free(), and tcpip_callback_with_block().

456 {
457  return tcpip_callback_with_block(mem_free, m, 0);
458 }
err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block)
Definition: tcpip.c:206
void mem_free(void *mem) ICACHE_FLASH_ATTR
Definition: mem.c:310
Here is the call graph for this function:

◆ pbuf_free_callback()

err_t pbuf_free_callback ( struct pbuf p)

A simple wrapper function that allows you to free a pbuf from interrupt context.

Parameters
pThe pbuf (chain) to be dereferenced.
Returns
ERR_OK if callback could be enqueued, an err_t if not

Definition at line 442 of file tcpip.c.

References pbuf_free_int(), and tcpip_callback_with_block().

443 {
445 }
static void pbuf_free_int(void *p)
Definition: tcpip.c:429
err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block)
Definition: tcpip.c:206
Here is the call graph for this function:

◆ pbuf_free_int()

static void pbuf_free_int ( void *  p)
static

Simple callback function used with tcpip_callback to free a pbuf (pbuf_free has a wrong signature for tcpip_callback)

Parameters
pThe pbuf (chain) to be dereferenced.

Definition at line 429 of file tcpip.c.

References pbuf_free().

Referenced by pbuf_free_callback().

430 {
431  struct pbuf *q = (struct pbuf *)p;
432  pbuf_free(q);
433 }
Definition: pbuf.h:76
u8_t pbuf_free(struct pbuf *p) ICACHE_FLASH_ATTR
Definition: pbuf.c:685
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_callback_with_block()

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
fthe function to call
ctxparameter passed to f
block1 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 206 of file tcpip.c.

References tcpip_msg::cb, tcpip_msg::ctx, ERR_MEM, ERR_OK, ERR_VAL, LOCK_TCPIP_CORE, mbox, memp_free(), memp_malloc(), tcpip_msg::msg, NULL, sys_arch_sem_wait(), sys_mbox_post(), sys_mbox_trypost(), sys_mbox_valid(), sys_sem_free(), sys_sem_new(), sys_sem_wait, TCPIP_MSG_CALLBACK, tcpip_msg::type, and UNLOCK_TCPIP_CORE.

Referenced by mem_free_callback(), and pbuf_free_callback().

207 {
208  struct tcpip_msg *msg;
209 
210  if (sys_mbox_valid(&mbox)) {
211  msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API);
212  if (msg == NULL) {
213  return ERR_MEM;
214  }
215 
216  msg->type = TCPIP_MSG_CALLBACK;
217  msg->msg.cb.function = function;
218  msg->msg.cb.ctx = ctx;
219  if (block) {
220  sys_mbox_post(&mbox, msg);
221  } else {
222  if (sys_mbox_trypost(&mbox, msg) != ERR_OK) {
223  memp_free(MEMP_TCPIP_MSG_API, msg);
224  return ERR_MEM;
225  }
226  }
227  return ERR_OK;
228  }
229  return ERR_VAL;
230 }
void memp_free(memp_t type, void *mem) ICACHE_FLASH_ATTR
Definition: memp.c:438
int sys_mbox_valid(sys_mbox_t *mbox)
#define ERR_VAL
Definition: err.h:58
#define NULL
Definition: def.h:47
void * memp_malloc(memp_t type) ICACHE_FLASH_ATTR
Definition: memp.c:393
enum tcpip_msg_type type
Definition: tcpip.h:126
union tcpip_msg::@2 msg
#define ERR_OK
Definition: err.h:52
struct tcpip_msg::@2::@4 cb
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
void * ctx
Definition: tcpip.h:141
void sys_mbox_post(sys_mbox_t *mbox, void *msg)
static sys_mbox_t mbox
Definition: tcpip.c:55
#define ERR_MEM
Definition: err.h:53
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_init()

void tcpip_init ( tcpip_init_done_fn  initfunc,
void *  arg 
)

Initialize this module:

  • initialize all sub modules
  • start the tcpip_thread
Parameters
initfunca function to call when tcpip_thread is running and finished initializing
argargument to pass to initfunc

Definition at line 404 of file tcpip.c.

References ERR_OK, LWIP_ASSERT, lwip_init(), mbox, NULL, sys_mbox_new(), sys_mutex_new(), sys_thread_new(), tcpip_init_done, tcpip_init_done_arg, TCPIP_MBOX_SIZE, tcpip_thread(), TCPIP_THREAD_NAME, TCPIP_THREAD_PRIO, and TCPIP_THREAD_STACKSIZE.

405 {
406  lwip_init();//初始化内核 tcpip_init_done = initfunc;//注册用户自定义函数 tcpip_init_done_arg = arg;//函数参数 if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) {//创建内核邮箱 LWIP_ASSERT("failed to create tcpip_thread mbox", 0); } #if LWIP_TCPIP_CORE_LOCKING if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) { LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);//创建内核进程 }
407 
408  tcpip_init_done = initfunc;//注册用户自定义函数
409  tcpip_init_done_arg = arg;//函数参数 if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) {//创建内核邮箱 LWIP_ASSERT("failed to create tcpip_thread mbox", 0); } #if LWIP_TCPIP_CORE_LOCKING if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) { LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);//创建内核进程 }
410  if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) {//创建内核邮箱 LWIP_ASSERT("failed to create tcpip_thread mbox", 0); } #if LWIP_TCPIP_CORE_LOCKING if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) { LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);//创建内核进程 }
411  LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
412  }
413 #if LWIP_TCPIP_CORE_LOCKING
414  if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) {
415  LWIP_ASSERT("failed to create lock_tcpip_core", 0);
416  }
417 #endif /* LWIP_TCPIP_CORE_LOCKING */
418 
420 }
#define TCPIP_THREAD_NAME
Definition: opt.h:1199
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
err_t sys_mutex_new(sys_mutex_t *mutex)
void lwip_init(void) ICACHE_FLASH_ATTR
Definition: init.c:261
#define TCPIP_THREAD_PRIO
Definition: opt.h:1217
#define NULL
Definition: def.h:47
static void tcpip_thread(void *arg)
Definition: tcpip.c:74
#define TCPIP_MBOX_SIZE
Definition: opt.h:1226
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
#define ERR_OK
Definition: err.h:52
static tcpip_init_done_fn tcpip_init_done
Definition: tcpip.c:53
static void * tcpip_init_done_arg
Definition: tcpip.c:54
#define LWIP_ASSERT(message, assertion)
Definition: debug.h:65
#define TCPIP_THREAD_STACKSIZE
Definition: opt.h:1208
static sys_mbox_t mbox
Definition: tcpip.c:55
Here is the call graph for this function:

◆ tcpip_input()

err_t tcpip_input ( struct pbuf p,
struct netif inp 
)

Pass a received packet to tcpip_thread for input processing

Parameters
pthe 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)
inpthe network interface on which the packet was received

Definition at line 156 of file tcpip.c.

References ERR_MEM, ERR_OK, ERR_VAL, tcpip_msg::inp, ip_input(), LOCK_TCPIP_CORE, LWIP_DEBUGF, mbox, memp_free(), memp_malloc(), tcpip_msg::msg, NETIF_FLAG_ETHARP, NETIF_FLAG_ETHERNET, NULL, tcpip_msg::p, sys_mbox_trypost(), sys_mbox_valid(), TCPIP_DEBUG, TCPIP_MSG_INPKT, tcpip_msg::type, and UNLOCK_TCPIP_CORE.

Referenced by netif_init().

157 {
158 #if LWIP_TCPIP_CORE_LOCKING_INPUT
159  err_t ret;
160  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_input: PACKET %p/%p\n", (void *)p, (void *)inp));
161  LOCK_TCPIP_CORE();
162 #if LWIP_ETHERNET
164  ret = ethernet_input(p, inp);
165  } else
166 #endif /* LWIP_ETHERNET */
167  {
168  ret = ip_input(p, inp);
169  }
171  return ret;
172 #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */
173  struct tcpip_msg *msg;
174 
175  if (sys_mbox_valid(&mbox)) {
176  msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
177  if (msg == NULL) {
178  return ERR_MEM;
179  }
180 
181  msg->type = TCPIP_MSG_INPKT;
182  msg->msg.inp.p = p;
183  msg->msg.inp.netif = inp;
184  if (sys_mbox_trypost(&mbox, msg) != ERR_OK) {
185  memp_free(MEMP_TCPIP_MSG_INPKT, msg);
186  return ERR_MEM;
187  }
188  return ERR_OK;
189  }
190  return ERR_VAL;
191 #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
192 }
void memp_free(memp_t type, void *mem) ICACHE_FLASH_ATTR
Definition: memp.c:438
int sys_mbox_valid(sys_mbox_t *mbox)
#define ERR_VAL
Definition: err.h:58
#define LOCK_TCPIP_CORE()
Definition: tcpip.h:67
#define NULL
Definition: def.h:47
void * memp_malloc(memp_t type) ICACHE_FLASH_ATTR
Definition: memp.c:393
enum tcpip_msg_type type
Definition: tcpip.h:126
struct pbuf * p
Definition: tcpip.h:136
#define UNLOCK_TCPIP_CORE()
Definition: tcpip.h:68
union tcpip_msg::@2 msg
#define NETIF_FLAG_ETHARP
Definition: netif.h:88
#define LWIP_DEBUGF(debug, message)
Definition: debug.h:94
#define ERR_OK
Definition: err.h:52
u8_t flags
Definition: netif.h:193
s8_t err_t
Definition: err.h:47
struct tcpip_msg::@2::@3 inp
#define NETIF_FLAG_ETHERNET
Definition: netif.h:92
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
err_t ip_input(struct pbuf *p, struct netif *inp) ICACHE_FLASH_ATTR
Definition: ip.c:923
static sys_mbox_t mbox
Definition: tcpip.c:55
#define ERR_MEM
Definition: err.h:53
#define TCPIP_DEBUG
Definition: opt.h:1995
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_thread()

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
argunused argument

Definition at line 74 of file tcpip.c.

References ip_input(), LOCK_TCPIP_CORE, LWIP_ASSERT, LWIP_DEBUGF, LWIP_TCPIP_THREAD_ALIVE, LWIP_UNUSED_ARG, mbox, memp_free(), tcpip_msg::msg, NETIF_FLAG_ETHARP, NETIF_FLAG_ETHERNET, NULL, sys_timeout(), sys_timeouts_mbox_fetch(), sys_untimeout(), TCPIP_DEBUG, tcpip_init_done, tcpip_init_done_arg, TCPIP_MSG_CALLBACK, TCPIP_MSG_INPKT, and UNLOCK_TCPIP_CORE.

Referenced by tcpip_init().

75 {
76  struct tcpip_msg *msg;
77  LWIP_UNUSED_ARG(arg);
78 
79  if (tcpip_init_done != NULL) {//用户注册了自定义初始化函数
81  }
82 
84  while (1) { /* MAIN Loop */
87  /* wait for a message, timeouts are processed while waiting */
88  sys_timeouts_mbox_fetch(&mbox, (void **)&msg);
90  switch (msg->type) {
91 #if LWIP_NETCONN
92  case TCPIP_MSG_API://API调用 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); msg->msg.apimsg->function(&(msg->msg.apimsg->msg)); break; #endif /* LWIP_NETCONN */ #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT://底层数据包输入 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {//支持ARP ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);//交给ARP处理 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif);//交给IP处理 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); break; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ #if LWIP_NETIF_API case TCPIP_MSG_NETIFAPI: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: Netif API message %p\n", (void *)msg)); msg->msg.netifapimsg->function(&(msg->msg.netifapimsg->msg)); break; #endif /* LWIP_NETIF_API */ case TCPIP_MSG_CALLBACK://上层回调方式执行一个函数 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); memp_free(MEMP_TCPIP_MSG_API, msg); break; #if LWIP_TCPIP_TIMEOUT case TCPIP_MSG_TIMEOUT://上层注册一个定时事件 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); memp_free(MEMP_TCPIP_MSG_API, msg); break; case TCPIP_MSG_UNTIMEOUT://上层删除一个定时事件 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); memp_free(MEMP_TCPIP_MSG_API, msg); break; #endif /* LWIP_TCPIP_TIMEOUT */ default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); break; } } }
93  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg));
94  msg->msg.apimsg->function(&(msg->msg.apimsg->msg));
95  break;
96 #endif /* LWIP_NETCONN */
97 
98 #if !LWIP_TCPIP_CORE_LOCKING_INPUT
99  case TCPIP_MSG_INPKT://底层数据包输入 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {//支持ARP ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);//交给ARP处理 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif);//交给IP处理 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); break; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ #if LWIP_NETIF_API case TCPIP_MSG_NETIFAPI: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: Netif API message %p\n", (void *)msg)); msg->msg.netifapimsg->function(&(msg->msg.netifapimsg->msg)); break; #endif /* LWIP_NETIF_API */ case TCPIP_MSG_CALLBACK://上层回调方式执行一个函数 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); memp_free(MEMP_TCPIP_MSG_API, msg); break; #if LWIP_TCPIP_TIMEOUT case TCPIP_MSG_TIMEOUT://上层注册一个定时事件 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); memp_free(MEMP_TCPIP_MSG_API, msg); break; case TCPIP_MSG_UNTIMEOUT://上层删除一个定时事件 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); memp_free(MEMP_TCPIP_MSG_API, msg); break; #endif /* LWIP_TCPIP_TIMEOUT */ default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); break; } } }
100  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg));
101 #if LWIP_ETHERNET
102  if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {//支持ARP
103  ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);//交给ARP处理
104  } else
105 #endif /* LWIP_ETHERNET */
106  {
107  ip_input(msg->msg.inp.p, msg->msg.inp.netif);//交给IP处理
108  }
109  memp_free(MEMP_TCPIP_MSG_INPKT, msg);
110  break;
111 #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
112 
113 #if LWIP_NETIF_API
114  case TCPIP_MSG_NETIFAPI:
115  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: Netif API message %p\n", (void *)msg));
116  msg->msg.netifapimsg->function(&(msg->msg.netifapimsg->msg));
117  break;
118 #endif /* LWIP_NETIF_API */
119 
120  case TCPIP_MSG_CALLBACK://上层回调方式执行一个函数
121  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg));
122  msg->msg.cb.function(msg->msg.cb.ctx);
123  memp_free(MEMP_TCPIP_MSG_API, msg);
124  break;
125 
126 #if LWIP_TCPIP_TIMEOUT
127  case TCPIP_MSG_TIMEOUT://上层注册一个定时事件
128  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg));
129  sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg);
130  memp_free(MEMP_TCPIP_MSG_API, msg);
131  break;
132  case TCPIP_MSG_UNTIMEOUT://上层删除一个定时事件
133  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg));
134  sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg);
135  memp_free(MEMP_TCPIP_MSG_API, msg);
136  break;
137 #endif /* LWIP_TCPIP_TIMEOUT */
138 
139  default:
140  LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type));
141  LWIP_ASSERT("tcpip_thread: invalid message", 0);
142  break;
143  }
144  }
145 }
void memp_free(memp_t type, void *mem) ICACHE_FLASH_ATTR
Definition: memp.c:438
#define LWIP_TCPIP_THREAD_ALIVE()
Definition: tcpip.h:54
#define LOCK_TCPIP_CORE()
Definition: tcpip.h:67
#define NULL
Definition: def.h:47
enum tcpip_msg_type type
Definition: tcpip.h:126
#define UNLOCK_TCPIP_CORE()
Definition: tcpip.h:68
union tcpip_msg::@2 msg
void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) ICACHE_FLASH_ATTR
tcpip_callback_fn function
Definition: tcpip.h:140
#define NETIF_FLAG_ETHARP
Definition: netif.h:88
#define LWIP_DEBUGF(debug, message)
Definition: debug.h:94
struct tcpip_msg::@2::@4 cb
struct tcpip_msg::@2::@3 inp
#define NETIF_FLAG_ETHERNET
Definition: netif.h:92
void sys_untimeout(sys_timeout_handler handler, void *arg) ICACHE_FLASH_ATTR
static tcpip_init_done_fn tcpip_init_done
Definition: tcpip.c:53
static void * tcpip_init_done_arg
Definition: tcpip.c:54
#define LWIP_ASSERT(message, assertion)
Definition: debug.h:65
err_t ip_input(struct pbuf *p, struct netif *inp) ICACHE_FLASH_ATTR
Definition: ip.c:923
void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
static sys_mbox_t mbox
Definition: tcpip.c:55
#define LWIP_UNUSED_ARG(x)
Definition: arch.h:73
#define TCPIP_DEBUG
Definition: opt.h:1995
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mbox

sys_mbox_t mbox
static

Definition at line 55 of file tcpip.c.

Referenced by tcpip_callback_with_block(), tcpip_init(), tcpip_input(), and tcpip_thread().

◆ tcpip_init_done

tcpip_init_done_fn tcpip_init_done
static

Definition at line 53 of file tcpip.c.

Referenced by tcpip_init(), and tcpip_thread().

◆ tcpip_init_done_arg

void* tcpip_init_done_arg
static

Definition at line 54 of file tcpip.c.

Referenced by tcpip_init(), and tcpip_thread().