ntopng/include/host_alerts/ServerPortsContactsAlert.h
Luca Ferretti edef411ebc
added contacted_server_port alert (#8408)
* initial integretion of server port check

* update learning period and received packet time

* updated host initial time

* Update Flow.cpp

* fixed reported issues

* added server_ports_contacts alert

* minor changes
2024-05-28 12:52:36 +02:00

25 lines
No EOL
769 B
C++

#ifndef _SERVER_PORTS_CONTACTS_ALERT_H_
#define _SERVER_PORTS_CONTACTS_ALERT_H_
#include "ntop_includes.h"
class ServerPortsContactsAlert : public HostAlert {
private:
u_int16_t server_port;
u_int16_t app_proto;
ndpi_serializer* getAlertJSON(ndpi_serializer* serializer);
public:
ServerPortsContactsAlert(HostCheck* c, Host* f, risk_percentage cli_pctg,
u_int16_t _server_port, u_int16_t _app_proto);
~ServerPortsContactsAlert() {}
static HostAlertType getClassType() {
return {host_alert_server_ports_contacts, alert_category_security};
}
HostAlertType getAlertType() const { return getClassType(); }
u_int8_t getAlertScore() const { return SCORE_LEVEL_WARNING; };
};
#endif /* _SERVER_PORTS_CONTACTS_ALERT_H_ */