appneta / tcpreplay

Pcap editing and replay tools for *NIX and Windows - Users please download source from
http://tcpreplay.appneta.com/wiki/installation.html#downloads
1.19k stars 268 forks source link

send_packet: Avoid clock drift by using time since first packet #631

Closed davecraig closed 3 years ago

davecraig commented 3 years ago

Prior to this change, time between packets was calculated as deltas and over time errors would quickly add up. The work here switches to use the wall time since the first packet was sent as the reference which is compared to the PCAP packet timestamp relative to the first packet. In this way there are no errors and clock drift is avoided. As a result tcpreplay can now be used to play back very time sensitive captures such as video streams with PCR.

This is a suggested fix for https://github.com/appneta/tcpreplay/issues/630

fklassen commented 2 years ago

@davecraig this may have introduced Bug #674