Functions |
static u16_t | tcp_new_port (void) |
| A nastly hack featuring 'goto' statements that allocates a new TCP local port.
|
void | tcp_tmr (void) |
| Called periodically to dispatch TCP timers.
|
static err_t | tcp_close_shutdown (struct tcp_pcb *pcb, u8_t rst_on_unacked_data) |
| Closes the TX side of a connection held by the PCB.
|
err_t | tcp_close (struct tcp_pcb *pcb) |
| Closes the connection held by the PCB.
|
err_t | tcp_shutdown (struct tcp_pcb *pcb, int shut_rx, int shut_tx) |
| Causes all or part of a full-duplex connection of this PCB to be shut down.
|
void | tcp_abandon (struct tcp_pcb *pcb, int reset) |
| Abandons a connection and optionally sends a RST to the remote host.
|
void | tcp_abort (struct tcp_pcb *pcb) |
| Aborts the connection by sending a RST (reset) segment to the remote host.
|
err_t | tcp_bind (struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) |
| Binds the connection to a local portnumber and IP address.
|
static err_t | tcp_accept_null (void *arg, struct tcp_pcb *pcb, err_t err) |
| Default accept callback if no accept callback is specified by the user.
|
struct tcp_pcb * | tcp_listen_with_backlog (struct tcp_pcb *pcb, u8_t backlog) |
| Set the state of the connection to be LISTEN, which means that it is able to accept incoming connections.
|
u32_t | tcp_update_rcv_ann_wnd (struct tcp_pcb *pcb) |
| Update the state that tracks the available window space to advertise.
|
void | tcp_recved (struct tcp_pcb *pcb, u16_t len) |
| This function should be called by the application when it has processed the data.
|
err_t | tcp_connect (struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected) |
| Connects to another host.
|
void | tcp_slowtmr (void) |
| Called every 500 ms and implements the retransmission timer and the timer that removes PCBs that have been in TIME-WAIT for enough time.
|
void | tcp_fasttmr (void) |
| Is called every TCP_FAST_INTERVAL (250 ms) and process data previously "refused" by upper layer (application) and sends delayed ACKs.
|
void | tcp_segs_free (struct tcp_seg *seg) |
| Deallocates a list of TCP segments (tcp_seg structures).
|
void | tcp_seg_free (struct tcp_seg *seg) |
| Frees a TCP segment (tcp_seg structure).
|
void | tcp_setprio (struct tcp_pcb *pcb, u8_t prio) |
| Sets the priority of a connection.
|
struct tcp_seg * | tcp_seg_copy (struct tcp_seg *seg) |
| Returns a copy of the given TCP segment.
|
err_t | tcp_recv_null (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) |
| Default receive callback that is called if the user didn't register a recv callback for the pcb.
|
static void | tcp_kill_prio (u8_t prio) |
| Kills the oldest active connection that has lower priority than prio.
|
static void | tcp_kill_timewait (void) |
| Kills the oldest connection that is in TIME_WAIT state.
|
struct tcp_pcb * | tcp_alloc (u8_t prio) |
| Allocate a new tcp_pcb structure.
|
struct tcp_pcb * | tcp_new (void) |
| Creates a new TCP protocol control block but doesn't place it on any of the TCP PCB lists.
|
void | tcp_arg (struct tcp_pcb *pcb, void *arg) |
| Used to specify the argument that should be passed callback functions.
|
void | tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv) |
| Used to specify the function that should be called when a TCP connection receives data.
|
void | tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent) |
| Used to specify the function that should be called when TCP data has been successfully delivered to the remote host.
|
void | tcp_err (struct tcp_pcb *pcb, tcp_err_fn err) |
| Used to specify the function that should be called when a fatal error has occured on the connection.
|
void | tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept) |
| Used for specifying the function that should be called when a LISTENing connection has been connected to another host.
|
void | tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) |
| Used to specify the function that should be called periodically from TCP.
|
void | tcp_pcb_purge (struct tcp_pcb *pcb) |
| Purges a TCP PCB.
|
void | tcp_pcb_remove (struct tcp_pcb **pcblist, struct tcp_pcb *pcb) |
| Purges the PCB and removes it from a PCB list.
|
u32_t | tcp_next_iss (void) |
| Calculates a new initial sequence number for new connections.
|
u16_t | tcp_eff_send_mss (u16_t sendmss, ip_addr_t *addr) |
| Calcluates the effective send mss that can be used for a specific IP address by using ip_route to determin the netif used to send to the address and calculating the minimum of TCP_MSS and that netif's mtu (if set).
|
void | tcp_debug_print (struct tcp_hdr *tcphdr) |
| Print a tcp header for debugging purposes.
|
void | tcp_debug_print_state (enum tcp_state s) |
| Print a tcp state for debugging purposes.
|
void | tcp_debug_print_flags (u8_t flags) |
| Print tcp flags for debugging purposes.
|
void | tcp_debug_print_pcbs (void) |
| Print all tcp_pcbs in every list for debugging purposes.
|
s16_t | tcp_pcbs_sane (void) |
| Check state consistency of the tcp_pcb lists.
|
Variables |
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 * | tcp_active_pcbs |
| List of all TCP PCBs that are in a state in which they accept or send data.
|
struct tcp_pcb * | tcp_tw_pcbs |
| List of all TCP PCBs in TIME-WAIT 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_tmp_pcb |
| Only used for temporary storage.
|
static u8_t | tcp_timer |
| Timer counter to handle calling slow-timer from tcp_tmr()
|