Some packet handling code added to onion_client.