using System.Runtime.InteropServices;
using Vanara.InteropServices;
namespace Vanara.PInvoke
{
public static partial class IpHlpApi
{
///
/// The TCP_BOOLEAN_OPTIONAL enumeration defines the states that a caller can specify when updating a member in the read/write
/// information for a TCP connection.
///
///
/// The TCP_BOOLEAN_OPTIONAL enumeration is defined on Windows Vista and later.
///
/// The collection of extended statistics on a TCP connection are enabled and disabled using calls to the SetPerTcp6ConnectionEStats
/// and SetPerTcpConnectionEStats functions where the type of extended statistics specified is one of values from the TCP_ESTATS_TYPE
/// enumeration type. A value from the TCP_BOOLEAN_OPTIONAL enumeration is used to specify how a member in the
/// TCP_ESTATS_BANDWIDTH_RW_v0 structure should be updated to enable or disable extended statistics on a TCP connection for bandwidth estimation.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ne-tcpestats-_tcp_boolean_optional typedef enum
// _TCP_BOOLEAN_OPTIONAL { TcpBoolOptDisabled, TcpBoolOptEnabled, TcpBoolOptUnchanged } TCP_BOOLEAN_OPTIONAL, *PTCP_BOOLEAN_OPTIONAL;
[PInvokeData("tcpestats.h", MSDNShortId = "68f8f797-06fb-4286-88bc-220c54977575")]
public enum TCP_BOOLEAN_OPTIONAL
{
/// The option should be disabled.
TcpBoolOptDisabled = 0,
/// The option should be enabled.
TcpBoolOptEnabled,
/// The option should be unchanged.
TcpBoolOptUnchanged = -1
}
///
/// The TCP_ESTATS_TYPE enumeration defines the type of extended statistics for a TCP connection that is requested or being set.
///
///
/// The TCP_ESTATS_TYPE enumeration is defined on Windows Vista and later.
///
/// The GetPerTcp6ConnectionEStats and GetPerTcp6ConnectionEStats functions are designed to use TCP to diagnose performance
/// problems in both the network and the application. If a network based application is performing poorly, TCP can determine if the
/// bottleneck is in the sender, the receiver or the network itself. If the bottleneck is in the network, TCP can provide specific
/// information about its nature.
///
///
/// The GetPerTcp6ConnectionEStats and GetPerTcp6ConnectionEStats functions are used to retrieve extended statistics for a TCP
/// connection based on the type of extended statistics specified using one of values from the TCP_ESTATS_TYPE enumeration
/// type. The collection of extended statistics on a TCP connection are enabled and disabled using calls to the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions where the type of extended statistics specified is one of
/// values from the TCP_ESTATS_TYPE enumeration type.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ne-tcpestats-tcp_estats_type typedef enum {
// TcpConnectionEstatsSynOpts, TcpConnectionEstatsData, TcpConnectionEstatsSndCong, TcpConnectionEstatsPath,
// TcpConnectionEstatsSendBuff, TcpConnectionEstatsRec, TcpConnectionEstatsObsRec, TcpConnectionEstatsBandwidth,
// TcpConnectionEstatsFineRtt, TcpConnectionEstatsMaximum } *PTCP_ESTATS_TYPE;
[PInvokeData("tcpestats.h", MSDNShortId = "96f55528-e74a-4360-a7a2-54ba19c3a284")]
public enum TCP_ESTATS_TYPE
{
///
/// This value specifies SYN exchange information for a TCP connection. Only read-only static information is available for this
/// enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_SYN_OPTS_ROS_v0))]
TcpConnectionEstatsSynOpts,
///
/// This value specifies extended data transfer information for a TCP connection. Only read-only dynamic information and
/// read/write information are available for this enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_DATA_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_DATA_ROD_v0))]
TcpConnectionEstatsData,
///
/// This value specifies sender congestion for a TCP connection. All three types of information (read-only static, read-only
/// dynamic, and read/write information) are available for this enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_SND_CONG_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_SND_CONG_ROS_v0))]
[CorrespondingType(typeof(TCP_ESTATS_SND_CONG_ROD_v0))]
TcpConnectionEstatsSndCong,
/// This value specifies extended path measurement information for a TCP connection. This information is used to infer segment reordering on the path from the local sender to the remote receiver. Only read-only dynamic information and read/write information are available for this enumeration value.
[CorrespondingType(typeof(TCP_ESTATS_PATH_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_PATH_ROD_v0))]
TcpConnectionEstatsPath,
///
/// This value specifies extended output-queuing information for a TCP connection. Only read-only dynamic information and
/// read/write information are available for this enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_SEND_BUFF_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_SEND_BUFF_ROD_v0))]
TcpConnectionEstatsSendBuff,
/// This value specifies extended local-receiver information for a TCP connection. Only read-only dynamic information and read/write information are available for this enumeration value.
[CorrespondingType(typeof(TCP_ESTATS_REC_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_REC_ROD_v0))]
TcpConnectionEstatsRec,
///
/// This value specifies extended remote-receiver information for a TCP connection. Only read-only dynamic information and
/// read/write information are available for this enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_OBS_REC_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_OBS_REC_ROD_v0))]
TcpConnectionEstatsObsRec,
/// This value specifies bandwidth estimation statistics for a TCP connection on bandwidth. Only read-only dynamic information and read/write information are available for this enumeration value.
[CorrespondingType(typeof(TCP_ESTATS_BANDWIDTH_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_BANDWIDTH_ROD_v0))]
TcpConnectionEstatsBandwidth,
///
/// This value specifies fine-grained round-trip time (RTT) estimation statistics for a TCP connection. Only read-only dynamic
/// information and read/write information are available for this enumeration value.
///
[CorrespondingType(typeof(TCP_ESTATS_FINE_RTT_RW_v0))]
[CorrespondingType(typeof(TCP_ESTATS_FINE_RTT_ROD_v0))]
TcpConnectionEstatsFineRtt,
}
/// The TCP_SOFT_ERROR enumeration defines the reason for non-fatal or soft errors recorded on a TCP connection.
///
/// The TCP_SOFT_ERROR enumeration is defined on Windows Vista and later.
///
/// The values in this enumeration are defined in the IETF draft RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ne-tcpestats-__unnamed_enum_1 typedef enum { TcpErrorNone,
// TcpErrorBelowDataWindow, TcpErrorAboveDataWindow, TcpErrorBelowAckWindow, TcpErrorAboveAckWindow, TcpErrorBelowTsWindow,
// TcpErrorAboveTsWindow, TcpErrorDataChecksumError, TcpErrorDataLengthError, TcpErrorMaxSoftError } *PTCP_SOFT_ERROR;
[PInvokeData("tcpestats.h", MSDNShortId = "dd179e9b-86e6-48e8-bb4b-05d69b9794b2")]
public enum TCP_SOFT_ERROR
{
/// No soft errors have occurred.
TcpErrorNone = 0,
///
/// All data in the segment is below the send unacknowledged (SND.UNA) sequence number. This soft error is normal for keep-alives
/// and zero window probes.
///
TcpErrorBelowDataWindow,
///
/// Some data in the segment is above send window (SND.WND) size. This soft error indicates an implementation bug or possible attack.
///
TcpErrorAboveDataWindow,
///
/// An ACK was received below the SND.UNA sequence number. This soft error indicates that the return path is reordering ACKs.
///
TcpErrorBelowAckWindow,
///
/// An ACK was received for data that we have not sent. This soft error indicates an implementation bug or possible attack.
///
TcpErrorAboveAckWindow,
///
/// The Time-stamp Echo Reply (TSecr) on the segment is older than the current TS.Recent (a time-stamp to be echoed in TSecr
/// whenever a segment is sent). This error is applicable to TCP connections that use the TCP Timestamps option (TSopt) defined
/// by the IETF in RFC 1323. For more information, see http://www.ietf.org/rfc/rfc1323.txt. This soft error is normal for the
/// rare case where the Protect Against Wrapped Sequences numbers (PAWS) mechanism detects data reordered by the network.
///
TcpErrorBelowTsWindow,
///
/// The TSecr on the segment is newer than the current TS.Recent. This soft error indicates an implementation bug or possible attack.
///
TcpErrorAboveTsWindow,
///
/// An incorrect TCP checksum was received. Note that this value is intrinsically fragile, because the header fields used to
/// identify the connection may have been corrupted.
///
TcpErrorDataChecksumError,
///
/// A data length error occurred. This value is not defined in the IETF draft RFC on the TCP Extended Statistics MIB.
///
TcpErrorDataLengthError,
///
/// The maximum possible value for the TCP_SOFT_ERROR_STATE enumeration type. This is not a legal value for the reason for a soft
/// error for a TCP connection.
///
TcpErrorMaxSoftError,
}
///
/// The TCP_ESTATS_BANDWIDTH_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on bandwidth
/// estimation for a TCP connection.
///
///
///
/// The TCP_ESTATS_BANDWIDTH_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows
/// Vista and later.
///
///
/// The TCP_ESTATS_BANDWIDTH_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended
/// TCP statistics on bandwidth estimation for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_BANDWIDTH_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsBandwidth is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// The members of this structure are not defined in the IETF RFC on the TCP Extended Statistics MIB. For more information on this
/// RFC, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_bandwidth_rod_v0 typedef struct
// _TCP_ESTATS_BANDWIDTH_ROD_v0 { ULONG64 OutboundBandwidth; ULONG64 InboundBandwidth; ULONG64 OutboundInstability; ULONG64
// InboundInstability; BOOLEAN OutboundBandwidthPeaked; BOOLEAN InboundBandwidthPeaked; } TCP_ESTATS_BANDWIDTH_ROD_v0, *PTCP_ESTATS_BANDWIDTH_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "330d06a2-9966-4e2b-b1bd-44c0f1b9416d")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_BANDWIDTH_ROD_v0
{
///
/// Type: ULONG64
/// The computed outbound bandwidth estimate, in bits per second, for the network path for the TCP connection.
///
public ulong OutboundBandwidth;
///
/// Type: ULONG64
/// The computed inbound bandwidth estimate, in bits per second, for the network path for the TCP connection.
///
public ulong InboundBandwidth;
///
/// Type: ULONG64
///
/// A measure, in bits per second, of the instability of the outbound bandwidth estimate for the network path for the TCP connection.
///
///
public ulong OutboundInstability;
///
/// Type: ULONG64
///
/// A measure, in bits per second, of the instability of the inbound bandwidth estimate for the network path for the TCP connection.
///
///
public ulong InboundInstability;
///
/// Type: BOOLEAN
///
/// A boolean value that indicates if the computed outbound bandwidth estimate for the network path for the TCP connection has
/// reached its peak value.
///
///
[MarshalAs(UnmanagedType.U1)] public bool OutboundBandwidthPeaked;
///
/// Type: BOOLEAN
///
/// A boolean value that indicates if the computed inbound bandwidth estimate for the network path for the TCP connection has
/// reached its peak value.
///
///
[MarshalAs(UnmanagedType.U1)] public bool InboundBandwidthPeaked;
}
///
/// The TCP_ESTATS_BANDWIDTH_RW_v0 structure contains read/write configuration information for extended TCP statistics on
/// bandwidth estimation for a TCP connection.
///
///
///
/// The TCP_ESTATS_BANDWIDTH_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_BANDWIDTH_RW_v0 is defined as version 0 of the structure for read/write configuration information on
/// bandwidth estimation for a TCP connection.
///
///
/// Extended TCP statistics on bandwidth estimation for a TCP connection are enabled and disabled using this structure and the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsBandwidth is passed in the
/// EstatsType parameter.
///
///
/// The Offset parameter passed to the SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions is currently unused and
/// must be set to 0. Consequently, the TCP_ESTATS_BANDWIDTH_RW_v0 structure pointed to by the Rw parameter when the
/// EstatsType parameter is set to TcpConnectionEstatsBandwidth must have both the EnableCollectionOutbound and
/// EnableCollectionInbound structure members set to the preferred values in a single call to the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions.
///
///
/// The TCP_ESTATS_BANDWIDTH_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsBandwidth is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_bandwidth_rw_v0 typedef struct
// _TCP_ESTATS_BANDWIDTH_RW_v0 { TCP_BOOLEAN_OPTIONAL EnableCollectionOutbound; TCP_BOOLEAN_OPTIONAL EnableCollectionInbound; }
// TCP_ESTATS_BANDWIDTH_RW_v0, *PTCP_ESTATS_BANDWIDTH_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "a9bf5ad3-a8db-4194-8e47-5a7409391f4c")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_BANDWIDTH_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for outbound bandwidth estimation.
///
/// If this member is set to TcpBoolOptEnabled, extended statistics on the TCP connection for outbound bandwidth
/// estimation are enabled. If this member is set to TcpBoolOptDisabled, extended statistics on the TCP connection for
/// outbound bandwidth estimation are disabled. If this member is set to TcpBoolOptUnchanged, extended statistics on the
/// TCP connection for outbound bandwidth estimation are left unchanged.
///
/// The default state for this member when not set is disabled.
///
public TCP_BOOLEAN_OPTIONAL EnableCollectionOutbound;
///
/// A value that indicates if extended statistics on a TCP connection should be collected for inbound bandwidth estimation.
///
/// If this member is set to TcpBoolOptEnabled, extended statistics on the TCP connection for inbound bandwidth estimation
/// are enabled. If this member is set to TcpBoolOptDisabled, extended statistics on the TCP connection for inbound
/// bandwidth estimation are disabled. If this member is set to TcpBoolOptUnchanged, extended statistics on the TCP
/// connection for inbound bandwidth estimation are unchanged.
///
/// The default state for this member when not set is disabled.
///
public TCP_BOOLEAN_OPTIONAL EnableCollectionInbound;
}
///
/// The TCP_ESTATS_DATA_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on data transfer
/// for a TCP connection.
///
///
///
/// The TCP_ESTATS_DATA_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_DATA_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended TCP
/// statistics on data transfer for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_DATA_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsData is passed in the EstatsType parameter. Extended TCP statistics need to be enabled
/// to retrieve this structure.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_DATA_ROD_v0 structure to the entries defined in RFC 4898 for
/// extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// DataBytesOut
/// tcpEStatsPerfDataOctetsOut
///
/// -
/// DataSegsOut
/// tcpEStatsPerfDataSegsOut
///
/// -
/// DataBytesIn
/// tcpEStatsPerfDataOctetsIn
///
/// -
/// DataSegsIn
/// tcpEStatsPerfDataSegsIn
///
/// -
/// SegsOut
/// tcpEStatsPerfSegsOut
///
/// -
/// SegsIn
/// tcpEStatsPerfSegsIn
///
/// -
/// SoftErrors
/// tcpEStatsStackSoftErrors
///
/// -
/// SoftErrorReason
/// tcpEStatsStackSoftErrorReason
///
/// -
/// SndUna
/// tcpEStatsAppSndUna
///
/// -
/// SndNxt
/// tcpEStatsAppSndNxt
///
/// -
/// SndMax
/// tcpEStatsAppSndMax
///
/// -
/// ThruBytesAcked
/// tcpEStatsAppThruOctetsAcked
///
/// -
/// RcvNxt
/// tcpEStatsAppRcvNxt
///
/// -
/// ThruBytesReceived
/// tcpEStatsAppThruOctetsReceived
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_data_rod_v0 typedef struct
// _TCP_ESTATS_DATA_ROD_v0 { ULONG64 DataBytesOut; ULONG64 DataSegsOut; ULONG64 DataBytesIn; ULONG64 DataSegsIn; ULONG64 SegsOut;
// ULONG64 SegsIn; ULONG SoftErrors; ULONG SoftErrorReason; ULONG SndUna; ULONG SndNxt; ULONG SndMax; ULONG64 ThruBytesAcked; ULONG
// RcvNxt; ULONG64 ThruBytesReceived; } TCP_ESTATS_DATA_ROD_v0, *PTCP_ESTATS_DATA_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "1e896660-10dd-471a-b4ae-116caa7a9d48")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_DATA_ROD_v0
{
///
/// Type: ULONG64
///
/// The number of octets of data contained in transmitted segments, including retransmitted data. Note that this does not include
/// TCP headers.
///
///
public ulong DataBytesOut;
///
/// Type: ULONG64
/// The number of segments sent containing a positive length data segment.
///
public ulong DataSegsOut;
///
/// Type: ULONG64
///
/// The number of octets contained in received data segments, including retransmitted data. Note that this does not include TCP headers.
///
///
public ulong DataBytesIn;
///
/// Type: ULONG64
/// The number of segments received containing a positive length data segment.
///
public ulong DataSegsIn;
///
/// Type: ULONG64
/// The total number of segments sent.
///
public ulong SegsOut;
///
/// Type:
/// The total number of segments received.
///
public ulong SegsIn;
///
/// Type: ULONG
///
/// The number of segments that fail various consistency tests during TCP input processing. Soft errors might cause the segment
/// to be discarded but some do not. Some of these soft errors cause the generation of a TCP acknowledgment, while others are
/// silently discarded.
///
///
public uint SoftErrors;
///
/// Type: ULONG
///
/// A value that identifies which consistency test most recently failed during TCP input processing. This object is set every
/// time the SoftErrors member is incremented.
///
///
public uint SoftErrorReason;
///
/// Type: ULONG
/// The value of the oldest unacknowledged sequence number. Note that this member is a TCP state variable.
///
public uint SndUna;
///
/// Type: ULONG
///
/// The next sequence number to be sent. Note that this member is not monotonic (and thus not a counter), because TCP sometimes
/// retransmits lost data by pulling the member back to the missing data.
///
///
public uint SndNxt;
///
/// Type: ULONG
///
/// The farthest forward (right most or largest) sequence number to be sent. Note that this will be equal to the SndNxt
/// member except when the SndNxt member is pulled back during recovery.
///
///
public uint SndMax;
///
/// Type: ULONG64
///
/// The number of octets for which cumulative acknowledgments have been received. Note that this will be the sum of changes to
/// the SndNxt member.
///
///
public ulong ThruBytesAcked;
///
/// Type: ULONG
///
/// The next sequence number to be received. Note that this member is not monotonic (and thus not a counter), because TCP
/// sometimes retransmits lost data by pulling the member back to the missing data.
///
///
public uint RcvNxt;
///
/// Type: ULONG64
///
/// The number of octets for which cumulative acknowledgments have been sent. Note that this will be the sum of changes to the
/// RcvNxt member.
///
///
public ulong ThruBytesReceived;
}
///
/// The TCP_ESTATS_DATA_RW_v0 structure contains read/write configuration information for extended TCP statistics on data
/// transfer for a TCP connection.
///
///
///
/// The TCP_ESTATS_DATA_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_DATA_RW_v0 is defined as version 0 of the structure for read/write configuration information on extended
/// data transfer for a TCP connection.
///
///
/// Extended TCP statistics on extended data transfer information for a TCP connection are enabled and disabled using this structure
/// and the SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsData is passed in the
/// EstatsType parameter.
///
///
/// The TCP_ESTATS_DATA_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsData is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_data_rw_v0 typedef struct
// _TCP_ESTATS_DATA_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_DATA_RW_v0, *PTCP_ESTATS_DATA_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "823cea66-f719-40f6-82bd-572623188446")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_DATA_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for data transfer information.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_FINE_RTT_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on
/// fine-grained round-trip time (RTT) estimation for a TCP connection.
///
///
///
/// The TCP_ESTATS_FINE_RTT_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_FINE_RTT_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended TCP
/// statistics on fine-grained round-trip time estimation for a TCP connection. This information is available after the connection
/// has been established.
///
///
/// The TCP_ESTATS_FINE_RTT_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsFineRtt is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// The TCP retransmission timer is discussed in detail in the IETF RFC 2988 on Computing TCP's Retransmission Timer For more
/// information, see http://www.ietf.org/rfc/rfc2988.txt.
///
///
/// The members of this structure are not defined in the IETF RFC on the TCP Extended Statistics MIB. However, there are members in
/// the TCP_ESTATS_PATH_ROD_v0 structure that provide similar time measurements in milliseconds. For more information, see the
/// TCP_ESTATS_PATH_ROD_v0 structure and http://www.ietf.org/rfc/rfc4898.txt.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_fine_rtt_rod_v0 typedef struct
// _TCP_ESTATS_FINE_RTT_ROD_v0 { ULONG RttVar; ULONG MaxRtt; ULONG MinRtt; ULONG SumRtt; } TCP_ESTATS_FINE_RTT_ROD_v0, *PTCP_ESTATS_FINE_RTT_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "e33cd21f-1ec8-4715-a5e1-431a8a7e61df")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_FINE_RTT_ROD_v0
{
///
/// Type: ULONG
///
/// The round trip time variation, in microseconds, used in receive window auto-tuning when the TCP extended statistics feature
/// is enabled.
///
///
public uint RttVar;
///
/// Type: ULONG
/// The maximum sampled round trip time, in microseconds.
///
public uint MaxRtt;
///
/// Type: ULONG
/// The minimum sampled round trip time, in microseconds.
///
public uint MinRtt;
///
/// Type: ULONG
///
/// A smoothed value round trip time, in microseconds, computed from all sampled round trip times. The smoothing is a weighted
/// additive function that uses the RttVar member.
///
///
public uint SumRtt;
}
///
/// The TCP_ESTATS_FINE_RTT_RW_v0 structure contains read/write configuration information for extended TCP statistics on
/// fine-grained round-trip time (RTT) estimation statistics for a TCP connection.
///
///
///
/// The TCP_ESTATS_FINE_RTT_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_FINE_RTT_RW_v0 is defined as version 0 of the structure for read/write configuration information on
/// fine-grained round-trip time estimation statistics for a TCP connection.
///
///
/// Extended TCP statistics on extended path measurement information for a TCP connection are enabled and disabled using this
/// structure and the SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsFineRtt is
/// passed in the EstatsType parameter.
///
///
/// The TCP_ESTATS_FINE_RTT_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsFineRtt is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_fine_rtt_rw_v0 typedef struct
// _TCP_ESTATS_FINE_RTT_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_FINE_RTT_RW_v0, *PTCP_ESTATS_FINE_RTT_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "35834c9a-2896-4c11-aef7-c55af7f6fef3")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_FINE_RTT_RW_v0
{
///
///
/// A value that indicates if extended statistics on a TCP connection should be collected for fine-grained RTT estimation statistics.
///
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_OBS_REC_ROD_v0 structure contains read-only dynamic information for extended TCP statistics observed on the
/// remote receiver for a TCP connection.
///
///
///
/// The TCP_ESTATS_OBS_REC_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_OBS_REC_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended TCP
/// statistics on the local receiver for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_OBS_REC_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsObsRec is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_OBS_REC_ROD_v0 structure to the entries defined in RFC 4898
/// for extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// CurRwinRcvd
/// tcpEStatsPerfCurRwinRcvd
///
/// -
/// MaxRwinRcvd
/// tcpEStatsPerfMaxRwinRcvd
///
/// -
/// MinRwinRcvd
/// No mapping to this member.
///
/// -
/// WinScaleRcvd
/// tcpEStatsStackWinScaleRcvd
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_obs_rec_rod_v0 typedef struct
// _TCP_ESTATS_OBS_REC_ROD_v0 { ULONG CurRwinRcvd; ULONG MaxRwinRcvd; ULONG MinRwinRcvd; UCHAR WinScaleRcvd; }
// TCP_ESTATS_OBS_REC_ROD_v0, *PTCP_ESTATS_OBS_REC_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "f790e107-0db3-4691-98fc-378518b04a8a")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_OBS_REC_ROD_v0
{
///
/// Type: ULONG
/// The most recent window advertisement, in bytes, received from the remote receiver.
///
public uint CurRwinRcvd;
///
/// Type: ULONG
/// The maximum window advertisement, in bytes, received from the remote receiver.
///
public uint MaxRwinRcvd;
///
/// Type: ULONG
/// The minimum window advertisement, in bytes, received from the remote receiver.
///
public uint MinRwinRcvd;
///
/// Type: ULONG
///
/// The value of the received window scale option if one was received from the remote receiver; otherwise, a value of -1.
///
///
/// Note that if both the WinScaleSent member of the TCP_ESTATS_REC_ROD_v0 structure and the WinScaleRcvd member
/// are not -1, then Snd.Wind.Scale will be the same as this value and used to scale receiver window announcements from the
/// remote host to the local host.
///
///
public byte WinScaleRcvd;
}
///
/// The TCP_ESTATS_OBS_REC_RW_v0 structure contains read/write configuration information for extended TCP statistics observed
/// on the remote receiver for a TCP connection.
///
///
///
/// The TCP_ESTATS_OBS_REC_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_OBS_REC_RW_v0 is defined as version 0 of the structure for read/write configuration information observed on
/// the remote receiver for a TCP connection.
///
///
/// Extended TCP statistics on remote-receiver information for a TCP connection are enabled and disabled using this structure and the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsObsRec is passed in the
/// EstatsType parameter.
///
///
/// The TCP_ESTATS_REC_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats functions
/// when TcpConnectionEstatsObsRec is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_obs_rec_rw_v0 typedef struct
// _TCP_ESTATS_OBS_REC_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_OBS_REC_RW_v0, *PTCP_ESTATS_OBS_REC_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "91c2d5d9-3198-42a7-abf7-077281b491f2")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_OBS_REC_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for remote-receiver information.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_PATH_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on network path
/// measurement for a TCP connection.
///
///
///
/// The TCP_ESTATS_PATH_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_PATH_ROD_v0 is defined as version 0 of the structure for read-only dynamic information on network path
/// measurement for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_PATH_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsPath is passed in the EstatsType parameter. Extended TCP statistics need to be enabled
/// to retrieve this structure.
///
///
/// The path MTU discovery and maximum segment size are discussed in detail in the IETF RFC 1191 on Path MTU discovery. For more
/// information, see http://www.ietf.org/rfc/rfc1191.txt.
///
///
/// TCP congestion control and congestion control algorithms are discussed in detail in the IETF RFC 2581 on TCP Congestion Control.
/// For more information, see http://www.ietf.org/rfc/rfc2581.txt.
///
///
/// SACK and an extension to the SACK option are discussed in detail in the IETF RFC 2883 on An Extension to the Selective
/// Acknowledgment (SACK) Option for TCP. For more information, see http://www.ietf.org/rfc/rfc2883.txt.
///
///
/// The TCP retransmission timer (RTO) and the smoothed round-trip-time (RTT) are discussed in detail in the IETF RFC 2988 on
/// Computing TCP's Retransmission Timer. For more information, see http://www.ietf.org/rfc/rfc2988.txt.
///
///
/// Explicit Congestion Notification in IP is discussed in detail in the IETF RFC 2581 on The Addition of Explicit Congestion
/// Notification (ECN) to IP. For more information, see http://www.ietf.org/rfc/rfc3168.txt.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_PATH_ROD_v0 structure to the entries defined in RFC 4898 for
/// extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// FastRetran
/// tcpEStatsStackFastRetran
///
/// -
/// Timeouts
/// tcpEStatsPerfTimeouts
///
/// -
/// SubsequentTimeouts
/// tcpEStatsStackSubsequentTimeouts
///
/// -
/// CurTimeoutCount
/// tcpEStatsStackCurTimeoutCount
///
/// -
/// AbruptTimeouts
/// tcpEStatsStackAbruptTimeouts
///
/// -
/// PktsRetrans
/// tcpEStatsPerfSegsRetrans
///
/// -
/// BytesRetrans
/// tcpEStatsPerfOctetsRetrans
///
/// -
/// DupAcksIn
/// tcpEStatsStackDupAcksIn
///
/// -
/// SacksRcvd
/// tcpEStatsStackSACKsRcvd
///
/// -
/// SackBlocksRcvd
/// tcpEStatsStackSACKBlocksRcvd
///
/// -
/// CongSignals
/// tcpEStatsPerfCongSignals
///
/// -
/// PreCongSumCwnd
/// tcpEStatsPathPreCongSumCwnd
///
/// -
/// PreCongSumRtt
/// tcpEStatsPathPreCongSumRTT
///
/// -
/// PostCongSumRtt
/// tcpEStatsPathPostCongSumRTT
///
/// -
/// PostCongCountRtt
/// tcpEStatsPathPostCongCountRTT
///
/// -
/// EcnSignals
/// tcpEStatsPathECNsignals
///
/// -
/// EceRcvd
/// tcpEStatsPathCERcvd
///
/// -
/// SendStall
/// tcpEStatsStackSendStall
///
/// -
/// QuenchRcvd
/// No mapping to this member.
///
/// -
/// RetranThresh
/// tcpEStatsPathRetranThresh
///
/// -
/// SndDupAckEpisodes
/// tcpEStatsPathDupAckEpisodes
///
/// -
/// SumBytesReordered
/// tcpEStatsPathSumOctetsReordered
///
/// -
/// NonRecovDa
/// tcpEStatsPathNonRecovDA
///
/// -
/// NonRecovDaEpisodes
/// tcpEStatsPathNonRecovDAEpisodes
///
/// -
/// AckAfterFr
/// No mapping to this member.
///
/// -
/// DsackDups
/// tcpEStatsStackDSACKDups
///
/// -
/// SampleRtt
/// tcpEStatsPathSampleRTT
///
/// -
/// SmoothedRtt
/// tcpEStatsPerfSmoothedRTT
///
/// -
/// RttVar
/// tcpEStatsPathRTTVar
///
/// -
/// MaxRtt
/// tcpEStatsPathMaxRTT
///
/// -
/// MinRtt
/// tcpEStatsPathMinRTT
///
/// -
/// SumRtt
/// tcpEStatsPathSumRTT
///
/// -
/// CountRtt
/// tcpEStatsPathCountRTT
///
/// -
/// CurRto
/// tcpEStatsPerfCurRTO
///
/// -
/// MaxRto
/// tcpEStatsPathMaxRTO
///
/// -
/// MinRto
/// tcpEStatsPathMinRTO
///
/// -
/// CurMss
/// tcpEStatsPerfCurMSS
///
/// -
/// MaxMss
/// tcpEStatsStackMaxMSS
///
/// -
/// MinMss
/// tcpEStatsStackMinMSS
///
/// -
/// SpuriousRtoDetections
/// tcpEStatsStackSpuriousRtoDetected
///
///
///
/// The TCP_ESTATS_FINE_RTT_ROD_v0 structure has members that provide similar data to the RttVar, MaxRtt,
/// MinRtt, and SumRtt members of the TCP_ESTATS_PATH_ROD_v0 structure. However, the time is reported in
/// microseconds for the similar members of the TCP_ESTATS_FINE_RTT_ROD_v0 structure.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_path_rod_v0 typedef struct
// _TCP_ESTATS_PATH_ROD_v0 { ULONG FastRetran; ULONG Timeouts; ULONG SubsequentTimeouts; ULONG CurTimeoutCount; ULONG AbruptTimeouts;
// ULONG PktsRetrans; ULONG BytesRetrans; ULONG DupAcksIn; ULONG SacksRcvd; ULONG SackBlocksRcvd; ULONG CongSignals; ULONG
// PreCongSumCwnd; ULONG PreCongSumRtt; ULONG PostCongSumRtt; ULONG PostCongCountRtt; ULONG EcnSignals; ULONG EceRcvd; ULONG
// SendStall; ULONG QuenchRcvd; ULONG RetranThresh; ULONG SndDupAckEpisodes; ULONG SumBytesReordered; ULONG NonRecovDa; ULONG
// NonRecovDaEpisodes; ULONG AckAfterFr; ULONG DsackDups; ULONG SampleRtt; ULONG SmoothedRtt; ULONG RttVar; ULONG MaxRtt; ULONG
// MinRtt; ULONG SumRtt; ULONG CountRtt; ULONG CurRto; ULONG MaxRto; ULONG MinRto; ULONG CurMss; ULONG MaxMss; ULONG MinMss; ULONG
// SpuriousRtoDetections; } TCP_ESTATS_PATH_ROD_v0, *PTCP_ESTATS_PATH_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "35ed2a10-caac-4004-80ac-f62c3880f5de")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_PATH_ROD_v0
{
///
/// Type: ULONG
/// The number of invocations of the Fast Retransmit algorithm.
///
public uint FastRetran;
///
/// Type: ULONG
///
/// The number of times the retransmit timeout has expired when the retransmission timer back-off multiplier is equal to one.
///
///
public uint Timeouts;
///
/// Type: ULONG
/// The number of times the retransmit timeout has expired after the retransmission timer has been doubled.
/// For more information, see section 5.5 of RFC 2988 discussed in the Remarks below.
///
public uint SubsequentTimeouts;
///
/// Type: ULONG
/// The current number of times the retransmit timeout has expired without receiving an acknowledgment for new data.
///
/// The CurTimeoutCount member is reset to zero when new data is acknowledged and incremented for each invocation of
/// Section 5.5 of RFC 2988.
///
///
public uint CurTimeoutCount;
///
/// Type: ULONG
///
/// The number of timeouts that occurred without any immediately preceding duplicate acknowledgments or other indications of
/// congestion. Abrupt timeouts indicate that the path lost an entire window of data or acknowledgments.
///
///
/// Timeouts that are preceded by duplicate acknowledgments or other congestion signals (Explicit Congestion Notification, for
/// example) are not counted as abrupt, and might have been avoided by a more sophisticated Fast Retransmit algorithm.
///
///
public uint AbruptTimeouts;
///
/// Type: ULONG
/// The number of segments transmitted containing at least some retransmitted data.
///
public uint PktsRetrans;
///
/// Type: ULONG
/// The number of bytes retransmitted.
///
public uint BytesRetrans;
///
/// Type: ULONG
/// The number of duplicate ACKs received.
///
public uint DupAcksIn;
///
/// Type: ULONG
/// The number of Selective Acknowledgment (SACK) options received.
///
public uint SacksRcvd;
///
/// Type: ULONG
/// The number of SACK blocks received (within SACK options).
///
public uint SackBlocksRcvd;
///
/// Type: ULONG
///
/// The number of multiplicative downward congestion window adjustments due to all forms of congestion signals, including Fast
/// Retransmit, Explicit Congestion Notification (ECN), and timeouts. This member summarizes all events that invoke the
/// Multiplicative Decrease (MD) portion of Additive Increase Multiplicative Decrease (AIMD) congestion control, and as such is
/// the best indicator of how a congestion windows is being affected by congestion.
///
///
/// Note that retransmission timeouts multiplicatively reduce the window implicitly by setting the slow start threshold size, and
/// are included in the value stored in the CongSignals member. In order to minimize spurious congestion indications due
/// to out-of-order segments, the CongSignals member is incremented in association with the Fast Retransmit algorithm.
///
///
public uint CongSignals;
///
/// Type: ULONG
/// The sum of the values of the congestion window, in bytes, captured each time a congestion signal is received.
///
/// This member is updated each time the CongSignals member is incremented, such that the change in the
/// PreCongSumCwnd member divided by the change in the CongSignals member is the average window (over some
/// interval) just prior to a congestion signal.
///
///
public uint PreCongSumCwnd;
///
/// Type: ULONG
///
/// The sum, in milliseconds, of the last sample of the network round-trip-time (RTT) prior to the received congestion signals.
/// The last sample of the RTT is stored in the SampleRtt member.
///
///
/// The PreCongSumRtt member is updated each time the CongSignals member is incremented, such that the change in
/// the PreCongSumRtt divided by the change in the CongSignals member is the average RTT (over some interval) just
/// prior to a congestion signal.
///
///
public uint PreCongSumRtt;
///
/// Type: ULONG
///
/// The sum, in milliseconds, of the first sample of the network RTT (stored in the SampleRtt member) following each
/// congestion signal.
///
///
/// The change in the PostCongSumRtt member divided by the change in the PostCongCountRtt member is the average RTT
/// (over some interval) just after a congestion signal.
///
///
public uint PostCongSumRtt;
///
/// Type: ULONG
/// The number of RTT samples, in bytes, included in the PostCongSumRtt member.
///
/// The change in the PostCongSumRtt member divided by the change in the PostCongCountRtt member is the average RTT
/// (over some interval) just after a congestion signal.
///
///
public uint PostCongCountRtt;
///
/// Type: ULONG
/// The number of congestion signals delivered to the TCP sender via ECN.
/// This is typically the number of segments bearing Echo Congestion
/// Experienced (ECE) bits, but also includes segments failing the ECN nonce check or other explicit congestion signals.
///
public uint EcnSignals;
///
/// Type: ULONG
/// The number of segments received with IP headers bearing Congestion Experienced (CE) markings.
///
public uint EceRcvd;
///
/// Type: ULONG
/// The number of interface stalls or other sender local resource limitations that are treated as congestion signals.
///
public uint SendStall;
///
/// Type: ULONG
/// Reserved for future use. This member is always set to zero.
///
public uint QuenchRcvd;
///
/// Type: ULONG
/// The number of duplicate acknowledgments required to trigger Fast Retransmit.
/// Note that although this is constant in traditional Reno TCP implementations, it is adaptive in many newer TCP implementations.
///
public uint RetranThresh;
///
/// Type: ULONG
///
/// The number of Duplicate Acks Sent when prior Ack was not duplicate. This is the number of times that a contiguous series of
/// duplicate acknowledgments have been sent.
///
///
/// This is an indication of the number of data segments lost or reordered on the path from the remote TCP endpoint to the near
/// TCP endpoint.
///
///
public uint SndDupAckEpisodes;
///
/// Type: ULONG
/// The sum of the amounts SND.UNA advances on the acknowledgment which ends a dup-ack episode without a retransmission.
///
/// Note the change in the SumBytesReordered member divided by the change in the NonRecovDaEpisodes member is an
/// estimate of the average reordering distance, over some interval.
///
///
public uint SumBytesReordered;
///
/// Type: ULONG
///
/// The number of duplicate acks (or SACKS) that did not trigger a Fast Retransmit because ACK advanced prior to the number of
/// duplicate acknowledgments reaching the RetranThresh.
///
///
/// Note that the change in the NonRecovDa member divided by the change in the NonRecovDaEpisodes member is an
/// estimate of the average reordering distance in segments over some interval.
///
///
public uint NonRecovDa;
///
/// Type: ULONG
///
/// The number of duplicate acknowledgment episodes that did not trigger a Fast Retransmit because ACK advanced prior to the
/// number of duplicate acknowledgments reaching the RetranThresh.
///
///
public uint NonRecovDaEpisodes;
///
/// Type: ULONG
/// Reserved for future use. This member is always set to zero.
///
public uint AckAfterFr;
///
/// Type: ULONG
/// The number of duplicate segments reported to the local host by D-SACK blocks.
///
public uint DsackDups;
///
/// Type: ULONG
///
/// The most recent raw network round trip time measurement, in milliseconds, used in calculation of the retransmission timer (RTO).
///
///
public uint SampleRtt;
///
/// Type: ULONG
/// The smoothed round trip time, in milliseconds, used in calculation of the RTO.
///
public uint SmoothedRtt;
///
/// Type: ULONG
/// The round trip time variation, in milliseconds, used in calculation of the RTO.
///
public uint RttVar;
///
/// Type: ULONG
/// The maximum sampled round trip time in milliseconds.
///
public uint MaxRtt;
///
/// Type: ULONG
/// The minimum sampled round trip time in milliseconds.
///
public uint MinRtt;
///
/// Type: ULONG
/// The sum of all sampled round trip times in milliseconds.
///
/// Note that the change in the SumRtt member divided by the change in the CountRtt member is the mean RTT,
/// uniformly averaged over an enter interval.
///
///
public uint SumRtt;
///
/// Type: ULONG
/// The number of round trip time samples included in the SumRtt member.
///
public uint CountRtt;
///
/// Type: ULONG
/// The current value, in milliseconds, of the retransmit timer.
///
public uint CurRto;
///
/// Type: ULONG
/// The maximum value, in milliseconds, of the retransmit timer.
///
public uint MaxRto;
///
/// Type: ULONG
/// The minimum value, in milliseconds, of the retransmit timer.
///
public uint MinRto;
///
/// Type: ULONG
/// The current maximum segment size (MSS), in bytes.
///
public uint CurMss;
///
/// Type: ULONG
/// The maximum MSS, in bytes.
///
public uint MaxMss;
///
/// Type: ULONG
/// The minimum MSS, in bytes.
///
public uint MinMss;
///
/// Type: ULONG
/// The number of acknowledgments reporting segments that have already been retransmitted due to a Retransmission Timeout.
///
public uint SpuriousRtoDetections;
}
///
/// The TCP_ESTATS_PATH_RW_v0 structure contains read/write configuration information for extended TCP statistics on path
/// measurement for a TCP connection.
///
///
///
/// The TCP_ESTATS_PATH_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_PATH_RW_v0 is defined as version 0 of the structure for read/write configuration information on extended
/// path measurement for a TCP connection. This information is used to infer segment reordering on the path from the local sender to
/// the remote receiver.
///
///
/// Extended TCP statistics on extended path measurement information for a TCP connection are enabled and disabled using this
/// structure and the SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsPath is
/// passed in the EstatsType parameter.
///
///
/// The TCP_ESTATS_PATH_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsPath is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-tcp_estats_path_rw_v0 typedef struct
// _TCP_ESTATS_PATH_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_PATH_RW_v0, *PTCP_ESTATS_PATH_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "460ad710-06aa-490a-9bac-5a8c731687e9")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_PATH_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for path measurement information.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_REC_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on the local
/// receiver for a TCP connection.
///
///
///
/// The TCP_ESTATS_REC_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_REC_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended TCP
/// statistics on the local receiver for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_REC_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsRec is passed in the EstatsType parameter. Extended TCP statistics need to be enabled to
/// retrieve this structure.
///
///
/// TCP congestion control and congestion control algorithms are discussed in detail in the IETF RFC 2581 on TCP Congestion Control.
/// For more information, see http://www.ietf.org/rfc/rfc2581.txt.
///
///
/// Explicit Congestion Notification in IP is discussed in detail in the IETF RFC 2581 on The Addition of Explicit Congestion
/// Notification (ECN) to IP. For more information, see http://www.ietf.org/rfc/rfc3168.txt.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_REC_ROD_v0 structure to the entries defined in RFC 4898 for
/// extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// CurRwinSent
/// tcpEStatsPerfCurRwinSent
///
/// -
/// MaxRwinSent
/// tcpEStatsPerfMaxRwinSent
///
/// -
/// MinRwinSent
/// No mapping to this member.
///
/// -
/// LimRwin
/// tcpEStatsTuneLimRwin
///
/// -
/// DupAckEpisodes
/// tcpEStatsPathDupAckEpisodes
///
/// -
/// DupAcksOut
/// tcpEStatsPathDupAcksOut
///
/// -
/// CeRcvd
/// tcpEStatsPathCERcvd
///
/// -
/// EcnSent
/// No mapping to this member.
///
/// -
/// EcnNoncesRcvd
/// No mapping to this member.
///
/// -
/// CurReasmQueue
/// tcpEStatsStackCurReasmQueue
///
/// -
/// MaxReasmQueue
/// tcpEStatsStackMaxReasmQueue
///
/// -
/// CurAppRQueue
/// tcpEStatsAppCurAppRQueue
///
/// -
/// MaxAppRQueue
/// tcpEStatsAppMaxAppRQueue
///
/// -
/// WinScaleSent
/// tcpEStatsStackWinScaleSent
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_rec_rod_v0 typedef struct
// _TCP_ESTATS_REC_ROD_v0 { ULONG CurRwinSent; ULONG MaxRwinSent; ULONG MinRwinSent; ULONG LimRwin; ULONG DupAckEpisodes; ULONG
// DupAcksOut; ULONG CeRcvd; ULONG EcnSent; ULONG EcnNoncesRcvd; ULONG CurReasmQueue; ULONG MaxReasmQueue; SIZE_T CurAppRQueue;
// SIZE_T MaxAppRQueue; UCHAR WinScaleSent; } TCP_ESTATS_REC_ROD_v0, *PTCP_ESTATS_REC_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "1481f108-1ea3-4952-9131-8b15e373d83e")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_REC_ROD_v0
{
///
/// Type: ULONG
/// The most recent window advertisement, in bytes, that has been sent.
///
public uint CurRwinSent;
///
/// Type: ULONG
/// The maximum window advertisement, in bytes, that has been sent.
///
public uint MaxRwinSent;
///
/// Type: ULONG
/// The minimum window advertisement, in bytes, that has been sent.
///
public uint MinRwinSent;
///
/// Type: ULONG
/// The maximum window advertisement, in bytes, that may be sent.
///
public uint LimRwin;
///
/// Type: ULONG
///
/// The number of Duplicate Acks Sent when prior Ack was not duplicate. This is the number of times that a contiguous series of
/// duplicate acknowledgments have been sent.
///
///
/// This is an indication of the number of data segments lost or reordered on the path from the remote TCP endpoint to the near
/// TCP endpoint.
///
///
public uint DupAckEpisodes;
///
/// Type: ULONG
/// The number of duplicate ACKs sent.
///
/// The ratio of the change in the DupAcksOut member to the change in the DupAckEpisodes member is an indication of
/// reorder or recovery distance over some interval.
///
///
public uint DupAcksOut;
///
/// Type: ULONG
/// The number of segments received with IP headers bearing Congestion Experienced (CE) markings.
///
public uint CeRcvd;
///
/// Type: ULONG
/// Reserved for future use. This member is always set to zero.
///
public uint EcnSent;
///
/// Type: ULONG
/// Reserved for future use. This member is always set to zero.
///
public uint EcnNoncesRcvd;
///
/// Type: ULONG
/// The current number of bytes of sequence space spanned by the reassembly queue.
///
/// This is generally the difference between rcv.nxt and the sequence number of the right most edge of the reassembly queue.
///
///
public uint CurReasmQueue;
///
/// Type: ULONG
/// The maximum number of bytes of sequence space spanned by the reassembly queue.
/// This is the maximum value of the CurReasmQueue member.
///
public uint MaxReasmQueue;
///
/// Type: SIZE_T
/// The current number of bytes of application data that has been acknowledged by TCP but not yet delivered to the application.
///
public SizeT CurAppRQueue;
///
/// Type: SIZE_T
/// The maximum number of bytes of application data that has been acknowledged by TCP but not yet delivered to the application.
///
public SizeT MaxAppRQueue;
///
/// Type: UCHAR
/// The value of the transmitted window scale option if one was sent; otherwise, a value of -1.
///
/// Note that if both the WinScaleSent member and the WinScaleRcvd member of the TCP_ESTATS_OBS_REC_ROD_v0
/// structure are not -1, then Rcv.Wind.Scale will be the same as this value and used to scale receiver window announcements from
/// the local host to the remote host.
///
///
public byte WinScaleSent;
}
///
/// The TCP_ESTATS_REC_RW_v0 structure contains read/write configuration information for extended TCP statistics on the local
/// receiver for a TCP connection.
///
///
///
/// The TCP_ESTATS_REC_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista and later.
///
///
/// The TCP_ESTATS_REC_RW_v0 is defined as version 0 of the structure for read/write configuration information on the local
/// receiver for a TCP connection.
///
///
/// Extended TCP statistics on local-receiver information for a TCP connection are enabled and disabled using this structure and the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsRec is passed in the EstatsType parameter.
///
///
/// The TCP_ESTATS_REC_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or GetPerTcpConnectionEStats
/// functions when TcpConnectionEstatsRec is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_rec_rw_v0 typedef struct
// _TCP_ESTATS_REC_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_REC_RW_v0, *PTCP_ESTATS_REC_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "e780ae7b-30c6-4890-8a8b-9e0b2739c176")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_REC_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for local-receiver information.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_SEND_BUFF_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on output
/// queuing for a TCP connection.
///
///
///
/// The TCP_ESTATS_SEND_BUFF_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows
/// Vista and later.
///
///
/// The TCP_ESTATS_SEND_BUFF_ROD_v0 is defined as version 0 of the structure for read-only dynamic information for extended
/// TCP statistics on output queuing for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_SEND_BUFF_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSendBuff is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_SEND_BUFF_ROD_v0 structure to the entries defined in RFC
/// 4898 for extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// CurRetxQueue
/// tcpEStatsStackCurRetxQueue
///
/// -
/// MaxRetxQueue
/// tcpEStatsStackMaxRetxQueue
///
/// -
/// CurAppWQueue
/// tcpEStatsAppCurAppWQueue
///
/// -
/// MaxAppWQueue
/// tcpEStatsAppMaxAppWQueue
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_send_buff_rod_v0 typedef struct
// _TCP_ESTATS_SEND_BUFF_ROD_v0 { SIZE_T CurRetxQueue; SIZE_T MaxRetxQueue; SIZE_T CurAppWQueue; SIZE_T MaxAppWQueue; }
// TCP_ESTATS_SEND_BUFF_ROD_v0, *PTCP_ESTATS_SEND_BUFF_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "7cda7378-95e4-4f1d-88b3-27974fedec83")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SEND_BUFF_ROD_v0
{
///
/// Type: SIZE_T
/// The current number of bytes of data occupying the retransmit queue.
///
public SizeT CurRetxQueue;
///
/// Type: SIZE_T
/// The maximum number of bytes of data occupying the retransmit queue.
///
public SizeT MaxRetxQueue;
///
/// Type: SIZE_T
///
/// The current number of bytes of application data buffered by TCP, pending the first transmission (to the left of SND.NXT or SndMax).
///
///
/// This data will generally be transmitted (and SND.NXT advanced to the left) as soon as there is an available congestion window
/// or receiver window. This is the amount of data readily available for transmission, without scheduling the application. TCP
/// performance may suffer if there is insufficient queued write data.
///
///
public SizeT CurAppWQueue;
///
/// Type: SIZE_T
/// The maximum number of bytes of application data buffered by TCP, pending the first transmission.
///
/// This is the maximum value of the CurAppWQueue member. The MaxAppWQueue and CurAppWQueue members can be
/// used to determine if insufficient queued data is steady state (suggesting insufficient queue space) or transient (suggesting
/// insufficient application performance or excessive CPU load or scheduler latency).
///
///
public SizeT MaxAppWQueue;
}
///
/// The TCP_ESTATS_SEND_BUFF_RW_v0 structure contains read/write configuration information for extended TCP statistics on
/// output queuing for a TCP connection.
///
///
///
/// The TCP_ESTATS_SEND_BUFF_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_SEND_BUFF_RW_v0 is defined as version 0 of the structure for read/write configuration information on output
/// queuing for a TCP connection.
///
///
/// Extended TCP statistics on output queuing for a TCP connection are enabled and disabled using this structure and the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsSendBuff is passed in the
/// EstatsType parameter.
///
///
/// The TCP_ESTATS_SEND_BUFF_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSendBuff is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_send_buff_rw_v0 typedef struct
// _TCP_ESTATS_SEND_BUFF_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_SEND_BUFF_RW_v0, *PTCP_ESTATS_SEND_BUFF_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "1bc88d95-24d2-4ca3-9f4a-298d5c08f4de")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SEND_BUFF_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected on output queuing.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)] public bool EnableCollection;
}
///
/// The TCP_ESTATS_SND_CONG_ROD_v0 structure contains read-only dynamic information for extended TCP statistics on sender
/// congestion related data for a TCP connection.
///
///
///
/// The TCP_ESTATS_SND_CONG_ROD_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_SND_CONG_ROD_v0 is defined as version 0 of the structure for read-only dynamic information on sender
/// congestion related data for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_SND_CONG_ROD_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSndCong is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// TCP congestion control and congestion control algorithms are discussed in detail in the IETF RFC on TCP Congestion Control. For
/// more information, see http://www.ietf.org/rfc/rfc2581.txt.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_SND_CONG_ROD_v0 structure to the entries defined in RFC 4898
/// for extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// SndLimTransRwin
/// tcpEStatsPerfSndLimTransRwin
///
/// -
/// SndLimTimeRwin
/// tcpEStatsPerfSndLimTimeRwin
///
/// -
/// SndLimBytesRwin
/// No mapping to this member.
///
/// -
/// SndLimTransCwnd
/// tcpEStatsPerfSndLimTransCwnd
///
/// -
/// SndLimTimeCwnd
/// tcpEStatsPerfSndLimTimeCwnd
///
/// -
/// SndLimBytesCwnd
/// No mapping to this member.
///
/// -
/// SndLimTransSnd
/// tcpEStatsPerfSndLimTransSnd
///
/// -
/// SndLimTimeSnd
/// tcpEStatsPerfSndLimTimeSnd
///
/// -
/// SndLimBytesSnd
/// No mapping to this member.
///
/// -
/// SlowStart
/// tcpEStatsStackSlowStart
///
/// -
/// CongAvoid
/// tcpEStatsStackCongAvoid
///
/// -
/// OtherReductions
/// tcpEStatsStackOtherReductions
///
/// -
/// CurCwnd
/// tcpEStatsPerfCurCwnd
///
/// -
/// MaxSsCwnd
/// tcpEStatsStackMaxSsCwnd
///
/// -
/// MaxCaCwnd
/// tcpEStatsStackMaxCaCwnd
///
/// -
/// CurSsthresh
/// tcpEStatsPerfCurSsthresh
///
/// -
/// MaxSsthresh
/// tcpEStatsStackMaxSsthresh
///
/// -
/// MinSsthresh
/// tcpEStatsStackMinSsthresh
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_snd_cong_rod_v0 typedef struct
// _TCP_ESTATS_SND_CONG_ROD_v0 { ULONG SndLimTransRwin; ULONG SndLimTimeRwin; SIZE_T SndLimBytesRwin; ULONG SndLimTransCwnd; ULONG
// SndLimTimeCwnd; SIZE_T SndLimBytesCwnd; ULONG SndLimTransSnd; ULONG SndLimTimeSnd; SIZE_T SndLimBytesSnd; ULONG SlowStart; ULONG
// CongAvoid; ULONG OtherReductions; ULONG CurCwnd; ULONG MaxSsCwnd; ULONG MaxCaCwnd; ULONG CurSsthresh; ULONG MaxSsthresh; ULONG
// MinSsthresh; } TCP_ESTATS_SND_CONG_ROD_v0, *PTCP_ESTATS_SND_CONG_ROD_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "5eb2d1c6-d4ba-4038-b598-ead517679ae7")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SND_CONG_ROD_v0
{
///
/// Type: ULONG
///
/// The number of transitions into the "Receiver Limited" state from either the "Congestion Limited" or "Sender Limited" states.
/// This state is entered whenever TCP transmission stops because the sender has filled the announced receiver window.
///
///
public uint SndLimTransRwin;
///
/// Type: ULONG
///
/// The cumulative time, in milliseconds, spent in the "Receiver Limited" state where TCP transmission stops because the sender
/// has filled the announced receiver window.
///
///
public uint SndLimTimeRwin;
///
/// Type: SIZE_T
/// The total number of bytes sent in the "Receiver Limited" state.
///
public SizeT SndLimBytesRwin;
///
/// Type: ULONG
///
/// The number of transitions into the "Congestion Limited" state from either the "Receiver Limited" or "Sender Limited" states.
/// This state is entered whenever TCP transmission stops because the sender has reached some limit defined by TCP congestion
/// control (the congestion window, for example) or other algorithms (retransmission timeouts) designed to control network traffic.
///
///
public uint SndLimTransCwnd;
///
/// Type: ULONG
///
/// The cumulative time, in milliseconds, spent in the "Congestion Limited" state. When there is a retransmission timeout, it is
/// counted in this member and not the cumulative time for some other state.
///
///
public uint SndLimTimeCwnd;
///
/// Type: SIZE_T
/// The total number of bytes sent in the "Congestion Limited" state.
///
public SizeT SndLimBytesCwnd;
///
/// Type: ULONG
///
/// The number of transitions into the "Sender Limited" state from either the "Receiver Limited" or "Congestion Limited" states.
/// This state is entered whenever TCP transmission stops due to some sender limit such as running out of application data or
/// other resources and the Karn algorithm. When TCP stops sending data for any reason, which cannot be classified as "Receiver
/// Limited" or "Congestion Limited", it is treated as "Sender Limited".
///
///
public uint SndLimTransSnd;
///
/// Type: ULONG
/// The cumulative time, in milliseconds, spent in the "Sender Limited" state.
///
public uint SndLimTimeSnd;
///
/// Type: SIZE_T
/// The total number of bytes sent in the "Sender Limited" state.
///
public SizeT SndLimBytesSnd;
///
/// Type: ULONG
/// The number of times the congestion window has been increased by the "Slow Start" algorithm.
///
public uint SlowStart;
///
/// Type: ULONG
/// The number of times the congestion window has been increased by the "Congestion Avoidance" algorithm.
///
public uint CongAvoid;
///
/// Type: ULONG
///
/// The number of congestion window reductions made as a result of anything other than congestion control algorithms other than
/// "Slow Start" and "Congestion Avoidance" algorithms.
///
///
public uint OtherReductions;
///
/// Type: ULONG
/// The size, in bytes, of the current congestion window.
///
public uint CurCwnd;
///
/// Type: ULONG
/// The maximum size, in bytes, of the congestion window size used during "Slow Start."
///
public uint MaxSsCwnd;
///
/// Type: ULONG
/// The maximum size, in bytes, of the congestion window used during "Congestion Avoidance."
///
public uint MaxCaCwnd;
///
/// Type: ULONG
/// The current size, in bytes, of the slow start threshold.
///
public uint CurSsthresh;
///
/// Type: ULONG
/// The maximum size, in bytes, of the slow start threshold, excluding the initial value.
///
public uint MaxSsthresh;
///
/// Type: ULONG
/// The minimum size, in bytes, of the slow start threshold.
///
public uint MinSsthresh;
}
///
/// The TCP_ESTATS_SND_CONG_ROS_v0 structure contains read-only static information for extended TCP statistics on the maximum
/// congestion window for a TCP connection.
///
///
///
/// The TCP_ESTATS_SND_CONG_ROS_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_SND_CONG_ROS_v0 is defined as version 0 of the structure for read-only dynamic information on basic sender
/// congestion data for a TCP connection. This information is available after the connection has been established.
///
///
/// The TCP_ESTATS_SND_CONG_ROS_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSndCong is passed in the EstatsType parameter. Extended TCP
/// statistics need to be enabled to retrieve this structure.
///
///
/// TCP congestion control and congestion control algorithms are discussed in detail in the IETF RFC on TCP Congestion Control. For
/// more information, see http://www.ietf.org/rfc/rfc2581.txt.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_SND_CONG_ROS_v0 structure to the entries defined in RFC 4898
/// for extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// LimCwnd
/// tcpEStatsTuneLimCwnd
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_snd_cong_ros_v0 typedef struct
// _TCP_ESTATS_SND_CONG_ROS_v0 { ULONG LimCwnd; } TCP_ESTATS_SND_CONG_ROS_v0, *PTCP_ESTATS_SND_CONG_ROS_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "4c92af92-ed51-4548-873f-b25207ea46dc")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SND_CONG_ROS_v0
{
/// The maximum size, in bytes, of the congestion window that may be used.
public uint LimCwnd;
}
///
/// The TCP_ESTATS_SND_CONG_RW_v0 structure contains read/write configuration information for extended TCP statistics on
/// sender congestion for a TCP connection.
///
///
///
/// The TCP_ESTATS_SND_CONG_RW_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_SND_CONG_RW_v0 is defined as version 0 of the structure for read/write configuration information on sender
/// congestion for a TCP connection.
///
///
/// Extended TCP statistics on sender congestion for a TCP connection are enabled and disabled using this structure and the
/// SetPerTcp6ConnectionEStats and SetPerTcpConnectionEStats functions when TcpConnectionEstatsSndCongs is passed in the
/// EstatsType parameter.
///
///
/// The TCP_ESTATS_SND_CONG_RW_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSndCong is passed in the EstatsType parameter.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-tcp_estats_snd_cong_rw_v0 typedef struct
// _TCP_ESTATS_SND_CONG_RW_v0 { BOOLEAN EnableCollection; } TCP_ESTATS_SND_CONG_RW_v0, *PTCP_ESTATS_SND_CONG_RW_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "7fc7fb6a-4486-450f-b60e-8cf07b33c79a")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SND_CONG_RW_v0
{
///
/// A value that indicates if extended statistics on a TCP connection should be collected for sender congestion.
///
/// If this member is set to TRUE, extended statistics on the TCP connection are enabled. If this member is set to
/// FALSE, extended statistics on the TCP connection are disabled.
///
/// The default state for this member when not set is disabled.
///
[MarshalAs(UnmanagedType.U1)]
public bool EnableCollection;
}
///
/// The TCP_ESTATS_SYN_OPTS_ROS_v0 structure contains read-only static information for extended TCP statistics on SYN exchange
/// for a TCP connection.
///
///
///
/// The TCP_ESTATS_SYN_OPTS_ROS_v0 structure is used as part of the TCP extended statistics feature available on Windows Vista
/// and later.
///
///
/// The TCP_ESTATS_SYN_OPTS_ROS_v0 is defined as version 0 of the structure for read-only static information on SYN exchange
/// for a TCP connection. The TCP protocol does not permit the members of this structure to change after the SYN exchange. This
/// information is available after the SYN exchange has completed.
///
///
/// The TCP_ESTATS_SYN_OPTS_ROS_v0 structure is retrieved by calls to the GetPerTcp6ConnectionEStats or
/// GetPerTcpConnectionEStats functions when TcpConnectionEstatsSynOpts is passed in the EstatsType parameter. Extended TCP
/// statistics do not need to be enabled to retrieve this structure.
///
///
/// The MSS in the MssRcvd and MssSent members is the maximum data in a single TCP datagram. The MSS can be a very
/// large value.
///
///
/// The members of this structure are defined in the IETF RFC on the TCP Extended Statistics MIB. For more information, see http://www.ietf.org/rfc/rfc4898.txt.
///
///
/// The following is the mapping of the members in the TCP_ESTATS_SYN_OPTS_ROS_v0 structure to the entries defined in RFC 4898
/// for extended TCP statistics:
///
///
///
/// Term
/// Description
///
/// -
/// ActiveOpen
/// tcpEStatsStackActiveOpen
///
/// -
/// MssRcvd
/// tcpEStatsStackMSSRcvd
///
/// -
/// MssSent
/// tcpEStatsStackMSSSent
///
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/tcpestats/ns-tcpestats-_tcp_estats_syn_opts_ros_v0 typedef struct
// _TCP_ESTATS_SYN_OPTS_ROS_v0 { BOOLEAN ActiveOpen; ULONG MssRcvd; ULONG MssSent; } TCP_ESTATS_SYN_OPTS_ROS_v0, *PTCP_ESTATS_SYN_OPTS_ROS_v0;
[PInvokeData("tcpestats.h", MSDNShortId = "e183b23c-ce87-4818-b6d6-2305a3aa345d")]
[StructLayout(LayoutKind.Sequential)]
public struct TCP_ESTATS_SYN_OPTS_ROS_v0
{
///
/// Type: BOOLEAN
/// A value that indicates if the TCP connection was an active open.
///
/// If the local connection traversed the SYN-SENT state, then this member is set to TRUE. Otherwise, this member is set
/// to FALSE.
///
///
[MarshalAs(UnmanagedType.U1)] public bool ActiveOpen;
///
/// Type: ULONG
/// The value received in an Maximum Segment Size (MSS) option during the SYN exchange, or zero if no MSS option was received.
/// This value is the maximum data in a single TCP datagram that the remote host can receive.
///
public uint MssRcvd;
///
/// Type: ULONG
/// The value sent in an MSS option during the SYN exchange, or zero if no MSS option was sent.
///
public uint MssSent;
}
}
}