diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-02-20 10:19:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-20 10:19:52 +0100 |
commit | 2f5f445f7229592c9a9a108e39fa5db3dc456dce (patch) | |
tree | 5fc62676bfcae90c6add143074954d562bc97122 /src/lib/ndpi_main.c | |
parent | 75a53ad064bcb19570847554b72e9303d776b8fd (diff) |
Add support for Google Cloud (#1447)
Differentiate between Google its own apps/services and Google Cloud.
We already do something similar for Amazon vs AWS and Microsoft vs Azure.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 82f24f4aa..33c291b96 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -61,6 +61,8 @@ #include "ndpi_ms_onedrive_match.c.inc" #include "ndpi_ms_outlook_match.c.inc" #include "ndpi_ms_skype_teams_match.c.inc" +#include "ndpi_google_match.c.inc" +#include "ndpi_google_cloud_match.c.inc" /* Third party libraries */ #include "third_party/include/ndpi_patricia.h" @@ -1821,6 +1823,10 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp "Azure", NDPI_PROTOCOL_CATEGORY_CLOUD, 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 */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_GOOGLE_CLOUD, + "GoogleCloud", NDPI_PROTOCOL_CATEGORY_CLOUD, + ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, + ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); #ifdef CUSTOM_NDPI_PROTOCOLS #include "../../../nDPI-custom/custom_ndpi_main.c" @@ -2417,6 +2423,10 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_ms_outlook_protocol_list); ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_skype_teams_protocol_list); } + if(!(prefs & ndpi_dont_load_google_list)) + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_google_protocol_list); + if(!(prefs & ndpi_dont_load_google_cloud_list)) + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_google_cloud_protocol_list); } ndpi_str->ip_risk_mask_ptree = ndpi_patricia_new(32 /* IPv4 */); |