home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / NCSATELN / TEL23SRC.ZIP / INCLUDE / DATA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-29  |  4.5 KB  |  124 lines

  1. /*
  2. *    data.h
  3. *   Declarations of global variables for TCP/IP libraries
  4. *
  5. ****************************************************************************
  6. *                                                                          *
  7. *                                                                          *
  8. *      NCSA Telnet                                                         *
  9. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  10. *                                                                          *
  11. *      National Center for Supercomputing Applications                     *
  12. *      152 Computing Applications Building                                 *
  13. *      605 E. Springfield Ave.                                             *
  14. *      Champaign, IL  61820                                                *
  15. *                                                                          *
  16. *    Copyright (c) 1987, Board of Trustees of the University of Illinois   *
  17. *                                                                          *
  18. ****************************************************************************
  19. *         
  20. */
  21.  
  22. #ifndef DATA_H
  23.  
  24. /*
  25. *  Start with declarations that tell the difference between PC and other
  26. *  computers
  27. */
  28. #include "pcdefs.h"
  29.  
  30. #ifdef MASTERDEF
  31. unsigned char
  32. #ifdef NOT_USED
  33.     copyr[]=
  34. {"Copyright (c) 1987 by the Board of Trustees of the University of Illinois"},
  35. #endif
  36.     us[]= 
  37. {"National Center for Supercomputing Applications -- TCP/IP by Tim Krauskopf"},
  38.     nnmyaddr[DADDLEN],        /*  my ethernet hardware address */
  39.     broadaddr[DADDLEN],        /*  the broadcast address */    
  40.     nnipnum[4],                /*  my ip number */
  41.     nnredir=0,                /*  flag indicating need for redirect */
  42.     nnicmpsave[4],            /*  address for icmp redirect */
  43.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  44.     nnmask[4]=    {0,0,0,0},    /*  the default subnet mask */
  45.     nnamask[4]=    {255,0,0,0},        /* class A mask */
  46.     nnbmask[4]=    {255,255,0,0},         /* class B mask */
  47.     nncmask[4]= {255,255,255,0},    /* class C mask */
  48.     broadip[4]= {0xff,0xff,0xff,0xff};
  49. int    numline=0,                        /* number of line on the screen */
  50. #ifndef QAK
  51.     nnkip=0,                        /*    use of KIP arping necessary (only for appletalk networks) */
  52. #else
  53.      nnkip=1,                        /*  use of KIP arping necessary */
  54. #endif
  55.     nnipident=1,                    /*  ident field of outgoing ip packets*/
  56.     nnefirst=0,                        /* first entry in event q */
  57.     nnelast=0,                        /* last entry in event q */
  58.     nnefree=0,                        /* free list for event q */
  59.     nnemac=0,                        /* Macintosh is using direct EtherTalk */
  60.     nndto=DLAYTIMEOUT,                /* dlayertimeout */
  61.     nnfromport=0,                    /* can force a port number selection */
  62.     nncredit=CREDIT,                /* limited window in some cases */
  63.     nnsegsize=MAXSEG;                /* maximum segment size  (intswapped) */
  64.  
  65. struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  66. struct uport ulist;                    /* buffer for UDP */
  67. struct pseudotcp tcps;                /* for checksums */
  68. struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  69. struct eq nnq[NEVENTS];                /* event queue */
  70.  
  71. ARPKT arp;
  72. DLAYER blankd;
  73. IPKT blankip;
  74. /*ICMPKT blankicmp;*/
  75. #else
  76. extern unsigned char
  77.     nnmyaddr[DADDLEN],        /*  my ethernet hardware address */
  78.     broadaddr[DADDLEN],        /*  the broadcast address */
  79.     broadip[4],
  80.     nnipnum[4],
  81.     nnredir,                /*  flag indicating need for redirect */
  82.     nnicmpsave[4],            /*  address for icmp redirect */
  83.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  84.     nnmask[4],
  85.     nnamask[4],
  86.     nnbmask[4],
  87.     nncmask[4];
  88. extern int numline,            /* number of screen lines */
  89.      nnkip,                    /* using KIP? */
  90.     nnipident,                /*  ident field of ip */
  91.     nnefirst,                /* first entry in event q */
  92.     nnelast,                /* last entry in event q */
  93.     nndto,                    /* dlayertimeout */
  94.     nnefree,
  95.     nnemac,                    /* Macintosh is using direct EtherTalk */
  96.     nnfromport,                /* can force a port number selection */
  97.     nncredit,
  98.     nnsegsize;                /* maximum segment size */
  99.  
  100. extern struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  101. extern struct uport ulist;                    /* buffer for UDP */
  102. extern struct pseudotcp tcps;                /* for checksums */
  103. extern struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  104. extern struct eq nnq[NEVENTS];                /* event queue */
  105. extern ARPKT arp;
  106. extern DLAYER blankd;
  107. extern IPKT blankip;
  108. /*extern ICMPKT blankicmp;*/
  109.  
  110. #endif
  111. /*
  112. *   defines for types for functions, global to everyone 
  113. */
  114. char *nbgets();
  115. uint8 *getdlayer(),    *netdlayer();
  116. /*
  117. *   defines of constants and macros that everyone needs to know
  118. */
  119.  
  120. #define nnerror(A)  netposterr(A)
  121.  
  122. #define DATA_H
  123. #endif
  124.