Constants for CPS

Definitions


#include <nitroWiFi/cps.h>


#define tcpwritetimeout1 CPS_MilliSecondsToLTicks (2*1000)

#define tcpwritetimeout2 CPS_MilliSecondsToLTicks (20*1000)

#define tcpsyntimeout CPS_MilliSecondsToLTicks (5*1000)

#define tcpclosetimeout CPS_MilliSecondsToLTicks (5*1000)

#define arpcache_entries 8

#define fragtable_entries 8

#define	TCPIP_STACK_SIZE 2048

#define	SCAVENGER_STACK_SIZE 2048

#define DEFAULT_HELPER_THREADS_PRIORITY 16

#define MAX_IP_PAYLOAD 1480

#define SCA_SLEEP (1*1000)			// 1 second

#define ARP_TIMEOUT (2*60*1000)			// 2 minutes

#define GARP_TIMEOUT (3*1000)			// 3 seconds

#define IPFRAG_TIMEOUT (30*1000)		// 30 seconds

#define DHCP_TIMEOUT CPS_MilliSecondsToLTicks (4*1000)

#define DHCP_RETRIES 2

#define RESOLVER_TIMEOUT CPS_MilliSecondsToLTicks (5*1000)

#define RESOLVER_MAXNAMELEN 48

				

Description

tcpwritetimeout1 Partner's ACK timeout with CPS_SocWrite() in TCP mode. Resend when this limit is exceeded.
tcpwritetimeout2 Overall send process timeout with CPS_SocWrite() in TCP mode. Transmission aborts when the timeout is exceeded.
tcpsyntimeout Timeout during handshake with CPS_TcpConnect() and CPS_TcpListen(). Handshake aborts when timeout is exceeded.
tcpclosetimeout CPS_TcpClose() timeout. If the time exceeds the timeout and the standard close process has not executed, it is forced to close.
arpcache_entries The number of ARP cache entries.
fragtable_entries The number of entries in the table used to reconstruct a fragmented IP packet.
TCPIP_STACK_SIZE The stack size for the CPS reception thread.
SCAVENGER_STACK_SIZE The stack size for the CPS periodic process thread.
DEFAULT_HELPER_THREADS_PRIORITY CPS priorities receive threads and CPS periodic processing threads.
MAX_IP_PAYLOAD The maximum length of the IP packet. IP packets larger than this length are fragmented and sent.
SCA_SLEEP The operation frequency of the CPS periodic process thread.
ARP_TIMEOUT ARP cache lifetime.
GARP_TIMEOUT Wait time to check for duplicates of manually set IP addresses.
IPFRAG_TIMEOUT Timeout when reconstructing fragmented IP packets. Packets are destroyed if they could not be reconstructed after the timeout.
DHCP_TIMEOUT Timeout during communication with DHCP server. For the first time, this is the initial value; the second time, the value is doubled; the third time, the second value time is doubled, etc.
DHCP_RETRIES Number of retries during communication with DHCP server.
RESOLVER_TIMEOUT Timeout during communication with DNS server.
RESOLVER_MAXNAMELEN Maximum length of name when querying the DNS server.

Timeout Values

Timeout values used within CPS sockets are given below.
Note that there are some timeout values that are not defined by the above constants.

ARP retry 8 times in 2 second intervals
Timeout for ARP cache. 2 minutes since last reference
IP fragment disposal time 30 seconds
DHCP retry Timeout values are 2, 4, 6, 8 seconds for a total of 4 transmissions
DNS retry 3 times in 2 second intervals
TCP send retry Until 20 seconds have elapsed in 2 second intervals
Timeout during TCP connection 5 seconds
Timeout during TCP disconnection 5 seconds

Revision History

10/24/2005 Initial version.