[comp.protocols.tcp-ip.ibmpc] Telnet protocol, Escape character

R02RDK@DHHDESY3.BITNET (Raymond Koluvek) (02/21/89)

Could someone tell me if it is allowed from an user application under
a Telnet client, to have access to the Telnet command
structure, e.g. could the Telnet client application progarm
send a  0xff 0xf8  through Telnet have it interperted as erase line,
or will the Telnet client escape it as  0xff 0xff 0xf8.

Thanks, Ray

  Raymond D. Koluvek
  (Deutsches Eletronen - Synchrotron, DESY)

 Buggy
 Mail   : DESY - Dept. R2, Notkestrasse 85
          D-2000 Hamburg 52, West Germany
 Voice  : +49-40-8998-2362
 FAX    : +49-40-8998-3282
 Email  : R02RDK@DHHDESY3.BITNET

hedrick@geneva.rutgers.edu (Charles Hedrick) (02/21/89)

If you send 0xff through a telnet connection, it gets escaped to 0xff
0xff, so that the other end knows not to take it as a command.  This
means that programs running in a telnet session can't issue telnet
commands.  There's a group working on something called "line mode
telnet", which is in fact a way to allow the server machine to pass
terminal mode changes to the user machine.  So rather than sending
explicit telnet commands, you'll just issue the appropriate system
calls to your OS to do whatever you want done, just as you would for a
directly connected terminal.

However your specific example was sending an erase line.  I'm not sure
quite what effect you expect if a program sent an erase line command.
Normally erase line would be sent from the user telnet to the server
telnet, and it would translate into ^U, #, or whatever causes your OS
to erase a line.  I'm not sure what it would mean to send it outwards
from a program.  Certainly user telnets are not going to erase a line
from the screen when they see this command from the host.

jbvb@ftp.COM (James Van Bokkelen) (02/22/89)

In article <8902200941.aa14870@louie.udel.edu>, R02RDK@DHHDESY3.BITNET (Raymond Koluvek) writes:
> ......, e.g. could the Telnet client application progarm
> send a  0xff 0xf8  through Telnet have it interperted as erase line,
> or will the Telnet client escape it as  0xff 0xff 0xf8.
> 
Unless there is some special call the application can make to turn it off
when necessary, the Telnet client *must* always insert the 2nd 0xFF.


-- 
James B. VanBokkelen		We're moving.  After 2/26, the new number
FTP Software Inc.		will be (617) 246-0900.