SAMV71 Xplained Ultra Software Package 1.5

tcpip.c File Reference

#include "lwip/opt.h"
#include "lwip/sys.h"
#include "lwip/memp.h"
#include "lwip/pbuf.h"
#include "lwip/ip_frag.h"
#include "lwip/tcp.h"
#include "lwip/autoip.h"
#include "lwip/dhcp.h"
#include "lwip/igmp.h"
#include "lwip/dns.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

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_timeout (u32_t msecs, sys_timeout_handler h, void *arg)
err_t tcpip_untimeout (sys_timeout_handler h, void *arg)
err_t tcpip_apimsg (struct api_msg *apimsg)
void tcpip_init (void(*initfunc)(void *), void *arg)
err_t pbuf_free_callback (struct pbuf *p)
err_t mem_free_callback (void *m)

Detailed Description

Sequential API Main thread module

Definition in file tcpip.c.


Function Documentation

err_t mem_free_callback ( void *  m  ) 

A simple wrapper function that allows you to free heap memory from interrupt context.

Parameters:
m the heap memory to free
Returns:
ERR_OK if callback could be enqueued, an err_t if not

Definition at line 591 of file tcpip.c.

Here is the call graph for this function:

err_t pbuf_free_callback ( struct pbuf p  ) 

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

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

Definition at line 578 of file tcpip.c.

Here is the call graph for this function:

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.

Definition at line 100 of file tcpip.c.

Here is the call graph for this function:

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

Definition at line 450 of file tcpip.c.

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

Definition at line 357 of file tcpip.c.

Here is the call graph for this function:

void tcpip_init ( void(*)(void *)  initfunc,
void *  arg 
)

Initialize this module:

  • initialize all sub modules
  • start the tcpip_thread
Parameters:
initfunc a function to call when tcpip_thread is running and finished initializing
arg argument to pass to initfunc

Definition at line 544 of file tcpip.c.

Here is the call graph for this function:

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

Definition at line 323 of file tcpip.c.

Here is the call graph for this function:

err_t tcpip_timeout ( u32_t  msecs,
sys_timeout_handler  h,
void *  arg 
)

call sys_timeout in tcpip_thread

Parameters:
msec time in miliseconds for timeout
h function to be called on timeout
arg argument to pass to timeout function h
Returns:
ERR_MEM on memory error, ERR_OK otherwise

Definition at line 392 of file tcpip.c.

Here is the call graph for this function:

err_t tcpip_untimeout ( sys_timeout_handler  h,
void *  arg 
)

call sys_untimeout in tcpip_thread

Parameters:
msec time in miliseconds for timeout
h function to be called on timeout
arg argument to pass to timeout function h
Returns:
ERR_MEM on memory error, ERR_OK otherwise

Definition at line 421 of file tcpip.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines