IPGlobalStatistics.ReceivedPackets Property

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

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

'Declaration
Public MustOverride ReadOnly Property ReceivedPackets As Long

Property Value

Type: System.Int64
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 Shared Sub ShowInboundIPStatistics() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim ipstat As IPGlobalStatistics = 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)

End Sub 'ShowInboundIPStatistics

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft