Added support for Twitch detection

Minor cosmetic fix in test tool
This commit is contained in:
Luca Deri
2015-06-15 00:47:39 +02:00
parent 8b321fda41
commit 984eca8a27
4 changed files with 10 additions and 5 deletions
+2 -1
View File
@@ -241,9 +241,10 @@
#define NDPI_SERVICE_TORCEDOR 192
#define NDPI_SERVICE_KAKAOTALK 193 /* KakaoTalk Chat (no voice call) */
#define NDPI_SERVICE_KAKAOTALK_VOICE 194 /* KakaoTalk Voice */
#define NDPI_SERVICE_TWITCH 195 /* Edoardo Dominici <edoaramis@gmail.com> */
/* UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE */
#define NDPI_LAST_IMPLEMENTED_PROTOCOL 194
#define NDPI_LAST_IMPLEMENTED_PROTOCOL 195
#define NDPI_MAX_SUPPORTED_PROTOCOLS (NDPI_LAST_IMPLEMENTED_PROTOCOL + 1)
#define NDPI_MAX_NUM_CUSTOM_PROTOCOLS (NDPI_NUM_BITS-NDPI_LAST_IMPLEMENTED_PROTOCOL)
+4 -2
View File
@@ -618,8 +618,10 @@ typedef struct ndpi_detection_module_struct {
u_int ndpi_num_custom_protocols;
/* HTTP/DNS/HTTPS host matching */
ndpi_automa host_automa, content_automa, bigrams_automa, impossible_bigrams_automa;
ndpi_automa host_automa, /* Used for DNS/HTTPS */
content_automa, /* Used for HTTP subprotocol_detection */
subprotocol_automa, /* Used for HTTP subprotocol_detection */
bigrams_automa, impossible_bigrams_automa; /* TOR */
/* IP-based protocol detection */
void *protocols_ptree;
+2
View File
@@ -7298,6 +7298,7 @@ ndpi_protocol_match host_match[] = {
{ "appmeutim.tim.com.br", "Meu", NDPI_SERVICE_MEU, NDPI_PROTOCOL_ACCEPTABLE },
{ ".timtorcedor.com.br", "Torcedor", NDPI_SERVICE_TORCEDOR, NDPI_PROTOCOL_ACCEPTABLE },
{ ".kakao.com", "KakaoTalk", NDPI_SERVICE_KAKAOTALK, NDPI_PROTOCOL_FUN },
{ "ttvnw.net", "Twitch", NDPI_SERVICE_TWITCH, NDPI_PROTOCOL_FUN },
{ NULL, 0 }
};
@@ -7342,6 +7343,7 @@ ndpi_protocol_match content_match[] = {
{ "audio/webm", NULL, NDPI_CONTENT_WEBM, NDPI_PROTOCOL_FUN },
{ "video/webm", NULL, NDPI_CONTENT_WEBM, NDPI_PROTOCOL_FUN },
{ "application/x-rtsp-tunnelled", NULL, NDPI_PROTOCOL_RTSP, NDPI_PROTOCOL_FUN },
{ "application/vnd.apple.mpegurl", NULL, NDPI_SERVICE_TWITCH, NDPI_PROTOCOL_FUN },
{ NULL, 0 }
};
+2 -2
View File
@@ -20,9 +20,9 @@ check_results() {
NUM_DIFF=`diff result/$f.out /tmp/reader.out | wc -l`
if [ $NUM_DIFF -eq 0 ]; then
echo "$f\t OK"
printf "%-32s\tOK\n" "$f"
else
echo "$f\t ERROR"
printf "%-32s\tERROR\n" "$f"
echo "$CMD"
diff result/$f.out /tmp/reader.out
RC=1