Verified Commit 5a123fa2 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

Provide starttime_monotonic

Add the field to the flow reports, in addition to starttime, lasttime
and lasttime_monotonic.

We want to be able to compute a guaranteed non-negative flow duration.
parent 9b6f6a41
Pipeline #2498 passed with stage
in 1 minute and 14 seconds
......@@ -117,6 +117,7 @@ Flow::Flow(const Packet &packet) :
uint64_t curtime(packet.field<PKT_timestamp>());
fields.store<FL_id>(curtime);
fields.store<FL_starttime>(curtime);
fields.store<FL_starttime_monotonic>(packet.field<PKT_timestamp_monotonic>());
fields.store<FL_lasttime>(curtime);
fields.store<FL_lasttime_monotonic>(packet.field<PKT_timestamp_monotonic>());
Direction dir = packet.field<PKT_direction>();
......
......@@ -66,6 +66,7 @@ NF(verdict);
NF(id);
NF(status);
NF(starttime);
NF(starttime_monotonic);
NF(lasttime); // Time of last activity
NF(lasttime_monotonic);
NF(flags);
......@@ -152,6 +153,7 @@ private:
Field<FID, Simple, FL_id>,
Field<FlowStatus, Simple, FL_status>,
Field<uint64_t, Simple, FL_starttime>,
Field<uint64_t, Simple, FL_starttime_monotonic>,
Field<uint64_t, Simple, FL_lasttime>,
Field<uint64_t, Simple, FL_lasttime_monotonic>,
Field<Direction, Simple, FL_direction>,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment