IPGlobalStatistics.OutputPacketsWithNoRoute 属性     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取本地计算机未能确定其目标地址路由的 Internet 协议 (IP) 数据包数。
public:
 abstract property long OutputPacketsWithNoRoute { long get(); };[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long OutputPacketsWithNoRoute { get; }public abstract long OutputPacketsWithNoRoute { get; }[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.OutputPacketsWithNoRoute : int64member this.OutputPacketsWithNoRoute : int64Public MustOverride ReadOnly Property OutputPacketsWithNoRoute 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
注解
属于此类别的 IP 数据包将被丢弃。