telnet and OOB data
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Mon Jul 1 07:48:42 AEST 1991
In article <avalon.678295705 at coombs> avalon at coombs.anu.edu.au (Darren Reed) writes:
> Does anybody know how I should be going about telling telnet *not*
> to ECHO, etc ?
telnet implements the TELNET protocol. If you want to talk to telnet,
you have to speak TELNET too. Anything else is an invitation to
disaster. Can you guarantee that telnet won't receive keyboard signals?
Do you know what you have to do with an \0xff over a TELNET connection?
The echo you're seeing is the normal echo from your tty. You can turn
that off with stty, ioctl(), or from the telnet command line, but unless
your server groks TELNET you should expect a continuing series of
interoperability problems.
For a straight TCP connector without any weird protocols in the middle,
you can use tcpclient and tcpserver in my clientserver package, just
posted to alt.sources. One advantage of this is that you'll be able to
use exactly the same code on top of undomclient and undomserver, or
npipeclient and npipeserver for System V, or the forthcoming krb5client
and krb5server, or any other set written to the same interface. In any
case, you can set up a server like this:
servermachine% tcpserver 0 <portnumber> <server to run> &
and connect to it like this:
clientmachine% tcpclient servermachine <portnumber> <client to run> &
and stop it like this:
servermachine% tcpkiller 0 <portnumber>
That's it. No privileges required to compile and run the tcp toolset.
The client and server get environment variables showing who they're
talking to, so you can add security if you want. In this case, it sounds
like you want to turn off echo, maybe run some full-screen application;
<client to run> can do the appropriate stty or ioctl().
---Dan
More information about the Comp.unix.programmer
mailing list