This documentation is archived and is not being maintained.

IPGlobalStatistics.ReceivedPackets Property

Gets the number of Internet Protocol (IP) packets received.

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

public abstract long ReceivedPackets { get; }
/** @property */
public abstract long get_ReceivedPackets ()

public abstract function get ReceivedPackets () : long

Not applicable.

Property Value

An Int64 value that specifies the total number of IP packets received.

The value returned by this property includes packets received in error.

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: