diff options
-rw-r--r-- | example/ndpiReader.c | 3 | ||||
-rw-r--r-- | src/lib/ndpi_content_match.c.inc | 4 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index b24e61091..90e1b0d4f 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -414,7 +414,8 @@ static void help(u_int long_help) { #endif if(long_help) { - printf("\n\nSupported protocols:\n"); + printf("\n\nnDPI supported protocols:\n"); + printf("%3s %-22s %-12s %s\n", "Id", "Protocol", "Breed", "Category"); num_threads = 1; ndpi_dump_protocols(ndpi_info_mod); } diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc index 67d2f5434..1693db9fd 100644 --- a/src/lib/ndpi_content_match.c.inc +++ b/src/lib/ndpi_content_match.c.inc @@ -8731,8 +8731,8 @@ ndpi_protocol_match host_match[] = { { "signal.org", NULL, "signal\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE }, { "whispersystems.org", NULL, "whispersystems\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE }, - { "musical.ly", NULL, "musical\\.ly" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_ACCEPTABLE }, - { "muscdn.com", NULL, "muscndl\\.com" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_ACCEPTABLE }, + { "musical.ly", NULL, "musical\\.ly" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN }, + { "muscdn.com", NULL, "muscndl\\.com" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN }, { NULL, NULL, NULL, 0 } }; diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 8bd7367f6..df40c5769 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -966,7 +966,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp no_master, "SkypeCall", NDPI_PROTOCOL_CATEGORY_VOIP, ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); - ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TIKTOK, + ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TIKTOK, 0 /* can_have_a_subprotocol */, no_master, no_master, "TikTok", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, @@ -5862,8 +5862,13 @@ int ndpi_get_category_id(struct ndpi_detection_module_struct *ndpi_mod, char *ca void ndpi_dump_protocols(struct ndpi_detection_module_struct *ndpi_mod) { int i; + for(i=0; i<(int)ndpi_mod->ndpi_num_supported_protocols; i++) - printf("[%3d] %s\n", i, ndpi_mod->proto_defaults[i].protoName); + printf("%3d %-22s %-12s %s\n", i, + ndpi_mod->proto_defaults[i].protoName, + ndpi_get_proto_breed_name(ndpi_mod, ndpi_mod->proto_defaults[i].protoBreed), + ndpi_category_get_name(ndpi_mod, ndpi_mod->proto_defaults[i].protoCategory) + ); } /* ****************************************************** */ |