Reorder packets in chronological order for pcap file

Today I debugged a tricky issue, and the root cause is the tested pcap file have some packets which are not in chronological order, e.g., packet 101 should come before packet 100. The solution is to use reordercap to process the pcap file first:

$ reordercap abnormal.pcap normal.pcap
155748 frames, 86 out of order

Then the test is OK.