IPGlobalStatistics IPGlobalStatistics IPGlobalStatistics IPGlobalStatistics Class

Definition

Stellt IP (Internet Protocol)-Statistikdaten bereit.Provides Internet Protocol (IP) statistical data.

public ref class IPGlobalStatistics abstract
public abstract class IPGlobalStatistics
type IPGlobalStatistics = class
Public MustInherit Class IPGlobalStatistics
Vererbung
IPGlobalStatisticsIPGlobalStatisticsIPGlobalStatisticsIPGlobalStatistics

Beispiele

Das folgende Codebeispiel zeigt die IP-Statistiken.The following code example displays IP statistics.

void ShowIPStatistics( NetworkInterfaceComponent version )
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IPGlobalStatistics ^ ipstat = nullptr;
   switch ( version )
   {
      case NetworkInterfaceComponent::IPv4:
         ipstat = properties->GetIPv4GlobalStatistics();
         Console::WriteLine( "{0}IPv4 Statistics ", Environment::NewLine );
         break;

      case NetworkInterfaceComponent::IPv6:
         ipstat = properties->GetIPv4GlobalStatistics();
         Console::WriteLine( "{0}IPv6 Statistics ", Environment::NewLine );
         break;

      default:
         throw gcnew ArgumentException( "version" );
         break;
   }

   Console::WriteLine( "  Forwarding enabled ...................... : {0}",
      ipstat->ForwardingEnabled );
   Console::WriteLine( "  Interfaces .............................. : {0}",
      ipstat->NumberOfInterfaces );
   Console::WriteLine( "  IP addresses ............................ : {0}",
      ipstat->NumberOfIPAddresses );
   Console::WriteLine( "  Routes .................................. : {0}",
      ipstat->NumberOfRoutes );
   Console::WriteLine( "  Default TTL ............................. : {0}",
      ipstat->DefaultTtl );
   Console::WriteLine( "" );
   Console::WriteLine( "  Inbound Packet Data:" );
   Console::WriteLine( "      Received ............................ : {0}",
      ipstat->ReceivedPackets );
   Console::WriteLine( "      Forwarded ........................... : {0}",
      ipstat->ReceivedPacketsForwarded );
   Console::WriteLine( "      Delivered ........................... : {0}",
      ipstat->ReceivedPacketsDelivered );
   Console::WriteLine( "      Discarded ........................... : {0}",
      ipstat->ReceivedPacketsDiscarded );
   Console::WriteLine( "      Header Errors ....................... : {0}",
      ipstat->ReceivedPacketsWithHeadersErrors );
   Console::WriteLine( "      Address Errors ...................... : {0}",
      ipstat->ReceivedPacketsWithAddressErrors );
   Console::WriteLine( "      Unknown Protocol Errors ............. : {0}",
      ipstat->ReceivedPacketsWithUnknownProtocol );
   Console::WriteLine( "" );
   Console::WriteLine( "  Outbound Packet Data:" );
   Console::WriteLine( "      Requested ........................... : {0}",
      ipstat->OutputPacketRequests );
   Console::WriteLine( "      Discarded ........................... : {0}",
      ipstat->OutputPacketsDiscarded );
   Console::WriteLine( "      No Routing Discards ................. : {0}",
      ipstat->OutputPacketsWithNoRoute );
   Console::WriteLine( "      Routing Entry Discards .............. : {0}",
      ipstat->OutputPacketRoutingDiscards );
   Console::WriteLine( "" );
   Console::WriteLine( "  Reassembly Data:" );
   Console::WriteLine( "      Reassembly Timeout .................. : {0}",
      ipstat->PacketReassemblyTimeout );
   Console::WriteLine( "      Reassemblies Required ............... : {0}",
      ipstat->PacketReassembliesRequired );
   Console::WriteLine( "      Packets Reassembled ................. : {0}",
      ipstat->PacketsReassembled );
   Console::WriteLine( "      Packets Fragmented .................. : {0}",
      ipstat->PacketsFragmented );
   Console::WriteLine( "      Fragment Failures ................... : {0}",
      ipstat->PacketFragmentFailures );
   Console::WriteLine( "" );
}
public static void ShowIPStatistics(NetworkInterfaceComponent version)
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IPGlobalStatistics ipstat = null;
    switch (version)
    {
        case NetworkInterfaceComponent.IPv4:
             ipstat = properties.GetIPv4GlobalStatistics();
           Console.WriteLine("{0}IPv4 Statistics ",Environment.NewLine);
            break;
        case NetworkInterfaceComponent.IPv6:
            ipstat = properties.GetIPv4GlobalStatistics();
            Console.WriteLine("{0}IPv6 Statistics ",Environment.NewLine);
            break;
        default:
            throw new ArgumentException("version");
        //    break;
    }
    Console.WriteLine("  Forwarding enabled ...................... : {0}", 
        ipstat.ForwardingEnabled);
    Console.WriteLine("  Interfaces .............................. : {0}", 
        ipstat.NumberOfInterfaces);
    Console.WriteLine("  IP addresses ............................ : {0}", 
        ipstat.NumberOfIPAddresses);
    Console.WriteLine("  Routes .................................. : {0}", 
        ipstat.NumberOfRoutes);
    Console.WriteLine("  Default TTL ............................. : {0}", 
        ipstat.DefaultTtl);
    Console.WriteLine("");    
    Console.WriteLine("  Inbound Packet Data:");
    Console.WriteLine("      Received ............................ : {0}", 
        ipstat.ReceivedPackets);
    Console.WriteLine("      Forwarded ........................... : {0}", 
        ipstat.ReceivedPacketsForwarded);
    Console.WriteLine("      Delivered ........................... : {0}", 
        ipstat.ReceivedPacketsDelivered);
    Console.WriteLine("      Discarded ........................... : {0}", 
        ipstat.ReceivedPacketsDiscarded);
    Console.WriteLine("      Header Errors ....................... : {0}", 
        ipstat.ReceivedPacketsWithHeadersErrors);
    Console.WriteLine("      Address Errors ...................... : {0}", 
        ipstat.ReceivedPacketsWithAddressErrors);
    Console.WriteLine("      Unknown Protocol Errors ............. : {0}", 
        ipstat.ReceivedPacketsWithUnknownProtocol);
    Console.WriteLine("");    
    Console.WriteLine("  Outbound Packet Data:");
    Console.WriteLine("      Requested ........................... : {0}", 
         ipstat.OutputPacketRequests);
    Console.WriteLine("      Discarded ........................... : {0}", 
        ipstat.OutputPacketsDiscarded);
    Console.WriteLine("      No Routing Discards ................. : {0}", 
        ipstat.OutputPacketsWithNoRoute);
    Console.WriteLine("      Routing Entry Discards .............. : {0}", 
        ipstat.OutputPacketRoutingDiscards);
    Console.WriteLine("");    
    Console.WriteLine("  Reassembly Data:");
    Console.WriteLine("      Reassembly Timeout .................. : {0}", 
        ipstat.PacketReassemblyTimeout);
    Console.WriteLine("      Reassemblies Required ............... : {0}", 
        ipstat.PacketReassembliesRequired);
    Console.WriteLine("      Packets Reassembled ................. : {0}", 
        ipstat.PacketsReassembled);
    Console.WriteLine("      Packets Fragmented .................. : {0}", 
        ipstat.PacketsFragmented);
    Console.WriteLine("      Fragment Failures ................... : {0}", 
        ipstat.PacketFragmentFailures);
    Console.WriteLine("");
}

