code: def run(pcap):
      
      start = datetime.now()
      errors = []
      status = STATUS_FAILED
      analyses = []
      pool = ThreadPool(MAX_THREADS)
      try:
          if not is_pcap(pcap):
              raise Exception("Not a valid pcap file")
  
          runners = []
          for conf in Config().modules.values():
              runner = registry.get(conf['module'])
              if not runner:
                  raise Exception("No module named: '{0}' found registered"
                                  .format(conf['module']))
              runners.append(runner(conf))
          # launch via worker pool
          analyses = [ pool.apply_async(_run_ids, (runner, pcap)) for runner in runners ]
          analyses = [ x.get() for x in analyses ]
          # were all runs successful?
          if all([ x['status'] == STATUS_SUCCESS for x in analyses ]):
              status = STATUS_SUCCESS
          # propagate any errors to the main list
          for run in [ x for x in analyses if x['status'] != STATUS_SUCCESS ]:
              errors.append("Failed to run {0}: {1}".format(run['name'], run['error']))
      except Exception as ex:
          errors.append(str(ex))
  
      return {'start': start,
              'duration': duration(start),
              'status': status,
              'analyses': analyses,
              'errors': errors,
              }
docs: Runs all configured IDS instances against the supplied pcap.
  
      :param pcap: File path to pcap file to analyse
      :returns: Dict with details and results of run/s