/src/ntopng/include/host_checks/CountriesContacts.h
Line | Count | Source |
1 | | #ifndef _COUNTRY_CONTACTS_H_ |
2 | | #define _COUNTRY_CONTACTS_H_ |
3 | | |
4 | | #include "ntop_includes.h" |
5 | | |
6 | | class CountriesContacts : public HostCheck { |
7 | | protected: |
8 | | u_int8_t countries_contacts_threshold; |
9 | | |
10 | | private: |
11 | | CountriesContactsAlert* allocAlert(HostCheck* c, Host* f, |
12 | | risk_percentage cli_pctg, |
13 | | u_int8_t _countries_contacts, |
14 | 0 | u_int8_t _countries_contacts_threshold) { |
15 | 0 | return new CountriesContactsAlert(c, f, cli_pctg, _countries_contacts, |
16 | 0 | _countries_contacts_threshold); |
17 | 0 | } |
18 | | |
19 | | public: |
20 | | CountriesContacts(); |
21 | 0 | ~CountriesContacts() {} |
22 | | |
23 | 0 | u_int8_t getContactedCountries(Host* h) { |
24 | 0 | return h->getCountriesContactsCardinality(); |
25 | 0 | } |
26 | | void periodicUpdate(Host* h, HostAlert* engaged_alert); |
27 | | bool loadConfiguration(json_object* config); |
28 | 0 | HostCheckID getID() const { return host_check_countries_contacts; } |
29 | 0 | std::string getName() const { return (std::string("countries_contacts")); } |
30 | | }; |
31 | | |
32 | | #endif /* _COUNTRY_CONTACTS_H_ */ |