diff options
-rw-r--r-- | src/include/ndpi_protocol_ids.h | 3 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 6 | ||||
-rw-r--r-- | src/lib/ndpi_content_match.c.inc | 2 | ||||
-rwxr-xr-x | tests/do.sh | 4 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/include/ndpi_protocol_ids.h b/src/include/ndpi_protocol_ids.h index 2c099dab3..717db6136 100644 --- a/src/include/ndpi_protocol_ids.h +++ b/src/include/ndpi_protocol_ids.h @@ -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) diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index c35064b88..e4883d92e 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -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; diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc index 0274c184c..8a6ea4358 100644 --- a/src/lib/ndpi_content_match.c.inc +++ b/src/lib/ndpi_content_match.c.inc @@ -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 } }; diff --git a/tests/do.sh b/tests/do.sh index 5bc324aa4..764b049f9 100755 --- a/tests/do.sh +++ b/tests/do.sh @@ -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 |