摘要 |
Emulating a packet reorder condition in a network includes maintaining a counter variable to count packets sent out since the most recent reordered packet. When a new packet arrives, if the counter variable is less than or equal to zero, a current packet lag value is determined. If the current packet lag value is not equal to zero, the new packet is delayed before being sent out in accordance with the lag value, and the counter is updated with the lag value. Otherwise, the new packet is sent out without delay and the counter is decreased by one. The current packet lag value is computed based on supplied configuration parameters. Delaying the new packet includes applying a latency to the packet, the latency comprising a time cost to transmit the packet multiplied by the current packet lag value.
|