home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / NCSATELN / TEL23SRC.ZIP / INCLUDE / HOSTFORM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-19  |  5.6 KB  |  127 lines

  1. /**************************************************************************/
  2. /*
  3. *  Host and local machine configuration information.
  4. *
  5. ****************************************************************************
  6. *                                                                          *
  7. *      NCSA Telnet for the PC                                              *
  8. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  9. *                                                                          *
  10. *      National Center for Supercomputing Applications                     *
  11. *      152 Computing Applications Building                                 *
  12. *      605 E. Springfield Ave.                                             *
  13. *      Champaign, IL  61820                                                *
  14. *                                                                          *
  15. *      This program is in the public domain.                               *
  16. *                                                                          *
  17. ****************************************************************************
  18. *                                                                           *
  19. *    Copyright (c) 1987, Board of Trustees of the University of Illinois   *
  20. *                                                                          *
  21. ****************************************************************************
  22. *    5/88    clean up for 2.3 release, JKM    
  23. */
  24.  
  25. #ifndef HOSTFORM_H
  26.  
  27. /*
  28. *  Linked list of structures which describe other machines.
  29. *  Arranged one per session with unique session names.
  30. */
  31. struct machinfo {
  32.     unsigned char *sname,        /* pointer to name of session */
  33.         *hname,                 /* pointer to name of that machine */
  34.         *font,                    /* font name, if we can do it */
  35.         *ftpoptions,            /* options for FTP command line (ALT-F) */
  36.         hostip[4],                /* IP number of this machine */
  37.         gateway,                /* gateway preference, start with 1 */
  38.         nameserv,                /* nameserver preference, start with 1 */
  39.         bksp,                    /* backspace value */
  40.         halfdup,                /* half duplex required */
  41.         crmap,                    /* Strange Berkeley 4.3 CR mode needed */
  42.         vtwrap,                    /* flag on when need wrap mode */
  43.         vtwidth;                /* how wide screen should be for this session */
  44.     int clearsave,                /* whether to save cleared lines */
  45.         fsize,                    /* font size in points */
  46.         nfcolor,                /* normal foreground */
  47.         nbcolor,                /* normal background */
  48.         bfcolor,                /* blink             */
  49.         bbcolor,
  50.         ufcolor,                /* underline */
  51.         ubcolor,
  52.         port,                    /* TCP port number to access, default = 23 (telnet) */
  53.         mno,                    /* machine number for reference */
  54.         mstat,                    /* status of this machine entry */
  55.         bkscroll,                /* how many lines to save */
  56.         retrans,                /* initial retrans timeout */
  57.         conto,                    /* time out in seconds to wait for connect */
  58.         window,                    /* window, will be checked against buffers */
  59.         maxseg,                    /* maximum receivable segment size */
  60.         mtu;                    /* maximum transfer unit MTU (out) */
  61.     struct machinfo *next;        /* surprise, its a linked list! */
  62. };
  63.  
  64. struct machinfo *Sgethost(),
  65.                 *Shostlook(),
  66.                 *Slooknum(),
  67.                 *Slookip(),
  68.                 *Smadd();
  69. /*
  70. *  status fields for mstat, what do we know about that machine?
  71. */
  72. #define NOIP 1                    /* we don't have IP number */
  73. #define UDPDOM 3                /* there is a UDP request pending on it */
  74. /*  The next 20 numbers are reserved for UDPDOM */
  75. #define HAVEIP 50                /* at least we have the # */
  76. #define HFILE 70                /* we have IP number from host file */
  77. #define DOM 71                    /* we have an IP number from DOMAIN */
  78. #define FROMKIP 72                /* have IP# from KIP server */
  79. /*
  80. *   Configuration information which 
  81. *   the calling program may want to obtain from the hosts file.
  82. *   The calling program should include hostform.h and call
  83. *   Sgetconfig(cp)
  84. *     struct config *cp;
  85. *   which will copy the information to the user's data structure.
  86. */
  87. struct config {
  88. unsigned char netmask[4],        /* subnetting mask being used */
  89.         irqnum,                    /* which hardware interrupt */
  90.         myipnum[4],                /* what is my IP #? */
  91.         broadip[4],                /* IP broadcast address */
  92.         me[32],                    /* my name description (first 30 chars) */
  93.         color[3],                /* default colors to use */
  94.         hw[10],                    /* hardware type for network */
  95.         video[10],                /* video graphics hardware available */
  96.         ega43,                    /* 43 line ega mode */
  97.         *termtype,                /* terminal type specification */
  98.         *zone,                    /* AppleTalk zone for KIP NBP */
  99.         *defdom,                /* default domain */
  100.         *capture,                /* pointer to where the capture file name is */
  101.         *pass,                    /* pointer to where the password file name is */
  102.         *hpfile,                /* HP file name */
  103.         *psfile,                /* PS file name */
  104.         *tekfile;                /* tek file name */
  105. int     cursortop,                /* top line of cursor */
  106.         cursorbottom,            /* bottom line of cursor */
  107.         nstype,                    /* nameserver = 1-domain 2-IEN116  */
  108.         domto,                    /* time out for UDP domain request */
  109.         ndom,                    /* number of retries for domain requests */
  110.         timesl;                    /* time slice */
  111. unsigned int address,            /* segment address */
  112.         ioaddr;                    /* I/O address */
  113. unsigned int havemask:1,        /* do we have a netmask? */
  114.         bios:1,                    /* flag, do we want to use BIOS for screen access */
  115.         tek:1,                    /* flag, enable tektronix graphics */
  116.         ftp:1,                    /* flag, enable ftp server */
  117.         rcp:1,                    /* flag, enable rcp server */
  118.         wire:1,                    /* what type of connector? (thin or thick)*/
  119.         comkeys:1,                /* flag, commandkeys=yes */
  120.         wingoaway:1,            /* flag, whether a window goes away when session ends or waits for a keypress */
  121.         clock:1,                /* flag, whether to display the clock or not */
  122.         autoscroll:1;            /* flag, do we perform a fast scroll in scrollback */
  123. };
  124.  
  125. #define HOSTFORM_H
  126. #endif
  127.