Root/
Source at commit 1083 created 13 years 1 month ago. By meklort, add GetDriveInfo | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2000-2008 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. The rights granted to you under the License␊ |
10 | * may not be used to create, or enable the creation or redistribution of,␊ |
11 | * unlawful or unlicensed copies of an Apple operating system, or to␊ |
12 | * circumvent, violate, or enable the circumvention or violation of, any␊ |
13 | * terms of an Apple operating system software license agreement.␊ |
14 | * ␊ |
15 | * Please obtain a copy of the License at␊ |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.␊ |
17 | * ␊ |
18 | * The Original Code and all software distributed under the License are␊ |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
23 | * Please see the License for the specific language governing rights and␊ |
24 | * limitations under the License.␊ |
25 | * ␊ |
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@␊ |
27 | */␊ |
28 | /*␊ |
29 | * Copyright (c) 1982, 1986, 1993, 1994, 1995␊ |
30 | *␉The Regents of the University of California. All rights reserved.␊ |
31 | *␊ |
32 | * Redistribution and use in source and binary forms, with or without␊ |
33 | * modification, are permitted provided that the following conditions␊ |
34 | * are met:␊ |
35 | * 1. Redistributions of source code must retain the above copyright␊ |
36 | * notice, this list of conditions and the following disclaimer.␊ |
37 | * 2. Redistributions in binary form must reproduce the above copyright␊ |
38 | * notice, this list of conditions and the following disclaimer in the␊ |
39 | * documentation and/or other materials provided with the distribution.␊ |
40 | * 3. All advertising materials mentioning features or use of this software␊ |
41 | * must display the following acknowledgement:␊ |
42 | *␉This product includes software developed by the University of␊ |
43 | *␉California, Berkeley and its contributors.␊ |
44 | * 4. Neither the name of the University nor the names of its contributors␊ |
45 | * may be used to endorse or promote products derived from this software␊ |
46 | * without specific prior written permission.␊ |
47 | *␊ |
48 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND␊ |
49 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE␊ |
50 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE␊ |
51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE␊ |
52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL␊ |
53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS␊ |
54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)␊ |
55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT␊ |
56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY␊ |
57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF␊ |
58 | * SUCH DAMAGE.␊ |
59 | *␊ |
60 | *␉@(#)tcp_var.h␉8.4 (Berkeley) 5/24/95␊ |
61 | * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.56.2.8 2001/08/22 00:59:13 silby Exp $␊ |
62 | */␊ |
63 | ␊ |
64 | #ifndef _NETINET_TCP_VAR_H_␊ |
65 | #define _NETINET_TCP_VAR_H_␊ |
66 | #include <sys/appleapiopts.h>␊ |
67 | #include <sys/queue.h>␊ |
68 | #include <netinet/in_pcb.h>␊ |
69 | #include <netinet/tcp_timer.h>␊ |
70 | ␊ |
71 | #if defined(__LP64__)␊ |
72 | #define _TCPCB_PTR(x)␉␉␉u_int32_t␊ |
73 | #define _TCPCB_LIST_HEAD(name, type)␉\␊ |
74 | struct name {␉␉␉␉\␊ |
75 | ␉u_int32_t␉lh_first;␉\␊ |
76 | };␊ |
77 | #else␊ |
78 | #define _TCPCB_PTR(x)␉␉␉x␊ |
79 | #define _TCPCB_LIST_HEAD(name, type)␉LIST_HEAD(name, type)␊ |
80 | #endif␊ |
81 | ␊ |
82 | #define TCP_RETRANSHZ␉ 10␉␉/* tcp retrans timer (100ms) per hz */␉␉␊ |
83 | ␊ |
84 | struct tseg_qent;␊ |
85 | _TCPCB_LIST_HEAD(tsegqe_head, tseg_qent);␊ |
86 | ␊ |
87 | struct tcpcb {␊ |
88 | ␉struct␉tsegqe_head t_segq;␊ |
89 | ␉int␉t_dupacks;␉␉/* consecutive dup acks recd */␊ |
90 | ␉u_int32_t unused;␉␉/* unused now: was t_template */␊ |
91 | ␊ |
92 | ␉int␉t_timer[TCPT_NTIMERS];␉/* tcp timers */␊ |
93 | ␊ |
94 | ␉_TCPCB_PTR(struct inpcb *) t_inpcb;␉/* back pointer to internet pcb */␊ |
95 | ␉int␉t_state;␉␉/* state of this connection */␊ |
96 | ␉u_int␉t_flags;␊ |
97 | #define␉TF_ACKNOW␉0x00001␉␉/* ack peer immediately */␊ |
98 | #define␉TF_DELACK␉0x00002␉␉/* ack, but try to delay it */␊ |
99 | #define␉TF_NODELAY␉0x00004␉␉/* don't delay packets to coalesce */␊ |
100 | #define␉TF_NOOPT␉0x00008␉␉/* don't use tcp options */␊ |
101 | #define␉TF_SENTFIN␉0x00010␉␉/* have sent FIN */␊ |
102 | #define␉TF_REQ_SCALE␉0x00020␉␉/* have/will request window scaling */␊ |
103 | #define␉TF_RCVD_SCALE␉0x00040␉␉/* other side has requested scaling */␊ |
104 | #define␉TF_REQ_TSTMP␉0x00080␉␉/* have/will request timestamps */␊ |
105 | #define␉TF_RCVD_TSTMP␉0x00100␉␉/* a timestamp was received in SYN */␊ |
106 | #define␉TF_SACK_PERMIT␉0x00200␉␉/* other side said I could SACK */␊ |
107 | #define␉TF_NEEDSYN␉0x00400␉␉/* send SYN (implicit state) */␊ |
108 | #define␉TF_NEEDFIN␉0x00800␉␉/* send FIN (implicit state) */␊ |
109 | #define␉TF_NOPUSH␉0x01000␉␉/* don't push */␊ |
110 | #define␉TF_REQ_CC␉0x02000␉␉/* have/will request CC */␊ |
111 | #define␉TF_RCVD_CC␉0x04000␉␉/* a CC was received in SYN */␊ |
112 | #define␉TF_SENDCCNEW␉0x08000␉␉/* send CCnew instead of CC in SYN */␊ |
113 | #define␉TF_MORETOCOME␉0x10000␉␉/* More data to be appended to sock */␊ |
114 | #define␉TF_LQ_OVERFLOW␉0x20000␉␉/* listen queue overflow */␊ |
115 | #define␉TF_RXWIN0SENT␉0x40000␉␉/* sent a receiver win 0 in response */␊ |
116 | #define␉TF_SLOWLINK␉0x80000␉␉/* route is a on a modem speed link */␊ |
117 | ␊ |
118 | ␉int␉t_force;␉␉/* 1 if forcing out a byte */␊ |
119 | ␊ |
120 | ␉tcp_seq␉snd_una;␉␉/* send unacknowledged */␊ |
121 | ␉tcp_seq␉snd_max;␉␉/* highest sequence number sent;␊ |
122 | ␉␉␉␉␉ * used to recognize retransmits␊ |
123 | ␉␉␉␉␉ */␊ |
124 | ␉tcp_seq␉snd_nxt;␉␉/* send next */␊ |
125 | ␉tcp_seq␉snd_up;␉␉␉/* send urgent pointer */␊ |
126 | ␊ |
127 | ␉tcp_seq␉snd_wl1;␉␉/* window update seg seq number */␊ |
128 | ␉tcp_seq␉snd_wl2;␉␉/* window update seg ack number */␊ |
129 | ␉tcp_seq␉iss;␉␉␉/* initial send sequence number */␊ |
130 | ␉tcp_seq␉irs;␉␉␉/* initial receive sequence number */␊ |
131 | ␊ |
132 | ␉tcp_seq␉rcv_nxt;␉␉/* receive next */␊ |
133 | ␉tcp_seq␉rcv_adv;␉␉/* advertised window */␊ |
134 | ␉u_int32_t rcv_wnd;␉␉/* receive window */␊ |
135 | ␉tcp_seq␉rcv_up;␉␉␉/* receive urgent pointer */␊ |
136 | ␊ |
137 | ␉u_int32_t snd_wnd;␉␉/* send window */␊ |
138 | ␉u_int32_t snd_cwnd;␉␉/* congestion-controlled window */␊ |
139 | ␉u_int32_t snd_ssthresh;␉␉/* snd_cwnd size threshold for␊ |
140 | ␉␉␉␉␉ * for slow start exponential to␊ |
141 | ␉␉␉␉␉ * linear switch␊ |
142 | ␉␉␉␉␉ */␊ |
143 | ␉u_int␉t_maxopd;␉␉/* mss plus options */␊ |
144 | ␊ |
145 | ␉u_int32_t t_rcvtime;␉␉/* inactivity time */␊ |
146 | ␉u_int32_t t_starttime;␉␉/* time connection was established */␊ |
147 | ␉int␉t_rtttime;␉␉/* round trip time */␊ |
148 | ␉tcp_seq␉t_rtseq;␉␉/* sequence number being timed */␊ |
149 | ␊ |
150 | ␉int␉t_rxtcur;␉␉/* current retransmit value (ticks) */␊ |
151 | ␉u_int␉t_maxseg;␉␉/* maximum segment size */␊ |
152 | ␉int␉t_srtt;␉␉␉/* smoothed round-trip time */␊ |
153 | ␉int␉t_rttvar;␉␉/* variance in round-trip time */␊ |
154 | ␊ |
155 | ␉int␉t_rxtshift;␉␉/* log(2) of rexmt exp. backoff */␊ |
156 | ␉u_int␉t_rttmin;␉␉/* minimum rtt allowed */␊ |
157 | ␉u_int32_t t_rttupdated;␉␉/* number of times rtt sampled */␊ |
158 | ␉u_int32_t max_sndwnd;␉␉/* largest window peer has offered */␊ |
159 | ␊ |
160 | ␉int␉t_softerror;␉␉/* possible error not yet reported */␊ |
161 | /* out-of-band data */␊ |
162 | ␉char␉t_oobflags;␉␉/* have some */␊ |
163 | ␉char␉t_iobc;␉␉␉/* input character */␊ |
164 | #define␉TCPOOB_HAVEDATA␉0x01␊ |
165 | #define␉TCPOOB_HADDATA␉0x02␊ |
166 | /* RFC 1323 variables */␊ |
167 | ␉u_char␉snd_scale;␉␉/* window scaling for send window */␊ |
168 | ␉u_char␉rcv_scale;␉␉/* window scaling for recv window */␊ |
169 | ␉u_char␉request_r_scale;␉/* pending window scaling */␊ |
170 | ␉u_char␉requested_s_scale;␊ |
171 | ␉u_int32_t ts_recent;␉␉/* timestamp echo data */␊ |
172 | ␊ |
173 | ␉u_int32_t ts_recent_age;␉/* when last updated */␊ |
174 | ␉tcp_seq␉last_ack_sent;␊ |
175 | /* RFC 1644 variables */␊ |
176 | ␉tcp_cc␉cc_send;␉␉/* send connection count */␊ |
177 | ␉tcp_cc␉cc_recv;␉␉/* receive connection count */␊ |
178 | ␉tcp_seq␉snd_recover;␉␉/* for use in fast recovery */␊ |
179 | /* experimental */␊ |
180 | ␉u_int32_t snd_cwnd_prev;␉/* cwnd prior to retransmit */␊ |
181 | ␉u_int32_t snd_ssthresh_prev;␉/* ssthresh prior to retransmit */␊ |
182 | ␉u_int32_t t_badrxtwin;␉␉/* window for retransmit recovery */␊ |
183 | };␊ |
184 | ␊ |
185 | ␊ |
186 | /*␊ |
187 | * TCP statistics.␊ |
188 | * Many of these should be kept per connection,␊ |
189 | * but that's inconvenient at the moment.␊ |
190 | */␊ |
191 | struct␉tcpstat {␊ |
192 | ␉u_int32_t␉tcps_connattempt;␉/* connections initiated */␊ |
193 | ␉u_int32_t␉tcps_accepts;␉␉/* connections accepted */␊ |
194 | ␉u_int32_t␉tcps_connects;␉␉/* connections established */␊ |
195 | ␉u_int32_t␉tcps_drops;␉␉/* connections dropped */␊ |
196 | ␉u_int32_t␉tcps_conndrops;␉␉/* embryonic connections dropped */␊ |
197 | ␉u_int32_t␉tcps_closed;␉␉/* conn. closed (includes drops) */␊ |
198 | ␉u_int32_t␉tcps_segstimed;␉␉/* segs where we tried to get rtt */␊ |
199 | ␉u_int32_t␉tcps_rttupdated;␉/* times we succeeded */␊ |
200 | ␉u_int32_t␉tcps_delack;␉␉/* delayed acks sent */␊ |
201 | ␉u_int32_t␉tcps_timeoutdrop;␉/* conn. dropped in rxmt timeout */␊ |
202 | ␉u_int32_t␉tcps_rexmttimeo;␉/* retransmit timeouts */␊ |
203 | ␉u_int32_t␉tcps_persisttimeo;␉/* persist timeouts */␊ |
204 | ␉u_int32_t␉tcps_keeptimeo;␉␉/* keepalive timeouts */␊ |
205 | ␉u_int32_t␉tcps_keepprobe;␉␉/* keepalive probes sent */␊ |
206 | ␉u_int32_t␉tcps_keepdrops;␉␉/* connections dropped in keepalive */␊ |
207 | ␊ |
208 | ␉u_int32_t␉tcps_sndtotal;␉␉/* total packets sent */␊ |
209 | ␉u_int32_t␉tcps_sndpack;␉␉/* data packets sent */␊ |
210 | ␉u_int32_t␉tcps_sndbyte;␉␉/* data bytes sent */␊ |
211 | ␉u_int32_t␉tcps_sndrexmitpack;␉/* data packets retransmitted */␊ |
212 | ␉u_int32_t␉tcps_sndrexmitbyte;␉/* data bytes retransmitted */␊ |
213 | ␉u_int32_t␉tcps_sndacks;␉␉/* ack-only packets sent */␊ |
214 | ␉u_int32_t␉tcps_sndprobe;␉␉/* window probes sent */␊ |
215 | ␉u_int32_t␉tcps_sndurg;␉␉/* packets sent with URG only */␊ |
216 | ␉u_int32_t␉tcps_sndwinup;␉␉/* window update-only packets sent */␊ |
217 | ␉u_int32_t␉tcps_sndctrl;␉␉/* control (SYN|FIN|RST) packets sent */␊ |
218 | ␊ |
219 | ␉u_int32_t␉tcps_rcvtotal;␉␉/* total packets received */␊ |
220 | ␉u_int32_t␉tcps_rcvpack;␉␉/* packets received in sequence */␊ |
221 | ␉u_int32_t␉tcps_rcvbyte;␉␉/* bytes received in sequence */␊ |
222 | ␉u_int32_t␉tcps_rcvbadsum;␉␉/* packets received with ccksum errs */␊ |
223 | ␉u_int32_t␉tcps_rcvbadoff;␉␉/* packets received with bad offset */␊ |
224 | ␉u_int32_t␉tcps_rcvmemdrop;␉/* packets dropped for lack of memory */␊ |
225 | ␉u_int32_t␉tcps_rcvshort;␉␉/* packets received too short */␊ |
226 | ␉u_int32_t␉tcps_rcvduppack;␉/* duplicate-only packets received */␊ |
227 | ␉u_int32_t␉tcps_rcvdupbyte;␉/* duplicate-only bytes received */␊ |
228 | ␉u_int32_t␉tcps_rcvpartduppack;␉/* packets with some duplicate data */␊ |
229 | ␉u_int32_t␉tcps_rcvpartdupbyte;␉/* dup. bytes in part-dup. packets */␊ |
230 | ␉u_int32_t␉tcps_rcvoopack;␉␉/* out-of-order packets received */␊ |
231 | ␉u_int32_t␉tcps_rcvoobyte;␉␉/* out-of-order bytes received */␊ |
232 | ␉u_int32_t␉tcps_rcvpackafterwin;␉/* packets with data after window */␊ |
233 | ␉u_int32_t␉tcps_rcvbyteafterwin;␉/* bytes rcvd after window */␊ |
234 | ␉u_int32_t␉tcps_rcvafterclose;␉/* packets rcvd after "close" */␊ |
235 | ␉u_int32_t␉tcps_rcvwinprobe;␉/* rcvd window probe packets */␊ |
236 | ␉u_int32_t␉tcps_rcvdupack;␉␉/* rcvd duplicate acks */␊ |
237 | ␉u_int32_t␉tcps_rcvacktoomuch;␉/* rcvd acks for unsent data */␊ |
238 | ␉u_int32_t␉tcps_rcvackpack;␉/* rcvd ack packets */␊ |
239 | ␉u_int32_t␉tcps_rcvackbyte;␉/* bytes acked by rcvd acks */␊ |
240 | ␉u_int32_t␉tcps_rcvwinupd;␉␉/* rcvd window update packets */␊ |
241 | ␉u_int32_t␉tcps_pawsdrop;␉␉/* segments dropped due to PAWS */␊ |
242 | ␉u_int32_t␉tcps_predack;␉␉/* times hdr predict ok for acks */␊ |
243 | ␉u_int32_t␉tcps_preddat;␉␉/* times hdr predict ok for data pkts */␊ |
244 | ␉u_int32_t␉tcps_pcbcachemiss;␊ |
245 | ␉u_int32_t␉tcps_cachedrtt;␉␉/* times cached RTT in route updated */␊ |
246 | ␉u_int32_t␉tcps_cachedrttvar;␉/* times cached rttvar updated */␊ |
247 | ␉u_int32_t␉tcps_cachedssthresh;␉/* times cached ssthresh updated */␊ |
248 | ␉u_int32_t␉tcps_usedrtt;␉␉/* times RTT initialized from route */␊ |
249 | ␉u_int32_t␉tcps_usedrttvar;␉/* times RTTVAR initialized from rt */␊ |
250 | ␉u_int32_t␉tcps_usedssthresh;␉/* times ssthresh initialized from rt*/␊ |
251 | ␉u_int32_t␉tcps_persistdrop;␉/* timeout in persist state */␊ |
252 | ␉u_int32_t␉tcps_badsyn;␉␉/* bogus SYN, e.g. premature ACK */␊ |
253 | ␉u_int32_t␉tcps_mturesent;␉␉/* resends due to MTU discovery */␊ |
254 | ␉u_int32_t␉tcps_listendrop;␉/* listen queue overflows */␊ |
255 | ␊ |
256 | ␉/* new stats from FreeBSD 5.4 sync up */␊ |
257 | ␉u_int32_t␉tcps_minmssdrops;␉/* average minmss too low drops */␊ |
258 | ␉u_int32_t␉tcps_sndrexmitbad;␉/* unnecessary packet retransmissions */␊ |
259 | ␉u_int32_t␉tcps_badrst;␉␉/* ignored RSTs in the window */␊ |
260 | ␊ |
261 | ␉u_int32_t␉tcps_sc_added;␉␉/* entry added to syncache */␊ |
262 | ␉u_int32_t␉tcps_sc_retransmitted;␉/* syncache entry was retransmitted */␊ |
263 | ␉u_int32_t␉tcps_sc_dupsyn;␉␉/* duplicate SYN packet */␊ |
264 | ␉u_int32_t␉tcps_sc_dropped;␉/* could not reply to packet */␊ |
265 | ␉u_int32_t␉tcps_sc_completed;␉/* successful extraction of entry */␊ |
266 | ␉u_int32_t␉tcps_sc_bucketoverflow;␉/* syncache per-bucket limit hit */␊ |
267 | ␉u_int32_t␉tcps_sc_cacheoverflow;␉/* syncache cache limit hit */␊ |
268 | ␉u_int32_t␉tcps_sc_reset;␉␉/* RST removed entry from syncache */␊ |
269 | ␉u_int32_t␉tcps_sc_stale;␉␉/* timed out or listen socket gone */␊ |
270 | ␉u_int32_t␉tcps_sc_aborted;␉/* syncache entry aborted */␊ |
271 | ␉u_int32_t␉tcps_sc_badack;␉␉/* removed due to bad ACK */␊ |
272 | ␉u_int32_t␉tcps_sc_unreach;␉/* ICMP unreachable received */␊ |
273 | ␉u_int32_t␉tcps_sc_zonefail;␉/* zalloc() failed */␊ |
274 | ␉u_int32_t␉tcps_sc_sendcookie;␉/* SYN cookie sent */␊ |
275 | ␉u_int32_t␉tcps_sc_recvcookie;␉/* SYN cookie received */␊ |
276 | ␊ |
277 | ␉u_int32_t␉tcps_hc_added;␉␉/* entry added to hostcache */␊ |
278 | ␉u_int32_t␉tcps_hc_bucketoverflow;␉/* hostcache per bucket limit hit */␊ |
279 | ␊ |
280 | ␉/* SACK related stats */␊ |
281 | ␉u_int32_t␉tcps_sack_recovery_episode; /* SACK recovery episodes */␊ |
282 | ␉u_int32_t tcps_sack_rexmits;␉ /* SACK rexmit segments */␊ |
283 | ␉u_int32_t tcps_sack_rexmit_bytes;␉ /* SACK rexmit bytes */␊ |
284 | ␉u_int32_t tcps_sack_rcv_blocks;␉ /* SACK blocks (options) received */␊ |
285 | ␉u_int32_t tcps_sack_send_blocks;␉ /* SACK blocks (options) sent */␊ |
286 | ␉u_int32_t tcps_sack_sboverflow;␉ /* SACK sendblock overflow */␊ |
287 | ␊ |
288 | #if TRAFFIC_MGT␊ |
289 | ␉u_int32_t␉tcps_bg_rcvtotal;␉/* total background packets received */␊ |
290 | #endif /* TRAFFIC_MGT */␊ |
291 | };␊ |
292 | ␊ |
293 | #pragma pack(4)␊ |
294 | ␊ |
295 | /*␊ |
296 | * TCB structure exported to user-land via sysctl(3).␊ |
297 | * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been␊ |
298 | * included. Not all of our clients do.␊ |
299 | */␊ |
300 | ␊ |
301 | struct xtcpcb {␊ |
302 | u_int32_t xt_len;␊ |
303 | struct inpcb xt_inp;␊ |
304 | struct tcpcb xt_tp;␊ |
305 | struct xsocket xt_socket;␊ |
306 | u_quad_t xt_alignment_hack;␊ |
307 | };␊ |
308 | ␊ |
309 | #if !CONFIG_EMBEDDED␊ |
310 | ␊ |
311 | struct xtcpcb64 {␊ |
312 | u_int32_t ␉␉xt_len;␊ |
313 | struct xinpcb64␉␉xt_inpcb;␊ |
314 | ␊ |
315 | u_int64_t t_segq;␊ |
316 | int t_dupacks; /* consecutive dup acks recd */␊ |
317 | ␊ |
318 | int t_timer[TCPT_NTIMERS]; /* tcp timers */␊ |
319 | ␊ |
320 | int t_state; /* state of this connection */␊ |
321 | u_int t_flags;␊ |
322 | ␊ |
323 | int t_force; /* 1 if forcing out a byte */␊ |
324 | ␊ |
325 | tcp_seq snd_una; /* send unacknowledged */␊ |
326 | tcp_seq snd_max; /* highest sequence number sent;␊ |
327 | * used to recognize retransmits␊ |
328 | */␊ |
329 | tcp_seq snd_nxt; /* send next */␊ |
330 | tcp_seq snd_up; /* send urgent pointer */␊ |
331 | ␊ |
332 | tcp_seq snd_wl1; /* window update seg seq number */␊ |
333 | tcp_seq snd_wl2; /* window update seg ack number */␊ |
334 | tcp_seq iss; /* initial send sequence number */␊ |
335 | tcp_seq irs; /* initial receive sequence number */␊ |
336 | ␊ |
337 | tcp_seq rcv_nxt; /* receive next */␊ |
338 | tcp_seq rcv_adv; /* advertised window */␊ |
339 | u_int32_t rcv_wnd; /* receive window */␊ |
340 | tcp_seq rcv_up; /* receive urgent pointer */␊ |
341 | ␊ |
342 | u_int32_t snd_wnd; /* send window */␊ |
343 | u_int32_t snd_cwnd; /* congestion-controlled window */␊ |
344 | u_int32_t snd_ssthresh; /* snd_cwnd size threshold for␊ |
345 | * for slow start exponential to␊ |
346 | * linear switch␊ |
347 | */␊ |
348 | u_int t_maxopd; /* mss plus options */␊ |
349 | ␊ |
350 | u_int32_t t_rcvtime; /* inactivity time */␊ |
351 | u_int32_t t_starttime; /* time connection was established */␊ |
352 | int t_rtttime; /* round trip time */␊ |
353 | tcp_seq t_rtseq; /* sequence number being timed */␊ |
354 | ␊ |
355 | int t_rxtcur; /* current retransmit value (ticks) */␊ |
356 | u_int t_maxseg; /* maximum segment size */␊ |
357 | int t_srtt; /* smoothed round-trip time */␊ |
358 | int t_rttvar; /* variance in round-trip time */␊ |
359 | ␊ |
360 | int t_rxtshift; /* log(2) of rexmt exp. backoff */␊ |
361 | u_int t_rttmin; /* minimum rtt allowed */␊ |
362 | u_int32_t t_rttupdated; /* number of times rtt sampled */␊ |
363 | u_int32_t max_sndwnd; /* largest window peer has offered */␊ |
364 | ␊ |
365 | int t_softerror; /* possible error not yet reported */␊ |
366 | /* out-of-band data */␊ |
367 | char t_oobflags; /* have some */␊ |
368 | char t_iobc; /* input character */␊ |
369 | /* RFC 1323 variables */␊ |
370 | u_char snd_scale; /* window scaling for send window */␊ |
371 | u_char rcv_scale; /* window scaling for recv window */␊ |
372 | u_char request_r_scale; /* pending window scaling */␊ |
373 | u_char requested_s_scale;␊ |
374 | u_int32_t ts_recent; /* timestamp echo data */␊ |
375 | ␊ |
376 | u_int32_t ts_recent_age; /* when last updated */␊ |
377 | tcp_seq last_ack_sent;␊ |
378 | /* RFC 1644 variables */␊ |
379 | tcp_cc cc_send; /* send connection count */␊ |
380 | tcp_cc cc_recv; /* receive connection count */␊ |
381 | tcp_seq snd_recover; /* for use in fast recovery */␊ |
382 | /* experimental */␊ |
383 | u_int32_t snd_cwnd_prev; /* cwnd prior to retransmit */␊ |
384 | u_int32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */␊ |
385 | u_int32_t t_badrxtwin; /* window for retransmit recovery */␊ |
386 | ␊ |
387 | u_quad_t␉␉xt_alignment_hack;␊ |
388 | };␊ |
389 | ␊ |
390 | #endif /* !CONFIG_EMBEDDED */␊ |
391 | ␊ |
392 | #pragma pack()␊ |
393 | ␊ |
394 | /*␊ |
395 | * Names for TCP sysctl objects␊ |
396 | */␊ |
397 | #define␉TCPCTL_DO_RFC1323␉1␉/* use RFC-1323 extensions */␊ |
398 | #define␉TCPCTL_DO_RFC1644␉2␉/* use RFC-1644 extensions */␊ |
399 | #define␉TCPCTL_MSSDFLT␉␉3␉/* MSS default */␊ |
400 | #define TCPCTL_STATS␉␉4␉/* statistics (read-only) */␊ |
401 | #define␉TCPCTL_RTTDFLT␉␉5␉/* default RTT estimate */␊ |
402 | #define␉TCPCTL_KEEPIDLE␉␉6␉/* keepalive idle timer */␊ |
403 | #define␉TCPCTL_KEEPINTVL␉7␉/* interval to send keepalives */␊ |
404 | #define␉TCPCTL_SENDSPACE␉8␉/* send buffer space */␊ |
405 | #define␉TCPCTL_RECVSPACE␉9␉/* receive buffer space */␊ |
406 | #define␉TCPCTL_KEEPINIT␉␉10␉/* timeout for establishing syn */␊ |
407 | #define␉TCPCTL_PCBLIST␉␉11␉/* list of all outstanding PCBs */␊ |
408 | #define␉TCPCTL_DELACKTIME␉12␉/* time before sending delayed ACK */␊ |
409 | #define␉TCPCTL_V6MSSDFLT␉13␉/* MSS default for IPv6 */␊ |
410 | #define␉TCPCTL_MAXID␉␉14␊ |
411 | ␊ |
412 | ␊ |
413 | #endif /* _NETINET_TCP_VAR_H_ */␊ |
414 |