Re: [CODE] Telnet code

From: Greg Buxton (gbuxton@maple.he.net)
Date: 01/15/03


(telnet_support.h)

#ifndef TELNET_SUPPORT_H

#define TELNET_SUPPORT_H

typedef enum {
  NOKNOWN,                      /* we don't know status of this option yet
*/
  NOT_AVAIL,                    /* option is not available on connection */
  ON,                           /* option is turned on */
  REQUESTED,                    /* option is requested; request unanswered
*/
  OFF                           /* option is turned off */
} ops_t;                        /* ops is short for option state */

struct host_state {
  ops_t echo;
  ops_t sga;
  ops_t naws;
  unsigned short winx;
  unsigned short winy;
};

typedef enum {
  TEXT,
  GOT_IAC,                      /* last char was IAC */
  PTCL,                         /* last char was DO/DONT/WILL/WONT */
  GOT_SB,                       /* last command was SB */
  IN_NAWS                       /* we're in a NAWS string */
} cstate_t;

#endif

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/26/03 PDT