home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / unix_c / usenet / newsxd.tar / newsxd / newsxd.h < prev    next >
Text File  |  1990-08-31  |  4KB  |  109 lines

  1. /*
  2.  * USER CONFIGURABLE OPTIONS
  3.  */
  4.  
  5. #define    default_configfile    "/usr/local/etc/newsxd.conf"
  6. #define    default_pidfile        "/usr/tmp/newsxd.pid"
  7. #define    default_statusfile    "/usr/tmp/newsxd.status"
  8.  
  9. /*
  10.  * If you run CNEWS, enable CNEWS-compatible locking by defining the
  11.  * CNEWSLOCKING symbol.  If you don't do this, there is a race condition
  12.  * than can result in some articles not being transmitted
  13.  *
  14.  * If CNEWSLOCKING is enabled, after renaming the batch file to the work file,
  15.  * each transmitter attempts to lock and then immediately unlock the news
  16.  * system to ensure that relaynews is no longer writing into the batch file.
  17.  */
  18.  
  19. #define CNEWSLOCKING
  20.  
  21. /*
  22.  * CNEWS sites will probably want to define default_workfile and
  23.  * default_batchfile in the following manner:
  24.  *
  25.  * #define default_batchfile    "/usr/spool/out.going/%s/togo"
  26.  * #define default_workfile    "/usr/spool/out.going/%s/togo.work"
  27.  */
  28.  
  29. #define    default_batchfile    "/usr/spool/batch/%s"
  30. #define    default_workfile    "/usr/spool/batch/%s.work"
  31.  
  32. #define    default_xmitlogs    "/dev/null"
  33.  
  34. /*
  35.  * MAXXMITTERS is the maximum number of transmitters that newsxd will
  36.  * support.  MAXCLASSXMITTERS is used to define the dimensions of an array
  37.  * used to quickly map PIDs back to particular transmitters.
  38.  */
  39.  
  40. #define MAXXMITTERS        200
  41. #define MAXCLASSXMITTERS    100
  42.  
  43. /*
  44.  * Define SYSLOG if you want logging via syslog.  If so, define SYSLOG to
  45.  * the facility to log at as defined in <syslog.h>.  This is usually 
  46.  * something like LOG_NEWS or LOG_LOCAL7.
  47.  *
  48.  * If your system doesn't support syslog or you don't want to use syslog,
  49.  * you can have newsxd log to a file instead by defining FAKESYSLOG to be
  50.  * the name of the file to log to.
  51.  *
  52.  * If you are planning on turning on debugging while newsxd is running (by
  53.  * using SIGUSR1), you should STRONGLY CONSIDER using FAKESYSLOG.  Enabling
  54.  * one level of debugging can log several MBytes/hour of debugging info and
  55.  * enabling full debugging will easily triple that amount.  This will do bad
  56.  * things to your syslogd!
  57.  *
  58.  * DO NOT DEFINE BOTH SYSLOG AND FAKESYSLOG
  59.  *
  60.  */
  61.  
  62. /* #define    SYSLOG            LOG_NEWS    /* normal syslog */
  63. #define FAKESYSLOG        "/usr/tmp/newsxd.log"    /* fake log file */
  64.  
  65. /*
  66.  * Things you probably shouldn't change unless modifying newsxd
  67.  */
  68.  
  69. #define    MAXCLASSFLAGS        2    /* number of defined class flags */
  70. #define    MAXEXECARGS        16    /* max number of args to execv */
  71.  
  72. #define MAXTIMENAMELEN        40    /* max len of UUCP L.sys-style time */
  73. #define    MAXCLASSNAMELEN        8    /* max length of a class name */
  74.  
  75. #define    C_NOWORK        0    /* Don't rename batchfile->workfile */
  76. #define    C_NOBATCH        1    /* Don't look for batchfile */
  77.  
  78. /*
  79.  * Why isn't a transmitter running (used in status display)
  80.  */
  81.  
  82.  
  83. static char *wnlist[] = {
  84.                "TTL Penlty",
  85. #define WN_PENALTYTIME        0    /* host went over ttl, now penalized */
  86.                "TTL Kill",
  87. #define WN_TTL            1    /* host hit ttl, killed xmit */
  88.                "Class Intv",
  89. #define WN_CLASSSTARTINT    2    /* started xmit this class recently */
  90.                "Host Intvl",
  91. #define WN_HOSTSTARTINT        3    /* started xmit this host recently */
  92.                "High Load",
  93. #define WN_LOAD            4    /* load too high */
  94.                "Wrong Time",
  95. #define WN_BADTIME        5    /* wrong time to xmit */
  96.                "Max Xmits",
  97. #define WN_MAXXMITS        6    /* too many transmitters running */
  98.                "RUNNING",
  99. #define WN_RUNNING        7    /* it's running! */
  100.                "No Work",
  101. #define WN_NOWORK        8    /* no work to transmit */
  102.                "Bad Rename",
  103. #define WN_RENAMEFAILED        9    /* couldn't rename batch -> workfile */
  104.                "NotMyTurn",
  105. #define WN_NOTMYTURN        10    /* give other host a chance to xmit */
  106.                "No Slot!"
  107. #define WN_NOSLOT        11    /* no class slot, recompile newsxd */
  108. };
  109.