Freigeben über


GetPerTcpConnectionEStats (Compact 2013)

3/26/2014

This function retrieves extended statistics for an IPv4 TCP connection.

Syntax

ULONG WINAPI GetPerTcpConnectionEStats(
         PMIB_TCPROW Row,
         TCP_ESTATS_TYPE EstatsType,
  __out  PUCHAR Rw,
         ULONG RwVersion,
         ULONG RwSize,
  __out  PUCHAR Ros,
         ULONG RosVersion,
         ULONG RosSize,
  __out  PUCHAR Rod,
         ULONG RodVersion,
         ULONG RodSize
);

Parameters

  • Row
    A pointer to a MIB_TCPROW structure for an IPv4 TCP connection.
  • EstatsType
    The type of extended statistics for TCP requested. This parameter determines the data and format of information that is returned in the Rw, Rod, and Ros parameters if the call is successful.

    This parameter can be one of the values from the TCP_ESTATS_TYPE enumeration type that is defined in the Tcpestats.h header file.

  • Rw
    A pointer to a buffer to receive the read/write information. This parameter may be a NULL pointer if an application does not want to retrieve read/write information for the TCP connection.
  • RwVersion
    The version of the read/write information requested.
  • RwSize
    The size, in bytes, of the buffer pointed to by Rw parameter.
  • Ros
    A pointer to a buffer to receive read-only static information. This parameter may be a NULL pointer if an application does not want to retrieve read-only static information for the TCP connection.
  • RosVersion
    The version of the read-only static information requested.
  • RosSize
    The size, in bytes, of the buffer pointed to by the Ros parameter.
  • Rod
    A pointer to a buffer to receive read-only dynamic information. This parameter may be a NULL pointer if an application does not want to retrieve read-only dynamic information for the TCP connection.
  • RodVersion
    The version of the read-only dynamic information requested.
  • RodSize
    The size, in bytes, of the buffer pointed to by the Rod parameter.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Error Code

Meaning

ERROR_INSUFFICIENT_BUFFER

A buffer that is passed to a function is too small. This error is returned if the buffer pointed to by the Rw, Ros, or Rod parameters is not large enough to receive the data. This error also returned if one of the given buffers pointed to by the Rw, Ros, or Rod parameters is NULL, but a length was specified in the associated RwSize, RosSize, or RodSize.

ERROR_INVALID_PARAMETER

The parameter is incorrect. This error is returned if the Row parameter is a NULL pointer.

ERROR_NOT_FOUND

This requested entry was not found. This error is returned if the TCP connection specified in the Row parameter could not be found.

Other

Use FormatMessage to obtain the message string for the returned error.

Remarks

The GetPerTcpConnectionEStats function is 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 whether 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 GetPerTcpConnectionEStats function retrieves extended statistics for the IPv4 TCP connection passed in the Row parameter. The type of extended statistics that is retrieved is specified in the EstatsType parameter. Extended statistics on this TCP connection must have previously been enabled by calls to the SetPerTcpConnectionEStats function for all TCP_ESTATS_TYPE values except when TcpConnectionEstatsSynOpts is passed in the EstatsType parameter.

The GetTcpTable function is used to retrieve the IPv4 TCP connection table on the local device. This function returns a MIB_TCPTABLE structure that contain an array of MIB_TCPROW entries. The Row parameter that is passed to the GetPerTcpConnectionEStats function must be an entry for an existing IPv4 TCP connection.

The only version of TCP connection statistics currently supported is version zero. So, the RwVersion, RosVersion, and RodVersion parameters that are passed to GetPerTcpConnectionEStats should be set to 0.

For information on extended TCP statistics on an IPv6 connection, see the GetPerTcp6ConnectionEStats and SetPerTcp6ConnectionEStats functions.

See Also

Reference

IP Helper Functions
GetPerTcp6ConnectionEStats
GetTcpTable
MIB_TCPROW
MIB_TCPTABLE
SetPerTcp6ConnectionEStats
SetPerTcpConnectionEStats
TCP_ESTATS_BANDWIDTH_RW_v0
TCP_ESTATS_DATA_RW_v0
TCP_ESTATS_FINE_RTT_RW_v0
TCP_ESTATS_OBS_REC_RW_v0
TCP_ESTATS_PATH_RW_v0
TCP_ESTATS_REC_RW_v0
TCP_ESTATS_SEND_BUFF_RW_v0
TCP_ESTATS_SND_CONG_RW_v0
TCP_ESTATS_SYN_OPTS_ROS_v0
TCP_ESTATS_TYPE
TCP_SOFT_ERROR