A Hidden Markov Model for Packet Channels