IcmpV4Statistics Klasa

Definicja

Udostępnia dane statystyczne protokołu IPv4 (ICMPv4) dla komputera lokalnego.

public ref class IcmpV4Statistics abstract
public abstract class IcmpV4Statistics
type IcmpV4Statistics = class
Public MustInherit Class IcmpV4Statistics
Dziedziczenie
IcmpV4Statistics

Przykłady

Poniższy przykład przedstawia bieżące statystyki protokołu ICMPv4.

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

Uwagi

ICMPv4 to zestaw komunikatów o błędach i informacyjnych do użycia z protokołem internetowym w wersji 4. Protokół ICMP w wersji 4 jest zdefiniowany w dokumencie IETF RFC 792.

Ta klasa jest używana przez metodę GetIcmpV4Statistics do zwracania informacji o ruchu ICMPv4.

Konstruktory

IcmpV4Statistics()

Inicjuje nowe wystąpienie klasy IcmpV4Statistics.

Właściwości

AddressMaskRepliesReceived

Pobiera liczbę odebranych komunikatów odpowiedzi protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

AddressMaskRepliesSent

Pobiera liczbę wysłanych komunikatów odpowiedzi protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

AddressMaskRequestsReceived

Pobiera liczbę odebranych komunikatów żądania maski adresów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

AddressMaskRequestsSent

Pobiera liczbę wysłanych komunikatów protokołu ICMPv4 (ICMPv4).

DestinationUnreachableMessagesReceived

Pobiera liczbę komunikatów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4), które zostały odebrane z powodu pakietu o nieosiągalnym adresie w miejscu docelowym.

DestinationUnreachableMessagesSent

Pobiera liczbę komunikatów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4), które zostały wysłane z powodu pakietu o nieosiągalnym adresie w miejscu docelowym.

EchoRepliesReceived

Pobiera liczbę odebranych komunikatów odpowiedzi echo protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

EchoRepliesSent

Pobiera liczbę wysłanych komunikatów odpowiedzi echo protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

EchoRequestsReceived

Pobiera liczbę odebranych komunikatów żądania echa protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

EchoRequestsSent

Pobiera liczbę wysłanych komunikatów żądania echa protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

ErrorsReceived

Pobiera liczbę odebranych komunikatów o błędach protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

ErrorsSent

Pobiera liczbę wysłanych komunikatów o błędach protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

MessagesReceived

Pobiera liczbę odebranych komunikatów protokołu Internet Control Message Protocol.

MessagesSent

Pobiera liczbę wysłanych komunikatów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

ParameterProblemsReceived

Pobiera liczbę komunikatów o problemie z parametrami protokołu ICMPv4 (Internet Control Message Protocol w wersji 4, ICMPv4).

ParameterProblemsSent

Pobiera liczbę wysłanych komunikatów o problemie z parametrami protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

RedirectsReceived

Pobiera liczbę odebranych komunikatów przekierowania protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

RedirectsSent

Pobiera liczbę wysłanych komunikatów przekierowania protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

SourceQuenchesReceived

Pobiera liczbę odebranych komunikatów źródłowych protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

SourceQuenchesSent

Pobiera liczbę wysłanych komunikatów źródłowych protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

TimeExceededMessagesReceived

Pobiera liczbę odebranych komunikatów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

TimeExceededMessagesSent

Pobiera liczbę wysłanych komunikatów protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

TimestampRepliesReceived

Pobiera liczbę odebranych komunikatów odpowiedź sygnatury czasowej protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

TimestampRepliesSent

Pobiera liczbę wysłanych komunikatów 4 (ICMPv4) sygnatury czasowej protokołu Internet Control Message Protocol.

TimestampRequestsReceived

Pobiera liczbę odebranych komunikatów żądania znacznika czasu protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

TimestampRequestsSent

Pobiera liczbę wysłanych komunikatów żądania sygnatury czasowej protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

Metody

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Dotyczy