Watt-32 tcp/ip  2.2 dev-rel.10
wattcp.h
Go to the documentation of this file.
1 #ifndef _w32_WATTCP_H
2 #define _w32_WATTCP_H
3 
16 #if defined(WIN64) || defined(_WIN64)
17  #undef WIN64
18  #undef _WIN64
19  #define WIN64 1
20  #define _WIN64 1
21 
22 #elif defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
23  #undef WIN32
24  #undef _WIN32
25  #define WIN32 1
26  #define _WIN32 1
27 #endif
28 
29 #if defined(WIN32) || defined(WIN64)
30  /*
31  * This must come before "target.h".
32  * Prevent including <winsock*.h> and other seldom used headers.
33  */
34  #ifndef WIN32_LEAN_AND_MEAN
35  #define WIN32_LEAN_AND_MEAN 1
36  #endif
37 
38  /*
39  * Required for bsdname.c + winpkt.c
40  */
41  #if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501)
42  #undef _WIN32_WINNT
43  #define _WIN32_WINNT 0x0501
44  #endif
45 
46  #define WATT32_ON_WINDOWS
47 #endif
48 
49 #ifndef WATT32_BUILD
50 #define WATT32_BUILD
51 #endif
52 
53 #include <sys/w32api.h>
54 #include <sys/wtypes.h>
58 #if defined(__HIGHC__) || defined(__GNUC__) || defined(__CCDL__) || \
59  defined(__LCC__) || defined(__POCC__)
60  typedef unsigned long long uint64;
61  typedef long long int64;
62  #define HAVE_UINT64
64 #elif defined(__DMC__) && (__INTSIZE == 4)
65  typedef unsigned long long uint64;
66  typedef long long int64;
67  #define HAVE_UINT64
68 
69 #elif defined(__WATCOMC__) && defined(__WATCOM_INT64__) && !(defined(__SMALL__) || defined(__LARGE__))
70  typedef unsigned __int64 uint64;
71  typedef __int64 int64;
72  #define HAVE_UINT64
73 
74 #elif defined(_MSC_VER) && (_MSC_VER >= 900)
75  typedef unsigned __int64 uint64;
76  typedef __int64 int64;
77  #define HAVE_UINT64
78 
79 #elif defined(__BORLANDC__) && defined(WIN32)
80  typedef unsigned __int64 uint64;
81  typedef __int64 int64;
82  #define HAVE_UINT64
83 #endif
84 
85 struct ulong_long {
86  DWORD lo;
87  DWORD hi;
88  };
89 
90 /* On Win32/VC9+: typedef __w64 LONG DWORD_PTR;
91  */
92 #if !defined(WIN32) && !defined(WIN64)
93  #define DWORD_PTR DWORD
94  #define IntToPtr(i) ((void*)(unsigned)(i))
95  #if 0
96  #define PtrToInt(ptr) ((int)(ptr))
97  #define PtrToUint(ptr) (unsigned int)(ptr)
98  #define PtrToUlong(ptr) (DWORD)(ptr)
99  #endif
100 #endif
101 
102 #if defined(__DMC__)
103  #if !defined(ULONG_PTR)
104  #ifdef _WIN64
105  #define ULONG_PTR unsigned long long
106  #else
107  #define ULONG_PTR unsigned long
108  #endif
109  #endif
110 
111  #if !defined(DWORD_PTR)
112  #define DWORD_PTR ULONG_PTR
113  #endif
114 
115  #if !defined(ULONG64)
116  #define ULONG64 ULONG_PTR
117  #endif
118 #endif
119 
120 
121 /* Compiling with "cl -RTCc" causes "Run-Time Check Failure" -
122  * A cast to a smaller data type has caused a loss of data. If this
123  * was intentional, you should mask the source of the cast with the appropriate bitmask.
124  *
125  * Hence these macros does that. But don't use '-RTCc' in release mode (-MD).
126  */
127 
128 #if defined(_MSC_VER) && defined(_DEBUG)
129  #define loBYTE(w) (BYTE)((w) & 0xFF)
130  #define hiBYTE(w) (BYTE)((WORD)((w) & 0xFF00) >> 8)
131 #else
132  #define loBYTE(w) (BYTE)(w)
133  #define hiBYTE(w) (BYTE)((WORD)(w) >> 8)
134 #endif
135 
136 #define DIM(x) (int) (sizeof(x) / sizeof((x)[0]))
137 #define SIZEOF(x) (int) sizeof(x)
138 
139 #ifdef __LCC__ /* Lcc-win32 is a bit peculiar */
140  #define ARGSUSED(foo) foo = foo
141  #define ATOI(x) atoi ((char*)(x))
142  #define ATOL(x) atol ((char*)(x))
143 #else
144  #define ARGSUSED(foo) (void)foo
145  #define ATOI(x) atoi (x)
146  #define ATOL(x) atol (x)
147 #endif
148 
152 #include "target.h"
153 #include "config.h"
155 #if (DOSX)
156  #define TARGET_IS_32BIT
157 #endif
158 
159 #if defined(USE_CRTDBG)
160  #define _CRTDBG_MAP_ALLOC
161  #undef _malloca /* Avoid MSVC-9 <malloc.h>/<crtdbg.h> name-clash */
162  #include <crtdbg.h>
163 
164 #elif defined(USE_FORTIFY)
165  #include "fortify.h"
167 #elif defined(USE_MPATROL)
168  #include <mpatrol.h>
170  #if defined(_MSC_VER) && (_MSC_VER >= 1400)
171  #pragma comment(lib, "libmpatrol.lib")
172  #pragma comment(lib, "imagehlp.lib")
173  #endif
174 #endif
175 
176 #if defined(MAKE_TSR)
177 #undef HAVE_UINT64
178 #endif
179 
180 #ifndef FALSE
181 #define FALSE 0
182 #endif
183 
184 #ifndef TRUE
185 #define TRUE (!FALSE)
186 #endif
187 
188 
192 #define ETH_MAX_DATA 1500
193 #define ETH_MIN 60
194 #define ETH_MAX (ETH_MAX_DATA + sizeof(eth_Header))
195 
196 #define TOK_MAX_DATA ETH_MAX_DATA /* could be much larger */
197 #define TOK_MIN sizeof(tok_Header)
198 #define TOK_MAX (TOK_MAX_DATA + sizeof(tok_Header))
199 
200 #define FDDI_MAX_DATA ETH_MAX_DATA /* really is 4470 */
201 #define FDDI_MIN (3 + sizeof(fddi_Header))
202 #define FDDI_MAX (FDDI_MAX_DATA + sizeof(fddi_Header))
203 
204 #define ARCNET_MAX_DATA 512 /* Long frame or Exception frame */
205 #define ARCNET_MIN 257
206 #define ARCNET_MAX (ARCNET_MAX_DATA + sizeof(arcnet_Header))
207 
208 #define AX25_MAX_DATA ETH_MAX_DATA
209 #define AX25_MIN sizeof(ax25_Header)
210 #define AX25_MAX (AX25_MAX_DATA + sizeof(ax25_Header))
211 
212 #define PPPOE_MAX_DATA (ETH_MAX_DATA - 8)
213 #define PPPOE_MIN sizeof(pppoe_Header)
214 #define PPPOE_MAX (PPPOE_MAX_DATA + sizeof(pppoe_Header))
215 
216 #define VLAN_MAX_DATA (ETH_MAX_DATA - 4)
217 #define VLAN_MAX (VLAN_MAX_DATA + sizeof(vlan_Header))
218 #define VLAN_MIN sizeof(vlan_Header)
219 
220 #define TCP_OVERHEAD (sizeof(in_Header) + sizeof(tcp_Header))
221 #define UDP_OVERHEAD (sizeof(in_Header) + sizeof(udp_Header))
222 
223 
227 #define IP4_TYPE 0x0008
228 #define IP6_TYPE 0xDD86
229 #define IEEE802_1Q_TYPE 0x0081 /* Virtual LAN */
230 #define ARP_TYPE 0x0608
231 #define RARP_TYPE 0x3580
232 #define PPPOE_DISC_TYPE 0x6388
233 #define PPPOE_SESS_TYPE 0x6488
234 #define LLDP_TYPE 0xCC88
235 
239 #define ARCNET_DP_BOOT 0
240 #define ARCNET_DP_MOUNT 1
241 #define ARCNET_PL_BEACON 8
242 #define ARCNET_PL_BEACON2 243
243 
244 #define ARCNET_DIAG 128
245 #define ARCNET_IP6 196
246 #define ARCNET_BACNET 205
247 #define ARCNET_IP_1201 212
248 #define ARCNET_ARP_1201 213
249 #define ARCNET_RARP_1201 214
250 #define ARCNET_ATALK 221
251 #define ARCNET_ETHER 232
252 #define ARCNET_NOVELL 236
253 #define ARCNET_IP_1051 240
254 #define ARCNET_ARP_1051 241
255 #define ARCNET_BANYAN 247
256 #define ARCNET_IPX 250
257 #define ARCNET_LANSOFT 251
258 
259 
260 #if (DOSX)
261  #define MAX_FRAGMENTS 45UL
262  #define MAX_WINDOW (64*1024U)
263 #else
264  #define MAX_FRAGMENTS 30UL
265  #define MAX_WINDOW (32*1024U)
266 #endif
267 
270 #define MAX_IP4_DATA (ETH_MAX_DATA - sizeof(in_Header))
271 #define MAX_IP6_DATA (ETH_MAX_DATA - sizeof(in6_Header))
272 #define MAX_FRAG_SIZE (MAX_FRAGMENTS * MAX_IP4_DATA)
273 
274 //#define MAX_COOKIES 10
275 //#define MAX_HOSTLEN 80 /**< most strings are limited */
276 #define MAX_ADDRESSES 10
278 #define MAX_NAMELEN 80
279 #define MAX_VALUELEN 80
281 #if defined(WIN32) || defined(WIN64)
282  #define MAX_PATHLEN MAX_PATH /* 260 from <windef.h> */
283 #else
284  #define MAX_PATHLEN 256
285 #endif
286 
287 #define SAFETY_TCP 0x538F25A3L
288 #define SAFETY_UDP 0x3E45E154L
289 
293 #define UDP_PROTO 17
294 #define TCP_PROTO 6
295 #define ICMP_PROTO 1
296 #define IGMP_PROTO 2
297 #define IPCOMP_PROTO 108
298 #define SCTP_PROTO 132
299 
303 #define SOCK_MODE_BINARY 0x01
304 #define SOCK_MODE_UDPCHK 0x02
305 #define SOCK_MODE_NAGLE 0x04
306 #define SOCK_MODE_LOCAL 0x08
307 #define SOCK_MODE_SAWCR 0x10
308 #define SOCK_MODE_MASK 0x07
315 #define LF_WINUPDATE 0x00001
316 #define LF_NOPUSH 0x00002
317 #define LF_NOOPT 0x00004
318 #define LF_REUSEADDR 0x00008
319 #define LF_KEEPALIVE 0x00010
320 #define LF_LINGER 0x00020
321 #define LF_NOCLOSE 0x00040
322 #define LF_NO_IPFRAGS 0x00080
323 #define LF_OOBINLINE 0x00100
324 #define LF_SNDTIMEO 0x00200
325 #define LF_RCVTIMEO 0x00400
326 #define LF_GOT_FIN 0x00800
327 #define LF_GOT_PUSH 0x01000
328 #define LF_GOT_ICMP 0x02000
329 #define LF_USE_TSTAMP 0x04000
330 #define LF_RCVD_SCALE 0x08000
331 #define LF_IS_SERVER 0x10000
332 #define LF_SACK_PERMIT 0x20000
333 
338 #define SOCKESTABLISHED 1
339 #define SOCKDATAREADY 2
340 #define SOCKCLOSED 4
341 
342 
343 #include <sys/pack_on.h>
349 typedef struct in_Header {
350 #if defined(USE_BIGENDIAN)
351  BYTE ver : 4;
352  BYTE hdrlen : 4;
353 #elif defined(OLD_TURBOC) || defined(__CCDL__)
354  int hdrlen : 4;
355  int ver : 4;
356 #else
357  BYTE hdrlen : 4; /* Watcom _requires_ BYTE here */
358  BYTE ver : 4;
359 #endif
360  BYTE tos;
361  WORD length;
362  WORD identification;
363  WORD frag_ofs;
364  BYTE ttl;
365  BYTE proto;
366  WORD checksum;
367  DWORD source;
368  DWORD destination;
369 
370  /* IP options may come here
371  */
372  } in_Header;
373 
376 #define IP_CE 0x8000
377 #define IP_DF 0x4000
378 #define IP_MF 0x2000
379 #define IP_OFFMASK 0x1FFF
383 #define IP_MINCOST 0x02
384 #define IP_RELIABILITY 0x04
385 #define IP_THROUGHPUT 0x08
386 #define IP_LOWDELAY 0x10
387 #define IP_TOSMASK (IP_MINCOST|IP_RELIABILITY|IP_THROUGHPUT|IP_LOWDELAY)
388 
389 #define in_GetHdrLen(ip) ((ip)->hdrlen << 2)
391 #define IP_BCAST_ADDR 0xFFFFFFFFUL
392 #define CLASS_A_ADDR 0xFF000000UL
393 #define CLASS_B_ADDR 0xFFFFFE00UL /* minimal class B */
394 #define CLASS_C_ADDR 0xFFFFFF00UL
395 
400 typedef struct in6_Header {
401 #if defined(USE_BIGENDIAN)
402  BYTE ver : 4;
403  BYTE pri : 4;
404 #else
405  BYTE pri : 4;
406  BYTE ver : 4;
407 #endif
408  BYTE flow_lbl[3];
409  WORD len;
410  BYTE next_hdr;
411  BYTE hop_limit;
412  ip6_address source;
413  ip6_address destination;
414  } in6_Header;
415 
420 typedef struct ip_Packet {
421  in_Header head;
422  BYTE data [MAX_IP4_DATA];
423  } ip_Packet;
424 
425 
430 typedef struct udp_Header {
431  WORD srcPort;
432  WORD dstPort;
433  WORD length;
434  WORD checksum;
435  } udp_Header;
436 
437 
442 typedef struct tcp_Header {
443  WORD srcPort;
444  WORD dstPort;
445  DWORD seqnum;
446  DWORD acknum;
447 
448 #if defined(USE_BIGENDIAN)
449  BYTE offset : 4;
450  BYTE unused : 4;
451 #elif defined(OLD_TURBOC) || defined(__CCDL__)
452  int unused : 4;
453  int offset : 4;
454 #else
455  BYTE unused : 4; /* Watcom _requires_ BYTE here */
456  BYTE offset : 4;
457 #endif
458  BYTE flags;
459  WORD window;
460  WORD checksum;
461  WORD urgent;
462  } tcp_Header;
463 
467 #define tcp_FlagFIN 0x01
468 #define tcp_FlagSYN 0x02
469 #define tcp_FlagRST 0x04
470 #define tcp_FlagPUSH 0x08
471 #define tcp_FlagACK 0x10
472 #define tcp_FlagURG 0x20
473 #define tcp_FlagECN 0x40 /* ECN-Echo */
474 #define tcp_FlagCWR 0x80 /* congestion window reduced */
475 #define tcp_FlagMASK 0x3F /* ignore ECN/CWR for now */
476 
481 typedef struct tcp_PseudoHeader {
482  DWORD src;
483  DWORD dst;
484  BYTE mbz;
485  BYTE protocol;
486  WORD length;
487  WORD checksum;
489 
490 
495 typedef struct tcp_PseudoHeader6 {
496  ip6_address src;
497  ip6_address dst;
498  WORD length;
499  BYTE zero[3];
500  BYTE next_hdr;
502 
503 
508 typedef struct arp_Header {
509  WORD hwType;
510  WORD protType;
511  BYTE hwAddrLen;
513  WORD opcode;
514  eth_address srcEthAddr;
515  DWORD srcIPAddr;
516  eth_address dstEthAddr;
517  DWORD dstIPAddr;
518  } arp_Header;
519 
520 #include <sys/pack_off.h>
522 #define rarp_Header arp_Header
523 
527 #define ARP_REQUEST 0x0100
528 #define ARP_REPLY 0x0200
529 #define RARP_REQUEST 0x0300
530 #define RARP_REPLY 0x0400
531 
532 
540 #define tcp_StateLISTEN 0 /* listening for connection */
541 #define tcp_StateRESOLVE 1 /* resolving IP, waiting on ARP reply */
542 #define tcp_StateSYNSENT 2 /* SYN sent, active open */
543 #define tcp_StateSYNREC 3 /* SYN received, ACK+SYN sent. */
544 #define tcp_StateESTAB 4 /* established */
545 #define tcp_StateESTCL 5 /* established, but will FIN */
546 #define tcp_StateFINWT1 6 /* sent FIN */
547 #define tcp_StateFINWT2 7 /* sent FIN, received FINACK */
548 #define tcp_StateCLOSWT 8 /* received FIN waiting for close */
549 #define tcp_StateCLOSING 9 /* sent FIN, received FIN (waiting for FINACK) */
550 #define tcp_StateLASTACK 10 /* FIN received, FINACK+FIN sent */
551 #define tcp_StateTIMEWT 11 /* dally after sending final FINACK */
552 #define tcp_StateCLOSED 12 /* FIN+ACK received */
553 
554 #define tcp_MaxBufSize 2048 /* maximum bytes to buffer on input */
555 #define udp_MaxBufSize 1520
556 #define tcp_MaxTxBufSize tcp_MaxBufSize /* and on tcp output */
557 
565 #define UDP_TCP_COMMON \
566  WORD ip_type; /* UDP_PROTO,TCP_PROTO or IPx_TYPE */ \
567  BYTE ttl; /* Time To Live */ \
568  BYTE fill_1; \
569  const char *err_msg; /* NULL when all is okay */ \
570  char err_buf[100]; /* room for error message */ \
571  void (W32_CALL *usr_yield)(void); /* yield while waiting */ \
572  icmp_upcall icmp_callb; /* socket-layer callback (icmp) */ \
573  BYTE rigid; \
574  BYTE stress; \
575  WORD sockmode; /* a logical OR of bits */ \
576  WORD fill_2; \
577  DWORD usertimer; /* ip_timer_set, ip_timer_timeout */ \
578  ProtoHandler protoHandler; /* called with incoming data */ \
579  eth_address his_ethaddr; /* peer's ethernet address */ \
580  \
581  DWORD myaddr; /* my IPv4-address */ \
582  DWORD hisaddr; /* peer's IPv4 address */ \
583  WORD hisport; /* peer's source port */ \
584  WORD myport; /* my source port */ \
585  DWORD locflags; /* local option flags */ \
586  BOOL is_ip6; /* TRUE if IPv6 socket */ \
587  int rx_datalen; /* Rx length, must be signed */ \
588  UINT max_rx_data; /* Last index for rx_data[] */ \
589  BYTE *rx_data /* Rx data buffer (default rx_buf[]) */
590 
595 typedef struct udp_Socket {
596  struct udp_Socket *next;
597  UDP_TCP_COMMON;
598  BYTE rx_buf[udp_MaxBufSize+1];
600 #if defined(USE_IPV6)
601  ip6_address my6addr;
602  ip6_address his6addr;
603 #endif
604  DWORD safetysig;
605  } _udp_Socket;
606 
607 
612 typedef struct tcp_Socket {
613  struct tcp_Socket *next;
614  UDP_TCP_COMMON;
615 
616  BYTE rx_buf[tcp_MaxBufSize+1];
618 #if defined(USE_IPV6)
619  ip6_address my6addr;
620  ip6_address his6addr;
621 #endif
622  UINT state;
623  DWORD recv_next;
624  DWORD send_next;
625  long send_una;
627 #if defined(USE_DEBUG)
628  DWORD last_acknum[2];
629  DWORD last_seqnum[2];
630 #endif
631  DWORD timeout;
632  BYTE unhappy;
633  BYTE recent;
634  WORD flags;
636  UINT window;
637  UINT adv_win;
639  BYTE cwindow;
640  BYTE wwindow;
641  WORD fill_4;
642 
643  DWORD vj_sa;
644  DWORD vj_sd;
645  DWORD vj_last;
646  UINT rto;
647  BYTE karn_count;
648  BYTE tos;
649  WORD fill_5;
650 
651  DWORD rtt_time;
652  DWORD rtt_lasttran;
654  DWORD ts_sent;
655  DWORD ts_recent;
656  DWORD ts_echo;
658  UINT max_seg;
665  DWORD missed_seq[2];
666  /* void *reasm_buf; */
668 #if defined(USE_TCP_MD5)
669  char *secret;
670 #endif
671  DWORD inactive_to;
672  DWORD datatimer;
673  /* int sock_delay; ?? */
674 
675  BYTE tx_wscale;
676  BYTE rx_wscale;
677  UINT tx_queuelen;
678  const BYTE *tx_queue;
679 
680  UINT tx_datalen;
681  UINT max_tx_data;
682  BYTE *tx_data;
683  BYTE tx_buf[tcp_MaxTxBufSize+1];
684  DWORD safetysig;
685  DWORD safetytcp;
686  } _tcp_Socket;
687 
688 
693 typedef struct _raw_Socket {
694  struct _raw_Socket *next;
695  WORD ip_type;
696  BOOL used;
697  DWORD seq_num;
698  struct in_Header ip;
699  BYTE rx_data [MAX_FRAG_SIZE];
700  } _raw_Socket;
701 
706 typedef struct _raw6_Socket {
707  struct _raw6_Socket *next;
708  WORD ip_type;
709  BOOL used;
710  DWORD seq_num;
711  struct in6_Header ip6;
712  BYTE rx_data [MAX_IP6_DATA];
713  } _raw6_Socket;
714 
719 typedef union sock_type {
720  _udp_Socket udp;
721  _tcp_Socket tcp;
722  _raw_Socket raw;
723  _raw6_Socket raw6;
724  } sock_type;
725 
726 
727 #include "../inc/tcp.h"
728 
729 #endif /* _w32_WATTCP_H */
730 
BYTE karn_count
count of packets
Definition: wattcp.h:647
DWORD vj_last
last transmit time
Definition: wattcp.h:645
UINT rto
retransmission timeout
Definition: wattcp.h:646
BYTE tos
TOS from IP-header.
Definition: wattcp.h:648
WORD flags
TCP flags used in next Tx.
Definition: wattcp.h:634
DWORD rtt_time
Round Trip Time value.
Definition: wattcp.h:651
DWORD inactive_to
inactive timer (no Rx data)
Definition: wattcp.h:671
DWORD vj_sd
VJ's alg, standard deviation (RTTVAR)
Definition: wattcp.h:644
BYTE * tx_data
Tx data buffer (default tx_buf[])
Definition: wattcp.h:682
WORD ip_type
same ofs as for udp/tcp Socket
Definition: wattcp.h:695
BYTE recent
1 if recently transmitted
Definition: wattcp.h:633
BOOL used
used flag; packet not read yet
Definition: wattcp.h:696
DWORD ts_echo
last TimeStamp echo received
Definition: wattcp.h:656
BYTE cwindow
Congestion window.
Definition: wattcp.h:639
UINT max_tx_data
Last index for tx_data[].
Definition: wattcp.h:681
DWORD rtt_lasttran
RTT at last transmission.
Definition: wattcp.h:652
BYTE rx_buf[udp_MaxBufSize+1]
received data buffer
Definition: wattcp.h:598
BYTE wwindow
Van Jacobson's algorithm.
Definition: wattcp.h:640
ip6_address his6addr
peer's IPv6 address
Definition: wattcp.h:620
UINT tx_datalen
number of bytes of data to send
Definition: wattcp.h:680
long send_una
unacked send data, must be signed
Definition: wattcp.h:625
ip6_address my6addr
my ip6-address
Definition: wattcp.h:601
BYTE rx_buf[tcp_MaxBufSize+1]
received data buffer
Definition: wattcp.h:616
DWORD safetytcp
extra magic marker
Definition: wattcp.h:685
DWORD vj_sa
VJ's alg, standard average (SRTT)
Definition: wattcp.h:643
ip6_address my6addr
our IPv6 address
Definition: wattcp.h:619
DWORD ts_sent
last TimeStamp value sent
Definition: wattcp.h:654
unsigned long long uint64
our unsigned "long long" type
Definition: wattcp.h:60
char * secret
< linked-list of frags; not yet
Definition: wattcp.h:669
BYTE tx_buf[tcp_MaxTxBufSize+1]
data for transmission
Definition: wattcp.h:683
Definition: ip.h:67
DWORD safetysig
magic marker
Definition: wattcp.h:604
BYTE hwAddrLen
MAC addr.
Definition: wattcp.h:511
BYTE unhappy
flag, indicates retransmitting segt's
Definition: wattcp.h:632
BYTE rx_data[MAX_FRAG_SIZE]
room for 1 jumbo IP packet
Definition: wattcp.h:699
DWORD safetysig
magic marker
Definition: wattcp.h:684
UINT window
other guy's window
Definition: wattcp.h:636
DWORD missed_seq[2]
S.
Definition: wattcp.h:665
UINT tx_queuelen
optional Tx queue length
Definition: wattcp.h:677
UINT adv_win
our last advertised window
Definition: wattcp.h:637
long long int64
our signed "long long" type
Definition: wattcp.h:61
DWORD datatimer
inactive timer (no Tx data)
Definition: wattcp.h:672
BYTE tx_wscale
Definition: wattcp.h:675
DWORD seq_num
counter for finding oldest pkt
Definition: wattcp.h:697
UINT max_seg
MSS for this connection.
Definition: wattcp.h:658
ip6_address his6addr
peer's ip-6 address
Definition: wattcp.h:602
DWORD last_seqnum[2]
increments
Definition: wattcp.h:629
DWORD last_acknum[2]
for pcdbug.c; to follow SEQ/ACK
Definition: wattcp.h:628
BYTE protoAddrLen
IP addr.
Definition: wattcp.h:512
DWORD recv_next
SEQ number we expect to receive.
Definition: wattcp.h:623
DWORD ts_recent
last TimeStamp value received
Definition: wattcp.h:655
DWORD send_next
SEQ we send but not ACK-ed by peer.
Definition: wattcp.h:624
DWORD timeout
timer for retrans etc.
Definition: wattcp.h:631
struct tcp_Socket * next
link to next tcp-socket
Definition: wattcp.h:613
UINT state
tcp connection state
Definition: wattcp.h:622