1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 // #include <winapifamily.h> 7 use shared::basetsd::{SIZE_T, ULONG64}; 8 use shared::ntdef::{BOOLEAN, UCHAR, ULONG}; 9 ENUM!{enum TCP_ESTATS_TYPE { 10 TcpConnectionEstatsSynOpts = 0, 11 TcpConnectionEstatsData = 1, 12 TcpConnectionEstatsSndCong = 2, 13 TcpConnectionEstatsPath = 3, 14 TcpConnectionEstatsSendBuff = 4, 15 TcpConnectionEstatsRec = 5, 16 TcpConnectionEstatsObsRec = 6, 17 TcpConnectionEstatsBandwidth = 7, 18 TcpConnectionEstatsFineRtt = 8, 19 TcpConnectionEstatsMaximum = 9, 20 }} 21 pub type PTCP_ESTATS_TYPE = *mut TCP_ESTATS_TYPE; 22 ENUM!{enum TCP_BOOLEAN_OPTIONAL { 23 TcpBoolOptDisabled = 0, 24 TcpBoolOptEnabled = 1, 25 TcpBoolOptUnchanged = -1i32 as u32, 26 }} 27 pub type PTCP_BOOLEAN_OPTIONAL = *mut TCP_BOOLEAN_OPTIONAL; 28 STRUCT!{struct TCP_ESTATS_SYN_OPTS_ROS_v0 { 29 ActiveOpen: BOOLEAN, 30 MssRcvd: ULONG, 31 MssSent: ULONG, 32 }} 33 pub type PTCP_ESTATS_SYN_OPTS_ROS_v0 = *mut TCP_ESTATS_SYN_OPTS_ROS_v0; 34 ENUM!{enum TCP_SOFT_ERROR { 35 TcpErrorNone = 0, 36 TcpErrorBelowDataWindow = 1, 37 TcpErrorAboveDataWindow = 2, 38 TcpErrorBelowAckWindow = 3, 39 TcpErrorAboveAckWindow = 4, 40 TcpErrorBelowTsWindow = 5, 41 TcpErrorAboveTsWindow = 6, 42 TcpErrorDataChecksumError = 7, 43 TcpErrorDataLengthError = 8, 44 TcpErrorMaxSoftError = 9, 45 }} 46 pub type PTCP_SOFT_ERROR = *mut TCP_SOFT_ERROR; 47 STRUCT!{struct TCP_ESTATS_DATA_ROD_v0 { 48 DataBytesOut: ULONG64, 49 DataSegsOut: ULONG64, 50 DataBytesIn: ULONG64, 51 DataSegsIn: ULONG64, 52 SegsOut: ULONG64, 53 SegsIn: ULONG64, 54 SoftErrors: ULONG, 55 SoftErrorReason: ULONG, 56 SndUna: ULONG, 57 SndNxt: ULONG, 58 SndMax: ULONG, 59 ThruBytesAcked: ULONG64, 60 RcvNxt: ULONG, 61 ThruBytesReceived: ULONG64, 62 }} 63 pub type PTCP_ESTATS_DATA_ROD_v0 = *mut TCP_ESTATS_DATA_ROD_v0; 64 STRUCT!{struct TCP_ESTATS_DATA_RW_v0 { 65 EnableCollection: BOOLEAN, 66 }} 67 pub type PTCP_ESTATS_DATA_RW_v0 = TCP_ESTATS_DATA_RW_v0; 68 STRUCT!{struct TCP_ESTATS_SND_CONG_ROD_v0 { 69 SndLimTransRwin: ULONG, 70 SndLimTimeRwin: ULONG, 71 SndLimBytesRwin: SIZE_T, 72 SndLimTransCwnd: ULONG, 73 SndLimTimeCwnd: ULONG, 74 SndLimBytesCwnd: SIZE_T, 75 SndLimTransSnd: ULONG, 76 SndLimTimeSnd: ULONG, 77 SndLimBytesSnd: SIZE_T, 78 SlowStart: ULONG, 79 CongAvoid: ULONG, 80 OtherReductions: ULONG, 81 CurCwnd: ULONG, 82 MaxSsCwnd: ULONG, 83 MaxCaCwnd: ULONG, 84 CurSsthresh: ULONG, 85 MaxSsthresh: ULONG, 86 MinSsthresh: ULONG, 87 }} 88 pub type PTCP_ESTATS_SND_CONG_ROD_v0 = *mut TCP_ESTATS_SND_CONG_ROD_v0; 89 STRUCT!{struct TCP_ESTATS_SND_CONG_ROS_v0 { 90 LimCwnd: ULONG, 91 }} 92 pub type PTCP_ESTATS_SND_CONG_ROS_v0 = *mut TCP_ESTATS_SND_CONG_ROS_v0; 93 STRUCT!{struct TCP_ESTATS_SND_CONG_RW_v0 { 94 EnableCollection: BOOLEAN, 95 }} 96 pub type PTCP_ESTATS_SND_CONG_RW_v0 = *mut TCP_ESTATS_SND_CONG_RW_v0; 97 STRUCT!{struct TCP_ESTATS_PATH_ROD_v0 { 98 FastRetran: ULONG, 99 Timeouts: ULONG, 100 SubsequentTimeouts: ULONG, 101 CurTimeoutCount: ULONG, 102 AbruptTimeouts: ULONG, 103 PktsRetrans: ULONG, 104 BytesRetrans: ULONG, 105 DupAcksIn: ULONG, 106 SacksRcvd: ULONG, 107 SackBlocksRcvd: ULONG, 108 CongSignals: ULONG, 109 PreCongSumCwnd: ULONG, 110 PreCongSumRtt: ULONG, 111 PostCongSumRtt: ULONG, 112 PostCongCountRtt: ULONG, 113 EcnSignals: ULONG, 114 EceRcvd: ULONG, 115 SendStall: ULONG, 116 QuenchRcvd: ULONG, 117 RetranThresh: ULONG, 118 SndDupAckEpisodes: ULONG, 119 SumBytesReordered: ULONG, 120 NonRecovDa: ULONG, 121 NonRecovDaEpisodes: ULONG, 122 AckAfterFr: ULONG, 123 DsackDups: ULONG, 124 SampleRtt: ULONG, 125 SmoothedRtt: ULONG, 126 RttVar: ULONG, 127 MaxRtt: ULONG, 128 MinRtt: ULONG, 129 SumRtt: ULONG, 130 CountRtt: ULONG, 131 CurRto: ULONG, 132 MaxRto: ULONG, 133 MinRto: ULONG, 134 CurMss: ULONG, 135 MaxMss: ULONG, 136 MinMss: ULONG, 137 SpuriousRtoDetections: ULONG, 138 }} 139 pub type PTCP_ESTATS_PATH_ROD_v0 = *mut TCP_ESTATS_PATH_ROD_v0; 140 STRUCT!{struct TCP_ESTATS_PATH_RW_v0 { 141 EnableCollection: BOOLEAN, 142 }} 143 pub type PTCP_ESTATS_PATH_RW_v0 = *mut TCP_ESTATS_PATH_RW_v0; 144 STRUCT!{struct TCP_ESTATS_SEND_BUFF_ROD_v0 { 145 CurRetxQueue: SIZE_T, 146 MaxRetxQueue: SIZE_T, 147 CurAppWQueue: SIZE_T, 148 MaxAppWQueue: SIZE_T, 149 }} 150 pub type PTCP_ESTATS_SEND_BUFF_ROD_v0 = *mut TCP_ESTATS_SEND_BUFF_ROD_v0; 151 STRUCT!{struct TCP_ESTATS_SEND_BUFF_RW_v0 { 152 EnableCollection: BOOLEAN, 153 }} 154 pub type PTCP_ESTATS_SEND_BUFF_RW_v0 = *mut TCP_ESTATS_SEND_BUFF_RW_v0; 155 STRUCT!{struct TCP_ESTATS_REC_ROD_v0 { 156 CurRwinSent: ULONG, 157 MaxRwinSent: ULONG, 158 MinRwinSent: ULONG, 159 LimRwin: ULONG, 160 DupAckEpisodes: ULONG, 161 DupAcksOut: ULONG, 162 CeRcvd: ULONG, 163 EcnSent: ULONG, 164 EcnNoncesRcvd: ULONG, 165 CurReasmQueue: ULONG, 166 MaxReasmQueue: ULONG, 167 CurAppRQueue: SIZE_T, 168 MaxAppRQueue: SIZE_T, 169 WinScaleSent: UCHAR, 170 }} 171 pub type PTCP_ESTATS_REC_ROD_v0 = *mut TCP_ESTATS_REC_ROD_v0; 172 STRUCT!{struct TCP_ESTATS_REC_RW_v0 { 173 EnableCollection: BOOLEAN, 174 }} 175 pub type PTCP_ESTATS_REC_RW_v0 = *mut TCP_ESTATS_REC_RW_v0; 176 STRUCT!{struct TCP_ESTATS_OBS_REC_ROD_v0 { 177 CurRwinRcvd: ULONG, 178 MaxRwinRcvd: ULONG, 179 MinRwinRcvd: ULONG, 180 WinScaleRcvd: UCHAR, 181 }} 182 pub type PTCP_ESTATS_OBS_REC_ROD_v0 = *mut TCP_ESTATS_OBS_REC_ROD_v0; 183 STRUCT!{struct TCP_ESTATS_OBS_REC_RW_v0 { 184 EnableCollection: BOOLEAN, 185 }} 186 pub type PTCP_ESTATS_OBS_REC_RW_v0 = *mut TCP_ESTATS_OBS_REC_RW_v0; 187 STRUCT!{struct TCP_ESTATS_BANDWIDTH_RW_v0 { 188 EnableCollectionOutbound: TCP_BOOLEAN_OPTIONAL, 189 EnableCollectionInbound: TCP_BOOLEAN_OPTIONAL, 190 }} 191 pub type PTCP_ESTATS_BANDWIDTH_RW_v0 = *mut TCP_ESTATS_BANDWIDTH_RW_v0; 192 STRUCT!{struct TCP_ESTATS_BANDWIDTH_ROD_v0 { 193 OutboundBandwidth: ULONG64, 194 InboundBandwidth: ULONG64, 195 OutboundInstability: ULONG64, 196 InboundInstability: ULONG64, 197 OutboundBandwidthPeaked: BOOLEAN, 198 InboundBandwidthPeaked: BOOLEAN, 199 }} 200 pub type PTCP_ESTATS_BANDWIDTH_ROD_v0 = *mut TCP_ESTATS_BANDWIDTH_ROD_v0; 201 STRUCT!{struct TCP_ESTATS_FINE_RTT_RW_v0 { 202 EnableCollection: BOOLEAN, 203 }} 204 pub type PTCP_ESTATS_FINE_RTT_RW_v0 = *mut TCP_ESTATS_FINE_RTT_RW_v0; 205 STRUCT!{struct TCP_ESTATS_FINE_RTT_ROD_v0 { 206 RttVar: ULONG, 207 MaxRtt: ULONG, 208 MinRtt: ULONG, 209 SumRtt: ULONG, 210 }} 211 pub type PTCP_ESTATS_FINE_RTT_ROD_v0 = *mut TCP_ESTATS_FINE_RTT_ROD_v0; 212