Edit

Share via


IPGlobalStatistics.ReceivedPacketsDiscarded Property

Definition

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

[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long ReceivedPacketsDiscarded { get; }
public abstract long ReceivedPacketsDiscarded { get; }

Property Value

An Int64 value that specifies the total number of incoming packets that have been discarded.

Attributes

Examples

The following code example displays statistics for received IP packets.

public static void ShowInboundIPStatistics()
{
     IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
     IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
     Console.WriteLine("  Inbound Packet Data:");
     Console.WriteLine("      Received ............................ : {0}",
     ipstat.ReceivedPackets);
     Console.WriteLine("      Forwarded ........................... : {0}",
     ipstat.ReceivedPacketsForwarded);
     Console.WriteLine("      Delivered ........................... : {0}",
     ipstat.ReceivedPacketsDelivered);
     Console.WriteLine("      Discarded ........................... : {0}",
     ipstat.ReceivedPacketsDiscarded);
}

Remarks

The value returned by this property includes only those packets that were discarded even though they did not contain errors that prevented reassembly or delivery. Typically, packets in this category are discarded because of insufficient buffer space.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1