various statistics and testing
Handles both ACK and SEQ wrapping