Ejemplo n.º 1
0
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);
}
Ejemplo n.º 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;
}
Ejemplo n.º 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;
  }
}
Ejemplo n.º 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);
}