home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / ncsa_tel / tel_2_2_ / source / data.h < prev    next >
C/C++ Source or Header  |  1988-07-15  |  4KB  |  125 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. ****************************************************************************
  17. *         
  18. */
  19.  
  20. /*
  21. *  Start with declarations that tell the difference between PC and other
  22. *  computers
  23. */
  24. #ifdef PC
  25. #include "pcdefs.h"
  26. #else
  27. #include "macdefs.h"
  28. #endif
  29.  
  30. #ifdef MASTERDEF
  31. unsigned char
  32.     us[] = 
  33. {"National Center for Supercomputing Applications -- TCP/IP by Tim Krauskopf"},
  34.     nnmyaddr[DADDLEN],        /*  my ethernet hardware address */
  35.     broadaddr[DADDLEN],        /*  the broadcast address */    
  36.     nnipnum[4],                /*  my ip number */
  37.     nnredir = 0,            /*  flag indicating need for redirect */
  38.     nnicmpsave[4],            /*  address for icmp redirect */
  39.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  40.     nnmask[4] = {0,0,0,0},    /*  the default subnet mask */
  41.     nnamask[4] = {255,0,0,0},        /* class A mask */
  42.     nnbmask[4] = {255,255,0,0},     /* class B mask */
  43.     nncmask[4] = {255,255,255,0},    /* class C mask */
  44.     broadip[4] = {0xff,0xff,0xff,0xff};
  45.  
  46. int
  47.     nnipident                    /*  ident field of outgoing ip packets */
  48.             =1,    
  49.     nnefirst                    /* first entry in event q */
  50.             =0,
  51.     nnelast                        /* last entry in event q */
  52.             =0,
  53.     nnefree                        /* free list for event q */
  54.             =0,
  55.     nnemac                        /* Macintosh is using direct EtherTalk */
  56.             =0,
  57.     nndto                        /* dlayertimeout */
  58.             =DLAYTIMEOUT,
  59.     nnfromport                    /* can force a port number selection */
  60.             = 0,
  61.     nncredit = CREDIT,            /* limited window in some cases */
  62.     nnsegsize = MAXSEG;            /* maximum segment size  (intswapped) */
  63.  
  64. struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  65. struct uport ulist;                    /* buffer for UDP */
  66. struct pseudotcp tcps;                /* for checksums */
  67. struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  68. struct eq nnq[NEVENTS];                /* event queue */
  69.  
  70. ARPKT arp;
  71. DLAYER blankd;
  72. IPKT blankip;
  73. /*ICMPKT blankicmp;*/
  74.  
  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.  
  89. extern int
  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.  
  106. extern ARPKT arp;
  107. extern DLAYER blankd;
  108. extern IPKT blankip;
  109. /*extern ICMPKT blankicmp;*/
  110.  
  111. #endif
  112.  
  113. /*
  114. *   defines for types for functions, global to everyone 
  115. */
  116. char *nbgets(),*malloc();
  117. uint8 *getdlayer(),*netdlayer();
  118. char *neterrstring();            /* some more static data for driver */
  119.  
  120. /*
  121. *   defines of constants and macros that everyone needs to know
  122. */
  123.  
  124. #define nnerror(A)  netposterr(A)
  125.