IPGlobalStatistics.OutputPacketsDiscarded 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取已丢弃的已传输 Internet 协议 (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
注解
此属性返回的数据不包括由于导致数据包无法传送的错误而丢弃的数据包。 此数据中包含的数据包通常由于网络问题(如缓冲区空间不足)而被丢弃。