Added ndpi_fill_protocol_category call

Introduced intitial Skype in/out support
This commit is contained in:
Luca Deri
2018-05-11 13:48:14 +02:00
parent 50216991bd
commit 564d622cc9
7 changed files with 112 additions and 176 deletions
+3 -1
View File
@@ -754,7 +754,9 @@ extern "C" {
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
char *name, ndpi_protocol_category_t category);
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol *ret);
/**
* Add a string to match to an automata
*
+2 -5
View File
@@ -75,7 +75,7 @@
#define NDPI_PROTOCOL_GNUTELLA 35
#define NDPI_PROTOCOL_EDONKEY 36 /* Tomasz Bujlow <tomasz@skatnet.dk> */
#define NDPI_PROTOCOL_BITTORRENT 37
#define NDPI_PROTOCOL_EPP 38
#define NDPI_PROTOCOL_SKYPE_CALL_OUT 38
#define NDPI_CONTENT_AVI 39
#define NDPI_CONTENT_FLASH 40
#define NDPI_CONTENT_OGG 41
@@ -86,10 +86,7 @@
#define NDPI_CONTENT_MMS 46
#define NDPI_PROTOCOL_XBOX 47
#define NDPI_PROTOCOL_QQ 48
/* Free to use */
#define NDPI_PROTOCOL_FREE_A 49
#define NDPI_PROTOCOL_SKYPE_CALL_IN 49
#define NDPI_PROTOCOL_RTSP 50
#define NDPI_PROTOCOL_MAIL_IMAPS 51
#define NDPI_PROTOCOL_ICECAST 52
+8 -4
View File
@@ -902,6 +902,7 @@ struct ndpi_detection_module_struct {
ndpi_automa hostnames, hostnames_shadow;
#endif
void *ipAddresses, *ipAddresses_shadow; /* Patricia */
u_int8_t categories_loaded;
} custom_categories;
/* IP-based protocol detection */
@@ -1006,8 +1007,8 @@ struct ndpi_flow_struct {
struct {
ndpi_http_method method;
char *url, *content_type;
u_int8_t num_request_headers, num_response_headers;
u_int8_t request_version; /* 0=1.0 and 1=1.1. Create an enum for this? */
u_int8_t num_request_headers, num_response_headers;
u_int8_t request_version; /* 0=1.0 and 1=1.1. Create an enum for this? */
u_char response_status_code[5]; /* 200, 404, etc. */
} http;
@@ -1055,14 +1056,17 @@ struct ndpi_flow_struct {
char fingerprint[48];
char class_ident[48];
} dhcp;
struct {
u_int8_t num_udp_pkts, num_processed_pkts, num_binding_requests, is_skype;
} stun;
} protos;
/*** ALL protocol specific 64 bit variables here ***/
/* protocols which have marked a connection as this connection cannot be protocol XXX, multiple u_int64_t */
NDPI_PROTOCOL_BITMASK excluded_protocol_bitmask;
u_int8_t num_stun_udp_pkts;
#ifdef NDPI_PROTOCOL_REDIS
u_int8_t redis_s2d_first_char, redis_d2s_first_char;