ndpiReader now report protocol category and breed

Modified TikTok category to Fun
This commit is contained in:
Luca Deri
2019-09-21 09:52:44 +02:00
parent 421f819b8a
commit 5c2e495792
3 changed files with 11 additions and 5 deletions
+2 -1
View File
@@ -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);
}
+2 -2
View File
@@ -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 }
};
+7 -2
View File
@@ -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)
);
}
/* ****************************************************** */