nfdump
nfdump copied to clipboard
Broken timestamps from Cisco NX-OS 8.2(2) (8 byte timestamps)
Hi,
f7a4bc566a6943586aa1426133d86c660fa1f3aa was supposed to fix #80; but
- the fix is not endian-safe: it will pick the second dword in native endianess, whatever that happens to be
- the zero byte padding can occur from both sides: usually the zero bytes are simply following the "real" data, but sometimes the four zero bytes come first. maybe simply adding the two dwords works.
Hmm .. I don't see, what you mean by "simply adding the two dwords works." Can you please elaborate a bit more on this?
If one of the dwords is always zero and you want to pick the other (non-zero) value, adding them should do it. (or bitwise or. or bitwise xor.)
A perhaps more stable solution would be preferring one of the dwords and only look at the other if the first was zero (but the preference should be stable across endianess).
nfdump-1.7 uses a rewritten sequencer for byte loading. This should no longer be an issue.