Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!sicsun!disuns2!ltisun7!conti From: conti@ltisun7.epfl.ch (Giovanni Conti) Newsgroups: comp.protocols.tcp-ip Subject: Re: Telnet's ECHO option Message-ID: <1191@disuns2.epfl.ch> Date: 23 Nov 90 08:02:25 GMT References: Sender: news@disuns2.epfl.ch Lines: 65 In article , gm@ionic.UUCP (Greg Miller) writes: > > (There's no need to explain the need to respond to a "WILL/WONT" with a > "DO/DONT" rather than the other-way-around; I'm fully aware of that, and > make use of it. I don't include it here for simplification.) > > (1) If I send a DO ECHO and receive a WILL ECHO, I expect the host to echo > each character I send to them. I think there is a need to explain the WILL/WONT mechansim. The ECHO is LOCAL. So if you ask your partner to do echo, he will duplicate his output stream (from him to you) onto his input stream. That means that a UNIX system doing Telnet echo and sending you a "Username:" string will also read the same string in its input stream. So obviously, the UNIX system never does Telnet echo locally. On the other side, you (e.g. the terminal) are expected to do some local echo of the keyboard input to the screen (echo your input stream to your output stream). If the system does not want you to do that (e.g. when you type the password), it tells you DONT ECHO, which means "Just send me the characters, I will echo back what I think is reasonable". In that case you do not echo the characters locally on your screen. If you ask the host to do ECHO, and assuming he answers WILL ECHO, that means that when he sends you the string "Username:", telnet echoes him a copy as if you've typed "Username:", leading to wrong behaviours. So don't tell the host to do local echo (local to him) if you are a Telnet Client (or unless you know exactly what you're doing). > > (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. > So this is wrong. But fortunately, according to your request, the BSD host will not read in its input stream all the characters it sent to you. > 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 fact of echoing everything back to you means: a) that you did not do local echo in the beginning (unless you received all duplicated characters. So there is an error in your Telnet implementation. b) That the Application echo (e.g. the login deamon on a host) has NOTHING to do with your Telnet echo commands. In fact, the application running on top of telnet (e.g. csh) may echo back things, asking you first NOT to do local echo (so you receive a DONT ECHO from the host). Good luck Giovanni Conti Ecole Polytechnique Federale de Lausanne Laboratoire de Teleinformatique EL-Ecublens CH-1015 Lausanne Switzerland Tel : +41 21 693.29.07 FAX : +41 21 693.46.60 E-mail: conti@ltisun.epfl.ch