aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-10-19 13:43:21 +0200
committerLuca Deri <deri@ntop.org>2024-10-19 13:43:21 +0200
commite16b01c4c2d263750388854c5002536bbcaa904c (patch)
tree8bb0def5cb1297158014c0dcdffaf0d2adcf8436 /src
parent188fadc50303e56a53ebd7afa4807c5d1b75fd86 (diff)
Renamed os hints to avoid name clashes
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h16
-rw-r--r--src/lib/ndpi_main.c22
-rw-r--r--src/lib/ndpi_utils.c12
3 files changed, 25 insertions, 25 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 5960fdfae..fc6a6c837 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1245,14 +1245,14 @@ struct ndpi_metadata_monitoring {
};
enum operating_system_hint {
- os_unknown = 0,
- os_windows = 1,
- os_macos = 2,
- os_ios_ipad_os = 3,
- os_android = 4,
- os_linux = 5,
- os_freebsd = 6,
- os_unused2 = 7
+ os_hint_unknown = 0,
+ os_hint_windows = 1,
+ os_hint_macos = 2,
+ os_hint_ios_ipad_os = 3,
+ os_hint_android = 4,
+ os_hint_linux = 5,
+ os_hint_freebsd = 6,
+ os_hint_unused2 = 7
};
struct os_fingerprint {
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");