IcmpV4Statistics Класс

Определение

Предоставляет статистику протокола ICMPv4 для локального компьютера.Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.

public ref class IcmpV4Statistics abstract
public abstract class IcmpV4Statistics
type IcmpV4Statistics = class
Public MustInherit Class IcmpV4Statistics
Наследование
IcmpV4Statistics

Примеры

В следующем примере показана текущая статистика ICMPv4.The following example displays the current ICMPv4 statistics.

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

Комментарии

ICMPv4 — это набор сообщений об ошибках и информационные сообщения для использования с протоколом IP версии 4.ICMPv4 is a set of error and informational messages for use with Internet Protocol version 4. ICMP версии 4 определен в стандарте IETF RFC 792.ICMP version 4 is defined in IETF RFC 792.

Этот класс используется методом GetIcmpV4Statistics для получения сведений о трафике ICMPv4.This class is used by the GetIcmpV4Statistics method to return ICMPv4 traffic information.

Конструкторы

IcmpV4Statistics()

Инициализирует новый экземпляр класса IcmpV4Statistics.Initializes a new instance of the IcmpV4Statistics class.

Свойства

AddressMaskRepliesReceived

Возвращает количество полученных сообщений ICMPv4 "Ответ с маской адреса" (Address Mask Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were received.

AddressMaskRepliesSent

Возвращает количество отправленных сообщений ICMPv4 "Ответ с маской адреса" (Address Mask Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were sent.

AddressMaskRequestsReceived

Возвращает количество полученных сообщений ICMPv4 "Запрос маски адреса" (Address Mask Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were received.

AddressMaskRequestsSent

Возвращает количество отправленных сообщений ICMPv4 "Запрос маски адреса" (Address Mask Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were sent.

DestinationUnreachableMessagesReceived

Возвращает количество сообщений ICMPv4, полученных из-за того, что пакет имеет недоступный адрес в поле назначения.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

Возвращает количество сообщений ICMPv4, отправленных из-за того, что пакет имеет недоступный адрес в поле назначения.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

Возвращает количество полученных сообщений ICMPv4 "Ответ проверки связи" (Echo Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were received.

EchoRepliesSent

Возвращает количество отправленных сообщений ICMPv4 "Ответ проверки связи" (Echo Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were sent.

EchoRequestsReceived

Возвращает количество полученных сообщений ICMPv4 "Запрос проверки связи" (Echo Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were received.

EchoRequestsSent

Возвращает количество отправленных сообщений ICMPv4 "Запрос проверки связи" (Echo Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were sent.

ErrorsReceived

Возвращает количество полученных сообщений ICMPv4 об ошибках.Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were received.

ErrorsSent

Возвращает количество отправленных сообщений ICMPv4 об ошибках.Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were sent.

MessagesReceived

Возвращает количество полученных сообщений ICMP.Gets the number of Internet Control Message Protocol messages that were received.

MessagesSent

Возвращает количество отправленных сообщений ICMPv4.Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent.

ParameterProblemsReceived

Возвращает количество полученных сообщений ICMPv4 "Ошибка параметра" (Parameter Problem).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were received.

ParameterProblemsSent

Возвращает количество отправленных сообщений ICMPv4 "Ошибка параметра" (Parameter Problem).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were sent.

RedirectsReceived

Возвращает количество полученных сообщений ICMPv4 "Перенаправление маршрута" (Redirect).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were received.

RedirectsSent

Возвращает количество отправленных сообщений ICMPv4 "Перенаправление маршрута" (Redirect).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were sent.

SourceQuenchesReceived

Возвращает количество полученных сообщений ICMPv4 "Понижение скорости источником" (Source Quench).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were received.

SourceQuenchesSent

Возвращает количество отправленных сообщений ICMPv4 "Понижение скорости источником" (Source Quench).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were sent.

TimeExceededMessagesReceived

Возвращает количество полученных сообщений ICMPv4 "Превышено время" (Time Exceeded).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were received.

TimeExceededMessagesSent

Возвращает количество отправленных сообщений ICMPv4 "Превышено время" (Time Exceeded).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were sent.

TimestampRepliesReceived

Возвращает количество полученных сообщений ICMPv4 "Ответ штампа времени" (Timestamp Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were received.

TimestampRepliesSent

Возвращает количество отправленных сообщений ICMPv4 "Ответ штампа времени" (Timestamp Reply).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were sent.

TimestampRequestsReceived

Возвращает количество полученных сообщений ICMPv4 "Запрос штампа времени" (Timestamp Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were received.

TimestampRequestsSent

Возвращает количество отправленных сообщений ICMPv4 "Запрос штампа времени" (Timestamp Request).Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were sent.

Методы

Equals(Object)

Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object.

(Унаследовано от Object)
GetHashCode()

Служит в качестве хэш-функции по умолчанию.Serves as the default hash function.

(Унаследовано от Object)
GetType()

Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance.

(Унаследовано от Object)
MemberwiseClone()

Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object.

(Унаследовано от Object)
ToString()

Возвращает строку, представляющую текущий объект.Returns a string that represents the current object.

(Унаследовано от Object)

Применяется к