diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-02-25 14:26:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 14:26:26 +0100 |
commit | 8b062295cc76a60e3905c054ce37bd17669464d1 (patch) | |
tree | e2fdc3e672881f98e7b91cad7497d7563df38a33 /src/lib/ndpi_main.c | |
parent | f14dcb8344f1cbb1197cdc4f341a6fe4fdcc0cf6 (diff) |
Add some scripts to easily update some IPs lists (#1449)
While the lists in a6ff0dd0 and 2f5f445f are somehow provided by the
companies themselves (or by some interested parties), these new lists
are directly extracted from BGP information, via AS prefixes.
*Usually*, these new lists are far more stable than the previous ones.
TODO:
* add some other ASNs (see `src/lib/ndpi_content_match.c.inc`)
* IPv6, as usual :-(
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index c0a871cc5..335cccba2 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -63,6 +63,13 @@ #include "ndpi_ms_skype_teams_match.c.inc" #include "ndpi_google_match.c.inc" #include "ndpi_google_cloud_match.c.inc" +#include "ndpi_asn_telegram.c.inc" +#include "ndpi_asn_apple.c.inc" +#include "ndpi_asn_twitter.c.inc" +#include "ndpi_asn_netflix.c.inc" +#include "ndpi_asn_webex.c.inc" +#include "ndpi_asn_teamviewer.c.inc" +#include "ndpi_asn_facebook.c.inc" /* Third party libraries */ #include "third_party/include/ndpi_patricia.h" @@ -2427,6 +2434,15 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs 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); + if(!(prefs & ndpi_dont_load_asn_lists)) { + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_telegram_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_apple_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_twitter_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_netflix_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_webex_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_teamviewer_protocol_list); + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_facebook_protocol_list); + } } ndpi_str->ip_risk_mask_ptree = ndpi_patricia_new(32 /* IPv4 */); |