If this application is telnet, your application must send IAC WILL ECHO to disable echo on its side. This is useful for entering passwords or if your application is echoing.
#define TEL_IAC "\377" #define TEL_WILL "\373" #define TEL_ECHO "\001" char buf[4]; snprintf(buf, sizeof(buf), "%c%c%c" TEL_IAC, TEL_WILL, TEL_ECHO); write(sock, buf, sizeof(buf));
or
write(sock, TEL_IAC TEL_WILL TEL_ECHO, 3);
Hope this helps.
Bryan Drewery Apr 20 '10 at 16:39 2010-04-20 16:39
source share