Adapted translate_packet to the new send_packet.