Export (0) Print
Expand All

IPGlobalStatistics.OutputPacketsDiscarded Property

Gets the number of transmitted Internet Protocol (IP) packets that have been discarded.

Namespace:  System.Net.NetworkInformation
Assembly:  System (in System.dll)

public abstract long OutputPacketsDiscarded { get; }

Property Value

Type: System.Int64
An Int64 value that specifies the total number of outgoing packets that have been discarded.

The data returned by this property does not include packets discarded because of errors that made the packets undeliverable. Packets included in this data are typically discarded due to network issues, such as insufficient buffer space.

The following code example displays statistics for outbound IP packets.



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);   
}


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft