This class provides the ability to lookup names using the Dht. To add a name into the Dht either add a Hostname node into your AddressData node inside the IpopConfig or use another method to publish to the Dht. The format of acceptable hostnames is [a-zA-Z0-9-_\.]*.ipop (i.e. must end in .ipop)
Inheritance: Dns
Example #1
0
        protected override void SetDns()
        {
            if (_dns != null)
            {
                return;
            }

            if ("DhtDns".Equals(_ipop_config.Dns.Type))
            {
                _dns = new DhtDns(
                    MemBlock.Reference(Utils.StringToBytes(_dhcp_config.IPBase, '.')),
                    MemBlock.Reference(Utils.StringToBytes(_dhcp_config.Netmask, '.')),
                    _ipop_config.Dns.NameServer, _ipop_config.Dns.ForwardQueries,
                    AppNode.Dht, _ipop_config.IpopNamespace);
            }
            else
            {
                base.SetDns();
            }
        }
Example #2
0
        protected override void SetDns()
        {
            if(_dns != null) {
            return;
              }

              if("DhtDns".Equals(_ipop_config.Dns.Type)) {
            _dns = new DhtDns(
            MemBlock.Reference(Utils.StringToBytes(_dhcp_config.IPBase, '.')),
            MemBlock.Reference(Utils.StringToBytes(_dhcp_config.Netmask, '.')),
            _ipop_config.Dns.NameServer, _ipop_config.Dns.ForwardQueries,
            AppNode.Dht, _ipop_config.IpopNamespace);
              } else {
            base.SetDns();
              }
        }