Implemented Facebook Messenger (mobile) support

Code cleanup
This commit is contained in:
Luca Deri
2018-05-18 23:10:00 +02:00
parent 5d3ac78250
commit 6dd42d19f7
10 changed files with 163 additions and 239 deletions
+12 -9
View File
@@ -76,14 +76,17 @@
#define NDPI_PROTOCOL_EDONKEY 36 /* Tomasz Bujlow <tomasz@skatnet.dk> */
#define NDPI_PROTOCOL_BITTORRENT 37
#define NDPI_PROTOCOL_SKYPE_CALL_OUT 38
#define NDPI_CONTENT_AVI 39
#define NDPI_CONTENT_FLASH 40
#define NDPI_CONTENT_OGG 41
#define NDPI_CONTENT_MPEG 42
#define NDPI_CONTENT_QUICKTIME 43
#define NDPI_CONTENT_REALMEDIA 44
#define NDPI_CONTENT_WINDOWSMEDIA 45
#define NDPI_CONTENT_MMS 46
/* 39..46 are free */
#define NDPI_PROTOCOL_FREE_39 39
#define NDPI_PROTOCOL_FREE_40 40
#define NDPI_PROTOCOL_FREE_41 41
#define NDPI_PROTOCOL_FREE_42 42
#define NDPI_PROTOCOL_FREE_43 43
#define NDPI_PROTOCOL_FREE_44 44
#define NDPI_PROTOCOL_FREE_45 45
#define NDPI_PROTOCOL_FREE_46 46
#define NDPI_PROTOCOL_XBOX 47
#define NDPI_PROTOCOL_QQ 48
#define NDPI_PROTOCOL_SKYPE_CALL_IN 49
@@ -194,7 +197,7 @@
#define NDPI_PROTOCOL_LLMNR 154
#define NDPI_PROTOCOL_REMOTE_SCAN 155
#define NDPI_PROTOCOL_SPOTIFY 156
#define NDPI_CONTENT_WEBM 157
#define NDPI_PROTOCOL_MESSENGER 157
#define NDPI_PROTOCOL_H323 158 /* Remy Mudingay <mudingay@ill.fr> */
#define NDPI_PROTOCOL_OPENVPN 159 /* Remy Mudingay <mudingay@ill.fr> */
#define NDPI_PROTOCOL_NOE 160 /* Remy Mudingay <mudingay@ill.fr> */
+12 -1
View File
@@ -781,6 +781,7 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_STREAMING, /* Streaming protocols */
NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, /* System/Operating System level applications */
NDPI_PROTOCOL_CATEGORY_SW_UPDATE, /* Software update */
/* See #define NUM_CUSTOM_CATEGORIES */
NDPI_PROTOCOL_CATEGORY_CUSTOM_1, /* User custom category 1 */
NDPI_PROTOCOL_CATEGORY_CUSTOM_2, /* User custom category 2 */
@@ -788,6 +789,16 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_CUSTOM_4, /* User custom category 4 */
NDPI_PROTOCOL_CATEGORY_CUSTOM_5, /* User custom category 5 */
/* Payload Content */
NDPI_CONTENT_CATEGORY_AVI,
NDPI_CONTENT_CATEGORY_FLASH,
NDPI_CONTENT_CATEGORY_OGG,
NDPI_CONTENT_CATEGORY_MPEG,
NDPI_CONTENT_CATEGORY_QUICKTIME,
NDPI_CONTENT_CATEGORY_REALMEDIA,
NDPI_CONTENT_CATEGORY_WINDOWSMEDIA,
NDPI_CONTENT_CATEGORY_WEBM,
NDPI_PROTOCOL_NUM_CATEGORIES /*
NOTE: Keep this as last member
Unused as value but useful to getting the number of elements
@@ -978,7 +989,7 @@ struct ndpi_flow_struct {
u_int16_t protocol_stack_info;
/* init parameter, internal used to set up timestamp,... */
u_int16_t guessed_protocol_id, guessed_host_protocol_id;
u_int16_t guessed_protocol_id, guessed_host_protocol_id, guessed_category;
u_int8_t protocol_id_already_guessed:1, host_already_guessed:1, init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;