Hinweise

Diese Klasse wird verwendet, durch die GetIPv4GlobalStatistics und GetIPv6GlobalStatistics Verkehrsinformationen für Methoden, um-IP-zurückzugeben.This class is used by the GetIPv4GlobalStatistics and GetIPv6GlobalStatistics methods to return IP traffic information.

Internet Protocol wird verwendet, um die IP-Pakete von einem Quellcomputer auf einen Zielcomputer verschieben.The Internet protocol is used to move IP packets from a source computer to a destination computer. IP verarbeitet auch das Aufteilen eines Pakets, das in mehrere Pakete zu groß ist, die klein genug ist, für die Übertragung dieser Prozess wird als Fragmentierung bezeichnet.IP also handles dividing a packet that is too large into multiple packets that are small enough for transport, in a process known as fragmentation.

Die Eigenschaften in dieser Klasse entsprechen der Management Information Base-Objekten für IP-Adresse in IETF RFC 2011 definiert.The properties in this class correlate to the Management Information Base objects for IP defined in IETF RFC 2011.

Konstruktoren

IPGlobalStatistics() IPGlobalStatistics() IPGlobalStatistics() IPGlobalStatistics()

Initialisiert eine neue Instanz der IPGlobalStatistics-Klasse.Initializes a new instance of the IPGlobalStatistics class.

