terminal protocol