Skip to content

Commit

Permalink
Unify "Skype" and "Teams" ids
Browse files Browse the repository at this point in the history
* Rename `NDPI_PROTOCOL_SKYPE_TEAMS_CALL` ->
  `NDPI_PROTOCOL_MSTEAMS_CALL`

* Rename ip list from "Skype/Teams" to "Teams"
  • Loading branch information
IvanNardi committed Jan 20, 2025
1 parent 45066c4 commit d5a6555
Show file tree
Hide file tree
Showing 20 changed files with 259 additions and 260 deletions.
2 changes: 1 addition & 1 deletion doc/configuration_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ List of the supported configuration options:
| "openvpn" | "subclassification_by_ip" | enable | NULL | NULL | Enable/disable sub-classification of OpenVPN flows using server IP. Useful to detect the specific VPN application/app. At the moment, this knob allows to identify: Mullvad, NordVPN, ProtonVPN. |
| "wireguard" | "subclassification_by_ip" | enable | NULL | NULL | Enable/disable sub-classification of Wireguard flows using server IP. Useful to detect the specific VPN application/app. At the moment, this knob allows to identify: Mullvad, NordVPN, ProtonVPN. |
| $PROTO_NAME | "log" | disable | NULL | NULL | Enable/disable logging/debug for specific protocol. Use "any" as protocol name if you want to easily enable/disable logging/debug for all protocols |
| $PROTO_NAME | "ip_list.load" | enable | NULL | NULL | Enable/disable loading of internal list of IP addresses (used for (sub)classification) specific to that protocol. Use "any" as protocol name if you want to easily enable/disable all lists. This knob is valid only for the following protocols: Alibaba, Amazon AWS, Apple, Avast, Bloomberg, Cachefly, Cloudflare, DigitalOcean, Discord, Disney+, Dropbox, Edgecast, EpicGames, Ethereum, Facebook, Github, Google, Google Cloud, GoTo, Hotspot Shield, Hulu, Line, Microsoft 365, Microsoft Azure, Microsoft One Drive, Microsoft Outlook, Mullvad, Netflix, NordVPN, Nvidia, OpenDNS, ProtonVPN, RiotGames, Roblox, Skype/Teams, Starcraft, Steam, SurfSharkVPN, Teamviewer, Telegram, Tencent, Threema, TOR, Twitch, Twitter, UbuntuONE, VK, Yandex, Yandex Cloud, Webex, Whatsapp, Zoom |
| $PROTO_NAME | "ip_list.load" | enable | NULL | NULL | Enable/disable loading of internal list of IP addresses (used for (sub)classification) specific to that protocol. Use "any" as protocol name if you want to easily enable/disable all lists. This knob is valid only for the following protocols: Alibaba, Amazon AWS, Apple, Avast, Bloomberg, Cachefly, Cloudflare, DigitalOcean, Discord, Disney+, Dropbox, Edgecast, EpicGames, Ethereum, Facebook, Github, Google, Google Cloud, GoTo, Hotspot Shield, Hulu, Line, Microsoft 365, Microsoft Azure, Microsoft One Drive, Microsoft Outlook, Microsoft Teams, Mullvad, Netflix, NordVPN, Nvidia, OpenDNS, ProtonVPN, RiotGames, Roblox, Starcraft, Steam, SurfSharkVPN, Teamviewer, Telegram, Tencent, Threema, TOR, Twitch, Twitter, UbuntuONE, VK, Yandex, Yandex Cloud, Webex, Whatsapp, Zoom |
| $PROTO_NAME | "monitoring" | disable | NULL | NULL | Enable/disable monitoring state for this specific protocol. Use "any" as protocol name if you want to easily enable/disable monitoring feature for all protocols. This knob is valid only for the following protocols: Stun. Monitoring allows nDPI to process the entire flow (i.e. all its packets), without any limits. See doc/monitoring.md for further details |
26 changes: 24 additions & 2 deletions doc/protocols.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,25 @@ Work in progress!
.. _Proto 32:

`NDPI_PROTOCOL_BFCP`
=======================
====================
BFCP (Binary Floor Control Protocol) is used for controlling and coordinating real-time data sharing and collaboration during video conferencing sessions.

References: `RFC: <https://datatracker.ietf.org/doc/html/rfc8855>`_


.. _Proto 38:

`NDPI_PROTOCOL_MSTEAMS_CALL`
============================
Audio/video calls made by (any) Microsoft applications: mainly MsTeams, but also Skype.

References: `Main site: <https://www.microsoft.com/it-it/microsoft-teams/group-chat-software>`_


.. _Proto 54:

