I am trying to write a customized dissector as a plugin on windows platform.
The problem is the result is not correct. Does anyone know how to dissect a UTC time stamp? asked 06 Jul ‘16, 19:00 SulfredLee edited 06 Jul ‘16, 22:28 |
One Answer:
Unfortunately, there is currently no ENC_ value for that time stamp format, so you would have to do it manually:
answered 07 Jul ‘16, 00:35 Guy Harris ♦♦ Thank you very much, it works. (07 Jul ‘16, 01:17) SulfredLee Sorry, one more question. I have already get the value to ts_nstime. Why I still have to use the data in tvb at the api (07 Jul ‘16, 01:54) SulfredLee Because you want the value of the field to be in the protocol tree, and fetching the value from the packet and converting it to a nstime_t doesn’t put it into the protocol tree - only a (07 Jul ‘16, 02:08) Guy Harris ♦♦ Here is my understanding, when I put (07 Jul ‘16, 02:15) SulfredLee 1 No, you are not correct. It will not fetch the data from the tvbuff, but it will record that the data came from the tvbuff, starting at an offset of 0, for 8 bytes, so that, for example, if you click on on the item in the protocol details pane it will highlight the corresponding data in the hex dump pane. (07 Jul ‘16, 02:47) Guy Harris ♦♦ |
What do you mean by “a UTC time stamp”? What are the units of the time stamp? Seconds? Fractions of a second? If it’s fractions of a second, what fraction - microseconds, nanoseconds, other? Is the time stamp a count of fractions of a second, or seconds, since some point in time? If so, what is that point in time? Is it, for example, January 1, 1970, 00:00:00 UTC? Or is it, for example, a 32-bit count of seconds since some point in time and a 32-bit count of fractions of a second since the second in question? Without knowing that, nobody can know how to dissect it.
Sorry for leak of information.
I got the description from the development guide is that:
It is a UTC Timestamp. The number of nanoseconds since January 1, 1970, 00:00:00 GMT, precision is provided to the nearest millsecond.
The format of this field is Uint64.