tcpip.c File Reference


Functions

void tcp_timer_needed (void)
err_t tcpip_input (struct pbuf *p, struct netif *inp)
err_t tcpip_callback_with_block (void(*f)(void *ctx), void *ctx, u8_t block)
err_t tcpip_apimsg (struct api_msg *apimsg)
err_t tcpip_apimsg_lock (struct api_msg *apimsg)
err_t tcpip_netifapi (struct netifapi_msg *netifapimsg)
err_t tcpip_netifapi_lock (struct netifapi_msg *netifapimsg)
void tcpip_init (void(*initfunc)(void *), void *arg)

Variables

sys_sem_t lock_tcpip_core

Detailed Description

Sequential API Main thread module

Function Documentation

void tcp_timer_needed ( void   ) 

Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.

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 ( void(*)(void *ctx)  f,
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 ( void(*)(void *)  initfunc,
void *  arg 
)

Initialize this module:

Parameters:
initfunc a function to call when tcpip_thread is running and finished initializing
arg argument to pass to initfunc

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 netif doesn't got NETIF_FLAG_ETHARP flag)
inp the network interface on which the packet was received

err_t tcpip_netifapi ( struct netifapi_msg *  netifapimsg  ) 

Much like tcpip_apimsg, but calls the lower part of a netifapi_* function.

Parameters:
netifapimsg a struct containing the function to call and its parameters
Returns:
error code given back by the function that was called

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


Variable Documentation

sys_sem_t lock_tcpip_core

The global semaphore to lock the stack.


Generated on Sun Mar 23 19:22:46 2008 for lwIP 1.3.0 by  doxygen 1.5.4