IPGlobalProperties.GetIcmpV6Statistics メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ローカル コンピューターのインターネット コントロール メッセージ プロトコル (ICMP: Internet Control Message Protocol) Version 6 の統計データを提供します。
public:
abstract System::Net::NetworkInformation::IcmpV6Statistics ^ GetIcmpV6Statistics();
public abstract System.Net.NetworkInformation.IcmpV6Statistics GetIcmpV6Statistics ();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract System.Net.NetworkInformation.IcmpV6Statistics GetIcmpV6Statistics ();
abstract member GetIcmpV6Statistics : unit -> System.Net.NetworkInformation.IcmpV6Statistics
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
abstract member GetIcmpV6Statistics : unit -> System.Net.NetworkInformation.IcmpV6Statistics
Public MustOverride Function GetIcmpV6Statistics () As IcmpV6Statistics
戻り値
ローカル コンピューターの ICMP version 6 トラフィック統計情報を提供する IcmpV6Statistics オブジェクト。
- 属性
例外
Win32 関数 GetIcmpStatisticsEx
が失敗しました。
ローカル コンピューターのオペレーティング システムが Windows XP 以降ではありません。
例
次の例では、現在の 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("");
}
注釈
ICMP バージョン 6 は、インターネット プロトコル バージョン 6 (IPv6) で使用するメッセージのセットです。 ICMP は、データ パケットの処理中に発生したエラーを報告したり、他のインターネット層機能を実行したりするために、IPv6 ノードによって使用されます。 ICMP バージョン 6 は IETF RFC 1885 で定義されています。
IPv6 プロトコルは、Windows 2000 以前のオペレーティング システムを搭載したコンピューターではサポートされていません。
アプリケーションで使用できる ICMP バージョン 6 のトラフィック統計の詳細については、クラスのドキュメントを IcmpV6Statistics 参照してください。 IcmpV6Statisticsこのメソッドによって返されるオブジェクトには、オブジェクトが作成された時点の統計が反映されることに注意してください。 この情報は動的に更新されません。
適用対象
.NET