IcmpV6Statistics 类

定义

提供本地计算机的 Internet 协议版本 6 (ICMPv6) Internet 控制消息协议的统计数据。

public ref class IcmpV6Statistics abstract
public abstract class IcmpV6Statistics
type IcmpV6Statistics = class
Public MustInherit Class IcmpV6Statistics
继承
IcmpV6Statistics

示例

以下示例显示当前的 ICMPv6 统计信息。

void ShowIcmpV6Statistics()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV6Statistics ^ stat = properties->GetIcmpV6Statistics();
   Console::WriteLine( "ICMP V6 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( "  Parameter Problems .................. Sent: {0,-10}   Received: {1,-10}", stat->ParameterProblemsSent, stat->ParameterProblemsReceived );
   Console::WriteLine( "  Packets Too Big ..................... Sent: {0,-10}   Received: {1,-10}", stat->PacketTooBigMessagesSent, stat->PacketTooBigMessagesReceived );
   Console::WriteLine( "  Redirects ........................... Sent: {0,-10}   Received: {1,-10}", stat->RedirectsSent, stat->RedirectsReceived );
   Console::WriteLine( "  Router Advertisements ............... Sent: {0,-10}   Received: {1,-10}", stat->RouterAdvertisementsSent, stat->RouterAdvertisementsReceived );
   Console::WriteLine( "  Router Solicitations ................ Sent: {0,-10}   Received: {1,-10}", stat->RouterSolicitsSent, stat->RouterSolicitsReceived );
   Console::WriteLine( "  Time Exceeded ....................... Sent: {0,-10}   Received: {1,-10}", stat->TimeExceededMessagesSent, stat->TimeExceededMessagesReceived );
   Console::WriteLine( "  Neighbor Advertisements ............. Sent: {0,-10}   Received: {1,-10}", stat->NeighborAdvertisementsSent, stat->NeighborAdvertisementsReceived );
   Console::WriteLine( "  Neighbor Solicitations .............. Sent: {0,-10}   Received: {1,-10}", stat->NeighborSolicitsSent, stat->NeighborSolicitsReceived );
   Console::WriteLine( "  Membership Queries .................. Sent: {0,-10}   Received: {1,-10}", stat->MembershipQueriesSent, stat->MembershipQueriesReceived );
   Console::WriteLine( "  Membership Reports .................. Sent: {0,-10}   Received: {1,-10}", stat->MembershipReportsSent, stat->MembershipReportsReceived );
   Console::WriteLine( "  Membership Reductions ............... Sent: {0,-10}   Received: {1,-10}", stat->MembershipReductionsSent, stat->MembershipReductionsReceived );
   Console::WriteLine( "" );
}
public static void ShowIcmpV6Statistics()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV6Statistics stat = properties.GetIcmpV6Statistics();
    Console.WriteLine("ICMP V6 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("  Parameter Problems .................. Sent: {0,-10}   Received: {1,-10}",
        stat.ParameterProblemsSent, stat.ParameterProblemsReceived);

    Console.WriteLine("  Packets Too Big ..................... Sent: {0,-10}   Received: {1,-10}",
        stat.PacketTooBigMessagesSent, stat.PacketTooBigMessagesReceived);

    Console.WriteLine("  Redirects ........................... Sent: {0,-10}   Received: {1,-10}",
        stat.RedirectsSent, stat.RedirectsReceived);

    Console.WriteLine("  Router Advertisements ............... Sent: {0,-10}   Received: {1,-10}",
        stat.RouterAdvertisementsSent, stat.RouterAdvertisementsReceived);
    Console.WriteLine("  Router Solicitations ................ Sent: {0,-10}   Received: {1,-10}",
        stat.RouterSolicitsSent, stat.RouterSolicitsReceived);

    Console.WriteLine("  Time Exceeded ....................... Sent: {0,-10}   Received: {1,-10}",
        stat.TimeExceededMessagesSent, stat.TimeExceededMessagesReceived);

    Console.WriteLine("  Neighbor Advertisements ............. Sent: {0,-10}   Received: {1,-10}",
        stat.NeighborAdvertisementsSent, stat.NeighborAdvertisementsReceived);
    Console.WriteLine("  Neighbor Solicitations .............. Sent: {0,-10}   Received: {1,-10}",
        stat.NeighborSolicitsSent, stat.NeighborSolicitsReceived);

    Console.WriteLine("  Membership Queries .................. Sent: {0,-10}   Received: {1,-10}",
        stat.MembershipQueriesSent, stat.MembershipQueriesReceived);
    Console.WriteLine("  Membership Reports .................. Sent: {0,-10}   Received: {1,-10}",
        stat.MembershipReportsSent, stat.MembershipReportsReceived);
    Console.WriteLine("  Membership Reductions ............... Sent: {0,-10}   Received: {1,-10}",
        stat.MembershipReductionsSent, stat.MembershipReductionsReceived);

    Console.WriteLine("");
}

注解

ICMPV6 是一组用于 Internet 协议版本 6 (IPv6) 的错误和信息性消息。 此方法使用 GetIcmpV6Statistics 此类返回 ICMPV6 流量信息。

此类中的属性与 IETF RFC 2466 中定义的 ICMPv6 的管理信息库对象相关联。 ICMPv6 在 RFC 2463 中定义。

构造函数

IcmpV6Statistics()

初始化 IcmpV6Statistics 类的新实例。

属性

DestinationUnreachableMessagesReceived

获取由于无法到达数据包的目标地址而接收的 Internet 控制消息协议版本 6 (ICMPv6) 消息数。

DestinationUnreachableMessagesSent

获取由于无法到达数据包的目标地址而发送的 Internet 控制消息协议版本 6 (ICMPv6) 消息数。

EchoRepliesReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 回送答复消息数。

EchoRepliesSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 回送答复消息数。

EchoRequestsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 回送请求消息数。

EchoRequestsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 回送请求消息数。

ErrorsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 错误信息数。

ErrorsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 错误信息数。

MembershipQueriesReceived

获取接收的 Internet 组管理协议 (IGMP) 组成员查询消息数。

MembershipQueriesSent

获取发送的 Internet 组管理协议 (IGMP) 组成员查询消息数。

MembershipReductionsReceived

获取接收的 Internet 组管理协议 (IGMP) 成员减少消息数。

MembershipReductionsSent

获取发送的 Internet 组管理协议 (IGMP) 成员减少消息数。

MembershipReportsReceived

获取接收的 Internet 组管理协议 (IGMP) 成员报告消息数。

MembershipReportsSent

获取发送的 Internet 组管理协议 (IGMP) 组成员报告消息数。

MessagesReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 消息数。

MessagesSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 消息数。

NeighborAdvertisementsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 邻居广播消息数。

NeighborAdvertisementsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 邻居广播消息数。

NeighborSolicitsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 邻居请求消息数。

NeighborSolicitsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 邻居请求消息数。

PacketTooBigMessagesReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 数据包太大消息数。

PacketTooBigMessagesSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 数据包太大消息数。

ParameterProblemsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 参数问题消息数。

ParameterProblemsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 参数问题消息数。

RedirectsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 重定向消息数。

RedirectsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 重定向消息数。

RouterAdvertisementsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 路由器广播消息数。

RouterAdvertisementsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 路由器广播消息数。

RouterSolicitsReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 路由器请求消息数。

RouterSolicitsSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 路由器请求消息数。

TimeExceededMessagesReceived

获取接收的 Internet 控制消息协议版本 6 (ICMPv6) 超时消息数。

TimeExceededMessagesSent

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 超时消息数。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于