Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IPGlobalProperties Class

Provides information about the network connectivity of the local computer.

System.Object
  System.Net.NetworkInformation.IPGlobalProperties

Namespace:  System.Net.NetworkInformation
Assembly:  System (in System.dll)
public abstract class IPGlobalProperties

The IPGlobalProperties type exposes the following members.

  NameDescription
Protected methodIPGlobalPropertiesInitializes a new instance of the IPGlobalProperties class.
Top
  NameDescription
Public propertyDhcpScopeNameGets the Dynamic Host Configuration Protocol (DHCP) scope name.
Public propertyDomainNameGets the domain in which the local computer is registered.
Public propertyHostNameGets the host name for the local computer.
Public propertyIsWinsProxyGets a Boolean value that specifies whether the local computer is acting as a Windows Internet Name Service (WINS) proxy.
Public propertyNodeTypeGets the Network Basic Input/Output System (NetBIOS) node type of the local computer.
Top
  NameDescription
Public methodBeginGetUnicastAddressesBegins an asynchronous request to retrieve the stable unicast IP address table on the local computer.
Public methodEndGetUnicastAddressesEnds a pending asynchronous request to retrieve the stable unicast IP address table on the local computer.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetActiveTcpConnectionsReturns information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) connections on the local computer.
Public methodGetActiveTcpListenersReturns endpoint information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) listeners on the local computer.
Public methodGetActiveUdpListenersReturns information about the Internet Protocol version 4 (IPv4) and IPv6 User Datagram Protocol (UDP) listeners on the local computer.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetIcmpV4StatisticsProvides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.
Public methodGetIcmpV6StatisticsProvides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.
Public methodStatic memberGetIPGlobalPropertiesGets an object that provides information about the local computer's network connectivity and traffic statistics.
Public methodGetIPv4GlobalStatisticsProvides Internet Protocol version 4 (IPv4) statistical data for the local computer.
Public methodGetIPv6GlobalStatisticsProvides Internet Protocol version 6 (IPv6) statistical data for the local computer.
Public methodGetTcpIPv4StatisticsProvides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.
Public methodGetTcpIPv6StatisticsProvides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetUdpIPv4StatisticsProvides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.
Public methodGetUdpIPv6StatisticsProvides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.
Public methodGetUnicastAddressesRetrieves the stable unicast IP address table on the local computer.
Public methodGetUnicastAddressesAsyncRetrieves the stable unicast IP address table on the local computer as an asynchronous operation.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class provides configuration and statistical information about the local computer's network interfaces and network connections.

The information provided by this class is similar to that provided by the Internet Protocol Helper API functions. For information about the Internet Protocol Helper, see the documentation in the MSDN Library.

The following code example displays information about the local computer using an instance of this class.

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

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.