>I have tried to send the following commands to the telnet client:
>IAC DO TELOPT_SGA
>IAC DONT TELOPT_LINEMODE
>IAC WONT TELOPT_LINEMODE
>IAC DO TELOPT_ECHO
>IAC DO ECHO
>IAC DONT DET
>with the following code.
[code deleted]
Quote:>Can anyone tell me what I am doing wrong here? The terminal seems not to
>be echoing anything but does accept input (in line mode).
I think you need to use WILL instead of do. I wrote a BBS a few years
that you could access through telnet (like a MUD), and here is what I
did:
sprintf(mesg,"%c%c%c",IAC,WILL,TELOPT_ECHO); /* put client in no local */
writestr(&id,mesg,3); /* echo, character mode */
get_n_bytes(&id,mesg,3);
sprintf(mesg,"%c%c%c",IAC,WILL,TELOPT_SGA);
writestr(&id,mesg,3);
get_n_bytes(&id,mesg,3);
I turned off echo, and had the program write back any characters that
need to be echoed.
David
--
/David Barr (206)685-8129 University of Washington /
/Systems Programmer Medical Centers Information Systems/
/ http://alfred1.u.washington.edu:8080/~davidb/ /