goflow icon indicating copy to clipboard operation
goflow copied to clipboard

Same Time* for sflow even if they are different

Open galushka opened this issue 1 year ago • 0 comments

Firstly, thank you for the library. In the goflow/utils/sflow.go file, there are the following blocks of code:

  1. Defining "ts":
ts := uint64(time.Now().UTC().Unix())
if pkt.SetTime {
    ts = uint64(pkt.RecvTime.UTC().Unix())
}
  1. Setting TimeReceived, TimeFlowStart, and TimeFlowEnd:
for _, fmsg := range flowMessageSet {
    fmsg.TimeReceived = ts
    fmsg.TimeFlowStart = ts
    fmsg.TimeFlowEnd = ts
}

Currently, there is no difference between TimeFlowStart / TimeFlowEnd and TimeReceived. However, when the flag "SetTime" is set to "true", it would be very useful to distinguish between these timestamps. Thank you!

galushka avatar Sep 08 '23 13:09 galushka