mirror of
https://github.com/netsampler/goflow2.git
synced 2024-05-06 15:54:52 +00:00
Merge pull request #33 from amorenoz/delta
ipfix: support relative flow timestamps
This commit is contained in:
@ -332,6 +332,12 @@ func ConvertNetFlowDataSet(version uint16, baseTime uint32, uptime uint32, recor
|
|||||||
case netflow.IPFIX_FIELD_flowEndNanoseconds:
|
case netflow.IPFIX_FIELD_flowEndNanoseconds:
|
||||||
DecodeUNumber(v, &time)
|
DecodeUNumber(v, &time)
|
||||||
flowMessage.TimeFlowEnd = time / 1000000000
|
flowMessage.TimeFlowEnd = time / 1000000000
|
||||||
|
case netflow.IPFIX_FIELD_flowStartDeltaMicroseconds:
|
||||||
|
DecodeUNumber(v, &time)
|
||||||
|
flowMessage.TimeFlowStart = uint64(baseTime) - time/1000000
|
||||||
|
case netflow.IPFIX_FIELD_flowEndDeltaMicroseconds:
|
||||||
|
DecodeUNumber(v, &time)
|
||||||
|
flowMessage.TimeFlowEnd = uint64(baseTime) - time/1000000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user