TCP Internal Members

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
TCP Internal Members

The following functions and variables are designated as internal to the TCP module.

Functions
 
Name 
Description 
 
Closes a TCP socket. 
 
Finds a suitable socket for a TCP segment. 
 
Processes an incoming TCP segment. 
 
Transmits a TPC segment. 
 
Swaps endian-ness of a TCP header. 
 
Flushes MyTCB cache and loads up the specified TCB. Does nothing on cache hit. 
Macros
 
Name 
Description 
 
ACK 
Acknowledge Flag as defined in RFC 
 
FIN 
FIN Flag as defined in RFC 
 
End port for client sockets 
 
Starting port for client sockets 
 
PSH 
Push Flag as defined in RFC 
 
RST 
Reset Flag as defined in RFC 
 
Instead of transmitting normal data, a garbage octet is transmitted according to RFC 1122 section 4.2.3.6 
 
Indicates if this packet is a retransmission (no reset) or a new packet (reset required) 
 
SYN 
SYN Flag as defined in RFC 
 
Flushes MyTCBStub cache and loads up the specified TCB_STUB. Does nothing on cache hit. 
 
Timeout before automatically transmitting unflushed data 
 
Timeout before automatically transmitting a window update due to a TCPGet() or TCPGetArray() function call 
 
Timeout for the CLOSE_WAIT state 
 
Timeout for delayed-acknowledgement algorithm 
 
Timeout for FIN WAIT 2 state 
 
Timeout for keep-alive messages when no traffic is sent 
 
Maximum number of retransmission attempts 
 
TCP Maximum Segment Size for RX. This value is advirtised during connection establishment and the remote node should obey it. This should be set to 536 to avoid IP layer fragmentation from causing packet loss. However, raising its value can enhance performance at the (small) risk of introducing incompatibility with certain special remote nodes (ex: ones connected via a slow dial up modem). 
 
TCP Maximum Segment Size for TX. The TX maximum segment size is actually govered by the remote node's MSS option advirtised during connection establishment. However, if the remote node specifies an unhandlably large MSS (ex: > Ethernet MTU), this define sets a hard limit so that we don't cause any TX buffer overflows. If the remote node does not advirtise a MSS option, all TX segments are fixed at 536 bytes maximum. 
 
Smaller than all other retries to reduce SYN flood DoS duration 
 
Maximum number of keep-alive messages that can be sent without receiving a response before automatically closing the connection 
 
For smallest size and best throughput, TCP_OPTIMIZE_FOR_SIZE should always be enabled on PIC24/dsPIC products. On PIC32 products there is very little difference and depnds on compiler optimization level 
 
End of List TCP Option Flag 
 
Maximum segment size TCP flag 
 
No Op TCP Option 
 
Determines the number of defined TCP sockets 
 
Timeout to retransmit unacked data 
 
Number of TCP RX SYN packets to save if they cannot be serviced immediately 
 
Timeout for when SYN queue entries are deleted if unserviceable 
 
URG 
Urgent Flag as defined in RFC 
Module
Structures
 
Name 
Description 
 
TCP Header Data Structure 
 
TCP Options data structure 
 
Structure containing all the important elements of an incomming SYN packet in order to establish a connection at a future time if all sockets on the listening port are already connected to someone 
Variables
 
Name 
Description 
 
Current TCP socket 
 
Currently loaded TCB 
 
Alias to current TCP stub. 
 
Array of saved incoming SYN requests that need to be serviced later 
 
This is variable TCBStubs. 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.