diff options
author | Luca Deri <deri@ntop.org> | 2024-08-24 16:30:58 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-08-24 16:30:58 +0200 |
commit | 53a6bae365618f9b301cf51e5f3f9d5450b0e280 (patch) | |
tree | 922e0791f71403d03d90fa2958e102fa2a727bfd /src/include | |
parent | 8894ebc76f4e3d928dd3c2e32a0470149ce90550 (diff) |
Introduced ndpi_master_app_protocol typedef
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_typedefs.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index a05026e87..a03e3d986 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1138,24 +1138,28 @@ typedef struct _ndpi_automa { typedef void ndpi_str_hash; -struct ndpi_fpc_info { - u_int16_t master_protocol; - u_int16_t app_protocol; - ndpi_fpc_confidence_t confidence; -}; - -typedef struct ndpi_proto { +typedef struct { /* Note below we do not use ndpi_protocol_id_t as users can define their own custom protocols and thus the typedef could be too short in size. */ - u_int16_t master_protocol /* e.g. HTTP */, app_protocol /* e.g. FaceBook */, protocol_by_ip; + u_int16_t master_protocol /* e.g. HTTP */, app_protocol /* e.g. FaceBook */; +} ndpi_master_app_protocol; + +struct ndpi_fpc_info { + ndpi_master_app_protocol proto; + ndpi_fpc_confidence_t confidence; +}; + +typedef struct ndpi_proto { + ndpi_master_app_protocol proto; + u_int16_t protocol_by_ip; ndpi_protocol_category_t category; void *custom_category_userdata; } ndpi_protocol; -#define NDPI_PROTOCOL_NULL { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NULL } +#define NDPI_PROTOCOL_NULL { { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN }, NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NULL } #define NUM_CUSTOM_CATEGORIES 5 #define CUSTOM_CATEGORY_LABEL_LEN 32 |