Skip to content

Commit e16b01c

Browse files
committed
Renamed os hints to avoid name clashes
1 parent 188fadc commit e16b01c

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

src/include/ndpi_typedefs.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,14 +1245,14 @@ struct ndpi_metadata_monitoring {
12451245
};
12461246

12471247
enum operating_system_hint {
1248-
os_unknown = 0,
1249-
os_windows = 1,
1250-
os_macos = 2,
1251-
os_ios_ipad_os = 3,
1252-
os_android = 4,
1253-
os_linux = 5,
1254-
os_freebsd = 6,
1255-
os_unused2 = 7
1248+
os_hint_unknown = 0,
1249+
os_hint_windows = 1,
1250+
os_hint_macos = 2,
1251+
os_hint_ios_ipad_os = 3,
1252+
os_hint_android = 4,
1253+
os_hint_linux = 5,
1254+
os_hint_freebsd = 6,
1255+
os_hint_unused2 = 7
12561256
};
12571257

12581258
struct os_fingerprint {

src/lib/ndpi_main.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,16 @@ static void (*_ndpi_flow_free)(void *ptr);
144144
/* ****************************************** */
145145

146146
static struct os_fingerprint tcp_fps[] = {
147-
{ "32770_128_64240_6bb88f5575fd", os_windows },
148-
{ "45058_64_65535_dd5737e4fedb", os_macos },
149-
{ "45250_64_65535_dd5737e4fedb", os_macos },
150-
{ "40962_64_65535_d876f498b09e", os_android },
151-
{ "45250_64_65535_63970bc57fac", os_ios_ipad_os },
152-
{ "40962_64_65535_8bf9e292397e", os_freebsd },
153-
{ "40962_64_64800_83b2f9a5576c", os_linux },
154-
{ "40962_64_64240_2e3cee914fc1", os_linux },
155-
{ "40962_64_29200_2e3cee914fc1", os_linux },
156-
{ NULL, os_unknown },
147+
{ "32770_128_64240_6bb88f5575fd", os_hint_windows },
148+
{ "45058_64_65535_dd5737e4fedb", os_hint_macos },
149+
{ "45250_64_65535_dd5737e4fedb", os_hint_macos },
150+
{ "40962_64_65535_d876f498b09e", os_hint_android },
151+
{ "45250_64_65535_63970bc57fac", os_hint_ios_ipad_os },
152+
{ "40962_64_65535_8bf9e292397e", os_hint_freebsd },
153+
{ "40962_64_64800_83b2f9a5576c", os_hint_linux },
154+
{ "40962_64_64240_2e3cee914fc1", os_hint_linux },
155+
{ "40962_64_29200_2e3cee914fc1", os_hint_linux },
156+
{ NULL, os_hint_unknown },
157157
};
158158

159159
static ndpi_risk_info ndpi_known_risks[] = {
@@ -7012,7 +7012,7 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str,
70127012
sha_hash[0], sha_hash[1], sha_hash[2],
70137013
sha_hash[3], sha_hash[4], sha_hash[5]);
70147014

7015-
flow->tcp.fingerprint = ndpi_strdup(fingerprint), flow->tcp.os_hint = os_unknown;
7015+
flow->tcp.fingerprint = ndpi_strdup(fingerprint), flow->tcp.os_hint = os_hint_unknown;
70167016

70177017
for(i=0; tcp_fps[i].fingerprint != NULL; i++) {
70187018
if(strcmp(tcp_fps[i].fingerprint, fingerprint) == 0) {

src/lib/ndpi_utils.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,12 +3849,12 @@ char* ndpi_quick_decrypt(const char *encrypted_msg,
38493849

38503850
const char* ndpi_print_os_hint(u_int8_t os_hint) {
38513851
switch(os_hint) {
3852-
case os_windows: return("Win");
3853-
case os_macos: return("macOS");
3854-
case os_ios_ipad_os: return("iOS/iPad");
3855-
case os_android: return("Android");
3856-
case os_linux: return("Linux");
3857-
case os_freebsd: return("FreeBSD");
3852+
case os_hint_windows: return("Win");
3853+
case os_hint_macos: return("macOS");
3854+
case os_hint_ios_ipad_os: return("iOS/iPad");
3855+
case os_hint_android: return("Android");
3856+
case os_hint_linux: return("Linux");
3857+
case os_hint_freebsd: return("FreeBSD");
38583858
}
38593859

38603860
return("Unknown");

0 commit comments

Comments
 (0)