home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / tcpipsrc / h / if / session < prev    next >
Text File  |  1995-01-14  |  2KB  |  58 lines

  1. #include "Terminal.h"
  2.  
  3. extern int mode;
  4. #define CMD_MODE        1       /* Command mode */
  5. #define CONV_MODE       2       /* Converse mode */
  6.  
  7. /* Session control structure; only one entry is used at a time */
  8. struct session
  9. {
  10.         int type;
  11. #define FREE      0
  12. #define TELNET    1
  13. #define FTP       2
  14. #define AX25TNC   3
  15. #define FINGER    4
  16. #define NRSESSION 5
  17. #define DNSQUERY  6
  18.  
  19.         char *name;     /* Name of remote host */
  20.         union
  21.         {
  22.                 struct ftp     *ftp;
  23.                 struct telnet  *telnet;
  24.                 struct ax25_cb *ax25_cb;
  25.                 struct finger  *finger;
  26.                 struct dns     *dns;
  27.                 struct nr4cb   *nr4_cb ;
  28.                 struct wimpapp *wimpapp;
  29.         } cb;
  30.         void (*parse)();        /* Where to hand typed input when conversing */
  31.         FILE *record;           /* Receive record file */
  32.         char *rfile;            /* Record file name */
  33.         FILE *upload;           /* Send file */
  34.         char *ufile;            /* Upload file name */
  35.         Terminal *window;       /* Window structure handle */
  36.         int  echo;
  37.         int  raw;
  38.         int  keypad;
  39. };
  40. #define NULLSESSION     (struct session *)0
  41. extern unsigned nsessions;
  42. extern struct session *sessions;
  43. extern struct session *current;
  44.  
  45. int dosession(int, char **);
  46. int go(struct session *);
  47. int doclose(int, char **);
  48. int doreset(int, char **);
  49. int dokick(int, char **);
  50. struct session *newsession(void);
  51. void freesession(struct session *);
  52. int dorecord(int, char **);
  53. int doupload(int, char **);
  54. void close_sess(struct session *);
  55. int session_number(struct session *);
  56.  
  57. extern int16 lport;
  58.