Implement generic flow callbacks

This commit is contained in:
emanuele-f 2019-09-05 18:30:22 +02:00
parent 38a53ec1fa
commit d9a44d615a
6 changed files with 156 additions and 26 deletions

View file

@ -54,8 +54,7 @@ class Flow : public GenericHashEntry {
u_int32_t vrfId;
u_int8_t protocol, src2dst_tcp_flags, dst2src_tcp_flags;
u_int16_t alert_score;
FlowStatus last_status;
FlowStatusMap last_status_map;
FlowStatusMap last_notified_status_map;
struct ndpi_flow_struct *ndpiFlow;
/* When the interface isViewed(), the corresponding view needs to acknowledge the purge
@ -67,7 +66,7 @@ class Flow : public GenericHashEntry {
cli2srv_direction, twh_over, twh_ok, dissect_next_http_packet, passVerdict,
check_tor, l7_protocol_guessed, flow_alerted, flow_dropped_counts_increased,
good_low_flow_detected, good_ssl_hs, update_flow_port_stats,
quota_exceeded, has_malicious_signature;
quota_exceeded, has_malicious_signature, lua_detection_notified;
u_int16_t diff_num_http_requests;
#ifdef NTOPNG_PRO
bool counted_in_aggregated_flow, status_counted_in_aggregated_flow;
@ -514,7 +513,7 @@ class Flow : public GenericHashEntry {
inline void setScore(u_int16_t score) { alert_score = score; };
inline u_int16_t getScore() { return(alert_score); };
bool shouldRecheckScore();
const char* getLuaCallback();
#ifdef HAVE_NEDGE
inline void setLastConntrackUpdate(u_int32_t when) { last_conntrack_update = when; }