Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!ucsd!ucbvax!BERSERKLY.CRAY.COM!dab From: dab@BERSERKLY.CRAY.COM (David Borman) Newsgroups: comp.protocols.tcp-ip Subject: Re: Telnet's ECHO option Message-ID: <9011261713.AA00449@berserkly.cray.com> Date: 26 Nov 90 17:13:24 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 100 Before things get out of hand, here is some clarification about the telnet ECHO option. The response to the original question is WRONG!!!. From the original questions: > (1) If I send a DO ECHO and receive a WILL ECHO, I expect the host to echo > each character I send to them. This is exactly correct. > (2) If I send a DON'T ECHO and receive a WON'T ECHO, I expect NOT to receive > an echo for each character sent. This is also exactly correct. > Part (1) above seems to fit properly. If I send the DO ECHO, the host > happily echos everything back to me. However, part (2) doesn't seems to > always apply - The only reason that either part (1) or part (2) would not work is due to a broken telnet implementation. Now for some clarification about how the telnet ECHO option shoule be used, in the typical "terminal/client to server". First, there are two pieces of information involved: 1) should the users typed data be echoed to the users screen, and 2) is the server WILL ECHO or WONT ECHO. 1) The connection should NEVER be WILL ECHO in both directions. In the typical terminal/client to server application, there is no need for the client to ever be WILL ECHO. 2) When the server is WONT ECHO, then if the users typed data is to be echoed to the users screen, then that has to be done locally on the server side. 3) If the server is WILL ECHO, then the telnet client should not do any local echo of the users typed data, as the remote server will be echoing any data that needs to be echoed; if the client continues to do local echo, the user would see double echo of the typed characters. 4) When the server is WILL ECHO, it is not required to echo the incoming data verbatim, it may chose to not echo some of the data (like passwords) or may chose to echo data in a different format (like control characters as a two character sequence, e.g. "^A"). These diagrams represent the typical UNIX environment; your milage may vary. The "(tty)" and "CLIENT" boxes, and the "SERVER", "(pty)" and "Application" boxes may be combined as appropriatly for different systems, but the basic concept remains the same. The double-dashed line is the path where both normal data and echoed data is flowing. It is assumed that the users data is to be echoed. Server WONT ECHO: (tty) CLIENT SERVER (pty) Application +-----+------+ +------+-----+---------+ | | | | | | | terminal ->|--+->|----->|---->|----->|---->|->(read) | | | | | | | | | | | | | | | | | | V | | | | | | screen <=|==+--|<-----|<----|<-----|<----|<-(write)| | | | | | | | +-----+------+ +------+-----+---------+ Server WILL ECHO: (tty) CLIENT SERVER (pty) Application +-----+------+ +------+-----+---------+ | | | | | | | terminal ->|---->|----->|---->|----->|--+->|->(read) | | | | | | | | | | | | | | | | | | | | | | V | | screen <=|=====|<=====|<====|<=====|==+--|<-(write)| | | | | | | | +-----+------+ +------+-----+---------+ If the client was ever WILL ECHO (sever WONT ECHO), you would have something like: (tty) CLIENT SERVER (pty) Application +-----+------+ +------+-----+---------+ | | | | | | | terminal ->|---->|---+=>|====>|=====>|====>|=>(read) | | | ^ | | | | | | | | | | | | | | | | | | | | | screen <-|-----|<--+--|<----|<-----|-----|<-(write)| | | | | | | | +-----+------+ +------+-----+---------+ which would not be very useful. -David Borman, Chair of the IETF Telnet Working Group dab@cray.com