The Pedigree Project
0.1
|
Macros | |
#define | LWIP_TCP 1 |
#define | TCP_TTL (IP_DEFAULT_TTL) |
#define | TCP_MAXRTX 12 |
#define | TCP_SYNMAXRTX 6 |
#define | TCP_QUEUE_OOSEQ (LWIP_TCP) |
#define | TCP_CALCULATE_EFF_SEND_MSS 1 |
#define | TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) |
#define | TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) |
#define | TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) |
#define | TCP_OOSEQ_MAX_BYTES 0 |
#define | TCP_OOSEQ_MAX_PBUFS 0 |
#define | TCP_LISTEN_BACKLOG 0 |
#define | TCP_DEFAULT_LISTEN_BACKLOG 0xff |
#define | TCP_OVERSIZE TCP_MSS |
#define | TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) |
#define | LWIP_EVENT_API 0 |
#define | LWIP_CALLBACK_API 1 |
#define LWIP_EVENT_API 0 |
LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all events (accept, sent, etc) that happen in the system. LWIP_CALLBACK_API==1: The PCB callback function is called directly for the event. This is the default.
#define TCP_CALCULATE_EFF_SEND_MSS 1 |
TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, you might want to increase this.) For the receive side, this MSS is advertised to the remote side when opening a connection. For the transmit size, this MSS sets an upper limit on the MSS advertised by the remote host. TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which reflects the available reassembly buffer size at the remote host) and the largest size permitted by the IP layer" (RFC 1122) Setting this to 1 enables code that checks TCP_MSS against the MTU of the netif used for a connection and limits the MSS if it would be too big otherwise.
#define TCP_DEFAULT_LISTEN_BACKLOG 0xff |
#define TCP_LISTEN_BACKLOG 0 |
#define TCP_MAXRTX 12 |
TCP_WND: The size of a TCP window. This must be at least (2 * TCP_MSS) for things to work well. ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size with scaling applied. Maximum window value in the TCP header will be TCP_WND >> TCP_RCV_SCALE TCP_MAXRTX: Maximum number of retransmissions of data segments.
#define TCP_OOSEQ_MAX_BYTES 0 |
#define TCP_OOSEQ_MAX_PBUFS 0 |
#define TCP_OVERSIZE TCP_MSS |
TCP_OVERSIZE: The maximum number of bytes that tcp_write may allocate ahead of time in an attempt to create shorter pbuf chains for transmission. The meaningful range is 0 to TCP_MSS. Some suggested values are:
0: Disable oversized allocation. Each tcp_write() allocates a new pbuf (old behaviour). 1: Allocate size-aligned pbufs with minimal excess. Use this if your scatter-gather DMA requires aligned fragments. 128: Limit the pbuf/memory overhead to 20%. TCP_MSS: Try to create unfragmented TCP packets. TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
#define TCP_QUEUE_OOSEQ (LWIP_TCP) |
#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) |
#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) |
#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) |
#define TCP_SYNMAXRTX 6 |
#define TCP_TTL (IP_DEFAULT_TTL) |
#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) |
LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. The timestamp option is currently only used to help remote hosts, it is not really used locally. Therefore, it is only enabled when a TS option is received in the initial SYN packet from a remote host. TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an explicit window update