`NDPI_PROTOCOL_IQIYI`
===========================
=====================
iQIYI is a Chinese online video platform that offers a wide range of original and licensed content including movies, dramas, variety shows, and anime.

References: `Main site: <https://www.iqiyi.com/>`_
Expand Down Expand Up @@ -127,6 +136,19 @@ Steam Datagram Relay (SDR) is Valve's virtual private gaming network. Used in al
References: `Main site: <https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay>`_


.. _Proto 350:

`NDPI_PROTOCOL_MSTEAMS`
=======================
Microsoft Teams is a team collaboration application developed by Microsoft as part of the Microsoft 365 family of products, offering workspace chat and video conferencing, file storage, and integration of proprietary and third-party applications and services.

References: `Main site: <https://www.microsoft.com/it-it/microsoft-teams/group-chat-software>`_

Notes:

- This same id is also used for Skype traffic


.. _Proto 338:

`NDPI_PROTOCOL_SRTP`
Expand Down
4 changes: 2 additions & 2 deletions src/include/ndpi_protocol_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ typedef enum {
NDPI_PROTOCOL_GNUTELLA = 35,
NDPI_PROTOCOL_EDONKEY = 36,
NDPI_PROTOCOL_BITTORRENT = 37,
NDPI_PROTOCOL_SKYPE_TEAMS_CALL = 38, /* Skype call and videocalls */
NDPI_PROTOCOL_MSTEAMS_CALL = 38, /* MS Teams (and Skype) videocalls */
NDPI_PROTOCOL_SIGNAL = 39,
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached */
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
Expand Down Expand Up @@ -153,7 +153,7 @@ typedef enum {
NDPI_PROTOCOL_GMAIL = 122,
NDPI_PROTOCOL_GOOGLE_MAPS = 123,
NDPI_PROTOCOL_YOUTUBE = 124,
NDPI_PROTOCOL_SKYPE_TEAMS = 125,
NDPI_PROTOCOL_FREE_125 = 125, /* FREE */
NDPI_PROTOCOL_GOOGLE = 126,
NDPI_PROTOCOL_MS_RPCH = 127,
NDPI_PROTOCOL_NETFLOW = 128,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
/* ****************************************************** */


static ndpi_network ndpi_protocol_skype_teams_protocol_list[] = {
{ 0x34700000 /* 52.112.0.0/14 */, 14, NDPI_PROTOCOL_SKYPE_TEAMS },
{ 0x347A0000 /* 52.122.0.0/15 */, 15, NDPI_PROTOCOL_SKYPE_TEAMS },
{ 0x34EE778D /* 52.238.119.141/32 */, 32, NDPI_PROTOCOL_SKYPE_TEAMS },
{ 0x34F4A0CF /* 52.244.160.207/32 */, 32, NDPI_PROTOCOL_SKYPE_TEAMS },
static ndpi_network ndpi_protocol_msteams_protocol_list[] = {
{ 0x34700000 /* 52.112.0.0/14 */, 14, NDPI_PROTOCOL_MSTEAMS },
{ 0x347A0000 /* 52.122.0.0/15 */, 15, NDPI_PROTOCOL_MSTEAMS },
{ 0x34EE778D /* 52.238.119.141/32 */, 32, NDPI_PROTOCOL_MSTEAMS },
{ 0x34F4A0CF /* 52.244.160.207/32 */, 32, NDPI_PROTOCOL_MSTEAMS },
/* End */
{ 0x0, 0, 0 }
};

static ndpi_network6 ndpi_protocol_skype_teams_protocol_list_6[] = {
{ "2603:1027::", 48, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2603:1037::", 48, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2603:1047::", 48, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2603:1057::", 48, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2603:1063::", 38, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2620:1ec:6::", 48, NDPI_PROTOCOL_SKYPE_TEAMS },
{ "2620:1ec:40::", 42, NDPI_PROTOCOL_SKYPE_TEAMS },
static ndpi_network6 ndpi_protocol_msteams_protocol_list_6[] = {
{ "2603:1027::", 48, NDPI_PROTOCOL_MSTEAMS },
{ "2603:1037::", 48, NDPI_PROTOCOL_MSTEAMS },
{ "2603:1047::", 48, NDPI_PROTOCOL_MSTEAMS },
{ "2603:1057::", 48, NDPI_PROTOCOL_MSTEAMS },
{ "2603:1063::", 38, NDPI_PROTOCOL_MSTEAMS },
{ "2620:1ec:6::", 48, NDPI_PROTOCOL_MSTEAMS },
{ "2620:1ec:40::", 42, NDPI_PROTOCOL_MSTEAMS },
/* End */
{ NULL, 0, 0 }
};
26 changes: 13 additions & 13 deletions src/lib/ndpi_content_match.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -707,18 +707,18 @@ static ndpi_protocol_match host_match[] =
{ "nflxso.net", "NetFlix", NDPI_PROTOCOL_NETFLIX, NDPI_PROTOCOL_CATEGORY_VIDEO, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "fast.com", "NetFlix", NDPI_PROTOCOL_NETFLIX, NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },

{ "skype.", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeassets.", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypedata.", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeecs-", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeforbusiness.", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "lync.com", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e7768.b.akamaiedge.net", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e4593.dspg.akamaiedge.net", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e4593.g.akamaiedge.net", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "gateway.messenger.live.com", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skype-calling-missedcallsregistrar-", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "teams.cloudapp.net", "Skype_Teams", NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skype.", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeassets.", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypedata.", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeecs-", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skypeforbusiness.", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "lync.com", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e7768.b.akamaiedge.net", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e4593.dspg.akamaiedge.net", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "e4593.g.akamaiedge.net", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "gateway.messenger.live.com", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "skype-calling-missedcallsregistrar-", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "teams.cloudapp.net", "Teams", NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL },

{ "twttr.com", "Twitter", NDPI_PROTOCOL_TWITTER, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DEFAULT_LEVEL },
{ "twitter.", "Twitter", NDPI_PROTOCOL_TWITTER, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_DEFAULT_LEVEL },
Expand Down Expand Up @@ -1771,7 +1771,7 @@ static ndpi_tls_cert_name_match tls_certificate_match [] = {
{ "O=Netflix", NDPI_PROTOCOL_NETFLIX },
{ "O=Cloudflare", NDPI_PROTOCOL_CLOUDFLARE },
{ "CN=simplednscrypt.org", NDPI_PROTOCOL_DNSCRYPT },
{ "CN=*.gateway.messenger.live.com", NDPI_PROTOCOL_SKYPE_TEAMS },
{ "CN=*.gateway.messenger.live.com", NDPI_PROTOCOL_MSTEAMS },
{ "OU=FortiGate", NDPI_PROTOCOL_FORTICLIENT },
{ "CN=www.update.microsoft.com", NDPI_PROTOCOL_WINDOWS_UPDATE },
{ "CN=*.tunnelbear.com", NDPI_PROTOCOL_TUNNELBEAR },
Expand Down
43 changes: 13 additions & 30 deletions src/lib/ndpi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#include "inc_generated/ndpi_ms_office365_match.c.inc"
#include "inc_generated/ndpi_ms_onedrive_match.c.inc"
#include "inc_generated/ndpi_ms_outlook_match.c.inc"
#include "inc_generated/ndpi_ms_skype_teams_match.c.inc"
#include "inc_generated/ndpi_msteams_match.c.inc"
#include "inc_generated/ndpi_google_match.c.inc"
#include "inc_generated/ndpi_google_cloud_match.c.inc"
#include "inc_generated/ndpi_crawlers_match.c.inc"
Expand Down Expand Up @@ -1187,16 +1187,16 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"BitTorrent", NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT,
ndpi_build_default_ports(ports_a, 51413, 53646, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 6771, 51413, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SKYPE_TEAMS,
"Skype_Teams", NDPI_PROTOCOL_CATEGORY_VOIP,
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_FREE_125,
"FREE_125", NDPI_PROTOCOL_CATEGORY_VOIP,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE,
"Google", NDPI_PROTOCOL_CATEGORY_WEB,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SKYPE_TEAMS_CALL,
"Skype_TeamsCall", NDPI_PROTOCOL_CATEGORY_VOIP,
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MSTEAMS_CALL,
"TeamsCall", NDPI_PROTOCOL_CATEGORY_VOIP,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TIKTOK,
Expand Down Expand Up @@ -3659,9 +3659,9 @@ int ndpi_finalize_initialization(struct ndpi_detection_module_struct *ndpi_str)
ndpi_init_ptree_ipv4(ndpi_str->protocols->v4, ndpi_protocol_ms_outlook_protocol_list);
ndpi_init_ptree_ipv6(ndpi_str, ndpi_str->protocols->v6, ndpi_protocol_ms_outlook_protocol_list_6);
}
if(is_ip_list_enabled(ndpi_str, NDPI_PROTOCOL_SKYPE_TEAMS)) {
ndpi_init_ptree_ipv4(ndpi_str->protocols->v4, ndpi_protocol_skype_teams_protocol_list);
ndpi_init_ptree_ipv6(ndpi_str, ndpi_str->protocols->v6, ndpi_protocol_skype_teams_protocol_list_6);
if(is_ip_list_enabled(ndpi_str, NDPI_PROTOCOL_MSTEAMS)) {
ndpi_init_ptree_ipv4(ndpi_str->protocols->v4, ndpi_protocol_msteams_protocol_list);
ndpi_init_ptree_ipv6(ndpi_str, ndpi_str->protocols->v6, ndpi_protocol_msteams_protocol_list_6);
}
if(is_ip_list_enabled(ndpi_str, NDPI_PROTOCOL_PROTONVPN)) {
ndpi_init_ptree_ipv4(ndpi_str->protocols->v4, ndpi_protocol_protonvpn_protocol_list);
Expand Down Expand Up @@ -7645,7 +7645,7 @@ static void ndpi_reconcile_msteams_udp(struct ndpi_detection_module_struct *ndpi

if(s_match || d_match) {
ndpi_int_change_protocol(flow,
NDPI_PROTOCOL_SKYPE_TEAMS_CALL, master,
NDPI_PROTOCOL_MSTEAMS_CALL, master,
/* Keep the same confidence */
flow->confidence);

Expand Down Expand Up @@ -7690,7 +7690,7 @@ static int ndpi_reconcile_msteams_call_udp_port(struct ndpi_flow_struct *flow,
/* ********************************************************************************* */

static void ndpi_reconcile_msteams_call_udp(struct ndpi_flow_struct *flow) {
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_SKYPE_TEAMS_CALL) {
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_MSTEAMS_CALL) {
if(flow->l4_proto == IPPROTO_UDP) {
u_int16_t sport = ntohs(flow->c_port);
u_int16_t dport = ntohs(flow->s_port);
Expand Down Expand Up @@ -7775,7 +7775,7 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
&dummy, 0 /* Don't remove it as it can be used for other connections */,
ndpi_get_current_time(flow))) {
ndpi_int_change_protocol(flow,
NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_PROTOCOL_TLS,
NDPI_PROTOCOL_MSTEAMS, NDPI_PROTOCOL_TLS,
NDPI_CONFIDENCE_DPI_PARTIAL);
}
} else if(flow->guessed_protocol_id_by_ip == NDPI_PROTOCOL_TELEGRAM) {
Expand All @@ -7785,24 +7785,7 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
}
break;

case NDPI_PROTOCOL_SKYPE_TEAMS:
case NDPI_PROTOCOL_SKYPE_TEAMS_CALL:
if(flow->l4_proto == IPPROTO_UDP && ndpi_str->msteams_cache) {
u_int16_t dummy;

if(ndpi_lru_find_cache(ndpi_str->msteams_cache, make_msteams_key(flow, 1 /* client */),
&dummy, 0 /* Don't remove it as it can be used for other connections */,
ndpi_get_current_time(flow))) {
ret->proto.app_protocol = NDPI_PROTOCOL_MSTEAMS;

/* Refresh cache */
ndpi_lru_add_to_cache(ndpi_str->msteams_cache,
make_msteams_key(flow, 1 /* client */),
0 /* dummy */,
ndpi_get_current_time(flow));
}
}

case NDPI_PROTOCOL_MSTEAMS_CALL:
ndpi_reconcile_msteams_call_udp(flow);
break;

Expand All @@ -7821,7 +7804,7 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
case NDPI_PROTOCOL_MICROSOFT_365:
case NDPI_PROTOCOL_MS_ONE_DRIVE:
case NDPI_PROTOCOL_MS_OUTLOOK:
case NDPI_PROTOCOL_SKYPE_TEAMS:
case NDPI_PROTOCOL_MSTEAMS:
ndpi_int_change_protocol(flow,
flow->guessed_protocol_id_by_ip, flow->detected_protocol_stack[1],
NDPI_CONFIDENCE_DPI_PARTIAL);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/protocols/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ u_int8_t rtp_get_stream_type(u_int8_t payloadType, u_int8_t *s_type, u_int16_t s
}

/* Microsoft; from https://learn.microsoft.com/en-us/openspecs/office_protocols/ms-rtp/3b8dc3c6-34b8-4827-9b38-3b00154f471c */
if(sub_proto == NDPI_PROTOCOL_SKYPE_TEAMS_CALL) {
if(sub_proto == NDPI_PROTOCOL_MSTEAMS_CALL) {
switch(payloadType) {
case 103: /* SILK Narrowband */
case 104: /* SILK Wideband */
Expand Down
Loading

0 comments on commit d5a6555

Please sign in to comment.