IPGlobalProperties.GetIcmpV6Statistics Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Proporciona datos estadísticos de ICMP (Protocolo de mensajes de control de Internet) versión 6 para el equipo local.
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
Devoluciones
Objeto IcmpV6Statistics que proporciona estadísticas de tráfico de ICMP versión 6 para el equipo local.
- Atributos
Excepciones
Se ha producido un error en la función GetIcmpStatisticsEx
de Win32.
El sistema operativo del equipo local no es Windows XP o posterior.
Ejemplos
En el ejemplo siguiente se muestran las estadísticas actuales de 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("");
}
Comentarios
ICMP versión 6 es un conjunto de mensajes para su uso con el Protocolo de Internet versión 6 (IPv6). Los nodos IPv6 usan ICMP para notificar errores detectados en el procesamiento de paquetes de datos y para realizar otras funciones de capa de Internet. ICMP versión 6 se define en IETF RFC 1885.
El protocolo IPv6 no es compatible con equipos con Windows 2000 o sistemas operativos anteriores.
Para obtener más información sobre las estadísticas de tráfico de la versión 6 de ICMP disponibles para las aplicaciones, consulte la documentación de la IcmpV6Statistics clase . Tenga en cuenta que el IcmpV6Statistics objeto devuelto por este método refleja las estadísticas a partir de la hora en que se crea el objeto. Esta información no se actualiza dinámicamente.