Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!THINK.COM!barmar From: barmar@THINK.COM (Barry Margolin) Newsgroups: comp.protocols.tcp-ip Subject: Re: TELNET Buffering Woes Message-ID: <19890505160429.5.BARMAR@OCCAM.THINK.COM> Date: 5 May 89 16:04:00 GMT References: <8905051422.AA02452@oliver.cray.com> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 54 Date: Fri, 5 May 89 09:22:00 CDT From: dab@opus.cray.com (Dave Borman) > How is the local telnet supposed to know that ^C is the appropriate > interrupt character for the remote machine? Many systems permit the > interrupt character to be set by the user or a program. I don't think > the TELNET protocol specifies a way to transmit this change to the > client. The whole idea of the IAC IP and the NVT is that you don't need to know what the interrupt character on the remote side is. You type the interrupt character that is most natural to use on the client side of the connection, it gets turned into IAC IP, and the server translates the IAC IP into whatever is appropriate on the server side to cause an interrupt. Hence, if you are on your Unix machine, and you telnet to some machine running foobarOS, you can type ^C and know that you will interrupt the process on the remote side, regardless of what the interrupt character on the remote side is. That is a long-obsolete view of TELNET. In most cases the user wants a transparent connection to the remote machine; the local system's keyboard conventions should be ignored and the user should have the illusion of being connected directly to the server. This is the generally-accepted interpretation of BINARY option when the client is a terminal emulation application. If the TELNET client application wants to be able to permit the user to invoke these IAC operations, that can be done using some local escape (e.g. ~ on Unix, on Symbolics Lispms, menus on windowing systems). > Also, the above assumes there's only one kind of interrupt. On Unix, > there's ^C (interrupt), ^Z (suspend), and ^\ (quit). They all need > output flushed, but they can't all send IAC IP. Bingo. You win the prize. The 4.3BSD telnet uses BRK to send ^\, and IP to send ^C. It also has an option on the client side so that you can tell the client what each character is. I thought BRK was obsolete (i.e. "old TELNET"). > What's really needed is a way to send out-of-band data to the telnet > client, telling it to ignore output until it reads a mark. Is it > possible to use the URGent flag to implement this? It already exists. It's called the "Synch" signal in RFC854, see page 8. A "Synch" consists of an IAC DM sent in urgent mode, and causes the reader(client) to discard input (server output) until it reads the IAC DM. I thought I remembered it from somewhere. But since seemingly-knowledgeable people were proposing more complex things, I thought I might have been wrong. barmar