From e16b01c4c2d263750388854c5002536bbcaa904c Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Sat, 19 Oct 2024 13:43:21 +0200 Subject: Renamed os hints to avoid name clashes --- src/lib/ndpi_main.c | 22 +++++++++++----------- src/lib/ndpi_utils.c | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 92a5bed7e..a4b7ea88a 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -144,16 +144,16 @@ static void (*_ndpi_flow_free)(void *ptr); /* ****************************************** */ static struct os_fingerprint tcp_fps[] = { - { "32770_128_64240_6bb88f5575fd", os_windows }, - { "45058_64_65535_dd5737e4fedb", os_macos }, - { "45250_64_65535_dd5737e4fedb", os_macos }, - { "40962_64_65535_d876f498b09e", os_android }, - { "45250_64_65535_63970bc57fac", os_ios_ipad_os }, - { "40962_64_65535_8bf9e292397e", os_freebsd }, - { "40962_64_64800_83b2f9a5576c", os_linux }, - { "40962_64_64240_2e3cee914fc1", os_linux }, - { "40962_64_29200_2e3cee914fc1", os_linux }, - { NULL, os_unknown }, + { "32770_128_64240_6bb88f5575fd", os_hint_windows }, + { "45058_64_65535_dd5737e4fedb", os_hint_macos }, + { "45250_64_65535_dd5737e4fedb", os_hint_macos }, + { "40962_64_65535_d876f498b09e", os_hint_android }, + { "45250_64_65535_63970bc57fac", os_hint_ios_ipad_os }, + { "40962_64_65535_8bf9e292397e", os_hint_freebsd }, + { "40962_64_64800_83b2f9a5576c", os_hint_linux }, + { "40962_64_64240_2e3cee914fc1", os_hint_linux }, + { "40962_64_29200_2e3cee914fc1", os_hint_linux }, + { NULL, os_hint_unknown }, }; static ndpi_risk_info ndpi_known_risks[] = { @@ -7012,7 +7012,7 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str, sha_hash[0], sha_hash[1], sha_hash[2], sha_hash[3], sha_hash[4], sha_hash[5]); - flow->tcp.fingerprint = ndpi_strdup(fingerprint), flow->tcp.os_hint = os_unknown; + flow->tcp.fingerprint = ndpi_strdup(fingerprint), flow->tcp.os_hint = os_hint_unknown; for(i=0; tcp_fps[i].fingerprint != NULL; i++) { if(strcmp(tcp_fps[i].fingerprint, fingerprint) == 0) { diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 809391fae..0c036bef9 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -3849,12 +3849,12 @@ char* ndpi_quick_decrypt(const char *encrypted_msg, const char* ndpi_print_os_hint(u_int8_t os_hint) { switch(os_hint) { - case os_windows: return("Win"); - case os_macos: return("macOS"); - case os_ios_ipad_os: return("iOS/iPad"); - case os_android: return("Android"); - case os_linux: return("Linux"); - case os_freebsd: return("FreeBSD"); + case os_hint_windows: return("Win"); + case os_hint_macos: return("macOS"); + case os_hint_ios_ipad_os: return("iOS/iPad"); + case os_hint_android: return("Android"); + case os_hint_linux: return("Linux"); + case os_hint_freebsd: return("FreeBSD"); } return("Unknown"); -- cgit v1.2.3