home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / x25 / nrs.shar.Z / nrs.shar / defs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-27  |  4.3 KB  |  188 lines

  1. # include    "nrs.h"
  2.  
  3. # ifndef lint
  4. static char RCSid[] = "@(#)$Header: defs.c,v 3.6 88/09/08 17:38:44 pb Exp $";
  5. # endif
  6. /********************************************************\
  7. *                              *
  8. * Various variables that are used all around the place.     *
  9. * Also, most of the compiled in lookup tables etc etc.     *
  10. *                              *
  11. * Julian Onions <jpo@uk.ac.nott.cs>             *
  12. *                              *
  13. \********************************************************/
  14.  
  15. Table    tablist[MAXTABLES];    /* the list of atomic files    */
  16.  
  17. Lookup    netnames[] = {        /* network to string table    */
  18.     "JANET",    JANET,
  19.     "PSS",        PSS,
  20.     "TELEX",    TELEX,
  21.     0,        0
  22. };
  23.  
  24. Lookup    lc_netnames[] = {        /* network to string table    */
  25.     "janet",    JANET,
  26.     "pss",        PSS,
  27.     "telex",    TELEX,
  28.     0,        0
  29. };
  30.  
  31. Lookup    netabbrevs[] = {        /* network to string table    */
  32.     "J",        JANET,
  33.     "P",        PSS,
  34.     "T",        TELEX,
  35.     0,        0
  36. };
  37.  
  38. Lookup    contexts[] = {    /* nrs contexts to internal table */
  39.     "X29",        X29,
  40.     "TS29",        TS29,
  41.     "FTP",        NIFTP,
  42.     "NIFTP",    NIFTP,
  43.     "FTP",        NIFTP,
  44.     "MAIL",        MAIL_NIFTP,
  45.     "MAIL-NIFTP",    MAIL_NIFTP,
  46.     "MAIL-X29",    MAIL_X29,
  47.     "MAIL-TELEX",    MAIL_TELEX,
  48.     "JTMP",        JTMP,
  49.     "JTMP-FILES",    JTMP_FILES,
  50.     "JTMP-REG",    JTMP_REG,
  51.     "YBTS-NODE",    YBTS_NODE,
  52.     "YBTS",        YBTS,
  53.     "DESC",        DESC,
  54.     0,        0
  55. };
  56.  
  57. Lookup    directions[] = {    /* nrs directions to internal table */
  58.     "FORWARDS",    DIR_FORWARDS,
  59.     "REVERSE",    DIR_REVERSE,
  60.     "FORWARD",    DIR_FORWARDS,
  61.     "INVERSE",    DIR_REVERSE,
  62.     0,        0
  63. };
  64.  
  65. #ifdef    F_YORK
  66. Lookup    exp_services[] = {    /* contexts to explicit york-box table    */
  67.                 /* i.e. use name EXACTLY asis        */
  68.     "x",    X29,
  69.     "T",    TS29,
  70.     "F",    NIFTP,
  71.     "M",    MAIL_NIFTP,
  72.     "0",    MAIL_TELEX,
  73.     "1",    MAIL_X29,
  74.     "J",    JTMP,
  75.     "2",    JTMP_FILES,
  76.     "R",    JTMP_REG,
  77.     "3",    YBTS_NODE,
  78.     "4",    YBTS,
  79.     0,    0
  80. };
  81.  
  82. Lookup    imp_services[] = {    /* contexts to implicit york-box table    */
  83.                 /* i.e. suffix `/<default YB string>'    */
  84.     "x",    X29,
  85.     "t",    TS29,
  86.     "f",    NIFTP,
  87.     "m",    MAIL_NIFTP,
  88.     0,    0
  89. };
  90.  
  91. Lookup    def_ybstring[] = {    /* contexts to default YB string table */
  92.     "",    X29,
  93.     "TS29",    TS29,
  94.     "FTP",    NIFTP,
  95.     "FTP.MAIL",    MAIL_NIFTP,
  96.     0,    0
  97. };
  98. #endif    F_YORK
  99.  
  100. #ifdef    F_YORK21
  101. Lookup    exp_21services[] = {    /* contexts to D2.1 york-box table    */
  102.     "X",    X29,
  103.     "T",    TS29,
  104.     "F",    NIFTP,
  105.     "M",    MAIL_NIFTP,
  106.     "J",    JTMP,
  107.     0,    0
  108. };
  109.  
  110. #ifndef    F_YORK
  111. Lookup    def_ybstring[] = {    /* contexts to default YB string table */
  112.     "",    X29,
  113.     "TS29",    TS29,
  114.     "FTP",    NIFTP,
  115.     "FTP.MAIL",    MAIL_NIFTP,
  116.     0,    0
  117. };
  118. #endif    F_YORK
  119. #endif    F_YORK21
  120.  
  121. #ifdef    F_VMS4
  122. Lookup    vms4_services[] = {    /* name of a context for VMS version 4 */
  123.     "X29",    X29,
  124.     "TS29",    TS29,
  125.     "FTP",    NIFTP,
  126.     "MAIL",    MAIL_NIFTP,
  127.     "JTMP",    JTMP,
  128.     0,    0
  129. };
  130. #endif    F_VMS4
  131.  
  132. #ifdef    F_VMS5
  133. Lookup    vms5_services[] = {    /* name of a context for VMS version 5 */
  134.     "X29",    X29,
  135.     "TS29",    TS29,
  136.     "FTP",    NIFTP,
  137.     "MAIL",    MAIL_NIFTP,
  138.     "JTMP",    JTMP,
  139.     0,    0
  140. };
  141. #endif    F_VMS5
  142.  
  143. char    *invo_name;        /* who we are         */
  144. char    *M2file;        /* module 2 file     */
  145. char    *M3file;        /* module 3 file    */
  146. char    *M4file;        /* module 4 file    */
  147. char    *Derfile;        /* derived file         */
  148. char    *DOMfile;        /* domain file         */
  149.  
  150. # ifdef    MULT_OUTPUT_FILES
  151. File_list    fil_list[MAXDOMAINS];    /* mmdf domains list    */
  152. char        *relay_host;        /* relay host to janet    */
  153. # endif MULT_OUTPUT_FILES
  154.  
  155. int    usederfil = 0;        /* use derived file (1) or filelets (0) */
  156. int    max_fnumb = 0;        /* max atomic file number    */
  157. int    fnumb = 0;        /* the max file number */
  158. int    verbose = 0;        /* do you want to see whats going on */
  159. int    warns = 0;        /* Count of warns so far    */
  160. int    max_warns = 20;        /* max number of warns        */
  161. int    ignore_relay=0;        /* ignore application relay strings --
  162.                  * e.g. in VMS still generate entry */
  163. int    forwrev = UNSET;    /* forward/reverse lookup    */
  164. int    longshort = UNSET;    /* format desired long/short    */
  165. int    mixlow = UNSET;        /* upper/lower case        */
  166. int    options    = 0;        /* output specific options    */
  167. int    (*outputformat)() = noformat;    /* how to display it    */
  168. int    (*outputm4rec)() = 0;    /* how to display it    */
  169. int    (*outputdomain)() = 0;    /* how to display domains    */
  170. int    trip2fnumb[MAXCONTEXTS][MAXSUBNETS][MAXDIRECTIONS];
  171.                 /* Map triple to file number    */
  172. int    cont_want[MAXCONTEXTS];
  173. struct f2t fnumb2trip[MAX_FNUMB];    /* Map file number to triple    */
  174. char    *janetgateway;        /* gateway to janet        */
  175. char    *pssgateway;        /* gateway to pss        */
  176. char    *directory;        /* the directory to find files in */
  177. char    *stripoff;        /* strip off this prefix    */
  178. char    *hostname;        /* the name of this host    */
  179. char    *commentfile;        /* the file with the comments in*/
  180. char    nullstring[] = "";    /* THE null string */
  181.  
  182. #ifdef    PRIME
  183. null()
  184. {
  185.     ;
  186. }
  187. #endif    PRIME
  188.