Print this page
11554 Want TCP_CONGESTION socket option
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/netinet/tcp.h
+++ new/usr/src/uts/common/netinet/tcp.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
25 25 */
26 26
27 27 /*
28 28 * Copyright (c) 1982, 1986 Regents of the University of California.
29 29 * All rights reserved. The Berkeley software License Agreement
30 30 * specifies the terms and conditions for redistribution.
31 31 */
32 32
33 33 #ifndef _NETINET_TCP_H
34 34 #define _NETINET_TCP_H
35 35
36 36 /* tcp.h 1.11 88/08/19 SMI; from UCB 7.2 10/28/86 */
37 37
38 38
39 39 #include <sys/isa_defs.h>
40 40 #include <sys/inttypes.h>
41 41
42 42 #ifdef __cplusplus
43 43 extern "C" {
44 44 #endif
45 45
46 46 typedef uint32_t tcp_seq;
47 47 /*
48 48 * TCP header.
49 49 * Per RFC 793, September, 1981.
50 50 */
51 51 struct tcphdr {
52 52 uint16_t th_sport; /* source port */
53 53 uint16_t th_dport; /* destination port */
54 54 tcp_seq th_seq; /* sequence number */
55 55 tcp_seq th_ack; /* acknowledgement number */
56 56 #ifdef _BIT_FIELDS_LTOH
57 57 uint_t th_x2:4, /* (unused) */
58 58 th_off:4; /* data offset */
59 59 #else
60 60 uint_t th_off:4, /* data offset */
61 61 th_x2:4; /* (unused) */
62 62 #endif
63 63 uchar_t th_flags;
64 64 #define TH_FIN 0x01
65 65 #define TH_SYN 0x02
66 66 #define TH_RST 0x04
67 67 #define TH_PUSH 0x08
68 68 #define TH_ACK 0x10
69 69 #define TH_URG 0x20
70 70 #define TH_ECE 0x40
71 71 #define TH_CWR 0x80
72 72 uint16_t th_win; /* window */
73 73 uint16_t th_sum; /* checksum */
74 74 uint16_t th_urp; /* urgent pointer */
75 75 };
76 76
77 77 #define TCPOPT_EOL 0
78 78 #define TCPOPT_NOP 1
79 79 #define TCPOPT_MAXSEG 2
80 80 #define TCPOPT_WSCALE 3
81 81 #define TCPOPT_SACK_PERMITTED 4
82 82 #define TCPOPT_SACK 5
83 83 #define TCPOPT_TSTAMP 8
84 84
85 85 /*
86 86 * Default maximum segment size for TCP.
87 87 * With an IP MTU of 576, this is 536.
88 88 */
89 89 #define TCP_MSS 536
90 90
91 91 /*
92 92 * Options for use with [gs]etsockopt at the TCP level.
93 93 *
94 94 * Note: Some of the TCP_ namespace has conflict with and
95 95 * and is exposed through <xti.h>. (It also requires exposing
96 96 * options not implemented). The options with potential
97 97 * for conflicts use #ifndef guards.
98 98 */
99 99 #ifndef TCP_NODELAY
100 100 #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
101 101 #endif
102 102
103 103 #ifndef TCP_MAXSEG
104 104 #define TCP_MAXSEG 0x02 /* set maximum segment size */
105 105 #endif
106 106
107 107 #ifndef TCP_KEEPALIVE
108 108 #define TCP_KEEPALIVE 0x8 /* set keepalive timer */
109 109 #endif
110 110
111 111
112 112 #define TCP_NOTIFY_THRESHOLD 0x10
113 113 #define TCP_ABORT_THRESHOLD 0x11
114 114 #define TCP_CONN_NOTIFY_THRESHOLD 0x12
115 115 #define TCP_CONN_ABORT_THRESHOLD 0x13
116 116 #define TCP_RECVDSTADDR 0x14
117 117 #define TCP_INIT_CWND 0x15
118 118 #define TCP_KEEPALIVE_THRESHOLD 0x16
119 119 #define TCP_KEEPALIVE_ABORT_THRESHOLD 0x17
120 120 #define TCP_CORK 0x18
121 121 #define TCP_RTO_INITIAL 0x19
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
122 122 #define TCP_RTO_MIN 0x1A
123 123 #define TCP_RTO_MAX 0x1B
124 124 #define TCP_LINGER2 0x1C
125 125
126 126 /* gap for expansion of ``standard'' options */
127 127 #define TCP_ANONPRIVBIND 0x20 /* for internal use only */
128 128 #define TCP_EXCLBIND 0x21 /* for internal use only */
129 129 #define TCP_KEEPIDLE 0x22
130 130 #define TCP_KEEPCNT 0x23
131 131 #define TCP_KEEPINTVL 0x24
132 +#define TCP_CONGESTION 0x25
132 133
133 134 #ifdef __cplusplus
134 135 }
135 136 #endif
136 137
137 138 #endif /* _NETINET_TCP_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX