NetSamples.Common.Net
Class NetworkAdapter

Represents a Network Adapter (per IP Helper)

Field Summary
System.Collections.Hashtable adapters
System.Net.IPAddress address
System.Net.IPAddress[] addresslist
bool autoconfigactive
bool autoconfigenabled
string description
bool dhcpenabled
System.Net.IPAddress dhcpserver
System.Net.IPAddress dns
System.Net.IPAddress[] dnslist
uint ERROR_BUFFER_OVERFLOW
System.Net.IPAddress[] gatewaylist
uint index
string name
System.Net.IPAddress primarywins
System.Net.IPAddress secondarywins
bool winsenabled

Constructor Summary
NetworkAdapter(NetSamples.Common.Net.iphlpapi.IP_ADAPTER_INFO info)
         Constructor

Property Summary
System.Collections.ICollection Adapters
         The collection of network adapters
System.Net.IPAddress[] AddressList
         List of addresses for this adapter
bool AutoConfigActive
         Is Auto Config active ?
bool AutoConfigEnabled
         Is Auto Config enabled ?
System.Net.IPAddress CurrentAddress
         Current address for the adapter
System.Net.IPAddress CurrentDnsServer
         Current DNS Server
string Description
         Description
bool DhcpEnabled
         Is DHCP enabled ?
System.Net.IPAddress DhcpServer
         DHCP Server address
System.Net.IPAddress[] DnsServerList
         DNS Server list
System.Net.IPAddress[] GatewayList
         Addresses of gateway machines
int Index
         Adapter index
string Name
         Name
System.Net.IPAddress PrimaryWinsServer
         Primary WINS Server address
System.Net.IPAddress SecondaryWinsServer
         Secondary WINS server address
bool WinsEnabled
         Is WINS enabled ?

Method Summary
NetSamples.Common.Net.NetworkAdapter Adapter(uint index)
         Retrieves an adapter by index number
void LoadAdaptersInfo()
         Loads information for all the adapters
void LoadPerAdapterInfo()
         Load additional adapter information

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

adapters

private System.Collections.Hashtable adapters


address

private System.Net.IPAddress address


addresslist

private System.Net.IPAddress[] addresslist


autoconfigactive

private bool autoconfigactive


autoconfigenabled

private bool autoconfigenabled


description

private string description


dhcpenabled

private bool dhcpenabled


dhcpserver

private System.Net.IPAddress dhcpserver


dns

private System.Net.IPAddress dns


dnslist

private System.Net.IPAddress[] dnslist


ERROR_BUFFER_OVERFLOW

public uint ERROR_BUFFER_OVERFLOW


gatewaylist

private System.Net.IPAddress[] gatewaylist


index

private uint index


name

private string name


primarywins

private System.Net.IPAddress primarywins


secondarywins

private System.Net.IPAddress secondarywins


winsenabled

private bool winsenabled

Constructor Detail

NetworkAdapter

internal NetworkAdapter(NetSamples.Common.Net.iphlpapi.IP_ADAPTER_INFO info)

Constructor

Property Detail

Adapters

public System.Collections.ICollection Adapters

The collection of network adapters


AddressList

public System.Net.IPAddress[] AddressList

List of addresses for this adapter


AutoConfigActive

public bool AutoConfigActive

Is Auto Config active ?


AutoConfigEnabled

public bool AutoConfigEnabled

Is Auto Config enabled ?


CurrentAddress

public System.Net.IPAddress CurrentAddress

Current address for the adapter


CurrentDnsServer

public System.Net.IPAddress CurrentDnsServer

Current DNS Server


Description

public string Description

Description


DhcpEnabled

public bool DhcpEnabled

Is DHCP enabled ?


DhcpServer

public System.Net.IPAddress DhcpServer

DHCP Server address


DnsServerList

public System.Net.IPAddress[] DnsServerList

DNS Server list


GatewayList

public System.Net.IPAddress[] GatewayList

Addresses of gateway machines


Index

public int Index

Adapter index


Name

public string Name

Name


PrimaryWinsServer

public System.Net.IPAddress PrimaryWinsServer

Primary WINS Server address


SecondaryWinsServer

public System.Net.IPAddress SecondaryWinsServer

Secondary WINS server address


WinsEnabled

public bool WinsEnabled

Is WINS enabled ?

Method Detail

Adapter

public NetSamples.Common.Net.NetworkAdapter Adapter(uint index)

Retrieves an adapter by index number


LoadAdaptersInfo

private void LoadAdaptersInfo()

Loads information for all the adapters


LoadPerAdapterInfo

private void LoadPerAdapterInfo()

Load additional adapter information