home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / ncsat.cpt / Telnet2.5 final / tcpip / hostform.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-14  |  4.0 KB  |  110 lines

  1. /**************************************************************************/
  2. /*  storage of machine information
  3. *      structure for a linked list of information about other machines
  4. *  that we may want to talk to.
  5. *
  6. *  Defines and structures for use in this file
  7. */
  8.  
  9.  
  10. struct machinfo {
  11.     unsigned char 
  12.         *sname,                    /* pointer to name of session */
  13.         *hname,                 /* pointer to name of that machine */
  14.         *font,                    /* font name, if we can do it */
  15.         hostip[4],                /* IP number of this machine */
  16.         gateway,                /* gateway preference, start with 1 */
  17.         nameserv,                /* nameserver preference, start with 1 */
  18.         bksp,                    /* backspace value */
  19.         halfdup,                /* half duplex required */
  20.         linemode,                /* enable line mode */            /* BYU 2.4.9 */
  21.         eightbit,                /* display as 8 bit font */        /* BYU 2.4.9 */
  22.         forcesave,                /* NCSA 2.5 */
  23.         crmap,                    /* Strange Berkeley 4.3 CR mode needed */
  24.         ckey,                    /* int,sus,res mappings, traditional ^C,^S,^Q */
  25.         skey,
  26.         qkey,
  27.         vtwrap,                    /* flag on when need wrap mode */
  28.         vtwidth;                /* how wide screen should be for this session */
  29.     int
  30.         clearsave,                /* whether to save cleared lines */
  31.         tektype,
  32.         fsize;                    /* font size in points */
  33.     unsigned int
  34.         nfcolor[3],                /* normal foreground */
  35.         nbcolor[3],                /* normal background */
  36.         bfcolor[3],                /* blink             */
  37.         bbcolor[3],
  38.         ufcolor[3],             /* underline */
  39.         ubcolor[3];
  40.     int
  41.         port,                    /* TCP port number to access, default = 23 (telnet) */
  42.         mno,                    /* machine number for reference */
  43.         mstat,                    /* status of this machine entry */
  44.         bkscroll,                /* how many lines to save */
  45.         nlines,                    /* number of lines for VT100 screen */
  46.         retrans,                /* initial retrans timeout */
  47.         conto,                    /* time out in seconds to wait for connect */
  48.         window,                    /* window, will be checked against buffers */
  49.         maxseg,                    /* maximum receivable segment size */
  50.         mtu;                    /* maximum transfer unit MTU (out) */
  51.  
  52.     struct machinfo *next;        /* surprise, its a linked list! */
  53. };
  54.  
  55. struct machinfo *Sgethost(),*Shostlook(),*Slooknum(),*Slookip(),*Smadd();
  56.  
  57. /*
  58. *  status fields for mstat, what do we know about that machine?
  59. */
  60. #define NOIP 1                    /* we don't have IP number */
  61. #define UDPDOM 3                /* there is a UDP request pending on it */
  62. /*  The next 20 numbers are reserved for UDPDOM */
  63. #define HAVEIP 50                /* at least we have the # */
  64. #define HFILE 70                /* we have IP number from host file */
  65. #define DOM 71                    /* we have an IP number from DOMAIN */
  66. #define FROMKIP 72                /* have IP# from KIP server */
  67.  
  68. /*
  69. *   Configuration information which 
  70. *   the calling program may want to obtain from the hosts file.
  71. *   The calling program should include hostform.h and call
  72. *   Sgetconfig(cp)
  73. *     struct config *cp;
  74. *   which will copy the information to the user's data structure.
  75. */
  76. struct config {
  77.     unsigned char
  78.         netmask[4],                /* subnetting mask being used */
  79.         havemask,                /* do we have a netmask? */
  80.         irqnum,                    /* which hardware interrupt */
  81.         myipnum[4],                /* what is my IP #? */
  82.         me[32],                    /* my name description (first 30 chars) */
  83.         color[3],                /* default colors to use */
  84.         hw[10],                    /* hardware type for network */
  85.         video[10],                /* video graphics hardware available */
  86.         bios,                    /* flag, do we want to use BIOS for screen access */
  87.         tek,                    /* flag, enable tektronix graphics */
  88.         ftp,                    /* flag, enable ftp server */
  89.         rcp,                    /* flag, enable rcp server */
  90.         comkeys,                /* flag, commandkeys=yes */
  91.         *termtype,                /* terminal type specification */
  92.         *zone,                    /* AppleTalk zone for KIP NBP */
  93.         *defdom,                /* default domain */
  94.         *capture,                /* pointer to where the capture file name is */
  95.         *pass,                    /* pointer to where the password file name is */
  96.         *hpfile,                /* HP file name */
  97.         *psfile,                /* PS file name */
  98.         *tekfile;                /* tek file name */
  99. int
  100.         nstype,                    /* nameserver = 1-domain 2-IEN116  */
  101.         domto,                    /* time out for UDP domain request */
  102.         ndom,                    /* number of retries for domain requests */
  103.         timesl,                    /* time slice */
  104.         textblock,                /* text buffering block size */
  105.         address,                /* segment address */
  106.         ioaddr,                    /* I/O address */
  107.         tektype;
  108. };
  109.  
  110.