private static uint GetLocalIP ()
{
- String strHostName = Dns.GetHostName ();
- IPHostEntry ipEntry = Dns.GetHostByName (strHostName);
+ String strHostName = System.Net.Dns.GetHostName ();
+ IPHostEntry ipEntry = System.Net.Dns.GetHostByName (strHostName);
foreach (IPAddress ip in ipEntry.AddressList) {
if (AddressFamily.InterNetwork == ip.AddressFamily) {
byte[] addr = ip.GetAddressBytes ();
// limitations under the License.
//
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsClass : ushort {
Internet = 1,
IN = 1,
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsHeader {
public const int DnsHeaderLength = 12;
ArraySegment<byte> bytes;
//
using System;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsOpCode : byte {
Query = 0,
[Obsolete] IQuery = 1,
using System.IO;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
abstract class DnsPacket {
protected byte [] packet;
protected int position;
// limitations under the License.
//
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsQClass : ushort {
Internet = 1,
IN = 1,
//
using System;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsQType : ushort {
A = 1,
NS = 2,
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsQuery : DnsPacket {
public DnsQuery (string name, DnsQType qtype, DnsQClass qclass)
{
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsQuestion {
string name;
DnsQType type;
// limitations under the License.
//
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsRCode : ushort {
NoError = 0,
FormErr = 1,
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResourceRecord {
string name;
DnsType type;
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResourceRecordA : DnsResourceRecordIPAddress {
internal DnsResourceRecordA (DnsResourceRecord rr)
: base (rr, 4)
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResourceRecordAAAA : DnsResourceRecordIPAddress {
internal DnsResourceRecordAAAA (DnsResourceRecord rr)
: base (rr, 16)
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResourceRecordCName : DnsResourceRecord {
string cname;
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
abstract class DnsResourceRecordIPAddress : DnsResourceRecord {
IPAddress address;
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResourceRecordPTR : DnsResourceRecord {
string dname;
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class DnsResponse : DnsPacket {
static readonly ReadOnlyCollection<DnsResourceRecord> EmptyRR = new ReadOnlyCollection<DnsResourceRecord> (new DnsResourceRecord [0]);
static readonly ReadOnlyCollection<DnsQuestion> EmptyQS = new ReadOnlyCollection<DnsQuestion> (new DnsQuestion [0]);
//
using System;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum DnsType : ushort {
A = 1,
NS = 2,
using System.Text;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
static class DnsUtil {
// RFC 2181 - Section 11
public static bool IsValidDnsName (string name)
// limitations under the License.
//
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum ResolverAsyncOperation {
None,
GetHostEntry,
// limitations under the License.
//
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
enum ResolverError {
NoError, // From DNS server
FormatError, //
using System.Threading;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
sealed class SimpleResolver : IDisposable {
static string [] EmptyStrings = new string [0];
static IPAddress [] EmptyAddresses = new IPAddress [0];
using System.Threading;
namespace Mono.Dns {
-#if !NET_2_0
- public
-#endif
class SimpleResolverEventArgs : EventArgs {
public event EventHandler<SimpleResolverEventArgs> Completed;