Added custom category support to ndpi_get_partial_detection()

This commit is contained in:
Luca Deri
2019-04-01 16:12:44 +02:00
parent 1915a63cf2
commit 6693151052
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -1505,7 +1505,8 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
if(category) {
int fields[4];
// printf("Loading %s\t%s\n", name, category);
if(verbose) printf("[Category] Loading %s\t%s\n", name, category);
if(sscanf(name, "%d.%d.%d.%d", &fields[0], &fields[1], &fields[2], &fields[3]) == 4)
ndpi_load_ip_category(ndpi_thread_info[thread_id].workflow->ndpi_struct,