GetIcmpStatisticsEx function
The GetIcmpStatisticsEx function retrieves Internet Control Message Protocol (ICMP) statistics for the local computer. The GetIcmpStatisticsEx function is capable of retrieving IPv6 ICMP statistics.
Syntax
DWORD GetIcmpStatisticsEx( _Out_ PMIB_ICMP_EX pStats, _In_ DWORD dwFamily );
Parameters
- pStats [out]
-
A pointer to a MIB_ICMP_EX structure that contains ICMP statistics for the local computer.
- dwFamily [in]
-
The protocol family for which to retrieve ICMP statistics. Must be one of the following:
Value Meaning - AF_INET
Internet Protocol version 4 (IPv4).
- AF_INET6
Internet Protocol version 6 (IPv6).
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.
| Return code | Description |
|---|---|
|
The pStats parameter is NULL or does not point to valid memory, or the dwFamily parameter is not a valid value. |
|
This function is not supported on the operating system on which the function call was made. |
|
Use FormatMessage to obtain the message string for the returned error. |
Remarks
The GetIpStatisticsEx can be used to obtain the ICMP statistics for either IPv4 or IPv6 on the local computer.
The GetIcmpStatistics function returns the ICMP statistics for only IPv4 on the local computer.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- IP Helper Start Page
- IP Helper Function Reference
- GetIcmpStatistics
- GetTcpStatisticsEx
- GetUdpStatisticsEx
- MIB_ICMP_EX