|
lwIP 2.2.1
Lightweight IP stack
|
#include "lwip/opt.h"#include "lwip/def.h"#include "lwip/mem.h"#include "lwip/memp.h"#include "lwip/tcp.h"#include "lwip/priv/tcp_priv.h"#include "lwip/debug.h"#include "lwip/stats.h"#include "lwip/ip6.h"#include "lwip/ip6_addr.h"#include "lwip/nd6.h"#include <string.h>#include "path/to/my/lwip_hooks.h"Variables | |
| struct tcp_pcb * | tcp_bound_pcbs |
| union tcp_listen_pcbs_t | tcp_listen_pcbs |
| struct tcp_pcb * | tcp_active_pcbs |
| struct tcp_pcb * | tcp_tw_pcbs |
| struct tcp_pcb **const | tcp_pcb_lists [] |
| void | |
Transmission Control Protocol for IP See also TCP
Abandons a connection and optionally sends a RST to the remote host. Deletes the local protocol control block. This is done when a connection is killed because of shortage of memory.
| pcb | the tcp_pcb to abort |
| reset | boolean to indicate whether a reset should be sent |
| struct tcp_pcb * tcp_alloc | ( | u8_t | prio | ) |
Calculates the effective send mss that can be used for a specific IP address by calculating the minimum of TCP_MSS and the mtu (if set) of the target netif (if not NULL).
| err_t tcp_ext_arg_invoke_callbacks_passive_open | ( | struct tcp_pcb_listen * | lpcb, |
| struct tcp_pcb * | cpcb ) |
This function calls the "passive_open" callback for all ext_args if a connection is in the process of being accepted. This is called just after the SYN is received and before a SYN/ACK is sent, to allow to modify the very first segment sent even on passive open. Naturally, the "accepted" callback of the pcb has not been called yet!
Is called every TCP_FAST_INTERVAL (250 ms) and process data previously "refused" by upper layer (application) and sends delayed ACKs or pending FINs.
Automatically called from tcp_tmr().
This function is called from netif.c when address is changed or netif is removed
| old_addr | IP address of the netif before change |
| new_addr | IP address of the netif after change or NULL if netif has been removed |
| u32_t tcp_next_iss | ( | struct tcp_pcb * | pcb | ) |
Calculates a new initial sequence number for new connections.
Purges a TCP PCB. Removes any buffered data and frees the buffer memory (pcb->ooseq, pcb->unsent and pcb->unacked are freed).
| pcb | tcp_pcb to purge. The pcb itself is not deallocated! |
Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first.
| pcblist | PCB list to purge. |
| pcb | tcp_pcb to purge. The pcb itself is NOT deallocated! |
Default receive callback that is called if the user didn't register a recv callback for the pcb.
| struct tcp_seg * tcp_seg_copy | ( | struct tcp_seg * | seg | ) |
Returns a copy of the given TCP segment. The pbuf and data are not copied, only the pointers
| seg | the old tcp_seg |
| void tcp_seg_free | ( | struct tcp_seg * | seg | ) |
Frees a TCP segment (tcp_seg structure).
| seg | single tcp_seg to free |
| void tcp_segs_free | ( | struct tcp_seg * | seg | ) |
Deallocates a list of TCP segments (tcp_seg structures).
| seg | tcp_seg list of TCP segments to free |
Called every 500 ms and implements the retransmission timer and the timer that removes PCBs that have been in TIME-WAIT for enough time. It also increments various timers such as the inactivity timer in each PCB.
Automatically called from tcp_tmr().
| u32_t tcp_update_rcv_ann_wnd | ( | struct tcp_pcb * | pcb | ) |
Update the state that tracks the available window space to advertise.
Returns how much extra window would be advertised if we sent an update now.
| struct tcp_pcb* tcp_active_pcbs |
List of all TCP PCBs that are in a state in which they accept or send data.
| struct tcp_pcb* tcp_bound_pcbs |
List of all TCP PCBs bound but not yet (connected || listening)
| union tcp_listen_pcbs_t tcp_listen_pcbs |
List of all TCP PCBs in LISTEN state
| struct tcp_pcb** const tcp_pcb_lists[] |
An array with all (non-temporary) PCB lists, mainly used for smaller code size
| struct tcp_pcb* tcp_tw_pcbs |
List of all TCP PCBs in TIME-WAIT state