IPGlobalStatistics.OutputPacketsDiscarded Właściwość

Definicja

Pobiera liczbę przesłanych pakietów protokołu internetowego (IP), które zostały odrzucone.

public:
 abstract property long OutputPacketsDiscarded { long get(); };
public abstract long OutputPacketsDiscarded { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long OutputPacketsDiscarded { get; }
member this.OutputPacketsDiscarded : int64
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.OutputPacketsDiscarded : int64
Public MustOverride ReadOnly Property OutputPacketsDiscarded As Long

Wartość właściwości

Int64

Wartość Int64 określająca całkowitą liczbę pakietów wychodzących, które zostały odrzucone.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia statystyki dla wychodzących pakietów IP.

void ShowOutboundIPStatistics()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IPGlobalStatistics ^ ipstat = properties->GetIPv4GlobalStatistics();
   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 );
}

public static void ShowOutboundIPStatistics()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
    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);
}
Public Shared Sub ShowOutboundIPStatistics() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics()
    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)

End Sub

Uwagi

Dane zwrócone przez tę właściwość nie obejmują pakietów odrzuconych z powodu błędów, które sprawiły, że pakiety nie zostały usunięte. Pakiety zawarte w tych danych są zwykle odrzucane z powodu problemów z siecią, takich jak niewystarczająca ilość miejsca w buforze.

Dotyczy