projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug: don't soisdisconnected on datagram sockets, want to reconnect
[unix-history]
/
usr
/
src
/
sys
/
netinet
/
tcp.h
diff --git
a/usr/src/sys/netinet/tcp.h
b/usr/src/sys/netinet/tcp.h
index
4432b03
..
53731c8
100644
(file)
--- a/
usr/src/sys/netinet/tcp.h
+++ b/
usr/src/sys/netinet/tcp.h
@@
-1,4
+1,10
@@
-/* tcp.h 1.21 82/01/18 */
+/*
+ * Copyright (c) 1982 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ * @(#)tcp.h 6.5 (Berkeley) %G%
+ */
typedef u_long tcp_seq;
/*
typedef u_long tcp_seq;
/*
@@
-10,9
+16,10
@@
struct tcphdr {
u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
- u_char
-
th_x2:4, /* (unused) */
+#ifdef vax
+
u_char
th_x2:4, /* (unused) */
th_off:4; /* data offset */
th_off:4; /* data offset */
+#endif
u_char th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02
u_char th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02
@@
-29,15
+36,19
@@
struct tcphdr {
#define TCPOPT_NOP 1
#define TCPOPT_MAXSEG 2
#define TCPOPT_NOP 1
#define TCPOPT_MAXSEG 2
-#ifdef TCPTRUEOOB
/*
/*
- * True out-of-band as value added option.
- * Advertise willingness with TCPOPT_WILOOB in
- * initial segment. If peer is willing, will receive
- * such also. Then can send TCPOPT_OOBDATA whenever oob data
- * exists; peer should ack with TCPOPT_OOBACK in segment.
+ * Default maximum segment size for TCP.
+ * With an IP MSS of 576, this is 536,
+ * but 512 is probably more convenient.
*/
*/
-#define TCPOPT_WILLOOB 64 /* bytes: 64, 2 */
-#define TCPOPT_OOBDATA 65 /* bytes: 65, 8, seq#, data, markseq */
-#define TCPOPT_OOBACK 66 /* bytes: 66, 3, ack# */
+#ifdef lint
+#define TCP_MSS 536
+#else
+#define TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr))
#endif
#endif
+
+/*
+ * User-settable options (used with setsockopt).
+ */
+#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
+#define TCP_MAXSEG 0x02 /* set maximum segment size */