Eigenschaften

DefaultTtl DefaultTtl DefaultTtl DefaultTtl

Ruft den Standardwert der Gültigkeitsdauer (TTL) für IP (Internet Protocol)-Pakete ab.Gets the default time-to-live (TTL) value for Internet Protocol (IP) packets.

ForwardingEnabled ForwardingEnabled ForwardingEnabled ForwardingEnabled

Ruft einen Boolean-Wert ab, der angibt, ob die Weiterleitung von IP (Internet Protocol)-Paketen aktiviert ist.Gets a Boolean value that specifies whether Internet Protocol (IP) packet forwarding is enabled.

NumberOfInterfaces NumberOfInterfaces NumberOfInterfaces NumberOfInterfaces

Ruft die Anzahl der Netzwerkschnittstellen ab.Gets the number of network interfaces.

NumberOfIPAddresses NumberOfIPAddresses NumberOfIPAddresses NumberOfIPAddresses

Ruft die Anzahl der vom lokalen Computer zugewiesenen IP (Internet Protocol)-Adressen ab.Gets the number of Internet Protocol (IP) addresses assigned to the local computer.

NumberOfRoutes NumberOfRoutes NumberOfRoutes NumberOfRoutes

Ruft die Anzahl der Routen in der IP (Internet Protocol)-Routingtabelle ab.Gets the number of routes in the Internet Protocol (IP) routing table.

OutputPacketRequests OutputPacketRequests OutputPacketRequests OutputPacketRequests

Ruft die Anzahl ausgehender IP (Internet Protocol)-Pakete ab.Gets the number of outbound Internet Protocol (IP) packets.

OutputPacketRoutingDiscards OutputPacketRoutingDiscards OutputPacketRoutingDiscards OutputPacketRoutingDiscards

Ruft die Anzahl der Routen aus der Routingtabelle ab, die verworfen wurden.Gets the number of routes that have been discarded from the routing table.

OutputPacketsDiscarded OutputPacketsDiscarded OutputPacketsDiscarded OutputPacketsDiscarded

Ruft die Anzahl der übertragenen IP (Internet Protocol)-Pakete ab, die verworfen wurden.Gets the number of transmitted Internet Protocol (IP) packets that have been discarded.

OutputPacketsWithNoRoute OutputPacketsWithNoRoute OutputPacketsWithNoRoute OutputPacketsWithNoRoute

Ruft die Anzahl der IP (Internet Protocol)-Pakete ab, für die der lokale Computer keine Route zur Zieladresse bestimmen konnte.Gets the number of Internet Protocol (IP) packets for which the local computer could not determine a route to the destination address.

PacketFragmentFailures PacketFragmentFailures PacketFragmentFailures PacketFragmentFailures

Ruft die Anzahl der IP (Internet Protocol)-Pakete ab, die nicht fragmentiert werden konnten.Gets the number of Internet Protocol (IP) packets that could not be fragmented.

PacketReassembliesRequired PacketReassembliesRequired PacketReassembliesRequired PacketReassembliesRequired

