Example #1
0
 private void UpdateFlow(ref ConversationInput input, ref FlowValue flow)
 {
     flow.FirstSeen = Math.Min(flow.FirstSeen, input.FrameTicks);
     flow.LastSeen  = Math.Max(flow.LastSeen, input.FrameTicks);
     flow.Packets++;
     flow.Octets += (ulong)input.FrameSize;
 }
Example #2
0
 internal static void Update(ref FlowValue value, ref FlowValue?delta)
 {
     if (delta != null)
     {
         value.FirstSeen = Math.Min(value.FirstSeen, delta.Value.FirstSeen);
         value.LastSeen  = Math.Max(value.LastSeen, delta.Value.LastSeen);
         value.Octets    = value.Octets + delta.Value.Octets;
         value.Packets   = value.Packets + delta.Value.Packets;
     }
 }