internal void AddNameMapping(DnsNameMapping mapping)
        {
            this.SuspendLayout();

            _queriesBindingSource.Add(mapping);

            this.ResumeLayout();
        }
Esempio n. 2
0
 // Normally DNS mappings arriving before real data, but we can't count on it therfore we
 // are saving the mappings for future hosts.
 public void HandleDnsNameMapping(DnsNameMapping dnsNameMapping)
 {
     if (!IsIpAddress(dnsNameMapping.Query) && IsIpAddress(dnsNameMapping.Destination))
     {
         if (_dnsMappings.ContainsKey(dnsNameMapping.Destination))
         {
             if (_dnsMappings[dnsNameMapping.Destination].Add(dnsNameMapping.Query))
             {
                 UpdateNodeLabel(dnsNameMapping.Destination);
             }
         }
         else
         {
             _dnsMappings[dnsNameMapping.Destination] = new HashSet <string>();
             _dnsMappings[dnsNameMapping.Destination].Add(dnsNameMapping.Query);
             UpdateNodeLabel(dnsNameMapping.Destination);
         }
     }
 }