3 /// Provides support for ip configuation information and statistics.
6 namespace System.Net.NetworkInformation {
9 using System.Net.Sockets;
11 using System.Runtime.InteropServices;
12 using System.Collections;
13 using System.ComponentModel;
14 using System.Security.Permissions;
15 using Microsoft.Win32;
19 //this is the main addressinformation class that contains the ipaddress
20 //and other properties
21 internal class SystemIPAddressInformation:IPAddressInformation{
24 internal bool transient = false;
25 internal bool dnsEligible = true;
28 public SystemIPAddressInformation(IPAddress address, bool isDnsEligible, bool isTransient)
30 this.address = address;
31 this.dnsEligible = isDnsEligible;
32 this.transient = isTransient;
35 internal SystemIPAddressInformation(IPAddress address, AdapterAddressFlags flags) {
36 this.address = address;
37 transient = (flags & AdapterAddressFlags.Transient) > 0;
38 dnsEligible = (flags & AdapterAddressFlags.DnsEligible) > 0;
42 public override IPAddress Address{get {return address;}}
44 /// <summary>The address is a cluster address and shouldn't be used by most applications.</summary>
45 public override bool IsTransient{
51 /// <summary>This address can be used for DNS.</summary>
52 public override bool IsDnsEligible{