Re: [Queue-developers] Cross-platform termios handling...
Brought to you by:
wkrebs
From: Andrew P. <at...@pe...> - 2000-08-20 16:38:45
|
Hi, > Based on this description, it's unlikely that Expect sends terminal information > over the network. (On the other hand, rlogin and telnet do send terminal > information over the network, so perhaps we should look at the code base for > these two programs. Ultimately, however, they will have to translate information > to termios structures as well -- there's no way to completely get around this. The telnet RFC plus the EDIT/Linemode extension RFC contains a pretty complete description of the way this is done. briefly, telnet defines an 'escape' character, plus a whole of modifiers, and during the course of a telnet connection conversations like (telnet) DO ECHO (telnetd) WILL ECHO turns remote echo on. (telnet) DONT ECHO (telnetd) WONT ECHO turns remote echo off. (These actually occur in binary, but these are the mnemonics used in the RFC.) Likewise for edit. The client and server negotiate capabilities, and settle on a combination of line editing in the client and on the remote host. They dont actually transfer termios structures or similar across the network, as it was intended as a platform independent virtual terminal, with servers running on all sorts of systems ranging from VAX/VMS, MVS, and UNIX, only one of which understood termios at that time. Another extension allows the transfer of a users unix environment including the TERM environment variable across the connection. Hope this helps. Andy -- Dr Andy Phillips at...@pe... Pergamentum Solutions at...@co... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |