Esempio n. 1
0
 private static void ClearDNSName(DNSNetworkAdapter nad, string[] names)
 {
     foreach (string name in names)
     {
         nad.Unregister(name);
     }
 }
Esempio n. 2
0
        public LocalNetworkNode(params NetworkAdapter[] adapters)
        {
            //DNS Adapter Name: "dns.server.com"
            //Create DNS Service
            DNSAdapter = new DNSNetworkAdapter(this, "dns.server.com");
            DNSAdapter.Connect();

            //Echo Adapter Name: "echo.server.com"
            //Create Echo Service
            EchoAdapter = new EchoNetworkAdapter(this);
            EchoAdapter.Connect();

            //Register as echo.server.com
            DNSAdapter.Register("echo.server.com", EchoAdapter.GUID, EchoAdapter.NetworkAddress);
        }
Esempio n. 3
0
        private static void ListDnsNames(DNSNetworkAdapter ad)
        {
            DNSNetworkAdapter.DNSEntry[] entries = ad.GetEntries();
            Console.WriteLine("DNS Entries: ");

            for (int i = 0; i < entries.Length; i++)
            {
                DNSNetworkAdapter.DNSEntry entry = entries[i];

                Console.WriteLine(
                    "{0}:\n\tEntry Name: {1}\n\tEntry Address: {2}\n\tEntry GUID: {3}",
                    i,
                    entry.Name,
                    entry.CurrentAddress,
                    entry.GUID
                    );
            }
        }