Ruft die Anzahl der IP (Internet Protocol)-Pakete ab, die wieder zusammengefügt werden mussten.Gets the number of Internet Protocol (IP) packets that required reassembly.

PacketReassemblyFailures PacketReassemblyFailures PacketReassemblyFailures PacketReassemblyFailures

Ruft die Anzahl der IP (Internet Protocol)-Pakete ab, die nicht erfolgreich wieder zusammengefügt werden konnten.Gets the number of Internet Protocol (IP) packets that were not successfully reassembled.

PacketReassemblyTimeout PacketReassemblyTimeout PacketReassemblyTimeout PacketReassemblyTimeout

Ruft die maximale Zeitspanne ab, in der alle Fragmente eines IP (Internet Protocol)-Pakets eintreffen müssen.Gets the maximum amount of time within which all fragments of an Internet Protocol (IP) packet must arrive.

PacketsFragmented PacketsFragmented PacketsFragmented PacketsFragmented

Ruft die Anzahl der fragmentierten IP (Internet Protocol)-Pakete ab.Gets the number of Internet Protocol (IP) packets fragmented.

PacketsReassembled PacketsReassembled PacketsReassembled PacketsReassembled

Ruft die Anzahl der wieder zusammengefügten IP (Internet Protocol)-Pakete ab.Gets the number of Internet Protocol (IP) packets reassembled.

ReceivedPackets ReceivedPackets ReceivedPackets ReceivedPackets

Ruft die Anzahl der empfangenen IP (Internet Protocol)-Pakete ab.Gets the number of Internet Protocol (IP) packets received.

ReceivedPacketsDelivered ReceivedPacketsDelivered ReceivedPacketsDelivered ReceivedPacketsDelivered

Ruft die Anzahl der übermittelten IP (Internet Protocol)-Pakete ab.Gets the number of Internet Protocol (IP) packets delivered.

ReceivedPacketsDiscarded ReceivedPacketsDiscarded ReceivedPacketsDiscarded ReceivedPacketsDiscarded

Ruft die Anzahl der IP (Internet Protocol)-Pakete ab, die empfangen und verworfen wurden.Gets the number of Internet Protocol (IP) packets that have been received and discarded.

ReceivedPacketsForwarded ReceivedPacketsForwarded ReceivedPacketsForwarded ReceivedPacketsForwarded

Ruft die Anzahl der weitergeleiteten IP (Internet Protocol)-Pakete ab.Gets the number of Internet Protocol (IP) packets forwarded.

ReceivedPacketsWithAddressErrors ReceivedPacketsWithAddressErrors ReceivedPacketsWithAddressErrors ReceivedPacketsWithAddressErrors

Ruft die Anzahl der empfangenen IP (Internet Protocol)-Pakete mit Adressfehlern ab.Gets the number of Internet Protocol (IP) packets with address errors that were received.

ReceivedPacketsWithHeadersErrors ReceivedPacketsWithHeadersErrors ReceivedPacketsWithHeadersErrors ReceivedPacketsWithHeadersErrors

Ruft die Anzahl der empfangenen IP (Internet Protocol)-Pakete mit Headerfehlern ab.Gets the number of Internet Protocol (IP) packets with header errors that were received.

ReceivedPacketsWithUnknownProtocol ReceivedPacketsWithUnknownProtocol ReceivedPacketsWithUnknownProtocol ReceivedPacketsWithUnknownProtocol

Ruft die Anzahl der auf dem lokalen Computer empfangenen IP (Internet Protocol)-Pakete mit einem unbekannten Protokoll im Header ab.Gets the number of Internet Protocol (IP) packets received on the local machine with an unknown protocol in the header.

Methoden

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Bestimmt, ob das angegebene Objekt mit dem aktuellen Objekt identisch ist.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Fungiert als Standardhashfunktion.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Ruft den Type der aktuellen Instanz ab.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.Returns a string that represents the current object.

(Inherited from Object)

Gilt für: