Retrieving Statistics for TCP and UDP (Windows CE 5.0)
IP Helper makes it possible to access information about network protocols that are used on the local computer. Use the functions described following to retrieve information about the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) on the local computer.
The GetTcpStatistics function retrieves the current statistics for TCP. Similarly, the GetUdpStatistics function retrieves the current statistics for UDP.
The GetTcpTable function retrieves the TCP connection table. The GetUdpTable retrieves the UDP listener table.
The SetTcpEntry function enables a developer to set the state of a specified TCP connection to MIB_TCP_STATE_DELETE_TCB.
The following table describes each GetTcpStatistics variable and MIB_TCPSTATS member.
Value | Description |
---|---|
pStats | Pointer to a MIB_TCPSTATS structure that, on successful return, contains the TCP statistics for the local computer. |
MIB_TCPSTATS
(All fields are read-only, and cannot be changed by the API user) |
dwRtoAlgorithm
dwRtoMin
dwRtoMax
dwMaxConn
dwActiveOpens
dwPassiveOpens
dwAttemptFails
dwEstabResets
dwCurrEstab
dwInSegs
dwOutSegs
dwRetransSegs
dwInErrs
dwOutRsts
dwNumConns
|
The following table describes each GetUdpStatistics variable and MIB_UDPSTATS member.
Value | Description |
---|---|
pStats | Pointer to a MIB_UDPSTATS structure that, on successful return, contains the UDP statistics for the local computer. |
MIB_UDPSTATS
(All fields are read-only, and cannot be changed by the API user) |
dwInDatagrams
dwNoPorts
dwInErrors
dwOutDatagrams
dwNumAddrs
|
The following table describes each GetTcpTable variable and MIB_TCPTABLE member.
Value | Description |
---|---|
pTcpTable | Pointer to a buffer that, on successful return, contains the TCP connection table as a MIB_TCPTABLE structure. |
pdwSize | Specifies the size of the buffer pointed to by the pTcpTable parameter. If the buffer is not large enough to hold the returned connection table, the function sets this parameter equal to the required buffer size. |
bOrder | Specifies whether the connection table should be sorted. If this parameter is TRUE, the table is sorted in order of:
|
MIB_TCPTABLE | dwNumEntries
table[ANY_SIZE]
|
MIB_TCPROW
(All fields are read-write, and can be changed by the API user with SetTcpEntry) |
dwState
dwLocalAddr
dwLocalPort
dwRemoteAddr
dwRemotePort
|
The following table describes each GetUdpTable variable and MIB_UDPTABLE member.
Value | Description |
---|---|
pUdpTable | Pointer to a buffer that, on successful return, contains the UDP listener table as a MIB_UDPTABLE structure. |
pdwSize | Specifies the size of the buffer pointed to by the pUdpTable parameter. If the buffer is not large enough to hold the returned listener table, the function sets this parameter equal to the required buffer size. |
bOrder | Specifies whether the returned table should be sorted. If this parameter is TRUE, the table is sorted in order of:
|
MIB_UDPTABLE
(All fields are read-only, and cannot be changed by the API user) |
dwNumEntries
table[ANY_SIZE]
|
MIB_UDPTABLE
(All fields are read-only, and cannot be changed by the API user) |
dwLocalAddr
dwLocalPort
|
The following table describes each SetTcpEntry variable.
Value | Description |
---|---|
pTcpRow | Pointer to a MIB_TCPROW structure (See the GetTcpTable description above). This structure contains information to identify the TCP connection to modify. It also specifies the new state for the TCP connection. The caller must specify values for all the members in this structure. |
See Also
Send Feedback on this topic to the authors