deleted protocol type (real-correlated)
This commit is contained in:
+27
-27
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user