- case TS_IAC:
- if (c == IAC) { /* IAC IAC -> 0xFF */
- G.buf[cstart++] = c;
- G.telstate = TS_0;
- break;
- }
- /* else */
- switch (c) {
- case SB:
- G.telstate = TS_SUB1;
- break;
- case DO:
- case DONT:
- case WILL:
- case WONT:
- G.telwish = c;
- G.telstate = TS_OPT;
- break;
- default:
- G.telstate = TS_0; /* DATA MARK must be added later */
- }
- break;
- case TS_OPT: /* WILL, WONT, DO, DONT */
- telopt(c);