IcmpV4Statistics Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

System.Object
  System.Net.NetworkInformation.IcmpV4Statistics

public abstract class IcmpV4Statistics

NameDescription
System_CAPS_protmethodIcmpV4Statistics()

Initializes a new instance of the IcmpV4Statistics class.

NameDescription
System_CAPS_pubpropertyAddressMaskRepliesReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were received.

System_CAPS_pubpropertyAddressMaskRepliesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were sent.

System_CAPS_pubpropertyAddressMaskRequestsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were received.

System_CAPS_pubpropertyAddressMaskRequestsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were sent.

System_CAPS_pubpropertyDestinationUnreachableMessagesReceived

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.

System_CAPS_pubpropertyDestinationUnreachableMessagesSent

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.

System_CAPS_pubpropertyEchoRepliesReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were received.

System_CAPS_pubpropertyEchoRepliesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were sent.

System_CAPS_pubpropertyEchoRequestsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were received.

System_CAPS_pubpropertyEchoRequestsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were sent.

System_CAPS_pubpropertyErrorsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were received.

System_CAPS_pubpropertyErrorsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were sent.

System_CAPS_pubpropertyMessagesReceived

Gets the number of Internet Control Message Protocol messages that were received.

System_CAPS_pubpropertyMessagesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent.

System_CAPS_pubpropertyParameterProblemsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were received.

System_CAPS_pubpropertyParameterProblemsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were sent.

System_CAPS_pubpropertyRedirectsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were received.

System_CAPS_pubpropertyRedirectsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were sent.

System_CAPS_pubpropertySourceQuenchesReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were received.

System_CAPS_pubpropertySourceQuenchesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were sent.

System_CAPS_pubpropertyTimeExceededMessagesReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were received.

System_CAPS_pubpropertyTimeExceededMessagesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were sent.

System_CAPS_pubpropertyTimestampRepliesReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were received.

System_CAPS_pubpropertyTimestampRepliesSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were sent.

System_CAPS_pubpropertyTimestampRequestsReceived

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were received.

System_CAPS_pubpropertyTimestampRequestsSent

Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were sent.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

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("");
}

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: