fuzz_set_alloc_callbacks:
   31|  3.57k|{
   32|  3.57k|  ndpi_set_memory_alloction_functions(malloc_wrapper,
   33|  3.57k|                                      free_wrapper,
   34|  3.57k|                                      calloc_wrapper,
   35|  3.57k|                                      realloc_wrapper,
   36|       |                                      /* Aligned allocations are used only by croaring,
   37|       |                                         but no during fuzzing. So no point to set
   38|       |                                         these two wrappers here */
   39|  3.57k|                                      NULL, NULL,
   40|  3.57k|                                      malloc_wrapper,
   41|  3.57k|                                      free_wrapper);
   42|  3.57k|}
fuzz_set_alloc_seed:
   44|  3.57k|{
   45|  3.57k|  mem_alloc_state = seed;
   46|  3.57k|}
fuzz_set_alloc_callbacks_and_seed:
   48|  3.57k|{
   49|  3.57k|  fuzz_set_alloc_callbacks();
   50|  3.57k|  fuzz_set_alloc_seed(seed);
   51|  3.57k|}
buffer_to_file:
   91|  3.57k|{
   92|  3.57k|  return fmemopen((void *)data, size, "rw");
   93|  3.57k|}
fuzz_common_code.c:malloc_wrapper:
   17|   144k|static void *malloc_wrapper(size_t size) {
   18|   144k|  return (fastrand () % 16) ? malloc (size) : NULL;
  ------------------
  |  Branch (18:10): [True: 137k, False: 7.09k]
  ------------------
   19|   144k|}
fuzz_common_code.c:fastrand:
   11|   382k|{
   12|   382k|  if(!mem_alloc_state) return 1; /* No failures */
  ------------------
  |  Branch (12:6): [True: 0, False: 382k]
  ------------------
   13|   382k|  mem_alloc_state = (214013 * mem_alloc_state + 2531011);
   14|   382k|  return (mem_alloc_state >> 16) & 0x7FFF;
   15|   382k|}
fuzz_common_code.c:free_wrapper:
   20|   357k|static void free_wrapper(void *freeable) {
   21|   357k|  free(freeable);
   22|   357k|}
fuzz_common_code.c:calloc_wrapper:
   23|   222k|static void *calloc_wrapper(size_t nmemb, size_t size) {
   24|   222k|  return (fastrand () % 16) ? calloc (nmemb, size) : NULL;
  ------------------
  |  Branch (24:10): [True: 211k, False: 11.0k]
  ------------------
   25|   222k|}
fuzz_common_code.c:realloc_wrapper:
   26|  14.4k|static void *realloc_wrapper(void *ptr, size_t size) {
   27|  14.4k|  return (fastrand () % 16) ? realloc (ptr, size) : NULL;
  ------------------
  |  Branch (27:10): [True: 13.7k, False: 646]
  ------------------
   28|  14.4k|}

LLVMFuzzerTestOneInput:
    5|  3.57k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    6|  3.57k|  struct ndpi_detection_module_struct *ndpi_struct;
    7|  3.57k|  FILE *fd;
    8|       |
    9|       |  /* To allow memory allocation failures */
   10|  3.57k|  fuzz_set_alloc_callbacks_and_seed(size);
   11|       |
   12|  3.57k|  ndpi_struct = ndpi_init_detection_module(NULL);
   13|       |
   14|  3.57k|  ndpi_set_config(ndpi_struct, NULL, "log.level", "3");
   15|  3.57k|  ndpi_set_config(ndpi_struct, "all", "log", "1");
   16|       |
   17|  3.57k|  fd = buffer_to_file(data, size);
   18|  3.57k|  load_protocols_file_fd(ndpi_struct, fd);
   19|  3.57k|  if(fd)
  ------------------
  |  Branch (19:6): [True: 3.57k, False: 0]
  ------------------
   20|  3.57k|    fclose(fd);
   21|       |
   22|  3.57k|  ndpi_exit_detection_module(ndpi_struct);
   23|  3.57k|  return 0;
   24|  3.57k|}

ndpi_set_default_config:
  281|  3.53k|{
  282|  3.53k|  const struct cfg_param *c;
  283|       |
  284|  3.53k|  if(ndpi_bitmask_alloc(&cfg->detection_bitmask, max_internal_proto) != 0 ||
  ------------------
  |  Branch (284:6): [True: 2, False: 3.53k]
  ------------------
  285|  3.53k|     ndpi_bitmask_alloc(&cfg->debug_bitmask, max_internal_proto) != 0 ||
  ------------------
  |  Branch (285:6): [True: 1, False: 3.52k]
  ------------------
  286|  3.52k|     ndpi_bitmask_alloc(&cfg->ip_list_bitmask, max_internal_proto) != 0 ||
  ------------------
  |  Branch (286:6): [True: 2, False: 3.52k]
  ------------------
  287|  3.52k|     ndpi_bitmask_alloc(&cfg->monitoring, max_internal_proto) != 0 ||
  ------------------
  |  Branch (287:6): [True: 3, False: 3.52k]
  ------------------
  288|  3.52k|     ndpi_bitmask_alloc(&cfg->flowrisk_bitmask, NDPI_MAX_RISK) != 0 ||
  ------------------
  |  Branch (288:6): [True: 3, False: 3.52k]
  ------------------
  289|  3.52k|     ndpi_bitmask_alloc(&cfg->flowrisk_info_bitmask, NDPI_MAX_RISK) != 0)
  ------------------
  |  Branch (289:6): [True: 2, False: 3.51k]
  ------------------
  290|     13|    return -1;
  291|       |
  292|   418k|  for(c = &cfg_params[0]; c && c->param; c++) {
  ------------------
  |  Branch (292:27): [True: 418k, False: 0]
  |  Branch (292:32): [True: 415k, False: 3.51k]
  ------------------
  293|       |    cfg_ops[c->type].fn_set(NULL, (void *)((char *)cfg + c->offset),
  294|   415k|                            c->default_value, c->min_value, c->max_value, c->proto, c->param);
  295|   415k|  }
  296|  3.51k|  return 0;
  297|  3.53k|}
ndpi_set_config:
  303|  7.14k|{
  304|  7.14k|  const struct cfg_param *c;
  305|  7.14k|  ndpi_cfg_error rc;
  306|  7.14k|  int ret;
  307|       |
  308|  7.14k|  if(!ndpi_str || !param || !value)
  ------------------
  |  Branch (308:6): [True: 102, False: 7.03k]
  |  Branch (308:19): [True: 0, False: 7.03k]
  |  Branch (308:29): [True: 0, False: 7.03k]
  ------------------
  309|    102|    return NDPI_CFG_INVALID_CONTEXT;
  310|  7.03k|  if(ndpi_str->finalized)
  ------------------
  |  Branch (310:6): [True: 0, False: 7.03k]
  ------------------
  311|      0|    return NDPI_CFG_CONTEXT_ALREADY_INITIALIZED;
  312|       |
  313|  7.03k|  NDPI_LOG_DBG(ndpi_str, "Set [%s][%s][%s]\n", proto, param, value);
  ------------------
  |  |  596|  7.03k|# define NDPI_LOG_DBG(mod,  args...) { (void)mod; /* printf(args); */ }
  ------------------
  314|       |
  315|  7.03k|  if(proto && (strcmp(proto, "NULL") == 0))
  ------------------
  |  Branch (315:6): [True: 3.51k, False: 3.51k]
  |  Branch (315:15): [True: 0, False: 3.51k]
  ------------------
  316|      0|    proto = NULL;
  317|       |
  318|   552k|  for(c = &cfg_params[0]; c && c->param; c++) {
  ------------------
  |  Branch (318:27): [True: 552k, False: 0]
  |  Branch (318:32): [True: 552k, False: 0]
  ------------------
  319|   552k|    if((((proto == NULL && c->proto == NULL) ||
  ------------------
  |  Branch (319:11): [True: 330k, False: 221k]
  |  Branch (319:28): [True: 98.5k, False: 232k]
  ------------------
  320|   453k|	 (proto && c->proto && strcmp(proto, c->proto) == 0)) &&
  ------------------
  |  Branch (320:4): [True: 221k, False: 232k]
  |  Branch (320:13): [True: 221k, False: 0]
  |  Branch (320:25): [True: 0, False: 221k]
  ------------------
  321|  98.5k|        strcmp(param, c->param) == 0) ||
  ------------------
  |  Branch (321:9): [True: 3.51k, False: 95.0k]
  ------------------
  322|   548k|       (proto && c->proto &&
  ------------------
  |  Branch (322:9): [True: 221k, False: 327k]
  |  Branch (322:18): [True: 221k, False: 0]
  ------------------
  323|   221k|	strcmp(c->proto, "$PROTO_NAME_OR_ID") == 0 &&
  ------------------
  |  Branch (323:2): [True: 3.51k, False: 218k]
  ------------------
  324|  3.51k|	strcmp(param, c->param) == 0) ||
  ------------------
  |  Branch (324:2): [True: 3.51k, False: 0]
  ------------------
  325|   545k|       (proto == NULL && c->proto == NULL &&
  ------------------
  |  Branch (325:9): [True: 327k, False: 218k]
  |  Branch (325:26): [True: 95.0k, False: 232k]
  ------------------
  326|  95.0k|	strncmp(c->param, "flow_risk.$FLOWRISK_NAME_OR_ID", 30) == 0 &&
  ------------------
  |  Branch (326:2): [True: 7.03k, False: 87.9k]
  ------------------
  327|  7.03k|	strncmp(param, "flow_risk.", 10) == 0 &&
  ------------------
  |  Branch (327:2): [True: 0, False: 7.03k]
  ------------------
  328|      0|	!ndpi_str_endswith(param, ".info") &&
  ------------------
  |  Branch (328:2): [True: 0, False: 0]
  ------------------
  329|      0|	!ndpi_str_endswith(param, ".load")) ||
  ------------------
  |  Branch (329:2): [True: 0, False: 0]
  ------------------
  330|   545k|       (proto == NULL && c->proto == NULL &&
  ------------------
  |  Branch (330:9): [True: 327k, False: 218k]
  |  Branch (330:26): [True: 95.0k, False: 232k]
  ------------------
  331|  95.0k|	strncmp(c->param, "flow_risk.$FLOWRISK_NAME_OR_ID.info", 35) == 0 &&
  ------------------
  |  Branch (331:2): [True: 3.51k, False: 91.4k]
  ------------------
  332|  3.51k|	strncmp(param, "flow_risk.", 10) == 0 &&
  ------------------
  |  Branch (332:2): [True: 0, False: 3.51k]
  ------------------
  333|  7.03k|	ndpi_str_endswith(param, ".info"))) {
  ------------------
  |  Branch (333:2): [True: 0, False: 0]
  ------------------
  334|       |
  335|  7.03k|      rc = cfg_ops[c->type].fn_set(ndpi_str, (void *)((char *)&ndpi_str->cfg + c->offset),
  336|  7.03k|                                   value, c->min_value, c->max_value, proto, param);
  337|  7.03k|      if(rc == NDPI_CFG_OK && c->fn_callback) {
  ------------------
  |  Branch (337:10): [True: 7.03k, False: 0]
  |  Branch (337:31): [True: 0, False: 7.03k]
  ------------------
  338|      0|        ret = c->fn_callback(ndpi_str, (void *)((char *)&ndpi_str->cfg + c->offset),
  339|      0|                             proto, param);
  340|      0|        if(ret < 0)
  ------------------
  |  Branch (340:12): [True: 0, False: 0]
  ------------------
  341|      0|          rc = NDPI_CFG_CALLBACK_ERROR;
  342|      0|        else
  343|      0|          rc = ret;
  344|      0|      }
  345|  7.03k|      return rc;
  346|  7.03k|    }
  347|   552k|  }
  348|      0|  return NDPI_CFG_NOT_FOUND;
  349|  7.03k|}
ndpi_config.c:_set_param_enable_disable:
  459|   249k|                                                const char *proto, const char *param) {
  460|   249k|  int *variable = (int *)_variable;
  461|       |
  462|   249k|  (void)ndpi_str;
  463|   249k|  (void)min_value;
  464|   249k|  (void)max_value;
  465|   249k|  (void)proto;
  466|   249k|  (void)param;
  467|       |
  468|   249k|  if(strcmp(value, "1") == 0 ||
  ------------------
  |  Branch (468:6): [True: 24.6k, False: 225k]
  ------------------
  469|   225k|     strcmp(value, "enable") == 0) {
  ------------------
  |  Branch (469:6): [True: 168k, False: 56.3k]
  ------------------
  470|   193k|    *variable = 1;
  471|   193k|    return NDPI_CFG_OK;
  472|   193k|  }
  473|       |
  474|  56.3k|  if(strcmp(value, "0") == 0 ||
  ------------------
  |  Branch (474:6): [True: 3.51k, False: 52.7k]
  ------------------
  475|  56.3k|     strcmp(value, "disable") == 0) {
  ------------------
  |  Branch (475:6): [True: 52.7k, False: 0]
  ------------------
  476|  56.3k|    *variable = 0;
  477|  56.3k|    return NDPI_CFG_OK;
  478|  56.3k|  }
  479|       |
  480|      0|  return NDPI_CFG_INVALID_PARAM;
  481|  56.3k|}
ndpi_config.c:_set_param_int:
  507|   144k|                                     const char *proto, const char *param) {
  508|   144k|  int *variable = (int *)_variable;
  509|   144k|  const char *errstrp;
  510|   144k|  long val;
  511|       |
  512|   144k|  (void)ndpi_str;
  513|   144k|  (void)proto;
  514|   144k|  (void)param;
  515|       |
  516|   144k|  val = ndpi_strtonum(value, LONG_MIN, LONG_MAX, &errstrp, 0);
  517|   144k|  if(errstrp) {
  ------------------
  |  Branch (517:6): [True: 0, False: 144k]
  ------------------
  518|      0|    return NDPI_CFG_INVALID_PARAM;
  519|      0|  }
  520|       |
  521|       |  /* Min and max values are set in the code, so we can convert them
  522|       |     to integers without too many checks...*/
  523|   144k|  if(min_value && max_value &&
  ------------------
  |  Branch (523:6): [True: 144k, False: 0]
  |  Branch (523:19): [True: 144k, False: 0]
  ------------------
  524|   144k|     (val < strtol(min_value, NULL, 0) || val > strtol(max_value, NULL, 0)))
  ------------------
  |  Branch (524:7): [True: 0, False: 144k]
  |  Branch (524:43): [True: 0, False: 144k]
  ------------------
  525|      0|    return NDPI_CFG_INVALID_PARAM;
  526|       |
  527|   144k|  *variable = val;
  528|       |
  529|   144k|  return NDPI_CFG_OK;
  530|   144k|}
ndpi_config.c:_set_param_protocol_enable_disable:
  694|  17.5k|{
  695|  17.5k|  struct ndpi_bitmask *bitmask = (struct ndpi_bitmask *)_variable;
  696|  17.5k|  u_int16_t proto_id;
  697|       |
  698|  17.5k|  (void)ndpi_str;
  699|  17.5k|  (void)min_value;
  700|  17.5k|  (void)max_value;
  701|  17.5k|  (void)param;
  702|       |
  703|  17.5k|  if(strcmp(proto, "any") == 0 ||
  ------------------
  |  Branch (703:6): [True: 0, False: 17.5k]
  ------------------
  704|  17.5k|     strcmp(proto, "all") == 0 ||
  ------------------
  |  Branch (704:6): [True: 3.51k, False: 14.0k]
  ------------------
  705|  17.5k|     strcmp(proto, "$PROTO_NAME_OR_ID") == 0) {
  ------------------
  |  Branch (705:6): [True: 14.0k, False: 0]
  ------------------
  706|  17.5k|    if(strcmp(value, "1") == 0 ||
  ------------------
  |  Branch (706:8): [True: 10.5k, False: 7.03k]
  ------------------
  707|  10.5k|       strcmp(value, "enable") == 0) {
  ------------------
  |  Branch (707:8): [True: 0, False: 7.03k]
  ------------------
  708|  10.5k|      ndpi_bitmask_set_all(bitmask);
  709|  10.5k|      return NDPI_CFG_OK;
  710|  10.5k|    }
  711|  7.03k|    if(strcmp(value, "0") == 0 ||
  ------------------
  |  Branch (711:8): [True: 0, False: 7.03k]
  ------------------
  712|  7.03k|       strcmp(value, "disable") == 0) {
  ------------------
  |  Branch (712:8): [True: 7.03k, False: 0]
  ------------------
  713|  7.03k|      ndpi_bitmask_reset(bitmask);
  714|  7.03k|      return NDPI_CFG_OK;
  715|  7.03k|    }
  716|  7.03k|  }
  717|       |
  718|      0|  proto_id = __get_proto_id(ndpi_str, proto);
  719|      0|  if(proto_id == NDPI_PROTOCOL_UNKNOWN)
  ------------------
  |  Branch (719:6): [True: 0, False: 0]
  ------------------
  720|      0|    return NDPI_CFG_INVALID_PARAM;
  721|       |
  722|      0|  if(strcmp(value, "1") == 0 ||
  ------------------
  |  Branch (722:6): [True: 0, False: 0]
  ------------------
  723|      0|     strcmp(value, "enable") == 0) {
  ------------------
  |  Branch (723:6): [True: 0, False: 0]
  ------------------
  724|      0|    ndpi_bitmask_set(bitmask, proto_id);
  725|      0|    return NDPI_CFG_OK;
  726|      0|  }
  727|      0|  if(strcmp(value, "0") == 0 ||
  ------------------
  |  Branch (727:6): [True: 0, False: 0]
  ------------------
  728|      0|     strcmp(value, "disable") == 0) {
  ------------------
  |  Branch (728:6): [True: 0, False: 0]
  ------------------
  729|      0|    ndpi_bitmask_clear(bitmask, proto_id);
  730|      0|    return NDPI_CFG_OK;
  731|      0|  }
  732|      0|  return NDPI_CFG_INVALID_PARAM;
  733|      0|}
ndpi_config.c:_set_param_filename_config:
  591|  3.51k|                                                 const char *proto, const char *param) {
  592|  3.51k|  int rc;
  593|  3.51k|  FILE *fd;
  594|       |
  595|  3.51k|  rc = _set_param_filename(ndpi_str, _variable, value, min_value, max_value, proto, param);
  596|  3.51k|  if(rc != 0 || value == NULL || ndpi_str == NULL)
  ------------------
  |  Branch (596:6): [True: 0, False: 3.51k]
  |  Branch (596:17): [True: 3.51k, False: 0]
  |  Branch (596:34): [True: 0, False: 0]
  ------------------
  597|  3.51k|    return rc;
  598|       |
  599|      0|  fd = fopen(value, "r");
  600|       |
  601|      0|  if(fd == NULL)
  ------------------
  |  Branch (601:6): [True: 0, False: 0]
  ------------------
  602|      0|    return NDPI_CFG_INVALID_PARAM; /* It shoudn't happen because we already checked it */
  603|       |
  604|      0|  rc = load_config_file_fd(ndpi_str, fd);
  605|       |
  606|      0|  fclose(fd);
  607|       |
  608|      0|  if(rc < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 0]
  ------------------
  609|      0|    return rc;
  610|       |
  611|      0|  return NDPI_CFG_OK;
  612|      0|}
ndpi_config.c:_set_param_filename:
  565|  3.51k|                                          const char *proto, const char *param) {
  566|  3.51k|  char *variable = (char *)_variable;
  567|       |
  568|  3.51k|  (void)ndpi_str;
  569|  3.51k|  (void)min_value;
  570|  3.51k|  (void)max_value;
  571|  3.51k|  (void)proto;
  572|  3.51k|  (void)param;
  573|       |
  574|  3.51k|  if(value == NULL) { /* Valid value */
  ------------------
  |  Branch (574:6): [True: 3.51k, False: 0]
  ------------------
  575|  3.51k|    variable[0] = '\0';
  576|  3.51k|    return NDPI_CFG_OK;
  577|  3.51k|  }
  578|       |
  579|      0|  if(access(value, F_OK) != 0)
  ------------------
  |  Branch (579:6): [True: 0, False: 0]
  ------------------
  580|      0|    return NDPI_CFG_INVALID_PARAM;
  581|       |
  582|      0|  strncpy(variable, value, CFG_MAX_LEN);
  ------------------
  |  |  184|      0|#define CFG_MAX_LEN	256
  ------------------
  583|      0|  return NDPI_CFG_OK;
  584|      0|}
ndpi_config.c:_set_param_flowrisk_enable_disable:
  761|  7.03k|{
  762|  7.03k|  struct ndpi_bitmask *bitmask = (struct ndpi_bitmask *)_variable;
  763|  7.03k|  ndpi_risk_enum flowrisk_id;
  764|  7.03k|  char param[128] = {0};
  765|       |
  766|  7.03k|  (void)ndpi_str;
  767|  7.03k|  (void)min_value;
  768|  7.03k|  (void)max_value;
  769|  7.03k|  (void)proto;
  770|       |
  771|  7.03k|  if(strncmp(_param, "flow_risk.", 10) != 0)
  ------------------
  |  Branch (771:6): [True: 0, False: 7.03k]
  ------------------
  772|      0|    return NDPI_CFG_INVALID_PARAM;
  773|       |
  774|  7.03k|  _param += 10; /* Strip initial "flow_risk." */
  775|       |
  776|  7.03k|  if(strlen(_param) > 5 &&
  ------------------
  |  Branch (776:6): [True: 7.03k, False: 0]
  ------------------
  777|  7.03k|     strncmp(_param + (strlen(_param) - 5), ".info", 5) == 0)
  ------------------
  |  Branch (777:6): [True: 3.51k, False: 3.51k]
  ------------------
  778|  3.51k|    memcpy(param, _param, ndpi_min(strlen(_param) - 5, sizeof(param) - 1)); /* Strip trailing ".info" */
  ------------------
  |  |  113|  3.51k|#define ndpi_min(a,b)   ((a < b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (113:26): [True: 3.51k, False: 0]
  |  |  ------------------
  ------------------
  779|  3.51k|  else
  780|  3.51k|    strncpy(param, _param, sizeof(param) - 1);
  781|       |
  782|  7.03k|  if(strcmp(param, "any") == 0 ||
  ------------------
  |  Branch (782:6): [True: 0, False: 7.03k]
  ------------------
  783|  7.03k|     strcmp(param, "all") == 0 ||
  ------------------
  |  Branch (783:6): [True: 0, False: 7.03k]
  ------------------
  784|  7.03k|     strcmp(param, "$FLOWRISK_NAME_OR_ID") == 0) {
  ------------------
  |  Branch (784:6): [True: 7.03k, False: 0]
  ------------------
  785|  7.03k|    if(strcmp(value, "1") == 0 ||
  ------------------
  |  Branch (785:8): [True: 0, False: 7.03k]
  ------------------
  786|  7.03k|       strcmp(value, "enable") == 0) {
  ------------------
  |  Branch (786:8): [True: 7.03k, False: 0]
  ------------------
  787|  7.03k|      ndpi_bitmask_set_all(bitmask);
  788|  7.03k|      return NDPI_CFG_OK;
  789|  7.03k|    }
  790|      0|    if(strcmp(value, "0") == 0 ||
  ------------------
  |  Branch (790:8): [True: 0, False: 0]
  ------------------
  791|      0|       strcmp(value, "disable") == 0) {
  ------------------
  |  Branch (791:8): [True: 0, False: 0]
  ------------------
  792|      0|      ndpi_bitmask_reset(bitmask);
  793|      0|      return NDPI_CFG_OK;
  794|      0|    }
  795|      0|  }
  796|       |
  797|      0|  flowrisk_id = __get_flowrisk_id(param);
  798|      0|  if(flowrisk_id == NDPI_NO_RISK)
  ------------------
  |  Branch (798:6): [True: 0, False: 0]
  ------------------
  799|      0|    return NDPI_CFG_INVALID_PARAM;
  800|       |
  801|      0|  if(strcmp(value, "1") == 0 ||
  ------------------
  |  Branch (801:6): [True: 0, False: 0]
  ------------------
  802|      0|     strcmp(value, "enable") == 0) {
  ------------------
  |  Branch (802:6): [True: 0, False: 0]
  ------------------
  803|      0|    ndpi_bitmask_set(bitmask, flowrisk_id);
  804|      0|    return NDPI_CFG_OK;
  805|      0|  }
  806|      0|  if(strcmp(value, "0") == 0 ||
  ------------------
  |  Branch (806:6): [True: 0, False: 0]
  ------------------
  807|      0|     strcmp(value, "disable") == 0) {
  ------------------
  |  Branch (807:6): [True: 0, False: 0]
  ------------------
  808|      0|    ndpi_bitmask_clear(bitmask, flowrisk_id);
  809|      0|    return NDPI_CFG_OK;
  810|      0|  }
  811|      0|  return NDPI_CFG_INVALID_PARAM;
  812|      0|}

ndpi_domain_classify_alloc:
   34|  7.11k|ndpi_domain_classify* ndpi_domain_classify_alloc() {
   35|  7.11k|  ndpi_domain_classify *s = (ndpi_domain_classify*)ndpi_malloc(sizeof(ndpi_domain_classify));
   36|       |
   37|  7.11k|  if(!s)
  ------------------
  |  Branch (37:6): [True: 9, False: 7.10k]
  ------------------
   38|      9|    return NULL;
   39|       |
   40|  7.10k|  if(ndpi_hash_init(&s->domains) != 0) {
  ------------------
  |  Branch (40:6): [True: 2, False: 7.10k]
  ------------------
   41|      2|    ndpi_free(s);
   42|      2|    return(NULL);
   43|      2|  }
   44|       |
   45|  7.10k|  return((ndpi_domain_classify*)s);
   46|  7.10k|}
ndpi_domain_classify_free:
   50|  7.13k|void ndpi_domain_classify_free(ndpi_domain_classify *s) {
   51|  7.13k|  if(!s)
  ------------------
  |  Branch (51:6): [True: 31, False: 7.10k]
  ------------------
   52|     31|    return;
   53|       |
   54|  7.10k|  ndpi_hash_free(&s->domains);
   55|       |
   56|  7.10k|  ndpi_free(s);
   57|  7.10k|}

ndpi_free_geoip:
   74|  3.56k|{
   75|       |#ifdef HAVE_MAXMINDDB
   76|       |  if (ndpi_str->mmdb_city_loaded)
   77|       |    MMDB_close((MMDB_s *)ndpi_str->mmdb_city);
   78|       |  if (ndpi_str->mmdb_as_loaded)
   79|       |    MMDB_close((MMDB_s *)ndpi_str->mmdb_as);
   80|       |
   81|       |  ndpi_free(ndpi_str->mmdb_city);
   82|       |  ndpi_free(ndpi_str->mmdb_as);
   83|       |#else
   84|  3.56k|  (void)ndpi_str;
   85|  3.56k|#endif
   86|  3.56k|}

ndpi_get_proto_by_id:
  281|   103M|char *ndpi_get_proto_by_id(const struct ndpi_detection_module_struct *ndpi_str, u_int id) {
  282|   103M|  return(!ndpi_is_valid_protoId(ndpi_str, id) ? NULL : ndpi_str->proto_defaults[id].protoName);
  ------------------
  |  Branch (282:10): [True: 0, False: 103M]
  ------------------
  283|   103M|}
ndpi_get_proto_by_name:
  300|  1.93M|u_int16_t ndpi_get_proto_by_name(const struct ndpi_detection_module_struct *ndpi_str, const char *name) {
  301|  1.93M|  u_int16_t i, num;
  302|  1.93M|  char *p;
  303|       |
  304|  1.93M|  if(!ndpi_str || !name)
  ------------------
  |  Branch (304:6): [True: 0, False: 1.93M]
  |  Branch (304:19): [True: 0, False: 1.93M]
  ------------------
  305|      0|    return(NDPI_PROTOCOL_UNKNOWN);
  306|       |
  307|  1.93M|  if (*name == '\0')
  ------------------
  |  Branch (307:7): [True: 1.81M, False: 120k]
  ------------------
  308|  1.81M|    return(NDPI_PROTOCOL_UNKNOWN);
  309|       |
  310|   120k|  num = ndpi_str->num_supported_protocols;
  311|       |
  312|       |  /* Cache the lowercased first character of 'name' */
  313|   120k|  const unsigned char fc = tolower((unsigned char)*name);
  ------------------
  |  Branch (313:28): [True: 0, False: 0]
  |  Branch (313:28): [True: 0, False: 0]
  |  Branch (313:28): [Folded, False: 120k]
  ------------------
  314|       |
  315|   103M|  for(i = 0; i < num; i++) {
  ------------------
  |  Branch (315:14): [True: 103M, False: 12.4k]
  ------------------
  316|   103M|    p = ndpi_get_proto_by_id(ndpi_str, i);
  317|   103M|    if (p && tolower((unsigned char)*p) == fc) {
  ------------------
  |  Branch (317:9): [True: 103M, False: 0]
  |  Branch (317:14): [True: 0, False: 0]
  |  Branch (317:14): [True: 0, False: 0]
  |  Branch (317:14): [Folded, False: 103M]
  |  Branch (317:14): [True: 3.68M, False: 100M]
  ------------------
  318|  3.68M|      if(strcasecmp(p + 1, name + 1) == 0)
  ------------------
  |  Branch (318:10): [True: 108k, False: 3.57M]
  ------------------
  319|   108k|        return(i);
  320|  3.68M|    }
  321|   103M|  }
  322|       |
  323|  12.4k|  return(NDPI_PROTOCOL_UNKNOWN);
  324|   120k|}
ndpi_add_user_proto_id_mapping:
  359|  1.82M|                                    u_int16_t ndpi_proto_id, u_int16_t user_proto_id) {
  360|  1.82M|  int idx;
  361|       |
  362|  1.82M|  NDPI_LOG_DBG2(ndpi_str, "*** %u (>= %u)-> %u\n",
  ------------------
  |  |  597|  1.82M|# define NDPI_LOG_DBG2(mod, args...) { (void)mod; /* printf(args); */ }
  ------------------
  363|  1.82M|		ndpi_proto_id, ndpi_str->num_internal_protocols,
  364|  1.82M|		user_proto_id);
  365|       |
  366|  1.82M|  if(ndpi_proto_id < ndpi_str->num_internal_protocols){
  ------------------
  |  Branch (366:6): [True: 0, False: 1.82M]
  ------------------
  367|       |    /* We are overwriting an existing protocol dissector perhaps ? */
  368|       |
  369|       |#if 0
  370|       |    NDPI_LOG_ERR(ndpi_str, "Something is seriously wrong with new custom protocol %d/%d/%d\n",
  371|       |                 ndpi_proto_id, user_proto_id, ndpi_str->num_internal_protocols);
  372|       |#endif
  373|      0|    return; /* We shoudn't ever be here...*/
  374|      0|  }
  375|       |
  376|       |  /* Note that this mean we need to register *all* the internal protocols before adding
  377|       |   *any* custom protocols... */
  378|  1.82M|  idx = ndpi_proto_id - ndpi_str->num_internal_protocols;
  379|       |
  380|  1.82M|  if(idx >= ndpi_str->ndpi_to_user_proto_id_num_allocated) {
  ------------------
  |  Branch (380:6): [True: 3.79k, False: 1.82M]
  ------------------
  381|  3.79k|    int new_num;
  382|  3.79k|    u_int16_t *new_ptr;
  383|       |
  384|  3.79k|    new_num = ndpi_max(64, ndpi_str->ndpi_to_user_proto_id_num_allocated * 2);
  ------------------
  |  |  114|  3.79k|#define ndpi_max(a,b)   ((a > b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (114:26): [True: 2.50k, False: 1.28k]
  |  |  ------------------
  ------------------
  385|  3.79k|    new_num = ndpi_min(new_num, 65535); /* ndpi_str->ndpi_to_user_proto_id_num_allocated is uint16_t */
  ------------------
  |  |  113|  3.79k|#define ndpi_min(a,b)   ((a < b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (113:26): [True: 3.76k, False: 29]
  |  |  ------------------
  ------------------
  386|  3.79k|    new_ptr = ndpi_realloc(ndpi_str->ndpi_to_user_proto_id,
  387|  3.79k|                           new_num * sizeof(u_int16_t));
  388|  3.79k|    if(!new_ptr) {
  ------------------
  |  Branch (388:8): [True: 460, False: 3.33k]
  ------------------
  389|    460|      NDPI_LOG_DBG(ndpi_str, "Realloc error\n");
  ------------------
  |  |  596|    460|# define NDPI_LOG_DBG(mod,  args...) { (void)mod; /* printf(args); */ }
  ------------------
  390|    460|      return;
  391|    460|    }
  392|  3.33k|    ndpi_str->ndpi_to_user_proto_id = new_ptr;
  393|  3.33k|    ndpi_str->ndpi_to_user_proto_id_num_allocated = new_num;
  394|  3.33k|  }
  395|       |
  396|  1.82M|  ndpi_str->ndpi_to_user_proto_id[idx] = user_proto_id;
  397|  1.82M|}
ndpi_build_default_ports_range:
  459|  14.1k|						u_int16_t portE_low, u_int16_t portE_high) {
  460|  14.1k|  int i = 0;
  461|       |
  462|  14.1k|  ports[i].port_low = portA_low, ports[i].port_high = portA_high, ports[i].is_custom = 0;
  463|  14.1k|  i++;
  464|  14.1k|  ports[i].port_low = portB_low, ports[i].port_high = portB_high, ports[i].is_custom = 0;
  465|  14.1k|  i++;
  466|  14.1k|  ports[i].port_low = portC_low, ports[i].port_high = portC_high, ports[i].is_custom = 0;
  467|  14.1k|  i++;
  468|  14.1k|  ports[i].port_low = portD_low, ports[i].port_high = portD_high, ports[i].is_custom = 0;
  469|  14.1k|  i++;
  470|  14.1k|  ports[i].port_low = portE_low, ports[i].port_high = portE_high, ports[i].is_custom = 0;
  471|       |
  472|  14.1k|  return(ports);
  473|  14.1k|}
ndpi_build_default_ports:
  479|  17.7M|                                          u_int16_t portD, u_int16_t portE) {
  480|  17.7M|  int i = 0;
  481|       |
  482|  17.7M|  ports[i].port_low = portA, ports[i].port_high = portA, ports[i].is_custom = 0;
  483|  17.7M|  i++;
  484|  17.7M|  ports[i].port_low = portB, ports[i].port_high = portB, ports[i].is_custom = 0;
  485|  17.7M|  i++;
  486|  17.7M|  ports[i].port_low = portC, ports[i].port_high = portC, ports[i].is_custom = 0;
  487|  17.7M|  i++;
  488|  17.7M|  ports[i].port_low = portD, ports[i].port_high = portD, ports[i].is_custom = 0;
  489|  17.7M|  i++;
  490|  17.7M|  ports[i].port_low = portE, ports[i].port_high = portE, ports[i].is_custom = 0;
  491|       |
  492|  17.7M|  return(ports);
  493|  17.7M|}
ndpi_set_proto_subprotocols:
  614|  31.8k|{
  615|  31.8k|  va_list ap;
  616|  31.8k|  int current_arg = protoId;
  617|  31.8k|  size_t i = 0;
  618|       |
  619|  31.8k|  va_start(ap, protoId);
  620|   141k|  while (current_arg != NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS) {
  ------------------
  |  |  509|   141k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
  |  Branch (620:10): [True: 109k, False: 31.8k]
  ------------------
  621|   109k|    ndpi_str->proto_defaults[protoId].subprotocol_count++;
  622|   109k|    current_arg = va_arg(ap, int);
  623|   109k|  }
  624|  31.8k|  va_end(ap);
  625|       |
  626|  31.8k|  ndpi_str->proto_defaults[protoId].subprotocols = NULL;
  627|       |
  628|       |  /* The last protocol is not a subprotocol. */
  629|  31.8k|  ndpi_str->proto_defaults[protoId].subprotocol_count--;
  630|       |  /* No subprotocol was set before NDPI_NO_MORE_SUBPROTOCOLS. */
  631|  31.8k|  if(ndpi_str->proto_defaults[protoId].subprotocol_count == 0) {
  ------------------
  |  Branch (631:6): [True: 0, False: 31.8k]
  ------------------
  632|      0|    return;
  633|      0|  }
  634|       |
  635|  31.8k|  ndpi_str->proto_defaults[protoId].subprotocols =
  636|  31.8k|    ndpi_malloc(sizeof(protoId) * ndpi_str->proto_defaults[protoId].subprotocol_count);
  637|  31.8k|  if(!ndpi_str->proto_defaults[protoId].subprotocols) {
  ------------------
  |  Branch (637:6): [True: 1.09k, False: 30.7k]
  ------------------
  638|  1.09k|    ndpi_str->proto_defaults[protoId].subprotocol_count = 0;
  639|  1.09k|    return;
  640|  1.09k|  }
  641|       |
  642|  31.8k|  va_start(ap, protoId);
  643|  30.7k|  current_arg = va_arg(ap, int);
  644|       |
  645|   105k|  while (current_arg != NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS) {
  ------------------
  |  |  509|   105k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
  |  Branch (645:10): [True: 74.9k, False: 30.7k]
  ------------------
  646|  74.9k|    ndpi_str->proto_defaults[protoId].subprotocols[i++] = current_arg;
  647|  74.9k|    current_arg = va_arg(ap, int);
  648|  74.9k|  }
  649|       |
  650|       |  va_end(ap);
  651|  30.7k|}
ndpi_set_proto_defaults:
  689|  8.85M|			    u_int8_t is_custom_protocol) {
  690|  8.85M|  int j;
  691|       |
  692|       |  /* There is no real limit on protocols number/id; the hard limit being the u_int16_t
  693|       |     data typer used for the ids...
  694|       |  */
  695|       |
  696|  8.85M|  if(protoId >= ndpi_str->proto_defaults_num_allocated) {
  ------------------
  |  Branch (696:6): [True: 4.36k, False: 8.85M]
  ------------------
  697|  4.36k|    int new_num;
  698|  4.36k|    ndpi_proto_defaults_t *new_ptr;
  699|       |
  700|  4.36k|    new_num = ndpi_max(512, ndpi_nearest_power_of_two(protoId + 1));
  ------------------
  |  |  114|  4.36k|#define ndpi_max(a,b)   ((a > b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (114:26): [True: 3.54k, False: 817]
  |  |  ------------------
  ------------------
  701|  4.36k|    new_num = ndpi_min(new_num, 65535); /* ndpi_str->proto_defaults_num_allocated is uint16_t */
  ------------------
  |  |  113|  4.36k|#define ndpi_min(a,b)   ((a < b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (113:26): [True: 4.32k, False: 34]
  |  |  ------------------
  ------------------
  702|  4.36k|    new_ptr = ndpi_realloc(ndpi_str->proto_defaults,
  703|  4.36k|                           new_num * sizeof(ndpi_proto_defaults_t));
  704|  4.36k|    if(!new_ptr) {
  ------------------
  |  Branch (704:8): [True: 74, False: 4.28k]
  ------------------
  705|     74|      NDPI_LOG_DBG(ndpi_str, "Realloc error\n");
  ------------------
  |  |  596|     74|# define NDPI_LOG_DBG(mod,  args...) { (void)mod; /* printf(args); */ }
  ------------------
  706|     74|      return -1;
  707|     74|    }
  708|       |
  709|  4.28k|    memset(&new_ptr[ndpi_str->proto_defaults_num_allocated], '\0',
  710|  4.28k|           sizeof(ndpi_proto_defaults_t) * (new_num - ndpi_str->proto_defaults_num_allocated));
  711|  4.28k|    ndpi_str->proto_defaults = new_ptr;
  712|  4.28k|    ndpi_str->proto_defaults_num_allocated = new_num;
  713|  4.28k|  }
  714|       |
  715|  8.85M|  if(ndpi_str->proto_defaults[protoId].protoName[0] != '\0') {
  ------------------
  |  Branch (715:6): [True: 5.35M, False: 3.50M]
  ------------------
  716|  5.35M|    if(strcasecmp(ndpi_str->proto_defaults[protoId].protoName, protoName) != 0) {
  ------------------
  |  Branch (716:8): [True: 0, False: 5.35M]
  ------------------
  717|      0|      NDPI_LOG_ERR(ndpi_str, "Error. Same protocol id %d with different names [%s][%s]!\n",
  ------------------
  |  |  593|      0|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
  718|      0|                   protoId, ndpi_str->proto_defaults[protoId].protoName, protoName);
  719|  5.35M|    } else {
  720|  5.35M|      NDPI_LOG_DBG2(ndpi_str, "[NDPI] %s/protoId=%d: already initialized. Ignoring it\n", protoName, protoId);
  ------------------
  |  |  597|  5.35M|# define NDPI_LOG_DBG2(mod, args...) { (void)mod; /* printf(args); */ }
  ------------------
  721|  5.35M|    }
  722|  5.35M|    return 0;
  723|  5.35M|  }
  724|       |
  725|  3.50M|  strncpy(ndpi_str->proto_defaults[protoId].protoName,
  726|  3.50M|          protoName,
  727|  3.50M|          sizeof(ndpi_str->proto_defaults[protoId].protoName) - 1);
  728|  3.50M|  ndpi_str->proto_defaults[protoId].protoName[sizeof(ndpi_str->proto_defaults[protoId].protoName) - 1] = '\0';
  729|       |
  730|  3.50M|  ndpi_str->proto_defaults[protoId].isClearTextProto = is_cleartext;
  731|       |  /*
  732|       |    is_appprotocol=1 means that this is only an application protocol layered
  733|       |    on top of a network protocol. Example WhatsApp=1, TLS=0
  734|       |  */
  735|  3.50M|  ndpi_str->proto_defaults[protoId].isAppProtocol = is_app_protocol;
  736|  3.50M|  ndpi_str->proto_defaults[protoId].isCustomProto = is_custom_protocol;
  737|  3.50M|  ndpi_str->proto_defaults[protoId].performIPcheck = 0;
  738|  3.50M|  ndpi_str->proto_defaults[protoId].protoCategory = protoCategory;
  739|  3.50M|  ndpi_str->proto_defaults[protoId].protoId = protoId;
  740|  3.50M|  ndpi_str->proto_defaults[protoId].protoBreed = breed;
  741|  3.50M|  ndpi_str->proto_defaults[protoId].qoeCategory = qoeCategory;
  742|  3.50M|  ndpi_str->proto_defaults[protoId].subprotocols = NULL;
  743|  3.50M|  ndpi_str->proto_defaults[protoId].subprotocol_count = 0;
  744|       |
  745|  21.0M|  for(j = 0; j < MAX_DEFAULT_PORTS; j++) {
  ------------------
  |  |   89|  21.0M|#define MAX_DEFAULT_PORTS                                        5
  ------------------
  |  Branch (745:14): [True: 17.5M, False: 3.50M]
  ------------------
  746|  17.5M|    ndpi_str->proto_defaults[protoId].tcp_default_ports[j] = tcpDefPorts[j];
  747|  17.5M|    ndpi_str->proto_defaults[protoId].udp_default_ports[j] = udpDefPorts[j];
  748|  17.5M|  }
  749|       |
  750|  3.50M|  ndpi_str->num_supported_protocols++;
  751|  3.50M|  if(is_custom_protocol)
  ------------------
  |  Branch (751:6): [True: 1.82M, False: 1.67M]
  ------------------
  752|  1.82M|    ndpi_str->num_custom_protocols++;
  753|  1.67M|  else
  754|  1.67M|    ndpi_str->num_internal_protocols++;
  755|       |
  756|  3.50M|  return 0;
  757|  8.85M|}
ndpi_fill_prefix_v4:
 3182|  19.4k|int ndpi_fill_prefix_v4(ndpi_prefix_t *p, const struct in_addr *a, int b, int mb) {
 3183|  19.4k|  memset(p, 0, sizeof(ndpi_prefix_t));
 3184|       |
 3185|  19.4k|  if(b < 0 || b > mb)
  ------------------
  |  Branch (3185:6): [True: 400, False: 19.0k]
  |  Branch (3185:15): [True: 2.31k, False: 16.7k]
  ------------------
 3186|  2.71k|    return(-1);
 3187|       |
 3188|  16.7k|  p->add.sin.s_addr = a->s_addr, p->family = AF_INET, p->bitlen = b, p->ref_count = 0;
 3189|       |
 3190|  16.7k|  return(0);
 3191|  19.4k|}
ndpi_fill_prefix_v6:
 3195|  8.47k|int ndpi_fill_prefix_v6(ndpi_prefix_t *prefix, const struct in6_addr *addr, int bits, int maxbits) {
 3196|  8.47k|  memset(prefix, 0, sizeof(ndpi_prefix_t));
 3197|       |
 3198|  8.47k|  if(bits < 0 || bits > maxbits)
  ------------------
  |  Branch (3198:6): [True: 1.00k, False: 7.47k]
  |  Branch (3198:18): [True: 3.82k, False: 3.65k]
  ------------------
 3199|  4.82k|    return -1;
 3200|       |
 3201|  3.65k|  memcpy(&prefix->add.sin6, addr, (maxbits + 7) / 8);
 3202|  3.65k|  prefix->family = AF_INET6, prefix->bitlen = bits, prefix->ref_count = 0;
 3203|       |
 3204|  3.65k|  return 0;
 3205|  8.47k|}
ndpi_init_detection_module:
 4186|  3.57k|struct ndpi_detection_module_struct *ndpi_init_detection_module(struct ndpi_global_context *g_ctx) {
 4187|  3.57k|  struct ndpi_detection_module_struct *ndpi_str = ndpi_calloc(1, sizeof(struct ndpi_detection_module_struct));
 4188|  3.57k|  int i;
 4189|       |
 4190|  3.57k|  if(ndpi_str == NULL) {
  ------------------
  |  Branch (4190:6): [True: 1, False: 3.56k]
  ------------------
 4191|       |    /* Logging this error is a bit tricky. At this point, we can't use NDPI_LOG*
 4192|       |       functions yet, we don't have a custom log function and, as a library,
 4193|       |       we shouldn't use stdout/stderr. Since this error is quite unlikely,
 4194|       |       simply avoid any logs at all */
 4195|      1|    return(NULL);
 4196|      1|  }
 4197|       |
 4198|       |#ifdef WIN32
 4199|       |  /* Required to use getaddrinfo on Windows */
 4200|       |  WSADATA wsaData;
 4201|       |  WSAStartup(MAKEWORD(2, 2), &wsaData);
 4202|       |#endif
 4203|       |
 4204|       |#ifdef NDPI_ENABLE_DEBUG_MESSAGES
 4205|       |  set_ndpi_debug_function(ndpi_str, (ndpi_debug_function_ptr) ndpi_debug_printf);
 4206|       |#endif /* NDPI_ENABLE_DEBUG_MESSAGES */
 4207|       |
 4208|  3.56k|  if((ndpi_str->protocols = ndpi_ptree_create()) == NULL) {
  ------------------
  |  Branch (4208:6): [True: 8, False: 3.56k]
  ------------------
 4209|      8|    NDPI_LOG_ERR(ndpi_str, "[NDPI] Error allocating tree\n");
  ------------------
  |  |  593|      8|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 4210|      8|    ndpi_exit_detection_module(ndpi_str);
 4211|      8|    return NULL;
 4212|      8|  }
 4213|       |
 4214|  3.56k|  ndpi_str->ip_risk_mask = ndpi_ptree_create();
 4215|       |
 4216|  3.56k|  ndpi_str->g_ctx = g_ctx;
 4217|       |
 4218|  3.56k|  ndpi_str->user_data = NULL;
 4219|       |
 4220|  3.56k|  ndpi_str->tcp_max_retransmission_window_size = NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE;
  ------------------
  |  |  518|  3.56k|#define NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE 0x10000
  ------------------
 4221|       |
 4222|  3.56k|  ndpi_str->num_supported_protocols = 0;
 4223|  3.56k|  ndpi_str->num_custom_protocols = 0;
 4224|  3.56k|  ndpi_str->num_internal_protocols = 0;
 4225|       |
 4226|       |  /* We don't really need to check if these init functions fail; the code
 4227|       |     correctly handles that case (due only to memory allocation failures) */
 4228|  3.56k|  ndpi_str->host_automa.ac_automa = ac_automata_init(ac_domain_match_handler);
 4229|  3.56k|  ndpi_str->host_risk_mask_automa.ac_automa = ac_automata_init(ac_domain_match_handler);
 4230|  3.56k|  ndpi_str->common_alpns_automa.ac_automa = ac_automata_init(ac_domain_match_handler);
 4231|  3.56k|  ndpi_str->tls_cert_subject_automa.ac_automa = ac_automata_init(NULL);
 4232|  3.56k|  ndpi_str->risky_domain_automa.ac_automa = NULL; /* Initialized on demand */
 4233|       |
 4234|  3.56k|  ndpi_str->malicious_ja4_hashmap  = NULL;  /* Initialized on demand */
 4235|  3.56k|  ndpi_str->malicious_sha1_hashmap = NULL;  /* Initialized on demand */
 4236|  3.56k|  ndpi_str->ja4_custom_protos      = NULL;  /* Initialized on demand */
 4237|  3.56k|  ndpi_str->ndpifp_custom_protos   = NULL;  /* Initialized on demand */
 4238|  3.56k|  ndpi_str->http_url_hashmap       = NULL;  /* Initialized on demand */
 4239|       |
 4240|  3.56k|  ndpi_str->trusted_issuer_dn = NULL; /* Initialized on demand */
 4241|       |
 4242|  3.56k|  ndpi_str->custom_categories.sc_hostnames        = ndpi_domain_classify_alloc();
 4243|  3.56k|  if(!ndpi_str->custom_categories.sc_hostnames) {
  ------------------
  |  Branch (4243:6): [True: 4, False: 3.55k]
  ------------------
 4244|      4|    ndpi_exit_detection_module(ndpi_str);
 4245|      4|    return(NULL);
 4246|      4|  }
 4247|  3.55k|  ndpi_str->custom_categories.sc_hostnames_shadow = ndpi_domain_classify_alloc();
 4248|  3.55k|  if(!ndpi_str->custom_categories.sc_hostnames_shadow) {
  ------------------
  |  Branch (4248:6): [True: 7, False: 3.55k]
  ------------------
 4249|      7|    ndpi_exit_detection_module(ndpi_str);
 4250|      7|    return(NULL);
 4251|      7|  }
 4252|       |
 4253|  3.55k|  ndpi_str->custom_categories.ipAddresses = ndpi_patricia_new(32 /* IPv4 */);
 4254|  3.55k|  ndpi_str->custom_categories.ipAddresses_shadow = ndpi_patricia_new(32 /* IPv4 */);
 4255|  3.55k|  ndpi_str->custom_categories.ipAddresses6 = ndpi_patricia_new(128 /* IPv6 */);
 4256|  3.55k|  ndpi_str->custom_categories.ipAddresses6_shadow = ndpi_patricia_new(128 /* IPv6 */);
 4257|       |
 4258|  3.55k|  if(ndpi_str->host_automa.ac_automa)
  ------------------
  |  Branch (4258:6): [True: 3.10k, False: 445]
  ------------------
 4259|  3.10k|    ac_automata_feature(ndpi_str->host_automa.ac_automa,AC_FEATURE_LC);
  ------------------
  |  |  256|  3.10k|#define AC_FEATURE_LC 2
  ------------------
 4260|       |
 4261|  3.55k|  if(ndpi_str->tls_cert_subject_automa.ac_automa)
  ------------------
  |  Branch (4261:6): [True: 2.19k, False: 1.35k]
  ------------------
 4262|  2.19k|    ac_automata_feature(ndpi_str->tls_cert_subject_automa.ac_automa,AC_FEATURE_LC);
  ------------------
  |  |  256|  2.19k|#define AC_FEATURE_LC 2
  ------------------
 4263|       |
 4264|  3.55k|  if(ndpi_str->host_risk_mask_automa.ac_automa)
  ------------------
  |  Branch (4264:6): [True: 3.22k, False: 327]
  ------------------
 4265|  3.22k|    ac_automata_feature(ndpi_str->host_risk_mask_automa.ac_automa,AC_FEATURE_LC);
  ------------------
  |  |  256|  3.22k|#define AC_FEATURE_LC 2
  ------------------
 4266|       |
 4267|  3.55k|  if(ndpi_str->common_alpns_automa.ac_automa)
  ------------------
  |  Branch (4267:6): [True: 3.37k, False: 176]
  ------------------
 4268|  3.37k|    ac_automata_feature(ndpi_str->common_alpns_automa.ac_automa,AC_FEATURE_LC);
  ------------------
  |  |  256|  3.37k|#define AC_FEATURE_LC 2
  ------------------
 4269|       |
 4270|       |  /* ahocorasick debug */
 4271|       |  /* Needed ac_automata_enable_debug(1) for show debug */
 4272|  3.55k|  if(ndpi_str->host_automa.ac_automa)
  ------------------
  |  Branch (4272:6): [True: 3.10k, False: 445]
  ------------------
 4273|  3.10k|    ac_automata_name(ndpi_str->host_automa.ac_automa,"host",AC_FEATURE_DEBUG);
  ------------------
  |  |  255|  3.10k|#define AC_FEATURE_DEBUG 1 
  ------------------
 4274|       |
 4275|  3.55k|  if(ndpi_str->tls_cert_subject_automa.ac_automa)
  ------------------
  |  Branch (4275:6): [True: 2.19k, False: 1.35k]
  ------------------
 4276|  2.19k|    ac_automata_name(ndpi_str->tls_cert_subject_automa.ac_automa,"tls_cert",AC_FEATURE_DEBUG);
  ------------------
  |  |  255|  2.19k|#define AC_FEATURE_DEBUG 1 
  ------------------
 4277|       |
 4278|  3.55k|  if(ndpi_str->host_risk_mask_automa.ac_automa)
  ------------------
  |  Branch (4278:6): [True: 3.22k, False: 327]
  ------------------
 4279|  3.22k|    ac_automata_name(ndpi_str->host_risk_mask_automa.ac_automa,"content",AC_FEATURE_DEBUG);
  ------------------
  |  |  255|  3.22k|#define AC_FEATURE_DEBUG 1 
  ------------------
 4280|       |
 4281|  3.55k|  if(ndpi_str->common_alpns_automa.ac_automa)
  ------------------
  |  Branch (4281:6): [True: 3.37k, False: 176]
  ------------------
 4282|  3.37k|    ac_automata_name(ndpi_str->common_alpns_automa.ac_automa,"content",AC_FEATURE_DEBUG);
  ------------------
  |  |  255|  3.37k|#define AC_FEATURE_DEBUG 1 
  ------------------
 4283|       |
 4284|  3.55k|  if((ndpi_str->custom_categories.ipAddresses == NULL) || (ndpi_str->custom_categories.ipAddresses_shadow == NULL) ||
  ------------------
  |  Branch (4284:6): [True: 4, False: 3.54k]
  |  Branch (4284:59): [True: 2, False: 3.54k]
  ------------------
 4285|  3.54k|     (ndpi_str->custom_categories.ipAddresses6 == NULL) || (ndpi_str->custom_categories.ipAddresses6_shadow == NULL)) {
  ------------------
  |  Branch (4285:6): [True: 3, False: 3.54k]
  |  Branch (4285:60): [True: 4, False: 3.53k]
  ------------------
 4286|     13|    NDPI_LOG_ERR(ndpi_str, "[NDPI] Error allocating Patricia trees\n");
  ------------------
  |  |  593|     13|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 4287|     13|    ndpi_exit_detection_module(ndpi_str);
 4288|     13|    return(NULL);
 4289|     13|  }
 4290|       |
 4291|  21.2k|  for(i = 0; i < NUM_CUSTOM_CATEGORIES; i++)
  ------------------
  |  | 1369|  21.2k|#define NUM_CUSTOM_CATEGORIES      5
  ------------------
  |  Branch (4291:14): [True: 17.6k, False: 3.53k]
  ------------------
 4292|  17.6k|    ndpi_snprintf(ndpi_str->custom_category_labels[i], CUSTOM_CATEGORY_LABEL_LEN, "User custom category %u",
  ------------------
  |  | 1370|  17.6k|#define CUSTOM_CATEGORY_LABEL_LEN 32
  ------------------
 4293|  17.6k|		  (unsigned int) (i + 1));
 4294|       |
 4295|       |  /*
 4296|       |     *** Note that we don't know if a (internal) protocol is enabled or not until `ndpi_finalize_initialization()` ***
 4297|       |  */
 4298|       |
 4299|       |  /* Build `ndpi_str->proto_defaults[]` array. This array does NOT depend on protocols being enable or not! */
 4300|  3.53k|  init_protocol_defaults(ndpi_str);
 4301|       |
 4302|       |  /* At this point, we MUST have loaded ALL the internal protocols and NONE of
 4303|       |     the custom protocols!
 4304|       |     Only the first **consecutive** `ndpi_str->num_supported_protocols` entries in the
 4305|       |     array `ndpi_str->proto_defaults[]` MUST have been initialized!
 4306|       |     In other words, all the other functions can safely access to `ndpi_str->num_supported_protocols` and
 4307|       |     `ndpi_str->num_internal_protocols`
 4308|       |
 4309|       |     Sanity checks
 4310|       |  */
 4311|  1.67M|  for(i = 0; i < (int)ndpi_str->num_supported_protocols; i++) {
  ------------------
  |  Branch (4311:14): [True: 1.67M, False: 3.53k]
  ------------------
 4312|  1.67M|    if(ndpi_str->proto_defaults[i].protoName[0] == '\0' ||
  ------------------
  |  Branch (4312:8): [True: 5, False: 1.67M]
  ------------------
 4313|  1.67M|       ndpi_str->proto_defaults[i].isCustomProto) {
  ------------------
  |  Branch (4313:8): [True: 0, False: 1.67M]
  ------------------
 4314|      5|      NDPI_LOG_ERR(ndpi_str, "INTERNAL ERROR protocols %d/%d %d\n",
  ------------------
  |  |  593|      5|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 4315|      5|                   i, ndpi_str->num_supported_protocols,
 4316|      5|                   ndpi_str->proto_defaults[i].isCustomProto);
 4317|      5|      ndpi_exit_detection_module(ndpi_str);
 4318|      5|      return(NULL);
 4319|      5|    }
 4320|  1.67M|  }
 4321|  3.53k|  if(ndpi_str->num_supported_protocols != ndpi_str->num_internal_protocols) {
  ------------------
  |  Branch (4321:6): [True: 0, False: 3.53k]
  ------------------
 4322|      0|    ndpi_exit_detection_module(ndpi_str);
 4323|      0|    return(NULL);
 4324|      0|  }
 4325|       |
 4326|       |  /* When we know the number of internal protocols, we can set the default configuration
 4327|       |     (we need the number to proper initialize the bitmasks)*/
 4328|  3.53k|  if(ndpi_set_default_config(&ndpi_str->cfg,
  ------------------
  |  Branch (4328:6): [True: 13, False: 3.51k]
  ------------------
 4329|  3.53k|                        ndpi_str->num_internal_protocols) != 0) {
 4330|     13|    NDPI_LOG_ERR(ndpi_str, "Error allocating set_default_config\n");
  ------------------
  |  |  593|     13|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 4331|     13|    ndpi_exit_detection_module(ndpi_str);
 4332|     13|    return(NULL);
 4333|     13|  }
 4334|       |
 4335|  3.51k|  return(ndpi_str);
 4336|  3.53k|}
ndpi_exit_detection_module:
 5150|  3.62k|void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_str) {
 5151|  3.62k|  if(ndpi_str != NULL) {
  ------------------
  |  Branch (5151:6): [True: 3.56k, False: 51]
  ------------------
 5152|  3.56k|    unsigned int i;
 5153|       |
 5154|       |    /* Unload plugins (if any) */
 5155|  3.56k|    ndpi_unload_protocol_plugins(ndpi_str);
 5156|       |
 5157|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.detection_bitmask);
 5158|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.debug_bitmask);
 5159|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.ip_list_bitmask);
 5160|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.monitoring);
 5161|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.flowrisk_bitmask);
 5162|  3.56k|    ndpi_bitmask_free(&ndpi_str->cfg.flowrisk_info_bitmask);
 5163|       |
 5164|  4.42M|    for (i = 0; i < ndpi_str->proto_defaults_num_allocated; i++) {
  ------------------
  |  Branch (5164:17): [True: 4.41M, False: 3.56k]
  ------------------
 5165|  4.41M|      if(ndpi_str->proto_defaults[i].subprotocols != NULL)
  ------------------
  |  Branch (5165:10): [True: 30.7k, False: 4.38M]
  ------------------
 5166|  30.7k|        ndpi_free(ndpi_str->proto_defaults[i].subprotocols);
 5167|  4.41M|    }
 5168|  3.56k|    ndpi_free(ndpi_str->proto_defaults);
 5169|       |
 5170|  3.56k|    ndpi_free(ndpi_str->ndpi_to_user_proto_id);
 5171|       |
 5172|       |#ifdef HAVE_NBPF
 5173|       |    for(i = 0; (i < MAX_NBPF_CUSTOM_PROTO) && (ndpi_str->nbpf_custom_proto[i].tree != NULL); i++)
 5174|       |      nbpf_free(ndpi_str->nbpf_custom_proto[i].tree);
 5175|       |#endif
 5176|       |
 5177|       |    /* NDPI_PROTOCOL_TINC */
 5178|  3.56k|    if(ndpi_str->tinc_cache)
  ------------------
  |  Branch (5178:8): [True: 0, False: 3.56k]
  ------------------
 5179|      0|      cache_free((cache_t)(ndpi_str->tinc_cache));
 5180|       |
 5181|  3.56k|    if(!ndpi_str->cfg.ookla_cache_scope &&
  ------------------
  |  Branch (5181:8): [True: 3.56k, False: 0]
  ------------------
 5182|  3.56k|       ndpi_str->ookla_cache)
  ------------------
  |  Branch (5182:8): [True: 0, False: 3.56k]
  ------------------
 5183|      0|      ndpi_lru_free_cache(ndpi_str->ookla_cache);
 5184|       |
 5185|  3.56k|    if(!ndpi_str->cfg.signal_cache_scope &&
  ------------------
  |  Branch (5185:8): [True: 3.56k, False: 0]
  ------------------
 5186|  3.56k|       ndpi_str->signal_cache)
  ------------------
  |  Branch (5186:8): [True: 0, False: 3.56k]
  ------------------
 5187|      0|      ndpi_lru_free_cache(ndpi_str->signal_cache);
 5188|       |
 5189|  3.56k|    if(!ndpi_str->cfg.bittorrent_cache_scope &&
  ------------------
  |  Branch (5189:8): [True: 3.56k, False: 0]
  ------------------
 5190|  3.56k|       ndpi_str->bittorrent_cache)
  ------------------
  |  Branch (5190:8): [True: 0, False: 3.56k]
  ------------------
 5191|      0|      ndpi_lru_free_cache(ndpi_str->bittorrent_cache);
 5192|       |
 5193|  3.56k|    if(!ndpi_str->cfg.stun_cache_scope &&
  ------------------
  |  Branch (5193:8): [True: 3.56k, False: 0]
  ------------------
 5194|  3.56k|       ndpi_str->stun_cache)
  ------------------
  |  Branch (5194:8): [True: 0, False: 3.56k]
  ------------------
 5195|      0|      ndpi_lru_free_cache(ndpi_str->stun_cache);
 5196|       |
 5197|  3.56k|    if(!ndpi_str->cfg.tls_cert_cache_scope &&
  ------------------
  |  Branch (5197:8): [True: 3.56k, False: 0]
  ------------------
 5198|  3.56k|       ndpi_str->tls_cert_cache)
  ------------------
  |  Branch (5198:8): [True: 0, False: 3.56k]
  ------------------
 5199|      0|      ndpi_lru_free_cache(ndpi_str->tls_cert_cache);
 5200|       |
 5201|  3.56k|    if(!ndpi_str->cfg.mining_cache_scope &&
  ------------------
  |  Branch (5201:8): [True: 3.56k, False: 0]
  ------------------
 5202|  3.56k|       ndpi_str->mining_cache)
  ------------------
  |  Branch (5202:8): [True: 0, False: 3.56k]
  ------------------
 5203|      0|      ndpi_lru_free_cache(ndpi_str->mining_cache);
 5204|       |
 5205|  3.56k|    if(!ndpi_str->cfg.msteams_cache_scope &&
  ------------------
  |  Branch (5205:8): [True: 3.56k, False: 0]
  ------------------
 5206|  3.56k|       ndpi_str->msteams_cache)
  ------------------
  |  Branch (5206:8): [True: 0, False: 3.56k]
  ------------------
 5207|      0|      ndpi_lru_free_cache(ndpi_str->msteams_cache);
 5208|       |
 5209|  3.56k|    if(!ndpi_str->cfg.fpc_dns_cache_scope &&
  ------------------
  |  Branch (5209:8): [True: 3.56k, False: 0]
  ------------------
 5210|  3.56k|       ndpi_str->fpc_dns_cache)
  ------------------
  |  Branch (5210:8): [True: 0, False: 3.56k]
  ------------------
 5211|      0|      ndpi_lru_free_cache(ndpi_str->fpc_dns_cache);
 5212|       |
 5213|  3.56k|    if(ndpi_str->protocols)    ndpi_ptree_destroy(ndpi_str->protocols);
  ------------------
  |  Branch (5213:8): [True: 3.56k, False: 8]
  ------------------
 5214|  3.56k|    if(ndpi_str->ip_risk_mask) ndpi_ptree_destroy(ndpi_str->ip_risk_mask);
  ------------------
  |  Branch (5214:8): [True: 3.08k, False: 488]
  ------------------
 5215|  3.56k|    if(ndpi_str->ip_risk)      ndpi_ptree_destroy(ndpi_str->ip_risk);
  ------------------
  |  Branch (5215:8): [True: 0, False: 3.56k]
  ------------------
 5216|       |
 5217|  3.56k|    if(ndpi_str->udpRoot != NULL) ndpi_tdestroy(ndpi_str->udpRoot, ndpi_free);
  ------------------
  |  Branch (5217:8): [True: 0, False: 3.56k]
  ------------------
 5218|  3.56k|    if(ndpi_str->tcpRoot != NULL) ndpi_tdestroy(ndpi_str->tcpRoot, ndpi_free);
  ------------------
  |  Branch (5218:8): [True: 0, False: 3.56k]
  ------------------
 5219|       |
 5220|  3.56k|    if(ndpi_str->host_automa.ac_automa != NULL)
  ------------------
  |  Branch (5220:8): [True: 3.11k, False: 454]
  ------------------
 5221|  3.11k|      ac_automata_release((AC_AUTOMATA_t *) ndpi_str->host_automa.ac_automa,
 5222|  3.11k|			  1 /* free patterns strings memory */);
 5223|       |
 5224|  3.56k|    if(ndpi_str->risky_domain_automa.ac_automa != NULL)
  ------------------
  |  Branch (5224:8): [True: 0, False: 3.56k]
  ------------------
 5225|      0|      ac_automata_release((AC_AUTOMATA_t *) ndpi_str->risky_domain_automa.ac_automa,
 5226|      0|                          1 /* free patterns strings memory */);
 5227|       |
 5228|  3.56k|    if(ndpi_str->tls_cert_subject_automa.ac_automa != NULL)
  ------------------
  |  Branch (5228:8): [True: 2.20k, False: 1.36k]
  ------------------
 5229|  2.20k|      ac_automata_release((AC_AUTOMATA_t *) ndpi_str->tls_cert_subject_automa.ac_automa, 0);
 5230|       |
 5231|  3.56k|    if(ndpi_str->malicious_ja4_hashmap != NULL)
  ------------------
  |  Branch (5231:8): [True: 0, False: 3.56k]
  ------------------
 5232|      0|      ndpi_hash_free(&ndpi_str->malicious_ja4_hashmap);
 5233|       |
 5234|  3.56k|    if(ndpi_str->malicious_sha1_hashmap != NULL)
  ------------------
  |  Branch (5234:8): [True: 0, False: 3.56k]
  ------------------
 5235|      0|      ndpi_hash_free(&ndpi_str->malicious_sha1_hashmap);
 5236|       |
 5237|  3.56k|    if(ndpi_str->tcp_fingerprint_hashmap != NULL)
  ------------------
  |  Branch (5237:8): [True: 0, False: 3.56k]
  ------------------
 5238|      0|      ndpi_hash_free(&ndpi_str->tcp_fingerprint_hashmap);
 5239|       |
 5240|  3.56k|    ndpi_domain_classify_free(ndpi_str->custom_categories.sc_hostnames_shadow);
 5241|  3.56k|    ndpi_domain_classify_free(ndpi_str->custom_categories.sc_hostnames);
 5242|       |
 5243|  3.56k|    if(ndpi_str->custom_categories.ipAddresses != NULL)
  ------------------
  |  Branch (5243:8): [True: 3.54k, False: 23]
  ------------------
 5244|  3.54k|      ndpi_patricia_destroy((ndpi_patricia_tree_t *) ndpi_str->custom_categories.ipAddresses, free_ptree_data);
 5245|       |
 5246|  3.56k|    if(ndpi_str->custom_categories.ipAddresses_shadow != NULL)
  ------------------
  |  Branch (5246:8): [True: 3.54k, False: 21]
  ------------------
 5247|  3.54k|      ndpi_patricia_destroy((ndpi_patricia_tree_t *) ndpi_str->custom_categories.ipAddresses_shadow, free_ptree_data);
 5248|       |
 5249|  3.56k|    if(ndpi_str->custom_categories.ipAddresses6 != NULL)
  ------------------
  |  Branch (5249:8): [True: 3.54k, False: 22]
  ------------------
 5250|  3.54k|      ndpi_patricia_destroy((ndpi_patricia_tree_t *) ndpi_str->custom_categories.ipAddresses6, free_ptree_data);
 5251|       |
 5252|  3.56k|    if(ndpi_str->custom_categories.ipAddresses6_shadow != NULL)
  ------------------
  |  Branch (5252:8): [True: 3.54k, False: 25]
  ------------------
 5253|  3.54k|      ndpi_patricia_destroy((ndpi_patricia_tree_t *) ndpi_str->custom_categories.ipAddresses6_shadow, free_ptree_data);
 5254|       |
 5255|  3.56k|    if(ndpi_str->host_risk_mask_automa.ac_automa != NULL)
  ------------------
  |  Branch (5255:8): [True: 3.23k, False: 337]
  ------------------
 5256|  3.23k|      ac_automata_release((AC_AUTOMATA_t *) ndpi_str->host_risk_mask_automa.ac_automa,
 5257|  3.23k|			  1 /* free patterns strings memory */);
 5258|       |
 5259|  3.56k|    if(ndpi_str->common_alpns_automa.ac_automa != NULL)
  ------------------
  |  Branch (5259:8): [True: 3.38k, False: 185]
  ------------------
 5260|  3.38k|      ac_automata_release((AC_AUTOMATA_t *) ndpi_str->common_alpns_automa.ac_automa,
 5261|  3.38k|			  1 /* free patterns strings memory */);
 5262|       |
 5263|  3.56k|    if(ndpi_str->trusted_issuer_dn) {
  ------------------
  |  Branch (5263:8): [True: 101, False: 3.46k]
  ------------------
 5264|    101|      ndpi_list *head = ndpi_str->trusted_issuer_dn;
 5265|       |
 5266|  7.29k|      while(head != NULL) {
  ------------------
  |  Branch (5266:13): [True: 7.19k, False: 101]
  ------------------
 5267|  7.19k|	ndpi_list *next;
 5268|       |
 5269|  7.19k|	if(head->value) ndpi_free(head->value);
  ------------------
  |  Branch (5269:5): [True: 7.19k, False: 0]
  ------------------
 5270|  7.19k|	next = head->next;
 5271|  7.19k|	ndpi_free(head);
 5272|  7.19k|	head = next;
 5273|  7.19k|      }
 5274|    101|    }
 5275|       |
 5276|       |#ifdef CUSTOM_NDPI_PROTOCOLS
 5277|       |#include "../../../nDPI-custom/ndpi_exit_detection_module.c"
 5278|       |#endif
 5279|       |
 5280|  3.56k|    ndpi_free_geoip(ndpi_str);
 5281|       |
 5282|  3.56k|    if(ndpi_str->callback_buffer)
  ------------------
  |  Branch (5282:8): [True: 0, False: 3.56k]
  ------------------
 5283|      0|      ndpi_free(ndpi_str->callback_buffer);
 5284|       |
 5285|  3.56k|    if(ndpi_str->callback_buffer_tcp_payload)
  ------------------
  |  Branch (5285:8): [True: 0, False: 3.56k]
  ------------------
 5286|      0|      ndpi_free(ndpi_str->callback_buffer_tcp_payload);
 5287|       |
 5288|  3.56k|    if(ndpi_str->public_domain_suffixes)
  ------------------
  |  Branch (5288:8): [True: 0, False: 3.56k]
  ------------------
 5289|      0|      ndpi_hash_free(&ndpi_str->public_domain_suffixes);
 5290|       |
 5291|  3.56k|    if(ndpi_str->ja4_custom_protos)
  ------------------
  |  Branch (5291:8): [True: 51, False: 3.51k]
  ------------------
 5292|     51|      ndpi_hash_free(&ndpi_str->ja4_custom_protos);
 5293|       |
 5294|  3.56k|    if(ndpi_str->ndpifp_custom_protos)
  ------------------
  |  Branch (5294:8): [True: 39, False: 3.53k]
  ------------------
 5295|     39|      ndpi_hash_free(&ndpi_str->ndpifp_custom_protos);
 5296|       |
 5297|  3.56k|    if(ndpi_str->http_url_hashmap)
  ------------------
  |  Branch (5297:8): [True: 556, False: 3.01k]
  ------------------
 5298|    556|      ndpi_hash_free(&ndpi_str->http_url_hashmap);
 5299|       |
 5300|  3.56k|    if(ndpi_str->address_cache)
  ------------------
  |  Branch (5300:8): [True: 0, False: 3.56k]
  ------------------
 5301|      0|      ndpi_term_address_cache(ndpi_str->address_cache);
 5302|       |
 5303|  3.56k|    if(ndpi_str->dns_hostname.cache)
  ------------------
  |  Branch (5303:8): [True: 0, False: 3.56k]
  ------------------
 5304|      0|      ndpi_filter_free(ndpi_str->dns_hostname.cache);
 5305|       |
 5306|  3.56k|    if(ndpi_str->dns_hostname.cache_shadow)
  ------------------
  |  Branch (5306:8): [True: 0, False: 3.56k]
  ------------------
 5307|      0|      ndpi_filter_free(ndpi_str->dns_hostname.cache_shadow);
 5308|       |
 5309|  3.56k|    ndpi_free(ndpi_str);
 5310|  3.56k|  }
 5311|       |
 5312|       |#ifdef WIN32
 5313|       |  WSACleanup();
 5314|       |#endif
 5315|  3.62k|}
ndpi_add_ip_risk_mask:
 5461|  10.7k|			  char *ip, ndpi_risk mask) {
 5462|  10.7k|  char *cidr, *saveptr, *addr = strtok_r(ip, "/", &saveptr);
 5463|  10.7k|  int is_ipv6 = 0;
 5464|  10.7k|  ndpi_patricia_node_t *node = NULL;
 5465|       |
 5466|  10.7k|  if(!addr || strlen(addr) == 0)
  ------------------
  |  Branch (5466:6): [True: 284, False: 10.4k]
  |  Branch (5466:15): [True: 0, False: 10.4k]
  ------------------
 5467|    284|    return(-2);
 5468|       |
 5469|  10.4k|  if(ip[0] == '[') {
  ------------------
  |  Branch (5469:6): [True: 6.49k, False: 3.94k]
  ------------------
 5470|  6.49k|    is_ipv6 = 1;
 5471|  6.49k|    addr += 1;
 5472|  6.49k|    addr[strlen(addr) - 1] = '\0'; /* strip ']' */
 5473|  6.49k|  }
 5474|       |
 5475|  10.4k|  cidr = strtok_r(NULL, "\n", &saveptr);
 5476|       |
 5477|  10.4k|  if(!is_ipv6 && ndpi_str->ip_risk_mask && ndpi_str->ip_risk_mask->v4) {
  ------------------
  |  Branch (5477:6): [True: 3.94k, False: 6.49k]
  |  Branch (5477:18): [True: 3.72k, False: 228]
  |  Branch (5477:44): [True: 3.72k, False: 0]
  ------------------
 5478|  3.72k|    struct in_addr pin;
 5479|       |
 5480|  3.72k|    if(inet_pton(AF_INET, addr, &pin) != 1)
  ------------------
  |  Branch (5480:8): [True: 532, False: 3.18k]
  ------------------
 5481|    532|      return(-1);
 5482|  3.18k|    node = add_to_ptree(ndpi_str->ip_risk_mask->v4, AF_INET,
 5483|  3.18k|			&pin, cidr ? atoi(cidr) : 32 /* bits */);
  ------------------
  |  Branch (5483:10): [True: 2.76k, False: 426]
  ------------------
 5484|  6.72k|  } else if(is_ipv6 && ndpi_str->ip_risk_mask && ndpi_str->ip_risk_mask->v6) {
  ------------------
  |  Branch (5484:13): [True: 6.49k, False: 228]
  |  Branch (5484:24): [True: 6.10k, False: 390]
  |  Branch (5484:50): [True: 6.10k, False: 0]
  ------------------
 5485|  6.10k|    struct in6_addr pin6;
 5486|       |
 5487|  6.10k|    if(inet_pton(AF_INET6, addr, &pin6) != 1)
  ------------------
  |  Branch (5487:8): [True: 627, False: 5.48k]
  ------------------
 5488|    627|      return(-1);
 5489|  5.48k|    node = add_to_ptree(ndpi_str->ip_risk_mask->v6, AF_INET6,
 5490|  5.48k|			&pin6, cidr ? atoi(cidr) : 128 /* bits */);
  ------------------
  |  Branch (5490:11): [True: 4.94k, False: 533]
  ------------------
 5491|  5.48k|  } else {
 5492|    618|    return(-2);
 5493|    618|  }
 5494|       |
 5495|  8.66k|  if(node) {
  ------------------
  |  Branch (5495:6): [True: 1.54k, False: 7.12k]
  ------------------
 5496|  1.54k|    node->value.u.uv64 = (u_int64_t)mask;
 5497|  1.54k|    return(0);
 5498|  1.54k|  }
 5499|  7.12k|  return(-1);
 5500|  8.66k|}
ndpi_add_host_risk_mask:
 5505|  8.84k|			    char *host, ndpi_risk mask) {
 5506|  8.84k|  AC_PATTERN_t ac_pattern;
 5507|  8.84k|  AC_ERROR_t rc;
 5508|  8.84k|  u_int len;
 5509|  8.84k|  char *host_dup = NULL;
 5510|       |
 5511|  8.84k|  if((ndpi_str == NULL) || (ndpi_str->host_risk_mask_automa.ac_automa == NULL) || (host == NULL))
  ------------------
  |  Branch (5511:6): [True: 0, False: 8.84k]
  |  Branch (5511:28): [True: 1.44k, False: 7.40k]
  |  Branch (5511:83): [True: 0, False: 7.40k]
  ------------------
 5512|  1.44k|    return(-2);
 5513|       |
 5514|       |  /* Zap heading/trailing quotes */
 5515|  7.40k|  switch(host[0]) {
  ------------------
  |  Branch (5515:10): [True: 6.06k, False: 1.34k]
  ------------------
 5516|  1.57k|  case '"':
  ------------------
  |  Branch (5516:3): [True: 1.57k, False: 5.83k]
  ------------------
 5517|  6.06k|  case '\'':
  ------------------
  |  Branch (5517:3): [True: 4.48k, False: 2.91k]
  ------------------
 5518|  6.06k|    {
 5519|  6.06k|      int len;
 5520|       |
 5521|  6.06k|      host = &host[1];
 5522|  6.06k|      len = strlen(host);
 5523|  6.06k|      if(len > 0)
  ------------------
  |  Branch (5523:10): [True: 5.71k, False: 346]
  ------------------
 5524|  5.71k|	host[len-1] = '\0';
 5525|  6.06k|    }
 5526|       |
 5527|  6.06k|    break;
 5528|  7.40k|  }
 5529|       |
 5530|  7.40k|  host_dup = ndpi_strdup(host);
 5531|  7.40k|  if(!host_dup)
  ------------------
  |  Branch (5531:6): [True: 512, False: 6.89k]
  ------------------
 5532|    512|    return(-1);
 5533|       |
 5534|  6.89k|  memset(&ac_pattern, 0, sizeof(ac_pattern));
 5535|       |
 5536|  6.89k|  len = strlen(host);
 5537|       |
 5538|  6.89k|  ac_pattern.astring      = host_dup;
 5539|  6.89k|  ac_pattern.length       = len;
 5540|  6.89k|  ac_pattern.rep.number64 = (ndpi_risk)mask;
 5541|  6.89k|  ac_pattern.rep.level    = ndpi_domain_level(host);
 5542|  6.89k|  ac_pattern.rep.at_end   = 0;
 5543|  6.89k|  ac_pattern.rep.dot      = memchr(host,'.',len) != NULL;
 5544|       |
 5545|  6.89k|  rc = ac_automata_add(ndpi_str->host_risk_mask_automa.ac_automa, &ac_pattern);
 5546|       |
 5547|  6.89k|  if(rc != ACERR_SUCCESS) {
  ------------------
  |  Branch (5547:6): [True: 6.40k, False: 490]
  ------------------
 5548|  6.40k|    ndpi_free(host_dup);
 5549|       |
 5550|  6.40k|    if(rc != ACERR_DUPLICATE_PATTERN)
  ------------------
  |  Branch (5550:8): [True: 1.18k, False: 5.22k]
  ------------------
 5551|  1.18k|      return (-2);
 5552|  6.40k|  }
 5553|       |
 5554|  5.71k|  return(0);
 5555|  6.89k|}
ndpi_add_trusted_issuer_dn:
 5559|  8.44k|int ndpi_add_trusted_issuer_dn(struct ndpi_detection_module_struct *ndpi_str, char *dn) {
 5560|  8.44k|  ndpi_list *head;
 5561|       |
 5562|  8.44k|  if(dn == NULL)
  ------------------
  |  Branch (5562:6): [True: 219, False: 8.22k]
  ------------------
 5563|    219|    return(-1);
 5564|  8.22k|  else
 5565|  8.22k|    head = (ndpi_list*)ndpi_malloc(sizeof(ndpi_list));
 5566|       |
 5567|  8.22k|  if(head == NULL) return(-2);
  ------------------
  |  Branch (5567:6): [True: 503, False: 7.72k]
  ------------------
 5568|       |
 5569|  7.72k|  if(dn[0] == '"') {
  ------------------
  |  Branch (5569:6): [True: 966, False: 6.75k]
  ------------------
 5570|    966|    char buf[128], *quote;
 5571|       |
 5572|    966|    ndpi_snprintf(buf, sizeof(buf), "%s", &dn[1]);
 5573|       |
 5574|    966|    if((quote = strchr(buf, '"')) != NULL)
  ------------------
  |  Branch (5574:8): [True: 683, False: 283]
  ------------------
 5575|    683|      quote[0] = '\0';
 5576|       |
 5577|    966|    head->value = ndpi_strdup(buf);
 5578|    966|  } else
 5579|  6.75k|    head->value = ndpi_strdup(dn);
 5580|       |
 5581|  7.72k|  if(head->value == NULL) {
  ------------------
  |  Branch (5581:6): [True: 527, False: 7.19k]
  ------------------
 5582|    527|    ndpi_free(head);
 5583|    527|    return(-3);
 5584|    527|  }
 5585|       |
 5586|  7.19k|  head->next = ndpi_str->trusted_issuer_dn;
 5587|  7.19k|  ndpi_str->trusted_issuer_dn = head;
 5588|       |
 5589|  7.19k|  return(0);
 5590|  7.72k|}
load_protocols_file_fd:
 6647|  3.57k|int load_protocols_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd) {
 6648|  3.57k|  char *buffer, *old_buffer;
 6649|  3.57k|  int chunk_len = 1024, buffer_len = chunk_len;
 6650|  3.57k|  int i;
 6651|       |
 6652|  3.57k|  if(!ndpi_str || !fd)
  ------------------
  |  Branch (6652:6): [True: 51, False: 3.51k]
  |  Branch (6652:19): [True: 0, False: 3.51k]
  ------------------
 6653|     51|    return -1;
 6654|       |
 6655|  3.51k|  buffer = ndpi_malloc(buffer_len);
 6656|  3.51k|  if(buffer == NULL) {
  ------------------
  |  Branch (6656:6): [True: 2, False: 3.51k]
  ------------------
 6657|      2|    NDPI_LOG_ERR(ndpi_str, "Memory allocation failure\n");
  ------------------
  |  |  593|      2|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 6658|      2|    return -2;
 6659|      2|  }
 6660|       |
 6661|  2.05M|  while(1) {
  ------------------
  |  Branch (6661:9): [True: 2.05M, Folded]
  ------------------
 6662|  2.05M|    char *line = buffer;
 6663|  2.05M|    int line_len = buffer_len;
 6664|       |
 6665|  2.06M|    while(((line = fgets(line, line_len, fd)) != NULL)
  ------------------
  |  Branch (6665:11): [True: 2.06M, False: 3.40k]
  ------------------
 6666|  2.06M|	  && strlen(line) > 0
  ------------------
  |  Branch (6666:7): [True: 2.06M, False: 1.28k]
  ------------------
 6667|  2.06M|	  && (line[strlen(line) - 1] != '\n')) {
  ------------------
  |  Branch (6667:7): [True: 6.27k, False: 2.05M]
  ------------------
 6668|  6.27k|      i = strlen(line);
 6669|  6.27k|      old_buffer = buffer;
 6670|  6.27k|      buffer_len += chunk_len;
 6671|       |
 6672|  6.27k|      buffer = ndpi_realloc(old_buffer, buffer_len);
 6673|  6.27k|      if(buffer == NULL) {
  ------------------
  |  Branch (6673:10): [True: 112, False: 6.16k]
  ------------------
 6674|    112|	NDPI_LOG_ERR(ndpi_str, "Memory allocation failure\n");
  ------------------
  |  |  593|    112|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 6675|    112|	ndpi_free(old_buffer);
 6676|    112|	return -2;
 6677|    112|      }
 6678|       |
 6679|  6.16k|      line = &buffer[i];
 6680|  6.16k|      line_len = chunk_len;
 6681|  6.16k|    } /* while */
 6682|       |
 6683|  2.05M|    if(!line) /* safety check */
  ------------------
  |  Branch (6683:8): [True: 3.40k, False: 2.05M]
  ------------------
 6684|  3.40k|      break;
 6685|       |
 6686|  2.05M|    i = strlen(buffer);
 6687|  2.05M|    if((i <= 1) || (buffer[0] == '#'))
  ------------------
  |  Branch (6687:8): [True: 36.2k, False: 2.01M]
  |  Branch (6687:20): [True: 1.02k, False: 2.01M]
  ------------------
 6688|  37.3k|      continue;
 6689|  2.01M|    else {
 6690|  2.01M|      buffer[i - 1] = '\0';
 6691|  2.01M|      i--;
 6692|       |
 6693|  2.01M|      if((i > 0) && (buffer[i-1] == '\r'))
  ------------------
  |  Branch (6693:10): [True: 2.01M, False: 0]
  |  Branch (6693:21): [True: 1.42k, False: 2.01M]
  ------------------
 6694|  1.42k|	buffer[i - 1] = '\0';
 6695|       |
 6696|  2.01M|      if(buffer[0] == '\0')
  ------------------
  |  Branch (6696:10): [True: 607, False: 2.01M]
  ------------------
 6697|    607|	continue;
 6698|  2.01M|    }
 6699|       |
 6700|       |    /* printf("Processing: \"%s\"\n", buffer); */
 6701|       |
 6702|  2.01M|    if(ndpi_handle_rule(ndpi_str, buffer) != 0)
  ------------------
  |  Branch (6702:8): [True: 1.94M, False: 77.6k]
  ------------------
 6703|  1.94M|      NDPI_LOG_INFO(ndpi_str, "Discraded rule '%s'\n", buffer);
  ------------------
  |  |  595|  1.94M|# define NDPI_LOG_INFO(mod, args...) { (void)mod; /* printf(args); */ }
  ------------------
 6704|  2.01M|  }
 6705|       |
 6706|  3.40k|  ndpi_free(buffer);
 6707|       |
 6708|  3.40k|  return 0;
 6709|  3.51k|}
ndpi_ptree_create:
12599|  7.13k|ndpi_ptree_t *ndpi_ptree_create(void) {
12600|  7.13k|  ndpi_ptree_t *tree = (ndpi_ptree_t *) ndpi_malloc(sizeof(ndpi_ptree_t));
12601|       |
12602|  7.13k|  if(tree) {
  ------------------
  |  Branch (12602:6): [True: 7.02k, False: 108]
  ------------------
12603|  7.02k|    tree->v4 = ndpi_patricia_new(32);
12604|  7.02k|    tree->v6 = ndpi_patricia_new(128);
12605|       |
12606|  7.02k|    if((!tree->v4) || (!tree->v6)) {
  ------------------
  |  Branch (12606:8): [True: 213, False: 6.80k]
  |  Branch (12606:23): [True: 167, False: 6.64k]
  ------------------
12607|    380|      ndpi_ptree_destroy(tree);
12608|    380|      return(NULL);
12609|    380|    }
12610|  7.02k|  }
12611|       |
12612|  6.75k|  return(tree);
12613|  7.13k|}
ndpi_ptree_destroy:
12617|  7.02k|void ndpi_ptree_destroy(ndpi_ptree_t *tree) {
12618|  7.02k|  if(tree) {
  ------------------
  |  Branch (12618:6): [True: 7.02k, False: 0]
  ------------------
12619|  7.02k|    if(tree->v4)
  ------------------
  |  Branch (12619:8): [True: 6.80k, False: 213]
  ------------------
12620|  6.80k|      ndpi_patricia_destroy(tree->v4, free_ptree_data);
12621|       |
12622|  7.02k|    if(tree->v6)
  ------------------
  |  Branch (12622:8): [True: 6.84k, False: 173]
  ------------------
12623|  6.84k|      ndpi_patricia_destroy(tree->v6, free_ptree_data);
12624|       |
12625|  7.02k|    ndpi_free(tree);
12626|  7.02k|  }
12627|  7.02k|}
ndpi_main.c:ndpi_add_host_url_subprotocol:
  921|  1.83M|					 ndpi_protocol_breed_t breed, u_int8_t level) {
  922|  1.83M|#ifndef NDPI_ENABLE_DEBUG_MESSAGES
  923|  1.83M|  NDPI_LOG_DBG2(ndpi_str, "[NDPI] Adding [%s][%d]\n", value, protocol_id);
  ------------------
  |  |  597|  1.83M|# define NDPI_LOG_DBG2(mod, args...) { (void)mod; /* printf(args); */ }
  ------------------
  924|  1.83M|#endif
  925|       |
  926|  1.83M|  return string_to_automa((AC_AUTOMATA_t *)ndpi_str->host_automa.ac_automa,
  927|  1.83M|			  value, protocol_id, category, breed, level, 1);
  928|       |
  929|  1.83M|}
ndpi_main.c:string_to_automa:
  872|  1.83M|                            u_int8_t add_ends_with) {
  873|  1.83M|  AC_PATTERN_t ac_pattern;
  874|  1.83M|  AC_ERROR_t rc;
  875|  1.83M|  u_int len;
  876|  1.83M|  char *value_dup = NULL;
  877|       |
  878|  1.83M|  if((ac_automa == NULL) || (value == NULL) || !*value)
  ------------------
  |  Branch (878:6): [True: 553k, False: 1.28M]
  |  Branch (878:29): [True: 1.26M, False: 22.6k]
  |  Branch (878:48): [True: 488, False: 22.1k]
  ------------------
  879|  1.81M|    return(-2);
  880|       |
  881|  22.1k|  value_dup = ndpi_strdup(value);
  882|  22.1k|  if(!value_dup)
  ------------------
  |  Branch (882:6): [True: 1.28k, False: 20.8k]
  ------------------
  883|  1.28k|    return(-1);
  884|       |
  885|  20.8k|  memset(&ac_pattern, 0, sizeof(ac_pattern));
  886|       |
  887|  20.8k|  len = strlen(value);
  888|       |
  889|  20.8k|  ac_pattern.astring      = value_dup;
  890|  20.8k|  ac_pattern.length       = len;
  891|  20.8k|  ac_pattern.rep.number   = protocol_id;
  892|  20.8k|  ac_pattern.rep.category = (u_int16_t) category;
  893|  20.8k|  ac_pattern.rep.breed    = (u_int16_t) breed;
  894|  20.8k|  ac_pattern.rep.level    = level ? level : ndpi_domain_level(value);
  ------------------
  |  Branch (894:29): [True: 0, False: 20.8k]
  ------------------
  895|  20.8k|  ac_pattern.rep.at_end   = add_ends_with && !ndpi_is_middle_string_char(value[len-1]); /* len != 0 */
  ------------------
  |  Branch (895:29): [True: 20.8k, False: 0]
  |  Branch (895:46): [True: 16.7k, False: 4.12k]
  ------------------
  896|  20.8k|  ac_pattern.rep.dot      = memchr(value,'.',len) != NULL;
  897|       |
  898|       |#ifdef MATCH_DEBUG
  899|       |  printf("Adding to %s %lx [%s%s][protocol_id: %u][category: %u][breed: %u][level: %u]\n",
  900|       |	 ac_automa->name,(unsigned long int)ac_automa,
  901|       |	 ac_pattern.astring,ac_pattern.rep.at_end? "$":"", protocol_id, category, breed,ac_pattern.rep.level);
  902|       |#endif
  903|       |
  904|  20.8k|  rc = ac_automata_add(ac_automa, &ac_pattern);
  905|       |
  906|  20.8k|  if(rc != ACERR_SUCCESS) {
  ------------------
  |  Branch (906:6): [True: 15.2k, False: 5.66k]
  ------------------
  907|  15.2k|    ndpi_free(value_dup);
  908|       |
  909|  15.2k|    if(rc != ACERR_DUPLICATE_PATTERN)
  ------------------
  |  Branch (909:8): [True: 4.66k, False: 10.5k]
  ------------------
  910|  4.66k|      return (-2);
  911|  15.2k|  }
  912|       |
  913|  16.2k|  return(0);
  914|  20.8k|}
ndpi_main.c:ndpi_is_middle_string_char:
  827|  20.8k|static u_int8_t ndpi_is_middle_string_char(char c) {
  828|  20.8k|  switch(c) {
  829|  3.96k|  case '.':
  ------------------
  |  Branch (829:3): [True: 3.96k, False: 16.9k]
  ------------------
  830|  4.12k|  case '-':
  ------------------
  |  Branch (830:3): [True: 159, False: 20.7k]
  ------------------
  831|  4.12k|    return(1);
  832|       |
  833|  16.7k|  default:
  ------------------
  |  Branch (833:3): [True: 16.7k, False: 4.12k]
  ------------------
  834|  16.7k|    return(0);
  835|  20.8k|  }
  836|  20.8k|}
ndpi_main.c:add_to_ptree:
 3465|  27.9k|static ndpi_patricia_node_t* add_to_ptree(ndpi_patricia_tree_t *tree, int family, void *addr, int bits) {
 3466|  27.9k|  ndpi_prefix_t prefix;
 3467|  27.9k|  ndpi_patricia_node_t *node;
 3468|       |
 3469|  27.9k|  if(family == AF_INET)
  ------------------
  |  Branch (3469:6): [True: 19.4k, False: 8.47k]
  ------------------
 3470|  19.4k|    ndpi_fill_prefix_v4(&prefix, (struct in_addr *) addr, bits, tree->maxbits);
 3471|  8.47k|  else
 3472|  8.47k|    ndpi_fill_prefix_v6(&prefix, (struct in6_addr *) addr, bits, tree->maxbits);
 3473|       |
 3474|  27.9k|  node = ndpi_patricia_lookup(tree, &prefix);
 3475|       |  /* if(node) memset(&node->value, 0, sizeof(node->value)); */
 3476|       |
 3477|  27.9k|  return(node);
 3478|  27.9k|}
ndpi_main.c:init_protocol_defaults:
 1214|  3.53k|static void init_protocol_defaults(struct ndpi_detection_module_struct *ndpi_str) {
 1215|  3.53k|  ndpi_port_range ports_a[MAX_DEFAULT_PORTS], ports_b[MAX_DEFAULT_PORTS];
 1216|       |
 1217|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNRATED, NDPI_PROTOCOL_UNKNOWN,
 1218|  3.53k|			  "Unknown", NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1219|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1220|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1221|  3.53k|			  0);
 1222|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_FTP_CONTROL,
 1223|  3.53k|			  "FTP_CONTROL", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1224|  3.53k|			  ndpi_build_default_ports(ports_a, 21, 0, 0, 0, 0) /* TCP */,
 1225|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1226|  3.53k|	                  0);
 1227|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_FTP_DATA,
 1228|  3.53k|			  "FTP_DATA", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1229|  3.53k|			  ndpi_build_default_ports(ports_a, 20, 0, 0, 0, 0) /* TCP */,
 1230|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1231|  3.53k|                          0);
 1232|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_MAIL_POP,
 1233|  3.53k|			  "POP3", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1234|  3.53k|			  ndpi_build_default_ports(ports_a, 110, 0, 0, 0, 0) /* TCP */,
 1235|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1236|  3.53k|	                  0);
 1237|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MAIL_POPS,
 1238|  3.53k|			  "POPS", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1239|  3.53k|			  ndpi_build_default_ports(ports_a, 995, 0, 0, 0, 0) /* TCP */,
 1240|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1241|  3.53k|			  0);
 1242|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MAIL_SMTP,
 1243|  3.53k|			  "SMTP", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1244|  3.53k|			  ndpi_build_default_ports(ports_a, 25, 587, 0, 0, 0) /* TCP */,
 1245|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1246|  3.53k|			  0);
 1247|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MAIL_SMTPS,
 1248|  3.53k|			  "SMTPS", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1249|  3.53k|			  ndpi_build_default_ports(ports_a, 465, 0, 0, 0, 0) /* TCP */,
 1250|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1251|  3.53k|			  0);
 1252|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_MAIL_IMAP,
 1253|  3.53k|			  "IMAP", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1254|  3.53k|			  ndpi_build_default_ports(ports_a, 143, 0, 0, 0, 0) /* TCP */,
 1255|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1256|  3.53k|			  0);
 1257|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MAIL_IMAPS,
 1258|  3.53k|			  "IMAPS", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1259|  3.53k|			  ndpi_build_default_ports(ports_a, 993, 0, 0, 0, 0) /* TCP */,
 1260|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1261|  3.53k|			  0);
 1262|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DNS,
 1263|  3.53k|			  "DNS", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1264|  3.53k|			  ndpi_build_default_ports(ports_a, 53, 0, 0, 0, 0) /* TCP */,
 1265|  3.53k|			  ndpi_build_default_ports(ports_b, 53, 0, 0, 0, 0) /* UDP */,
 1266|  3.53k|			  0);
 1267|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_DNS,
 1268|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1269|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_DNS can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1270|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IPP,
 1271|  3.53k|			  "IPP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1272|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1273|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1274|  3.53k|			  0);
 1275|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IMO,
 1276|  3.53k|			  "IMO", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1277|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1278|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1279|  3.53k|			  0);
 1280|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HTTP,
 1281|  3.53k|			  "HTTP", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1282|  3.53k|			  ndpi_build_default_ports(ports_a, 80, 0 /* ntop */, 0, 0, 0) /* TCP */,
 1283|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1284|  3.53k|			  0);
 1285|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_HTTP,
 1286|  3.53k|			      NDPI_PROTOCOL_WEBSOCKET,
 1287|  3.53k|			      NDPI_PROTOCOL_CROSSFIRE, NDPI_PROTOCOL_SOAP,
 1288|  3.53k|			      NDPI_PROTOCOL_BITTORRENT,
 1289|  3.53k|			      NDPI_PROTOCOL_ZATTOO,
 1290|  3.53k|			      NDPI_PROTOCOL_IRC,
 1291|  3.53k|			      NDPI_PROTOCOL_IPP,
 1292|  3.53k|			      NDPI_PROTOCOL_MPEGDASH,
 1293|  3.53k|			      NDPI_PROTOCOL_RTSP,
 1294|  3.53k|			      NDPI_PROTOCOL_APACHE_THRIFT,
 1295|  3.53k|			      NDPI_PROTOCOL_JSON_RPC,
 1296|  3.53k|			      NDPI_PROTOCOL_HL7,
 1297|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1298|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_HTTP can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1299|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MDNS,
 1300|  3.53k|			  "MDNS", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1301|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1302|  3.53k|			  ndpi_build_default_ports(ports_b, 5353, 5354, 0, 0, 0) /* UDP */,
 1303|  3.53k|			  0);
 1304|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_MDNS,
 1305|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1306|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_MDNS can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1307|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NTP,
 1308|  3.53k|			  "NTP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1309|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1310|  3.53k|			  ndpi_build_default_ports(ports_b, 123, 0, 0, 0, 0) /* UDP */,
 1311|  3.53k|			  0);
 1312|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NETBIOS,
 1313|  3.53k|			  "NetBIOS", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1314|  3.53k|			  ndpi_build_default_ports(ports_a, 139, 0, 0, 0, 0) /* TCP */,
 1315|  3.53k|			  ndpi_build_default_ports(ports_b, 137, 138, 139, 0, 0) /* UDP */,
 1316|  3.53k|			  0);
 1317|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NFS,
 1318|  3.53k|			  "NFS", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1319|  3.53k|			  ndpi_build_default_ports(ports_a, 2049, 0, 0, 0, 0) /* TCP */,
 1320|  3.53k|			  ndpi_build_default_ports(ports_b, 2049, 0, 0, 0, 0) /* UDP */,
 1321|  3.53k|			  0);
 1322|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SSDP,
 1323|  3.53k|			  "SSDP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1324|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1325|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1326|  3.53k|			  0);
 1327|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BGP,
 1328|  3.53k|			  "BGP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1329|  3.53k|			  ndpi_build_default_ports(ports_a, 179, 2605, 0, 0, 0) /* TCP */,
 1330|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1331|  3.53k|			  0);
 1332|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SNMP,
 1333|  3.53k|			  "SNMP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1334|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1335|  3.53k|			  ndpi_build_default_ports(ports_b, 161, 162, 0, 0, 0) /* UDP */,
 1336|  3.53k|			  0);
 1337|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_XDMCP,
 1338|  3.53k|			  "XDMCP", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1339|  3.53k|			  ndpi_build_default_ports(ports_a, 177, 0, 0, 0, 0) /* TCP */,
 1340|  3.53k|			  ndpi_build_default_ports(ports_b, 177, 0, 0, 0, 0) /* UDP */,
 1341|  3.53k|			  0);
 1342|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_DANGEROUS, NDPI_PROTOCOL_SMBV1,
 1343|  3.53k|			  "SMBv1", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1344|  3.53k|			  ndpi_build_default_ports(ports_a, 445, 0, 0, 0, 0) /* TCP */,
 1345|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1346|  3.53k|			  0);
 1347|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SYSLOG,
 1348|  3.53k|			  "Syslog", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1349|  3.53k|			  ndpi_build_default_ports(ports_a, 514, 601, 6514, 0, 0) /* TCP */,
 1350|  3.53k|			  ndpi_build_default_ports(ports_b, 514, 0, 0, 0, 0) /* UDP */,
 1351|  3.53k|			  0);
 1352|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DHCP,
 1353|  3.53k|			  "DHCP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1354|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1355|  3.53k|			  ndpi_build_default_ports(ports_b, 67, 68, 0, 0, 0) /* UDP */,
 1356|  3.53k|			  0);
 1357|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_POSTGRES,
 1358|  3.53k|			  "PostgreSQL", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1359|  3.53k|			  ndpi_build_default_ports(ports_a, 5432, 0, 0, 0, 0) /* TCP */,
 1360|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1361|  3.53k|			  0);
 1362|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MYSQL,
 1363|  3.53k|			  "MySQL", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1364|  3.53k|			  ndpi_build_default_ports(ports_a, 3306, 0, 0, 0, 0) /* TCP */,
 1365|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1366|  3.53k|			  0);
 1367|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NATS,
 1368|  3.53k|			  "Nats", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1369|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1370|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1371|  3.53k|			  0);
 1372|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_AMONG_US,
 1373|  3.53k|			  "AmongUs", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1374|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1375|  3.53k|			  ndpi_build_default_ports(ports_b, 22023, 0, 0, 0, 0) /* UDP */,
 1376|  3.53k|			  0);
 1377|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_NTOP,
 1378|  3.53k|			  "ntop", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1379|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1380|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1381|  3.53k|			  0);
 1382|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_VMWARE,
 1383|  3.53k|			  "VMware", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1384|  3.53k|			  ndpi_build_default_ports(ports_a, 903, 0, 0, 0, 0) /* TCP */,
 1385|  3.53k|			  ndpi_build_default_ports(ports_b, 902, 903, 0, 0, 0) /* UDP */,
 1386|  3.53k|			  0);
 1387|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, NDPI_PROTOCOL_GNUTELLA,
 1388|  3.53k|			  "Gnutella", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1389|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1390|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1391|  3.53k|			  0);
 1392|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_EDONKEY,
 1393|  3.53k|			  "eDonkey", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1394|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1395|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1396|  3.53k|			  0);
 1397|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BITTORRENT,
 1398|  3.53k|			  "BitTorrent", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1399|  3.53k|			  ndpi_build_default_ports_range(ports_a, 6881, 6889, 51413, 51413, 53646, 53646, 6969, 6969, 0, 0) /* TCP */,
 1400|  3.53k|			  ndpi_build_default_ports_range(ports_b, 6881, 6889, 51413, 51413, 6771, 6771, 0, 0, 0, 0) /* UDP */,
 1401|  3.53k|			  0);
 1402|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE,
 1403|  3.53k|                          "Google", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1404|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1405|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1406|  3.53k|                          0);
 1407|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MSTEAMS_CALL,
 1408|  3.53k|			  "TeamsCall", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1409|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1410|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1411|  3.53k|			  0);
 1412|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TIKTOK,
 1413|  3.53k|			  "TikTok", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1414|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1415|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1416|  3.53k|			  0);
 1417|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TEREDO,
 1418|  3.53k|			  "Teredo", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1419|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1420|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1421|  3.53k|			  0);
 1422|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_WECHAT,
 1423|  3.53k|			  "WeChat", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1424|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1425|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1426|  3.53k|			  0);
 1427|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MEMCACHED,
 1428|  3.53k|			  "Memcached", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1429|  3.53k|			  ndpi_build_default_ports(ports_a, 11211, 0, 0, 0, 0) /* TCP */,
 1430|  3.53k|			  ndpi_build_default_ports(ports_b, 11211, 0, 0, 0, 0) /* UDP */,
 1431|  3.53k|			  0);
 1432|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SMBV23,
 1433|  3.53k|			  "SMBv23", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1434|  3.53k|			  ndpi_build_default_ports(ports_a, 445, 0, 0, 0, 0) /* TCP */,
 1435|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1436|  3.53k|			  0);
 1437|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_MINING,
 1438|  3.53k|			  "Mining", NDPI_PROTOCOL_CATEGORY_MINING, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1439|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1440|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1441|  3.53k|			  0);
 1442|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NEST_LOG_SINK,
 1443|  3.53k|			  "NestLogSink", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1444|  3.53k|			  ndpi_build_default_ports(ports_a, 11095, 0, 0, 0, 0) /* TCP */,
 1445|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1446|  3.53k|			  0);
 1447|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MODBUS,
 1448|  3.53k|			  "Modbus", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1449|  3.53k|			  ndpi_build_default_ports(ports_a, 502, 0, 0, 0, 0) /* TCP */,
 1450|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1451|  3.53k|			  0);
 1452|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WHATSAPP_CALL,
 1453|  3.53k|			  "WhatsAppCall", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1454|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1455|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1456|  3.53k|			  0);
 1457|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DATASAVER,
 1458|  3.53k|			  "DataSaver", NDPI_PROTOCOL_CATEGORY_WEB /* dummy */, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1459|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1460|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1461|  3.53k|			  0);
 1462|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SIGNAL,
 1463|  3.53k|			  "Signal", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1464|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1465|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1466|  3.53k|			  0);
 1467|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DOH_DOT,
 1468|  3.53k|			  "DoH_DoT", NDPI_PROTOCOL_CATEGORY_NETWORK /* dummy */, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1469|  3.53k|			  ndpi_build_default_ports(ports_a, 853, 0, 0, 0, 0) /* TCP */,
 1470|  3.53k|			  ndpi_build_default_ports(ports_b, 784, 853, 0, 0, 0) /* UDP */,
 1471|  3.53k|			  0);
 1472|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_REDDIT,
 1473|  3.53k|			  "Reddit", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1474|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1475|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1476|  3.53k|			  0);
 1477|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WIREGUARD,
 1478|  3.53k|			  "WireGuard", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1479|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1480|  3.53k|			  ndpi_build_default_ports(ports_b, 51820, 0, 0, 0, 0) /* UDP */,
 1481|  3.53k|			  0);
 1482|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_XBOX,
 1483|  3.53k|			  "Xbox", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1484|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1485|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1486|  3.53k|			  0);
 1487|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_PLAYSTATION,
 1488|  3.53k|			  "Playstation", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1489|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1490|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1491|  3.53k|			  0);
 1492|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_QQ,
 1493|  3.53k|			  "QQ", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1494|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1495|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1496|  3.53k|			  0);
 1497|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_RTSP,
 1498|  3.53k|			  "RTSP", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1499|  3.53k|			  ndpi_build_default_ports(ports_a, 554, 0, 0, 0, 0) /* TCP */,
 1500|  3.53k|			  ndpi_build_default_ports(ports_b, 554, 0, 0, 0, 0) /* UDP */,
 1501|  3.53k|			  0);
 1502|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_ICECAST,
 1503|  3.53k|			  "IceCast", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1504|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1505|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1506|  3.53k|			  0);
 1507|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_CPHA,
 1508|  3.53k|			  "CPHA", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1509|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1510|  3.53k|			  ndpi_build_default_ports(ports_b, 8116, 0, 0, 0, 0) /* UDP */,
 1511|  3.53k|			  0);
 1512|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_ZATTOO,
 1513|  3.53k|			  "Zattoo", NDPI_PROTOCOL_CATEGORY_VIDEO, NDPI_PROTOCOL_QOE_CATEGORY_LIVE_STREAMING,
 1514|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1515|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1516|  3.53k|			  0);
 1517|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DISCORD,
 1518|  3.53k|			  "Discord", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1519|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1520|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1521|  3.53k|			  0);
 1522|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_PLURALSIGHT,
 1523|  3.53k|			  "Pluralsight", NDPI_PROTOCOL_CATEGORY_VIDEO, NDPI_PROTOCOL_QOE_CATEGORY_LIVE_STREAMING,
 1524|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1525|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1526|  3.53k|			  0);
 1527|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_OCSP,
 1528|  3.53k|			  "OCSP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1529|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1530|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1531|  3.53k|			  0);
 1532|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_VXLAN,
 1533|  3.53k|			  "VXLAN", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1534|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1535|  3.53k|			  ndpi_build_default_ports(ports_b, 4789, 0, 0, 0, 0) /* UDP */,
 1536|  3.53k|			  0);
 1537|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_IRC,
 1538|  3.53k|			  "IRC", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1539|  3.53k|			  ndpi_build_default_ports(ports_a, 194, 0, 0, 0, 0) /* TCP */,
 1540|  3.53k|			  ndpi_build_default_ports(ports_b, 194, 0, 0, 0, 0) /* UDP */,
 1541|  3.53k|			  0);
 1542|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MERAKI_CLOUD,
 1543|  3.53k|			  "MerakiCloud", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1544|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1545|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1546|  3.53k|			  0);
 1547|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_JABBER,
 1548|  3.53k|			  "Jabber", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1549|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1550|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1551|  3.53k|			  0);
 1552|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DISNEYPLUS,
 1553|  3.53k|			  "DisneyPlus", NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_QOE_CATEGORY_BUFFERED_STREAMING,
 1554|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1555|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1556|  3.53k|			  0);
 1557|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_VRRP,
 1558|  3.53k|			  "VRRP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1559|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1560|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1561|  3.53k|			  0);
 1562|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_STEAM,
 1563|  3.53k|			  "Steam", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1564|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1565|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1566|  3.53k|			  0);
 1567|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MELSEC,
 1568|  3.53k|			  "MELSEC", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1569|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1570|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1571|  3.53k|			  0);
 1572|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_WORLDOFWARCRAFT,
 1573|  3.53k|			  "WorldOfWarcraft", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1574|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1575|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1576|  3.53k|			  0);
 1577|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, NDPI_PROTOCOL_HOTSPOT_SHIELD,
 1578|  3.53k|			  "HotspotShield", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1579|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1580|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1581|  3.53k|			  0);
 1582|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_TELNET,
 1583|  3.53k|			  "Telnet", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1584|  3.53k|			  ndpi_build_default_ports(ports_a, 23, 0, 0, 0, 0) /* TCP */,
 1585|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1586|  3.53k|			  0);
 1587|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_STUN,
 1588|  3.53k|			  "STUN", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1589|  3.53k|			  ndpi_build_default_ports(ports_a, 3478, 0, 0, 0, 0) /* TCP */,
 1590|  3.53k|			  ndpi_build_default_ports(ports_b, 3478, 0, 0, 0, 0) /* UDP */,
 1591|  3.53k|			  0);
 1592|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IPSEC,
 1593|  3.53k|			  "IPSec", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1594|  3.53k|			  ndpi_build_default_ports(ports_a, 500, 0, 0, 0, 0) /* TCP */,
 1595|  3.53k|			  ndpi_build_default_ports(ports_b, 500, 4500, 0, 0, 0) /* UDP */,
 1596|  3.53k|			  0);
 1597|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_GRE,
 1598|  3.53k|			  "GRE", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1599|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1600|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1601|  3.53k|			  0);
 1602|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_ICMP,
 1603|  3.53k|			  "ICMP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1604|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1605|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1606|  3.53k|			  0);
 1607|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_IGMP,
 1608|  3.53k|			  "IGMP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1609|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1610|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1611|  3.53k|			  0);
 1612|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_EGP,
 1613|  3.53k|			  "EGP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1614|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1615|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1616|  3.53k|			  0);
 1617|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_PGM,
 1618|  3.53k|			  "PGM", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1619|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1620|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1621|  3.53k|			  0);
 1622|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_SCTP,
 1623|  3.53k|			  "SCTP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1624|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1625|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1626|  3.53k|			  0);
 1627|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_OSPF,
 1628|  3.53k|			  "IP_OSPF", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1629|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1630|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1631|  3.53k|			  0);
 1632|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_IP_IN_IP,
 1633|  3.53k|			  "IP_in_IP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1634|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1635|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1636|  3.53k|			  0);
 1637|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RTP,
 1638|  3.53k|			  "RTP", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1639|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1640|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1641|  3.53k|			  0);
 1642|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RDP,
 1643|  3.53k|			  "RDP", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1644|  3.53k|			  ndpi_build_default_ports(ports_a, 3389, 0, 0, 0, 0) /* TCP */,
 1645|  3.53k|			  ndpi_build_default_ports(ports_b, 3389, 0, 0, 0, 0) /* UDP */,
 1646|  3.53k|			  0);
 1647|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_VNC,
 1648|  3.53k|			  "VNC", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1649|  3.53k|			  ndpi_build_default_ports(ports_a, 5900, 5901, 5800, 0, 0) /* TCP */,
 1650|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1651|  3.53k|			  0);
 1652|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TUMBLR,
 1653|  3.53k|			  "Tumblr", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1654|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1655|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1656|  3.53k|			  0);
 1657|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ZOOM,
 1658|  3.53k|			  "Zoom", NDPI_PROTOCOL_CATEGORY_VIDEO, NDPI_PROTOCOL_QOE_CATEGORY_LIVE_STREAMING,
 1659|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1660|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1661|  3.53k|			  0);
 1662|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WHATSAPP_FILES,
 1663|  3.53k|			  "WhatsAppFiles", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1664|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1665|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1666|  3.53k|			  0);
 1667|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WHATSAPP,
 1668|  3.53k|			  "WhatsApp", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1669|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1670|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1671|  3.53k|			  0);
 1672|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_TLS,
 1673|  3.53k|			  "TLS", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1674|  3.53k|			  ndpi_build_default_ports(ports_a, 443, 0, 0, 0, 0) /* TCP */,
 1675|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1676|  3.53k|			  0);
 1677|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_TLS,
 1678|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1679|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_TLS can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1680|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DTLS,
 1681|  3.53k|			  "DTLS", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1682|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1683|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1684|  3.53k|			  0);
 1685|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_DTLS,
 1686|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1687|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_DTLS can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1688|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SSH,
 1689|  3.53k|			  "SSH", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1690|  3.53k|			  ndpi_build_default_ports(ports_a, 22, 0, 0, 0, 0) /* TCP */,
 1691|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1692|  3.53k|			  0);
 1693|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_USENET,
 1694|  3.53k|			  "Usenet", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1695|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1696|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1697|  3.53k|			  0);
 1698|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MGCP,
 1699|  3.53k|			  "MGCP", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1700|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1701|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1702|  3.53k|			  0);
 1703|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IAX,
 1704|  3.53k|			  "IAX", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1705|  3.53k|			  ndpi_build_default_ports(ports_a, 4569, 0, 0, 0, 0) /* TCP */,
 1706|  3.53k|			  ndpi_build_default_ports(ports_b, 4569, 0, 0, 0, 0) /* UDP */,
 1707|  3.53k|			  0);
 1708|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AFP,
 1709|  3.53k|			  "AFP", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1710|  3.53k|			  ndpi_build_default_ports(ports_a, 548, 0, 0, 0, 0) /* TCP */,
 1711|  3.53k|			  ndpi_build_default_ports(ports_b, 548, 0, 0, 0, 0) /* UDP */,
 1712|  3.53k|			  0);
 1713|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_HULU,
 1714|  3.53k|			  "Hulu", NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_QOE_CATEGORY_BUFFERED_STREAMING,
 1715|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1716|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1717|  3.53k|			  0);
 1718|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CHECKMK,
 1719|  3.53k|			  "CHECKMK", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1720|  3.53k|			  ndpi_build_default_ports(ports_a, 6556, 0, 0, 0, 0) /* TCP */,
 1721|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1722|  3.53k|			  0);
 1723|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SIP,
 1724|  3.53k|			  "SIP", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1725|  3.53k|			  ndpi_build_default_ports_range(ports_a, 5060, 5061, 0, 0, 0, 0, 0, 0, 0, 0) /* TCP */,
 1726|  3.53k|			  ndpi_build_default_ports_range(ports_b, 5060, 5061, 0, 0, 0, 0, 0, 0, 0, 0) /* UDP */,
 1727|  3.53k|			  0);
 1728|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TRUPHONE,
 1729|  3.53k|			  "TruPhone", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1730|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1731|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1732|  3.53k|			  0);
 1733|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_ICMPV6,
 1734|  3.53k|			  "ICMPV6", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1735|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1736|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1737|  3.53k|			  0);
 1738|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DHCPV6,
 1739|  3.53k|			  "DHCPV6", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1740|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1741|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1742|  3.53k|			  0);
 1743|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_ARMAGETRON,
 1744|  3.53k|			  "Armagetron", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1745|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1746|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1747|  3.53k|			  0);
 1748|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_CROSSFIRE,
 1749|  3.53k|			  "Crossfire", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1750|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1751|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1752|  3.53k|			  0);
 1753|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DOFUS,
 1754|  3.53k|			  "Dofus", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1755|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1756|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1757|  3.53k|			  0);
 1758|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_GUILDWARS2,
 1759|  3.53k|			  "GuildWars2", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1760|  3.53k|			  ndpi_build_default_ports(ports_a, 6112, 0, 0, 0, 0) /* TCP */,
 1761|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1762|  3.53k|			  0);
 1763|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AMAZON_ALEXA,
 1764|  3.53k|			  "AmazonAlexa", NDPI_PROTOCOL_CATEGORY_VIRTUAL_ASSISTANT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1765|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1766|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1767|  3.53k|			  0);
 1768|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_KERBEROS,
 1769|  3.53k|			  "Kerberos", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1770|  3.53k|			  ndpi_build_default_ports(ports_a, 88, 0, 0, 0, 0) /* TCP */,
 1771|  3.53k|			  ndpi_build_default_ports(ports_b, 88, 0, 0, 0, 0) /* UDP */,
 1772|  3.53k|			  0);
 1773|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LDAP,
 1774|  3.53k|			  "LDAP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1775|  3.53k|			  ndpi_build_default_ports(ports_a, 389, 0, 0, 0, 0) /* TCP */,
 1776|  3.53k|			  ndpi_build_default_ports(ports_b, 389, 0, 0, 0, 0) /* UDP */,
 1777|  3.53k|			  0);
 1778|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_NEXON,
 1779|  3.53k|			  "Nexon", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1780|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1781|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1782|  3.53k|			  0);
 1783|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MSSQL_TDS,
 1784|  3.53k|			  "MsSQL-TDS", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1785|  3.53k|			  ndpi_build_default_ports(ports_a, 1433, 1434, 0, 0, 0) /* TCP */,
 1786|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1787|  3.53k|			  0);
 1788|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PPTP,
 1789|  3.53k|			  "PPTP", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1790|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1791|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1792|  3.53k|			  0);
 1793|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IP_AH,
 1794|  3.53k|			  "AH", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1795|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1796|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1797|  3.53k|			  0);
 1798|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IP_ESP,
 1799|  3.53k|			  "ESP", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1800|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1801|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1802|  3.53k|			  0);
 1803|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MS_RPCH,
 1804|  3.53k|			  "MS-RPCH", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1805|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1806|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1807|  3.53k|			  0);
 1808|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NETFLOW,
 1809|  3.53k|			  "NetFlow", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1810|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1811|  3.53k|			  ndpi_build_default_ports(ports_b, 2055, 0, 0, 0, 0) /* UDP */,
 1812|  3.53k|			  0);
 1813|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SFLOW,
 1814|  3.53k|			  "sFlow", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1815|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1816|  3.53k|			  ndpi_build_default_ports(ports_b, 6343, 0, 0, 0, 0) /* UDP */,
 1817|  3.53k|			  0);
 1818|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HTTP_CONNECT,
 1819|  3.53k|			  "HTTP_Connect", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1820|  3.53k|			  ndpi_build_default_ports(ports_a, 8080, 0, 0, 0, 0) /* TCP */,
 1821|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1822|  3.53k|			  0);
 1823|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_HTTP_CONNECT,
 1824|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1825|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_HTTP_CONNECT can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1826|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HTTP_PROXY,
 1827|  3.53k|			  "HTTP_Proxy", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1828|  3.53k|			  ndpi_build_default_ports(ports_a, 8080, 3128, 0, 0, 0) /* TCP */,
 1829|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1830|  3.53k|			  0);
 1831|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_HTTP_PROXY,
 1832|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1833|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_HTTP_PROXY can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1834|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CITRIX,
 1835|  3.53k|			  "Citrix", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1836|  3.53k|			  ndpi_build_default_ports(ports_a, 1494, 2598, 0, 0, 0) /* TCP */,
 1837|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1838|  3.53k|			  0);
 1839|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WEBEX,
 1840|  3.53k|			  "Webex", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1841|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1842|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1843|  3.53k|			  0);
 1844|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RADIUS,
 1845|  3.53k|			  "Radius", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1846|  3.53k|			  ndpi_build_default_ports(ports_a, 1812, 1813, 0, 0, 0) /* TCP */,
 1847|  3.53k|			  ndpi_build_default_ports(ports_b, 1812, 1813, 0, 0, 0) /* UDP */,
 1848|  3.53k|			  0);
 1849|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TEAMVIEWER,
 1850|  3.53k|			  "TeamViewer", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 1851|  3.53k|			  ndpi_build_default_ports(ports_a, 5938, 0, 0, 0, 0) /* TCP */,
 1852|  3.53k|			  ndpi_build_default_ports(ports_b, 5938, 0, 0, 0, 0) /* UDP */,
 1853|  3.53k|			  0);
 1854|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HCL_NOTES,
 1855|  3.53k|			  "HCL_Notes", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1856|  3.53k|			  ndpi_build_default_ports(ports_a, 1352, 0, 0, 0, 0) /* TCP */,
 1857|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1858|  3.53k|			  0);
 1859|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SAP,
 1860|  3.53k|			  "SAP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1861|  3.53k|			  ndpi_build_default_ports(ports_a, 3201, 0, 0, 0, 0) /* TCP */,
 1862|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */, /* Missing dissector: port based only */
 1863|  3.53k|			  0);
 1864|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GTP,
 1865|  3.53k|			  "GTP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1866|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1867|  3.53k|			  ndpi_build_default_ports(ports_b, 2152, 2123, 0, 0, 0) /* UDP */,
 1868|  3.53k|			  0);
 1869|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GTP_C,
 1870|  3.53k|			  "GTP_C", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1871|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1872|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1873|  3.53k|			  0);
 1874|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GTP_U,
 1875|  3.53k|			  "GTP_U", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1876|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1877|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1878|  3.53k|			  0);
 1879|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GTP_PRIME,
 1880|  3.53k|			  "GTP_PRIME", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1881|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1882|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1883|  3.53k|			  0);
 1884|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HSRP,
 1885|  3.53k|			  "HSRP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1886|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1887|  3.53k|			  ndpi_build_default_ports(ports_b, 1985, 0, 0, 0, 0) /* UDP */,
 1888|  3.53k|			  0);
 1889|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WSD,
 1890|  3.53k|			  "WSD", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1891|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1892|  3.53k|			  ndpi_build_default_ports(ports_b, 3702, 0, 0, 0, 0) /* UDP */,
 1893|  3.53k|			  0);
 1894|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ETHERNET_IP,
 1895|  3.53k|			  "EthernetIP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1896|  3.53k|			  ndpi_build_default_ports(ports_a, 44818, 0, 0, 0, 0) /* TCP */,
 1897|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1898|  3.53k|			  0);
 1899|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TELEGRAM,
 1900|  3.53k|			  "Telegram", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1901|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1902|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1903|  3.53k|			  0);
 1904|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_QUIC,
 1905|  3.53k|			  "QUIC", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1906|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1907|  3.53k|			  ndpi_build_default_ports(ports_b, 443, 0, 0, 0, 0) /* UDP */,
 1908|  3.53k|			  0);
 1909|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_QUIC,
 1910|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 1911|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS); /* NDPI_PROTOCOL_QUIC can have (content-matched) subprotocols */
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 1912|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DIAMETER,
 1913|  3.53k|			  "Diameter", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1914|  3.53k|			  ndpi_build_default_ports(ports_a, 3868, 0, 0, 0, 0) /* TCP */,
 1915|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1916|  3.53k|			  0);
 1917|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_APPLE_PUSH,
 1918|  3.53k|			  "ApplePush", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1919|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1920|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1921|  3.53k|			  0);
 1922|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DROPBOX,
 1923|  3.53k|			  "Dropbox", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1924|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1925|  3.53k|			  ndpi_build_default_ports(ports_b, 17500, 0, 0, 0, 0) /* UDP */,
 1926|  3.53k|			  0);
 1927|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_SONOS,
 1928|  3.53k|			  "Sonos", NDPI_PROTOCOL_CATEGORY_MUSIC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1929|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1930|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1931|  3.53k|			  0);
 1932|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_SPOTIFY,
 1933|  3.53k|			  "Spotify", NDPI_PROTOCOL_CATEGORY_MUSIC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1934|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1935|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1936|  3.53k|			  0);
 1937|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LISP,
 1938|  3.53k|			  "LISP", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1939|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1940|  3.53k|			  ndpi_build_default_ports(ports_b, 4342, 4341, 0, 0, 0) /* UDP */,
 1941|  3.53k|			  0);
 1942|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_EAQ,
 1943|  3.53k|			  "EAQ", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1944|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1945|  3.53k|			  ndpi_build_default_ports(ports_b, 6000, 0, 0, 0, 0) /* UDP */,
 1946|  3.53k|			  0);
 1947|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_KAKAOTALK_VOICE,
 1948|  3.53k|			  "KakaoTalk_Voice", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1949|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1950|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1951|  3.53k|			  0);
 1952|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_MPEGTS,
 1953|  3.53k|			  "MPEG_TS", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1954|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1955|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1956|  3.53k|			  0);
 1957|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MIKROTIK,
 1958|  3.53k|			  "Mikrotik", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1959|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1960|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1961|  3.53k|			  0);
 1962|       |  /* http://en.wikipedia.org/wiki/Link-local_Multicast_Name_Resolution */
 1963|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LLMNR,
 1964|  3.53k|			  "LLMNR", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1965|  3.53k|			  ndpi_build_default_ports(ports_a, 5355, 0, 0, 0, 0) /* TCP */,
 1966|  3.53k|			  ndpi_build_default_ports(ports_b, 5355, 0, 0, 0, 0) /* UDP */, /* Missing dissector: port based only */
 1967|  3.53k|			  0);
 1968|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TOCA_BOCA,
 1969|  3.53k|			  "TocaBoca", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 1970|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1971|  3.53k|			  ndpi_build_default_ports(ports_b, 5055, 0, 0, 0, 0) /* UDP */,
 1972|  3.53k|			  0);
 1973|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_H323,
 1974|  3.53k|			  "H323", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1975|  3.53k|			  ndpi_build_default_ports(ports_a, 1719, 1720, 0, 0, 0) /* TCP */,
 1976|  3.53k|			  ndpi_build_default_ports(ports_b, 1719, 1720, 0, 0, 0) /* UDP */,
 1977|  3.53k|			  0);
 1978|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OPENVPN,
 1979|  3.53k|			  "OpenVPN", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1980|  3.53k|			  ndpi_build_default_ports(ports_a, 1194, 0, 0, 0, 0) /* TCP */,
 1981|  3.53k|			  ndpi_build_default_ports(ports_b, 1194, 0, 0, 0, 0) /* UDP */,
 1982|  3.53k|			  0);
 1983|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NOE,
 1984|  3.53k|			  "NOE", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1985|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1986|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1987|  3.53k|			  0);
 1988|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CISCOVPN,
 1989|  3.53k|			  "CiscoVPN", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 1990|  3.53k|			  ndpi_build_default_ports(ports_a, 10000, 8008, 0, 0, 0) /* TCP */,
 1991|  3.53k|			  ndpi_build_default_ports(ports_b, 10000, 0, 0, 0, 0) /* UDP */,
 1992|  3.53k|			  0);
 1993|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TEAMSPEAK,
 1994|  3.53k|			  "TeamSpeak", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 1995|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 1996|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 1997|  3.53k|			  0);
 1998|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, NDPI_PROTOCOL_TOR,
 1999|  3.53k|			  "Tor", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2000|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2001|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2002|  3.53k|			  0);
 2003|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SKINNY,
 2004|  3.53k|			  "CiscoSkinny", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2005|  3.53k|			  ndpi_build_default_ports(ports_a, 2000, 0, 0, 0, 0) /* TCP */,
 2006|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2007|  3.53k|			  0);
 2008|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RTCP,
 2009|  3.53k|			  "RTCP", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2010|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2011|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2012|  3.53k|			  0);
 2013|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RSYNC,
 2014|  3.53k|			  "RSYNC", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2015|  3.53k|			  ndpi_build_default_ports(ports_a, 873, 0, 0, 0, 0) /* TCP */,
 2016|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2017|  3.53k|			  0);
 2018|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ORACLE,
 2019|  3.53k|			  "Oracle", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2020|  3.53k|			  ndpi_build_default_ports(ports_a, 1521, 0, 0, 0, 0) /* TCP */,
 2021|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2022|  3.53k|			  0);
 2023|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CORBA,
 2024|  3.53k|			  "Corba", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2025|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2026|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2027|  3.53k|			  0);
 2028|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CANONICAL,
 2029|  3.53k|			  "Canonical", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2030|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2031|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2032|  3.53k|			  0);
 2033|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WHOIS_DAS,
 2034|  3.53k|			  "Whois-DAS", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2035|  3.53k|			  ndpi_build_default_ports(ports_a, 43, 4343, 0, 0, 0), /* TCP */
 2036|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),    /* UDP */
 2037|  3.53k|			  0);
 2038|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SD_RTN,
 2039|  3.53k|			  "SD-RTN", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2040|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2041|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2042|  3.53k|			  0);
 2043|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SOCKS,
 2044|  3.53k|			  "SOCKS", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2045|  3.53k|			  ndpi_build_default_ports(ports_a, 1080, 0, 0, 0, 0),  /* TCP */
 2046|  3.53k|			  ndpi_build_default_ports(ports_b, 1080, 0, 0, 0, 0),  /* UDP */
 2047|  3.53k|			  0);
 2048|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TFTP,
 2049|  3.53k|			  "TFTP", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2050|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),   /* TCP */
 2051|  3.53k|			  ndpi_build_default_ports(ports_b, 69, 0, 0, 0, 0),  /* UDP */
 2052|  3.53k|			  0);
 2053|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RTMP,
 2054|  3.53k|			  "RTMP", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2055|  3.53k|			  ndpi_build_default_ports(ports_a, 1935, 0, 0, 0, 0), /* TCP */
 2056|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),    /* UDP */
 2057|  3.53k|			  0);
 2058|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_PINTEREST,
 2059|  3.53k|			  "Pinterest", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2060|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2061|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2062|  3.53k|			  0);
 2063|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MEGACO,
 2064|  3.53k|			  "Megaco", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2065|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),     /* TCP */
 2066|  3.53k|			  ndpi_build_default_ports(ports_b, 2944, 0, 0, 0, 0),  /* UDP */
 2067|  3.53k|			  0);
 2068|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RESP,
 2069|  3.53k|			  "RESP", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2070|  3.53k|			  ndpi_build_default_ports(ports_a, 6379, 0, 0, 0, 0), /* TCP */
 2071|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),    /* UDP */
 2072|  3.53k|			  0);
 2073|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ZMQ,
 2074|  3.53k|			  "ZeroMQ", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2075|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2076|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2077|  3.53k|			  0);
 2078|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_OSPF,
 2079|  3.53k|			  "OSPF", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2080|  3.53k|			  ndpi_build_default_ports(ports_a, 2604, 0, 0, 0, 0),  /* TCP */
 2081|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),     /* UDP */
 2082|  3.53k|			  0);
 2083|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_BLIZZARD,
 2084|  3.53k|			  "Blizzard", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2085|  3.53k|			  ndpi_build_default_ports(ports_a, 1119, 0, 0, 0, 0),  /* TCP */
 2086|  3.53k|			  ndpi_build_default_ports(ports_b, 1119, 0, 0, 0, 0),  /* UDP */
 2087|  3.53k|			  0);
 2088|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_UBNTAC2,
 2089|  3.53k|			  "UBNTAC2", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2090|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),      /* TCP */
 2091|  3.53k|			  ndpi_build_default_ports(ports_b, 10001, 0, 0, 0, 0),  /* UDP */
 2092|  3.53k|			  0);
 2093|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_VIBER,
 2094|  3.53k|			  "Viber", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2095|  3.53k|			  ndpi_build_default_ports(ports_a, 7985, 5242, 5243, 4244, 0),     /* TCP */
 2096|  3.53k|			  ndpi_build_default_ports(ports_b, 7985, 7987, 5242, 5243, 4244),  /* UDP */
 2097|  3.53k|			  0);
 2098|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_COAP,
 2099|  3.53k|			  "COAP", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2100|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),        /* TCP */
 2101|  3.53k|			  ndpi_build_default_ports(ports_b, 5683, 5684, 0, 0, 0),  /* UDP */
 2102|  3.53k|			  0);
 2103|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MQTT,
 2104|  3.53k|			  "MQTT", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2105|  3.53k|			  ndpi_build_default_ports(ports_a, 1883, 8883, 0, 0, 0), /* TCP */
 2106|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),       /* UDP */
 2107|  3.53k|			  0);
 2108|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SOMEIP,
 2109|  3.53k|			  "SOMEIP", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2110|  3.53k|			  ndpi_build_default_ports(ports_a, 30491, 30501, 0, 0, 0),      /* TCP */
 2111|  3.53k|			  ndpi_build_default_ports(ports_b, 30491, 30501, 30490, 0, 0),  /* UDP */
 2112|  3.53k|			  0);
 2113|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RX,
 2114|  3.53k|			  "RX", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2115|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2116|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2117|  3.53k|			  0);
 2118|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_GIT,
 2119|  3.53k|			  "Git", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2120|  3.53k|			  ndpi_build_default_ports(ports_a, 9418, 0, 0, 0, 0), /* TCP */
 2121|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),    /* UDP */
 2122|  3.53k|			  0);
 2123|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DRDA,
 2124|  3.53k|			  "DRDA", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2125|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2126|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2127|  3.53k|			  0);
 2128|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE_MEET,
 2129|  3.53k|			  "GoogleMeet", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2130|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2131|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2132|  3.53k|			  0);
 2133|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE_CALL,
 2134|  3.53k|			  "GoogleCall", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2135|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2136|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2137|  3.53k|			  0);
 2138|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BJNP,
 2139|  3.53k|			  "BJNP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2140|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2141|  3.53k|			  ndpi_build_default_ports(ports_b, 8612, 0, 0, 0, 0) /* UDP */,
 2142|  3.53k|			  0);
 2143|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SMPP,
 2144|  3.53k|			  "SMPP", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2145|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2146|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2147|  3.53k|			  0);
 2148|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_OOKLA,
 2149|  3.53k|			  "Ookla", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2150|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2151|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0),  /* UDP */
 2152|  3.53k|			  0);
 2153|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AMQP,
 2154|  3.53k|			  "AMQP", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2155|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2156|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0), /* UDP */
 2157|  3.53k|			  0);
 2158|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DNSCRYPT,
 2159|  3.53k|			  "DNScrypt", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2160|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2161|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0), /* UDP */
 2162|  3.53k|			  0);
 2163|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TINC,
 2164|  3.53k|			  "TINC", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2165|  3.53k|			  ndpi_build_default_ports(ports_a, 655, 0, 0, 0, 0) /* TCP */,
 2166|  3.53k|			  ndpi_build_default_ports(ports_b, 655, 0, 0, 0, 0) /* UDP */,
 2167|  3.53k|			  0);
 2168|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_FIX,
 2169|  3.53k|			  "FIX", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_HFT,
 2170|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2171|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2172|  3.53k|			  0);
 2173|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_NINTENDO,
 2174|  3.53k|			  "Nintendo", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2175|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2176|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2177|  3.53k|			  0);
 2178|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_VALVE_SDR,
 2179|  3.53k|			  "SteamDatagramRelay", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2180|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2181|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2182|  3.53k|			  0);
 2183|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AJP,
 2184|  3.53k|			  "AJP", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2185|  3.53k|			  ndpi_build_default_ports(ports_a, 8009, 8010, 0, 0, 0) /* TCP */,
 2186|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2187|  3.53k|			  0);
 2188|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TARGUS_GETDATA,
 2189|  3.53k|			  "TargusDataspeed", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2190|  3.53k|			  ndpi_build_default_ports(ports_a, 5001, 5201, 0, 0, 0) /* TCP */,
 2191|  3.53k|			  ndpi_build_default_ports(ports_b, 5001, 5201, 0, 0, 0) /* UDP */, /* Missing dissector: port based only */
 2192|  3.53k|			  0);
 2193|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_AMAZON_VIDEO,
 2194|  3.53k|			  "AmazonVideo", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2195|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2196|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2197|  3.53k|			  0);
 2198|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DNP3,
 2199|  3.53k|			  "DNP3", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2200|  3.53k|			  ndpi_build_default_ports(ports_a, 20000, 0, 0, 0, 0) /* TCP */,
 2201|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2202|  3.53k|			  0);
 2203|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IEC60870,
 2204|  3.53k|			  "IEC60870", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2205|  3.53k|			  ndpi_build_default_ports(ports_a, 2404, 0, 0, 0, 0) /* TCP */,
 2206|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2207|  3.53k|			  0);
 2208|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BLOOMBERG,
 2209|  3.53k|			  "Bloomberg", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2210|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2211|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2212|  3.53k|			  0);
 2213|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CAPWAP,
 2214|  3.53k|			  "CAPWAP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2215|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2216|  3.53k|			  ndpi_build_default_ports(ports_b, 5246, 5247, 0, 0, 0) /* UDP */,
 2217|  3.53k|			  0);
 2218|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ZABBIX,
 2219|  3.53k|			  "Zabbix", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2220|  3.53k|			  ndpi_build_default_ports(ports_a, 10050, 10051, 0, 0, 0) /* TCP */,
 2221|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2222|  3.53k|			  0);
 2223|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_S7COMM,
 2224|  3.53k|			  "S7Comm", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2225|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2226|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2227|  3.53k|			  0);
 2228|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MSTEAMS,
 2229|  3.53k|			  "Teams", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2230|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2231|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2232|  3.53k|			  0);
 2233|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WEBSOCKET,
 2234|  3.53k|			  "WebSocket", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2235|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2236|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2237|  3.53k|			  0);
 2238|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ANYDESK,
 2239|  3.53k|			  "AnyDesk", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 2240|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2241|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2242|  3.53k|			  0);
 2243|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SOAP,
 2244|  3.53k|			  "SOAP", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2245|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2246|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2247|  3.53k|			  0);
 2248|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MONGODB,
 2249|  3.53k|			  "MongoDB", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2250|  3.53k|			  ndpi_build_default_ports(ports_a, 27017, 0, 0, 0, 0) /* TCP */,
 2251|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2252|  3.53k|			  0);
 2253|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_APPLE_SIRI,
 2254|  3.53k|			  "AppleSiri", NDPI_PROTOCOL_CATEGORY_VIRTUAL_ASSISTANT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2255|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2256|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2257|  3.53k|			  0);
 2258|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SNAPCHAT_CALL,
 2259|  3.53k|			  "SnapchatCall", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2260|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2261|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2262|  3.53k|			  0);
 2263|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HPVIRTGRP,
 2264|  3.53k|			  "HP_VIRTGRP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2265|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2266|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2267|  3.53k|			  0);
 2268|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_GENSHIN_IMPACT,
 2269|  3.53k|			  "GenshinImpact", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2270|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2271|  3.53k|			  ndpi_build_default_ports(ports_b, 22102, 0, 0, 0, 0) /* UDP */,
 2272|  3.53k|			  0);
 2273|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_ACTIVISION,
 2274|  3.53k|			  "Activision", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2275|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2276|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2277|  3.53k|			  0);
 2278|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_FORTICLIENT,
 2279|  3.53k|			  "FortiClient", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2280|  3.53k|			  ndpi_build_default_ports(ports_a, 8013, 8014, 0, 0, 0) /* TCP */,
 2281|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2282|  3.53k|			  0);
 2283|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_Z3950,
 2284|  3.53k|			  "Z3950", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2285|  3.53k|			  ndpi_build_default_ports(ports_a, 210, 0, 0, 0, 0) /* TCP */,
 2286|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2287|  3.53k|			  0);
 2288|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_LIKEE,
 2289|  3.53k|			  "Likee", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2290|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2291|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2292|  3.53k|			  0);
 2293|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_GITLAB,
 2294|  3.53k|			  "GitLab", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2295|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2296|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2297|  3.53k|			  0);
 2298|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_AVAST_SECUREDNS,
 2299|  3.53k|			  "AVASTSecureDNS", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2300|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2301|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0), /* UDP */
 2302|  3.53k|			  0);
 2303|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CASSANDRA,
 2304|  3.53k|			  "Cassandra", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2305|  3.53k|			  ndpi_build_default_ports(ports_a, 7000, 9042, 0, 0, 0) /* TCP */,
 2306|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2307|  3.53k|			  0);
 2308|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_FACEBOOK_VOIP,
 2309|  3.53k|			  "FacebookVoip", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2310|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2311|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2312|  3.53k|			  0);
 2313|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SIGNAL_VOIP,
 2314|  3.53k|			  "SignalVoip", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2315|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2316|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2317|  3.53k|			  0);
 2318|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MICROSOFT_AZURE,
 2319|  3.53k|			  "Azure", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2320|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2321|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2322|  3.53k|			  0);
 2323|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE_CLOUD,
 2324|  3.53k|			  "GoogleCloud", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2325|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2326|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2327|  3.53k|			  0);
 2328|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TENCENT,
 2329|  3.53k|                          "Tencent", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2330|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2331|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2332|  3.53k|                          0);
 2333|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_RAKNET,
 2334|  3.53k|                          "RakNet", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2335|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0), /* TCP */
 2336|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2337|  3.53k|                          0);
 2338|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_XIAOMI,
 2339|  3.53k|                          "Xiaomi", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2340|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2341|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2342|  3.53k|                          0);
 2343|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_EDGECAST,
 2344|  3.53k|                          "Edgecast", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2345|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2346|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2347|  3.53k|                          0);
 2348|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CACHEFLY,
 2349|  3.53k|                          "Cachefly", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2350|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2351|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2352|  3.53k|                          0);
 2353|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SOFTETHER,
 2354|  3.53k|                          "Softether", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2355|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2356|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2357|  3.53k|                          0);
 2358|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_MPEGDASH,
 2359|  3.53k|                          "MpegDash", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2360|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2361|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2362|  3.53k|                          0);
 2363|       |  /*
 2364|       |    Note: removed RSH port 514 as TCP/514 is often used for syslog and RSH is as such on;y
 2365|       |    if both source and destination ports are 514. So we removed the default for RSH and used with syslog
 2366|       |  */
 2367|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_RSH,
 2368|  3.53k|                          "RSH", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 2369|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2370|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2371|  3.53k|                          0);
 2372|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_PIM,
 2373|  3.53k|                          "IP_PIM", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2374|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2375|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2376|  3.53k|                          0);
 2377|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_COLLECTD,
 2378|  3.53k|                          "collectd", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2379|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2380|  3.53k|                          ndpi_build_default_ports(ports_b, 25826, 0, 0, 0, 0) /* UDP */,
 2381|  3.53k|                          0);
 2382|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_I3D,
 2383|  3.53k|                          "i3D", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2384|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2385|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2386|  3.53k|                          0);
 2387|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_RIOTGAMES,
 2388|  3.53k|                          "RiotGames", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2389|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2390|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2391|  3.53k|			  0);
 2392|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ULTRASURF,
 2393|  3.53k|                          "UltraSurf", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2394|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2395|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2396|  3.53k|                          0);
 2397|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_THREEMA,
 2398|  3.53k|                          "Threema", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2399|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2400|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2401|  3.53k|                          0);
 2402|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ALICLOUD,
 2403|  3.53k|                          "AliCloud", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2404|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2405|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2406|  3.53k|                          0);
 2407|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_AVAST,
 2408|  3.53k|                          "AVAST", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2409|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2410|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2411|  3.53k|                          0);
 2412|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TIVOCONNECT,
 2413|  3.53k|                          "TiVoConnect", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2414|  3.53k|                          ndpi_build_default_ports(ports_a, 2190, 0, 0, 0, 0) /* TCP */,
 2415|  3.53k|                          ndpi_build_default_ports(ports_b, 2190, 0, 0, 0, 0) /* UDP */,
 2416|  3.53k|                          0);
 2417|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_KISMET,
 2418|  3.53k|                          "Kismet", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2419|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2420|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2421|  3.53k|                          0);
 2422|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_FASTCGI,
 2423|  3.53k|                          "FastCGI", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2424|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2425|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2426|  3.53k|                          0);
 2427|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_FTPS,
 2428|  3.53k|                          "FTPS", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2429|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2430|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2431|  3.53k|                          0);
 2432|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NATPMP,
 2433|  3.53k|                          "NAT-PMP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2434|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2435|  3.53k|                          ndpi_build_default_ports(ports_b, 5351, 0, 0, 0, 0) /* UDP */,
 2436|  3.53k|                          0);
 2437|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_SYNCTHING,
 2438|  3.53k|                          "Syncthing", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2439|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2440|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2441|  3.53k|                          0);
 2442|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_CRYNET,
 2443|  3.53k|                          "CryNetwork", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2444|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2445|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2446|  3.53k|                          0);
 2447|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LINE,
 2448|  3.53k|			  "Line", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2449|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2450|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2451|  3.53k|                          0);
 2452|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LINE_CALL,
 2453|  3.53k|			  "LineCall", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2454|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2455|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2456|  3.53k|                          0);
 2457|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MUNIN,
 2458|  3.53k|                          "Munin", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2459|  3.53k|                          ndpi_build_default_ports(ports_a, 4949, 0, 0, 0, 0) /* TCP */,
 2460|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2461|  3.53k|                          0);
 2462|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ELASTICSEARCH,
 2463|  3.53k|                          "Elasticsearch", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2464|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2465|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2466|  3.53k|                          0);
 2467|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TUYA_LP,
 2468|  3.53k|                          "TuyaLP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2469|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2470|  3.53k|                          ndpi_build_default_ports(ports_b, 6667, 0, 0, 0, 0) /* UDP */,
 2471|  3.53k|                          0);
 2472|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TPLINK_SHP,
 2473|  3.53k|                          "TPLINK_SHP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2474|  3.53k|                          ndpi_build_default_ports(ports_a, 9999, 0, 0, 0, 0) /* TCP */,
 2475|  3.53k|                          ndpi_build_default_ports(ports_b, 9999, 0, 0, 0, 0) /* UDP */,
 2476|  3.53k|                          0);
 2477|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TAILSCALE,
 2478|  3.53k|			  "Tailscale", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2479|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2480|  3.53k|			  ndpi_build_default_ports(ports_b, 41641, 0, 0, 0, 0) /* UDP */,
 2481|  3.53k|			  0);
 2482|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_SOURCE_ENGINE,
 2483|  3.53k|                          "Source_Engine", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2484|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2485|  3.53k|                          ndpi_build_default_ports(ports_b, 27015, 0, 0, 0, 0) /* UDP */,
 2486|  3.53k|                          0);
 2487|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_BACNET,
 2488|  3.53k|                          "BACnet", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2489|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2490|  3.53k|                          ndpi_build_default_ports(ports_b, 47808, 0, 0, 0, 0) /* UDP */,
 2491|  3.53k|                          0);
 2492|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OICQ,
 2493|  3.53k|                          "OICQ", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2494|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2495|  3.53k|                          ndpi_build_default_ports(ports_b, 8000, 0, 0, 0, 0) /* UDP */,
 2496|  3.53k|                          0);
 2497|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_HOTS,
 2498|  3.53k|                          "Heroes_of_the_Storm", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2499|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2500|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2501|  3.53k|                          0);
 2502|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SRTP,
 2503|  3.53k|			  "SRTP", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2504|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2505|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2506|  3.53k|			  0);
 2507|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BITCOIN,
 2508|  3.53k|			  "BITCOIN", NDPI_PROTOCOL_CATEGORY_CRYPTO_BLOCKCHAIN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2509|  3.53k|			  ndpi_build_default_ports(ports_a, 8333, 0, 0, 0, 0) /* TCP */,
 2510|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2511|  3.53k|			  0);
 2512|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PROTONVPN,
 2513|  3.53k|			  "ProtonVPN", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2514|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2515|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2516|  3.53k|			  0);
 2517|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_APACHE_THRIFT,
 2518|  3.53k|			  "Thrift", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2519|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2520|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2521|  3.53k|			  0);
 2522|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_ROBLOX,
 2523|  3.53k|			  "Roblox", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2524|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2525|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2526|  3.53k|			  0);
 2527|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SERVICE_LOCATION,
 2528|  3.53k|			  "Service_Location_Protocol", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2529|  3.53k|			  ndpi_build_default_ports(ports_a, 427, 0, 0, 0, 0) /* TCP */,
 2530|  3.53k|			  ndpi_build_default_ports(ports_b, 427, 0, 0, 0, 0) /* UDP */,
 2531|  3.53k|			  0);
 2532|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MULLVAD,
 2533|  3.53k|			  "Mullvad", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2534|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2535|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2536|  3.53k|			  0);
 2537|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OPERA_VPN,
 2538|  3.53k|			  "OperaVPN", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2539|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2540|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2541|  3.53k|			  0);
 2542|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_HTTP2,
 2543|  3.53k|                          "HTTP2", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2544|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2545|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2546|  3.53k|                          0);
 2547|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_HAPROXY,
 2548|  3.53k|			  "HAProxy", NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2549|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2550|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2551|  3.53k|			  0);
 2552|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_RMCP,
 2553|  3.53k|			  "RMCP", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2554|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2555|  3.53k|			  ndpi_build_default_ports(ports_b, 623, 0, 0, 0, 0) /* UDP */,
 2556|  3.53k|			  0);
 2557|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_CAN,
 2558|  3.53k|			  "Controller_Area_Network", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2559|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2560|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2561|  3.53k|			  0);
 2562|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_PROTOBUF,
 2563|  3.53k|			  "Protobuf", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2564|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2565|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2566|  3.53k|			  0);
 2567|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ETHEREUM,
 2568|  3.53k|			  "ETHEREUM", NDPI_PROTOCOL_CATEGORY_CRYPTO_BLOCKCHAIN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2569|  3.53k|			  ndpi_build_default_ports(ports_a, 30303, 0, 0, 0, 0) /* TCP */,
 2570|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2571|  3.53k|			  0);
 2572|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TELEGRAM_VOIP,
 2573|  3.53k|			  "TelegramVoip", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2574|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2575|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2576|  3.53k|			  0);
 2577|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TESLA_SERVICES,
 2578|  3.53k|			  "TeslaServices", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2579|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2580|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2581|  3.53k|			  0);
 2582|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PTPV2,
 2583|  3.53k|			  "PTPv2", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2584|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2585|  3.53k|			  ndpi_build_default_ports(ports_b, 319, 320, 0, 0, 0) /* UDP */,
 2586|  3.53k|			  0);
 2587|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HART_IP,
 2588|  3.53k|			  "HART-IP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2589|  3.53k|			  ndpi_build_default_ports(ports_a, 5094, 0, 0, 0, 0) /* TCP */,
 2590|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2591|  3.53k|			  0);
 2592|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RTPS,
 2593|  3.53k|			  "RTPS", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2594|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2595|  3.53k|			  ndpi_build_default_ports(ports_b, 7401, 0, 0, 0, 0) /* UDP */,
 2596|  3.53k|			  0);
 2597|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OPC_UA,
 2598|  3.53k|			  "OPC-UA", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2599|  3.53k|			  ndpi_build_default_ports(ports_a, 4840, 0, 0, 0, 0) /* TCP */,
 2600|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2601|  3.53k|			  0);
 2602|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_S7COMM_PLUS,
 2603|  3.53k|			  "S7CommPlus", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2604|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2605|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2606|  3.53k|			  0);
 2607|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_FINS,
 2608|  3.53k|			  "FINS", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2609|  3.53k|			  ndpi_build_default_ports(ports_a, 9600, 0, 0, 0, 0) /* TCP */,
 2610|  3.53k|			  ndpi_build_default_ports(ports_b, 9600, 0, 0, 0, 0) /* UDP */,
 2611|  3.53k|			  0);
 2612|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ETHERSIO,
 2613|  3.53k|			  "EtherSIO", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2614|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2615|  3.53k|			  ndpi_build_default_ports(ports_b, 6060, 0, 0, 0, 0) /* UDP */,
 2616|  3.53k|			  0);
 2617|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_UMAS,
 2618|  3.53k|			  "UMAS", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2619|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2620|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2621|  3.53k|			  0);
 2622|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BECKHOFF_ADS,
 2623|  3.53k|			  "BeckhoffADS", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2624|  3.53k|			  ndpi_build_default_ports(ports_a, 48898, 0, 0, 0, 0) /* TCP */,
 2625|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2626|  3.53k|			  0);
 2627|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ISO9506_1_MMS,
 2628|  3.53k|			  "ISO9506-1-MMS", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2629|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2630|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2631|  3.53k|			  0);
 2632|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IEEE_C37118,
 2633|  3.53k|			  "IEEE-C37118", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2634|  3.53k|			  ndpi_build_default_ports(ports_a, 4712, 0, 0, 0, 0) /* TCP */,
 2635|  3.53k|			  ndpi_build_default_ports(ports_b, 4713, 0, 0, 0, 0) /* UDP */,
 2636|  3.53k|			  0);
 2637|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ETHERSBUS,
 2638|  3.53k|			  "Ether-S-Bus", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2639|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2640|  3.53k|			  ndpi_build_default_ports(ports_b, 5050, 0, 0, 0, 0) /* UDP */,
 2641|  3.53k|			  0);
 2642|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MONERO,
 2643|  3.53k|			  "Monero", NDPI_PROTOCOL_CATEGORY_CRYPTO_BLOCKCHAIN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2644|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2645|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2646|  3.53k|			  0);
 2647|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DCERPC,
 2648|  3.53k|			  "DCERPC", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2649|  3.53k|			  ndpi_build_default_ports(ports_a, 135, 0, 0, 0, 0) /* TCP */,
 2650|  3.53k|			  ndpi_build_default_ports(ports_b, 135, 0, 0, 0, 0) /* UDP */,
 2651|  3.53k|			  0);
 2652|  3.53k|  ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_DCERPC,
 2653|  3.53k|			      NDPI_PROTOCOL_PROFINET_IO,
 2654|  3.53k|			      NDPI_PROTOCOL_MATCHED_BY_CONTENT,
  ------------------
  |  |  510|  3.53k|#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
  ------------------
 2655|  3.53k|			      NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS);
  ------------------
  |  |  509|  3.53k|#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
  ------------------
 2656|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PROFINET_IO,
 2657|  3.53k|			  "PROFINET_IO", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2658|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2659|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2660|  3.53k|			  0);
 2661|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HISLIP,
 2662|  3.53k|			  "HiSLIP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2663|  3.53k|			  ndpi_build_default_ports(ports_a, 4880, 0, 0, 0, 0) /* TCP */,
 2664|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2665|  3.53k|			  0);
 2666|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_UFTP,
 2667|  3.53k|			  "UFTP", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2668|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2669|  3.53k|			  ndpi_build_default_ports(ports_b, 1044, 0, 0, 0, 0) /* UDP */,
 2670|  3.53k|			  0);
 2671|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OPENFLOW,
 2672|  3.53k|			  "OpenFlow", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2673|  3.53k|			  ndpi_build_default_ports(ports_a, 6653, 0, 0, 0, 0) /* TCP */,
 2674|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2675|  3.53k|			  0);
 2676|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_JSON_RPC,
 2677|  3.53k|			  "JSON-RPC", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2678|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2679|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2680|  3.53k|			  0);
 2681|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WEBDAV,
 2682|  3.53k|			  "WebDAV", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2683|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0),  /* TCP */
 2684|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0), /* UDP */
 2685|  3.53k|			  0);
 2686|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_APACHE_KAFKA,
 2687|  3.53k|			  "Kafka", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2688|  3.53k|			  ndpi_build_default_ports(ports_a, 9092, 0, 0, 0, 0) /* TCP */,
 2689|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2690|  3.53k|			  0);
 2691|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NOMACHINE,
 2692|  3.53k|			  "NoMachine", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 2693|  3.53k|			  ndpi_build_default_ports(ports_a, 4000, 0, 0, 0, 0) /* TCP */,
 2694|  3.53k|			  ndpi_build_default_ports(ports_b, 4000, 0, 0, 0, 0) /* UDP */,
 2695|  3.53k|			  0);
 2696|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IEC62056,
 2697|  3.53k|			  "IEC62056", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2698|  3.53k|			  ndpi_build_default_ports(ports_a, 4059, 0, 0, 0, 0) /* TCP */,
 2699|  3.53k|			  ndpi_build_default_ports(ports_b, 4059, 0, 0, 0, 0) /* UDP */,
 2700|  3.53k|			  0);
 2701|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HL7,
 2702|  3.53k|			  "HL7", NDPI_PROTOCOL_CATEGORY_HEALTH, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2703|  3.53k|			  ndpi_build_default_ports(ports_a, 2575, 0, 0, 0, 0) /* TCP */,
 2704|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2705|  3.53k|			  0);
 2706|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DICOM,
 2707|  3.53k|			  "DICOM", NDPI_PROTOCOL_CATEGORY_HEALTH, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2708|  3.53k|			  ndpi_build_default_ports(ports_a, 104, 0, 0, 0, 0) /* TCP */,
 2709|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2710|  3.53k|			  0);
 2711|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CEPH,
 2712|  3.53k|			  "Ceph", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2713|  3.53k|			  ndpi_build_default_ports(ports_a, 3300, 6789, 0, 0, 0) /* TCP */,
 2714|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2715|  3.53k|			  0);
 2716|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ROUGHTIME,
 2717|  3.53k|			  "Roughtime", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2718|  3.53k|			  ndpi_build_default_ports(ports_a, 2002, 0, 0, 0, 0) /* TCP */,
 2719|  3.53k|			  ndpi_build_default_ports(ports_b, 2002, 0, 0, 0, 0) /* UDP */,
 2720|  3.53k|			  0);
 2721|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_KCP,
 2722|  3.53k|			  "KCP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2723|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2724|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2725|  3.53k|			  0);
 2726|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_MUMBLE,
 2727|  3.53k|			  "Mumble", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2728|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2729|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2730|  3.53k|			  0);
 2731|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_YOJIMBO,
 2732|  3.53k|			  "Yojimbo", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2733|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2734|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2735|  3.53k|			  0);
 2736|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_STOMP,
 2737|  3.53k|			  "STOMP", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2738|  3.53k|			  ndpi_build_default_ports(ports_a, 61613, 0, 0, 0, 0) /* TCP */,
 2739|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2740|  3.53k|			  0);
 2741|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RADMIN,
 2742|  3.53k|			  "Radmin", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS,
 2743|  3.53k|			  ndpi_build_default_ports(ports_a, 4899, 0, 0, 0, 0) /* TCP */,
 2744|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2745|  3.53k|			  0);
 2746|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RAFT,
 2747|  3.53k|			  "Raft", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2748|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2749|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2750|  3.53k|			  0);
 2751|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CIP,
 2752|  3.53k|			  "CIP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2753|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2754|  3.53k|			  ndpi_build_default_ports(ports_b, 2222, 0, 0, 0, 0) /* UDP */,
 2755|  3.53k|			  0);
 2756|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GEARMAN,
 2757|  3.53k|			  "Gearman", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2758|  3.53k|			  ndpi_build_default_ports(ports_a, 4730, 0, 0, 0, 0) /* TCP */,
 2759|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2760|  3.53k|			  0);
 2761|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TENCENTGAMES,
 2762|  3.53k|			  "TencentGames", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2763|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2764|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2765|  3.53k|			  0);
 2766|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_GAIJIN,
 2767|  3.53k|			  "GaijinEntertainment", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2768|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2769|  3.53k|			  ndpi_build_default_ports(ports_b, 20011, 0, 0, 0, 0) /* UDP */,
 2770|  3.53k|			  0);
 2771|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_C1222,
 2772|  3.53k|			  "ANSI_C1222", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2773|  3.53k|			  ndpi_build_default_ports(ports_a, 1153, 0, 0, 0, 0) /* TCP */,
 2774|  3.53k|			  ndpi_build_default_ports(ports_b, 1153, 0, 0, 0, 0) /* UDP */,
 2775|  3.53k|			  0);
 2776|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DLEP,
 2777|  3.53k|			  "DLEP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2778|  3.53k|			  ndpi_build_default_ports(ports_a, 854, 0, 0, 0, 0) /* TCP */,
 2779|  3.53k|			  ndpi_build_default_ports(ports_b, 854, 0, 0, 0, 0) /* UDP */,
 2780|  3.53k|			  0);
 2781|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BFD,
 2782|  3.53k|			  "BFD", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2783|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2784|  3.53k|			  ndpi_build_default_ports(ports_b, 3784, 3785, 0, 0, 0) /* UDP */,
 2785|  3.53k|			  0);
 2786|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_NETEASE_GAMES,
 2787|  3.53k|			  "NetEaseGames", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2788|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2789|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2790|  3.53k|			  0);
 2791|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_PATHOFEXILE,
 2792|  3.53k|			  "PathofExile", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2793|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2794|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2795|  3.53k|			  0);
 2796|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PFCP,
 2797|  3.53k|			  "PFCP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2798|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2799|  3.53k|			  ndpi_build_default_ports(ports_b, 8805, 0, 0, 0, 0) /* UDP */,
 2800|  3.53k|			  0);
 2801|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_FLUTE,
 2802|  3.53k|			  "FLUTE", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2803|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2804|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2805|  3.53k|			  0);
 2806|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_LOLWILDRIFT,
 2807|  3.53k|			  "LoLWildRift", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2808|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2809|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2810|  3.53k|			  0);
 2811|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TESO,
 2812|  3.53k|			  "TES_Online", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2813|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2814|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2815|  3.53k|			  0);
 2816|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LDP,
 2817|  3.53k|			  "LDP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2818|  3.53k|			  ndpi_build_default_ports(ports_a, 646, 0, 0, 0, 0) /* TCP */,
 2819|  3.53k|			  ndpi_build_default_ports(ports_b, 646, 0, 0, 0, 0) /* UDP */,
 2820|  3.53k|			  0);
 2821|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_KNXNET_IP,
 2822|  3.53k|			  "KNXnet_IP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2823|  3.53k|			  ndpi_build_default_ports(ports_a, 3671, 0, 0, 0, 0) /* TCP */,
 2824|  3.53k|			  ndpi_build_default_ports(ports_b, 3671, 0, 0, 0, 0) /* UDP */,
 2825|  3.53k|			  0);
 2826|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_EGD,
 2827|  3.53k|			  "EthernetGlobalData", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2828|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2829|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2830|  3.53k|			  0);
 2831|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_BFCP,
 2832|  3.53k|			  "BFCP", NDPI_PROTOCOL_CATEGORY_VIDEO, NDPI_PROTOCOL_QOE_CATEGORY_LIVE_STREAMING,
 2833|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2834|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2835|  3.53k|			  0);
 2836|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_IQIYI,
 2837|  3.53k|			  "iQIYI", NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_QOE_CATEGORY_BUFFERED_STREAMING,
 2838|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2839|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2840|  3.53k|			  0);
 2841|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_VIBER_VOIP,
 2842|  3.53k|			  "ViberVoip", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
 2843|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2844|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2845|  3.53k|			  0);
 2846|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_COD_MOBILE,
 2847|  3.53k|			  "CoD_Mobile", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2848|  3.53k| 			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2849|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2850|  3.53k|			  0);
 2851|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ZUG,
 2852|  3.53k|			  "ZUG", NDPI_PROTOCOL_CATEGORY_CRYPTO_BLOCKCHAIN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2853|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2854|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2855|  3.53k|			  0);
 2856|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_JRMI,
 2857|  3.53k|			  "JRMI", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2858|  3.53k|			  ndpi_build_default_ports(ports_a, 1099, 0, 0, 0, 0) /* TCP */,
 2859|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2860|  3.53k|			  0);
 2861|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RIPE_ATLAS,
 2862|  3.53k|			  "RipeAtlas", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2863|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2864|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2865|  3.53k|			  0);
 2866|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_HLS,
 2867|  3.53k|			  "HLS", NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2868|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2869|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2870|  3.53k|			  0);
 2871|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CLICKHOUSE,
 2872|  3.53k|			  "ClickHouse", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2873|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2874|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2875|  3.53k|			  0);
 2876|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NANO,
 2877|  3.53k|			  "Nano", NDPI_PROTOCOL_CATEGORY_CRYPTO_BLOCKCHAIN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2878|  3.53k|			  ndpi_build_default_ports(ports_a, 7075, 0, 0, 0, 0) /* TCP */,
 2879|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2880|  3.53k|			  0);
 2881|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OPENWIRE,
 2882|  3.53k|			  "OpenWire", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2883|  3.53k|			  ndpi_build_default_ports(ports_a, 61616, 0, 0, 0, 0),  /* TCP */
 2884|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0), /* UDP */
 2885|  3.53k|			  0);
 2886|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CNP_IP,
 2887|  3.53k|			  "CNP-IP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2888|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2889|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2890|  3.53k|			  0);
 2891|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ATG,
 2892|  3.53k|			  "ATG", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2893|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2894|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2895|  3.53k|			  0);
 2896|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TRDP,
 2897|  3.53k|			  "TRDP", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2898|  3.53k|			  ndpi_build_default_ports(ports_a, 17225, 0, 0, 0, 0) /* TCP */,
 2899|  3.53k|			  ndpi_build_default_ports(ports_b, 17224, 17225, 0, 0, 0) /* UDP */,
 2900|  3.53k|			  0);
 2901|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LUSTRE,
 2902|  3.53k|			  "Lustre", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2903|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2904|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2905|  3.53k|			  0);
 2906|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DINGTALK,
 2907|  3.53k|			  "DingTalk", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2908|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2909|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2910|  3.53k|			  0);
 2911|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PALTALK,
 2912|  3.53k|			  "Paltalk", NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2913|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2914|  3.53k|			  ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2915|  3.53k|			  0);
 2916|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MS_OUTLOOK,
 2917|  3.53k|                          "Outlook", NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2918|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2919|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2920|  3.53k|                          0);
 2921|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MICROSOFT,
 2922|  3.53k|                          "Microsoft", NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2923|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2924|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2925|  3.53k|                          0);
 2926|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MICROSOFT_365,
 2927|  3.53k|                          "Microsoft365", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2928|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2929|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2930|  3.53k|                          0);
 2931|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MS_ONE_DRIVE,
 2932|  3.53k|                          "MS_OneDrive", NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2933|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2934|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2935|  3.53k|                          0);
 2936|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_LAGOFAST,
 2937|  3.53k|                          "LagoFast", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2938|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2939|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2940|  3.53k|                          0);
 2941|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GEARUP_BOOSTER,
 2942|  3.53k|                          "GearUP_Booster", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2943|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2944|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2945|  3.53k|                          0);
 2946|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_MSDO,
 2947|  3.53k|                          "MSDO", NDPI_PROTOCOL_CATEGORY_SW_UPDATE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2948|  3.53k|                          ndpi_build_default_ports(ports_a, 7680, 0, 0, 0, 0) /* TCP */,
 2949|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2950|  3.53k|                          0);
 2951|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_HAMACHI,
 2952|  3.53k|			  "Hamachi", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2953|  3.53k|			  ndpi_build_default_ports(ports_a, 12975, 32976, 0, 0, 0) /* TCP */,
 2954|  3.53k|			  ndpi_build_default_ports(ports_b, 17771, 0, 0, 0, 0) /* UDP */,
 2955|  3.53k|                          0);
 2956|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GLBP,
 2957|  3.53k|			  "GLBP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2958|  3.53k|			  ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2959|  3.53k|			  ndpi_build_default_ports(ports_b, 3222, 0, 0, 0, 0) /* UDP */,
 2960|  3.53k|			  0);
 2961|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_EASYWEATHER,
 2962|  3.53k|                          "EasyWeather", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2963|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2964|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2965|  3.53k|                          0);
 2966|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MUDFISH,
 2967|  3.53k|                          "Mudfish", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
 2968|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2969|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2970|  3.53k|                          0);
 2971|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TRISTATION,
 2972|  3.53k|                          "TriStation", NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2973|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2974|  3.53k|                          ndpi_build_default_ports(ports_b, 1501, 1502, 0, 0, 0) /* UDP */,
 2975|  3.53k|                          0);
 2976|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SAMSUNG_SDP,
 2977|  3.53k|                          "SamsungSDP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2978|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2979|  3.53k|                          ndpi_build_default_ports(ports_b, 15600, 0, 0, 0, 0) /* UDP */,
 2980|  3.53k|                          0);
 2981|  3.53k|  ndpi_set_proto_defaults(ndpi_str,1 ,0 ,NDPI_PROTOCOL_ACCEPTABLE,NDPI_PROTOCOL_MATTER,
 2982|  3.53k|                          "Matter",NDPI_PROTOCOL_CATEGORY_IOT_SCADA, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2983|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */ ,
 2984|  3.53k|                          ndpi_build_default_ports(ports_b, 5540, 5542, 0, 0, 0) /* UDP */,
 2985|  3.53k|                          0);
 2986|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 , 1 , NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AWS_DYNAMODB,
 2987|  3.53k|                          "AWS_DynamoDB", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2988|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */ ,
 2989|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2990|  3.53k|                          0);
 2991|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 , 1 , NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_AKAMAI,
 2992|  3.53k|                          "Akamai", NDPI_PROTOCOL_CATEGORY_DATABASE, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2993|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */ ,
 2994|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 2995|  3.53k|                          0);
 2996|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_JSON,
 2997|  3.53k|                          "JSON", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 2998|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 2999|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 3000|  3.53k|                          0);
 3001|  3.53k|  ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MSGPACK,
 3002|  3.53k|                          "MessagePack", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 3003|  3.53k|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 3004|  3.53k|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 3005|  3.53k|                          0);
 3006|       |
 3007|       |#ifdef CUSTOM_NDPI_PROTOCOLS
 3008|       |#include "../../../nDPI-custom/custom_ndpi_main.c"
 3009|       |#endif
 3010|       |
 3011|       |  /* calling function for host and content matched protocols */
 3012|  3.53k|  init_string_based_protocols(ndpi_str);
 3013|  3.53k|}
ndpi_main.c:init_string_based_protocols:
 1059|  3.53k|static void init_string_based_protocols(struct ndpi_detection_module_struct *ndpi_str) {
 1060|  3.53k|  int i;
 1061|       |
 1062|       |  /* Sanity checks */
 1063|  3.53k|  self_check_host_match(ndpi_str, host_match);
 1064|  3.53k|  self_check_host_match(ndpi_str, teams_host_match);
 1065|  3.53k|  self_check_host_match(ndpi_str, outlook_host_match);
 1066|  3.53k|  self_check_host_match(ndpi_str, ms_onedrive_host_match);
 1067|  3.53k|  self_check_host_match(ndpi_str, microsoft365_host_match);
 1068|  3.53k|  self_check_host_match(ndpi_str, azure_host_match);
 1069|  3.53k|  self_check_host_match(ndpi_str, microsoft_host_match);
 1070|  3.53k|  self_check_host_match(ndpi_str, aws_api_gateway_host_match);
 1071|  3.53k|  self_check_host_match(ndpi_str, aws_cloudfront_host_match);
 1072|  3.53k|  self_check_host_match(ndpi_str, aws_cognito_host_match);
 1073|  3.53k|  self_check_host_match(ndpi_str, aws_ec2_host_match);
 1074|  3.53k|  self_check_host_match(ndpi_str, aws_emr_host_match);
 1075|  3.53k|  self_check_host_match(ndpi_str, aws_s3_host_match);
 1076|  3.53k|  self_check_host_match(ndpi_str, github_host_match);
 1077|  3.53k|  self_check_host_match(ndpi_str, githubcopilot_host_match);
 1078|  3.53k|  self_check_host_match(ndpi_str, githubpackages_host_match);
 1079|  3.53k|  self_check_host_match(ndpi_str, githubactions_host_match);
 1080|       |
 1081|  3.16M|  for(i = 0; host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1081:14): [True: 3.16M, False: 3.53k]
  ------------------
 1082|  3.16M|    init_app_protocol(ndpi_str, &host_match[i]);
 1083|  38.9k|  for(i = 0; teams_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1083:14): [True: 35.3k, False: 3.53k]
  ------------------
 1084|  35.3k|    init_app_protocol(ndpi_str, &teams_host_match[i]);
 1085|  31.8k|  for(i = 0; outlook_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1085:14): [True: 28.2k, False: 3.53k]
  ------------------
 1086|  28.2k|    init_app_protocol(ndpi_str, &outlook_host_match[i]);
 1087|  42.4k|  for(i = 0; ms_onedrive_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1087:14): [True: 38.9k, False: 3.53k]
  ------------------
 1088|  38.9k|    init_app_protocol(ndpi_str, &ms_onedrive_host_match[i]);
 1089|   449k|  for(i = 0; microsoft365_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1089:14): [True: 445k, False: 3.53k]
  ------------------
 1090|   445k|    init_app_protocol(ndpi_str, &microsoft365_host_match[i]);
 1091|  95.4k|  for(i = 0; azure_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1091:14): [True: 91.9k, False: 3.53k]
  ------------------
 1092|  91.9k|    init_app_protocol(ndpi_str, &azure_host_match[i]);
 1093|  14.1k|  for(i = 0; microsoft_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1093:14): [True: 10.6k, False: 3.53k]
  ------------------
 1094|  10.6k|    init_app_protocol(ndpi_str, &microsoft_host_match[i]);
 1095|   123k|  for(i = 0; aws_api_gateway_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1095:14): [True: 120k, False: 3.53k]
  ------------------
 1096|   120k|    init_app_protocol(ndpi_str, &aws_api_gateway_host_match[i]);
 1097|  7.07k|  for(i = 0; aws_cloudfront_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1097:14): [True: 3.53k, False: 3.53k]
  ------------------
 1098|  3.53k|    init_app_protocol(ndpi_str, &aws_cloudfront_host_match[i]);
 1099|   137k|  for(i = 0; aws_cognito_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1099:14): [True: 134k, False: 3.53k]
  ------------------
 1100|   134k|    init_app_protocol(ndpi_str, &aws_cognito_host_match[i]);
 1101|  14.1k|  for(i = 0; aws_ec2_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1101:14): [True: 10.6k, False: 3.53k]
  ------------------
 1102|  10.6k|    init_app_protocol(ndpi_str, &aws_ec2_host_match[i]);
 1103|   353k|  for(i = 0; aws_emr_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1103:14): [True: 350k, False: 3.53k]
  ------------------
 1104|   350k|    init_app_protocol(ndpi_str, &aws_emr_host_match[i]);
 1105|  1.07M|  for(i = 0; aws_s3_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1105:14): [True: 1.07M, False: 3.53k]
  ------------------
 1106|  1.07M|    init_app_protocol(ndpi_str, &aws_s3_host_match[i]);
 1107|  21.2k|  for(i = 0; github_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1107:14): [True: 17.6k, False: 3.53k]
  ------------------
 1108|  17.6k|    init_app_protocol(ndpi_str, &github_host_match[i]);
 1109|  10.6k|  for(i = 0; githubcopilot_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1109:14): [True: 7.07k, False: 3.53k]
  ------------------
 1110|  7.07k|    init_app_protocol(ndpi_str, &githubcopilot_host_match[i]);
 1111|  60.1k|  for(i = 0; githubpackages_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1111:14): [True: 56.5k, False: 3.53k]
  ------------------
 1112|  56.5k|    init_app_protocol(ndpi_str, &githubpackages_host_match[i]);
 1113|   215k|  for(i = 0; githubactions_host_match[i].string_to_match != NULL; i++)
  ------------------
  |  Branch (1113:14): [True: 212k, False: 3.53k]
  ------------------
 1114|   212k|    init_app_protocol(ndpi_str, &githubactions_host_match[i]);
 1115|       |
 1116|       |  /* ************************ */
 1117|       |
 1118|  3.53k|  if(!ndpi_xgrams_inited) {
  ------------------
  |  Branch (1118:6): [True: 1, False: 3.53k]
  ------------------
 1119|      1|    ndpi_xgrams_inited = 1;
 1120|      1|    ndpi_xgrams_init(ndpi_str,bigrams_bitmap,sizeof(bigrams_bitmap),
 1121|      1|		     ndpi_en_bigrams,sizeof(ndpi_en_bigrams)/sizeof(ndpi_en_bigrams[0]), 2);
 1122|       |
 1123|      1|    ndpi_xgrams_init(ndpi_str,impossible_bigrams_bitmap,sizeof(impossible_bigrams_bitmap),
 1124|      1|		     ndpi_en_impossible_bigrams,sizeof(ndpi_en_impossible_bigrams)/sizeof(ndpi_en_impossible_bigrams[0]), 2);
 1125|      1|    ndpi_xgrams_init(ndpi_str,trigrams_bitmap,sizeof(trigrams_bitmap),
 1126|      1|		     ndpi_en_trigrams,sizeof(ndpi_en_trigrams)/sizeof(ndpi_en_trigrams[0]), 3);
 1127|      1|  }
 1128|  3.53k|}
ndpi_main.c:self_check_host_match:
 1000|  60.1k|                                  ndpi_protocol_match *hosts) {
 1001|  60.1k|  u_int32_t i, j;
 1002|       |
 1003|  5.86M|  for(i = 0; hosts[i].string_to_match != NULL; i++) {
  ------------------
  |  Branch (1003:14): [True: 5.80M, False: 60.1k]
  ------------------
 1004|  5.80M|    if(hosts[i].string_to_match[0] == '.') {
  ------------------
  |  Branch (1004:8): [True: 0, False: 5.80M]
  ------------------
 1005|      0|      NDPI_LOG_ERR(ndpi_str,
  ------------------
  |  |  593|      0|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 1006|      0|                   "[NDPI] INTERNAL ERROR Invalid string detected '%s'. It can not start with '.'\n",
 1007|      0|                   hosts[i].string_to_match);
 1008|      0|    }
 1009|  3.27G|    for(j = 0; hosts[j].string_to_match != NULL; j++) {
  ------------------
  |  Branch (1009:16): [True: 3.27G, False: 5.80M]
  ------------------
 1010|  3.27G|      if((i != j) && (strcmp(hosts[i].string_to_match, hosts[j].string_to_match) == 0)) {
  ------------------
  |  Branch (1010:10): [True: 3.26G, False: 5.80M]
  |  Branch (1010:22): [True: 0, False: 3.26G]
  ------------------
 1011|      0|        NDPI_LOG_ERR(ndpi_str,
  ------------------
  |  |  593|      0|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 1012|      0|                     "[NDPI] INTERNAL ERROR duplicate string detected '%s' [id: %u, id %u]\n",
 1013|      0|                     hosts[i].string_to_match, i, j);
 1014|      0|      }
 1015|  3.27G|    }
 1016|  5.80M|  }
 1017|  60.1k|}
ndpi_main.c:init_app_protocol:
  934|  5.80M|                              ndpi_protocol_match const * const match) {
  935|  5.80M|  ndpi_port_range ports_a[MAX_DEFAULT_PORTS], ports_b[MAX_DEFAULT_PORTS];
  936|  5.80M|  ndpi_protocol_qoe_category_t qoeCategory;
  937|       |
  938|  5.80M|  switch(match->protocol_category) {
  939|   367k|  case NDPI_PROTOCOL_CATEGORY_WEB:
  ------------------
  |  Branch (939:3): [True: 367k, False: 5.43M]
  ------------------
  940|   367k|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_WEB_BROWSING;
  941|   367k|    break;
  942|       |
  943|   286k|  case NDPI_PROTOCOL_CATEGORY_GAME:
  ------------------
  |  Branch (943:3): [True: 286k, False: 5.51M]
  ------------------
  944|   286k|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING;
  945|   286k|    break;
  946|       |
  947|  84.8k|  case NDPI_PROTOCOL_CATEGORY_VOIP:
  ------------------
  |  Branch (947:3): [True: 84.8k, False: 5.71M]
  ------------------
  948|  84.8k|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS;
  949|  84.8k|    break;
  950|       |
  951|  7.07k|  case NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS:
  ------------------
  |  Branch (951:3): [True: 7.07k, False: 5.79M]
  ------------------
  952|  7.07k|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_REMOTE_ACCESS;
  953|  7.07k|    break;
  954|       |
  955|  70.7k|  case NDPI_PROTOCOL_CATEGORY_MEDIA:
  ------------------
  |  Branch (955:3): [True: 70.7k, False: 5.72M]
  ------------------
  956|   371k|  case NDPI_PROTOCOL_CATEGORY_STREAMING:
  ------------------
  |  Branch (956:3): [True: 300k, False: 5.50M]
  ------------------
  957|   509k|  case NDPI_PROTOCOL_CATEGORY_MUSIC:
  ------------------
  |  Branch (957:3): [True: 137k, False: 5.66M]
  ------------------
  958|   615k|  case NDPI_PROTOCOL_CATEGORY_VIDEO:
  ------------------
  |  Branch (958:3): [True: 106k, False: 5.69M]
  ------------------
  959|   615k|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_BUFFERED_STREAMING;
  960|   615k|    break;
  961|       |
  962|  4.43M|  default:
  ------------------
  |  Branch (962:3): [True: 4.43M, False: 1.36M]
  ------------------
  963|  4.43M|    qoeCategory = NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED;
  964|  4.43M|    break;
  965|  5.80M|  }
  966|       |
  967|  5.80M|  ndpi_set_proto_defaults(ndpi_str,
  968|  5.80M|                          0, /* isClearTextProto */
  969|  5.80M|                          1, /* isAppProtocol */
  970|  5.80M|                          match->protocol_breed,
  971|  5.80M|                          match->protocol_id,
  972|  5.80M|                          match->proto_name,
  973|  5.80M|                          match->protocol_category,
  974|  5.80M|                          qoeCategory,
  975|  5.80M|                          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
  976|  5.80M|                          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
  977|  5.80M|                          0 /* Internal protocol, no custom */);
  978|  5.80M|}
ndpi_main.c:ndpi_xgrams_init:
 1032|      3|{
 1033|      3|  unsigned int i,j,c;
 1034|  10.7k|  for(i=0;i < sn && src[i]; i++) {
  ------------------
  |  Branch (1034:11): [True: 10.7k, False: 0]
  |  Branch (1034:21): [True: 10.7k, False: 3]
  ------------------
 1035|  42.2k|    for(j=0,c=0; j < l; j++) {
  ------------------
  |  Branch (1035:18): [True: 31.4k, False: 10.7k]
  ------------------
 1036|  31.4k|      unsigned char a = (unsigned char)src[i][j];
 1037|  31.4k|      if(a < 'a' || a > 'z') {
  ------------------
  |  Branch (1037:10): [True: 0, False: 31.4k]
  |  Branch (1037:21): [True: 0, False: 31.4k]
  ------------------
 1038|      0|        NDPI_LOG_ERR(ndpi_str,
  ------------------
  |  |  593|      0|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 1039|      0|                     "[NDPI] INTERNAL ERROR ndpi_xgrams_init %u: c%u %c\n",
 1040|      0|                     i,j,a);
 1041|      0|        abort();
 1042|      0|      }
 1043|  31.4k|      c *= XGRAMS_C;
  ------------------
  |  | 1021|  31.4k|#define XGRAMS_C 26
  ------------------
 1044|  31.4k|      c += a - 'a';
 1045|  31.4k|    }
 1046|  10.7k|    if(src[i][l]) {
  ------------------
  |  Branch (1046:8): [True: 0, False: 10.7k]
  ------------------
 1047|      0|      NDPI_LOG_ERR(ndpi_str,
  ------------------
  |  |  593|      0|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 1048|      0|                   "[NDPI] INTERNAL ERROR ndpi_xgrams_init %u: c[%d] != 0\n",
 1049|      0|                   i,l);
 1050|      0|      abort();
 1051|      0|    }
 1052|  10.7k|    if((c >> 3) >= dn) abort();
  ------------------
  |  Branch (1052:8): [True: 0, False: 10.7k]
  ------------------
 1053|  10.7k|    dst[c >> 5] |= 1u << (c & 0x1f);
 1054|  10.7k|  }
 1055|      3|}
ndpi_main.c:free_ptree_data:
 4123|    687|static void free_ptree_data(void *data) {
 4124|    687|  struct patricia_uv16_list *item = (struct patricia_uv16_list *)data;
 4125|       |
 4126|  13.7k|  while(item != NULL) {
  ------------------
  |  Branch (4126:9): [True: 13.0k, False: 687]
  ------------------
 4127|  13.0k|    struct patricia_uv16_list *next = item->next;
 4128|       |
 4129|  13.0k|    ndpi_free(item);
 4130|  13.0k|    item = next;
 4131|  13.0k|  }
 4132|    687|}
ndpi_main.c:ndpi_domain_level:
  855|  27.7k|static u_int8_t ndpi_domain_level(const char *name) {
  856|  27.7k|  u_int8_t level = 1, state = 0;
  857|  27.7k|  char c;
  858|   461k|  while((c = *name++) != '\0') {
  ------------------
  |  Branch (858:9): [True: 435k, False: 26.2k]
  ------------------
  859|   435k|    c = c == '-' ? 2 : (c == '.' ? 1:0);
  ------------------
  |  Branch (859:9): [True: 5.50k, False: 429k]
  |  Branch (859:25): [True: 17.8k, False: 411k]
  ------------------
  860|   435k|    level += ndpi_domain_level_automat[state][3];
  861|   435k|    state  = ndpi_domain_level_automat[state][(u_int8_t)c];
  862|   435k|    if(!state) break;
  ------------------
  |  Branch (862:8): [True: 1.55k, False: 433k]
  ------------------
  863|   435k|  }
  864|  27.7k|  return state >= 2 ? level:0;
  ------------------
  |  Branch (864:10): [True: 22.9k, False: 4.86k]
  ------------------
  865|  27.7k|}
ndpi_main.c:ndpi_add_host_ip_subprotocol:
 3740|  29.4k|					u_int8_t is_ipv6) {
 3741|  29.4k|  ndpi_patricia_node_t *node;
 3742|  29.4k|  struct in_addr pin;
 3743|  29.4k|  struct in6_addr pin6;
 3744|  29.4k|  int bits = 32;
 3745|  29.4k|  char *ptr = strrchr(value, '/');
 3746|  29.4k|  u_int16_t port = 0; /* Format ip:8.248.73.247 */
 3747|       |                      /* Format ipv6:[fe80::76ac:b9ff:fe6c:c124]/64 */
 3748|  29.4k|  char *double_column = NULL;
 3749|  29.4k|  bool value_ready = false;
 3750|  29.4k|  struct addrinfo hints, *result, *rp;
 3751|       |
 3752|  29.4k|  if(value[0] == '[') {
  ------------------
  |  Branch (3752:6): [True: 8.19k, False: 21.2k]
  ------------------
 3753|  8.19k|    is_ipv6 = 1;
 3754|  8.19k|    bits = 128;
 3755|  8.19k|    value += 1;
 3756|  8.19k|  }
 3757|       |
 3758|  29.4k|  if(ptr) {
  ------------------
  |  Branch (3758:6): [True: 5.71k, False: 23.7k]
  ------------------
 3759|  5.71k|    ptr[0] = '\0';
 3760|  5.71k|    ptr++;
 3761|       |
 3762|  5.71k|    if((double_column = strrchr(ptr, ':')) != NULL) {
  ------------------
  |  Branch (3762:8): [True: 683, False: 5.03k]
  ------------------
 3763|    683|      double_column[0] = '\0';
 3764|    683|      port = atoi(&double_column[1]);
 3765|    683|    }
 3766|       |
 3767|  5.71k|    if(!is_ipv6) {
  ------------------
  |  Branch (3767:8): [True: 3.20k, False: 2.50k]
  ------------------
 3768|  3.20k|      if(atoi(ptr) >= 0 && atoi(ptr) <= 32)
  ------------------
  |  Branch (3768:10): [True: 2.75k, False: 452]
  |  Branch (3768:28): [True: 2.37k, False: 379]
  ------------------
 3769|  2.37k|        bits = atoi(ptr);
 3770|  3.20k|    } else {
 3771|  2.50k|      if(atoi(ptr) >= 0 && atoi(ptr) <= 128)
  ------------------
  |  Branch (3771:10): [True: 2.12k, False: 383]
  |  Branch (3771:28): [True: 1.75k, False: 373]
  ------------------
 3772|  1.75k|        bits = atoi(ptr);
 3773|       |
 3774|  2.50k|      ptr = strrchr(value, ']');
 3775|  2.50k|      if(ptr)
  ------------------
  |  Branch (3775:10): [True: 796, False: 1.71k]
  ------------------
 3776|    796|        *ptr = '\0';
 3777|  2.50k|    }
 3778|  23.7k|  } else {
 3779|       |    /*
 3780|       |      Let's check if there is the port defined
 3781|       |
 3782|       |      Example: ip:8.248.73.247:443@AmazonPrime
 3783|       |      Example: ipv6:[fe80::76ac:b9ff:fe6c:c124]:36818@CustomProtocolF
 3784|       |    */
 3785|  23.7k|    if(!is_ipv6) {
  ------------------
  |  Branch (3785:8): [True: 17.4k, False: 6.30k]
  ------------------
 3786|  17.4k|      double_column = strrchr(value, ':');
 3787|  17.4k|    } else {
 3788|  6.30k|      ptr = strrchr(value, ']');
 3789|  6.30k|      if(ptr) {
  ------------------
  |  Branch (3789:10): [True: 326, False: 5.98k]
  ------------------
 3790|    326|        double_column = strrchr(ptr, ':');
 3791|    326|        *ptr = '\0';
 3792|    326|      }
 3793|  6.30k|    }
 3794|       |
 3795|  23.7k|    if(double_column) {
  ------------------
  |  Branch (3795:8): [True: 1.70k, False: 22.0k]
  ------------------
 3796|  1.70k|      double_column[0] = '\0';
 3797|  1.70k|      port = atoi(&double_column[1]);
 3798|  1.70k|    }
 3799|  23.7k|  }
 3800|       |
 3801|  29.4k|  memset(&hints, 0, sizeof(struct addrinfo));
 3802|  29.4k|  hints.ai_family = AF_UNSPEC;
 3803|  29.4k|  hints.ai_socktype = SOCK_STREAM;
 3804|  29.4k|  hints.ai_flags = AI_CANONNAME;
 3805|       |
 3806|  29.4k|  if(!is_ipv6 && ndpi_str->protocols) {
  ------------------
  |  Branch (3806:6): [True: 20.6k, False: 8.81k]
  |  Branch (3806:18): [True: 20.6k, False: 0]
  ------------------
 3807|       |    /* Check if the IP address is symbolic or numeric */
 3808|  20.6k|    unsigned int d[4];
 3809|  20.6k|    char tail[16] = { '\0' };
 3810|  20.6k|    int c = sscanf(value, "%3u.%3u.%3u.%3u%15s",
 3811|  20.6k|		   &d[0], &d[1], &d[2], &d[3], tail);
 3812|       |
 3813|  20.6k|    if ((c != 4) || tail[0]) {
  ------------------
  |  Branch (3813:9): [True: 19.0k, False: 1.55k]
  |  Branch (3813:21): [True: 0, False: 1.55k]
  ------------------
 3814|       |      /* This might be a symbolic IPv4 address */
 3815|       |
 3816|  19.0k|      if(getaddrinfo(value, NULL, &hints, &result) != 0)
  ------------------
  |  Branch (3816:10): [True: 3.90k, False: 15.1k]
  ------------------
 3817|  3.90k|	return(-1);
 3818|       |
 3819|  15.4k|      for(rp = result; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (3819:24): [True: 15.1k, False: 352]
  ------------------
 3820|  15.1k|	if(rp->ai_family == AF_INET) {
  ------------------
  |  Branch (3820:5): [True: 14.7k, False: 352]
  ------------------
 3821|  14.7k|	  struct sockaddr_in *addr = (struct sockaddr_in *)rp->ai_addr;
 3822|       |
 3823|  14.7k|	  memcpy(&pin, &(addr->sin_addr), sizeof(struct in_addr));
 3824|  14.7k|	  value_ready = true;
 3825|  14.7k|          bits = 32;
 3826|  14.7k|	  break;
 3827|  14.7k|	}
 3828|  15.1k|      }
 3829|       |
 3830|  15.1k|      freeaddrinfo(result);
 3831|  15.1k|    }
 3832|       |
 3833|  16.7k|    if(!value_ready) {
  ------------------
  |  Branch (3833:8): [True: 1.91k, False: 14.7k]
  ------------------
 3834|  1.91k|      if(inet_pton(AF_INET, value, &pin) != 1)
  ------------------
  |  Branch (3834:10): [True: 394, False: 1.51k]
  ------------------
 3835|    394|	return(-1);
 3836|  1.91k|    }
 3837|       |
 3838|  16.3k|    node = add_to_ptree(ndpi_str->protocols->v4, AF_INET, &pin, bits);
 3839|  16.3k|  } else if(is_ipv6 && ndpi_str->protocols) {
  ------------------
  |  Branch (3839:13): [True: 8.81k, False: 0]
  |  Branch (3839:24): [True: 8.81k, False: 0]
  ------------------
 3840|  8.81k|    if(strchr(value, ':') == NULL) {
  ------------------
  |  Branch (3840:8): [True: 5.06k, False: 3.75k]
  ------------------
 3841|       |      /* This might be a symbolic IPv6 address */
 3842|       |
 3843|  5.06k|      if(getaddrinfo(value, NULL, &hints, &result) != 0)
  ------------------
  |  Branch (3843:10): [True: 1.20k, False: 3.85k]
  ------------------
 3844|  1.20k|	return(-1);
 3845|       |
 3846|  7.71k|      for(rp = result; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (3846:24): [True: 3.85k, False: 3.85k]
  ------------------
 3847|  3.85k|	if(rp->ai_family == AF_INET6) {
  ------------------
  |  Branch (3847:5): [True: 0, False: 3.85k]
  ------------------
 3848|      0|	  struct sockaddr_in6 *addr = (struct sockaddr_in6 *)rp->ai_addr;
 3849|       |
 3850|      0|	  memcpy(&pin6, &(addr->sin6_addr), sizeof(struct in6_addr));
 3851|      0|	  value_ready = true;
 3852|      0|          bits = 128;
 3853|      0|	  break;
 3854|      0|	}
 3855|  3.85k|      }
 3856|       |
 3857|  3.85k|      freeaddrinfo(result);
 3858|  3.85k|    }
 3859|       |
 3860|  7.60k|    if(!value_ready) {
  ------------------
  |  Branch (3860:8): [True: 7.60k, False: 0]
  ------------------
 3861|  7.60k|      if(inet_pton(AF_INET6, value, &pin6) != 1)
  ------------------
  |  Branch (3861:10): [True: 4.61k, False: 2.99k]
  ------------------
 3862|  4.61k|	return(-1);
 3863|  7.60k|    }
 3864|       |
 3865|  2.99k|    node = add_to_ptree(ndpi_str->protocols->v6, AF_INET6, &pin6, bits);
 3866|  2.99k|  } else {
 3867|      0|    return(-1);
 3868|      0|  }
 3869|       |
 3870|  19.3k|  if(node != NULL) {
  ------------------
  |  Branch (3870:6): [True: 18.6k, False: 649]
  ------------------
 3871|  18.6k|    int i;
 3872|  18.6k|    struct patricia_uv16_list *item;
 3873|       |
 3874|  47.8k|    for(i=0; i<UV16_MAX_USER_VALUES; i++) {
  ------------------
  |  |   71|  47.8k|#define UV16_MAX_USER_VALUES  2
  ------------------
  |  Branch (3874:14): [True: 33.8k, False: 14.0k]
  ------------------
 3875|  33.8k|      if(node->value.u.uv16[i].user_value == 0) {
  ------------------
  |  Branch (3875:10): [True: 4.65k, False: 29.2k]
  ------------------
 3876|  4.65k|	node->value.u.uv16[i].user_value = protocol_id, node->value.u.uv16[i].additional_user_value = htons(port);
 3877|  4.65k|	return(0);
 3878|  4.65k|      }
 3879|  33.8k|    } /* for */
 3880|       |
 3881|       |    /*
 3882|       |      If we're here it means that we don't have
 3883|       |      enough room for our custom value
 3884|       |    */
 3885|  14.0k|    item = (struct patricia_uv16_list*)ndpi_malloc(sizeof(struct patricia_uv16_list));
 3886|       |
 3887|  14.0k|    if(item != NULL) {
  ------------------
  |  Branch (3887:8): [True: 13.0k, False: 949]
  ------------------
 3888|  13.0k|      item->value.user_value = protocol_id,
 3889|  13.0k|	item->value.additional_user_value = htons(port),
 3890|  13.0k|	item->next = (struct patricia_uv16_list*)node->data;
 3891|       |
 3892|  13.0k|      node->data = item;
 3893|       |
 3894|  13.0k|      return(0);
 3895|  13.0k|    }
 3896|       |
 3897|    949|    return(-1); /* All slots are full */
 3898|  14.0k|  }
 3899|       |
 3900|    649|  return(0);
 3901|  19.3k|}
ndpi_main.c:ndpi_handle_rule:
 5594|  2.01M|		            char *rule) {
 5595|  2.01M|  char *at, *proto, *elem, *equal, *first_comma;
 5596|  2.01M|  ndpi_proto_defaults_t *def;
 5597|  2.01M|  u_int subprotocol_id, i;
 5598|  2.01M|  int ret = 0;
 5599|  2.01M|  char *additional_params = NULL;
 5600|  2.01M|  uint16_t user_proto_id = 0;
 5601|  2.01M|  ndpi_protocol_category_t category = NDPI_PROTOCOL_CATEGORY_UNSPECIFIED;
 5602|  2.01M|  ndpi_protocol_breed_t breed = NDPI_PROTOCOL_ACCEPTABLE;
 5603|       |
 5604|  2.01M|  at = strrchr(rule, '@');
 5605|  2.01M|  if(at == NULL) {
  ------------------
  |  Branch (5605:6): [True: 80.4k, False: 1.93M]
  ------------------
 5606|       |    /* This looks like a mask rule or an invalid rule */
 5607|  80.4k|    char _rule[256], *rule_type, *key;
 5608|       |
 5609|  80.4k|    ndpi_snprintf(_rule, sizeof(_rule), "%s", rule);
 5610|  80.4k|    rule_type = strtok(rule, ":");
 5611|       |
 5612|  80.4k|    if(!rule_type) {
  ------------------
  |  Branch (5612:8): [True: 1.78k, False: 78.6k]
  ------------------
 5613|  1.78k|      NDPI_LOG_ERR(ndpi_str, "Invalid rule '%s'\n", rule);
  ------------------
  |  |  593|  1.78k|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5614|  1.78k|      return(-1);
 5615|  1.78k|    }
 5616|       |
 5617|  78.6k|    if(!strcmp(rule_type, "trusted_issuer_dn"))
  ------------------
  |  Branch (5617:8): [True: 8.44k, False: 70.1k]
  ------------------
 5618|  8.44k|      return(ndpi_add_trusted_issuer_dn(ndpi_str, strtok(NULL, ":")));
 5619|       |
 5620|  70.1k|    key = strtok(NULL, "=");
 5621|  70.1k|    if(key) {
  ------------------
  |  Branch (5621:8): [True: 42.7k, False: 27.3k]
  ------------------
 5622|  42.7k|      char *value = strtok(NULL, "=");
 5623|       |
 5624|  42.7k|      if(value) {
  ------------------
  |  Branch (5624:10): [True: 28.0k, False: 14.6k]
  ------------------
 5625|  28.0k|	ndpi_risk risk_mask = (ndpi_risk)atoll(value);
 5626|       |
 5627|  28.0k|	if(!strcmp(rule_type, "ip_risk_mask") ||
  ------------------
  |  Branch (5627:5): [True: 9.89k, False: 18.2k]
  ------------------
 5628|  18.2k|	   !strcmp(rule_type, "ipv6_risk_mask")) {
  ------------------
  |  Branch (5628:5): [True: 835, False: 17.3k]
  ------------------
 5629|  10.7k|	  return(ndpi_add_ip_risk_mask(ndpi_str, key, risk_mask));
 5630|  17.3k|	} else if(!strcmp(rule_type, "host_risk_mask")) {
  ------------------
  |  Branch (5630:12): [True: 8.84k, False: 8.51k]
  ------------------
 5631|  8.84k|	  return(ndpi_add_host_risk_mask(ndpi_str, key, risk_mask));
 5632|  8.84k|	}
 5633|  28.0k|      }
 5634|  42.7k|    }
 5635|       |
 5636|  50.6k|    NDPI_LOG_ERR(ndpi_str, "Unknown rule '%s'\n", rule);
  ------------------
  |  |  593|  50.6k|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5637|  50.6k|    return(-1);
 5638|  70.1k|  } else
 5639|  1.93M|    at[0] = 0, proto = &at[1];
 5640|       |
 5641|  2.74M|  for(i = 0; proto[i] != '\0'; i++) {
  ------------------
  |  Branch (5641:14): [True: 803k, False: 1.93M]
  ------------------
 5642|   803k|    switch(proto[i]) {
  ------------------
  |  Branch (5642:12): [True: 96.7k, False: 706k]
  ------------------
 5643|  2.73k|    case '/':
  ------------------
  |  Branch (5643:5): [True: 2.73k, False: 800k]
  ------------------
 5644|  4.83k|    case '&':
  ------------------
  |  Branch (5644:5): [True: 2.10k, False: 801k]
  ------------------
 5645|  75.6k|    case '^':
  ------------------
  |  Branch (5645:5): [True: 70.8k, False: 732k]
  ------------------
 5646|  89.0k|    case ':':
  ------------------
  |  Branch (5646:5): [True: 13.3k, False: 789k]
  ------------------
 5647|  89.4k|    case ';':
  ------------------
  |  Branch (5647:5): [True: 410, False: 802k]
  ------------------
 5648|  90.8k|    case '\'':
  ------------------
  |  Branch (5648:5): [True: 1.45k, False: 801k]
  ------------------
 5649|  94.6k|    case '"':
  ------------------
  |  Branch (5649:5): [True: 3.76k, False: 799k]
  ------------------
 5650|  96.7k|    case ' ':
  ------------------
  |  Branch (5650:5): [True: 2.14k, False: 801k]
  ------------------
 5651|  96.7k|      proto[i] = '_';
 5652|  96.7k|      break;
 5653|   803k|    }
 5654|   803k|  }
 5655|       |
 5656|       |  /* Parsing: protoname=proto_id,cat=cat_id,breed=breed_id */
 5657|       |
 5658|  1.93M|  first_comma = strchr(proto, ',');
 5659|  1.93M|  if(first_comma != NULL) {
  ------------------
  |  Branch (5659:6): [True: 4.58k, False: 1.93M]
  ------------------
 5660|  4.58k|    first_comma[0] = '\0';
 5661|  4.58k|    additional_params = &first_comma[1];
 5662|  4.58k|  }
 5663|  1.93M|  equal = strchr(proto, '=');
 5664|  1.93M|  if(equal != NULL) {
  ------------------
  |  Branch (5664:6): [True: 7.85k, False: 1.93M]
  ------------------
 5665|  7.85k|    equal[0] = '\0';
 5666|  7.85k|    char *id_part = &equal[1];
 5667|       |
 5668|  7.85k|    const char *errstrp;
 5669|  7.85k|    user_proto_id = ndpi_strtonum(id_part, ndpi_str->num_supported_protocols, 65535, &errstrp, 10);
 5670|  7.85k|    if(errstrp != NULL) {
  ------------------
  |  Branch (5670:8): [True: 5.18k, False: 2.67k]
  ------------------
 5671|  5.18k|      NDPI_LOG_ERR(ndpi_str, "Invalid protocol ID '%s': %s\n", id_part, errstrp);
  ------------------
  |  |  593|  5.18k|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5672|  5.18k|      return(-1);
 5673|  5.18k|    }
 5674|  7.85k|  }
 5675|       |  /* Category and breed */
 5676|  1.93M|  if(additional_params != NULL) {
  ------------------
  |  Branch (5676:6): [True: 4.44k, False: 1.92M]
  ------------------
 5677|  4.44k|    char *param = NULL;
 5678|  4.44k|    char *params_copy = additional_params;
 5679|       |
 5680|  47.5k|    while((param = strsep(&params_copy, ",")) != NULL) {
  ------------------
  |  Branch (5680:11): [True: 43.1k, False: 4.44k]
  ------------------
 5681|  43.1k|      if(strncmp(param, "cat=", 4) == 0) {
  ------------------
  |  Branch (5681:10): [True: 1.56k, False: 41.5k]
  ------------------
 5682|  1.56k|        char *cat_value = &param[4];
 5683|  1.56k|        const char *errstrp;
 5684|       |
 5685|  1.56k|        int cat_id = ndpi_strtonum(cat_value, 1, NDPI_PROTOCOL_NUM_CATEGORIES-1, &errstrp, 10);
 5686|  1.56k|        if(errstrp == NULL) {
  ------------------
  |  Branch (5686:12): [True: 516, False: 1.05k]
  ------------------
 5687|    516|          category = (ndpi_protocol_category_t)cat_id;
 5688|  1.05k|        } else {
 5689|  1.05k|          NDPI_LOG_ERR(ndpi_str, "Invalid category ID '%s': %s\n", cat_value, errstrp);
  ------------------
  |  |  593|  1.05k|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5690|  1.05k|        }
 5691|  41.5k|      } else if (strncmp(param, "breed=", 6) == 0) {
  ------------------
  |  Branch (5691:18): [True: 762, False: 40.8k]
  ------------------
 5692|    762|        char *breed_value = &param[6];
 5693|    762|        const char *errstrp;
 5694|       |
 5695|    762|        int breed_id = ndpi_strtonum(breed_value, 0, NDPI_NUM_BREEDS-1, &errstrp, 10);
  ------------------
  |  | 1129|    762|#define NDPI_NUM_BREEDS (NDPI_PROTOCOL_TRACKER_ADS+1)
  ------------------
 5696|    762|        if(errstrp == NULL) {
  ------------------
  |  Branch (5696:12): [True: 512, False: 250]
  ------------------
 5697|    512|          breed = (ndpi_protocol_breed_t)breed_id;
 5698|    512|        } else {
 5699|    250|          NDPI_LOG_ERR(ndpi_str, "Invalid breed ID '%s': %s\n", breed_value, errstrp);
  ------------------
  |  |  593|    250|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5700|    250|        }
 5701|    762|      }
 5702|  43.1k|    }
 5703|  4.44k|  }
 5704|  1.93M|  NDPI_LOG_DBG(ndpi_str, "Protocol [%s] user_id %d, cat %d, breed %d\n", proto, user_proto_id, category, breed);
  ------------------
  |  |  596|  1.93M|# define NDPI_LOG_DBG(mod,  args...) { (void)mod; /* printf(args); */ }
  ------------------
 5705|       |
 5706|       |  /* All parameters have been extracted */
 5707|       |
 5708|       |  /* Is it a new protocol? */
 5709|  1.93M|  subprotocol_id = ndpi_get_proto_by_name(ndpi_str, proto);
 5710|       |
 5711|  1.93M|  if(subprotocol_id == NDPI_PROTOCOL_UNKNOWN) {
  ------------------
  |  Branch (5711:6): [True: 1.82M, False: 108k]
  ------------------
 5712|  1.82M|    def = NULL;
 5713|  1.82M|  } else {
 5714|       |    /* Custom category and breed always win over default ones.
 5715|       |       We can also have multiple rules, with the same custom protocol and
 5716|       |       different category/breed */
 5717|   108k|    if(category == NDPI_PROTOCOL_CATEGORY_UNSPECIFIED)
  ------------------
  |  Branch (5717:8): [True: 108k, False: 256]
  ------------------
 5718|   108k|      category = ndpi_str->proto_defaults[subprotocol_id].protoCategory;
 5719|   108k|    if(breed == NDPI_PROTOCOL_ACCEPTABLE)
  ------------------
  |  Branch (5719:8): [True: 108k, False: 302]
  ------------------
 5720|   108k|      breed = ndpi_str->proto_defaults[subprotocol_id].protoBreed;
 5721|       |
 5722|   108k|    def = &ndpi_str->proto_defaults[subprotocol_id];
 5723|       |
 5724|       |    /* We can't have internals protocols with custom id because the data structures
 5725|       |       used for id<->user_id mapping work only with custom protocols... */
 5726|   108k|  }
 5727|       |
 5728|  1.93M|  if(def == NULL) {
  ------------------
  |  Branch (5728:6): [True: 1.82M, False: 108k]
  ------------------
 5729|  1.82M|    ndpi_port_range ports_a[MAX_DEFAULT_PORTS], ports_b[MAX_DEFAULT_PORTS];
 5730|  1.82M|    u_int16_t proto_id;
 5731|       |
 5732|       |    /* The hard limit on protocols number depends on protocol ids being u_int16_t */
 5733|  1.82M|    if(ndpi_str->num_supported_protocols >= 65535) {
  ------------------
  |  Branch (5733:8): [True: 262, False: 1.82M]
  ------------------
 5734|    262|      NDPI_LOG_ERR(ndpi_str, "Too many protocols defined (%u): skipping protocol\n",
  ------------------
  |  |  593|    262|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5735|    262|                   ndpi_str->num_custom_protocols);
 5736|    262|      return(-2);
 5737|    262|    }
 5738|       |
 5739|  1.82M|    proto_id = ndpi_str->num_supported_protocols; /* First free id */
 5740|  1.82M|    if(user_proto_id == 0)
  ------------------
  |  Branch (5740:8): [True: 1.82M, False: 2.64k]
  ------------------
 5741|  1.82M|      user_proto_id = proto_id; /* By default, external id is equal to the internal one */
 5742|       |
 5743|  1.82M|    ndpi_add_user_proto_id_mapping(ndpi_str, proto_id, user_proto_id);
 5744|       |
 5745|  1.82M|    ret = ndpi_set_proto_defaults(ndpi_str, 1 /* is_cleartext */,
 5746|  1.82M|			          1 /* is_app_protocol */,
 5747|  1.82M|			          breed,
 5748|  1.82M|			          proto_id,
 5749|  1.82M|			          proto, /* protoName */
 5750|  1.82M|			          category,
 5751|  1.82M|			          NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
 5752|  1.82M|			          ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
 5753|  1.82M|			          ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */,
 5754|  1.82M|			          1 /* custom protocol */);
 5755|  1.82M|    if(ret != 0) {
  ------------------
  |  Branch (5755:8): [True: 65, False: 1.82M]
  ------------------
 5756|     65|      NDPI_LOG_ERR(ndpi_str, "Error ndpi_set_proto_defaults. Skip rule\n");
  ------------------
  |  |  593|     65|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 5757|     65|      return(-3);
 5758|     65|    }
 5759|       |
 5760|  1.82M|    def = &ndpi_str->proto_defaults[proto_id];
 5761|  1.82M|    subprotocol_id = proto_id;
 5762|  1.82M|  }
 5763|       |
 5764|  2.00M|  while((elem = strsep(&rule, ",")) != NULL) {
  ------------------
  |  Branch (5764:9): [True: 1.93M, False: 63.1k]
  ------------------
 5765|  1.93M|    char *attr = elem, *value = NULL;
 5766|  1.93M|    ndpi_port_range range;
 5767|  1.93M|    int is_tcp = 0, is_udp = 0, is_ip = 0, is_ja4 = 0, is_ndpifp = 0, is_httpurl = 0;;
 5768|  1.93M|    u_int8_t is_ipv6_ip = 0;
 5769|       |
 5770|  1.93M|    if(strncmp(attr, "tcp:", 4) == 0)
  ------------------
  |  Branch (5770:8): [True: 987, False: 1.93M]
  ------------------
 5771|    987|      is_tcp = 1, value = &attr[4];
 5772|  1.93M|    else if(strncmp(attr, "udp:", 4) == 0)
  ------------------
  |  Branch (5772:13): [True: 2.74k, False: 1.93M]
  ------------------
 5773|  2.74k|      is_udp = 1, value = &attr[4];
 5774|  1.93M|    else if(strncmp(attr, "ipv6:", 5) == 0)
  ------------------
  |  Branch (5774:13): [True: 1.54k, False: 1.93M]
  ------------------
 5775|  1.54k|      is_ip = 1, is_ipv6_ip = 1, value = &attr[5];
 5776|  1.93M|    else if(strncmp(attr, "ip:", 3) == 0)
  ------------------
  |  Branch (5776:13): [True: 27.8k, False: 1.90M]
  ------------------
 5777|  27.8k|      is_ip = 1, value = &attr[3];
 5778|  1.90M|    else if(strncmp(attr, "host:", 5) == 0) {
  ------------------
  |  Branch (5778:13): [True: 23.0k, False: 1.88M]
  ------------------
 5779|       |      /* host:"<value>",host:"<value>",.....@<subproto> */
 5780|  23.0k|      value = &attr[5];
 5781|  23.0k|      if(value[0] == '"')
  ------------------
  |  Branch (5781:10): [True: 2.70k, False: 20.3k]
  ------------------
 5782|  2.70k|	value++; /* remove leading " */
 5783|       |
 5784|  23.0k|      if(value[0] != '\0') {
  ------------------
  |  Branch (5784:10): [True: 22.5k, False: 488]
  ------------------
 5785|  22.5k|	u_int i, max_len = strlen(value) - 1;
 5786|       |
 5787|  22.5k|	if(value[max_len] == '"')
  ------------------
  |  Branch (5787:5): [True: 2.58k, False: 19.9k]
  ------------------
 5788|  2.58k|	  value[max_len] = '\0'; /* remove trailing " */
 5789|       |
 5790|   302k|	for(i=0; i<max_len; i++)
  ------------------
  |  Branch (5790:11): [True: 280k, False: 22.5k]
  ------------------
 5791|   280k|	  value[i] = tolower(value[i]);
  ------------------
  |  Branch (5791:15): [True: 0, False: 0]
  |  Branch (5791:15): [True: 0, False: 0]
  |  Branch (5791:15): [Folded, False: 280k]
  ------------------
 5792|  22.5k|      }
 5793|  1.88M|    } else if(strncmp(attr, "nbpf:", 5) == 0) {
  ------------------
  |  Branch (5793:15): [True: 297, False: 1.88M]
  ------------------
 5794|       |#ifdef HAVE_NBPF
 5795|       |      char *filter = &attr[5];
 5796|       |
 5797|       |      if(ndpi_str->num_nbpf_custom_proto >= MAX_NBPF_CUSTOM_PROTO) {
 5798|       |	NDPI_LOG_ERR(ndpi_str, "nBPF: too many protocols\n");
 5799|       |	return(-4); /* Too many protocols */
 5800|       |      }
 5801|       |
 5802|       |      if(filter[0] == '"') {
 5803|       |	u_int len;
 5804|       |
 5805|       |	filter = &filter[1];
 5806|       |	len = strlen(filter);
 5807|       |
 5808|       |	if(len > 0)
 5809|       |	  filter[len-1] = '\0';
 5810|       |      }
 5811|       |
 5812|       |      if((ndpi_str->nbpf_custom_proto[ndpi_str->num_nbpf_custom_proto].tree =
 5813|       |	  nbpf_parse(filter, NULL)) == NULL) {
 5814|       |	NDPI_LOG_ERR(ndpi_str, "nBPF invalid filter: %s\n", filter)
 5815|       |	  return(-5); /* Invalid filter */
 5816|       |      } else
 5817|       |	ndpi_str->nbpf_custom_proto[ndpi_str->num_nbpf_custom_proto].l7_protocol = subprotocol_id;
 5818|       |
 5819|       |      ndpi_str->num_nbpf_custom_proto++;
 5820|       |#else
 5821|    297|      NDPI_LOG_INFO(ndpi_str, "nDPI compiled without nBPF support: skipping rule\n");
  ------------------
  |  |  595|    297|# define NDPI_LOG_INFO(mod, args...) { (void)mod; /* printf(args); */ }
  ------------------
 5822|    297|      return(-6);
 5823|    297|#endif
 5824|  1.88M|    } else if(strncmp(attr, "ja4:", 4) == 0) {
  ------------------
  |  Branch (5824:15): [True: 1.62k, False: 1.88M]
  ------------------
 5825|  1.62k|      is_ja4 = 1, value = &attr[4];
 5826|  1.88M|    } else if(strncmp(attr, "ndpifp:", 7) == 0) {
  ------------------
  |  Branch (5826:15): [True: 965, False: 1.88M]
  ------------------
 5827|    965|      is_ndpifp = 1, value = &attr[7];
 5828|  1.88M|    } else if(strncmp(attr, "url:", 4) == 0) {
  ------------------
  |  Branch (5828:15): [True: 63.6k, False: 1.81M]
  ------------------
 5829|  63.6k|      is_httpurl = 1, value = &attr[4];
 5830|  63.6k|    }
 5831|       |
 5832|  1.93M|    if(is_tcp || is_udp) {
  ------------------
  |  Branch (5832:8): [True: 987, False: 1.93M]
  |  Branch (5832:18): [True: 2.74k, False: 1.93M]
  ------------------
 5833|  3.73k|      u_int p_low, p_high;
 5834|  3.73k|      int j;
 5835|       |
 5836|  3.73k|      if(sscanf(value, "%u-%u", &p_low, &p_high) == 2)
  ------------------
  |  Branch (5836:10): [True: 298, False: 3.43k]
  ------------------
 5837|    298|	range.port_low = p_low, range.port_high = p_high;
 5838|  3.43k|      else
 5839|  3.43k|	range.port_low = range.port_high = atoi(&elem[4]);
 5840|  3.73k|      range.is_custom = 1;
 5841|       |
 5842|       |      /* Even if this is not a real default port (it is a custom rule matching a port),
 5843|       |         we save the information into def->*_default_ports[] and it will be loaded into
 5844|       |         the tree during `ndpi_finalize_initialization()`.
 5845|       |       */
 5846|  3.73k|      if(is_tcp) {
  ------------------
  |  Branch (5846:10): [True: 987, False: 2.74k]
  ------------------
 5847|  3.50k|        for(j = 0; j < MAX_DEFAULT_PORTS; j++) {
  ------------------
  |  |   89|  3.50k|#define MAX_DEFAULT_PORTS                                        5
  ------------------
  |  Branch (5847:20): [True: 3.13k, False: 371]
  ------------------
 5848|  3.13k|          if(def->tcp_default_ports[j].port_low == 0) {
  ------------------
  |  Branch (5848:14): [True: 616, False: 2.51k]
  ------------------
 5849|    616|            def->tcp_default_ports[j] = range;
 5850|    616|            break;
 5851|    616|          }
 5852|  3.13k|        }
 5853|  2.74k|      } else {
 5854|  7.06k|        for(j = 0; j < MAX_DEFAULT_PORTS; j++) {
  ------------------
  |  |   89|  7.06k|#define MAX_DEFAULT_PORTS                                        5
  ------------------
  |  Branch (5854:20): [True: 6.66k, False: 406]
  ------------------
 5855|  6.66k|          if(def->udp_default_ports[j].port_low == 0) {
  ------------------
  |  Branch (5855:14): [True: 2.34k, False: 4.32k]
  ------------------
 5856|  2.34k|            def->udp_default_ports[j] = range;
 5857|  2.34k|            break;
 5858|  2.34k|          }
 5859|  6.66k|        }
 5860|  2.74k|      }
 5861|  1.93M|    } else if(is_ip) {
  ------------------
  |  Branch (5861:15): [True: 29.4k, False: 1.90M]
  ------------------
 5862|  29.4k|      int rc = ndpi_add_host_ip_subprotocol(ndpi_str, value, subprotocol_id, is_ipv6_ip);
 5863|       |
 5864|  29.4k|      if(rc != 0)
  ------------------
  |  Branch (5864:10): [True: 11.0k, False: 18.3k]
  ------------------
 5865|  11.0k|	return(rc);
 5866|  1.90M|    } else if(is_ja4) {
  ------------------
  |  Branch (5866:15): [True: 1.62k, False: 1.90M]
  ------------------
 5867|  1.62k|      int rc = ndpi_add_ja4_subprotocol(ndpi_str, value, subprotocol_id);
 5868|       |
 5869|  1.62k|      if(rc != 0)
  ------------------
  |  Branch (5869:10): [True: 1.11k, False: 513]
  ------------------
 5870|  1.11k|	return(rc);
 5871|  1.90M|    } else if(is_ndpifp) {
  ------------------
  |  Branch (5871:15): [True: 965, False: 1.90M]
  ------------------
 5872|    965|      int rc = ndpi_add_ndpifp_subprotocol(ndpi_str, value, subprotocol_id);
 5873|       |
 5874|    965|      if(rc != 0)
  ------------------
  |  Branch (5874:10): [True: 799, False: 166]
  ------------------
 5875|    799|	return(rc);
 5876|  1.90M|    } else if(is_httpurl) {
  ------------------
  |  Branch (5876:15): [True: 63.6k, False: 1.83M]
  ------------------
 5877|  63.6k|      int rc = ndpi_add_http_url_subprotocol(ndpi_str, value, subprotocol_id, category, breed);
 5878|       |
 5879|  63.6k|      if(rc != 0)
  ------------------
  |  Branch (5879:10): [True: 32.2k, False: 31.4k]
  ------------------
 5880|  32.2k|	return(rc);
 5881|  1.83M|    } else {
 5882|  1.83M|      int rc = ndpi_add_host_url_subprotocol(ndpi_str, value, subprotocol_id, category, breed, 0);
 5883|       |
 5884|  1.83M|      if(rc != 0)
  ------------------
  |  Branch (5884:10): [True: 1.82M, False: 16.2k]
  ------------------
 5885|  1.82M|	return(rc);
 5886|  1.83M|    }
 5887|  1.93M|  }
 5888|       |
 5889|  63.1k|  return(ret);
 5890|  1.93M|}
ndpi_main.c:ndpi_add_ja4_subprotocol:
 3625|  1.62k|				    char *ja4, u_int16_t protocol_id) {
 3626|  1.62k|  const u_int ja4_str_len = 36;  /* size of JA4C */
 3627|  1.62k|  u_int ja4_len = strlen(ja4);
 3628|  1.62k|  struct ndpi_tls_block *blocks = NULL;
 3629|  1.62k|  u_int8_t num_tls_blocks;
 3630|       |
 3631|  1.62k|  if(ja4_len == ja4_str_len) {
  ------------------
  |  Branch (3631:6): [True: 839, False: 785]
  ------------------
 3632|       |    /* JA4 */
 3633|    839|    ja4_len = ja4_str_len;
 3634|    839|  } else if(ja4_len > ja4_str_len) {
  ------------------
  |  Branch (3634:13): [True: 290, False: 495]
  ------------------
 3635|       |    /* JA4 with blocks */
 3636|    290|    if(ndpi_str->cfg.tls_max_num_blocks_to_analyze > 0) {
  ------------------
  |  Branch (3636:8): [True: 0, False: 290]
  ------------------
 3637|      0|      blocks = ndpi_decode_tls_blocks((const u_char*)&ja4[ja4_str_len+1 /* Skip divider */],
 3638|      0|				      ja4_len - ja4_str_len - 1, &num_tls_blocks);
 3639|       |
 3640|      0|      if(blocks != NULL) {
  ------------------
  |  Branch (3640:10): [True: 0, False: 0]
  ------------------
 3641|      0|	if(num_tls_blocks < ndpi_str->cfg.tls_max_num_blocks_to_analyze) {
  ------------------
  |  Branch (3641:5): [True: 0, False: 0]
  ------------------
 3642|       |	  /* Invalid blocks lenght (too short): discarding it */
 3643|      0|	  ndpi_free(blocks);
 3644|      0|	  blocks = NULL;
 3645|      0|	} else {
 3646|       |	  /* We jeopardize the msec_delta field to store the protocol_id (*%*) */
 3647|      0|	  blocks[0].msec_delta = protocol_id;
 3648|      0|	}
 3649|      0|      }
 3650|    290|    } else {
 3651|    290|      NDPI_LOG_ERR(ndpi_str, "JA4C with TLS blocks when TLS blocks are disabled [%s]\n", ja4);
  ------------------
  |  |  593|    290|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 3652|    290|      return(-1);
 3653|    290|    }
 3654|       |
 3655|      0|    ja4_len = ja4_str_len;
 3656|    495|  } else {
 3657|    495|    NDPI_LOG_ERR(ndpi_str, "Not a JA4C: [%s]\n", ja4);
  ------------------
  |  |  593|    495|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 3658|    495|    return(-2);
 3659|    495|  }
 3660|       |
 3661|    839|  if(ndpi_str->ja4_custom_protos == NULL) {
  ------------------
  |  Branch (3661:6): [True: 62, False: 777]
  ------------------
 3662|     62|    if(ndpi_hash_init(&ndpi_str->ja4_custom_protos) != 0)
  ------------------
  |  Branch (3662:8): [True: 11, False: 51]
  ------------------
 3663|     11|      return(-3);
 3664|     62|  }
 3665|       |
 3666|    828|  return(ndpi_hash_add_entry(&ndpi_str->ja4_custom_protos,
 3667|    828|			     ja4, ja4_len, protocol_id, (void*)blocks));
 3668|    839|}
ndpi_main.c:ndpi_add_ndpifp_subprotocol:
 3673|    965|				       char *ndpifp, u_int16_t protocol_id) {
 3674|    965|  const u_int ndpifp_str_len = 32;  /* size of ndpifp */
 3675|    965|  u_int ndpifp_len = strlen(ndpifp);
 3676|    965|  struct ndpi_tls_block *blocks = NULL;
 3677|    965|  u_int8_t num_tls_blocks;
 3678|       |
 3679|    965|  if(ndpifp_len == ndpifp_str_len) {
  ------------------
  |  Branch (3679:6): [True: 354, False: 611]
  ------------------
 3680|       |    /* ndpifp */
 3681|    354|    ndpifp_len = ndpifp_str_len;
 3682|    611|  } else if(ndpifp_len > ndpifp_str_len) {
  ------------------
  |  Branch (3682:13): [True: 265, False: 346]
  ------------------
 3683|       |    /* ndpifp with blocks */
 3684|    265|    if(ndpi_str->cfg.tls_max_num_blocks_to_analyze > 0) {
  ------------------
  |  Branch (3684:8): [True: 0, False: 265]
  ------------------
 3685|      0|      blocks = ndpi_decode_tls_blocks((const u_char*)&ndpifp[ndpifp_str_len+1 /* Skip divider */],
 3686|      0|				      ndpifp_len - ndpifp_str_len - 1, &num_tls_blocks);
 3687|       |
 3688|      0|      if(blocks != NULL) {
  ------------------
  |  Branch (3688:10): [True: 0, False: 0]
  ------------------
 3689|      0|	if(num_tls_blocks < ndpi_str->cfg.tls_max_num_blocks_to_analyze) {
  ------------------
  |  Branch (3689:5): [True: 0, False: 0]
  ------------------
 3690|       |	  /* Invalid blocks lenght (too short): discarding it */
 3691|      0|	  ndpi_free(blocks);
 3692|      0|	  blocks = NULL;
 3693|      0|	} else {
 3694|       |	  /* We jeopardize the msec_delta field to store the protocol_id (*%*) */
 3695|      0|	  blocks[0].msec_delta = protocol_id;
 3696|      0|	}
 3697|      0|      }
 3698|    265|    } else {
 3699|    265|      NDPI_LOG_ERR(ndpi_str, "ndpifp with TLS blocks when TLS blocks are disabled [%s]\n", ndpifp);
  ------------------
  |  |  593|    265|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 3700|    265|      return(-1);
 3701|    265|    }
 3702|       |
 3703|      0|    ndpifp_len = ndpifp_str_len;
 3704|    346|  } else {
 3705|    346|    NDPI_LOG_ERR(ndpi_str, "Not a ndpifp: [%s]\n", ndpifp);
  ------------------
  |  |  593|    346|#  define NDPI_LOG_ERR(mod, args...)  { (void)mod; /* printf(args); */ }
  ------------------
 3706|    346|    return(-2);
 3707|    346|  }
 3708|       |
 3709|    354|  if(ndpi_str->ndpifp_custom_protos == NULL) {
  ------------------
  |  Branch (3709:6): [True: 50, False: 304]
  ------------------
 3710|     50|    if(ndpi_hash_init(&ndpi_str->ndpifp_custom_protos) != 0)
  ------------------
  |  Branch (3710:8): [True: 11, False: 39]
  ------------------
 3711|     11|      return(-3);
 3712|     50|  }
 3713|       |
 3714|    343|  return(ndpi_hash_add_entry(&ndpi_str->ndpifp_custom_protos,
 3715|    343|			     ndpifp, ndpifp_len, protocol_id, (void*)blocks));
 3716|    354|}
ndpi_main.c:ndpi_add_http_url_subprotocol:
 3722|  63.6k|					 u_int16_t category, u_int16_t breed) {
 3723|  63.6k|  int url_len = strlen(url);
 3724|  63.6k|  u_int64_t id;
 3725|       |
 3726|  63.6k|  if(ndpi_str->http_url_hashmap == NULL) {
  ------------------
  |  Branch (3726:6): [True: 582, False: 63.0k]
  ------------------
 3727|    582|    if(ndpi_hash_init(&ndpi_str->http_url_hashmap) != 0)
  ------------------
  |  Branch (3727:8): [True: 26, False: 556]
  ------------------
 3728|     26|      return(-2);
 3729|    582|  }
 3730|       |
 3731|  63.6k|  id = (u_int64_t)(breed & 0xFFFF) << 32 | (category & 0xFFFF) << 16 | (protocol_id & 0xFFFF);
 3732|       |
 3733|       |  return(ndpi_hash_add_entry(&ndpi_str->http_url_hashmap, url, url_len, id, NULL));
 3734|  63.6k|}

ndpi_set_memory_alloction_functions:
   52|  3.57k|                                         void (*__ndpi_flow_free)(void *ptr)) {
   53|       |
   54|       |  /* We can't log here */
   55|       |
   56|  3.57k|  if(__ndpi_malloc && __ndpi_free &&
  ------------------
  |  Branch (56:6): [True: 3.57k, False: 0]
  |  Branch (56:23): [True: 3.57k, False: 0]
  ------------------
   57|  3.57k|     __ndpi_calloc && __ndpi_realloc) {
  ------------------
  |  Branch (57:6): [True: 3.57k, False: 0]
  |  Branch (57:23): [True: 3.57k, False: 0]
  ------------------
   58|  3.57k|    _ndpi_malloc = __ndpi_malloc;
   59|  3.57k|    _ndpi_free = __ndpi_free;
   60|  3.57k|    _ndpi_calloc = __ndpi_calloc;
   61|  3.57k|    _ndpi_realloc = __ndpi_realloc;
   62|  3.57k|  }
   63|  3.57k|  if(__ndpi_aligned_malloc && __ndpi_aligned_free) {
  ------------------
  |  Branch (63:6): [True: 0, False: 3.57k]
  |  Branch (63:31): [True: 0, False: 0]
  ------------------
   64|      0|    _ndpi_aligned_malloc = __ndpi_aligned_malloc;
   65|      0|    _ndpi_aligned_free = __ndpi_aligned_free;
   66|      0|  }
   67|  3.57k|  if(__ndpi_flow_malloc && __ndpi_flow_free) {
  ------------------
  |  Branch (67:6): [True: 3.57k, False: 0]
  |  Branch (67:28): [True: 3.57k, False: 0]
  ------------------
   68|  3.57k|    _ndpi_flow_malloc = __ndpi_flow_malloc;
   69|  3.57k|    _ndpi_flow_free = __ndpi_flow_free;
   70|  3.57k|  }
   71|  3.57k|}
ndpi_malloc:
   81|   144k|void *ndpi_malloc(size_t size) {
   82|   144k|  __sync_fetch_and_add(&ndpi_tot_allocated_memory, size);
   83|   144k|  return(_ndpi_malloc ? _ndpi_malloc(size) : malloc(size));
  ------------------
  |  Branch (83:10): [True: 144k, False: 0]
  ------------------
   84|   144k|}
ndpi_calloc:
   88|   222k|void *ndpi_calloc(size_t nmemb, size_t size) {
   89|   222k|  __sync_fetch_and_add(&ndpi_tot_allocated_memory, nmemb * size);
   90|   222k|  return(_ndpi_calloc ? _ndpi_calloc(nmemb, size) : calloc(nmemb, size));
  ------------------
  |  Branch (90:10): [True: 222k, False: 0]
  ------------------
   91|   222k|}
ndpi_free:
   95|   357k|void ndpi_free(void *ptr) {
   96|   357k|  _ndpi_free ? _ndpi_free(ptr) : free(ptr);
  ------------------
  |  Branch (96:3): [True: 357k, False: 0]
  ------------------
   97|   357k|}
ndpi_realloc:
  101|  14.4k|void *ndpi_realloc(void *ptr, size_t size) {
  102|  14.4k|  __sync_fetch_and_add(&ndpi_tot_allocated_memory, size);
  103|  14.4k|  return(_ndpi_realloc ? _ndpi_realloc(ptr, size) : realloc(ptr, size));
  ------------------
  |  Branch (103:10): [True: 14.4k, False: 0]
  ------------------
  104|  14.4k|}
ndpi_strdup:
  158|  37.2k|char *ndpi_strdup(const char *s) {
  159|  37.2k|  if(s == NULL ){
  ------------------
  |  Branch (159:6): [True: 0, False: 37.2k]
  ------------------
  160|      0|    return NULL;
  161|      0|  }
  162|       |
  163|  37.2k|  int len = strlen(s);
  164|  37.2k|  char *m = ndpi_malloc(len + 1);
  165|       |
  166|  37.2k|  if(m) {
  ------------------
  |  Branch (166:6): [True: 34.9k, False: 2.32k]
  ------------------
  167|  34.9k|    memcpy(m, s, len);
  168|  34.9k|    m[len] = '\0';
  169|  34.9k|  }
  170|       |
  171|  37.2k|  return(m);
  172|  37.2k|}

ndpi_unload_protocol_plugins:
  149|  3.56k|void ndpi_unload_protocol_plugins(struct ndpi_detection_module_struct *ndpi_struct) {
  150|       |#ifdef HAVE_PLUGINS
  151|       |  u_int i;
  152|       |
  153|       |  for(i=0; i<ndpi_struct->proto_plugins.num_loaded_plugins; i++)
  154|       |    dlclose(ndpi_struct->proto_plugins.plugin[i].pluginPtr);
  155|       |#else
  156|  3.56k|  __ndpi_unused_param(ndpi_struct);
  ------------------
  |  |  390|  3.56k|#define __ndpi_unused_param(x) (void)(x)
  ------------------
  157|  3.56k|#endif
  158|  3.56k|}

ndpi_hash_init:
 3121|  7.80k|int ndpi_hash_init(ndpi_str_hash **h) {
 3122|  7.80k|  if (h == NULL)
  ------------------
  |  Branch (3122:7): [True: 0, False: 7.80k]
  ------------------
 3123|      0|    return 1;
 3124|       |
 3125|  7.80k|  *h = ndpi_calloc(1, sizeof(**h));
 3126|  7.80k|  if(!*h)
  ------------------
  |  Branch (3126:6): [True: 50, False: 7.75k]
  ------------------
 3127|     50|    return 1;
 3128|  7.75k|  return 0;
 3129|  7.80k|}
ndpi_hash_free:
 3133|  7.75k|void ndpi_hash_free(ndpi_str_hash **h) {
 3134|  7.75k|  if(h && *h) {
  ------------------
  |  Branch (3134:6): [True: 7.75k, False: 0]
  |  Branch (3134:11): [True: 7.75k, False: 0]
  ------------------
 3135|  7.75k|    ndpi_str_hash_priv *h_priv = (ndpi_str_hash_priv *)((*h)->priv);
 3136|  7.75k|    ndpi_str_hash_priv *current, *tmp;
 3137|       |
 3138|  32.1k|    HASH_ITER(hh, h_priv, current, tmp) {
  ------------------
  |  | 1061|  7.75k|#define HASH_ITER(hh,head,el,tmp)                                                \
  |  | 1062|  7.75k|for(((el)=(head)), ((tmp)=DECLTYPE(el)((head!=NULL)?(head)->hh.next:NULL));      \
  |  |  ------------------
  |  |  |  |   57|  7.75k|#define DECLTYPE(x) (__typeof(x))
  |  |  ------------------
  |  |  |  Branch (1062:40): [True: 610, False: 7.14k]
  |  |  ------------------
  |  | 1063|  39.8k|  (el) != NULL; ((el)=(tmp)), ((tmp)=DECLTYPE(el)((tmp!=NULL)?(tmp)->hh.next:NULL)))
  |  |  ------------------
  |  |  |  |   57|  32.1k|#define DECLTYPE(x) (__typeof(x))
  |  |  ------------------
  |  |  |  Branch (1063:3): [True: 32.1k, False: 7.75k]
  |  |  |  Branch (1063:51): [True: 31.5k, False: 610]
  |  |  ------------------
  ------------------
 3139|  32.1k|      HASH_DEL(h_priv, current);
  ------------------
  |  |  509|  32.1k|    HASH_DELETE(hh,head,delptr)
  |  |  ------------------
  |  |  |  |  449|  32.1k|    HASH_DELETE_HH(hh, head, &(delptr)->hh)
  |  |  |  |  ------------------
  |  |  |  |  |  |  451|  32.1k|#define HASH_DELETE_HH(hh,head,delptrhh)                                         \
  |  |  |  |  |  |  452|  32.1k|do {                                                                             \
  |  |  |  |  |  |  453|  32.1k|  struct UT_hash_handle *_hd_hh_del = (delptrhh);                                \
  |  |  |  |  |  |  454|  32.1k|  if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) {                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (454:7): [True: 32.1k, False: 0]
  |  |  |  |  |  |  |  Branch (454:37): [True: 610, False: 31.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  455|    610|    HASH_BLOOM_FREE((head)->hh.tbl);                                             \
  |  |  |  |  |  |  456|    610|    uthash_free((head)->hh.tbl->buckets,                                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    610|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  457|    610|                (head)->hh.tbl->num_buckets * sizeof(struct UT_hash_bucket));    \
  |  |  |  |  |  |  458|    610|    uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    610|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  459|    610|    (head) = NULL;                                                               \
  |  |  |  |  |  |  460|  31.5k|  } else {                                                                       \
  |  |  |  |  |  |  461|  31.5k|    unsigned _hd_bkt;                                                            \
  |  |  |  |  |  |  462|  31.5k|    if (_hd_hh_del == (head)->hh.tbl->tail) {                                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (462:9): [True: 0, False: 31.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  463|      0|      (head)->hh.tbl->tail = HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->prev);     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  137|      0|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  464|      0|    }                                                                            \
  |  |  |  |  |  |  465|  31.5k|    if (_hd_hh_del->prev != NULL) {                                              \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (465:9): [True: 0, False: 31.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  466|      0|      HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->prev)->next = _hd_hh_del->next;   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  137|      0|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  467|  31.5k|    } else {                                                                     \
  |  |  |  |  |  |  468|  31.5k|      DECLTYPE_ASSIGN(head, _hd_hh_del->next);                                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  31.5k|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |   70|  31.5k|do {                                                                             \
  |  |  |  |  |  |  |  |   71|  31.5k|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   57|  31.5k|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  31.5k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 31.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  469|  31.5k|    }                                                                            \
  |  |  |  |  |  |  470|  31.5k|    if (_hd_hh_del->next != NULL) {                                              \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (470:9): [True: 31.5k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  471|  31.5k|      HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->next)->prev = _hd_hh_del->prev;   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  137|  31.5k|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|  31.5k|    }                                                                            \
  |  |  |  |  |  |  473|  31.5k|    HASH_TO_BKT(_hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  431|  31.5k|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  |  |  432|  31.5k|do {                                                                             \
  |  |  |  |  |  |  |  |  433|  31.5k|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  |  |  434|  31.5k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 31.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|  31.5k|    HASH_DEL_IN_BKT((head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del);               \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  31.5k|#define HASH_DEL_IN_BKT(head,delhh)                                              \
  |  |  |  |  |  |  |  |  791|  31.5k|do {                                                                             \
  |  |  |  |  |  |  |  |  792|  31.5k|  UT_hash_bucket *_hd_head = &(head);                                            \
  |  |  |  |  |  |  |  |  793|  31.5k|  _hd_head->count--;                                                             \
  |  |  |  |  |  |  |  |  794|  31.5k|  if (_hd_head->hh_head == (delhh)) {                                            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (794:7): [True: 20.2k, False: 11.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|  20.2k|    _hd_head->hh_head = (delhh)->hh_next;                                        \
  |  |  |  |  |  |  |  |  796|  20.2k|  }                                                                              \
  |  |  |  |  |  |  |  |  797|  31.5k|  if ((delhh)->hh_prev) {                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (797:7): [True: 11.2k, False: 20.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|  11.2k|    (delhh)->hh_prev->hh_next = (delhh)->hh_next;                                \
  |  |  |  |  |  |  |  |  799|  11.2k|  }                                                                              \
  |  |  |  |  |  |  |  |  800|  31.5k|  if ((delhh)->hh_next) {                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (800:7): [True: 13.2k, False: 18.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|  13.2k|    (delhh)->hh_next->hh_prev = (delhh)->hh_prev;                                \
  |  |  |  |  |  |  |  |  802|  13.2k|  }                                                                              \
  |  |  |  |  |  |  |  |  803|  31.5k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:10): [Folded, False: 31.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|  31.5k|    (head)->hh.tbl->num_items--;                                                 \
  |  |  |  |  |  |  476|  31.5k|  }                                                                              \
  |  |  |  |  |  |  477|  32.1k|  HASH_FSCK(hh, head, "HASH_DELETE_HH");                                         \
  |  |  |  |  |  |  478|  32.1k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (478:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3140|  32.1k|      ndpi_free(current->key);
 3141|  32.1k|      ndpi_free(current);
 3142|  32.1k|    }
 3143|       |
 3144|  7.75k|    ndpi_free(*h);
 3145|       |    *h = NULL;
 3146|  7.75k|  }
 3147|  7.75k|}
ndpi_hash_add_entry:
 3188|  64.8k|			u_int64_t value, char *extra_data /* Allocated by caller */) {
 3189|  64.8k|  ndpi_str_hash_priv *h_priv;
 3190|  64.8k|  ndpi_str_hash_priv *item, *ret_found;
 3191|       |
 3192|  64.8k|  if(!h || !*h || !key || key_len == 0)
  ------------------
  |  Branch (3192:6): [True: 0, False: 64.8k]
  |  Branch (3192:12): [True: 0, False: 64.8k]
  |  Branch (3192:19): [True: 0, False: 64.8k]
  |  Branch (3192:27): [True: 714, False: 64.0k]
  ------------------
 3193|    714|    return(3);
 3194|       |
 3195|  64.0k|  h_priv = (ndpi_str_hash_priv *)((*h)->priv);
 3196|       |
 3197|  64.0k|  HASH_FIND(hh, h_priv, key, key_len, item);
  ------------------
  |  |  166|  64.0k|#define HASH_FIND(hh,head,keyptr,keylen,out)                                     \
  |  |  167|  64.0k|do {                                                                             \
  |  |  168|  64.0k|  (out) = NULL;                                                                  \
  |  |  169|  64.0k|  if (head) {                                                                    \
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 63.3k, False: 772]
  |  |  ------------------
  |  |  170|  63.3k|    unsigned _hf_hashv;                                                          \
  |  |  171|  63.3k|    HASH_VALUE(keyptr, keylen, _hf_hashv);                                       \
  |  |  ------------------
  |  |  |  |  149|  63.3k|#define HASH_VALUE(keyptr,keylen,hashv)                                          \
  |  |  |  |  150|  63.3k|do {                                                                             \
  |  |  |  |  151|  63.3k|  HASH_FUNCTION(keyptr, keylen, hashv);                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|  63.3k|#define HASH_FUNCTION(keyptr,keylen,hashv) HASH_JEN(keyptr, keylen, hashv)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  648|  63.3k|#define HASH_JEN(key,keylen,hashv)                                               \
  |  |  |  |  |  |  |  |  649|  63.3k|do {                                                                             \
  |  |  |  |  |  |  |  |  650|  63.3k|  unsigned _hj_i,_hj_j,_hj_k;                                                    \
  |  |  |  |  |  |  |  |  651|  63.3k|  unsigned const char *_hj_key=(unsigned const char*)(key);                      \
  |  |  |  |  |  |  |  |  652|  63.3k|  hashv = 0xfeedbeefu;                                                           \
  |  |  |  |  |  |  |  |  653|  63.3k|  _hj_i = _hj_j = 0x9e3779b9u;                                                   \
  |  |  |  |  |  |  |  |  654|  63.3k|  _hj_k = (unsigned)(keylen);                                                    \
  |  |  |  |  |  |  |  |  655|   129k|  while (_hj_k >= 12U) {                                                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (655:10): [True: 66.0k, False: 63.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  656|  66.0k|    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
  |  |  |  |  |  |  |  |  657|  66.0k|        + ( (unsigned)_hj_key[2] << 16 )                                         \
  |  |  |  |  |  |  |  |  658|  66.0k|        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  659|  66.0k|    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
  |  |  |  |  |  |  |  |  660|  66.0k|        + ( (unsigned)_hj_key[6] << 16 )                                         \
  |  |  |  |  |  |  |  |  661|  66.0k|        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  662|  66.0k|    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
  |  |  |  |  |  |  |  |  663|  66.0k|        + ( (unsigned)_hj_key[10] << 16 )                                        \
  |  |  |  |  |  |  |  |  664|  66.0k|        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
  |  |  |  |  |  |  |  |  665|  66.0k|                                                                                 \
  |  |  |  |  |  |  |  |  666|  66.0k|     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  635|  66.0k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  636|  66.0k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  637|  66.0k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  638|  66.0k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  639|  66.0k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  640|  66.0k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  641|  66.0k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  642|  66.0k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  643|  66.0k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  644|  66.0k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  645|  66.0k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  646|  66.0k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 66.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  667|  66.0k|                                                                                 \
  |  |  |  |  |  |  |  |  668|  66.0k|     _hj_key += 12;                                                              \
  |  |  |  |  |  |  |  |  669|  66.0k|     _hj_k -= 12U;                                                               \
  |  |  |  |  |  |  |  |  670|  66.0k|  }                                                                              \
  |  |  |  |  |  |  |  |  671|  63.3k|  hashv += (unsigned)(keylen);                                                   \
  |  |  |  |  |  |  |  |  672|  63.3k|  switch ( _hj_k ) {                                                             \
  |  |  |  |  |  |  |  |  673|  6.55k|    case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (673:5): [True: 6.55k, False: 56.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  674|  13.3k|    case 10: hashv += ( (unsigned)_hj_key[9] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (674:5): [True: 6.79k, False: 56.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  675|  19.1k|    case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (675:5): [True: 5.78k, False: 57.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  676|  30.7k|    case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (676:5): [True: 11.5k, False: 51.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  677|  37.1k|    case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (677:5): [True: 6.45k, False: 56.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  678|  40.0k|    case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (678:5): [True: 2.88k, False: 60.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  679|  42.0k|    case 5:  _hj_j += _hj_key[4];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (679:5): [True: 2.04k, False: 61.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  680|  44.8k|    case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (680:5): [True: 2.78k, False: 60.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  681|  49.8k|    case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (681:5): [True: 4.96k, False: 58.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  682|  52.3k|    case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (682:5): [True: 2.51k, False: 60.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  683|  57.9k|    case 1:  _hj_i += _hj_key[0];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (683:5): [True: 5.57k, False: 57.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  684|  63.3k|    default: ;                                                                   \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (684:5): [True: 5.38k, False: 57.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  685|  63.3k|  }                                                                              \
  |  |  |  |  |  |  |  |  686|  63.3k|  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  635|  63.3k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  636|  63.3k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  637|  63.3k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  638|  63.3k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  639|  63.3k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  640|  63.3k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  641|  63.3k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  642|  63.3k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  643|  63.3k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  644|  63.3k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  645|  63.3k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  646|  63.3k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 63.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  687|  63.3k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (687:10): [Folded, False: 63.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  152|  63.3k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:10): [Folded, False: 63.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  172|  63.3k|    HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out);             \
  |  |  ------------------
  |  |  |  |  154|  63.3k|#define HASH_FIND_BYHASHVALUE(hh,head,keyptr,keylen,hashval,out)                 \
  |  |  |  |  155|  63.3k|do {                                                                             \
  |  |  |  |  156|  63.3k|  (out) = NULL;                                                                  \
  |  |  |  |  157|  63.3k|  if (head) {                                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (157:7): [True: 63.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  158|  63.3k|    unsigned _hf_bkt;                                                            \
  |  |  |  |  159|  63.3k|    HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _hf_bkt);                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|  63.3k|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  432|  63.3k|do {                                                                             \
  |  |  |  |  |  |  433|  63.3k|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  434|  63.3k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 63.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  160|  63.3k|    if (HASH_BLOOM_TEST((head)->hh.tbl, hashval) != 0) {                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  209|  63.3k|#define HASH_BLOOM_TEST(tbl,hashv) (1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (160:9): [True: 63.3k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  161|  63.3k|      HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  746|  63.3k|#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,hashval,out)               \
  |  |  |  |  |  |  747|  63.3k|do {                                                                             \
  |  |  |  |  |  |  748|  63.3k|  if ((head).hh_head != NULL) {                                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (748:7): [True: 56.9k, False: 6.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  749|  56.9k|    DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (head).hh_head));                     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  56.9k|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |   70|  56.9k|do {                                                                             \
  |  |  |  |  |  |  |  |   71|  56.9k|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   57|  56.9k|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  56.9k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 56.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  750|  56.9k|  } else {                                                                       \
  |  |  |  |  |  |  751|  6.38k|    (out) = NULL;                                                                \
  |  |  |  |  |  |  752|  6.38k|  }                                                                              \
  |  |  |  |  |  |  753|   207k|  while ((out) != NULL) {                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (753:10): [True: 172k, False: 35.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  754|   172k|    if ((out)->hh.hashv == (hashval) && (out)->hh.keylen == (keylen_in)) {       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (754:9): [True: 28.0k, False: 144k]
  |  |  |  |  |  |  |  Branch (754:41): [True: 27.8k, False: 214]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  755|  27.8k|      if (HASH_KEYCMP((out)->hh.key, keyptr, keylen_in) == 0) {                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   93|  27.8k|#define HASH_KEYCMP(a,b,n) memcmp(a,b,n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (755:11): [True: 27.8k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  756|  27.8k|        break;                                                                   \
  |  |  |  |  |  |  757|  27.8k|      }                                                                          \
  |  |  |  |  |  |  758|  27.8k|    }                                                                            \
  |  |  |  |  |  |  759|   172k|    if ((out)->hh.hh_next != NULL) {                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (759:9): [True: 115k, False: 29.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  760|   115k|      DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (out)->hh.hh_next));                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|   115k|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |   70|   115k|do {                                                                             \
  |  |  |  |  |  |  |  |   71|   115k|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   57|   115k|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|   115k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 115k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  761|   115k|    } else {                                                                     \
  |  |  |  |  |  |  762|  29.1k|      (out) = NULL;                                                              \
  |  |  |  |  |  |  763|  29.1k|    }                                                                            \
  |  |  |  |  |  |  764|   144k|  }                                                                              \
  |  |  |  |  |  |  765|  63.3k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (765:10): [Folded, False: 63.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  162|  63.3k|    }                                                                            \
  |  |  |  |  163|  63.3k|  }                                                                              \
  |  |  |  |  164|  63.3k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (164:10): [Folded, False: 63.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|  63.3k|  }                                                                              \
  |  |  174|  64.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (174:10): [Folded, False: 64.0k]
  |  |  ------------------
  ------------------
 3198|       |
 3199|  64.0k|  if(item != NULL) {
  ------------------
  |  Branch (3199:6): [True: 27.8k, False: 36.2k]
  ------------------
 3200|  27.8k|    if(extra_data != NULL) {
  ------------------
  |  Branch (3200:8): [True: 0, False: 27.8k]
  ------------------
 3201|       |      /*
 3202|       |	If there are extra blocks to handle value64
 3203|       |	(the protocol) is not overwritten (***)
 3204|       |      */
 3205|      0|      ndpi_list_append(&item->value_list, extra_data);
 3206|      0|    } else
 3207|  27.8k|      item->value64 = value;
 3208|       |
 3209|  27.8k|    return(1); /* Entry already present */
 3210|  27.8k|  }
 3211|       |
 3212|  36.2k|  item = ndpi_calloc(1, sizeof(ndpi_str_hash_priv));
 3213|  36.2k|  if(item == NULL)
  ------------------
  |  Branch (3213:6): [True: 2.05k, False: 34.2k]
  ------------------
 3214|  2.05k|    return(2);
 3215|       |
 3216|  34.2k|  ndpi_list_init(&item->value_list);
 3217|  34.2k|  item->key = ndpi_malloc(key_len+1);
 3218|       |
 3219|  34.2k|  if(item->key == NULL) {
  ------------------
  |  Branch (3219:6): [True: 1.97k, False: 32.2k]
  ------------------
 3220|  1.97k|    ndpi_free(item);
 3221|  1.97k|    return(1);
 3222|  32.2k|  } else {
 3223|  32.2k|    memcpy(item->key, key, key_len);
 3224|  32.2k|    item->key[key_len] = '\0';
 3225|  32.2k|  }
 3226|       |
 3227|  32.2k|  if(extra_data != NULL) /* Same as (***) above */
  ------------------
  |  Branch (3227:6): [True: 0, False: 32.2k]
  ------------------
 3228|      0|    ndpi_list_append(&item->value_list, extra_data);
 3229|  32.2k|  else
 3230|  32.2k|    item->value64 = value;
 3231|       |
 3232|  32.2k|  HASH_ADD(hh, *(ndpi_str_hash_priv **)&((*h)->priv), key[0], key_len, item);
  ------------------
  |  |  429|  32.2k|  HASH_ADD_KEYPTR(hh, head, &((add)->fieldname), keylen_in, add)
  |  |  ------------------
  |  |  |  |  418|  32.2k|#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add)                            \
  |  |  |  |  419|  32.2k|do {                                                                             \
  |  |  |  |  420|  32.2k|  unsigned _ha_hashv;                                                            \
  |  |  |  |  421|  32.2k|  HASH_VALUE(keyptr, keylen_in, _ha_hashv);                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  149|  32.2k|#define HASH_VALUE(keyptr,keylen,hashv)                                          \
  |  |  |  |  |  |  150|  32.2k|do {                                                                             \
  |  |  |  |  |  |  151|  32.2k|  HASH_FUNCTION(keyptr, keylen, hashv);                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   89|  32.2k|#define HASH_FUNCTION(keyptr,keylen,hashv) HASH_JEN(keyptr, keylen, hashv)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  648|  32.2k|#define HASH_JEN(key,keylen,hashv)                                               \
  |  |  |  |  |  |  |  |  |  |  649|  32.2k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  650|  32.2k|  unsigned _hj_i,_hj_j,_hj_k;                                                    \
  |  |  |  |  |  |  |  |  |  |  651|  32.2k|  unsigned const char *_hj_key=(unsigned const char*)(key);                      \
  |  |  |  |  |  |  |  |  |  |  652|  32.2k|  hashv = 0xfeedbeefu;                                                           \
  |  |  |  |  |  |  |  |  |  |  653|  32.2k|  _hj_i = _hj_j = 0x9e3779b9u;                                                   \
  |  |  |  |  |  |  |  |  |  |  654|  32.2k|  _hj_k = (unsigned)(keylen);                                                    \
  |  |  |  |  |  |  |  |  |  |  655|  78.4k|  while (_hj_k >= 12U) {                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (655:10): [True: 46.1k, False: 32.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  656|  46.1k|    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
  |  |  |  |  |  |  |  |  |  |  657|  46.1k|        + ( (unsigned)_hj_key[2] << 16 )                                         \
  |  |  |  |  |  |  |  |  |  |  658|  46.1k|        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  |  |  659|  46.1k|    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
  |  |  |  |  |  |  |  |  |  |  660|  46.1k|        + ( (unsigned)_hj_key[6] << 16 )                                         \
  |  |  |  |  |  |  |  |  |  |  661|  46.1k|        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  |  |  662|  46.1k|    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
  |  |  |  |  |  |  |  |  |  |  663|  46.1k|        + ( (unsigned)_hj_key[10] << 16 )                                        \
  |  |  |  |  |  |  |  |  |  |  664|  46.1k|        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
  |  |  |  |  |  |  |  |  |  |  665|  46.1k|                                                                                 \
  |  |  |  |  |  |  |  |  |  |  666|  46.1k|     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  635|  46.1k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  |  |  636|  46.1k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  637|  46.1k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  638|  46.1k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  639|  46.1k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  640|  46.1k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  641|  46.1k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  642|  46.1k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  643|  46.1k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  644|  46.1k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  645|  46.1k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  646|  46.1k|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 46.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  667|  46.1k|                                                                                 \
  |  |  |  |  |  |  |  |  |  |  668|  46.1k|     _hj_key += 12;                                                              \
  |  |  |  |  |  |  |  |  |  |  669|  46.1k|     _hj_k -= 12U;                                                               \
  |  |  |  |  |  |  |  |  |  |  670|  46.1k|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  671|  32.2k|  hashv += (unsigned)(keylen);                                                   \
  |  |  |  |  |  |  |  |  |  |  672|  32.2k|  switch ( _hj_k ) {                                                             \
  |  |  |  |  |  |  |  |  |  |  673|  3.03k|    case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (673:5): [True: 3.03k, False: 29.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  674|  6.63k|    case 10: hashv += ( (unsigned)_hj_key[9] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (674:5): [True: 3.60k, False: 28.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  675|  10.0k|    case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (675:5): [True: 3.39k, False: 28.8k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  676|  13.7k|    case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (676:5): [True: 3.72k, False: 28.5k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  677|  17.2k|    case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (677:5): [True: 3.52k, False: 28.7k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  678|  19.0k|    case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (678:5): [True: 1.76k, False: 30.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  679|  20.4k|    case 5:  _hj_j += _hj_key[4];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (679:5): [True: 1.37k, False: 30.8k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  680|  22.0k|    case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (680:5): [True: 1.58k, False: 30.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  681|  24.2k|    case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (681:5): [True: 2.29k, False: 29.9k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  682|  25.9k|    case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (682:5): [True: 1.67k, False: 30.5k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  683|  29.4k|    case 1:  _hj_i += _hj_key[0];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (683:5): [True: 3.52k, False: 28.7k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  684|  32.2k|    default: ;                                                                   \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (684:5): [True: 2.75k, False: 29.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  685|  32.2k|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  686|  32.2k|  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  635|  32.2k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  |  |  636|  32.2k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  637|  32.2k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  638|  32.2k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  639|  32.2k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  640|  32.2k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  641|  32.2k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  642|  32.2k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  643|  32.2k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  644|  32.2k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  645|  32.2k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  646|  32.2k|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 32.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  687|  32.2k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (687:10): [Folded, False: 32.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  32.2k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:10): [Folded, False: 32.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  422|  32.2k|  HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, keyptr, keylen_in, _ha_hashv, add);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|  32.2k|#define HASH_ADD_KEYPTR_BYHASHVALUE(hh,head,keyptr,keylen_in,hashval,add)        \
  |  |  |  |  |  |  398|  32.2k|do {                                                                             \
  |  |  |  |  |  |  399|  32.2k|  IF_HASH_NONFATAL_OOM( int _ha_oomed = 0; )                                     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  115|  32.2k|#define IF_HASH_NONFATAL_OOM(x) x
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  400|  32.2k|  (add)->hh.hashv = (hashval);                                                   \
  |  |  |  |  |  |  401|  32.2k|  (add)->hh.key = (const void*) (keyptr);                                        \
  |  |  |  |  |  |  402|  32.2k|  (add)->hh.keylen = (unsigned) (keylen_in);                                     \
  |  |  |  |  |  |  403|  32.2k|  if (!(head)) {                                                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (403:7): [True: 711, False: 31.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  404|    711|    (add)->hh.next = NULL;                                                       \
  |  |  |  |  |  |  405|    711|    (add)->hh.prev = NULL;                                                       \
  |  |  |  |  |  |  406|    711|    HASH_MAKE_TABLE(hh, add, _ha_oomed);                                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  213|    711|#define HASH_MAKE_TABLE(hh,head,oomed)                                           \
  |  |  |  |  |  |  |  |  214|    711|do {                                                                             \
  |  |  |  |  |  |  |  |  215|    711|  (head)->hh.tbl = (UT_hash_table*)uthash_malloc(sizeof(UT_hash_table));         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   76|    711|#define uthash_malloc(sz) ndpi_malloc(sz)      /* malloc fcn                      */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  216|    711|  if (!(head)->hh.tbl) {                                                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (216:7): [True: 43, False: 668]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|     43|    HASH_RECORD_OOM(oomed);                                                      \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  114|     43|#define HASH_RECORD_OOM(oomed) do { (oomed) = 1; } while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (114:59): [Folded, False: 43]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|    668|  } else {                                                                       \
  |  |  |  |  |  |  |  |  219|    668|    uthash_bzero((head)->hh.tbl, sizeof(UT_hash_table));                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   82|    668|#define uthash_bzero(a,n) memset(a,'\0',n)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  220|    668|    (head)->hh.tbl->tail = &((head)->hh);                                        \
  |  |  |  |  |  |  |  |  221|    668|    (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS;                      \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  130|    668|#define HASH_INITIAL_NUM_BUCKETS 32U     /* initial number of buckets        */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|    668|    (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2;            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  131|    668|#define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  223|    668|    (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head);                  \
  |  |  |  |  |  |  |  |  224|    668|    (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc(                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   76|    668|#define uthash_malloc(sz) ndpi_malloc(sz)      /* malloc fcn                      */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  225|    668|        HASH_INITIAL_NUM_BUCKETS * sizeof(struct UT_hash_bucket));               \
  |  |  |  |  |  |  |  |  226|    668|    (head)->hh.tbl->signature = HASH_SIGNATURE;                                  \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1091|    668|#define HASH_SIGNATURE 0xa0111fe1u
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  227|    668|    if (!(head)->hh.tbl->buckets) {                                              \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (227:9): [True: 58, False: 610]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  228|     58|      HASH_RECORD_OOM(oomed);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  114|     58|#define HASH_RECORD_OOM(oomed) do { (oomed) = 1; } while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (114:59): [Folded, False: 58]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|     58|      uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   79|     58|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|    610|    } else {                                                                     \
  |  |  |  |  |  |  |  |  231|    610|      uthash_bzero((head)->hh.tbl->buckets,                                      \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   82|    610|#define uthash_bzero(a,n) memset(a,'\0',n)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  232|    610|          HASH_INITIAL_NUM_BUCKETS * sizeof(struct UT_hash_bucket));             \
  |  |  |  |  |  |  |  |  233|    610|      HASH_BLOOM_MAKE((head)->hh.tbl, oomed);                                    \
  |  |  |  |  |  |  |  |  234|    610|      IF_HASH_NONFATAL_OOM(                                                      \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  115|  1.22k|#define IF_HASH_NONFATAL_OOM(x) x
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 0, False: 610]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  235|    610|        if (oomed) {                                                             \
  |  |  |  |  |  |  |  |  236|    610|          uthash_free((head)->hh.tbl->buckets,                                   \
  |  |  |  |  |  |  |  |  237|    610|              HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));           \
  |  |  |  |  |  |  |  |  238|    610|          uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                    \
  |  |  |  |  |  |  |  |  239|    610|        }                                                                        \
  |  |  |  |  |  |  |  |  240|    610|      )                                                                          \
  |  |  |  |  |  |  |  |  241|    610|    }                                                                            \
  |  |  |  |  |  |  |  |  242|    668|  }                                                                              \
  |  |  |  |  |  |  |  |  243|    711|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (243:10): [Folded, False: 711]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  407|    711|    IF_HASH_NONFATAL_OOM( if (!_ha_oomed) { )                                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  115|  1.32k|#define IF_HASH_NONFATAL_OOM(x) x
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 610, False: 101]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|    610|      (head) = (add);                                                            \
  |  |  |  |  |  |  409|    610|    IF_HASH_NONFATAL_OOM( } )                                                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  115|  1.32k|#define IF_HASH_NONFATAL_OOM(x) x
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  410|  31.5k|  } else {                                                                       \
  |  |  |  |  |  |  411|  31.5k|    (add)->hh.tbl = (head)->hh.tbl;                                              \
  |  |  |  |  |  |  412|  31.5k|    HASH_APPEND_LIST(hh, head, add);                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  279|  31.5k|#define HASH_APPEND_LIST(hh, head, add)                                          \
  |  |  |  |  |  |  |  |  280|  31.5k|do {                                                                             \
  |  |  |  |  |  |  |  |  281|  31.5k|  (add)->hh.next = NULL;                                                         \
  |  |  |  |  |  |  |  |  282|  31.5k|  (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail);           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  135|  31.5k|#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  31.5k|  (head)->hh.tbl->tail->next = (add);                                            \
  |  |  |  |  |  |  |  |  284|  31.5k|  (head)->hh.tbl->tail = &((add)->hh);                                           \
  |  |  |  |  |  |  |  |  285|  31.5k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (285:10): [Folded, False: 31.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  413|  31.5k|  }                                                                              \
  |  |  |  |  |  |  414|  32.2k|  HASH_ADD_TO_TABLE(hh, head, keyptr, keylen_in, hashval, add, _ha_oomed);       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|  32.2k|#define HASH_ADD_TO_TABLE(hh,head,keyptr,keylen_in,hashval,add,oomed)            \
  |  |  |  |  |  |  |  |  315|  32.2k|do {                                                                             \
  |  |  |  |  |  |  |  |  316|  32.2k|  if (!(oomed)) {                                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (316:7): [True: 32.1k, False: 101]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  317|  32.1k|    unsigned _ha_bkt;                                                            \
  |  |  |  |  |  |  |  |  318|  32.1k|    (head)->hh.tbl->num_items++;                                                 \
  |  |  |  |  |  |  |  |  319|  32.1k|    HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _ha_bkt);                  \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  431|  32.1k|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  |  |  |  |  432|  32.1k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  433|  32.1k|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  |  |  |  |  434|  32.1k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  32.1k|    HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], hh, &(add)->hh, oomed);    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  768|  32.1k|#define HASH_ADD_TO_BKT(head,hh,addhh,oomed)                                     \
  |  |  |  |  |  |  |  |  |  |  769|  32.1k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  770|  32.1k|  UT_hash_bucket *_ha_head = &(head);                                            \
  |  |  |  |  |  |  |  |  |  |  771|  32.1k|  _ha_head->count++;                                                             \
  |  |  |  |  |  |  |  |  |  |  772|  32.1k|  (addhh)->hh_next = _ha_head->hh_head;                                          \
  |  |  |  |  |  |  |  |  |  |  773|  32.1k|  (addhh)->hh_prev = NULL;                                                       \
  |  |  |  |  |  |  |  |  |  |  774|  32.1k|  if (_ha_head->hh_head != NULL) {                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (774:7): [True: 25.8k, False: 6.33k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  775|  25.8k|    _ha_head->hh_head->hh_prev = (addhh);                                        \
  |  |  |  |  |  |  |  |  |  |  776|  25.8k|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  777|  32.1k|  _ha_head->hh_head = (addhh);                                                   \
  |  |  |  |  |  |  |  |  |  |  778|  32.1k|  if ((_ha_head->count >= ((_ha_head->expand_mult + 1U) * HASH_BKT_CAPACITY_THRESH)) \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  132|  32.1k|#define HASH_BKT_CAPACITY_THRESH 10U     /* expand when bucket count reaches */
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (778:7): [True: 226, False: 31.9k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  779|  32.1k|      && !(addhh)->tbl->noexpand) {                                              \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (779:10): [True: 226, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  780|    226|    HASH_EXPAND_BUCKETS(addhh,(addhh)->tbl, oomed);                              \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  834|    226|#define HASH_EXPAND_BUCKETS(hh,tbl,oomed)                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  835|    226|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  836|    226|  unsigned _he_bkt;                                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  837|    226|  unsigned _he_bkt_i;                                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  838|    226|  struct UT_hash_handle *_he_thh, *_he_hh_nxt;                                   \
  |  |  |  |  |  |  |  |  |  |  |  |  839|    226|  UT_hash_bucket *_he_new_buckets, *_he_newbkt;                                  \
  |  |  |  |  |  |  |  |  |  |  |  |  840|    226|  _he_new_buckets = (UT_hash_bucket*)uthash_malloc(                              \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   76|    226|#define uthash_malloc(sz) ndpi_malloc(sz)      /* malloc fcn                      */
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  841|    226|           sizeof(struct UT_hash_bucket) * (tbl)->num_buckets * 2U);             \
  |  |  |  |  |  |  |  |  |  |  |  |  842|    226|  if (!_he_new_buckets) {                                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (842:7): [True: 34, False: 192]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  843|     34|    HASH_RECORD_OOM(oomed);                                                      \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  114|     34|#define HASH_RECORD_OOM(oomed) do { (oomed) = 1; } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (114:59): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  844|    192|  } else {                                                                       \
  |  |  |  |  |  |  |  |  |  |  |  |  845|    192|    uthash_bzero(_he_new_buckets,                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   82|    192|#define uthash_bzero(a,n) memset(a,'\0',n)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  846|    192|        sizeof(struct UT_hash_bucket) * (tbl)->num_buckets * 2U);                \
  |  |  |  |  |  |  |  |  |  |  |  |  847|    192|    (tbl)->ideal_chain_maxlen =                                                  \
  |  |  |  |  |  |  |  |  |  |  |  |  848|    192|       ((tbl)->num_items >> ((tbl)->log2_num_buckets+1U)) +                      \
  |  |  |  |  |  |  |  |  |  |  |  |  849|    192|       ((((tbl)->num_items & (((tbl)->num_buckets*2U)-1U)) != 0U) ? 1U : 0U);    \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (849:9): [True: 190, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  850|    192|    (tbl)->nonideal_items = 0;                                                   \
  |  |  |  |  |  |  |  |  |  |  |  |  851|  10.6k|    for (_he_bkt_i = 0; _he_bkt_i < (tbl)->num_buckets; _he_bkt_i++) {           \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (851:25): [True: 10.4k, False: 192]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  852|  10.4k|      _he_thh = (tbl)->buckets[ _he_bkt_i ].hh_head;                             \
  |  |  |  |  |  |  |  |  |  |  |  |  853|  48.8k|      while (_he_thh != NULL) {                                                  \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (853:14): [True: 38.3k, False: 10.4k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  854|  38.3k|        _he_hh_nxt = _he_thh->hh_next;                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  855|  38.3k|        HASH_TO_BKT(_he_thh->hashv, (tbl)->num_buckets * 2U, _he_bkt);           \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  431|  38.3k|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  432|  38.3k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  433|  38.3k|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  434|  38.3k|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 38.3k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  856|  38.3k|        _he_newbkt = &(_he_new_buckets[_he_bkt]);                                \
  |  |  |  |  |  |  |  |  |  |  |  |  857|  38.3k|        if (++(_he_newbkt->count) > (tbl)->ideal_chain_maxlen) {                 \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (857:13): [True: 7.38k, False: 30.9k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  858|  7.38k|          (tbl)->nonideal_items++;                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  859|  7.38k|          if (_he_newbkt->count > _he_newbkt->expand_mult * (tbl)->ideal_chain_maxlen) { \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (859:15): [True: 6.61k, False: 777]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  860|  6.61k|            _he_newbkt->expand_mult++;                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  861|  6.61k|          }                                                                      \
  |  |  |  |  |  |  |  |  |  |  |  |  862|  7.38k|        }                                                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  863|  38.3k|        _he_thh->hh_prev = NULL;                                                 \
  |  |  |  |  |  |  |  |  |  |  |  |  864|  38.3k|        _he_thh->hh_next = _he_newbkt->hh_head;                                  \
  |  |  |  |  |  |  |  |  |  |  |  |  865|  38.3k|        if (_he_newbkt->hh_head != NULL) {                                       \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (865:13): [True: 23.3k, False: 15.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  866|  23.3k|          _he_newbkt->hh_head->hh_prev = _he_thh;                                \
  |  |  |  |  |  |  |  |  |  |  |  |  867|  23.3k|        }                                                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  868|  38.3k|        _he_newbkt->hh_head = _he_thh;                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  869|  38.3k|        _he_thh = _he_hh_nxt;                                                    \
  |  |  |  |  |  |  |  |  |  |  |  |  870|  38.3k|      }                                                                          \
  |  |  |  |  |  |  |  |  |  |  |  |  871|  10.4k|    }                                                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  872|    192|    uthash_free((tbl)->buckets, (tbl)->num_buckets * sizeof(struct UT_hash_bucket)); \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   79|    192|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  873|    192|    (tbl)->num_buckets *= 2U;                                                    \
  |  |  |  |  |  |  |  |  |  |  |  |  874|    192|    (tbl)->log2_num_buckets++;                                                   \
  |  |  |  |  |  |  |  |  |  |  |  |  875|    192|    (tbl)->buckets = _he_new_buckets;                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  876|    192|    (tbl)->ineff_expands = ((tbl)->nonideal_items > ((tbl)->num_items >> 1)) ?   \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (876:28): [True: 33, False: 159]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  877|    192|        ((tbl)->ineff_expands+1U) : 0U;                                          \
  |  |  |  |  |  |  |  |  |  |  |  |  878|    192|    if ((tbl)->ineff_expands > 1U) {                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (878:9): [True: 0, False: 192]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  879|      0|      (tbl)->noexpand = 1;                                                       \
  |  |  |  |  |  |  |  |  |  |  |  |  880|      0|      uthash_noexpand_fyi(tbl);                                                  \
  |  |  |  |  |  |  |  |  |  |  |  |  881|      0|    }                                                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  882|    192|    uthash_expand_fyi(tbl);                                                      \
  |  |  |  |  |  |  |  |  |  |  |  |  883|    192|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  884|    226|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (884:10): [Folded, False: 226]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  781|    226|    IF_HASH_NONFATAL_OOM(                                                        \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  115|    724|#define IF_HASH_NONFATAL_OOM(x) x
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (115:33): [True: 34, False: 192]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  782|    226|      if (oomed) {                                                               \
  |  |  |  |  |  |  |  |  |  |  783|    226|        HASH_DEL_IN_BKT(head,addhh);                                             \
  |  |  |  |  |  |  |  |  |  |  784|    226|      }                                                                          \
  |  |  |  |  |  |  |  |  |  |  785|    226|    )                                                                            \
  |  |  |  |  |  |  |  |  |  |  786|    226|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  787|  32.1k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (787:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|  32.1k|    if (oomed) {                                                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:9): [True: 34, False: 32.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     34|      HASH_ROLLBACK_BKT(hh, head, &(add)->hh);                                   \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|     34|#define HASH_ROLLBACK_BKT(hh, head, itemptrhh)                                   \
  |  |  |  |  |  |  |  |  |  |  140|     34|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  141|     34|  struct UT_hash_handle *_hd_hh_item = (itemptrhh);                              \
  |  |  |  |  |  |  |  |  |  |  142|     34|  unsigned _hd_bkt;                                                              \
  |  |  |  |  |  |  |  |  |  |  143|     34|  HASH_TO_BKT(_hd_hh_item->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  431|     34|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  |  |  |  |  |  |  432|     34|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  433|     34|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  434|     34|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  144|     34|  (head)->hh.tbl->buckets[_hd_bkt].count++;                                      \
  |  |  |  |  |  |  |  |  |  |  145|     34|  _hd_hh_item->hh_next = NULL;                                                   \
  |  |  |  |  |  |  |  |  |  |  146|     34|  _hd_hh_item->hh_prev = NULL;                                                   \
  |  |  |  |  |  |  |  |  |  |  147|     34|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (147:10): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     34|      HASH_DELETE_HH(hh, head, &(add)->hh);                                      \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  451|     34|#define HASH_DELETE_HH(hh,head,delptrhh)                                         \
  |  |  |  |  |  |  |  |  |  |  452|     34|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  453|     34|  struct UT_hash_handle *_hd_hh_del = (delptrhh);                                \
  |  |  |  |  |  |  |  |  |  |  454|     34|  if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) {                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (454:7): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  Branch (454:37): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  455|      0|    HASH_BLOOM_FREE((head)->hh.tbl);                                             \
  |  |  |  |  |  |  |  |  |  |  456|      0|    uthash_free((head)->hh.tbl->buckets,                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   79|      0|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  457|      0|                (head)->hh.tbl->num_buckets * sizeof(struct UT_hash_bucket));    \
  |  |  |  |  |  |  |  |  |  |  458|      0|    uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                          \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   79|      0|#define uthash_free(ptr,sz) ndpi_free(ptr)     /* free fcn                        */
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  459|      0|    (head) = NULL;                                                               \
  |  |  |  |  |  |  |  |  |  |  460|     34|  } else {                                                                       \
  |  |  |  |  |  |  |  |  |  |  461|     34|    unsigned _hd_bkt;                                                            \
  |  |  |  |  |  |  |  |  |  |  462|     34|    if (_hd_hh_del == (head)->hh.tbl->tail) {                                    \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (462:9): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  463|     34|      (head)->hh.tbl->tail = HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->prev);     \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  137|     34|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  464|     34|    }                                                                            \
  |  |  |  |  |  |  |  |  |  |  465|     34|    if (_hd_hh_del->prev != NULL) {                                              \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (465:9): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|     34|      HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->prev)->next = _hd_hh_del->next;   \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  137|     34|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  467|     34|    } else {                                                                     \
  |  |  |  |  |  |  |  |  |  |  468|      0|      DECLTYPE_ASSIGN(head, _hd_hh_del->next);                                   \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   69|      0|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |  |  |  |  |   70|      0|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   71|      0|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   57|      0|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   72|      0|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  469|      0|    }                                                                            \
  |  |  |  |  |  |  |  |  |  |  470|     34|    if (_hd_hh_del->next != NULL) {                                              \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (470:9): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  471|      0|      HH_FROM_ELMT((head)->hh.tbl, _hd_hh_del->next)->prev = _hd_hh_del->prev;   \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  137|      0|#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle*)(void*)(((char*)(elp)) + ((tbl)->hho)))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|    }                                                                            \
  |  |  |  |  |  |  |  |  |  |  473|     34|    HASH_TO_BKT(_hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);        \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  431|     34|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  |  |  |  |  |  |  432|     34|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  433|     34|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  |  |  |  |  |  |  434|     34|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  474|     34|    HASH_DEL_IN_BKT((head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del);               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  790|     34|#define HASH_DEL_IN_BKT(head,delhh)                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  791|     34|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  792|     34|  UT_hash_bucket *_hd_head = &(head);                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  793|     34|  _hd_head->count--;                                                             \
  |  |  |  |  |  |  |  |  |  |  |  |  794|     34|  if (_hd_head->hh_head == (delhh)) {                                            \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (794:7): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  795|      0|    _hd_head->hh_head = (delhh)->hh_next;                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  796|      0|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  797|     34|  if ((delhh)->hh_prev) {                                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (797:7): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  798|      0|    (delhh)->hh_prev->hh_next = (delhh)->hh_next;                                \
  |  |  |  |  |  |  |  |  |  |  |  |  799|      0|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  800|     34|  if ((delhh)->hh_next) {                                                        \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (800:7): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  801|      0|    (delhh)->hh_next->hh_prev = (delhh)->hh_prev;                                \
  |  |  |  |  |  |  |  |  |  |  |  |  802|      0|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  |  |  803|     34|} while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (803:10): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  475|     34|    (head)->hh.tbl->num_items--;                                                 \
  |  |  |  |  |  |  |  |  |  |  476|     34|  }                                                                              \
  |  |  |  |  |  |  |  |  |  |  477|     34|  HASH_FSCK(hh, head, "HASH_DELETE_HH");                                         \
  |  |  |  |  |  |  |  |  |  |  478|     34|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (478:10): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|     34|      (add)->hh.tbl = NULL;                                                      \
  |  |  |  |  |  |  |  |  325|     34|      uthash_nonfatal_oom(add);                                                  \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  111|     34|#define uthash_nonfatal_oom(obj) do {} while (0)    /* non-fatal OOM error */
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (111:47): [Folded, False: 34]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  326|  32.1k|    } else {                                                                     \
  |  |  |  |  |  |  |  |  327|  32.1k|      HASH_BLOOM_ADD((head)->hh.tbl, hashval);                                   \
  |  |  |  |  |  |  |  |  328|  32.1k|      HASH_EMIT_KEY(hh, head, keyptr, keylen_in);                                \
  |  |  |  |  |  |  |  |  329|  32.1k|    }                                                                            \
  |  |  |  |  |  |  |  |  330|  32.1k|  } else {                                                                       \
  |  |  |  |  |  |  |  |  331|    101|    (add)->hh.tbl = NULL;                                                        \
  |  |  |  |  |  |  |  |  332|    101|    uthash_nonfatal_oom(add);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  111|    101|#define uthash_nonfatal_oom(obj) do {} while (0)    /* non-fatal OOM error */
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (111:47): [Folded, False: 101]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  333|    101|  }                                                                              \
  |  |  |  |  |  |  |  |  334|  32.2k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (334:10): [Folded, False: 32.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  415|  32.2k|  HASH_FSCK(hh, head, "HASH_ADD_KEYPTR_BYHASHVALUE");                            \
  |  |  |  |  |  |  416|  32.2k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (416:10): [Folded, False: 32.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  423|  32.2k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (423:10): [Folded, False: 32.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3233|       |
 3234|  32.2k|  HASH_FIND(hh, *(ndpi_str_hash_priv **)&((*h)->priv), key, key_len, ret_found);
  ------------------
  |  |  166|  32.2k|#define HASH_FIND(hh,head,keyptr,keylen,out)                                     \
  |  |  167|  32.2k|do {                                                                             \
  |  |  168|  32.2k|  (out) = NULL;                                                                  \
  |  |  169|  32.2k|  if (head) {                                                                    \
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 32.1k, False: 101]
  |  |  ------------------
  |  |  170|  32.1k|    unsigned _hf_hashv;                                                          \
  |  |  171|  32.1k|    HASH_VALUE(keyptr, keylen, _hf_hashv);                                       \
  |  |  ------------------
  |  |  |  |  149|  32.1k|#define HASH_VALUE(keyptr,keylen,hashv)                                          \
  |  |  |  |  150|  32.1k|do {                                                                             \
  |  |  |  |  151|  32.1k|  HASH_FUNCTION(keyptr, keylen, hashv);                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|  32.1k|#define HASH_FUNCTION(keyptr,keylen,hashv) HASH_JEN(keyptr, keylen, hashv)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  648|  32.1k|#define HASH_JEN(key,keylen,hashv)                                               \
  |  |  |  |  |  |  |  |  649|  32.1k|do {                                                                             \
  |  |  |  |  |  |  |  |  650|  32.1k|  unsigned _hj_i,_hj_j,_hj_k;                                                    \
  |  |  |  |  |  |  |  |  651|  32.1k|  unsigned const char *_hj_key=(unsigned const char*)(key);                      \
  |  |  |  |  |  |  |  |  652|  32.1k|  hashv = 0xfeedbeefu;                                                           \
  |  |  |  |  |  |  |  |  653|  32.1k|  _hj_i = _hj_j = 0x9e3779b9u;                                                   \
  |  |  |  |  |  |  |  |  654|  32.1k|  _hj_k = (unsigned)(keylen);                                                    \
  |  |  |  |  |  |  |  |  655|  78.2k|  while (_hj_k >= 12U) {                                                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (655:10): [True: 46.0k, False: 32.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  656|  46.0k|    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
  |  |  |  |  |  |  |  |  657|  46.0k|        + ( (unsigned)_hj_key[2] << 16 )                                         \
  |  |  |  |  |  |  |  |  658|  46.0k|        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  659|  46.0k|    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
  |  |  |  |  |  |  |  |  660|  46.0k|        + ( (unsigned)_hj_key[6] << 16 )                                         \
  |  |  |  |  |  |  |  |  661|  46.0k|        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
  |  |  |  |  |  |  |  |  662|  46.0k|    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
  |  |  |  |  |  |  |  |  663|  46.0k|        + ( (unsigned)_hj_key[10] << 16 )                                        \
  |  |  |  |  |  |  |  |  664|  46.0k|        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
  |  |  |  |  |  |  |  |  665|  46.0k|                                                                                 \
  |  |  |  |  |  |  |  |  666|  46.0k|     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  635|  46.0k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  636|  46.0k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  637|  46.0k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  638|  46.0k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  639|  46.0k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  640|  46.0k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  641|  46.0k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  642|  46.0k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  643|  46.0k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  644|  46.0k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  645|  46.0k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  646|  46.0k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 46.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  667|  46.0k|                                                                                 \
  |  |  |  |  |  |  |  |  668|  46.0k|     _hj_key += 12;                                                              \
  |  |  |  |  |  |  |  |  669|  46.0k|     _hj_k -= 12U;                                                               \
  |  |  |  |  |  |  |  |  670|  46.0k|  }                                                                              \
  |  |  |  |  |  |  |  |  671|  32.1k|  hashv += (unsigned)(keylen);                                                   \
  |  |  |  |  |  |  |  |  672|  32.1k|  switch ( _hj_k ) {                                                             \
  |  |  |  |  |  |  |  |  673|  3.03k|    case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (673:5): [True: 3.03k, False: 29.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  674|  6.63k|    case 10: hashv += ( (unsigned)_hj_key[9] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (674:5): [True: 3.60k, False: 28.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  675|  10.0k|    case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (675:5): [True: 3.38k, False: 28.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  676|  13.7k|    case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (676:5): [True: 3.70k, False: 28.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  677|  17.2k|    case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (677:5): [True: 3.51k, False: 28.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  678|  18.9k|    case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (678:5): [True: 1.75k, False: 30.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  679|  20.3k|    case 5:  _hj_j += _hj_key[4];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (679:5): [True: 1.37k, False: 30.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  680|  21.9k|    case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (680:5): [True: 1.57k, False: 30.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  681|  24.2k|    case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );  /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (681:5): [True: 2.28k, False: 29.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  682|  25.8k|    case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );   /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (682:5): [True: 1.66k, False: 30.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  683|  29.4k|    case 1:  _hj_i += _hj_key[0];                      /* FALLTHROUGH */         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (683:5): [True: 3.51k, False: 28.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  684|  32.1k|    default: ;                                                                   \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (684:5): [True: 2.74k, False: 29.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  685|  32.1k|  }                                                                              \
  |  |  |  |  |  |  |  |  686|  32.1k|  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  635|  32.1k|#define HASH_JEN_MIX(a,b,c)                                                      \
  |  |  |  |  |  |  |  |  |  |  636|  32.1k|do {                                                                             \
  |  |  |  |  |  |  |  |  |  |  637|  32.1k|  a -= b; a -= c; a ^= ( c >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  638|  32.1k|  b -= c; b -= a; b ^= ( a << 8 );                                               \
  |  |  |  |  |  |  |  |  |  |  639|  32.1k|  c -= a; c -= b; c ^= ( b >> 13 );                                              \
  |  |  |  |  |  |  |  |  |  |  640|  32.1k|  a -= b; a -= c; a ^= ( c >> 12 );                                              \
  |  |  |  |  |  |  |  |  |  |  641|  32.1k|  b -= c; b -= a; b ^= ( a << 16 );                                              \
  |  |  |  |  |  |  |  |  |  |  642|  32.1k|  c -= a; c -= b; c ^= ( b >> 5 );                                               \
  |  |  |  |  |  |  |  |  |  |  643|  32.1k|  a -= b; a -= c; a ^= ( c >> 3 );                                               \
  |  |  |  |  |  |  |  |  |  |  644|  32.1k|  b -= c; b -= a; b ^= ( a << 10 );                                              \
  |  |  |  |  |  |  |  |  |  |  645|  32.1k|  c -= a; c -= b; c ^= ( b >> 15 );                                              \
  |  |  |  |  |  |  |  |  |  |  646|  32.1k|} while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (646:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  687|  32.1k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (687:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  152|  32.1k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:10): [Folded, False: 32.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  172|  32.1k|    HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out);             \
  |  |  ------------------
  |  |  |  |  154|  32.1k|#define HASH_FIND_BYHASHVALUE(hh,head,keyptr,keylen,hashval,out)                 \
  |  |  |  |  155|  32.1k|do {                                                                             \
  |  |  |  |  156|  32.1k|  (out) = NULL;                                                                  \
  |  |  |  |  157|  32.1k|  if (head) {                                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (157:7): [True: 32.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  158|  32.1k|    unsigned _hf_bkt;                                                            \
  |  |  |  |  159|  32.1k|    HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _hf_bkt);                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|  32.1k|#define HASH_TO_BKT(hashv,num_bkts,bkt)                                          \
  |  |  |  |  |  |  432|  32.1k|do {                                                                             \
  |  |  |  |  |  |  433|  32.1k|  bkt = ((hashv) & ((num_bkts) - 1U));                                           \
  |  |  |  |  |  |  434|  32.1k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  160|  32.1k|    if (HASH_BLOOM_TEST((head)->hh.tbl, hashval) != 0) {                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  209|  32.1k|#define HASH_BLOOM_TEST(tbl,hashv) (1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (160:9): [True: 32.1k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  161|  32.1k|      HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  746|  32.1k|#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,hashval,out)               \
  |  |  |  |  |  |  747|  32.1k|do {                                                                             \
  |  |  |  |  |  |  748|  32.1k|  if ((head).hh_head != NULL) {                                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (748:7): [True: 32.1k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  749|  32.1k|    DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (head).hh_head));                     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  32.1k|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |   70|  32.1k|do {                                                                             \
  |  |  |  |  |  |  |  |   71|  32.1k|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   57|  32.1k|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  32.1k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  750|  32.1k|  } else {                                                                       \
  |  |  |  |  |  |  751|      0|    (out) = NULL;                                                                \
  |  |  |  |  |  |  752|      0|  }                                                                              \
  |  |  |  |  |  |  753|  33.4k|  while ((out) != NULL) {                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (753:10): [True: 33.3k, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  754|  33.3k|    if ((out)->hh.hashv == (hashval) && (out)->hh.keylen == (keylen_in)) {       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (754:9): [True: 32.1k, False: 1.24k]
  |  |  |  |  |  |  |  Branch (754:41): [True: 32.1k, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  755|  32.1k|      if (HASH_KEYCMP((out)->hh.key, keyptr, keylen_in) == 0) {                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   93|  32.1k|#define HASH_KEYCMP(a,b,n) memcmp(a,b,n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (755:11): [True: 32.1k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  756|  32.1k|        break;                                                                   \
  |  |  |  |  |  |  757|  32.1k|      }                                                                          \
  |  |  |  |  |  |  758|  32.1k|    }                                                                            \
  |  |  |  |  |  |  759|  33.3k|    if ((out)->hh.hh_next != NULL) {                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (759:9): [True: 1.22k, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  760|  1.22k|      DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (out)->hh.hh_next));                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  1.22k|#define DECLTYPE_ASSIGN(dst,src)                                                 \
  |  |  |  |  |  |  |  |   70|  1.22k|do {                                                                             \
  |  |  |  |  |  |  |  |   71|  1.22k|  (dst) = DECLTYPE(dst)(src);                                                    \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   57|  1.22k|#define DECLTYPE(x) (__typeof(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  1.22k|} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:10): [Folded, False: 1.22k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  761|  1.22k|    } else {                                                                     \
  |  |  |  |  |  |  762|     34|      (out) = NULL;                                                              \
  |  |  |  |  |  |  763|     34|    }                                                                            \
  |  |  |  |  |  |  764|  1.25k|  }                                                                              \
  |  |  |  |  |  |  765|  32.1k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (765:10): [Folded, False: 32.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  162|  32.1k|    }                                                                            \
  |  |  |  |  163|  32.1k|  }                                                                              \
  |  |  |  |  164|  32.1k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (164:10): [Folded, False: 32.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|  32.1k|  }                                                                              \
  |  |  174|  32.2k|} while (0)
  |  |  ------------------
  |  |  |  Branch (174:10): [Folded, False: 32.2k]
  |  |  ------------------
  ------------------
 3235|  32.2k|  if(ret_found == NULL) {
  ------------------
  |  Branch (3235:6): [True: 135, False: 32.1k]
  ------------------
 3236|       |    /* The insertion failed (because of a memory allocation error) */
 3237|    135|    ndpi_free(item->key);
 3238|    135|    ndpi_free(item);
 3239|    135|    return 4;
 3240|    135|  }
 3241|       |
 3242|  32.1k|  return 0;
 3243|  32.2k|}
ndpi_is_valid_protoId:
 3936|   103M|u_int8_t ndpi_is_valid_protoId(const struct ndpi_detection_module_struct *ndpi_str, u_int16_t protoId) {
 3937|   103M|  if(!ndpi_str)
  ------------------
  |  Branch (3937:6): [True: 0, False: 103M]
  ------------------
 3938|      0|    return 0;
 3939|   103M|  return(protoId >= ndpi_str->num_supported_protocols ? 0 : 1);
  ------------------
  |  Branch (3939:10): [True: 0, False: 103M]
  ------------------
 3940|   103M|}
ndpi_vsnprintf:
 3979|  99.0k|{
 3980|       |#ifdef WIN32
 3981|       |  if((str == NULL) || (size == 0) || (format == NULL)) {
 3982|       |    return -1;
 3983|       |  }
 3984|       |
 3985|       |  int ret = vsnprintf_s(str, size, _TRUNCATE, format, va_args);
 3986|       |
 3987|       |  if(ret < 0) {
 3988|       |    return size;
 3989|       |  } else {
 3990|       |    return ret;
 3991|       |  }
 3992|       |#else
 3993|  99.0k|  return vsnprintf(str, size, format, va_args);
 3994|  99.0k|#endif
 3995|  99.0k|}
ndpi_snprintf:
 4012|  99.0k|int ndpi_snprintf(char * str, size_t size, char const * format, ...) {
 4013|  99.0k|  va_list va_args;
 4014|       |
 4015|  99.0k|  va_start(va_args, format);
 4016|  99.0k|  int rc = ndpi_vsnprintf(str, size, format, va_args);
 4017|  99.0k|  va_end(va_args);
 4018|       |
 4019|       |  /*
 4020|       |    ndpi_snprintf wraps standard snprintf, which returns the number of characters that would
 4021|       |    have been written (not the number actually written) when the output is truncated.
 4022|       |    So if rc >= size, only size - 1 characters were actually written, but tls_s_len is
 4023|       |    advanced by rc. This has two consequences:
 4024|       |  */
 4025|       |
 4026|  99.0k|  if(rc >= (int)size)
  ------------------
  |  Branch (4026:6): [True: 694, False: 98.3k]
  ------------------
 4027|    694|    rc = size - 1;
 4028|       |  
 4029|  99.0k|  return(rc);
 4030|  99.0k|}
ndpi_nearest_power_of_two:
 4257|  5.18k|u_int32_t ndpi_nearest_power_of_two(u_int32_t x) {
 4258|  5.18k|  x--;
 4259|       |
 4260|  5.18k|  x |= x >> 1;
 4261|  5.18k|  x |= x >> 2;
 4262|  5.18k|  x |= x >> 4;
 4263|  5.18k|  x |= x >> 8;
 4264|  5.18k|  x |= x >> 16;
 4265|       |
 4266|  5.18k|  x++;
 4267|  5.18k|  return(x);
 4268|  5.18k|}
ndpi_strtonum:
 4281|   154k|		      int64_t maxval, const char **errstrp, int base) {
 4282|   154k|  int64_t val = 0;
 4283|   154k|  char* endptr;
 4284|       |
 4285|   154k|  if (minval > maxval) {
  ------------------
  |  Branch (4285:7): [True: 0, False: 154k]
  ------------------
 4286|      0|    *errstrp = "minval > maxval";
 4287|      0|    return 0;
 4288|      0|  }
 4289|       |
 4290|   154k|  errno = 0;    /* To distinguish success/failure after call */
 4291|   154k|  val = (int64_t)strtoll(numstr, &endptr, base);
 4292|       |
 4293|   154k|  if((val == LLONG_MIN && errno == ERANGE) || (val < minval)) {
  ------------------
  |  Branch (4293:7): [True: 468, False: 153k]
  |  Branch (4293:27): [True: 203, False: 265]
  |  Branch (4293:47): [True: 4.28k, False: 149k]
  ------------------
 4294|  4.48k|    *errstrp = "value too small";
 4295|  4.48k|    return 0;
 4296|  4.48k|  }
 4297|       |
 4298|   149k|  if((val == LLONG_MAX && errno == ERANGE) || (val > maxval )) {
  ------------------
  |  Branch (4298:7): [True: 575, False: 149k]
  |  Branch (4298:27): [True: 363, False: 212]
  |  Branch (4298:47): [True: 1.38k, False: 148k]
  ------------------
 4299|  1.75k|    *errstrp = "value too large";
 4300|  1.75k|    return 0;
 4301|  1.75k|  }
 4302|       |
 4303|   148k|  if(errno != 0 && val == 0) {
  ------------------
  |  Branch (4303:6): [True: 0, False: 148k]
  |  Branch (4303:20): [True: 0, False: 0]
  ------------------
 4304|      0|    *errstrp = "generic error";
 4305|      0|    return 0;
 4306|      0|  }
 4307|       |
 4308|   148k|  if(endptr == numstr) {
  ------------------
  |  Branch (4308:6): [True: 244, False: 147k]
  ------------------
 4309|    244|    *errstrp = "No digits were found";
 4310|    244|    return 0;
 4311|    244|  }
 4312|       |  /* Like the original strtonum, we allow further characters after the number */
 4313|       |
 4314|   147k|  *errstrp = NULL;
 4315|   147k|  return val;
 4316|   148k|}
ndpi_bitmask_alloc:
 4965|  21.1k|{
 4966|  21.1k|  if(!b)
  ------------------
  |  Branch (4966:6): [True: 0, False: 21.1k]
  ------------------
 4967|      0|    return -1;
 4968|  21.1k|  b->fds = ndpi_calloc(howmanybits(max_bits, sizeof(ndpi_ndpi_mask)), sizeof(ndpi_ndpi_mask));
  ------------------
  |  |  104|  21.1k|#define howmanybits(x, y)   (((x)+((y)-1))/(y))
  ------------------
 4969|  21.1k|  if(!b->fds)
  ------------------
  |  Branch (4969:6): [True: 13, False: 21.1k]
  ------------------
 4970|     13|    return -1;
 4971|  21.1k|  b->max_bits = max_bits;
 4972|  21.1k|  b->num_fds = howmanybits(max_bits, sizeof(ndpi_ndpi_mask));
  ------------------
  |  |  104|  21.1k|#define howmanybits(x, y)   (((x)+((y)-1))/(y))
  ------------------
 4973|  21.1k|  return 0;
 4974|  21.1k|}
ndpi_bitmask_free:
 4977|  21.4k|{
 4978|  21.4k|  if(b) {
  ------------------
  |  Branch (4978:6): [True: 21.4k, False: 0]
  ------------------
 4979|  21.4k|    ndpi_free(b->fds);
 4980|  21.4k|    b->num_fds = 0;
 4981|  21.4k|  }
 4982|  21.4k|}
ndpi_bitmask_set_all:
 5004|  17.5k|{
 5005|  17.5k|  if(b && b->fds)
  ------------------
  |  Branch (5005:6): [True: 17.5k, False: 0]
  |  Branch (5005:11): [True: 17.5k, False: 0]
  ------------------
 5006|  17.5k|    memset(b->fds, 0xFF, b->num_fds * sizeof(ndpi_ndpi_mask));
 5007|  17.5k|}
ndpi_bitmask_reset:
 5010|  7.03k|{
 5011|  7.03k|  if(b && b->fds)
  ------------------
  |  Branch (5011:6): [True: 7.03k, False: 0]
  |  Branch (5011:11): [True: 7.03k, False: 0]
  ------------------
 5012|  7.03k|    memset(b->fds, 0x00, b->num_fds * sizeof(ndpi_ndpi_mask));
 5013|  7.03k|}
ndpi_list_init:
 6053|  34.2k|void ndpi_list_init(ndpi_list *l) {
 6054|  34.2k|  l->value = NULL, l->next = NULL;
 6055|  34.2k|}

ac_automata_init:
  164|  14.2k|{
  165|  14.2k|  AC_AUTOMATA_t * thiz;
  166|       |//  if(!mc) return NULL;
  167|  14.2k|  thiz = (AC_AUTOMATA_t *)acho_calloc(1,sizeof(AC_AUTOMATA_t));
  ------------------
  |  |  107|  14.2k|#define acho_calloc(a,b) ndpi_calloc(a,b)
  ------------------
  168|  14.2k|  if(!thiz) return NULL;
  ------------------
  |  Branch (168:6): [True: 1.85k, False: 12.3k]
  ------------------
  169|  12.3k|  thiz->root = node_create ();
  170|  12.3k|  if(!thiz->root) {
  ------------------
  |  Branch (170:6): [True: 456, False: 11.9k]
  ------------------
  171|    456|      acho_free(thiz);
  ------------------
  |  |  109|    456|#define acho_free(a) ndpi_free(a)
  ------------------
  172|    456|      return NULL;
  173|    456|  }
  174|  11.9k|  thiz->root->id = 1;
  175|  11.9k|  thiz->root->root = 1;
  176|  11.9k|  thiz->total_patterns = 0;
  177|  11.9k|  thiz->automata_open = 1;
  178|  11.9k|  thiz->match_handler = mc;
  179|  11.9k|  thiz->to_lc = 0;
  180|  11.9k|  thiz->no_root_range = 0;
  181|  11.9k|  thiz->add_to_range = REALLOC_CHUNK_OUTGOING*2;
  ------------------
  |  |   36|  11.9k|#define REALLOC_CHUNK_OUTGOING 8
  ------------------
  182|  11.9k|  return thiz;
  183|  12.3k|}
ac_automata_feature:
  194|  11.8k|{
  195|  11.8k|  if(!thiz) return ACERR_ERROR;
  ------------------
  |  Branch (195:6): [True: 0, False: 11.8k]
  ------------------
  196|  11.8k|  if(thiz->all_nodes_num || thiz->total_patterns) return ACERR_ERROR;
  ------------------
  |  Branch (196:6): [True: 0, False: 11.8k]
  |  Branch (196:29): [True: 0, False: 11.8k]
  ------------------
  197|  11.8k|  thiz->to_lc = (feature & AC_FEATURE_LC) != 0;
  ------------------
  |  |  256|  11.8k|#define AC_FEATURE_LC 2
  ------------------
  198|  11.8k|  thiz->no_root_range = (feature & AC_FEATURE_NO_ROOT_RANGE) != 0;
  ------------------
  |  |  257|  11.8k|#define AC_FEATURE_NO_ROOT_RANGE 4
  ------------------
  199|  11.8k|  return ACERR_SUCCESS;
  200|  11.8k|}
ac_automata_name:
  203|  11.8k|{
  204|  11.8k|  if(!thiz) return ACERR_ERROR;
  ------------------
  |  Branch (204:6): [True: 0, False: 11.8k]
  ------------------
  205|  11.8k|  strncpy(thiz->name,name,sizeof(thiz->name)-1);
  206|  11.8k|  thiz->debug = debug != 0;
  207|  11.8k|  return ACERR_SUCCESS;
  208|  11.8k|}
ac_automata_add:
  226|  27.7k|{
  227|  27.7k|  unsigned int i;
  228|  27.7k|  AC_NODE_t * n;
  229|  27.7k|  AC_NODE_t * next;
  230|  27.7k|  AC_ALPHABET_t alpha;
  231|       |
  232|  27.7k|  if(!thiz || !patt || !patt->astring)
  ------------------
  |  Branch (232:6): [True: 0, False: 27.7k]
  |  Branch (232:15): [True: 0, False: 27.7k]
  |  Branch (232:24): [True: 0, False: 27.7k]
  ------------------
  233|      0|    return ACERR_ERROR;
  234|       |
  235|  27.7k|  n = thiz->root;
  236|       |
  237|  27.7k|  if(!thiz->automata_open)
  ------------------
  |  Branch (237:6): [True: 0, False: 27.7k]
  ------------------
  238|      0|    return ACERR_AUTOMATA_CLOSED;
  239|       |
  240|  27.7k|  if (!patt->length)
  ------------------
  |  Branch (240:7): [True: 436, False: 27.3k]
  ------------------
  241|    436|    return ACERR_ZERO_PATTERN;
  242|       |
  243|  27.3k|  if (patt->length > AC_PATTRN_MAX_LENGTH)
  ------------------
  |  |   29|  27.3k|#define AC_PATTRN_MAX_LENGTH 256
  ------------------
  |  Branch (243:7): [True: 423, False: 26.9k]
  ------------------
  244|    423|    return ACERR_LONG_PATTERN;
  245|       |
  246|   203k|  for (i=0; i<patt->length; i++) {
  ------------------
  |  Branch (246:13): [True: 180k, False: 22.4k]
  ------------------
  247|   180k|      alpha = patt->astring[i];
  248|   180k|      if(thiz->to_lc)
  ------------------
  |  Branch (248:10): [True: 180k, False: 0]
  ------------------
  249|   180k|           alpha = (AC_ALPHABET_t)aho_lc[(uint8_t)alpha];
  250|       |
  251|   180k|      if((next = node_find_next(n, alpha)) != 0) {
  ------------------
  |  Branch (251:10): [True: 109k, False: 70.9k]
  ------------------
  252|   109k|          n = next;
  253|   109k|          continue;
  254|   109k|      }
  255|  70.9k|      if(!(next = node_create_next(n, alpha)))
  ------------------
  |  Branch (255:10): [True: 4.50k, False: 66.4k]
  ------------------
  256|  4.50k|              return ACERR_ERROR;
  257|  66.4k|      next->id = ++thiz->id;
  258|  66.4k|      thiz->all_nodes_num++;
  259|  66.4k|      n = next;
  260|  66.4k|    }
  261|  22.4k|  if(thiz->max_str_len < patt->length)
  ------------------
  |  Branch (261:6): [True: 1.13k, False: 21.2k]
  ------------------
  262|  1.13k|     thiz->max_str_len = patt->length;
  263|       |
  264|  22.4k|  if(n->final && n->matched_patterns) {
  ------------------
  |  Branch (264:6): [True: 15.9k, False: 6.43k]
  |  Branch (264:18): [True: 15.7k, False: 205]
  ------------------
  265|       |    /* original code */
  266|  15.7k|    patt->rep.number = n->matched_patterns->patterns[0].rep.number;
  267|  15.7k|    return ACERR_DUPLICATE_PATTERN;
  268|  15.7k|  }
  269|       |
  270|  6.64k|  if(node_register_matchstr(n, patt, 0))
  ------------------
  |  Branch (270:6): [True: 481, False: 6.15k]
  ------------------
  271|    481|      return ACERR_ERROR;
  272|       |
  273|  6.15k|  thiz->total_patterns++;
  274|       |
  275|  6.15k|  return ACERR_SUCCESS;
  276|  6.64k|}
ac_automata_walk:
  280|  11.9k|{
  281|  11.9k|  unsigned int ip;
  282|  11.9k|  AC_NODE_t *next, *n;
  283|  11.9k|  struct ac_path * path = thiz->ac_path;
  284|  11.9k|  AC_ERROR_t r;
  285|       |
  286|  11.9k|  ip = 1;
  287|  11.9k|  path[1].n = thiz->root;
  288|  11.9k|  path[1].idx = 0;
  289|       |
  290|   156k|  while(ip) {
  ------------------
  |  Branch (290:9): [True: 144k, False: 11.9k]
  ------------------
  291|   144k|    unsigned int i,last;
  292|   144k|    n = path[ip].n;
  293|   144k|    i = path[ip].idx;
  294|   144k|    last = !n->outgoing || (n->one && i > 0) || (!n->one && i >= n->outgoing->degree);
  ------------------
  |  Branch (294:12): [True: 19.0k, False: 125k]
  |  Branch (294:29): [True: 112k, False: 13.1k]
  |  Branch (294:39): [True: 56.3k, False: 56.3k]
  |  Branch (294:50): [True: 13.1k, False: 56.3k]
  |  Branch (294:61): [True: 3.02k, False: 10.1k]
  ------------------
  295|   144k|    if(node_cb && (!i || last)) {
  ------------------
  |  Branch (295:8): [True: 144k, False: 0]
  |  Branch (295:20): [True: 78.4k, False: 66.4k]
  |  Branch (295:26): [True: 59.3k, False: 7.13k]
  ------------------
  296|   137k|            r = node_cb(thiz, n, i, data);
  297|   137k|            if(r != ACERR_SUCCESS) return r;
  ------------------
  |  Branch (297:16): [True: 0, False: 137k]
  ------------------
  298|   137k|    }
  299|   144k|    if(last) {
  ------------------
  |  Branch (299:8): [True: 78.4k, False: 66.4k]
  ------------------
  300|  78.4k|        ip--; continue;
  301|  78.4k|    }
  302|  66.4k|    next = NULL;
  303|  66.4k|    if(n->one) {
  ------------------
  |  Branch (303:8): [True: 56.3k, False: 10.1k]
  ------------------
  304|  56.3k|        next = (AC_NODE_t *)n->outgoing;
  305|  56.3k|    } else {
  306|  10.1k|        while(i < n->outgoing->degree) {
  ------------------
  |  Branch (306:15): [True: 10.1k, False: 0]
  ------------------
  307|  10.1k|            next = n->outgoing->next[i];
  308|  10.1k|            if(next) break;
  ------------------
  |  Branch (308:16): [True: 10.1k, False: 0]
  ------------------
  309|      0|            i++;
  310|      0|        }
  311|  10.1k|    }
  312|  66.4k|    if(!next) {
  ------------------
  |  Branch (312:8): [True: 0, False: 66.4k]
  ------------------
  313|      0|        if(!n->range || i >= n->outgoing->degree) {
  ------------------
  |  Branch (313:12): [True: 0, False: 0]
  |  Branch (313:25): [True: 0, False: 0]
  ------------------
  314|      0|            r = node_cb ? node_cb(thiz, n, i, data):ACERR_SUCCESS;
  ------------------
  |  Branch (314:17): [True: 0, False: 0]
  ------------------
  315|      0|            if(r != ACERR_SUCCESS) return r;
  ------------------
  |  Branch (315:16): [True: 0, False: 0]
  ------------------
  316|      0|        }
  317|      0|        ip--; continue;
  318|      0|    }
  319|       |
  320|  66.4k|    if(n->depth < AC_PATTRN_MAX_LENGTH) {
  ------------------
  |  |   29|  66.4k|#define AC_PATTRN_MAX_LENGTH 256
  ------------------
  |  Branch (320:8): [True: 66.4k, False: 0]
  ------------------
  321|  66.4k|            path[n->depth].l = n->one ? n->one_alpha:
  ------------------
  |  Branch (321:32): [True: 56.3k, False: 10.1k]
  ------------------
  322|  66.4k|                                    edge_get_alpha(n->outgoing)[i];
  323|  66.4k|            if(alpha_cb)
  ------------------
  |  Branch (323:16): [True: 0, False: 66.4k]
  ------------------
  324|      0|                alpha_cb(thiz, n, next, i, data);
  325|  66.4k|    }
  326|       |
  327|  66.4k|    path[ip].idx = i+1;
  328|  66.4k|    if(ip > AC_PATTRN_MAX_LENGTH)
  ------------------
  |  |   29|  66.4k|#define AC_PATTRN_MAX_LENGTH 256
  ------------------
  |  Branch (328:8): [True: 0, False: 66.4k]
  ------------------
  329|      0|        continue;
  330|       |
  331|  66.4k|    ip++;
  332|       |
  333|  66.4k|    path[ip].n = next;
  334|  66.4k|    path[ip].idx = 0;
  335|       |
  336|  66.4k|  }
  337|  11.9k|  return ACERR_SUCCESS;
  338|  11.9k|}
ac_automata_release:
  597|  11.9k|void ac_automata_release (AC_AUTOMATA_t * thiz, uint8_t free_pattern) {
  598|       |
  599|  11.9k|    if(!thiz)
  ------------------
  |  Branch (599:8): [True: 0, False: 11.9k]
  ------------------
  600|      0|      return;
  601|       |
  602|  11.9k|    ac_automata_walk(thiz,ac_automata_release_node,NULL,free_pattern ? (void *)1:NULL);
  ------------------
  |  Branch (602:57): [True: 9.73k, False: 2.20k]
  ------------------
  603|       |
  604|  11.9k|    if(free_pattern <= 1) {
  ------------------
  |  Branch (604:8): [True: 11.9k, False: 0]
  ------------------
  605|  11.9k|        node_release(thiz->root,free_pattern | 0x4);
  606|  11.9k|        thiz->root = NULL;
  607|  11.9k|        acho_free(thiz);
  ------------------
  |  |  109|  11.9k|#define acho_free(a) ndpi_free(a)
  ------------------
  608|  11.9k|    } else {
  609|      0|        AC_NODE_t *n;
  610|      0|        thiz->all_nodes_num  = 0;
  611|      0|        thiz->total_patterns = 0;
  612|      0|        thiz->max_str_len    = 0;
  613|      0|        thiz->automata_open  = 1;
  614|       |
  615|      0|        n = thiz->root;
  616|      0|        n->failure_node = NULL;
  617|      0|        n->id    = 0;
  618|      0|        n->final = 0;
  619|      0|        n->depth = 0;
  620|      0|        if(n->outgoing) {
  ------------------
  |  Branch (620:12): [True: 0, False: 0]
  ------------------
  621|      0|            acho_free(n->outgoing);
  ------------------
  |  |  109|      0|#define acho_free(a) ndpi_free(a)
  ------------------
  622|      0|            n->outgoing = NULL;
  623|      0|        }
  624|      0|        if(n->matched_patterns) {
  ------------------
  |  Branch (624:12): [True: 0, False: 0]
  ------------------
  625|      0|            acho_free(n->matched_patterns);
  ------------------
  |  |  109|      0|#define acho_free(a) ndpi_free(a)
  ------------------
  626|       |            n->matched_patterns=NULL;
  627|      0|        }
  628|      0|        n->use = 0;
  629|      0|        n->one = 0;
  630|      0|    }
  631|  11.9k|}
ahocorasick.c:edge_get_alpha:
   88|  62.7k|static inline AC_ALPHABET_t *edge_get_alpha(struct edge *e) {
   89|  62.7k|        return (AC_ALPHABET_t *)(&e->next[e->max]);
   90|  62.7k|}
ahocorasick.c:node_resize_outgoing:
 1091|  3.65k|static struct edge *node_resize_outgoing(struct edge * e,size_t added) {
 1092|  3.65k|struct edge *new_e;
 1093|  3.65k|int ds;
 1094|       |
 1095|  3.65k|    if(!added) added = REALLOC_CHUNK_OUTGOING;
  ------------------
  |  |   36|  3.65k|#define REALLOC_CHUNK_OUTGOING 8
  ------------------
  |  Branch (1095:8): [True: 3.65k, False: 0]
  ------------------
 1096|  3.65k|    if(!e) {
  ------------------
  |  Branch (1096:8): [True: 3.22k, False: 424]
  ------------------
 1097|  3.22k|        e = acho_calloc(1,sizeof(struct edge) + edge_data_size(REALLOC_CHUNK_OUTGOING));
  ------------------
  |  |  107|  3.22k|#define acho_calloc(a,b) ndpi_calloc(a,b)
  ------------------
 1098|  3.22k|        if(!e) return e;
  ------------------
  |  Branch (1098:12): [True: 208, False: 3.02k]
  ------------------
 1099|  3.02k|        e->max = REALLOC_CHUNK_OUTGOING;
  ------------------
  |  |   36|  3.02k|#define REALLOC_CHUNK_OUTGOING 8
  ------------------
 1100|  3.02k|        return e;
 1101|  3.22k|    }
 1102|    424|    ds = edge_data_size(e->max + added);
 1103|    424|    new_e = acho_calloc(1,sizeof(struct edge) + ds);
  ------------------
  |  |  107|    424|#define acho_calloc(a,b) ndpi_calloc(a,b)
  ------------------
 1104|    424|    if(!new_e) return new_e;
  ------------------
  |  Branch (1104:8): [True: 53, False: 371]
  ------------------
 1105|    371|    memcpy(new_e,e,sizeof(struct edge) + sizeof(AC_NODE_t *)*e->max);
 1106|    371|    new_e->max += added;
 1107|       |
 1108|    371|    if(e->degree)
  ------------------
  |  Branch (1108:8): [True: 371, False: 0]
  ------------------
 1109|    371|        memcpy(edge_get_alpha(new_e),edge_get_alpha(e),e->degree);
 1110|       |
 1111|    371|    acho_free(e);
  ------------------
  |  |  109|    371|#define acho_free(a) ndpi_free(a)
  ------------------
 1112|    371|    return new_e;
 1113|    424|}
ahocorasick.c:edge_data_size:
   91|  3.65k|static inline size_t edge_data_size(int num) {
   92|  3.65k|        return sizeof(void *)*num + ((num + sizeof(void *) - 1) & ~(sizeof(void *)-1));
   93|  3.65k|}
ahocorasick.c:ac_automata_release_node:
  584|   137k|        AC_NODE_t *n, int idx, void *data) {
  585|       |
  586|   137k|    if(!n->outgoing || idx) {
  ------------------
  |  Branch (586:8): [True: 19.0k, False: 118k]
  |  Branch (586:24): [True: 59.3k, False: 59.3k]
  ------------------
  587|  78.4k|        if(n->outgoing) {
  ------------------
  |  Branch (587:12): [True: 59.3k, False: 19.0k]
  ------------------
  588|  59.3k|          if(n->one) thiz->n_oc--;
  ------------------
  |  Branch (588:14): [True: 56.3k, False: 3.02k]
  ------------------
  589|  3.02k|            else if(n->range) thiz->n_range--;
  ------------------
  |  Branch (589:21): [True: 0, False: 3.02k]
  ------------------
  590|  3.02k|                  else thiz->n_find--;
  591|  59.3k|        }
  592|  78.4k|        node_release(n,data != NULL);
  593|  78.4k|    }
  594|       |
  595|   137k|    return ACERR_SUCCESS;
  596|   137k|}
ahocorasick.c:node_create:
  817|  83.3k|{
  818|  83.3k|  return  (AC_NODE_t *) acho_calloc (1,sizeof(AC_NODE_t));
  ------------------
  |  |  107|  83.3k|#define acho_calloc(a,b) ndpi_calloc(a,b)
  ------------------
  819|  83.3k|}
ahocorasick.c:node_release:
  845|  90.6k|{
  846|  90.6k|  if(thiz->root && (free_pattern & 0x4) == 0) return;
  ------------------
  |  Branch (846:6): [True: 23.8k, False: 66.7k]
  |  Branch (846:20): [True: 11.9k, False: 11.9k]
  ------------------
  847|       |
  848|  78.6k|  if(free_pattern & 1) node_release_pattern(thiz);
  ------------------
  |  Branch (848:6): [True: 76.2k, False: 2.46k]
  ------------------
  849|       |
  850|  78.6k|  if(thiz->matched_patterns) {
  ------------------
  |  Branch (850:6): [True: 6.15k, False: 72.5k]
  ------------------
  851|  6.15k|    acho_free(thiz->matched_patterns);
  ------------------
  |  |  109|  6.15k|#define acho_free(a) ndpi_free(a)
  ------------------
  852|  6.15k|    thiz->matched_patterns = NULL;
  853|  6.15k|  }
  854|  78.6k|  if(!thiz->one && thiz->outgoing) {
  ------------------
  |  Branch (854:6): [True: 22.3k, False: 56.3k]
  |  Branch (854:20): [True: 3.02k, False: 19.3k]
  ------------------
  855|  3.02k|    acho_free(thiz->outgoing);
  ------------------
  |  |  109|  3.02k|#define acho_free(a) ndpi_free(a)
  ------------------
  856|  3.02k|  }
  857|  78.6k|  thiz->outgoing = NULL;
  858|  78.6k|  acho_free(thiz);
  ------------------
  |  |  109|  78.6k|#define acho_free(a) ndpi_free(a)
  ------------------
  859|  78.6k|}
ahocorasick.c:node_release_pattern:
  823|  76.2k|{
  824|  76.2k|  int i;
  825|  76.2k|  AC_PATTERN_t * str;
  826|       |
  827|  76.2k|    if(!thiz->matched_patterns) return;
  ------------------
  |  Branch (827:8): [True: 70.0k, False: 6.15k]
  ------------------
  828|  6.15k|    str = thiz->matched_patterns->patterns;
  829|       |
  830|  12.3k|    for (i=0; i < thiz->matched_patterns->num; str++,i++)
  ------------------
  |  Branch (830:15): [True: 6.15k, False: 6.15k]
  ------------------
  831|  6.15k|    {
  832|  6.15k|      if(!str->is_existing && str->astring) {
  ------------------
  |  Branch (832:10): [True: 6.15k, False: 0]
  |  Branch (832:31): [True: 6.15k, False: 0]
  ------------------
  833|  6.15k|              acho_free(str->astring);
  ------------------
  |  |  109|  6.15k|#define acho_free(a) ndpi_free(a)
  ------------------
  834|       |              str->astring = NULL;
  835|  6.15k|      }
  836|  6.15k|    }
  837|  6.15k|}
ahocorasick.c:node_find_next:
  938|   251k|{
  939|   251k|  unsigned char *alphas, *fc;
  940|       |
  941|   251k|  if(thiz->one) return alpha == thiz->one_alpha ? (AC_NODE_t *)thiz->outgoing:NULL;
  ------------------
  |  Branch (941:6): [True: 83.9k, False: 167k]
  |  Branch (941:24): [True: 77.0k, False: 6.88k]
  ------------------
  942|   167k|  if(!thiz->outgoing) return NULL;
  ------------------
  |  Branch (942:6): [True: 126k, False: 41.7k]
  ------------------
  943|       |
  944|  41.7k|  alphas = (unsigned char *)edge_get_alpha(thiz->outgoing);
  945|  41.7k|  fc = xmemchr(alphas,(unsigned char)alpha,thiz->outgoing->degree);
  946|  41.7k|  return fc ? thiz->outgoing->next[fc-alphas] : NULL;
  ------------------
  |  Branch (946:10): [True: 32.7k, False: 8.92k]
  ------------------
  947|   167k|}
ahocorasick.c:xmemchr:
  905|  41.7k|{
  906|  83.1k|  while(n > 0) {
  ------------------
  |  Branch (906:9): [True: 75.1k, False: 8.02k]
  ------------------
  907|  75.1k|    if (n >= LBLOCKSIZE && !UNALIGNED (s)) {
  ------------------
  |  |  865|   150k|#define LBLOCKSIZE __SIZEOF_LONG__
  ------------------
                  if (n >= LBLOCKSIZE && !UNALIGNED (s)) {
  ------------------
  |  |  863|  17.9k|#define UNALIGNED(X) ((intptr_t)X & (__SIZEOF_LONG__ - 1))
  ------------------
  |  Branch (907:9): [True: 17.9k, False: 57.1k]
  |  Branch (907:28): [True: 17.9k, False: 0]
  ------------------
  908|  17.9k|      unsigned long int mask = c * DUPC;
  ------------------
  |  |  886|  17.9k|#define DUPC 0x0101010101010101UL
  ------------------
  909|       |
  910|  47.6k|      while (n >= LBLOCKSIZE) {
  ------------------
  |  |  865|  47.6k|#define LBLOCKSIZE __SIZEOF_LONG__
  ------------------
  |  Branch (910:14): [True: 41.1k, False: 6.48k]
  ------------------
  911|       |#if __SIZEOF_LONG__ == 4
  912|       |        unsigned long int nc = DETECTNULL(le32toh(*(unsigned long int *)s) ^ mask);
  913|       |#else
  914|  41.1k|        unsigned long int nc = DETECTNULL(le64toh(*(unsigned long int *)s) ^ mask);
  ------------------
  |  |  885|  41.1k|#define DETECTNULL(X) (((X) - 0x0101010101010101ULL) & ~(X) & 0x8080808080808080ULL)
  ------------------
  915|  41.1k|#endif
  916|  41.1k|        if(nc)
  ------------------
  |  Branch (916:12): [True: 11.4k, False: 29.7k]
  ------------------
  917|  11.4k|            return s + (bsf(nc) >> 3);
  918|  29.7k|        s += LBLOCKSIZE;
  ------------------
  |  |  865|  29.7k|#define LBLOCKSIZE __SIZEOF_LONG__
  ------------------
  919|  29.7k|        n -= LBLOCKSIZE;
  ------------------
  |  |  865|  29.7k|#define LBLOCKSIZE __SIZEOF_LONG__
  ------------------
  920|  29.7k|      }
  921|  6.48k|      if(!n) return NULL;
  ------------------
  |  Branch (921:10): [True: 904, False: 5.58k]
  ------------------
  922|  6.48k|    }
  923|  62.7k|    if (*s == c) return s;
  ------------------
  |  Branch (923:9): [True: 21.3k, False: 41.4k]
  ------------------
  924|  41.4k|    s++;
  925|  41.4k|    n--;
  926|  41.4k|  }
  927|  8.02k|  return NULL;
  928|  41.7k|}
ahocorasick.c:bsf:
  889|  11.4k|{
  890|  11.4k|#ifdef __GNUC__
  891|  11.4k|    return __builtin_ctzll(bits);
  892|       |#else
  893|       |    size_t i=0;
  894|       |    if(!bits) return i;
  895|       |    if((bits & 0xffffffff) == 0) { i+=32; bits >>=32; }
  896|       |    if((bits & 0xffff) == 0) { i+=16; bits >>=16; }
  897|       |    if((bits & 0xff) == 0) i+=8;
  898|       |    return i;
  899|       |#endif
  900|  11.4k|}
ahocorasick.c:node_create_next:
 1016|  70.9k|{
 1017|  70.9k|  AC_NODE_t * next;
 1018|  70.9k|  next = node_find_next (thiz, alpha);
 1019|  70.9k|  if (next)
  ------------------
  |  Branch (1019:7): [True: 0, False: 70.9k]
  ------------------
 1020|       |    /* The edge already exists */
 1021|      0|    return NULL;
 1022|       |  /* Otherwise register new edge */
 1023|  70.9k|  next = node_create ();
 1024|  70.9k|  if(next) {
  ------------------
  |  Branch (1024:6): [True: 66.7k, False: 4.24k]
  ------------------
 1025|  66.7k|    if(node_register_outgoing(thiz, next, alpha)) {
  ------------------
  |  Branch (1025:8): [True: 261, False: 66.4k]
  ------------------
 1026|    261|        node_release(next,0);
 1027|    261|        return NULL;
 1028|    261|    }
 1029|  66.4k|    next->depth = thiz->depth+1;
 1030|  66.4k|  }
 1031|       |
 1032|  70.7k|  return next;
 1033|  70.9k|}
ahocorasick.c:node_register_outgoing:
 1121|  66.7k|{
 1122|  66.7k|  struct edge *o;
 1123|  66.7k|  if(!thiz->use) {
  ------------------
  |  Branch (1123:6): [True: 59.3k, False: 7.39k]
  ------------------
 1124|  59.3k|        thiz->use = 1;
 1125|  59.3k|        thiz->one = 1;
 1126|  59.3k|        thiz->one_alpha = alpha;
 1127|  59.3k|        thiz->outgoing = (struct edge *)next;
 1128|  59.3k|        return 0;
 1129|  59.3k|  }
 1130|  7.39k|  if(thiz->one) {
  ------------------
  |  Branch (1130:6): [True: 3.22k, False: 4.16k]
  ------------------
 1131|  3.22k|        o = node_resize_outgoing(NULL,0);
 1132|  3.22k|        if(!o) return 1;
  ------------------
  |  Branch (1132:12): [True: 208, False: 3.02k]
  ------------------
 1133|  3.02k|        o->next[0] = (AC_NODE_t *)thiz->outgoing;
 1134|  3.02k|        *edge_get_alpha(o) = thiz->one_alpha;
 1135|  3.02k|        o->degree = 1;
 1136|  3.02k|        thiz->one = 0;
 1137|  3.02k|        thiz->one_alpha = 0;
 1138|  3.02k|        thiz->outgoing = o;
 1139|  3.02k|  } else
 1140|  4.16k|        o = thiz->outgoing;
 1141|       |
 1142|  7.18k|  if(!o) return 1;
  ------------------
  |  Branch (1142:6): [True: 0, False: 7.18k]
  ------------------
 1143|       |
 1144|  7.18k|  if(o->degree >= o->max)
  ------------------
  |  Branch (1144:6): [True: 424, False: 6.76k]
  ------------------
 1145|    424|    {
 1146|    424|        struct edge *new_o = node_resize_outgoing(thiz->outgoing,0);
 1147|    424|        if(!new_o) return 1;
  ------------------
  |  Branch (1147:12): [True: 53, False: 371]
  ------------------
 1148|       |
 1149|    371|        thiz->outgoing = new_o;
 1150|    371|        o = new_o;
 1151|    371|    }
 1152|  7.13k|  edge_get_alpha(o)[o->degree] = alpha;
 1153|  7.13k|  o->next[o->degree] = next;
 1154|  7.13k|  o->degree++;
 1155|  7.13k|  return 0;
 1156|  7.18k|}
ahocorasick.c:node_register_matchstr:
 1061|  6.64k|{
 1062|  6.64k|  AC_PATTERN_t *l;
 1063|       |
 1064|  6.64k|  if(!is_existing)
  ------------------
  |  Branch (1064:6): [True: 6.64k, False: 0]
  ------------------
 1065|  6.64k|      thiz->final = 1;
 1066|       |  /* Check if the new pattern already exists in the node list */
 1067|  6.64k|  if (thiz->matched_patterns && node_has_matchstr(thiz, str))
  ------------------
  |  Branch (1067:7): [True: 0, False: 6.64k]
  |  Branch (1067:33): [True: 0, False: 0]
  ------------------
 1068|      0|    return 0;
 1069|       |
 1070|  6.64k|  if(!thiz->matched_patterns) {
  ------------------
  |  Branch (1070:6): [True: 6.64k, False: 0]
  ------------------
 1071|  6.64k|    thiz->matched_patterns = node_resize_mp(thiz->matched_patterns);
 1072|  6.64k|    if(!thiz->matched_patterns)
  ------------------
  |  Branch (1072:8): [True: 481, False: 6.15k]
  ------------------
 1073|    481|      return 1;
 1074|  6.64k|  }
 1075|       |
 1076|       |  /* Manage memory */
 1077|  6.15k|  if (thiz->matched_patterns->num >= thiz->matched_patterns->max) {
  ------------------
  |  Branch (1077:7): [True: 0, False: 6.15k]
  ------------------
 1078|      0|      AC_PATTERNS_t *new_mp = node_resize_mp(thiz->matched_patterns);
 1079|      0|      if(!new_mp) return 1;
  ------------------
  |  Branch (1079:10): [True: 0, False: 0]
  ------------------
 1080|      0|      thiz->matched_patterns = new_mp;
 1081|      0|    }
 1082|  6.15k|  l = &thiz->matched_patterns->patterns[thiz->matched_patterns->num];
 1083|  6.15k|  l->astring = str->astring;
 1084|  6.15k|  l->length  = str->length;
 1085|  6.15k|  l->is_existing = is_existing;
 1086|  6.15k|  l->rep = str->rep;
 1087|  6.15k|  thiz->matched_patterns->num++;
 1088|  6.15k|  return 0;
 1089|  6.15k|}
ahocorasick.c:node_resize_mp:
 1039|  6.64k|static AC_PATTERNS_t * node_resize_mp(AC_PATTERNS_t *m) {
 1040|  6.64k|AC_PATTERNS_t *new_m;
 1041|       |
 1042|  6.64k|    if(!m) {
  ------------------
  |  Branch (1042:8): [True: 6.64k, False: 0]
  ------------------
 1043|  6.64k|        m = acho_calloc(1,mp_data_size(REALLOC_CHUNK_MATCHSTR));
  ------------------
  |  |  107|  6.64k|#define acho_calloc(a,b) ndpi_calloc(a,b)
  ------------------
 1044|  6.64k|        if(!m) return m;
  ------------------
  |  Branch (1044:12): [True: 481, False: 6.15k]
  ------------------
 1045|  6.15k|        m->max = REALLOC_CHUNK_MATCHSTR;
  ------------------
  |  |   32|  6.15k|#define REALLOC_CHUNK_MATCHSTR 8
  ------------------
 1046|  6.15k|        return m;
 1047|  6.64k|    }
 1048|      0|    new_m = acho_malloc(mp_data_size(m->max+REALLOC_CHUNK_MATCHSTR));
  ------------------
  |  |  108|      0|#define acho_malloc(a) ndpi_malloc(a)
  ------------------
 1049|      0|    if(!new_m) return new_m;
  ------------------
  |  Branch (1049:8): [True: 0, False: 0]
  ------------------
 1050|      0|    memcpy((char *)new_m,(char *)m,mp_data_size(m->max));
 1051|      0|    new_m->max += REALLOC_CHUNK_MATCHSTR;
  ------------------
  |  |   32|      0|#define REALLOC_CHUNK_MATCHSTR 8
  ------------------
 1052|      0|    acho_free(m);
  ------------------
  |  |  109|      0|#define acho_free(a) ndpi_free(a)
  ------------------
 1053|      0|    return new_m;
 1054|      0|}
ahocorasick.c:mp_data_size:
 1035|  6.64k|static inline size_t mp_data_size(int n) {
 1036|  6.64k|    return sizeof(AC_PATTERNS_t) + n*sizeof(AC_PATTERN_t);
 1037|  6.64k|}

ndpi_patricia_new:
  310|  28.2k|{
  311|  28.2k|  ndpi_patricia_tree_t *patricia = (ndpi_patricia_tree_t*)ndpi_calloc(1, sizeof *patricia);
  312|  28.2k|  if(!patricia)
  ------------------
  |  Branch (312:6): [True: 401, False: 27.8k]
  ------------------
  313|    401|    return (NULL);
  314|       |
  315|  27.8k|  patricia->maxbits = maxbits;
  316|  27.8k|  patricia->head = NULL;
  317|  27.8k|  patricia->num_active_node = 0;
  318|  27.8k|  assert((u_int16_t)maxbits <= PATRICIA_MAXBITS); /* XXX */
  ------------------
  |  Branch (318:3): [True: 0, False: 27.8k]
  |  Branch (318:3): [True: 27.8k, False: 0]
  ------------------
  319|  27.8k|  num_active_patricia++;
  320|  27.8k|  return (patricia);
  321|  27.8k|}
ndpi_Clear_Patricia:
  330|  27.8k|{
  331|  27.8k|  if(!patricia)
  ------------------
  |  Branch (331:6): [True: 0, False: 27.8k]
  ------------------
  332|      0|    return;
  333|       |
  334|  27.8k|  if(patricia->head) {
  ------------------
  |  Branch (334:6): [True: 710, False: 27.1k]
  ------------------
  335|       |
  336|    710|    ndpi_patricia_node_t *Xstack[PATRICIA_MAXBITS+1];
  337|    710|    ndpi_patricia_node_t **Xsp = Xstack;
  338|    710|    ndpi_patricia_node_t *Xrn = patricia->head;
  339|       |
  340|  6.89k|    while (Xrn) {
  ------------------
  |  Branch (340:12): [True: 6.18k, False: 710]
  ------------------
  341|  6.18k|      ndpi_patricia_node_t *l = Xrn->l;
  342|  6.18k|      ndpi_patricia_node_t *r = Xrn->r;
  343|       |
  344|  6.18k|      if(Xrn->prefix) {
  ------------------
  |  Branch (344:10): [True: 3.79k, False: 2.39k]
  ------------------
  345|  3.79k|	ndpi_Deref_Prefix (Xrn->prefix);
  346|  3.79k|	if(Xrn->data && func)
  ------------------
  |  Branch (346:5): [True: 687, False: 3.10k]
  |  Branch (346:18): [True: 687, False: 0]
  ------------------
  347|    687|	  func (Xrn->data);
  348|  3.79k|      }
  349|  2.39k|      else {
  350|  2.39k|	assert (Xrn->data == NULL);
  ------------------
  |  Branch (350:2): [True: 0, False: 2.39k]
  |  Branch (350:2): [True: 2.39k, False: 0]
  ------------------
  351|  2.39k|      }
  352|  6.18k|      ndpi_DeleteEntry (Xrn);
  353|  6.18k|      patricia->num_active_node--;
  354|       |
  355|  6.18k|      if(l) {
  ------------------
  |  Branch (355:10): [True: 2.85k, False: 3.32k]
  ------------------
  356|  2.85k|	if(r) {
  ------------------
  |  Branch (356:5): [True: 2.51k, False: 339]
  ------------------
  357|  2.51k|	  *Xsp++ = r;
  358|  2.51k|	}
  359|  2.85k|	Xrn = l;
  360|  3.32k|      } else if(r) {
  ------------------
  |  Branch (360:17): [True: 102, False: 3.22k]
  ------------------
  361|    102|	Xrn = r;
  362|  3.22k|      } else if(Xsp != Xstack) {
  ------------------
  |  Branch (362:17): [True: 2.51k, False: 710]
  ------------------
  363|  2.51k|	Xrn = *(--Xsp);
  364|  2.51k|      } else {
  365|    710|	Xrn = NULL;
  366|    710|      }
  367|  6.18k|    }
  368|    710|  }
  369|  27.8k|  assert (patricia->num_active_node == 0);
  ------------------
  |  Branch (369:3): [True: 0, False: 27.8k]
  |  Branch (369:3): [True: 27.8k, False: 0]
  ------------------
  370|       |  /* ndpi_DeleteEntry (patricia); */
  371|  27.8k|}
ndpi_patricia_destroy:
  375|  27.8k|{
  376|  27.8k|  ndpi_Clear_Patricia (patricia, func);
  377|  27.8k|  ndpi_DeleteEntry (patricia);
  378|  27.8k|  num_active_patricia--;
  379|  27.8k|}
ndpi_patricia_lookup:
  660|  27.9k|{
  661|  27.9k|  ndpi_patricia_node_t *node, *new_node, *parent, *glue;
  662|  27.9k|  u_char *addr, *test_addr;
  663|  27.9k|  u_int16_t bitlen, check_bit, differ_bit;
  664|  27.9k|  int i, j;
  665|       |
  666|  27.9k|  if(!patricia)
  ------------------
  |  Branch (666:6): [True: 0, False: 27.9k]
  ------------------
  667|      0|    return (NULL);
  668|       |
  669|       |#ifdef PATRICIA_DEBUG
  670|       |  fprintf (stderr, "patricia_lookup() %s/%d (head)\n", 
  671|       |	   ndpi_prefix_toa (prefix), prefix->bitlen);
  672|       |#endif /* PATRICIA_DEBUG */
  673|       |
  674|  27.9k|  assert (prefix);
  ------------------
  |  Branch (674:3): [True: 0, False: 27.9k]
  |  Branch (674:3): [True: 27.9k, False: 0]
  ------------------
  675|  27.9k|  assert (prefix->bitlen <= patricia->maxbits);
  ------------------
  |  Branch (675:3): [True: 0, False: 27.9k]
  |  Branch (675:3): [True: 27.9k, False: 0]
  ------------------
  676|       |
  677|  27.9k|  if(patricia->head == NULL) {
  ------------------
  |  Branch (677:6): [True: 4.73k, False: 23.2k]
  ------------------
  678|  4.73k|    node = (ndpi_patricia_node_t*)ndpi_calloc(1, sizeof *node);
  679|  4.73k|    if(!node)
  ------------------
  |  Branch (679:8): [True: 363, False: 4.37k]
  ------------------
  680|    363|      return NULL;
  681|  4.37k|    node->bit = prefix->bitlen;
  682|  4.37k|    node->prefix = ndpi_Ref_Prefix (prefix);
  683|  4.37k|    if(!node->prefix) {
  ------------------
  |  Branch (683:8): [True: 3.66k, False: 710]
  ------------------
  684|  3.66k|      ndpi_free(node);
  685|  3.66k|      return NULL;
  686|  3.66k|    }
  687|    710|    node->parent = NULL;
  688|    710|    node->l = node->r = NULL;
  689|    710|    node->data = NULL;
  690|    710|    patricia->head = node;
  691|       |#ifdef PATRICIA_DEBUG
  692|       |    fprintf (stderr, "patricia_lookup: new_node #0 %s/%d (head)\n", 
  693|       |	     ndpi_prefix_toa (prefix), prefix->bitlen);
  694|       |#endif /* PATRICIA_DEBUG */
  695|    710|    patricia->num_active_node++;
  696|    710|    return (node);
  697|  4.37k|  }
  698|       |
  699|  23.2k|  addr = ndpi_prefix_touchar (prefix);
  ------------------
  |  |   50|  23.2k|#define ndpi_prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
  ------------------
  700|  23.2k|  bitlen = prefix->bitlen;
  701|  23.2k|  node = patricia->head;
  702|       |
  703|  75.7k|  while (node->bit < bitlen || node->prefix == NULL) {
  ------------------
  |  Branch (703:10): [True: 51.9k, False: 23.8k]
  |  Branch (703:32): [True: 964, False: 22.8k]
  ------------------
  704|  52.8k|    if(node->bit < patricia->maxbits &&
  ------------------
  |  Branch (704:8): [True: 52.8k, False: 0]
  ------------------
  705|  52.8k|       BIT_TEST (addr[node->bit >> 3], 0x80 >> (node->bit & 0x07))) {
  ------------------
  |  |   54|  52.8k|#define BIT_TEST(f, b)  ((f) & (b))
  |  |  ------------------
  |  |  |  Branch (54:25): [True: 6.49k, False: 46.3k]
  |  |  ------------------
  ------------------
  706|  6.49k|      if(node->r == NULL)
  ------------------
  |  Branch (706:10): [True: 144, False: 6.35k]
  ------------------
  707|    144|	break;
  708|       |#ifdef PATRICIA_DEBUG
  709|       |      if(node->prefix)
  710|       |	fprintf (stderr, "patricia_lookup: take right %s/%d\n", 
  711|       |		 ndpi_prefix_toa (node->prefix), node->prefix->bitlen);
  712|       |      else
  713|       |	fprintf (stderr, "patricia_lookup: take right at %u\n", node->bit);
  714|       |#endif /* PATRICIA_DEBUG */
  715|  6.35k|      node = node->r;
  716|  6.35k|    }
  717|  46.3k|    else {
  718|  46.3k|      if(node->l == NULL)
  ------------------
  |  Branch (718:10): [True: 250, False: 46.1k]
  ------------------
  719|    250|	break;
  720|       |#ifdef PATRICIA_DEBUG
  721|       |      if(node->prefix)
  722|       |	fprintf (stderr, "patricia_lookup: take left %s/%d\n", 
  723|       |		 ndpi_prefix_toa (node->prefix), node->prefix->bitlen);
  724|       |      else
  725|       |	fprintf (stderr, "patricia_lookup: take left at %u\n", node->bit);
  726|       |#endif /* PATRICIA_DEBUG */
  727|  46.1k|      node = node->l;
  728|  46.1k|    }
  729|       |
  730|  52.8k|    assert (node);
  ------------------
  |  Branch (730:5): [True: 0, False: 52.4k]
  |  Branch (730:5): [True: 52.4k, False: 0]
  ------------------
  731|  52.4k|  }
  732|       |
  733|  23.2k|  assert (node->prefix);
  ------------------
  |  Branch (733:3): [True: 0, False: 23.2k]
  |  Branch (733:3): [True: 23.2k, False: 0]
  ------------------
  734|       |#ifdef PATRICIA_DEBUG
  735|       |  fprintf (stderr, "patricia_lookup: stop at %s/%d\n", 
  736|       |	   ndpi_prefix_toa (node->prefix), node->prefix->bitlen);
  737|       |#endif /* PATRICIA_DEBUG */
  738|       |
  739|  23.2k|  test_addr = ndpi_prefix_touchar (node->prefix);
  ------------------
  |  |   50|  23.2k|#define ndpi_prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
  ------------------
  740|       |  /* find the first bit different */
  741|  23.2k|  check_bit = (node->bit < bitlen)? node->bit: bitlen;
  ------------------
  |  Branch (741:15): [True: 394, False: 22.8k]
  ------------------
  742|  23.2k|  differ_bit = 0;
  743|   106k|  for (i = 0; (u_int)i*8 < check_bit; i++) {
  ------------------
  |  Branch (743:15): [True: 86.3k, False: 19.8k]
  ------------------
  744|  86.3k|    int r;
  745|       |
  746|  86.3k|    if((r = (addr[i] ^ test_addr[i])) == 0) {
  ------------------
  |  Branch (746:8): [True: 82.9k, False: 3.37k]
  ------------------
  747|  82.9k|      differ_bit = (i + 1) * 8;
  748|  82.9k|      continue;
  749|  82.9k|    }
  750|       |    /* I know the better way, but for now */
  751|  17.2k|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (751:17): [True: 17.2k, False: 0]
  ------------------
  752|  17.2k|      if(BIT_TEST (r, (0x80 >> j)))
  ------------------
  |  |   54|  17.2k|#define BIT_TEST(f, b)  ((f) & (b))
  |  |  ------------------
  |  |  |  Branch (54:25): [True: 3.37k, False: 13.8k]
  |  |  ------------------
  ------------------
  753|  3.37k|	break;
  754|  17.2k|    }
  755|       |    /* must be found */
  756|  3.37k|    assert (j < 8);
  ------------------
  |  Branch (756:5): [True: 0, False: 3.37k]
  |  Branch (756:5): [True: 3.37k, False: 0]
  ------------------
  757|  3.37k|    differ_bit = i * 8 + j;
  758|  3.37k|    break;
  759|  3.37k|  }
  760|       |  
  761|  23.2k|  if(differ_bit > check_bit)
  ------------------
  |  Branch (761:6): [True: 1.63k, False: 21.6k]
  ------------------
  762|  1.63k|    differ_bit = check_bit;
  763|       |#ifdef PATRICIA_DEBUG
  764|       |  fprintf (stderr, "patricia_lookup: differ_bit %d\n", differ_bit);
  765|       |#endif /* PATRICIA_DEBUG */
  766|       |
  767|  23.2k|  parent = node->parent;
  768|  25.9k|  while (parent && parent->bit >= differ_bit) {
  ------------------
  |  Branch (768:10): [True: 16.6k, False: 9.35k]
  |  Branch (768:20): [True: 2.73k, False: 13.8k]
  ------------------
  769|  2.73k|    node = parent;
  770|  2.73k|    parent = node->parent;
  771|       |#ifdef PATRICIA_DEBUG
  772|       |    if(node->prefix)
  773|       |      fprintf (stderr, "patricia_lookup: up to %s/%d\n", 
  774|       |	       ndpi_prefix_toa (node->prefix), node->prefix->bitlen);
  775|       |    else
  776|       |      fprintf (stderr, "patricia_lookup: up to %u\n", node->bit);
  777|       |#endif /* PATRICIA_DEBUG */
  778|  2.73k|  }
  779|       |
  780|  23.2k|  if(differ_bit == bitlen && node->bit == bitlen) {
  ------------------
  |  Branch (780:6): [True: 19.9k, False: 3.25k]
  |  Branch (780:30): [True: 16.8k, False: 3.09k]
  ------------------
  781|  16.8k|    if(node->prefix) {
  ------------------
  |  Branch (781:8): [True: 16.4k, False: 479]
  ------------------
  782|       |#ifdef PATRICIA_DEBUG 
  783|       |      fprintf (stderr, "patricia_lookup: found %s/%d\n", 
  784|       |	       ndpi_prefix_toa (node->prefix), node->prefix->bitlen);
  785|       |#endif /* PATRICIA_DEBUG */
  786|  16.4k|      return (node);
  787|  16.4k|    }
  788|    479|    node->prefix = ndpi_Ref_Prefix (prefix);
  789|    479|    if(!node->prefix) {
  ------------------
  |  Branch (789:8): [True: 420, False: 59]
  ------------------
  790|    420|      return NULL;
  791|    420|    }
  792|       |#ifdef PATRICIA_DEBUG
  793|       |    fprintf (stderr, "patricia_lookup: new node #1 %s/%d (glue mod)\n",
  794|       |	     ndpi_prefix_toa (prefix), prefix->bitlen);
  795|       |#endif /* PATRICIA_DEBUG */
  796|    479|    assert (node->data == NULL);
  ------------------
  |  Branch (796:5): [True: 0, False: 59]
  |  Branch (796:5): [True: 59, False: 0]
  ------------------
  797|     59|    return (node);
  798|     59|  }
  799|       |
  800|  6.35k|  new_node = (ndpi_patricia_node_t*)ndpi_calloc(1, sizeof *new_node);
  801|  6.35k|  if(!new_node) return NULL;
  ------------------
  |  Branch (801:6): [True: 423, False: 5.92k]
  ------------------
  802|  5.92k|  new_node->bit = prefix->bitlen;
  803|  5.92k|  new_node->prefix = ndpi_Ref_Prefix (prefix);
  804|  5.92k|  if(!new_node->prefix) {
  ------------------
  |  Branch (804:6): [True: 2.73k, False: 3.19k]
  ------------------
  805|  2.73k|    ndpi_free(new_node);
  806|  2.73k|    return NULL;
  807|  2.73k|  }
  808|  3.19k|  new_node->parent = NULL;
  809|  3.19k|  new_node->l = new_node->r = NULL;
  810|  3.19k|  new_node->data = NULL;
  811|  3.19k|  patricia->num_active_node++;
  812|       |
  813|  3.19k|  if(node->bit == differ_bit) {
  ------------------
  |  Branch (813:6): [True: 240, False: 2.95k]
  ------------------
  814|    240|    new_node->parent = node;
  815|    240|    if(node->bit < patricia->maxbits &&
  ------------------
  |  Branch (815:8): [True: 240, False: 0]
  ------------------
  816|    240|       BIT_TEST (addr[node->bit >> 3], 0x80 >> (node->bit & 0x07))) {
  ------------------
  |  |   54|    240|#define BIT_TEST(f, b)  ((f) & (b))
  |  |  ------------------
  |  |  |  Branch (54:25): [True: 101, False: 139]
  |  |  ------------------
  ------------------
  817|    101|      assert (node->r == NULL);
  ------------------
  |  Branch (817:7): [True: 0, False: 101]
  |  Branch (817:7): [True: 101, False: 0]
  ------------------
  818|    101|      node->r = new_node;
  819|    101|    }
  820|    139|    else {
  821|    139|      assert (node->l == NULL);
  ------------------
  |  Branch (821:7): [True: 0, False: 139]
  |  Branch (821:7): [True: 139, False: 0]
  ------------------
  822|    139|      node->l = new_node;
  823|    139|    }
  824|       |#ifdef PATRICIA_DEBUG
  825|       |    fprintf (stderr, "patricia_lookup: new_node #2 %s/%d (child)\n", 
  826|       |	     ndpi_prefix_toa (prefix), prefix->bitlen);
  827|       |#endif /* PATRICIA_DEBUG */
  828|    240|    return (new_node);
  829|    240|  }
  830|       |
  831|  2.95k|  if(bitlen == differ_bit) {
  ------------------
  |  Branch (831:6): [True: 331, False: 2.62k]
  ------------------
  832|    331|    if(bitlen < patricia->maxbits &&
  ------------------
  |  Branch (832:8): [True: 331, False: 0]
  ------------------
  833|    331|       BIT_TEST (test_addr[bitlen >> 3], 0x80 >> (bitlen & 0x07))) {
  ------------------
  |  |   54|    331|#define BIT_TEST(f, b)  ((f) & (b))
  |  |  ------------------
  |  |  |  Branch (54:25): [True: 66, False: 265]
  |  |  ------------------
  ------------------
  834|     66|      new_node->r = node;
  835|     66|    }
  836|    265|    else {
  837|    265|      new_node->l = node;
  838|    265|    }
  839|    331|    new_node->parent = node->parent;
  840|    331|    if(node->parent == NULL) {
  ------------------
  |  Branch (840:8): [True: 148, False: 183]
  ------------------
  841|    148|      assert (patricia->head == node);
  ------------------
  |  Branch (841:7): [True: 0, False: 148]
  |  Branch (841:7): [True: 148, False: 0]
  ------------------
  842|    148|      patricia->head = new_node;
  843|    148|    }
  844|    183|    else if(node->parent->r == node) {
  ------------------
  |  Branch (844:13): [True: 54, False: 129]
  ------------------
  845|     54|      node->parent->r = new_node;
  846|     54|    }
  847|    129|    else {
  848|    129|      node->parent->l = new_node;
  849|    129|    }
  850|    331|    node->parent = new_node;
  851|       |#ifdef PATRICIA_DEBUG
  852|       |    fprintf (stderr, "patricia_lookup: new_node #3 %s/%d (parent)\n", 
  853|       |	     ndpi_prefix_toa (prefix), prefix->bitlen);
  854|       |#endif /* PATRICIA_DEBUG */
  855|    331|  }
  856|  2.62k|  else {
  857|  2.62k|    glue = (ndpi_patricia_node_t*)ndpi_calloc(1, sizeof *glue);
  858|       |
  859|  2.62k|    if(!glue) {
  ------------------
  |  Branch (859:8): [True: 174, False: 2.45k]
  ------------------
  860|    174|      ndpi_Deref_Prefix(new_node->prefix);
  861|    174|      ndpi_DeleteEntry (new_node);
  862|    174|      patricia->num_active_node--;
  863|    174|      return(NULL);
  864|    174|    }
  865|  2.45k|    glue->bit = differ_bit;
  866|  2.45k|    glue->prefix = NULL;
  867|  2.45k|    glue->parent = node->parent;
  868|  2.45k|    glue->data = NULL;
  869|  2.45k|    patricia->num_active_node++;
  870|  2.45k|    if(differ_bit < patricia->maxbits &&
  ------------------
  |  Branch (870:8): [True: 2.45k, False: 0]
  ------------------
  871|  2.45k|       BIT_TEST (addr[differ_bit >> 3], 0x80 >> (differ_bit & 0x07))) {
  ------------------
  |  |   54|  2.45k|#define BIT_TEST(f, b)  ((f) & (b))
  |  |  ------------------
  |  |  |  Branch (54:25): [True: 1.60k, False: 842]
  |  |  ------------------
  ------------------
  872|  1.60k|      glue->r = new_node;
  873|  1.60k|      glue->l = node;
  874|  1.60k|    }
  875|    842|    else {
  876|    842|      glue->r = node;
  877|    842|      glue->l = new_node;
  878|    842|    }
  879|  2.45k|    new_node->parent = glue;
  880|       |
  881|  2.45k|    if(node->parent == NULL) {
  ------------------
  |  Branch (881:8): [True: 590, False: 1.86k]
  ------------------
  882|    590|      assert (patricia->head == node);
  ------------------
  |  Branch (882:7): [True: 0, False: 590]
  |  Branch (882:7): [True: 590, False: 0]
  ------------------
  883|    590|      patricia->head = glue;
  884|    590|    }
  885|  1.86k|    else if(node->parent->r == node) {
  ------------------
  |  Branch (885:13): [True: 695, False: 1.16k]
  ------------------
  886|    695|      node->parent->r = glue;
  887|    695|    }
  888|  1.16k|    else {
  889|  1.16k|      node->parent->l = glue;
  890|  1.16k|    }
  891|  2.45k|    node->parent = glue;
  892|       |#ifdef PATRICIA_DEBUG
  893|       |    fprintf (stderr, "patricia_lookup: new_node #4 %s/%d (glue+node)\n", 
  894|       |	     ndpi_prefix_toa (prefix), prefix->bitlen);
  895|       |#endif /* PATRICIA_DEBUG */    
  896|  2.45k|  }
  897|  2.78k|  return (new_node);
  898|  2.95k|}
ndpi_patricia.c:ndpi_Deref_Prefix:
  288|  3.96k|{
  289|  3.96k|  if(prefix == NULL)
  ------------------
  |  Branch (289:6): [True: 0, False: 3.96k]
  ------------------
  290|      0|    return;
  291|       |  /* for secure programming, raise an assert. no static prefix can call this */
  292|  3.96k|  assert (prefix->ref_count > 0);
  ------------------
  |  Branch (292:3): [True: 0, False: 3.96k]
  |  Branch (292:3): [True: 3.96k, False: 0]
  ------------------
  293|       |
  294|  3.96k|  prefix->ref_count--;
  295|  3.96k|  assert (prefix->ref_count >= 0);
  ------------------
  |  Branch (295:3): [True: 0, False: 3.96k]
  |  Branch (295:3): [True: 3.96k, False: 0]
  ------------------
  296|  3.96k|  if(prefix->ref_count <= 0) {
  ------------------
  |  Branch (296:6): [True: 3.96k, False: 0]
  ------------------
  297|  3.96k|    ndpi_DeleteEntry (prefix);
  298|  3.96k|    return;
  299|  3.96k|  }
  300|  3.96k|}
ndpi_patricia.c:ndpi_DeleteEntry:
   57|  38.1k|static void ndpi_DeleteEntry(void *a) {
   58|  38.1k|  ndpi_free(a);
   59|  38.1k|}
ndpi_patricia.c:ndpi_Ref_Prefix:
  274|  10.7k|{
  275|  10.7k|  if(prefix == NULL)
  ------------------
  |  Branch (275:6): [True: 0, False: 10.7k]
  ------------------
  276|      0|    return (NULL);
  277|  10.7k|  if(prefix->ref_count == 0) {
  ------------------
  |  Branch (277:6): [True: 10.7k, False: 0]
  ------------------
  278|       |    /* make a copy in case of a static prefix */
  279|  10.7k|    return (ndpi_New_Prefix2 (prefix->family, &prefix->add, prefix->bitlen, NULL));
  280|  10.7k|  }
  281|      0|  prefix->ref_count++;
  282|       |  /* fprintf(stderr, "[A %s, %d]\n", ndpi_prefix_toa (prefix), prefix->ref_count); */
  283|      0|  return (prefix);
  284|  10.7k|}
ndpi_patricia.c:ndpi_New_Prefix2:
  210|  10.7k|{
  211|  10.7k|  int dynamic_allocated = 0;
  212|  10.7k|  int default_bitlen = sizeof(struct in_addr) * 8;
  213|       |
  214|  10.7k|  if(family == AF_INET6) {
  ------------------
  |  Branch (214:6): [True: 1.32k, False: 9.45k]
  ------------------
  215|  1.32k|    default_bitlen = sizeof(struct in6_addr) * 8;
  216|  1.32k|    if(prefix == NULL) {
  ------------------
  |  Branch (216:8): [True: 1.32k, False: 0]
  ------------------
  217|  1.32k|      prefix = (ndpi_prefix_t*)ndpi_calloc(1, sizeof (ndpi_prefix_t));
  218|  1.32k|      if(!prefix)
  ------------------
  |  Branch (218:10): [True: 96, False: 1.22k]
  ------------------
  219|     96|        return (NULL);
  220|  1.22k|      dynamic_allocated++;
  221|  1.22k|    }
  222|  1.22k|    memcpy (&prefix->add.sin6, dest, sizeof(struct in6_addr));
  223|  1.22k|  }
  224|  9.45k|  else
  225|  9.45k|    if(family == AF_INET) {
  ------------------
  |  Branch (225:8): [True: 2.93k, False: 6.52k]
  ------------------
  226|  2.93k|      if(prefix == NULL) {
  ------------------
  |  Branch (226:10): [True: 2.93k, False: 0]
  ------------------
  227|  2.93k|#ifndef NT
  228|  2.93k|	prefix = (ndpi_prefix_t*)ndpi_calloc(1, sizeof (prefix4_t));
  229|       |#else
  230|       |	//for some reason, compiler is getting
  231|       |	//prefix4_t size incorrect on NT
  232|       |	prefix = ndpi_calloc(1, sizeof (ndpi_prefix_t)); 
  233|       |#endif /* NT */
  234|  2.93k|	if(!prefix)
  ------------------
  |  Branch (234:5): [True: 194, False: 2.74k]
  ------------------
  235|    194|	  return (NULL);
  236|       |
  237|  2.74k|	dynamic_allocated++;
  238|  2.74k|      }
  239|  2.74k|      memcpy (&prefix->add.sin, dest, sizeof(struct in_addr));
  240|  2.74k|    }
  241|  6.52k|    else if(family == AF_MAC) {
  ------------------
  |  | 2067|  6.52k|#define AF_MAC            99
  ------------------
  |  Branch (241:13): [True: 0, False: 6.52k]
  ------------------
  242|      0|      default_bitlen = 48;
  243|      0|      if(prefix == NULL) {
  ------------------
  |  Branch (243:10): [True: 0, False: 0]
  ------------------
  244|      0|        prefix = (ndpi_prefix_t*)ndpi_calloc(1, sizeof (ndpi_prefix_t));
  245|      0|        if(!prefix)
  ------------------
  |  Branch (245:12): [True: 0, False: 0]
  ------------------
  246|      0|          return (NULL);
  247|      0|        dynamic_allocated++;
  248|      0|      }
  249|      0|      memcpy (prefix->add.mac, dest, 6);
  250|      0|    }
  251|  6.52k|    else {
  252|  6.52k|      return (NULL);
  253|  6.52k|    }
  254|       |
  255|  3.96k|  prefix->bitlen = (u_int16_t)((bitlen >= 0) ? bitlen : default_bitlen);
  ------------------
  |  Branch (255:32): [True: 3.96k, False: 0]
  ------------------
  256|  3.96k|  prefix->family = (u_int16_t)family;
  257|  3.96k|  prefix->ref_count = 0;
  258|  3.96k|  if(dynamic_allocated) {
  ------------------
  |  Branch (258:6): [True: 3.96k, False: 0]
  ------------------
  259|  3.96k|    prefix->ref_count++;
  260|  3.96k|  }
  261|       |  /* fprintf(stderr, "[C %s, %d]\n", ndpi_prefix_toa (prefix), prefix->ref_count); */
  262|  3.96k|  return (prefix);
  263|  10.7k|}

