///
/// Provides support for ip configuation information and statistics.
///
///
namespace System.Net.NetworkInformation {
using System.Net;
using System.Net.Sockets;
using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.ComponentModel;
using System.Security.Permissions;
using Microsoft.Win32;
//this is the main addressinformation class that contains the ipaddress
//and other properties
internal class SystemIPAddressInformation:IPAddressInformation{
IPAddress address;
internal bool transient = false;
internal bool dnsEligible = true;
#if MONO
public SystemIPAddressInformation(IPAddress address, bool isDnsEligible, bool isTransient)
{
this.address = address;
this.dnsEligible = isDnsEligible;
this.transient = isTransient;
}
#else
internal SystemIPAddressInformation(IPAddress address, AdapterAddressFlags flags) {
this.address = address;
transient = (flags & AdapterAddressFlags.Transient) > 0;
dnsEligible = (flags & AdapterAddressFlags.DnsEligible) > 0;
}
#endif
public override IPAddress Address{get {return address;}}
/// The address is a cluster address and shouldn't be used by most applications.
public override bool IsTransient{
get {
return (transient);
}
}
/// This address can be used for DNS.
public override bool IsDnsEligible{
get {
return (dnsEligible);
}
}
}
}