Add TiVoConnect dissector. Fixes #1697. (#1699)

* added static assert if supported, to complain if the flow struct changes

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2022-08-08 19:04:20 +02:00
committed by GitHub
parent 523360001e
commit 2e25c36396
118 changed files with 1945 additions and 1699 deletions
+1
View File
@@ -336,6 +336,7 @@ typedef enum {
NDPI_PROTOCOL_THREEMA = 305,
NDPI_PROTOCOL_ALICLOUD = 306,
NDPI_PROTOCOL_AVAST = 307,
NDPI_PROTOCOL_TIVOCONNECT = 308,
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_protocol_ids.h"
+1
View File
@@ -237,6 +237,7 @@ void init_avast_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_in
void init_softether_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_activision_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_discord_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_tivoconnect_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
/* ndpi_main.c */
extern u_int32_t ndpi_ip_port_hash_funct(u_int32_t ip, u_int16_t port);
+18
View File
@@ -1447,6 +1447,13 @@ struct ndpi_flow_struct {
u_int8_t primitive; /* GET, SET... */
u_int8_t error_status;
} snmp;
struct {
char identity_uuid[36];
char machine[48];
char platform[32];
char services[48];
} tivoconnect;
} protos;
/*** ALL protocol specific 64 bit variables here ***/
@@ -1524,6 +1531,17 @@ struct ndpi_flow_struct {
u_int8_t priv_data[16];
};
#if !defined(NDPI_CFFI_PREPROCESSING) && defined(__linux__)
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
_Static_assert(sizeof(((struct ndpi_flow_struct *)0)->protos) <= 200,
"Size of the struct member protocols increased to more than 200 bytes, "
"please check if this change is necessary.");
_Static_assert(sizeof(struct ndpi_flow_struct) <= 904,
"Size of the flow struct increased to more than 904 bytes, "
"please check if this change is necessary.");
#endif
#endif
#define NDPI_PROTOCOL_DEFAULT_LEVEL 0
typedef struct {