/* Definitions for telnet */ struct ucb { int u_state; /* ESTAB or CLOSING */ int u_rstate; /* Read terminal state */ /* NORMAL */ /* BLOCK - don't read terminal */ int u_rspecial; /* Read terminal character handling */ /* NORMAL */ /* SPECIAL - processing char after prompt */ int u_wstate; /* Write terminal state */ /* NORMAL */ /* URGENTM - urgent mode ignore nonspecial chars */ int u_wspecial; /* Write terminal character handling */ /* NORMAL */ /* '\r' (13), IAC, WILL, WONT, DO, DONT - processing special chars */ FILE *u_bwrite; /* Fds for buffered write to terminal */ int u_prompt; /* Prompt char */ int u_sendm; /* Send mode */ /* EVERYC - send to net on every char */ /* NEWLINE - send to net on newline */ int u_echom; /* Echo mode */ /* LOCAL - local echo */ /* REMOTE - remote echo */ int u_echongo; /* Echo negotiation request outstanding */ /* NORMAL */ /* LECHOREQ - IAC DONT ECHO was sent */ /* RECHOREQ - IAC DO ECHO was sent */ struct sgttyb u_tty; /* Current tty mode */ struct sgttyb u_otty; /* Original tty mode */ }; #define NORMAL 0 #define SPECIAL 1 #define BLOCK 1 #define NOBLOCK 2 #define URGENTM 1 #define EVERYC 1 #define NEWLINE 2 #define LOCAL 1 #define REMOTE 2 #define LECHOREQ 1 #define RECHOREQ 2 #define IAC 255 #define WILL 251 #define WONT 252 #define DO 253 #define DONT 254 #define DM 242 #define IP 244 #define AO 245 #define AYT 246 #define OPTECHO 1 #define OPTSPGA 3 #define DFESC '\036' /* default escape char */ #define ESTAB 1 #define CLOSING 2 #define CLOSED 3 #define TELNET_ICP 23 /* Telnet well known socket no. */ extern struct ucb ucb; extern task *TNsend; /* Telnet send task */