IPGlobalProperties Class

 

Provides information about the network connectivity of the local computer.

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

System.Object
  System.Net.NetworkInformation.IPGlobalProperties

public abstract class IPGlobalProperties

NameDescription
System_CAPS_protmethodIPGlobalProperties()

Initializes a new instance of the IPGlobalProperties class.

NameDescription
System_CAPS_pubpropertyDhcpScopeName

Gets the Dynamic Host Configuration Protocol (DHCP) scope name.

System_CAPS_pubpropertyDomainName

Gets the domain in which the local computer is registered.

System_CAPS_pubpropertyHostName

Gets the host name for the local computer.

System_CAPS_pubpropertyIsWinsProxy

Gets a Boolean value that specifies whether the local computer is acting as a Windows Internet Name Service (WINS) proxy.

System_CAPS_pubpropertyNodeType

Gets the Network Basic Input/Output System (NetBIOS) node type of the local computer.

NameDescription
System_CAPS_pubmethodBeginGetUnicastAddresses(AsyncCallback, Object)

Begins an asynchronous request to retrieve the stable unicast IP address table on the local computer.

System_CAPS_pubmethodEndGetUnicastAddresses(IAsyncResult)

Ends a pending asynchronous request to retrieve the stable unicast IP address table on the local computer.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetActiveTcpConnections()

Returns information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) connections on the local computer.

System_CAPS_pubmethodGetActiveTcpListeners()

Returns endpoint information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) listeners on the local computer.

System_CAPS_pubmethodGetActiveUdpListeners()

Returns information about the Internet Protocol version 4 (IPv4) and IPv6 User Datagram Protocol (UDP) listeners on the local computer.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetIcmpV4Statistics()

Provides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.

System_CAPS_pubmethodGetIcmpV6Statistics()

Provides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.

System_CAPS_pubmethodSystem_CAPS_staticGetIPGlobalProperties()

Gets an object that provides information about the local computer's network connectivity and traffic statistics.

System_CAPS_pubmethodGetIPv4GlobalStatistics()

Provides Internet Protocol version 4 (IPv4) statistical data for the local computer.

System_CAPS_pubmethodGetIPv6GlobalStatistics()

Provides Internet Protocol version 6 (IPv6) statistical data for the local computer.

System_CAPS_pubmethodGetTcpIPv4Statistics()

Provides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.

System_CAPS_pubmethodGetTcpIPv6Statistics()

Provides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetUdpIPv4Statistics()

Provides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.

System_CAPS_pubmethodGetUdpIPv6Statistics()

Provides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.

System_CAPS_pubmethodGetUnicastAddresses()

Retrieves the stable unicast IP address table on the local computer.

System_CAPS_pubmethodGetUnicastAddressesAsync()

Retrieves the stable unicast IP address table on the local computer as an asynchronous operation.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: