예제 #1
0
파일: pcapReader.c 프로젝트: Gejove/nDPI
static void terminateDetection(void)
{
  int i;

  for(i=0; i<NUM_ROOTS; i++) {
    ndpi_tdestroy(ndpi_flows_root[i], ndpi_flow_freer);
    ndpi_flows_root[i] = NULL;
  }

  ndpi_exit_detection_module(ndpi_struct, free_wrapper);
}
예제 #2
0
/**
 * @brief free nDPI context
 * @param pp_ctx the context to free the nDPI context for
 */
void pp_ndpi_destroy(struct pp_context *pp_ctx) {

	assert(pp_ctx->ndpi_ctx);

	ndpi_exit_detection_module(pp_ctx->ndpi_ctx,
							   &__pp_free);

	free(pp_ctx->ndpi_protocol_stats);

	pp_ctx->ndpi_ctx = NULL;
}
예제 #3
0
void NetworkInterface::deleteDataStructures() {
  if(flows_hash) { delete flows_hash; flows_hash = NULL; }
  if(hosts_hash) { delete hosts_hash; hosts_hash = NULL; }
  if(strings_hash) { delete strings_hash; strings_hash = NULL; }

  if(ndpi_struct) {
    ndpi_exit_detection_module(ndpi_struct, free_wrapper);
    ndpi_struct = NULL;
  }

  if(ifname) {
    // ntop->getTrace()->traceEvent(TRACE_NORMAL, "Interface %s shutdown", ifname);
    free(ifname);
    ifname = NULL;
  }
}
예제 #4
0
static void terminateDetection(void)
{
  ndpi_tdestroy(ndpi_flows_root, ndpi_flow_freer);
  ndpi_flows_root = NULL;
  ndpi_exit_detection_module(ndpi_struct, free_wrapper);
}