Update contrib.
3 * Portions Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
13 * Copyright (c) 1982, 1986 Regents of the University of California.
14 * All rights reserved. The Berkeley software License Agreement
15 * specifies the terms and conditions for redistribution.
18 #ifndef _NETINET_TCP_H
19 #define _NETINET_TCP_H
25 typedef u_long tcp_seq;
28 Per RFC 793, September, 1981.
32 u_short th_sport; /* source port */
33 u_short th_dport; /* destination port */
34 tcp_seq th_seq; /* sequence number */
35 tcp_seq th_ack; /* acknowledgement number */
36 #ifdef _BIT_FIELDS_LTOH
37 u_int th_x2:4, /* (unused) */
38 th_off:4; /* data offset */
40 u_int th_off:4, /* data offset */
41 th_x2:4; /* (unused) */
68 u_short th_win; /* window */
69 u_short th_sum; /* checksum */
70 u_short th_urp; /* urgent pointer */
75 #define TCPOPT_MAXSEG 2
78 Default maximum segment size for TCP.
79 With an IP MSS of 576, this is 536,
80 but 512 is probably more convenient.
85 #define TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr))
89 User-settable options (used with setsockopt).
91 #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
92 #define TCP_MAXSEG 0x02 /* set maximum segment size */
94 #define TCP_NOTIFY_THRESHOLD 0x10
95 #define TCP_ABORT_THRESHOLD 0x11
96 #define TCP_CONN_NOTIFY_THRESHOLD 0x12
97 #define TCP_CONN_ABORT_THRESHOLD 0x13
104 #endif /* _NETINET_TCP_H */