NetworkInterface Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides information about interfaces and enables applications to control them.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Net.NetworkInformation..::..NetworkInterface
    Microsoft.SPOT.Net.NetworkInformation. . :: . .Wireless80211

Namespace:  Microsoft.SPOT.Net.NetworkInformation
Assembly:  Microsoft.SPOT.Net (in Microsoft.SPOT.Net.dll)

Syntax

'Declaration
Public Class NetworkInterface
public class NetworkInterface
public ref class NetworkInterface
type NetworkInterface =  class end
public class NetworkInterface

The NetworkInterface type exposes the following members.

Constructors

  Name Description
Protected method NetworkInterface Initializes a new instance of the NetworkInterface class.

Top

Properties

  Name Description
Public property DnsAddresses Holds the DNS server address.
Public property GatewayAddress Contains the gateway address.
Public property IPAddress Holds the IP address of the network interface.
Public property IsDhcpEnabled Gets a value specifying whether DHCP is enabled for this network interfaces.
Public property IsDynamicDnsEnabled Retrieves a value indicating whether a network interface can obtain a DNS server address automatically.
Public property NetworkInterfaceType Retrieves a value specifying the type of network interface being used by the device.
Public property PhysicalAddress Gets or sets the Media Access Control (MAC) address for a network interface.
Public property SubnetMask Retrieves the network interface's subnet mask.

Top

Methods

  Name Description
Public method EnableDhcp Enables the Dynamic Host Configuration Protocol (DHCP) for service with this network interface.
Public method EnableDynamicDns Enables a network interface to obtain a DNS server address automatically.
Public method EnableStaticDns Enables a network interface to use a specific DNS server address.
Public method EnableStaticIP Enables an application to set and use a static IP address.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic member GetAllNetworkInterfaces Retrieves an array of all of the device's network interfaces.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ReleaseDhcpLease Releases the DHCP lease, which releases the IP address bound to a DHCP-enabled network interface.
Public method RenewDhcpLease Renews a DHCP lease, which renews the IP address on a DHCP-enabled network interface.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

With this class, your applications can retrieve information about a device's network interface. They can also configure the interface as appropriate. For example, they can enable your device to obtain a DNS server address automatically, renew DHCP leases, or set the device to use a specific static IP address.

Note

The .NET Micro Framework does not support IPv6. If you are using IPv6 and your program attempts to get a network address or network address properties, it will throw an exception.

Thread Safety

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

See Also

Reference

Microsoft.SPOT.Net.NetworkInformation Namespace