IcmpV4Statistics Class
Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.
Namespace: System.Net.NetworkInformation
Assembly: System (in System.dll)
The IcmpV4Statistics type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AddressMaskRepliesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were received. |
![]() | AddressMaskRepliesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were sent. |
![]() | AddressMaskRequestsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were received. |
![]() | AddressMaskRequestsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were sent. |
![]() | DestinationUnreachableMessagesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were received because of a packet having an unreachable address in its destination. |
![]() | DestinationUnreachableMessagesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent because of a packet having an unreachable address in its destination. |
![]() | EchoRepliesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were received. |
![]() | EchoRepliesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were sent. |
![]() | EchoRequestsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were received. |
![]() | EchoRequestsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were sent. |
![]() | ErrorsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were received. |
![]() | ErrorsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were sent. |
![]() | MessagesReceived | Gets the number of Internet Control Message Protocol messages that were received. |
![]() | MessagesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent. |
![]() | ParameterProblemsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were received. |
![]() | ParameterProblemsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were sent. |
![]() | RedirectsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were received. |
![]() | RedirectsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were sent. |
![]() | SourceQuenchesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were received. |
![]() | SourceQuenchesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were sent. |
![]() | TimeExceededMessagesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were received. |
![]() | TimeExceededMessagesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were sent. |
![]() | TimestampRepliesReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were received. |
![]() | TimestampRepliesSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were sent. |
![]() | TimestampRequestsReceived | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were received. |
![]() | TimestampRequestsSent | Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were sent. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
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.
public static void ShowIcmpV4Statistics() { IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(); IcmpV4Statistics stat = properties.GetIcmpV4Statistics(); Console.WriteLine("ICMP V4 Statistics:"); Console.WriteLine(" Messages ............................ Sent: {0,-10} Received: {1,-10}", stat.MessagesSent, stat.MessagesReceived); Console.WriteLine(" Errors .............................. Sent: {0,-10} Received: {1,-10}", stat.ErrorsSent, stat.ErrorsReceived); Console.WriteLine(" Echo Requests ....................... Sent: {0,-10} Received: {1,-10}", stat.EchoRequestsSent, stat.EchoRequestsReceived); Console.WriteLine(" Echo Replies ........................ Sent: {0,-10} Received: {1,-10}", stat.EchoRepliesSent, stat.EchoRepliesReceived); Console.WriteLine(" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}", stat.DestinationUnreachableMessagesSent, stat.DestinationUnreachableMessagesReceived); Console.WriteLine(" Source Quenches ..................... Sent: {0,-10} Received: {1,-10}", stat.SourceQuenchesSent, stat.SourceQuenchesReceived); Console.WriteLine(" Redirects ........................... Sent: {0,-10} Received: {1,-10}", stat.RedirectsSent, stat.RedirectsReceived); Console.WriteLine(" TimeExceeded ........................ Sent: {0,-10} Received: {1,-10}", stat.TimeExceededMessagesSent, stat.TimeExceededMessagesReceived); Console.WriteLine(" Parameter Problems .................. Sent: {0,-10} Received: {1,-10}", stat.ParameterProblemsSent, stat.ParameterProblemsReceived); Console.WriteLine(" Timestamp Requests .................. Sent: {0,-10} Received: {1,-10}", stat.TimestampRequestsSent, stat.TimestampRequestsReceived); Console.WriteLine(" Timestamp Replies ................... Sent: {0,-10} Received: {1,-10}", stat.TimestampRepliesSent, stat.TimestampRepliesReceived); Console.WriteLine(" Address Mask Requests ............... Sent: {0,-10} Received: {1,-10}", stat.AddressMaskRequestsSent, stat.AddressMaskRequestsReceived); Console.WriteLine(" Address Mask Replies ................ Sent: {0,-10} Received: {1,-10}", stat.AddressMaskRepliesSent, stat.AddressMaskRepliesReceived); Console.WriteLine(""); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


