Skip to content

Commit

Permalink
Mac removed from memory after 300 seconds of inactivity instead of 30…
Browse files Browse the repository at this point in the history
… seconds
  • Loading branch information
MatteoBiscosi committed Aug 28, 2024
1 parent da4a5f0 commit b994246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/Mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ class Mac : public GenericHashEntry {
stats->incSentStats(t, num_pkts, num_bytes), last_seen = t;
}

bool is_hash_entry_state_idle_transition_ready() {
return ((getUses() == 0) && is_active_entry_now_idle(MAX_MAC_IDLE));
}

inline void incnDPIStats(time_t when, ndpi_protocol_category_t ndpi_category,
u_int64_t sent_packets, u_int64_t sent_bytes,
u_int64_t sent_goodput_bytes, u_int64_t rcvd_packets,
Expand Down
3 changes: 2 additions & 1 deletion include/ntop_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@
with incomplete TWH */
#define MAX_FLOW_IDLE 60 /* sec */
#define MAX_LOCAL_HOST_IDLE 300 /* sec */
#define MAX_MAC_IDLE 300 /* sec */
#define MAX_REMOTE_HOST_IDLE 60 /* sec */
#define MAX_HASH_ENTRY_IDLE \
60 /* sec - Generic idle time for hash entries different from hosts and \
flows (i.e., ASes and Macs) */
flows (i.e., ASes and Countries) */
#define MAX_PROBE_IDLE_IDLE 1800 /* 30 min (Used in ZMQParserInterface.cpp) */
#define MAX_RRD_QUEUE_LEN 200000 /* timeseries in the queue */
#define MIN_NUM_IDLE_ENTRIES_IF 5000
Expand Down

0 comments on commit b994246

Please sign in to comment.