home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume23
/
newsxd
/
part03
/
newsxd.h
< prev
Wrap
Text File
|
1990-10-09
|
4KB
|
109 lines
/*
* USER CONFIGURABLE OPTIONS
*/
#define default_configfile "/usr/local/etc/newsxd.conf"
#define default_pidfile "/usr/tmp/newsxd.pid"
#define default_statusfile "/usr/tmp/newsxd.status"
/*
* If you run CNEWS, enable CNEWS-compatible locking by defining the
* CNEWSLOCKING symbol. If you don't do this, there is a race condition
* than can result in some articles not being transmitted
*
* If CNEWSLOCKING is enabled, after renaming the batch file to the work file,
* each transmitter attempts to lock and then immediately unlock the news
* system to ensure that relaynews is no longer writing into the batch file.
*/
#define CNEWSLOCKING
/*
* CNEWS sites will probably want to define default_workfile and
* default_batchfile in the following manner:
*
* #define default_batchfile "/usr/spool/out.going/%s/togo"
* #define default_workfile "/usr/spool/out.going/%s/togo.work"
*/
#define default_batchfile "/usr/spool/batch/%s"
#define default_workfile "/usr/spool/batch/%s.work"
#define default_xmitlogs "/dev/null"
/*
* MAXXMITTERS is the maximum number of transmitters that newsxd will
* support. MAXCLASSXMITTERS is used to define the dimensions of an array
* used to quickly map PIDs back to particular transmitters.
*/
#define MAXXMITTERS 200
#define MAXCLASSXMITTERS 100
/*
* Define SYSLOG if you want logging via syslog. If so, define SYSLOG to
* the facility to log at as defined in <syslog.h>. This is usually
* something like LOG_NEWS or LOG_LOCAL7.
*
* If your system doesn't support syslog or you don't want to use syslog,
* you can have newsxd log to a file instead by defining FAKESYSLOG to be
* the name of the file to log to.
*
* If you are planning on turning on debugging while newsxd is running (by
* using SIGUSR1), you should STRONGLY CONSIDER using FAKESYSLOG. Enabling
* one level of debugging can log several MBytes/hour of debugging info and
* enabling full debugging will easily triple that amount. This will do bad
* things to your syslogd!
*
* DO NOT DEFINE BOTH SYSLOG AND FAKESYSLOG
*
*/
/* #define SYSLOG LOG_NEWS /* normal syslog */
#define FAKESYSLOG "/usr/tmp/newsxd.log" /* fake log file */
/*
* Things you probably shouldn't change unless modifying newsxd
*/
#define MAXCLASSFLAGS 2 /* number of defined class flags */
#define MAXEXECARGS 16 /* max number of args to execv */
#define MAXTIMENAMELEN 40 /* max len of UUCP L.sys-style time */
#define MAXCLASSNAMELEN 8 /* max length of a class name */
#define C_NOWORK 0 /* Don't rename batchfile->workfile */
#define C_NOBATCH 1 /* Don't look for batchfile */
/*
* Why isn't a transmitter running (used in status display)
*/
static char *wnlist[] = {
"TTL Penlty",
#define WN_PENALTYTIME 0 /* host went over ttl, now penalized */
"TTL Kill",
#define WN_TTL 1 /* host hit ttl, killed xmit */
"Class Intv",
#define WN_CLASSSTARTINT 2 /* started xmit this class recently */
"Host Intvl",
#define WN_HOSTSTARTINT 3 /* started xmit this host recently */
"High Load",
#define WN_LOAD 4 /* load too high */
"Wrong Time",
#define WN_BADTIME 5 /* wrong time to xmit */
"Max Xmits",
#define WN_MAXXMITS 6 /* too many transmitters running */
"RUNNING",
#define WN_RUNNING 7 /* it's running! */
"No Work",
#define WN_NOWORK 8 /* no work to transmit */
"Bad Rename",
#define WN_RENAMEFAILED 9 /* couldn't rename batch -> workfile */
"NotMyTurn",
#define WN_NOTMYTURN 10 /* give other host a chance to xmit */
"No Slot!"
#define WN_NOSLOT 11 /* no class slot, recompile newsxd */
};