Added ndpi_set_detection_preferences() APi call

This commit is contained in:
Luca Deri
2018-05-14 21:40:27 +02:00
parent 2d486aeed8
commit 1076455c01
15 changed files with 173 additions and 89 deletions
+4 -2
View File
@@ -1458,8 +1458,10 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
ndpi_thread_info[thread_id].workflow = ndpi_workflow_init(&prefs, pcap_handle);
/* Preferences */
ndpi_thread_info[thread_id].workflow->ndpi_struct->http_dont_dissect_response = 0;
ndpi_thread_info[thread_id].workflow->ndpi_struct->dns_dissect_response = 0;
ndpi_set_detection_preferences(ndpi_thread_info[thread_id].workflow->ndpi_struct,
ndpi_pref_http_dont_dissect_response, 0);
ndpi_set_detection_preferences(ndpi_thread_info[thread_id].workflow->ndpi_struct,
ndpi_pref_dns_dissect_response, 0);
ndpi_workflow_set_flow_detected_callback(ndpi_thread_info[thread_id].workflow,
on_protocol_discovered, (void *)(uintptr_t)thread_id);