IPGlobalStatistics.OutputPacketRoutingDiscards 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得已從路由表中丟棄的路由數量。
public:
abstract property long OutputPacketRoutingDiscards { long get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long OutputPacketRoutingDiscards { get; }
public abstract long OutputPacketRoutingDiscards { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.OutputPacketRoutingDiscards : int64
member this.OutputPacketRoutingDiscards : int64
Public MustOverride ReadOnly Property OutputPacketRoutingDiscards As Long
屬性值
一個 Int64 指定已丟棄有效路由總數的值。
- 屬性
範例
以下程式碼範例顯示出站 IP 封包的統計資料。
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
備註
丟棄有效路由表項目的一個可能原因是為了釋放緩衝區空間給其他條目。