Revision history [back]
need help to write a small dissector
Moin!
I got some problems to understand the lua script language. I hope someone like to support me... :-)
My first Problem ist to dissect a 16 Byte timestamp. The timestamp is described as follows:
"For timestamp the length in hexadecimal is 16 as mentioned. Converting the hexdecimal to binary we get 128 bits." The timestamp is an Epoch from 01/01/1904 00:00:00.00 UTC. The MSB 64 bits is the 2's complement integer of seconds from Epoch. The LSB 64 is direct decimal N to calc decimal seconds. N*2^(-64).
Right nor I stuck to decode the first 8 Bytes (seconds from 1.1.1904).
atime= ProtoField.absolute_time ("sitipe.atime", "test atime " ,base.LOCAL),
timeFloat= ProtoField.double("sitipe.timeFloat", "test float " ),
subtree:add_le(sitipe_fields.timeFloat, buffer(6,8), time_stamp)
How to convert the seconds from the timestamp + TimeForm(1.1.1904) to a DateString?