+ if (c == IAC) { /* handle telnet commands */
+ switch (c = getc(cin)) {
+ case WILL:
+ case WONT:
+ c = getc(cin);
+ fprintf(cout, "%c%c%c",IAC,WONT,c);
+ (void) fflush(cout);
+ break;
+ case DO:
+ case DONT:
+ c = getc(cin);
+ fprintf(cout, "%c%c%c",IAC,DONT,c);
+ (void) fflush(cout);
+ break;
+ default:
+ break;
+ }
+ continue;
+ }