home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tel2305s.zip / INCLUDE / DATA.H < prev    next >
C/C++ Source or Header  |  1992-04-07  |  5KB  |  137 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. *      This program is in the public domain.                               *
  17. *                                                                          *
  18. ****************************************************************************
  19. *         
  20. */
  21.  
  22. #ifndef DATA_H
  23. #define DATA_H
  24.  
  25. /*
  26. *  Start with declarations that tell the difference between PC and other
  27. *  computers
  28. */
  29. #include "pcdefs.h"
  30.  
  31. #ifdef MASTERDEF
  32. unsigned char
  33. #ifdef NOT_USED
  34.     copyr[]=
  35. {"Copyright (c) 1987 by the Board of Trustees of the University of Illinois"},
  36.     us[]= 
  37. {"National Center for Supercomputing Applications -- TCP/IP by Tim Krauskopf"},
  38. #endif
  39.     nnmyaddr[DADDLEN],      /*  my ethernet hardware address */
  40.     broadaddr[DADDLEN],        /*  the broadcast address */    
  41.     nnipnum[4],                /*  my ip number */
  42. #ifdef NOT_USED
  43.     nnredir=0,                /*  flag indicating need for redirect */
  44. #endif
  45.     nnicmpsave[4],            /*  address for icmp redirect */
  46.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  47.     nnmask[4]=    {0,0,0,0},    /*  the default subnet mask */
  48.     nnamask[4]=    {255,0,0,0},        /* class A mask */
  49.     nnbmask[4]=    {255,255,0,0},         /* class B mask */
  50.     nncmask[4]= {255,255,255,0},    /* class C mask */
  51.     broadip[4]= {0xff,0xff,0xff,0xff};
  52. int
  53. #ifndef NET14
  54.     numline=23,                     /* number of line on the screen-1 */
  55. #endif
  56. #ifndef QAK
  57.     nnkip=0,                        /*    use of KIP arping necessary (only for appletalk networks) */
  58. #else
  59.      nnkip=1,                        /*  use of KIP arping necessary */
  60. #endif
  61.     nnipident=1,                    /*  ident field of outgoing ip packets*/
  62.     nnefirst=0,                        /* first entry in event q */
  63.     nnelast=0,                        /* last entry in event q */
  64.     nnefree=0,                        /* free list for event q */
  65. #ifdef OLD_WAY
  66.     nnemac=0,                        /* Macintosh is using direct EtherTalk */
  67. #endif
  68.     nndto=DLAYTIMEOUT,                /* dlayertimeout */
  69.     nnfromport=0,                    /* can force a port number selection */
  70.     nncredit=CREDIT                 /* limited window in some cases */
  71. #if !defined NET14 || defined NETSPACE
  72.     ,nnsegsize=MAXSEG               /* maximum segment size  (intswapped) */
  73. #endif
  74.     ;               
  75.  
  76. struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  77. struct uport ulist;                    /* buffer for UDP */
  78. struct pseudotcp tcps;                /* for checksums */
  79. struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  80. struct eq nnq[NEVENTS];                /* event queue */
  81.  
  82. ARPKT arp;
  83. DLAYER blankd;
  84. IPKT blankip;
  85. /*ICMPKT blankicmp;*/
  86. #else
  87. extern unsigned char
  88.     nnmyaddr[DADDLEN],        /*  my ethernet hardware address */
  89.     broadaddr[DADDLEN],        /*  the broadcast address */
  90.     broadip[4],
  91.     nnipnum[4],
  92. #ifdef NOT_USED
  93.     nnredir,                /*  flag indicating need for redirect */
  94. #endif
  95.     nnicmpsave[4],            /*  address for icmp redirect */
  96.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  97.     nnmask[4],
  98.     nnamask[4],
  99.     nnbmask[4],
  100.     nncmask[4];
  101. extern int
  102. #ifndef NET14
  103.     numline,                /* number of screen lines */
  104. #endif
  105.      nnkip,                    /* using KIP? */
  106.     nnipident,                /*  ident field of ip */
  107.     nnefirst,                /* first entry in event q */
  108.     nnelast,                /* last entry in event q */
  109.     nndto,                    /* dlayertimeout */
  110.     nnefree,
  111.     nnemac,                    /* Macintosh is using direct EtherTalk */
  112.     nnfromport,                /* can force a port number selection */
  113.     nncredit
  114. #ifndef NET14
  115.     ,nnsegsize              /* maximum segment size */
  116. #endif
  117.     ;
  118.  
  119. extern struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  120. extern struct uport ulist;                    /* buffer for UDP */
  121. extern struct pseudotcp tcps;                /* for checksums */
  122. extern struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  123. extern struct eq nnq[NEVENTS];                /* event queue */
  124. extern ARPKT arp;
  125. extern DLAYER blankd;
  126. extern IPKT blankip;
  127. /*extern ICMPKT blankicmp;*/
  128.  
  129. #endif
  130. /*
  131. *   defines of constants and macros that everyone needs to know
  132. */
  133.  
  134. #define nnerror(A)  netposterr(A)
  135.  
  136. #endif
  137.