![]() If this is not what you're attempting to do, then please clarify exactly what it is that you are attempting to do. Make sure you perform the addition/subtraction using the correct byte order of the ts_usec value and ts_sec value if appropriate, and make sure you write the bytes back to the ts_usec and ts_sec fields in the expected byte order of the file otherwise your resulting timestamp will not be correct. This is determined by the so-called magic number ( 0xa1b2c3d4 implying big-endian and 0xd4c3d2a1 implying little-endian). try to capture the network traffic only for the time that you perform. However, PTP is mainly used in LANs, with much higher precision than NTP (usually 10's of microseconds to 10's of nanoseconds). ![]() pcap file is written in big-endian or litte-endian format. When WireShark or other capture tools create a. ptp ptp Precise Time Protocol (PTP) PTP is used to synchronize the clock of a network client with a server (similar to NTP). One important thing to keep in mind is whether the. ![]() ![]() pcap file, then I suppose you're attempting to add 100000 microseconds to the timestamp of one particular packet?Īssuming this is the case, then you need to locate the packet header's ts_sec and ts_usec values and add 0x000186a0 microseconds to the current value of the ts_usec value, but if this value exceeds 0x000f423f (i.e., it's greater than or equal to 1 second), then you should add 0x00000001 to the ts_sec value and subtract 0x000f4240 from the newly computed ts_usec value. It's not completely clear to me what you're trying to do, but I'm going to take a guess that you are attempting to manually modify the timestamp of a single packet by editing the binary capture file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |