1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 #ifndef _INC_TCPESTATS
7 #define _INC_TCPESTATS
8 
9 #if (_WIN32_WINNT >= 0x0600)
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct _TCP_ESTATS_BANDWIDTH_ROD_v0 {
16   ULONG64 OutboundBandwidth;
17   ULONG64 InboundBandwidth;
18   ULONG64 OutboundInstability;
19   ULONG64 InboundInstability;
20   BOOLEAN OutboundBandwidthPeaked;
21   BOOLEAN InboundBandwidthPeaked;
22 } TCP_ESTATS_BANDWIDTH_ROD_v0, *PTCP_ESTATS_BANDWIDTH_ROD_v0;
23 
24 typedef enum _TCP_BOOLEAN_OPTIONAL {
25   TcpBoolOptDisabled    = 0,
26   TcpBoolOptEnabled     = 1,
27   TcpBoolOptUnchanged   = -1
28 } TCP_BOOLEAN_OPTIONAL;
29 
30 typedef struct _TCP_ESTATS_BANDWIDTH_RW_v0 {
31   TCP_BOOLEAN_OPTIONAL EnableCollectionOutbound;
32   TCP_BOOLEAN_OPTIONAL EnableCollectionInbound;
33 } TCP_ESTATS_BANDWIDTH_RW_v0, *PTCP_ESTATS_BANDWIDTH_RW_v0;
34 
35 typedef struct _TCP_ESTATS_DATA_ROD_v0 {
36   ULONG64 DataBytesOut;
37   ULONG64 DataSegsOut;
38   ULONG64 DataBytesIn;
39   ULONG64 DataSegsIn;
40   ULONG64 SegsOut;
41   ULONG64 SegsIn;
42   ULONG   SoftErrors;
43   ULONG   SoftErrorReason;
44   ULONG   SndUna;
45   ULONG   SndNxt;
46   ULONG   SndMax;
47   ULONG64 ThruBytesAcked;
48   ULONG   RcvNxt;
49   ULONG64 ThruBytesReceived;
50 } TCP_ESTATS_DATA_ROD_v0, *PTCP_ESTATS_DATA_ROD_v0;
51 
52 typedef struct _TCP_ESTATS_DATA_RW_v0 {
53   BOOLEAN EnableCollection;
54 } TCP_ESTATS_DATA_RW_v0, *PTCP_ESTATS_DATA_RW_v0;
55 
56 typedef struct _TCP_ESTATS_FINE_RTT_ROD_v0 {
57   ULONG RttVar;
58   ULONG MaxRtt;
59   ULONG MinRtt;
60   ULONG SumRtt;
61 } TCP_ESTATS_FINE_RTT_ROD_v0, *PTCP_ESTATS_FINE_RTT_ROD_v0;
62 
63 typedef struct _TCP_ESTATS_FINE_RTT_RW_v0 {
64   BOOLEAN EnableCollection;
65 } TCP_ESTATS_FINE_RTT_RW_v0, *PTCP_ESTATS_FINE_RTT_RW_v0;
66 
67 typedef struct _TCP_ESTATS_OBS_REC_ROD_v0 {
68   ULONG CurRwinRcvd;
69   ULONG MaxRwinRcvd;
70   ULONG MinRwinRcvd;
71   UCHAR WinScaleRcvd;
72 } TCP_ESTATS_OBS_REC_ROD_v0, *PTCP_ESTATS_OBS_REC_ROD_v0;
73 
74 typedef struct _TCP_ESTATS_OBS_REC_RW_v0 {
75   BOOLEAN EnableCollection;
76 } TCP_ESTATS_OBS_REC_RW_v0, *PTCP_ESTATS_OBS_REC_RW_v0;
77 
78 typedef struct _TCP_ESTATS_PATH_ROD_v0 {
79   ULONG FastRetran;
80   ULONG Timeouts;
81   ULONG SubsequentTimeouts;
82   ULONG CurTimeoutCount;
83   ULONG AbruptTimeouts;
84   ULONG PktsRetrans;
85   ULONG BytesRetrans;
86   ULONG DupAcksIn;
87   ULONG SacksRcvd;
88   ULONG SackBlocksRcvd;
89   ULONG CongSignals;
90   ULONG PreCongSumCwnd;
91   ULONG PreCongSumRtt;
92   ULONG PostCongSumRtt;
93   ULONG PostCongCountRtt;
94   ULONG EcnSignals;
95   ULONG EceRcvd;
96   ULONG SendStall;
97   ULONG QuenchRcvd;
98   ULONG RetranThresh;
99   ULONG SndDupAckEpisodes;
100   ULONG SumBytesReordered;
101   ULONG NonRecovDa;
102   ULONG NonRecovDaEpisodes;
103   ULONG AckAfterFr;
104   ULONG DsackDups;
105   ULONG SampleRtt;
106   ULONG SmoothedRtt;
107   ULONG RttVar;
108   ULONG MaxRtt;
109   ULONG MinRtt;
110   ULONG SumRtt;
111   ULONG CountRtt;
112   ULONG CurRto;
113   ULONG MaxRto;
114   ULONG MinRto;
115   ULONG CurMss;
116   ULONG MaxMss;
117   ULONG MinMss;
118   ULONG SpuriousRtoDetections;
119 } TCP_ESTATS_PATH_ROD_v0, *PTCP_ESTATS_PATH_ROD_v0;
120 
121 typedef struct _TCP_ESTATS_PATH_RW_v0 {
122   BOOLEAN EnableCollection;
123 } TCP_ESTATS_PATH_RW_v0, *PTCP_ESTATS_PATH_RW_v0;
124 
125 typedef struct _TCP_ESTATS_REC_ROD_v0 {
126   ULONG  CurRwinSent;
127   ULONG  MaxRwinSent;
128   ULONG  MinRwinSent;
129   ULONG  LimRwin;
130   ULONG  DupAckEpisodes;
131   ULONG  DupAcksOut;
132   ULONG  CeRcvd;
133   ULONG  EcnSent;
134   ULONG  EcnNoncesRcvd;
135   ULONG  CurReasmQueue;
136   ULONG  MaxReasmQueue;
137   SIZE_T CurAppRQueue;
138   SIZE_T MaxAppRQueue;
139   UCHAR  WinScaleSent;
140 } TCP_ESTATS_REC_ROD_v0, *PTCP_ESTATS_REC_ROD_v0;
141 
142 typedef struct _TCP_ESTATS_REC_RW_v0 {
143   BOOLEAN EnableCollection;
144 } TCP_ESTATS_REC_RW_v0, *PTCP_ESTATS_REC_RW_v0;
145 
146 typedef struct _TCP_ESTATS_SEND_BUFF_ROD_v0 {
147   SIZE_T CurRetxQueue;
148   SIZE_T MaxRetxQueue;
149   SIZE_T CurAppWQueue;
150   SIZE_T MaxAppWQueue;
151 } TCP_ESTATS_SEND_BUFF_ROD_v0, *PTCP_ESTATS_SEND_BUFF_ROD_v0;
152 
153 typedef struct _TCP_ESTATS_SEND_BUFF_RW_v0 {
154   BOOLEAN EnableCollection;
155 } TCP_ESTATS_SEND_BUFF_RW_v0, *PTCP_ESTATS_SEND_BUFF_RW_v0;
156 
157 typedef struct _TCP_ESTATS_SND_CONG_ROD_v0 {
158   ULONG  SndLimTransRwin;
159   ULONG  SndLimTimeRwin;
160   SIZE_T SndLimBytesRwin;
161   ULONG  SndLimTransCwnd;
162   ULONG  SndLimTimeCwnd;
163   SIZE_T SndLimBytesCwnd;
164   ULONG  SndLimTransSnd;
165   ULONG  SndLimTimeSnd;
166   SIZE_T SndLimBytesSnd;
167   ULONG  SlowStart;
168   ULONG  CongAvoid;
169   ULONG  OtherReductions;
170   ULONG  CurCwnd;
171   ULONG  MaxSsCwnd;
172   ULONG  MaxCaCwnd;
173   ULONG  CurSsthresh;
174   ULONG  MaxSsthresh;
175   ULONG  MinSsthresh;
176 } TCP_ESTATS_SND_CONG_ROD_v0, *PTCP_ESTATS_SND_CONG_ROD_v0;
177 
178 typedef struct _TCP_ESTATS_SND_CONG_ROS_v0 {
179   ULONG LimCwnd;
180 } TCP_ESTATS_SND_CONG_ROS_v0, *PTCP_ESTATS_SND_CONG_ROS_v0;
181 
182 typedef struct _TCP_ESTATS_SND_CONG_RW_v0 {
183   BOOLEAN EnableCollection;
184 } TCP_ESTATS_SND_CONG_RW_v0, *PTCP_ESTATS_SND_CONG_RW_v0;
185 
186 typedef struct _TCP_ESTATS_SYN_OPTS_ROS_v0 {
187   BOOLEAN ActiveOpen;
188   ULONG   MssRcvd;
189   ULONG   MssSent;
190 } TCP_ESTATS_SYN_OPTS_ROS_v0, *PTCP_ESTATS_SYN_OPTS_ROS_v0;
191 
192 typedef enum _TCP_ESTATS_TYPE {
193   TcpConnectionEstatsSynOpts,
194   TcpConnectionEstatsData,
195   TcpConnectionEstatsSndCong,
196   TcpConnectionEstatsPath,
197   TcpConnectionEstatsSendBuff,
198   TcpConnectionEstatsRec,
199   TcpConnectionEstatsObsRec,
200   TcpConnectionEstatsBandwidth,
201   TcpConnectionEstatsFineRtt,
202   TcpConnectionEstatsMaximum
203 } TCP_ESTATS_TYPE;
204 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 #endif /*(_WIN32_WINNT >= 0x0600)*/
210 
211 #endif /*_INC_TCPESTATS*/
212 
213