A go-back-n sliding window protocol in C