IcmpV4Statistics Class
Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.
Assembly: System (in System.dll)
ICMPv4 is a set of error and informational messages for use with Internet Protocol version 4. ICMP version 4 is defined in IETF RFC 792.
This class is used by the GetIcmpV4Statistics method to return ICMPv4 traffic information.
The following example displays the current ICMPv4 statistics.
void ShowIcmpV4Statistics()
{
IPGlobalProperties* properties = IPGlobalProperties::GetIPGlobalProperties();
IcmpV4Statistics* stat = properties->GetIcmpV4Statistics();
Console::WriteLine(S"ICMP V4 Statistics:");
Console::WriteLine(S" Messages ............................ Sent: {0,-10} Received: {1,-10}",
__box(stat->MessagesSent), __box(stat->MessagesReceived));
Console::WriteLine(S" Errors .............................. Sent: {0,-10} Received: {1,-10}",
__box(stat->ErrorsSent), __box(stat->ErrorsReceived));
Console::WriteLine(S" Echo Requests ....................... Sent: {0,-10} Received: {1,-10}",
__box(stat->EchoRequestsSent), __box(stat->EchoRequestsReceived));
Console::WriteLine(S" Echo Replies ........................ Sent: {0,-10} Received: {1,-10}",
__box(stat->EchoRepliesSent), __box(stat->EchoRepliesReceived));
Console::WriteLine(S" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
__box(stat->DestinationUnreachableMessagesSent), __box(stat->DestinationUnreachableMessagesReceived));
Console::WriteLine(S" Source Quenches ..................... Sent: {0,-10} Received: {1,-10}",
__box(stat->SourceQuenchesSent), __box(stat->SourceQuenchesReceived));
Console::WriteLine(S" Redirects ........................... Sent: {0,-10} Received: {1,-10}",
__box(stat->RedirectsSent), __box(stat->RedirectsReceived));
Console::WriteLine(S" TimeExceeded ........................ Sent: {0,-10} Received: {1,-10}",
__box(stat->TimeExceededMessagesSent), __box(stat->TimeExceededMessagesReceived));
Console::WriteLine(S" Parameter Problems .................. Sent: {0,-10} Received: {1,-10}",
__box(stat->ParameterProblemsSent), __box(stat->ParameterProblemsReceived));
Console::WriteLine(S" Timestamp Requests .................. Sent: {0,-10} Received: {1,-10}",
__box(stat->TimestampRequestsSent), __box(stat->TimestampRequestsReceived));
Console::WriteLine(S" Timestamp Replies ................... Sent: {0,-10} Received: {1,-10}",
__box(stat->TimestampRepliesSent), __box(stat->TimestampRepliesReceived));
Console::WriteLine(S" Address Mask Requests ............... Sent: {0,-10} Received: {1,-10}",
__box(stat->AddressMaskRequestsSent), __box(stat->AddressMaskRequestsReceived));
Console::WriteLine(S" Address Mask Replies ................ Sent: {0,-10} Received: {1,-10}",
__box(stat->AddressMaskRepliesSent), __box(stat->AddressMaskRepliesReceived));
Console::WriteLine(S"");
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.