IPGlobalStatistics.OutputPacketsDiscarded 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得已捨棄的傳送網際網路通訊協定 (IP) 封包數目。
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
屬性值
Int64 值,指定已捨棄的輸出封包總數。
- 屬性
範例
下列程式代碼範例會顯示輸出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
備註
此屬性傳回的數據不包含因為封包無法傳遞的錯誤而捨棄的封包。 此數據中包含的封包通常會因為網路問題而捨棄,例如緩衝區空間不足。