deleted protocol type (real-correlated)

This commit is contained in:
Michele Campus
2015-06-29 16:24:51 +02:00
parent 40292a737a
commit 8da7af7b7b
145 changed files with 617 additions and 617 deletions
+1 -1
View File
@@ -977,7 +977,7 @@ static unsigned int packet_processing(u_int16_t thread_id,
flow->detection_completed = 1;
if((flow->detected_protocol == NDPI_PROTOCOL_UNKNOWN) && (ndpi_flow->num_stun_udp_pkts > 0))
ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN/* , NDPI_REAL_PROTOCOL */);
snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s", flow->ndpi_flow->host_server_name);
+1 -1
View File
@@ -155,7 +155,7 @@ extern "C" {
* @param ndpi_struct the detection module
* @return the protocol id of the last real protocol found in the protocol history of the flow
*/
u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
/* u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); */
/**
* returns true if the protocol history of the flow of the last packet given to the detection
+1 -1
View File
@@ -168,7 +168,7 @@
/**********************
* detection features *
**********************/
#define NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL ( 1 << 0 )
/* #define NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL ( 1 << 0 ) */
#define NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT 600
#define NDPI_IRC_CONNECTION_TIMEOUT 120
+4 -4
View File
@@ -100,7 +100,7 @@ u_int32_t ndpi_bytestream_to_ipv4(const u_int8_t * str, u_int16_t max_chars_to_r
void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
/* function to parse a packet which has line based information into a line based structure
@@ -112,11 +112,11 @@ extern void ndpi_parse_packet_line_info_any(struct ndpi_detection_module_struct
extern u_int16_t ndpi_check_for_email_address(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, u_int16_t counter);
extern void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
extern void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol,
ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , */
/* ndpi_protocol_type_t protocol_type */);
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
ndpi_protocol_breed_t protoBreed, u_int16_t protoId,
u_int16_t tcp_alias_protoId[2], u_int16_t udp_alias_protoId[2],
+13 -13
View File
@@ -469,17 +469,17 @@ typedef struct ndpi_packet_struct {
/* this is for simple read-only access to the real protocol
* used for the main loop */
u_int16_t real_protocol_read_only;
/* u_int16_t real_protocol_read_only; */
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
# if NDPI_PROTOCOL_HISTORY_SIZE > 5
# error protocol stack size not supported
# endif
struct {
u_int8_t entry_is_real_protocol:5;
u_int8_t current_stack_size_minus_one:3;
}
/* struct { */
/* u_int8_t entry_is_real_protocol:5; */
/* u_int8_t current_stack_size_minus_one:3; */
/* } */
#if !defined(WIN32)
__attribute__ ((__packed__))
#endif
@@ -677,10 +677,10 @@ typedef struct ndpi_flow_struct {
# error protocol stack size not supported
# endif
struct {
u_int8_t entry_is_real_protocol:5;
u_int8_t current_stack_size_minus_one:3;
}
/* struct { */
/* u_int8_t entry_is_real_protocol:5; */
/* u_int8_t current_stack_size_minus_one:3; */
/* } */
#if !defined(WIN32)
__attribute__ ((__packed__))
@@ -836,9 +836,9 @@ typedef struct ndpi_flow_struct {
struct ndpi_id_struct *dst;
} ndpi_flow_struct_t;
typedef enum {
NDPI_REAL_PROTOCOL = 0,
NDPI_CORRELATED_PROTOCOL = 1
} ndpi_protocol_type_t;
/* typedef enum { */
/* NDPI_REAL_PROTOCOL = 0, */
/* NDPI_CORRELATED_PROTOCOL = 1 */
/* } ndpi_protocol_type_t; */
#endif/* __NDPI_TYPEDEFS_FILE__ */
+197 -197
View File
@@ -2415,7 +2415,7 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
ADD_TO_DETECTION_BITMASK);
/* consider also real protocol for detection select in main loop */
ndpi_struct->callback_buffer[a].detection_feature = NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL;
/* ndpi_struct->callback_buffer[a].detection_feature = NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL; */
/* Update callback_buffer index */
a++;
#endif
@@ -4869,12 +4869,12 @@ u_int8_t ndpi_detection_get_l4(const u_int8_t * l3, u_int16_t l3_len, const u_in
void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type)
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */)
{
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_change_protocol(ndpi_struct, flow, detected_protocol, protocol_type);
ndpi_int_change_protocol(ndpi_struct, flow, detected_protocol/* , protocol_type */);
if(src != NULL) {
NDPI_ADD_PROTOCOL_TO_BITMASK(src->detected_protocol_bitmask, detected_protocol);
@@ -4886,20 +4886,20 @@ void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
void ndpi_int_change_flow_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type)
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */)
{
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
u_int8_t a;
u_int8_t stack_size;
u_int8_t new_is_real = 0;
u_int16_t preserve_bitmask;
#endif
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* u_int8_t a; */
/* u_int8_t stack_size; */
/* u_int8_t new_is_real = 0; */
/* u_int16_t preserve_bitmask; */
/* #endif */
if(!flow)
return;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
stack_size = flow->protocol_stack_info.current_stack_size_minus_one + 1;
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* stack_size = flow->protocol_stack_info.current_stack_size_minus_one + 1; */
/* here are the rules for stack manipulations:
* 1.if the new protocol is a real protocol, insert it at the position
@@ -4910,118 +4910,118 @@ void ndpi_int_change_flow_protocol(struct ndpi_detection_module_struct *ndpi_str
* in the stack
*/
if(protocol_type == NDPI_CORRELATED_PROTOCOL) {
u_int16_t saved_real_protocol = NDPI_PROTOCOL_UNKNOWN;
/* if(protocol_type == NDPI_CORRELATED_PROTOCOL) { */
/* u_int16_t saved_real_protocol = NDPI_PROTOCOL_UNKNOWN; */
if(stack_size == NDPI_PROTOCOL_HISTORY_SIZE) {
/* check whether we will lost real protocol information due to shifting */
u_int16_t real_protocol = flow->protocol_stack_info.entry_is_real_protocol;
/* if(stack_size == NDPI_PROTOCOL_HISTORY_SIZE) { */
/* /\* check whether we will lost real protocol information due to shifting *\/ */
/* u_int16_t real_protocol = flow->protocol_stack_info.entry_is_real_protocol; */
for (a = 0; a < stack_size; a++) {
if(real_protocol & 1)
break;
real_protocol >>= 1;
}
/* for (a = 0; a < stack_size; a++) { */
/* if(real_protocol & 1) */
/* break; */
/* real_protocol >>= 1; */
/* } */
if(a == (stack_size - 1)) {
/* oh, only one real protocol at the end, store it and insert it later */
saved_real_protocol = flow->detected_protocol_stack[stack_size - 1];
}
} else {
flow->protocol_stack_info.current_stack_size_minus_one++;
stack_size++;
}
/* if(a == (stack_size - 1)) { */
/* /\* oh, only one real protocol at the end, store it and insert it later *\/ */
/* saved_real_protocol = flow->detected_protocol_stack[stack_size - 1]; */
/* } */
/* } else { */
/* flow->protocol_stack_info.current_stack_size_minus_one++; */
/* stack_size++; */
/* } */
/* now shift and insert */
for (a = stack_size - 1; a > 0; a--) {
flow->detected_protocol_stack[a] = flow->detected_protocol_stack[a - 1];
}
/* /\* now shift and insert *\/ */
/* for (a = stack_size - 1; a > 0; a--) { */
/* flow->detected_protocol_stack[a] = flow->detected_protocol_stack[a - 1]; */
/* } */
flow->protocol_stack_info.entry_is_real_protocol <<= 1;
/* flow->protocol_stack_info.entry_is_real_protocol <<= 1; */
/* now set the new protocol */
/* /\* now set the new protocol *\/ */
flow->detected_protocol_stack[0] = detected_protocol;
/* flow->detected_protocol_stack[0] = detected_protocol; */
/* restore real protocol */
if(saved_real_protocol != NDPI_PROTOCOL_UNKNOWN) {
flow->detected_protocol_stack[stack_size - 1] = saved_real_protocol;
flow->protocol_stack_info.entry_is_real_protocol |= 1 << (stack_size - 1);
}
/* done */
} else {
u_int8_t insert_at = 0;
/* /\* restore real protocol *\/ */
/* if(saved_real_protocol != NDPI_PROTOCOL_UNKNOWN) { */
/* flow->detected_protocol_stack[stack_size - 1] = saved_real_protocol; */
/* flow->protocol_stack_info.entry_is_real_protocol |= 1 << (stack_size - 1); */
/* } */
/* /\* done *\/ */
/* } else { */
/* u_int8_t insert_at = 0; */
if(!(flow->protocol_stack_info.entry_is_real_protocol & 1)) {
u_int16_t real_protocol = flow->protocol_stack_info.entry_is_real_protocol;
/* if(!(flow->protocol_stack_info.entry_is_real_protocol & 1)) { */
/* u_int16_t real_protocol = flow->protocol_stack_info.entry_is_real_protocol; */
for (a = 0; a < stack_size; a++) {
if(real_protocol & 1)
break;
real_protocol >>= 1;
}
/* for (a = 0; a < stack_size; a++) { */
/* if(real_protocol & 1) */
/* break; */
/* real_protocol >>= 1; */
/* } */
insert_at = a;
}
/* insert_at = a; */
/* } */
if(insert_at >= stack_size) {
/* no real protocol found, insert it at the bottom */
/* if(insert_at >= stack_size) { */
/* /\* no real protocol found, insert it at the bottom *\/ */
insert_at = stack_size - 1;
}
/* insert_at = stack_size - 1; */
/* } */
if(stack_size < NDPI_PROTOCOL_HISTORY_SIZE) {
flow->protocol_stack_info.current_stack_size_minus_one++;
stack_size++;
}
/* if(stack_size < NDPI_PROTOCOL_HISTORY_SIZE) { */
/* flow->protocol_stack_info.current_stack_size_minus_one++; */
/* stack_size++; */
/* } */
/* first shift all stacks */
for (a = stack_size - 1; a > insert_at; a--) {
flow->detected_protocol_stack[a] = flow->detected_protocol_stack[a - 1];
}
/* /\* first shift all stacks *\/ */
/* for (a = stack_size - 1; a > insert_at; a--) { */
/* flow->detected_protocol_stack[a] = flow->detected_protocol_stack[a - 1]; */
/* } */
preserve_bitmask = (1 << insert_at) - 1;
/* preserve_bitmask = (1 << insert_at) - 1; */
new_is_real = (flow->protocol_stack_info.entry_is_real_protocol & (~preserve_bitmask)) << 1;
new_is_real |= flow->protocol_stack_info.entry_is_real_protocol & preserve_bitmask;
/* new_is_real = (flow->protocol_stack_info.entry_is_real_protocol & (~preserve_bitmask)) << 1; */
/* new_is_real |= flow->protocol_stack_info.entry_is_real_protocol & preserve_bitmask; */
flow->protocol_stack_info.entry_is_real_protocol = new_is_real;
/* flow->protocol_stack_info.entry_is_real_protocol = new_is_real; */
/* now set the new protocol */
/* /\* now set the new protocol *\/ */
flow->detected_protocol_stack[insert_at] = detected_protocol;
/* flow->detected_protocol_stack[insert_at] = detected_protocol; */
/* and finally update the additional stack information */
/* /\* and finally update the additional stack information *\/ */
flow->protocol_stack_info.entry_is_real_protocol |= 1 << insert_at;
}
#else
/* flow->protocol_stack_info.entry_is_real_protocol |= 1 << insert_at; */
/* } */
/* #else */
flow->detected_protocol_stack[0] = detected_protocol;
flow->detected_subprotocol_stack[0] = detected_subprotocol;
#endif
/* flow->detected_subprotocol_stack[0] = detected_subprotocol; */
/* #endif */
}
void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type)
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */)
{
struct ndpi_packet_struct *packet = &flow->packet;
/* NOTE: everything below is identically to change_flow_protocol
* except flow->packet If you want to change something here,
* don't! Change it for the flow function and apply it here
* as well */
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
u_int8_t a;
u_int8_t stack_size;
u_int16_t new_is_real = 0;
u_int16_t preserve_bitmask;
#endif
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* u_int8_t a; */
/* u_int8_t stack_size; */
/* u_int16_t new_is_real = 0; */
/* u_int16_t preserve_bitmask; */
/* #endif */
if(!packet)
return;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1;
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1; */
/* here are the rules for stack manipulations:
* 1.if the new protocol is a real protocol, insert it at the position
@@ -5032,95 +5032,95 @@ void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_s
* in the stack
*/
if(protocol_type == NDPI_CORRELATED_PROTOCOL) {
u_int16_t saved_real_protocol = NDPI_PROTOCOL_UNKNOWN;
/* if(protocol_type == NDPI_CORRELATED_PROTOCOL) { */
/* u_int16_t saved_real_protocol = NDPI_PROTOCOL_UNKNOWN; */
if(stack_size == NDPI_PROTOCOL_HISTORY_SIZE) {
/* check whether we will lost real protocol information due to shifting */
u_int16_t real_protocol = packet->protocol_stack_info.entry_is_real_protocol;
/* if(stack_size == NDPI_PROTOCOL_HISTORY_SIZE) { */
/* /\* check whether we will lost real protocol information due to shifting *\/ */
/* u_int16_t real_protocol = packet->protocol_stack_info.entry_is_real_protocol; */
for (a = 0; a < stack_size; a++) {
if(real_protocol & 1)
break;
real_protocol >>= 1;
}
/* for (a = 0; a < stack_size; a++) { */
/* if(real_protocol & 1) */
/* break; */
/* real_protocol >>= 1; */
/* } */
if(a == (stack_size - 1)) {
/* oh, only one real protocol at the end, store it and insert it later */
saved_real_protocol = packet->detected_protocol_stack[stack_size - 1];
}
} else {
packet->protocol_stack_info.current_stack_size_minus_one++;
stack_size++;
}
/* if(a == (stack_size - 1)) { */
/* /\* oh, only one real protocol at the end, store it and insert it later *\/ */
/* saved_real_protocol = packet->detected_protocol_stack[stack_size - 1]; */
/* } */
/* } else { */
/* packet->protocol_stack_info.current_stack_size_minus_one++; */
/* stack_size++; */
/* } */
/* now shift and insert */
for (a = stack_size - 1; a > 0; a--) {
packet->detected_protocol_stack[a] = packet->detected_protocol_stack[a - 1];
}
/* /\* now shift and insert *\/ */
/* for (a = stack_size - 1; a > 0; a--) { */
/* packet->detected_protocol_stack[a] = packet->detected_protocol_stack[a - 1]; */
/* } */
packet->protocol_stack_info.entry_is_real_protocol <<= 1;
/* packet->protocol_stack_info.entry_is_real_protocol <<= 1; */
/* now set the new protocol */
/* /\* now set the new protocol *\/ */
packet->detected_protocol_stack[0] = detected_protocol;
/* packet->detected_protocol_stack[0] = detected_protocol; */
/* restore real protocol */
if(saved_real_protocol != NDPI_PROTOCOL_UNKNOWN) {
packet->detected_protocol_stack[stack_size - 1] = saved_real_protocol;
packet->protocol_stack_info.entry_is_real_protocol |= 1 << (stack_size - 1);
}
/* done */
} else {
u_int8_t insert_at = 0;
/* /\* restore real protocol *\/ */
/* if(saved_real_protocol != NDPI_PROTOCOL_UNKNOWN) { */
/* packet->detected_protocol_stack[stack_size - 1] = saved_real_protocol; */
/* packet->protocol_stack_info.entry_is_real_protocol |= 1 << (stack_size - 1); */
/* } */
/* /\* done *\/ */
/* } else { */
/* u_int8_t insert_at = 0; */
if(!(packet->protocol_stack_info.entry_is_real_protocol & 1)) {
u_int16_t real_protocol = packet->protocol_stack_info.entry_is_real_protocol;
/* if(!(packet->protocol_stack_info.entry_is_real_protocol & 1)) { */
/* u_int16_t real_protocol = packet->protocol_stack_info.entry_is_real_protocol; */
for (a = 0; a < stack_size; a++) {
if(real_protocol & 1)
break;
real_protocol >>= 1;
}
/* for (a = 0; a < stack_size; a++) { */
/* if(real_protocol & 1) */
/* break; */
/* real_protocol >>= 1; */
/* } */
insert_at = a;
}
/* insert_at = a; */
/* } */
if(insert_at >= stack_size) {
/* no real protocol found, insert it at the first unknown protocol */
/* if(insert_at >= stack_size) { */
/* /\* no real protocol found, insert it at the first unknown protocol *\/ */
insert_at = stack_size - 1;
}
/* insert_at = stack_size - 1; */
/* } */
if(stack_size < NDPI_PROTOCOL_HISTORY_SIZE) {
packet->protocol_stack_info.current_stack_size_minus_one++;
stack_size++;
}
/* if(stack_size < NDPI_PROTOCOL_HISTORY_SIZE) { */
/* packet->protocol_stack_info.current_stack_size_minus_one++; */
/* stack_size++; */
/* } */
/* first shift all stacks */
for (a = stack_size - 1; a > insert_at; a--) {
packet->detected_protocol_stack[a] = packet->detected_protocol_stack[a - 1];
}
/* /\* first shift all stacks *\/ */
/* for (a = stack_size - 1; a > insert_at; a--) { */
/* packet->detected_protocol_stack[a] = packet->detected_protocol_stack[a - 1]; */
/* } */
preserve_bitmask = (1 << insert_at) - 1;
/* preserve_bitmask = (1 << insert_at) - 1; */
new_is_real = (packet->protocol_stack_info.entry_is_real_protocol & (~preserve_bitmask)) << 1;
new_is_real |= packet->protocol_stack_info.entry_is_real_protocol & preserve_bitmask;
/* new_is_real = (packet->protocol_stack_info.entry_is_real_protocol & (~preserve_bitmask)) << 1; */
/* new_is_real |= packet->protocol_stack_info.entry_is_real_protocol & preserve_bitmask; */
packet->protocol_stack_info.entry_is_real_protocol = (u_int8_t)new_is_real;
/* packet->protocol_stack_info.entry_is_real_protocol = (u_int8_t)new_is_real; */
/* now set the new protocol */
/* /\* now set the new protocol *\/ */
packet->detected_protocol_stack[insert_at] = detected_protocol;
/* packet->detected_protocol_stack[insert_at] = detected_protocol; */
/* and finally update the additional stack information */
/* /\* and finally update the additional stack information *\/ */
packet->protocol_stack_info.entry_is_real_protocol |= 1 << insert_at;
}
#else
/* packet->protocol_stack_info.entry_is_real_protocol |= 1 << insert_at; */
/* } */
/* #else */
packet->detected_protocol_stack[0] = detected_protocol;
packet->detected_subprotocol_stack[0] = detected_subprotocol;
#endif
/* packet->detected_subprotocol_stack[0] = detected_subprotocol; */
/* #endif */
}
@@ -5129,34 +5129,34 @@ void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_s
* accesses the packet stack since this is what leaves the library but
* it could also use the flow stack.
*/
u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct * ndpi_struct,
struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct *packet = &flow->packet;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
u_int8_t a;
u_int8_t stack_size;
u_int16_t real_protocol;
#endif
/* u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct * ndpi_struct, */
/* struct ndpi_flow_struct *flow) */
/* { */
/* struct ndpi_packet_struct *packet = &flow->packet; */
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* u_int8_t a; */
/* u_int8_t stack_size; */
/* u_int16_t real_protocol; */
/* #endif */
if(!packet)
return NDPI_PROTOCOL_UNKNOWN;
/* if(!packet) */
/* return NDPI_PROTOCOL_UNKNOWN; */
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1;
real_protocol = packet->protocol_stack_info.entry_is_real_protocol;
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1; */
/* real_protocol = packet->protocol_stack_info.entry_is_real_protocol; */
for (a = 0; a < stack_size; a++) {
if(real_protocol & 1)
return packet->detected_protocol_stack[a];
real_protocol >>= 1;
}
/* for (a = 0; a < stack_size; a++) { */
/* if(real_protocol & 1) */
/* return packet->detected_protocol_stack[a]; */
/* real_protocol >>= 1; */
/* } */
return NDPI_PROTOCOL_UNKNOWN;
#else
return packet->detected_protocol_stack[0];
#endif
}
/* return NDPI_PROTOCOL_UNKNOWN; */
/* #else */
/* return packet->detected_protocol_stack[0]; */
/* #endif */
/* } */
/*
* this function checks whether a protocol can be found in the
@@ -5174,11 +5174,11 @@ u_int8_t ndpi_detection_flow_protocol_history_contains_protocol(struct ndpi_dete
if(!packet)
return 0;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1;
#else
stack_size = 1;
#endif
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* stack_size = packet->protocol_stack_info.current_stack_size_minus_one + 1; */
/* #else */
stack_size = 1; /* DA SISTEMARE */
/* #endif */
for (a = 0; a < stack_size; a++) {
if(packet->detected_protocol_stack[a] == protocol_id)
@@ -5196,7 +5196,7 @@ u_int8_t ndpi_detection_flow_protocol_history_contains_protocol(struct ndpi_dete
*/
void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
/* generic function for changing the flow protocol
*
@@ -5205,7 +5205,7 @@ void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
*/
void ndpi_int_change_flow_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
/* generic function for changing the packetprotocol
*
@@ -5214,7 +5214,7 @@ void ndpi_int_change_flow_protocol(struct ndpi_detection_module_struct *ndpi_str
*/
void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
/* generic function for changing the protocol
*
@@ -5224,11 +5224,11 @@ void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_s
*/
void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol,
ndpi_protocol_type_t protocol_type)
u_int16_t detected_protocol/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_change_flow_protocol(ndpi_struct, flow, detected_protocol, protocol_type);
ndpi_int_change_packet_protocol(ndpi_struct, flow, detected_protocol, protocol_type);
ndpi_int_change_flow_protocol(ndpi_struct, flow, detected_protocol/* , protocol_type */);
ndpi_int_change_packet_protocol(ndpi_struct, flow, detected_protocol/* , protocol_type */);
}
@@ -5236,10 +5236,10 @@ void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
void ndpi_int_reset_packet_protocol(struct ndpi_packet_struct *packet) {
packet->detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
packet->protocol_stack_info.current_stack_size_minus_one = 0;
packet->protocol_stack_info.entry_is_real_protocol = 0;
#endif
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* packet->protocol_stack_info.current_stack_size_minus_one = 0; */
/* packet->protocol_stack_info.entry_is_real_protocol = 0; */
/* #endif */
}
void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow)
@@ -5247,10 +5247,10 @@ void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow)
if(flow) {
flow->detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN;
#if NDPI_PROTOCOL_HISTORY_SIZE > 1
flow->protocol_stack_info.current_stack_size_minus_one = 0;
flow->protocol_stack_info.entry_is_real_protocol = 0;
#endif
/* #if NDPI_PROTOCOL_HISTORY_SIZE > 1 */
/* flow->protocol_stack_info.current_stack_size_minus_one = 0; */
/* flow->protocol_stack_info.entry_is_real_protocol = 0; */
/* #endif */
}
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_afp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AFP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AFP/* , NDPI_REAL_PROTOCOL */);
}
+12 -12
View File
@@ -28,10 +28,10 @@
#ifdef NDPI_PROTOCOL_AIMINI
static void ndpi_int_aimini_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
static void ndpi_int_aimini_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AIMINI, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AIMINI/* , protocol_type */);
}
@@ -113,7 +113,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
|| (packet->payload_packet_len > 100 && ntohs(get_u_int16_t(packet->payload, 0)) == 0x0115))) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG, "found aimini (64, 0x010b), (>300, 0x0115), "
"(16, 0x010c || 64, 0x010b), (16, 0x010c || 64, 0x010b || >100, 0x0115).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -139,7 +139,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
&& ntohs(get_u_int16_t(packet->payload, 0)) == 0x01ca))) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"found aimini (136, 0x01c9), (136, 0x01c9)," "(136, 0x01c9),(136, 0x01c9 || 32, 0x01ca).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -161,7 +161,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
&& (packet->payload_packet_len == 88 && ntohs(get_u_int16_t(packet->payload, 0)) == 0x0101)) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"found aimini (88, 0x0101), (88, 0x0101)," "(88, 0x0101),(88, 0x0101).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -184,7 +184,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
|| (packet->payload_packet_len == 32 && ntohs(get_u_int16_t(packet->payload, 0)) == 0x01ca))) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"found aimini (104, 0x0102), (104, 0x0102), " "(104, 0x0102), (104, 0x0102).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -208,7 +208,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
|| (packet->payload_packet_len == 32 && ntohs(get_u_int16_t(packet->payload, 0)) == 0x01ca))) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"found aimini (32,0x01ca), (32,0x01ca), (32,0x01ca), ((136, 0x0166)||(32,0x01ca)).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -230,7 +230,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
&& (packet->payload_packet_len == 16 && ntohs(get_u_int16_t(packet->payload, 0)) == 0x010c)) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"found aimini (16, 0x010c), (16, 0x010c), (16, 0x010c), (16, 0x010c).\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
} else if (packet->tcp != NULL) {
@@ -243,7 +243,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
if (packet->host_line.ptr != NULL && packet->host_line.len > 11
&& (memcmp(&packet->host_line.ptr[packet->host_line.len - 11], ".aimini.net", 11) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG, "AIMINI HTTP traffic detected.\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -257,7 +257,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
if (is_special_aimini_host(packet->host_line) == 1) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"AIMINI HTTP traffic detected.\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -268,7 +268,7 @@ void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct
if (is_special_aimini_host(packet->host_line) == 1) {
NDPI_LOG(NDPI_PROTOCOL_AIMINI, ndpi_struct, NDPI_LOG_DEBUG,
"AIMINI HTTP traffic detected.\n");
ndpi_int_aimini_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_aimini_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_applejuice_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_APPLEJUICE, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_APPLEJUICE/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_applejuice_tcp(struct ndpi_detection_module_struct *ndpi_struct,
+1 -1
View File
@@ -33,7 +33,7 @@ static void ndpi_int_armagetron_add_connection(struct ndpi_detection_module_stru
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ARMAGETRON, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ARMAGETRON/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_armagetron_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -28,7 +28,7 @@
static void ndpi_int_flash_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FLASH, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FLASH/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_flash(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -31,7 +31,7 @@
static void ndpi_int_ftp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP/* , NDPI_REAL_PROTOCOL */);
}
/**
+1 -1
View File
@@ -35,7 +35,7 @@ static void ndpi_int_manolito_add_connection(struct
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MANOLITO, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MANOLITO/* , NDPI_REAL_PROTOCOL */);
if (src != NULL) {
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_popo_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_POPO, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_POPO/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_popo_tcp_udp(struct ndpi_detection_module_struct
+6 -6
View File
@@ -27,8 +27,8 @@
#ifdef NDPI_PROTOCOL_SECONDLIFE
static void ndpi_int_secondlife_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SECONDLIFE, protocol_type);
}
@@ -92,25 +92,25 @@ void ndpi_search_secondlife(struct ndpi_detection_module_struct
if (packet->payload_packet_len == 46
&& memcmp(packet->payload, "\x40\x00\x00\x00\x01\x00\xff\xff\x00\x03", 10) == 0) {
NDPI_LOG(NDPI_PROTOCOL_SECONDLIFE, ndpi_struct, NDPI_LOG_DEBUG, "Second Life 0xffff0003 detected.\n");
ndpi_int_secondlife_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_secondlife_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 54
&& memcmp(packet->payload, "\x40\x00\x00\x00\x01\x00\xff\xff\x00\x52", 10) == 0) {
NDPI_LOG(NDPI_PROTOCOL_SECONDLIFE, ndpi_struct, NDPI_LOG_DEBUG, "Second Life 0xffff0052 detected.\n");
ndpi_int_secondlife_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_secondlife_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 58
&& memcmp(packet->payload, "\x40\x00\x00\x00\x01\x00\xff\xff\x00\xa9", 10) == 0) {
NDPI_LOG(NDPI_PROTOCOL_SECONDLIFE, ndpi_struct, NDPI_LOG_DEBUG, "Second Life 0xffff00a9 detected.\n");
ndpi_int_secondlife_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_secondlife_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len > 54 && memcmp(packet->payload, "\x40\x00\x00\x00\x01\x00\x08", 7) == 0 &&
get_u_int32_t(packet->payload, packet->payload_packet_len - 4) == 0) {
NDPI_LOG(NDPI_PROTOCOL_SECONDLIFE, ndpi_struct, NDPI_LOG_DEBUG, "Second Life 0x08 detected.\n");
ndpi_int_secondlife_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_secondlife_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ void ndpi_search_ayiya(struct ndpi_detection_module_struct *ndpi_struct, struct
now = flow->packet.tick_timestamp;
if((epoch >= (now - fireyears)) && (epoch <= (now+86400 /* 1 day */)))
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AYIYA, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_AYIYA/* , NDPI_REAL_PROTOCOL */);
return;
}
+1 -1
View File
@@ -33,7 +33,7 @@ static void ndpi_int_battlefield_add_connection(struct ndpi_detection_module_str
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_BATTLEFIELD, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_BATTLEFIELD/* , NDPI_REAL_PROTOCOL */);
if (src != NULL) {
src->battlefield_ts = packet->tick_timestamp;
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_bgp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_BGP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_BGP/* , NDPI_REAL_PROTOCOL */);
}
/* this detection also works asymmetrically */
+31 -31
View File
@@ -31,10 +31,10 @@
#define NDPI_PROTOCOL_PLAIN_DETECTION 0
#define NDPI_PROTOCOL_WEBSEED_DETECTION 2
static void ndpi_add_connection_as_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
const u_int8_t save_detection, const u_int8_t encrypted_connection,
ndpi_protocol_type_t protocol_type)
const u_int8_t save_detection, const u_int8_t encrypted_connection/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_BITTORRENT, protocol_type);
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_BITTORRENT/* , protocol_type */);
}
static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module_struct
@@ -58,8 +58,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT,
ndpi_struct, NDPI_LOG_TRACE, "BT: plain BitTorrent protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_REAL_PROTOCOL */);
return 1;
}
}
@@ -72,8 +72,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT,
ndpi_struct, NDPI_LOG_TRACE, "BT: plain BitTorrent protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_REAL_PROTOCOL */);
return 1;
}
}
@@ -83,8 +83,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, "BT: plain webseed BitTorrent protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
/* seen Azureus as server for webseed, possibly other servers existing, to implement */
@@ -95,8 +95,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, "BT: plain Bitcomet persistent seed protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -118,8 +118,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, "Azureus /Bittorrent user agent line detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -130,8 +130,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, "Bittorrent Shareaza detected.\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -165,8 +165,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct, NDPI_LOG_TRACE, "Bitcomet LTS detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -192,8 +192,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct, NDPI_LOG_TRACE, "FlashGet detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -214,8 +214,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct, NDPI_LOG_TRACE, "FlashGet detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_UNSAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -285,8 +285,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, " BT stat: tracker info hash parsed\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
@@ -315,8 +315,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT, ndpi_struct,
NDPI_LOG_TRACE, "BT: Warez - Plain BitTorrent protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_REAL_PROTOCOL */);
return 1;
}
}
@@ -332,8 +332,8 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module
ndpi_struct, NDPI_LOG_TRACE,
"BT: Warez - Plain BitTorrent protocol detected due to Host: ip2p.com: pattern\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION,
NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_WEBSEED_DETECTION/* , */
/* NDPI_CORRELATED_PROTOCOL */);
return 1;
}
}
@@ -399,8 +399,8 @@ void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, st
if(packet->payload_packet_len >= 23 /* min header size */) {
if(strncmp((const char*)packet->payload, bt_search, strlen(bt_search)) == 0) {
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_REAL_PROTOCOL */);
return;
} else {
/* Check if this is protocol v0 */
@@ -462,8 +462,8 @@ void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, st
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT,
ndpi_struct, NDPI_LOG_TRACE, "BT: plain BitTorrent protocol detected\n");
ndpi_add_connection_as_bittorrent(ndpi_struct, flow,
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION,
NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SAFE_DETECTION, NDPI_PROTOCOL_PLAIN_DETECTION/* , */
/* NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -10,7 +10,7 @@
static void ndpi_int_ciscovpn_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CISCOVPN, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CISCOVPN/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_ciscovpn(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+2 -2
View File
@@ -54,7 +54,7 @@ static void ndpi_check_citrix(struct ndpi_detection_module_struct *ndpi_struct,
if(memcmp(packet->payload, citrix_header, sizeof(citrix_header)) == 0) {
NDPI_LOG(NDPI_PROTOCOL_CITRIX, ndpi_struct, NDPI_LOG_DEBUG, "Found citrix.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CITRIX, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CITRIX/* , NDPI_REAL_PROTOCOL */);
}
return;
@@ -64,7 +64,7 @@ static void ndpi_check_citrix(struct ndpi_detection_module_struct *ndpi_struct,
if((memcmp(packet->payload, citrix_header, sizeof(citrix_header)) == 0)
|| (ndpi_strnstr((const char *)packet->payload, "Citrix.TcpProxyService", payload_len) != NULL)) {
NDPI_LOG(NDPI_PROTOCOL_CITRIX, ndpi_struct, NDPI_LOG_DEBUG, "Found citrix.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CITRIX, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CITRIX/* , NDPI_REAL_PROTOCOL */);
}
return;
+1 -1
View File
@@ -44,7 +44,7 @@ void ndpi_search_collectd(struct ndpi_detection_module_struct *ndpi_struct, stru
if(len == packet->payload_packet_len) {
NDPI_LOG(NDPI_PROTOCOL_COLLECTD, ndpi_struct, NDPI_LOG_DEBUG, "found COLLECTD.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_COLLECTD, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_COLLECTD/* , NDPI_REAL_PROTOCOL */);
} else {
NDPI_LOG(NDPI_PROTOCOL_COLLECTD, ndpi_struct, NDPI_LOG_DEBUG, "exclude COLLECTD.\n");
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_COLLECTD);
+1 -1
View File
@@ -25,7 +25,7 @@
static void ndpi_int_corba_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CORBA, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CORBA/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_corba(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+4 -4
View File
@@ -29,10 +29,10 @@
static void ndpi_int_crossfire_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow, ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CROSSFIRE, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_CROSSFIRE/* , protocol_type */);
}
void ndpi_search_crossfire_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
@@ -51,7 +51,7 @@ void ndpi_search_crossfire_tcp_udp(struct ndpi_detection_module_struct *ndpi_str
&& get_u_int16_t(packet->payload, 22) == ntohs(0x7d00)
) {
NDPI_LOG(NDPI_PROTOCOL_CROSSFIRE, ndpi_struct, NDPI_LOG_DEBUG, "Crossfire: found udp packet.\n");
ndpi_int_crossfire_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_crossfire_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -69,7 +69,7 @@ void ndpi_search_crossfire_tcp_udp(struct ndpi_detection_module_struct *ndpi_str
|| memcmp(packet->host_line.ptr, "www.crossfire", 13) == 0))
) {
NDPI_LOG(NDPI_PROTOCOL_CROSSFIRE, ndpi_struct, NDPI_LOG_DEBUG, "Crossfire: found HTTP request.\n");
ndpi_int_crossfire_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_crossfire_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_dcerpc_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DCERPC, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DCERPC/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_dcerpc(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_dhcp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DHCP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DHCP/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -33,7 +33,7 @@ static void ndpi_int_dhcpv6_add_connection(struct ndpi_detection_module_struct *
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DHCPV6, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DHCPV6/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_dhcpv6_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+6 -6
View File
@@ -81,7 +81,7 @@ static void ndpi_int_directconnect_add_connection(struct ndpi_detection_module_s
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
if (src != NULL) {
src->directconnect_last_safe_access_time = packet->tick_timestamp;
@@ -168,7 +168,7 @@ static void ndpi_search_directconnect_tcp(struct ndpi_detection_module_struct *n
if ((u_int32_t)
(packet->tick_timestamp -
src->directconnect_last_safe_access_time) < ndpi_struct->directconnect_connection_ip_tick_timeout) {
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
src->directconnect_last_safe_access_time = packet->tick_timestamp;
NDPI_LOG(NDPI_PROTOCOL_DIRECTCONNECT, ndpi_struct,
NDPI_LOG_DEBUG, "marking using dc port\n %d", ntohs(src->detected_directconnect_port));
@@ -184,7 +184,7 @@ static void ndpi_search_directconnect_tcp(struct ndpi_detection_module_struct *n
if ((u_int32_t)
(packet->tick_timestamp -
src->directconnect_last_safe_access_time) < ndpi_struct->directconnect_connection_ip_tick_timeout) {
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
src->directconnect_last_safe_access_time = packet->tick_timestamp;
NDPI_LOG(NDPI_PROTOCOL_DIRECTCONNECT, ndpi_struct,
NDPI_LOG_DEBUG, "marking using dc port\n %d", ntohs(src->detected_directconnect_ssl_port));
@@ -204,7 +204,7 @@ static void ndpi_search_directconnect_tcp(struct ndpi_detection_module_struct *n
if ((u_int32_t)
(packet->tick_timestamp -
dst->directconnect_last_safe_access_time) < ndpi_struct->directconnect_connection_ip_tick_timeout) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
dst->directconnect_last_safe_access_time = packet->tick_timestamp;
NDPI_LOG(NDPI_PROTOCOL_DIRECTCONNECT, ndpi_struct,
NDPI_LOG_DEBUG, "marking using dc port\n %d", ntohs(dst->detected_directconnect_port));
@@ -220,7 +220,7 @@ static void ndpi_search_directconnect_tcp(struct ndpi_detection_module_struct *n
if ((u_int32_t)
(packet->tick_timestamp -
dst->directconnect_last_safe_access_time) < ndpi_struct->directconnect_connection_ip_tick_timeout) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
dst->directconnect_last_safe_access_time = packet->tick_timestamp;
NDPI_LOG(NDPI_PROTOCOL_DIRECTCONNECT, ndpi_struct,
NDPI_LOG_DEBUG, "marking using dc port\n %d", ntohs(dst->detected_directconnect_ssl_port));
@@ -352,7 +352,7 @@ static void ndpi_search_directconnect_udp(struct ndpi_detection_module_struct
(packet->tick_timestamp -
dst->directconnect_last_safe_access_time) < ndpi_struct->directconnect_connection_ip_tick_timeout) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECTCONNECT/* , NDPI_REAL_PROTOCOL */);
dst->directconnect_last_safe_access_time = packet->tick_timestamp;
NDPI_LOG(NDPI_PROTOCOL_DIRECTCONNECT, ndpi_struct,
NDPI_LOG_DEBUG, "marking using dc udp port\n %d", ntohs(dst->detected_directconnect_udp_port));
+1 -1
View File
@@ -38,7 +38,7 @@ static void ndpi_int_direct_download_link_add_connection(struct ndpi_detection_m
{
struct ndpi_packet_struct *packet = &flow->packet;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK/* , NDPI_CORRELATED_PROTOCOL */);
flow->l4.tcp.ddlink_server_direction = packet->packet_direction;
}
+1 -1
View File
@@ -288,7 +288,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
matched a subprotocol
*/
NDPI_LOG(NDPI_PROTOCOL_DNS, ndpi_struct, NDPI_LOG_DEBUG, "found DNS.\n");
ndpi_int_add_connection(ndpi_struct, flow, (dport == 5355) ? NDPI_PROTOCOL_LLMNR : NDPI_PROTOCOL_DNS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, (dport == 5355) ? NDPI_PROTOCOL_LLMNR : NDPI_PROTOCOL_DNS/* , NDPI_REAL_PROTOCOL */);
}
} else {
flow->protos.dns.bad_packet = 1;
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_dofus_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DOFUS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_DOFUS/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_dofus(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+2 -2
View File
@@ -30,8 +30,8 @@ static void ndpi_int_dropbox_add_connection(struct ndpi_detection_module_struct
u_int8_t due_to_correlation)
{
ndpi_int_add_connection(ndpi_struct, flow,
NDPI_PROTOCOL_DROPBOX,
due_to_correlation ? NDPI_CORRELATED_PROTOCOL : NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_DROPBOX/* , */
/* due_to_correlation ? NDPI_CORRELATED_PROTOCOL : NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -32,7 +32,7 @@
#ifdef NDPI_PROTOCOL_EAQ
static void ndpi_int_eaq_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_EAQ, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_EAQ/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -28,7 +28,7 @@
#ifdef NDPI_PROTOCOL_EDONKEY
static void ndpi_int_edonkey_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_EDONKEY, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_EDONKEY/* , NDPI_REAL_PROTOCOL */);
}
static int ndpi_edonkey_payload_check(const u_int8_t *data, u_int32_t len) {
+1 -1
View File
@@ -31,7 +31,7 @@
static void ndpi_int_fasttrack_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FASTTRACK, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FASTTRACK/* , NDPI_CORRELATED_PROTOCOL */);
}
+1 -1
View File
@@ -31,7 +31,7 @@
static void ndpi_int_fiesta_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FIESTA, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FIESTA/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_fiesta(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_filetopia_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FILETOPIA, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FILETOPIA/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_filetopia_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_florensia_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FLORENSIA, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FLORENSIA/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_florensia(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -27,7 +27,7 @@
#ifdef NDPI_PROTOCOL_FTP_CONTROL
static void ndpi_int_ftp_control_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP_CONTROL, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP_CONTROL/* , NDPI_REAL_PROTOCOL */);
}
static int ndpi_ftp_control_check_request(const u_int8_t *payload) {
+1 -1
View File
@@ -28,7 +28,7 @@
#ifdef NDPI_PROTOCOL_FTP_DATA
static void ndpi_int_ftp_data_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP_DATA, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FTP_DATA/* , NDPI_REAL_PROTOCOL */);
}
static int ndpi_match_ftp_data_port(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+26 -26
View File
@@ -30,15 +30,15 @@
#ifdef NDPI_PROTOCOL_GNUTELLA
static void ndpi_int_gnutella_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
struct ndpi_packet_struct *packet = &flow->packet;
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GNUTELLA, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GNUTELLA/* , protocol_type */);
if (src != NULL) {
src->gnutella_ts = packet->tick_timestamp;
@@ -104,13 +104,13 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
/* this case works asymmetrically */
if (packet->payload_packet_len > 10 && memcmp(packet->payload, "GNUTELLA/", 9) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "GNUTELLA DETECTED\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
/* this case works asymmetrically */
if (packet->payload_packet_len > 17 && memcmp(packet->payload, "GNUTELLA CONNECT/", 17) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "GNUTELLA DETECTED\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -125,7 +125,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
|| (packet->line[c].len > 36 && memcmp(packet->line[c].ptr,
"Content-Type: application/x-gnutella-", 37) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG, "DETECTED GNUTELLA GET.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -137,7 +137,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
|| (packet->accept_line.ptr != NULL && packet->accept_line.len > 24
&& memcmp(packet->accept_line.ptr, "application n/x-gnutella", 24) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG, "DETECTED GNUTELLA GET.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
}
}
@@ -154,7 +154,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
if (c < (packet->payload_packet_len - 9) && memcmp(&packet->payload[c], "urn:sha1:", 9) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE,
"detected GET /get/ or GET /uri-res/.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
}
}
@@ -163,7 +163,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
* it is searched in the upper paragraph. */
if (packet->payload_packet_len > 30 && memcmp(packet->payload, "HEAD /gnutella/push-proxy?", 26) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "detected HEAD /gnutella/push-proxy?\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
/* haven't found any trace with this pattern */
@@ -171,7 +171,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& memcmp(packet->payload, "\x50\x55\x53\x48\x20\x67\x75\x69\x64\x3a", 10) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE,
"detected \x50\x55\x53\x48\x20\x67\x75\x69\x64\x3a\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
/* haven't found any trace with this pattern */
@@ -192,7 +192,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA,
ndpi_struct, NDPI_LOG_TRACE, "FOXY :: GNUTELLA GET 2 DETECTED\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
@@ -213,14 +213,14 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
get_u_int32_t(packet->payload, 4) == htonl(0x01000300) && get_u_int32_t(packet->payload, 8) == htonl(0x00002000) &&
get_u_int16_t(packet->payload, 12) == htons(0x0034)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "detected gnutella len == 46.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 49 &&
memcmp(packet->payload, "\x80\x2f\x01\x03\x01\x00\x06\x00\x00\x00\x20\x00\x00\x34\x00\x00\xff\x4d\x6c",
19) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "detected gnutella len == 49.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 89 && memcmp(&packet->payload[43], "\x20\x4d\x6c", 3) == 0 &&
@@ -228,7 +228,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
memcmp(&packet->payload[76], "\x00\x02\x00\x34\x01\x00\x00\x05", 8) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE,
"detected gnutella asymmetrically len == 388.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
} else if (packet->payload_packet_len == 82) {
if (get_u_int32_t(packet->payload, 0) == htonl(0x16030100)
@@ -237,7 +237,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& get_u_int16_t(packet->payload, 76) == htons(0x0002)
&& get_u_int32_t(packet->payload, 78) == htonl(0x00340100)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_TRACE, "detected len == 82.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -246,7 +246,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
packet->udp->source == src->detected_gnutella_udp_port2) &&
(packet->tick_timestamp - src->gnutella_ts) < ndpi_struct->gnutella_timeout) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG, "port based detection\n\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
}
/* observations:
* all the following patterns send out many packets which are the only ones of their flows,
@@ -260,7 +260,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& packet->payload[20] == 0x00 && packet->payload[21] == 0x00 && packet->payload[22] == 0x00) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 23.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -270,28 +270,28 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& packet->payload[30] == 0x43 && packet->payload[31] == 0x50 && packet->payload[32] == 0x41) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 35.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 32
&& (memcmp(&packet->payload[16], "\x31\x01\x00\x09\x00\x00\x00\x4c\x49\x4d\x45", 11) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 32.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 34 && (memcmp(&packet->payload[25], "SCP@", 4) == 0)
&& (memcmp(&packet->payload[30], "DNA@", 4) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 34.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if ((packet->payload_packet_len == 73 || packet->payload_packet_len == 96)
&& memcmp(&packet->payload[32], "urn:sha1:", 9) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 73,96.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -311,7 +311,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
|| (packet->payload_packet_len > 300 && (packet->payload[3] == 0x01 || packet->payload[3] == 0x03))) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, GND.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -320,14 +320,14 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& memcmp(&packet->payload[16], "\x31\x01\x00\x09\x00\x00\x00", 7) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 32 ii.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if ((packet->payload_packet_len == 23)
&& memcmp(&packet->payload[16], "\x00\x01\x00\x00\x00\x00\x00", 7) == 0) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct, NDPI_LOG_DEBUG,
"detected gnutella udp, len = 23 ii.\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -353,7 +353,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& NDPI_SRC_OR_DST_HAS_PROTOCOL(src, dst, NDPI_PROTOCOL_GNUTELLA)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct,
NDPI_LOG_TRACE, "GNUTELLA DETECTED due to message ID match (NEONet protocol)\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
} else if (flow->l4.tcp.gnutella_stage == 2 - packet->packet_direction) {
@@ -364,7 +364,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
&& NDPI_SRC_OR_DST_HAS_PROTOCOL(src, dst, NDPI_PROTOCOL_GNUTELLA)) {
NDPI_LOG(NDPI_PROTOCOL_GNUTELLA, ndpi_struct,
NDPI_LOG_TRACE, "GNUTELLA DETECTED due to message ID match (NEONet protocol)\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_gnutella_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -60,7 +60,7 @@ static void ndpi_check_gtp(struct ndpi_detection_module_struct *ndpi_struct, str
if(message_len <= (payload_len-sizeof(struct gtp_header_generic))) {
NDPI_LOG(NDPI_PROTOCOL_GTP, ndpi_struct, NDPI_LOG_DEBUG, "Found gtp.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GTP/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -31,7 +31,7 @@
static void ndpi_int_guildwars_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GUILDWARS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_GUILDWARS/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_guildwars_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+5 -5
View File
@@ -43,7 +43,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
/* ISO 8073/X.224 */
if((packet->payload[5] == 0xE0 /* CC Connect Request */)
|| (packet->payload[5] == 0xD0 /* CC Connect Confirm */)) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RDP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RDP/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -52,7 +52,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
if(flow->l4.tcp.h323_valid_packets >= 2) {
NDPI_LOG(NDPI_PROTOCOL_H323, ndpi_struct, NDPI_LOG_DEBUG, "found H323 broadcast.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323/* , NDPI_REAL_PROTOCOL */);
}
} else {
/* This is not H.323 */
@@ -67,7 +67,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
packet->payload[4] == 0x00 && packet->payload[5] == 0x00)
{
NDPI_LOG(NDPI_PROTOCOL_H323, ndpi_struct, NDPI_LOG_DEBUG, "found H323 broadcast.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323/* , NDPI_REAL_PROTOCOL */);
return;
}
/* H323 */
@@ -76,13 +76,13 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
if(packet->payload[0] == 0x16 && packet->payload[1] == 0x80 && packet->payload[4] == 0x06 && packet->payload[5] == 0x00)
{
NDPI_LOG(NDPI_PROTOCOL_H323, ndpi_struct, NDPI_LOG_DEBUG, "found H323 broadcast.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323/* , NDPI_REAL_PROTOCOL */);
return;
}
else if(packet->payload_packet_len >= 20 || packet->payload_packet_len <= 117)
{
NDPI_LOG(NDPI_PROTOCOL_H323, ndpi_struct, NDPI_LOG_DEBUG, "found H323 broadcast.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_H323/* , NDPI_REAL_PROTOCOL */);
return;
}
else
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_halflife2_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HALFLIFE2, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HALFLIFE2/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_halflife2(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+2 -2
View File
@@ -39,10 +39,10 @@ static void ndpi_int_http_add_connection(struct ndpi_detection_module_struct *nd
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) {
if(protocol != NDPI_PROTOCOL_HTTP) {
ndpi_search_tcp_or_udp(ndpi_struct, flow);
ndpi_int_add_connection(ndpi_struct, flow, protocol, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, protocol/* , NDPI_CORRELATED_PROTOCOL */);
} else {
ndpi_int_reset_protocol(flow);
ndpi_int_add_connection(ndpi_struct, flow, protocol, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, protocol/* , NDPI_REAL_PROTOCOL */);
}
}
+1 -1
View File
@@ -28,7 +28,7 @@
#ifdef NDPI_PROTOCOL_HTTP_APPLICATION_ACTIVESYNC
static void ndpi_int_activesync_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP_APPLICATION_ACTIVESYNC, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP_APPLICATION_ACTIVESYNC/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_activesync(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_iax_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IAX, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IAX/* , NDPI_REAL_PROTOCOL */);
}
static void ndpi_search_setup_iax(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_icecast_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ICECAST, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ICECAST/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_icecast_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+13 -13
View File
@@ -29,9 +29,9 @@
static void ndpi_int_imesh_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow, ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IMESH, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IMESH/* , protocol_type */);
}
@@ -48,7 +48,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
get_u_int32_t(packet->payload, 24) == 0 &&
(packet->udp->dest == htons(1864) || packet->udp->source == htons(1864))) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh Login detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 36) {
@@ -60,7 +60,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
|| packet->payload[packet->payload_packet_len - 1] ==
packet->payload[packet->payload_packet_len - 5] - 1)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (get_u_int16_t(packet->payload, 0) == htons(0x0200) && get_u_int16_t(packet->payload, 2) != 0 &&
@@ -70,7 +70,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
|| packet->payload[packet->payload_packet_len - 1] ==
packet->payload[packet->payload_packet_len - 5] - 1)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -80,7 +80,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
packet->payload[packet->payload_packet_len - 1] - 1 == packet->payload[packet->payload_packet_len - 5] ||
packet->payload[packet->payload_packet_len - 1] == packet->payload[packet->payload_packet_len - 5] - 1)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 32 && get_u_int32_t(packet->payload, 0) == htonl(0x02000000) &&
@@ -89,12 +89,12 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
get_l16(packet->payload, 24) == htons(packet->udp->source)) {
/* packet->payload[28] = source address */
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (get_u_int32_t(packet->payload, 4) == htonl(0x01000082)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -109,7 +109,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
get_u_int32_t(packet->payload, 12) == htonl(0x04800100) && get_u_int32_t(packet->payload, 45) == htonl(0xff020000) &&
get_u_int16_t(packet->payload, 49) == htons(0x001a)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "found imesh.\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 95 && get_u_int32_t(packet->payload, 0) == htonl(0x5f000000) &&
@@ -117,7 +117,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
get_u_int32_t(packet->payload, 20) == 0 && get_u_int32_t(packet->payload, 28) == htonl(0xc8000400) &&
packet->payload[9] == 0x80 && get_u_int32_t(packet->payload, 10) == get_u_int32_t(packet->payload, 24)) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "found imesh.\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 28 && get_u_int32_t(packet->payload, 0) == htonl(0x1c000000) &&
@@ -125,7 +125,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
(get_u_int16_t(packet->payload, packet->payload_packet_len - 2) == htons(0x1900) ||
get_u_int16_t(packet->payload, packet->payload_packet_len - 2) == htons(0x1a00))) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "found imesh.\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -268,7 +268,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
memcmp(packet->line[4].ptr, "Accept-Encoding: identity",
NDPI_STATICSTRING_LEN("Accept-Encoding: identity")) == 0) {
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "iMesh Login detected\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -277,7 +277,7 @@ void ndpi_search_imesh_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
&& (flow->l4.tcp.seen_syn && flow->l4.tcp.seen_syn_ack && flow->l4.tcp.seen_ack) /* We have seen the 3-way handshake */)
{
NDPI_LOG(NDPI_PROTOCOL_IMESH, ndpi_struct, NDPI_LOG_DEBUG, "found imesh.\n");
ndpi_int_imesh_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_imesh_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+4 -4
View File
@@ -27,9 +27,9 @@
#ifdef NDPI_PROTOCOL_IPP
static void ndpi_int_ipp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow, ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IPP, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IPP/* , protocol_type */);
}
void ndpi_search_ipp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
@@ -90,7 +90,7 @@ void ndpi_search_ipp(struct ndpi_detection_module_struct *ndpi_struct, struct nd
}
NDPI_LOG(NDPI_PROTOCOL_IPP, ndpi_struct, NDPI_LOG_DEBUG, "found ipp\n");
ndpi_int_ipp_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_ipp_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -101,7 +101,7 @@ void ndpi_search_ipp(struct ndpi_detection_module_struct *ndpi_struct, struct nd
if (packet->content_line.ptr != NULL && packet->content_line.len > 14
&& memcmp(packet->content_line.ptr, "application/ipp", 15) == 0) {
NDPI_LOG(NDPI_PROTOCOL_IPP, ndpi_struct, NDPI_LOG_DEBUG, "found ipp via POST ... application/ipp.\n");
ndpi_int_ipp_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_ipp_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -35,7 +35,7 @@
static void ndpi_int_irc_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IRC, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IRC/* , NDPI_REAL_PROTOCOL */);
}
+6 -6
View File
@@ -41,9 +41,9 @@ static struct jabber_string jabber_strings[] = {
static void ndpi_int_jabber_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int32_t protocol, ndpi_protocol_type_t protocol_type)
u_int32_t protocol/* , ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, protocol, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, protocol/* , protocol_type */);
}
static void check_content_type_and_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
@@ -56,7 +56,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
for(i=0; jabber_strings[i].string != NULL; i++) {
if(ndpi_strnstr((const char*)&packet->payload[x], jabber_strings[i].string, left) != NULL) {
ndpi_int_jabber_add_connection(ndpi_struct, flow, jabber_strings[i].ndpi_protocol, NDPI_CORRELATED_PROTOCOL);
ndpi_int_jabber_add_connection(ndpi_struct, flow, jabber_strings[i].ndpi_protocol/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -95,7 +95,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
"found jabber file transfer.\n");
ndpi_int_jabber_add_connection(ndpi_struct, flow,
NDPI_PROTOCOL_UNENCRYPED_JABBER, NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_UNENCRYPED_JABBER/* , NDPI_CORRELATED_PROTOCOL */);
}
}
if (dst != NULL && dst->jabber_file_transfer_port[0] != 0) {
@@ -117,7 +117,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
"found jabber file transfer.\n");
ndpi_int_jabber_add_connection(ndpi_struct, flow,
NDPI_PROTOCOL_UNENCRYPED_JABBER, NDPI_CORRELATED_PROTOCOL);
NDPI_PROTOCOL_UNENCRYPED_JABBER/* , NDPI_CORRELATED_PROTOCOL */);
}
}
return;
@@ -282,7 +282,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|| ndpi_strnstr((const char *)&packet->payload[13], "xmlns:stream=\"http://etherx.jabber.org/streams\"", start)) {
/* Protocol family */
ndpi_int_jabber_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPED_JABBER, NDPI_REAL_PROTOCOL);
ndpi_int_jabber_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPED_JABBER/* , NDPI_REAL_PROTOCOL */);
/* search for subprotocols */
check_content_type_and_change_protocol(ndpi_struct, flow, 13);
+1 -1
View File
@@ -50,7 +50,7 @@ void ndpi_search_kakaotalk_voice(struct ndpi_detection_module_struct *ndpi_struc
if(((ntohl(packet->iph->saddr) & 0xFFFF0000 /* 255.255.0.0 */) == 0x01C90000 /* 1.201.0.0/16 */)
|| ((ntohl(packet->iph->daddr) & 0xFFFF0000 /* 255.255.0.0 */) == 0x01C90000 /* 1.201.0.0/16 */)) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_SERVICE_KAKAOTALK_VOICE, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_SERVICE_KAKAOTALK_VOICE/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -32,7 +32,7 @@
static void ndpi_int_kerberos_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_KERBEROS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_KERBEROS/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_kontiki_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_KONTIKI, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_KONTIKI/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_kontiki(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -32,7 +32,7 @@
static void ndpi_int_ldap_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_LDAP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_LDAP/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_ldap(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -59,7 +59,7 @@ static void ndpi_check_lotus_notes(struct ndpi_detection_module_struct *ndpi_str
if(memcmp(&packet->payload[6], lotus_notes_header, sizeof(lotus_notes_header)) == 0) {
NDPI_LOG(NDPI_PROTOCOL_LOTUS_NOTES, ndpi_struct, NDPI_LOG_DEBUG, "Found lotus_notes.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_LOTUS_NOTES, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_LOTUS_NOTES/* , NDPI_REAL_PROTOCOL */);
}
return;
+1 -1
View File
@@ -28,7 +28,7 @@
static void ndpi_int_mail_imap_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_IMAP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_IMAP/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_mail_imap_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -43,7 +43,7 @@
static void ndpi_int_mail_pop_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_POP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_POP/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -45,7 +45,7 @@
static void ndpi_int_mail_smtp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_SMTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAIL_SMTP/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_mail_smtp_tcp(struct ndpi_detection_module_struct
+6 -6
View File
@@ -28,10 +28,10 @@
#ifdef NDPI_PROTOCOL_MAPLESTORY
static void ndpi_int_maplestory_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
static void ndpi_int_maplestory_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAPLESTORY, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MAPLESTORY/* , protocol_type */);
}
@@ -49,7 +49,7 @@ void ndpi_search_maplestory(struct ndpi_detection_module_struct *ndpi_struct, st
|| ntohl(get_u_int32_t(packet->payload, 0)) == 0x0e004200)
&& ntohs(get_u_int16_t(packet->payload, 4)) == 0x0100 && (packet->payload[6] == 0x32 || packet->payload[6] == 0x33)) {
NDPI_LOG(NDPI_PROTOCOL_MAPLESTORY, ndpi_struct, NDPI_LOG_DEBUG, "found maplestory.\n");
ndpi_int_maplestory_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_maplestory_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -67,7 +67,7 @@ void ndpi_search_maplestory(struct ndpi_detection_module_struct *ndpi_struct, st
&& memcmp(packet->user_agent_line.ptr, "Patcher", NDPI_STATICSTRING_LEN("Patcher")) == 0
&& memcmp(packet->host_line.ptr, "patch.", NDPI_STATICSTRING_LEN("patch.")) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MAPLESTORY, ndpi_struct, NDPI_LOG_DEBUG, "found maplestory update.\n");
ndpi_int_maplestory_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_maplestory_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
} else if (packet->user_agent_line.ptr != NULL && packet->user_agent_line.len == NDPI_STATICSTRING_LEN("AspINet")
@@ -75,7 +75,7 @@ void ndpi_search_maplestory(struct ndpi_detection_module_struct *ndpi_struct, st
NDPI_STATICSTRING_LEN("story/")) == 0
&& memcmp(packet->user_agent_line.ptr, "AspINet", NDPI_STATICSTRING_LEN("AspINet")) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MAPLESTORY, ndpi_struct, NDPI_LOG_DEBUG, "found maplestory update.\n");
ndpi_int_maplestory_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_maplestory_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ This module should detect MDNS
static void ndpi_int_mdns_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MDNS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MDNS/* , NDPI_REAL_PROTOCOL */);
}
static int ndpi_int_check_mdns_payload(struct ndpi_detection_module_struct
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_meebo_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MEEBO, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MEEBO/* , NDPI_CORRELATED_PROTOCOL */);
}
+1 -1
View File
@@ -37,7 +37,7 @@ void ndpi_search_megaco(struct ndpi_detection_module_struct *ndpi_struct, struct
packet->payload[5] == 'O' && packet->payload[6] == '/' &&
packet->payload[7] == '1' && packet->payload[8] == ' ' && packet->payload[9] == '[')) {
NDPI_LOG(NDPI_PROTOCOL_MEGACO, ndpi_struct, NDPI_LOG_DEBUG, "found MEGACO.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MEGACO, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MEGACO/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_mgcp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MGCP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MGCP/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -31,7 +31,7 @@
static void ndpi_int_mms_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_CONTENT_MMS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_CONTENT_MMS/* , NDPI_REAL_PROTOCOL */);
}
+27 -27
View File
@@ -28,10 +28,10 @@
#ifdef NDPI_PROTOCOL_MSN
#define MAX_PACKETS_FOR_MSN 100
static void ndpi_int_msn_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
static void ndpi_int_msn_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MSN, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MSN/* , protocol_type */);
}
static u_int8_t ndpi_int_find_xmsn(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
@@ -72,7 +72,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (memcmp(packet->payload + 24, "MSNSLP", 6) == 0
|| (get_u_int32_t(packet->payload, 0) == htonl(0x30000000) && get_u_int32_t(packet->payload, 4) == 0x00000000)) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "detected MSN File Transfer, ifdef ssl.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -85,7 +85,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (flow->l4.tcp.msn_ssl_ft == 2) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"detected MSN File Transfer, ifdef ssl 2.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
}
return;
}
@@ -119,9 +119,9 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
/* if (packet->payload_packet_len > 100 &&
get_u_int16_t(packet->payload, 86) == htons(0x05dc)) { */
if (packet->payload_packet_len > 101 && packet->payload[101] == 0x02) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
} else {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
}
return;
@@ -138,13 +138,13 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
3) == 0 || memcmp(&packet->payload[packet->payload_packet_len - 8], "MSNP", 4) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN by pattern VER...CVR/MSNP ODOA.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (memcmp(&packet->payload[4], "MSNFT", 5) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN FT by pattern VER MSNFT...0d0a.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -161,7 +161,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (packet->user_agent_line.ptr != NULL &&
packet->user_agent_line.len > NDPI_STATICSTRING_LEN("Messenger/") &&
memcmp(packet->user_agent_line.ptr, "Messenger/", NDPI_STATICSTRING_LEN("Messenger/")) == 0) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -190,7 +190,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
NDPI_STATICSTRING_LEN("text/x-msnmsgr")) == 0))) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN by pattern POST http:// .... application/x-msn-messenger.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -251,7 +251,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
!= 0)) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN with pattern text/xml; charset=utf-8.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
for (a = 0; a < packet->parsed_lines; a++) {
@@ -263,7 +263,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
"found MSN with pattern text/sml; charset0utf-8.\n");
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct,
NDPI_LOG_TRACE, "MSN xml CVS / VER / ANS found\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -294,12 +294,12 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
NDPI_STATICSTRING_LEN("text/x-msnmsgr")) == 0))) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"HTTP/1.0 200 OK .... application/x-msn-messenger.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
if (ndpi_int_find_xmsn(ndpi_struct, flow) == 1) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "HTTP/1.0 200 OK .... X-MSN.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -312,7 +312,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (memcmp(packet->payload, "CONNECT messenger.hotmail.com:1863 HTTP/1.", 42) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN with pattern CONNECT messenger.hotmail.com:1863 HTTP/1..\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -353,7 +353,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
}
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"found MSN with pattern USR/ANS ...mail_address.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -385,12 +385,12 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
memcmp(packet->content_line.ptr, "text/x-msnmsgr", NDPI_STATICSTRING_LEN("text/x-msnmsgr")) == 0))) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE,
"HTTP/1.0 200 OK .... application/x-msn-messenger.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
if (ndpi_int_find_xmsn(ndpi_struct, flow) == 1) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "HTTP/1.0 200 OK .... X-MSN.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -408,7 +408,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (flow->packet_counter == 1 &&
packet->payload_packet_len > 12 && memcmp(packet->payload, "recipientid=", 12) == 0) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_DEBUG, "detected file transfer.\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -435,7 +435,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
/* asymmetric detection to this pattern is asym (2) */
} else if (flow->l4.tcp.msn_stage == 1 + packet->packet_direction) {
if (packet->payload_packet_len > 10 && get_u_int32_t(packet->payload, 0) == htonl(0x666f6f00)) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 1\n");
return;
}
@@ -449,26 +449,26 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
} else if (flow->l4.tcp.msn_stage == 2 - packet->packet_direction
&& packet->payload_packet_len == 4 && get_u_int32_t(packet->payload, 0) == htonl(0x30000000)) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 2\n");
return;
} else if ((flow->l4.tcp.msn_stage == 3 + packet->packet_direction)
|| (flow->l4.tcp.msn_stage == 4 - packet->packet_direction)) {
if (packet->payload_packet_len == 4 && get_u_int32_t(packet->payload, 0) == htonl(0x30000000)) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 2\n");
return;
}
} else if (flow->l4.tcp.msn_stage == 6 - packet->packet_direction) {
if ((packet->payload_packet_len == 4) &&
(get_u_int32_t(packet->payload, 0) == htonl(0x10000000) || get_u_int32_t(packet->payload, 0) == htonl(0x30000000))) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 3\n");
return;
}
} else if (flow->l4.tcp.msn_stage == 5 + packet->packet_direction) {
if ((packet->payload_packet_len == 20) && get_u_int32_t(packet->payload, 0) == htonl(0x10000000)) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 3\n");
return;
}
@@ -481,7 +481,7 @@ static void ndpi_search_msn_tcp(struct ndpi_detection_module_struct *ndpi_struct
if (memcmp(&packet->payload[40], "INVITE MSNMSGR", 14) == 0
|| memcmp(&packet->payload[56], "INVITE MSNMSGR", 14) == 0
|| memcmp(&packet->payload[172], "INVITE MSNMSGR", 14) == 0) {
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "MSN File Transfer detected 3\n");
return;
@@ -521,7 +521,7 @@ static void ndpi_search_udp_msn_misc(struct ndpi_detection_module_struct
&& get_u_int32_t(packet->payload, 4) == 0 && packet->payload[9] == 0
&& get_u_int16_t(packet->payload, 10) == htons(0x0100)) {
NDPI_LOG(NDPI_PROTOCOL_MSN, ndpi_struct, NDPI_LOG_TRACE, "msn udp misc data connection detected\n");
ndpi_int_msn_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_msn_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
}
/* asymmetric detection working. */
+1 -1
View File
@@ -32,7 +32,7 @@
static void ndpi_int_mssql_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MSSQL, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MSSQL/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_mssql(struct ndpi_detection_module_struct
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_mysql_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MYSQL, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_MYSQL/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_mysql_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -63,7 +63,7 @@ static int netbios_name_interpret(char *in, char *out, u_int out_len) {
static void ndpi_int_netbios_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETBIOS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETBIOS/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -78,7 +78,7 @@ static void ndpi_check_netflow(struct ndpi_detection_module_struct *ndpi_struct,
if(((version == 1) && (when == 0))
|| ((when >= 946684800 /* 1/1/2000 */) && (when <= now))) {
NDPI_LOG(NDPI_PROTOCOL_NETFLOW, ndpi_struct, NDPI_LOG_DEBUG, "Found netflow.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETFLOW, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETFLOW/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_nfs_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NFS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NFS/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_nfs(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -13,7 +13,7 @@
static void ndpi_int_noe_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NOE, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NOE/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_noe(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+2 -2
View File
@@ -32,8 +32,8 @@
if (NDPI_COMPARE_PROTOCOL_TO_BITMASK(ndpi_struct->detection_bitmask,nprot) != 0) \
{ \
ndpi_int_add_connection(ndpi_struct, flow, \
nprot, \
NDPI_REAL_PROTOCOL); \
nprot/* , */ \
/* NDPI_REAL_PROTOCOL */); \
} \
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_ntp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NTP/* , NDPI_REAL_PROTOCOL */);
}
/* detection also works asymmetrically */
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_openft_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENFT, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENFT/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_openft_tcp(struct ndpi_detection_module_struct
+6 -6
View File
@@ -24,8 +24,8 @@ void ndpi_search_openvpn(struct ndpi_detection_module_struct* ndpi_struct,
packet->payload[2] == 0x00 && packet->payload[3] == 0x00)) {
NDPI_LOG(NDPI_PROTOCOL_OPENVPN, ndpi_struct, NDPI_LOG_DEBUG,
"found openvpn udp 443.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN,
NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN/* , */
/* NDPI_REAL_PROTOCOL */);
return;
}
@@ -39,8 +39,8 @@ void ndpi_search_openvpn(struct ndpi_detection_module_struct* ndpi_struct,
packet->payload[0] == 0x38 || packet->payload[0] == 0x39)) {
NDPI_LOG(NDPI_PROTOCOL_OPENVPN, ndpi_struct, NDPI_LOG_DEBUG,
"found openvpn broadcast udp STD.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN,
NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN/* , */
/* NDPI_REAL_PROTOCOL */);
return;
}
@@ -56,8 +56,8 @@ void ndpi_search_openvpn(struct ndpi_detection_module_struct* ndpi_struct,
(packet->payload[2] == 0x38))) {
NDPI_LOG(NDPI_PROTOCOL_OPENVPN, ndpi_struct, NDPI_LOG_DEBUG,
"found openvpn broadcast udp STD.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN,
NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OPENVPN/* , */
/* NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -26,7 +26,7 @@
static void ndpi_int_oracle_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ORACLE, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_ORACLE/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_oracle(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+16 -16
View File
@@ -29,14 +29,14 @@
#ifdef NDPI_PROTOCOL_OSCAR
static void ndpi_int_oscar_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow, ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */)
{
struct ndpi_packet_struct *packet = &flow->packet;
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OSCAR, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OSCAR/* , protocol_type */);
if (src != NULL) {
src->oscar_last_safe_access_time = packet->tick_timestamp;
@@ -67,7 +67,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
if (get_u_int8_t(packet->payload, 1) == 0x01 && get_u_int16_t(packet->payload, 4) == htons(packet->payload_packet_len - 6)
&& get_u_int32_t(packet->payload, 6) == htonl(0x0000000001)) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR Connection FOUND \n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -86,7 +86,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
&& (get_u_int16_t(packet->payload, 8) == htons(0x0006)
|| get_u_int16_t(packet->payload, 8) == htons(0x000c))) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR IM Detected \n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -100,7 +100,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
if (memcmp(packet->host_line.ptr, "lifestream.aol.com", 18) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG,
"OSCAR over HTTP found, POST method\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -114,7 +114,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
(memcmp(&packet->payload[5], "b/ss/aolwpaim", 13) == 0) ||
(memcmp(&packet->payload[5], "hss/storage/aimtmpshare", 23) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR over HTTP found, GET /aim/\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
@@ -127,7 +127,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
(memcmp(packet->user_agent_line.ptr, "AIM%20Free/", NDPI_STATICSTRING_LEN("AIM%20Free/")) == 0) ||
(memcmp(packet->user_agent_line.ptr, "AIM/", 4) == 0))) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR over HTTP found\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -142,7 +142,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
if (memcmp(&packet->referer_line.ptr[i + 1], "im/gromit/aim_express", 21) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG,
"OSCAR over HTTP found : aim/gromit/aim_express\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -153,12 +153,12 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
if (memcmp(packet->payload, "CONNECT ", 8) == 0) {
if (memcmp(packet->payload, "CONNECT login.icq.com:443 HTTP/1.", 33) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR ICQ-HTTP FOUND\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
if (memcmp(packet->payload, "CONNECT login.oscar.aol.com:5190 HTTP/1.", 40) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR AIM-HTTP FOUND\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
@@ -168,14 +168,14 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
if (packet->payload_packet_len > 43
&& memcmp(packet->payload, "GET http://http.proxy.icq.com/hello HTTP/1.", 43) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR ICQ-HTTP PROXY FOUND\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
if (packet->payload_packet_len > 46
&& memcmp(packet->payload, "GET http://aimhttp.oscar.aol.com/hello HTTP/1.", 46) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR AIM-HTTP PROXY FOUND\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
@@ -194,7 +194,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
memcmp(&packet->payload[packet->payload_packet_len - 26],
"\x67\x00\x65\x00\x74\x00\x43\x00\x61\x00\x74\x00\x61\x00\x6c\x00\x6f\x00\x67", 19) == 0) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR PICTURE TRANSFER\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -222,7 +222,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
)))) {
// FILE TRANSFER PATTERN:: OFT3 or OFT2
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR FILE TRANSFER\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
@@ -230,7 +230,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
//PICTURE TRANSFER PATTERN EXMAPLE::
//4f 44 43 32 00 4c 00 01 00 06 00 00 00 00 00 00 ODC2.L..........
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR PICTURE TRANSFER\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -241,7 +241,7 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
&& (memcmp(&packet->payload[packet->payload_packet_len - 6], "DEST", 4) == 0)
&& (memcmp(&packet->payload[packet->payload_packet_len - 2], "\x00\x00", 2) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_OSCAR, ndpi_struct, NDPI_LOG_DEBUG, "OSCAR PICTURE TRANSFER\n");
ndpi_int_oscar_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_oscar_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
if (ntohs(packet->tcp->dest) == 443 || ntohs(packet->tcp->source) == 443) {
flow->oscar_ssl_voice_stage = 1;
}
+1 -1
View File
@@ -27,7 +27,7 @@
#ifdef NDPI_PROTOCOL_PANDO
static void ndpi_int_pando_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PANDO, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PANDO/* , NDPI_REAL_PROTOCOL */);
}
static void ndpi_check_pando_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_pcanywhere_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PCANYWHERE, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PCANYWHERE/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_pcanywhere(struct ndpi_detection_module_struct
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_postgres_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_POSTGRES, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_POSTGRES/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_postgres_tcp(struct ndpi_detection_module_struct
+1 -1
View File
@@ -28,7 +28,7 @@
#ifdef NDPI_PROTOCOL_PPLIVE
static void ndpi_int_pplive_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPLIVE, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPLIVE/* , NDPI_REAL_PROTOCOL */);
}
static void ndpi_check_pplive_udp1(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_ppstream_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPSTREAM, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPSTREAM/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_ppstream(struct ndpi_detection_module_struct
+1 -1
View File
@@ -32,7 +32,7 @@
static void ndpi_int_pptp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPTP/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_pptp(struct ndpi_detection_module_struct
+26 -26
View File
@@ -28,10 +28,10 @@
#ifdef NDPI_PROTOCOL_QQ
static void ndpi_int_qq_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QQ, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QQ/* , protocol_type */);
}
@@ -275,7 +275,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 030001 or 000e35 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -294,7 +294,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
return;
} */
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -314,7 +314,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
return;
} else */ if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq udp pattern four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -334,7 +334,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 04 1159 ... 03 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -347,7 +347,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 02/06 0100 ... 03/00 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -359,7 +359,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 02 1131 ... 03 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -372,7 +372,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 0203[packet_length_0b0b] three times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -386,7 +386,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 02 02 <length> four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -399,7 +399,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over udp.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq packet stage %d\n", flow->qq_stage);
@@ -410,7 +410,7 @@ static void ndpi_search_qq_udp(struct ndpi_detection_module_struct *ndpi_struct,
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq ft over udp.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -450,7 +450,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
get_u_int16_t(packet->payload, packet->payload_packet_len - 2) == htons(0x0000)) {
if (flow->qq_stage == 4) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp - maybe ft/audio/video.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
flow->qq_stage = 4;
@@ -497,7 +497,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -507,7 +507,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -517,7 +517,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq ft over tcp.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -538,7 +538,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
flow->qq_stage++;
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq udp pattern 02 ... 03 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -563,7 +563,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
if (flow->qq_stage == 3) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG,
"found qq udp pattern 04 1159 ... 03 four times.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
return;
@@ -576,7 +576,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found GET or POST.\n");
if (memcmp(packet->payload, "GET /qqfile/qq", 14) == 0) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp GET /qqfile/qq.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
ndpi_parse_packet_line_info(ndpi_struct, flow);
@@ -584,13 +584,13 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
if (packet->user_agent_line.ptr != NULL
&& (packet->user_agent_line.len > 7 && memcmp(packet->user_agent_line.ptr, "QQClient", 8) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp GET...QQClient\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
for (i = 0; i < packet->parsed_lines; i++) {
if (packet->line[i].len > 3 && memcmp(packet->line[i].ptr, "QQ: ", 4) == 0) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp GET...QQ: \n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -598,7 +598,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "host line ptr\n");
if (packet->host_line.len > 11 && memcmp(&packet->host_line.ptr[0], "www.qq.co.za", 12) == 0) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq over tcp Host: www.qq.co.za\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_CORRELATED_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_CORRELATED_PROTOCOL */);
return;
}
}
@@ -611,7 +611,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
}
if (i == 81) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq Mail.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
@@ -620,7 +620,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
&& get_u_int32_t(packet->payload, 4) == htonl(0x01020000)
&& get_u_int32_t(packet->payload, 8) == htonl(0x04015151) && get_u_int32_t(packet->payload, 12) == htonl(0x4d61696c)) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq Mail.\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
if (packet->payload_packet_len == 204 && flow->qq_stage == 0 && get_u_int32_t(packet->payload, 200) == htonl(0xfbffffff)) {
@@ -631,7 +631,7 @@ void ndpi_search_qq_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct
}
if (i == 199) {
NDPI_LOG(NDPI_PROTOCOL_QQ, ndpi_struct, NDPI_LOG_DEBUG, "found qq chat or file transfer\n");
ndpi_int_qq_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_qq_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_quake_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QUAKE, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QUAKE/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_quake(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -46,7 +46,7 @@
static void ndpi_int_quic_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QUIC, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_QUIC/* , NDPI_REAL_PROTOCOL */);
}
static int connect_id(const unsigned char pflags)
+1 -1
View File
@@ -52,7 +52,7 @@ static void ndpi_check_radius(struct ndpi_detection_module_struct *ndpi_struct,
&& (h->code <= 5)
&& (len == payload_len)) {
NDPI_LOG(NDPI_PROTOCOL_RADIUS, ndpi_struct, NDPI_LOG_DEBUG, "Found radius.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RADIUS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RADIUS/* , NDPI_REAL_PROTOCOL */);
return;
}
+1 -1
View File
@@ -29,7 +29,7 @@
static void ndpi_int_rdp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RDP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RDP/* , NDPI_REAL_PROTOCOL */);
}
void ndpi_search_rdp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -24,7 +24,7 @@
#ifdef NDPI_PROTOCOL_REDIS
static void ndpi_int_redis_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_REDIS, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_REDIS/* , NDPI_REAL_PROTOCOL */);
}
+1 -1
View File
@@ -26,7 +26,7 @@
static void ndpi_int_rsync_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RSYNC, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RSYNC/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_rsync(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -12,7 +12,7 @@
static void ndpi_int_rtcp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTCP, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTCP/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_rtcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -1
View File
@@ -29,7 +29,7 @@
#ifdef NDPI_PROTOCOL_RTMP
static void ndpi_int_rtmp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTMP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTMP/* , NDPI_REAL_PROTOCOL */);
}
static void ndpi_check_rtmp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+3 -3
View File
@@ -44,7 +44,7 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
&& (*ssid != 0)
) {
NDPI_LOG(NDPI_PROTOCOL_RTP, ndpi_struct, NDPI_LOG_DEBUG, "Found rtp.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTP/* , NDPI_REAL_PROTOCOL */);
} else {
NDPI_LOG(NDPI_PROTOCOL_RTP, ndpi_struct, NDPI_LOG_DEBUG, "exclude rtp.\n");
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_RTP);
@@ -69,7 +69,7 @@ void ndpi_search_rtp(struct ndpi_detection_module_struct *ndpi_struct, struct nd
static void ndpi_int_rtp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTP, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTP/* , NDPI_REAL_PROTOCOL */);
}
/*
@@ -243,7 +243,7 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
exclude_rtp:
#ifdef NDPI_PROTOCOL_STUN
if (packet->detected_protocol_stack[0] == NDPI_PROTOCOL_STUN
|| packet->real_protocol_read_only == NDPI_PROTOCOL_STUN) {
|| /* packet->real_protocol_read_only == NDPI_PROTOCOL_STUN */) {
NDPI_LOG(NDPI_PROTOCOL_RTP, ndpi_struct, NDPI_LOG_DEBUG, "STUN: is detected, need next packet.\n");
return;
}
+4 -4
View File
@@ -37,10 +37,10 @@
#endif
static void ndpi_int_rtsp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol_type_t protocol_type)
struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTSP, protocol_type);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_RTSP/* , protocol_type */);
}
/* this function searches for a rtsp-"handshake" over tcp or udp. */
@@ -95,7 +95,7 @@ void ndpi_search_rtsp_tcp_udp(struct ndpi_detection_module_struct
}
NDPI_LOG(NDPI_PROTOCOL_RTSP, ndpi_struct, NDPI_LOG_TRACE, "RTSP detected.\n");
flow->rtsp_control_flow = 1;
ndpi_int_rtsp_add_connection(ndpi_struct, flow, NDPI_REAL_PROTOCOL);
ndpi_int_rtsp_add_connection(ndpi_struct, flow/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ static void ndpi_check_sflow(struct ndpi_detection_module_struct *ndpi_struct, s
&& (packet->payload[0] == 0) && (packet->payload[1] == 0) && (packet->payload[2] == 0)
&& ((packet->payload[3] == 2) || (packet->payload[3] == 5))) {
NDPI_LOG(NDPI_PROTOCOL_SFLOW, ndpi_struct, NDPI_LOG_DEBUG, "Found sflow.\n");
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SFLOW, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SFLOW/* , NDPI_REAL_PROTOCOL */);
return;
}
}
+1 -1
View File
@@ -30,7 +30,7 @@
static void ndpi_int_shoutcast_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SHOUTCAST, NDPI_CORRELATED_PROTOCOL);
ndpi_int_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SHOUTCAST/* , NDPI_CORRELATED_PROTOCOL */);
}
void ndpi_search_shoutcast_tcp(struct ndpi_detection_module_struct
+2 -2
View File
@@ -32,8 +32,8 @@ static void ndpi_int_sip_add_connection(struct ndpi_detection_module_struct *ndp
{
ndpi_int_add_connection(ndpi_struct, flow,
NDPI_PROTOCOL_SIP,
due_to_correlation ? NDPI_CORRELATED_PROTOCOL : NDPI_REAL_PROTOCOL);
NDPI_PROTOCOL_SIP/* , */
/* due_to_correlation ? NDPI_CORRELATED_PROTOCOL : NDPI_REAL_PROTOCOL */);
}

Some files were not shown because too many files have changed in this diff Show More