Пример #1
0
 public SightingInvestigationConsumer(
     ISightingRepository <T> sightingRepository,
     IProtocolTranslator protocolTranslator,
     ISightingAnalyzerRepertoire analyzerRepertoire,
     IRouteRegistry routeRegistry)
 {
     _sightingRepository = sightingRepository;
     _protocolTranslator = protocolTranslator;
     _analyzerRepertoire = analyzerRepertoire;
     _routeRegistry      = routeRegistry;
 }
    /// <summary>
    /// Constructor for the class, it initializes various objects
    /// </summary>
    /// <param name="node">Takes in a structured node</param>
    public ManagedAddressResolverAndDns(StructuredNode node, DhcpServer dhcp,
        MemBlock local_ip, string name_server, bool forward_queries) :
      base(MemBlock.Reference(dhcp.BaseIP), MemBlock.Reference(dhcp.Netmask),
          name_server, forward_queries)
    {
      _node = node;
      _dns_a = new Dictionary<string, string>();
      _dns_ptr = new Dictionary<string, string>();
      _ip_addr = new Dictionary<MemBlock, Address>();
      _addr_ip = new Dictionary<Address, MemBlock>();
      _blocked_addrs = new Dictionary<Address, MemBlock>();
      mcast_addr = new List<Address>();
      _tx_counters = new Dictionary<Address, int>();
      _rx_counters = new Dictionary<Address, int>();

      _dhcp = dhcp;
      _local_ip = local_ip;
      _sync = new object();
      _udp_translators = new IProtocolTranslator<UdpPacket>[] {
        new MDnsTranslator(local_ip),
        new SipTranslator(local_ip),
        new SsdpTranslator(local_ip)
      };
      _resolver = new WriteOnce<IDnsResolver>();
    }
Пример #3
0
    /// <summary>
    /// Constructor for the class, it initializes various objects
    /// </summary>
    /// <param name="node">Takes in a structured node</param>
    public ManagedAddressResolverAndDns(StructuredNode node, DhcpServer dhcp,
        MemBlock local_ip, string name_server, bool forward_queries) :
      base(MemBlock.Reference(dhcp.BaseIP), MemBlock.Reference(dhcp.Netmask),
          name_server, forward_queries)
    {
      _node = node;
      _dns_a = new Hashtable();
      _dns_ptr = new Hashtable();
      _ip_addr = new Hashtable();
      _addr_ip = new Hashtable();
      _blocked_addrs = new Hashtable();
      mcast_addr = new ArrayList();

      _dhcp = dhcp;
      _local_ip = local_ip;
      _sync = new object();
      _udp_translators = new IProtocolTranslator<UdpPacket>[] {
        new MDnsTranslator(local_ip),
        new SipTranslator(local_ip),
        new SsdpTranslator(local_ip)
      };
    }