1: /*	$Header: uucp.h,v 1.14 84/10/12 20:42:00 rick Exp $ */
   2: /*	from: uucp.h	5.2	83/07/19	*/
   3: 
   4: #include "stdio.h"
   5: 
   6: /*
   7:  * Determine local uucp name of this machine.
   8:  * Define one of the following:
   9:  *
  10:  * For UCB 4.1A and later systems, you will have the gethostname(2) call.
  11:  * If this call exists, define GETHOSTNAME.
  12:  *
  13:  * For USG 3.0 and later systems, you will have the uname(2) call.
  14:  * If this call exists, define UNAME.
  15:  *
  16:  * Some systems have a line of the form '#define sysname "myuucpname",'
  17:  * in the file /usr/include/whoami.h, to identify their machine.
  18:  * If your site does that, define WHOAMI.
  19:  *
  20:  * If your site has <whoami.h>, but you do not want to read
  21:  * that file every time uucp runs, you can compile sysname into uucp.
  22:  * This is faster and more reliable, but binaries do not port.
  23:  * If you want to do that, define CCWHOAMI.
  24:  *
  25:  * Some systems put the local uucp name in a single-line file
  26:  * named /etc/uucpname or /local/uucpname.
  27:  * If your site does that, define UUNAME.
  28:  *
  29:  * Systems running 3Com's UNET will have the getmyhname() call.
  30:  * If you want to, define GETMYHNAME.
  31:  *
  32:  * You should also define MYNANE to be your uucp name.
  33:  *
  34:  * For each of the above that are defined, uucp checks them in order.
  35:  * It stops on the first method that returns a non null name.
  36:  * If everything fails, it uses "unknown" for the system name.
  37:  */
  38: #define GETHOSTNAME
  39: /*#define CCWHOAMI	*/
  40: /* If the above fails ... */
  41: #define MYNAME  "erewhon"
  42: 
  43: /*
  44:  * If you have it, include <sysexits.h> to use exit
  45:  * codes that will be understood by sendmail.
  46:  * Otherwise, define EX_NOHOST, EX_CANTCREAT, and EX_NOINPUT.
  47:  */
  48: #include <sysexits.h>
  49: /*#define EX_NOHOST	101*/
  50: /*#define EX_CANTCREAT	1*/
  51: /*#define EX_NOINPUT	2*/
  52: 
  53: /*
  54:  * Define the various kinds of connections to include.
  55:  * The complete list is in the condevs array in condevs.c
  56:  */
  57: /*#define DN11		/* standard dialer */
  58: /*#define DATAKIT	/* ATT's datakit */
  59: /*#define PNET		/* Purdue network */
  60: /*#define DF02		/* Dec's DF02/DF03 */
  61: /*#define HAYES		/* Hayes' Smartmodem */
  62: /*#define VENTEL	/* ventel dialer */
  63: /*#define VADIC		/* Racal-Vadic 3450 */
  64: /*#define RVMACS	/* Racal-Vadic MACS 831 */
  65: /*#define RVADIC	/* Racal-Vadic 831 */
  66: /*#define UNETTCP	/* 3Com's UNET */
  67: #define BSDTCP      /* 4.2bsd TCP/IP */
  68: /*#define PAD		/* X.25 PAD */
  69: /*#define MICOM		/* micom mux port */
  70: /*#define NOVATION	/* Novation modem */
  71: 
  72: #if defined(UNETTCP) || defined(BSDTCP)
  73: #define TCPIP
  74: #endif
  75: 
  76: #ifdef  VENTEL
  77: /*
  78:  * We need a timer to write slowly to ventels.
  79:  * define INTERVALTIMER to use 4.2 bsd interval timer.
  80:  * define FASTTIMER if you have the nap() system call.
  81:  * define FTIME if you have the ftime() system call.
  82:  * define BUSYLOOP if you must do a busy loop.
  83:  * Look at uucpdelay() in condevs.c for details.
  84:  */
  85: #define FTIME
  86: #endif
  87: 
  88: /*
  89:  * If your site is using "ndir.h" to retrofit the Berkeley
  90:  * directory reading routines, define NDIR.
  91:  * You will probably also have to set LIBNDIR in Makefile.
  92:  * Otherwise, <dir.h> is assumed to have the Berkeley directory definitions.
  93:  */
  94: #define NDIR
  95: 
  96: /*
  97:  * If yours is a BTL system III, IV, or so-on site, define SYSIII.
  98:  */
  99: /*#define	SYSIII	*/
 100: 
 101: /*
 102:  * If you are running 4.2bsd, define BSD4_2
 103:  */
 104: /*#define BSD4_2 */
 105: 
 106: /* for a EUNICE system, define VMS */
 107: #define VMS
 108: 
 109: /*
 110:  * If you are using /etc/inetd with 4.2bsd, define BSDINETD
 111:  */
 112: /*#define BSDINETD*/
 113: 
 114: #define VMSDTR  /* Turn on modem control on vms(works DTR) for
 115: 			   develcon and gandalf ports to gain access */
 116: 
 117: /* define the last characters for ACU */
 118: #define ACULAST "-<"
 119: 
 120: /* define the value of WFMASK - for umask call - used for all uucp work files */
 121: #define WFMASK 0111
 122: 
 123: /* define UUSTAT if you need "uustat" command */
 124: /* #define UUSTAT	*/
 125: 
 126: /*	define UUSUB if you need "uusub" command */
 127: /* #define UUSUB */
 128: 
 129: /* define the value of LOGMASK - for LOGFILE, SYSLOG, ERRLOG */
 130: #define LOGMASK 0111
 131: 
 132: /* All files are given at least the following at the final destination */
 133: /* It is also the default mode, so '666' is recommended */
 134: /* and 444 is minimal (minimally useful, maximally annoying) */
 135: #define BASEMODE    0666
 136: 
 137: /*
 138:  * Define NOSTRANGERS if you don't want to accept transactions from
 139:  * sites that are not in your L.sys file (see cico.c)
 140:  */
 141: /* #define NOSTRANGERS */
 142: 
 143: #define XQTDIR      "/usr/spool/uucp/XTMP"
 144: #define SQFILE      "/usr/lib/uucp/SQFILE"
 145: #define SQTMP       "/usr/lib/uucp/SQTMP"
 146: #define SLCKTIME    5400    /* system/device timeout (LCK.. files) */
 147: #define SEQFILE     "/usr/lib/uucp/SEQF"
 148: #define SYSFILE     "/usr/lib/uucp/L.sys"
 149: #define DEVFILE     "/usr/lib/uucp/L-devices"
 150: #define DIALFILE    "/usr/lib/uucp/L-dialcodes"
 151: #define USERFILE    "/usr/lib/uucp/USERFILE"
 152: #define CMDFILE     "/usr/lib/uucp/L.cmds"
 153: 
 154: #define SPOOL       "/usr/spool/uucp"
 155: #define SQLOCK      "/usr/spool/uucp/LCK.SQ"
 156: #define SYSLOG      "/usr/spool/uucp/SYSLOG"
 157: #define PUBDIR      "/usr/spool/uucppublic"
 158: #define CMDSDIR     "/usr/spool/uucp/C."
 159: #define DATADIR     "/usr/spool/uucp/D."
 160: #define XEQTDIR     "/usr/spool/uucp/X."
 161: 
 162: #define SEQLOCK     "LCK.SEQL"
 163: #define CMDPRE      'C'
 164: #define DATAPRE     'D'
 165: #define XQTPRE      'X'
 166: 
 167: #define LOGFILE "/usr/spool/uucp/LOGFILE"
 168: #define ERRLOG  "/usr/spool/uucp/ERRLOG"
 169: 
 170: #define RMTDEBUG    "AUDIT"
 171: #define CORRUPT     "CORRUPT"
 172: #define SQTIME      60
 173: #define TRYCALLS    2   /* number of tries to dial call */
 174: 
 175: #define LLEN    50
 176: #define MAXRQST 250
 177: 
 178: #define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s); else
 179: 
 180: #define ASSERT(e, s1, s2, i1) if (!(e)) {assert(s1, s2, i1);cleanup(FAIL);}else
 181: 
 182: #define SAME 0
 183: #define ANYREAD 0444
 184: #define ANYWRITE 02
 185: #define FAIL -1
 186: #define SUCCESS 0
 187: #define CNULL (char *) 0
 188: #define STBNULL (struct sgttyb *) 0
 189: #define MASTER 1
 190: #define SLAVE 0
 191: #define MAXFULLNAME 256
 192: #define MAXMSGTIME 45
 193: #define NAMESIZE 256
 194: #define EOTMSG "\04\n\04\n"
 195: #define CALLBACK 1
 196: 
 197:     /*  commands  */
 198: #define SHELL       "/bin/sh"
 199: #define MAIL        "mail"
 200: #define UUCICO      "/usr/lib/uucp/uucico"
 201: #define UUXQT       "/usr/lib/uucp/uuxqt"
 202: #define UUCP        "uucp"
 203: #define STARTUUCP   "/usr/lib/uucp/startuucp"
 204: 
 205:     /*  call connect fail stuff  */
 206: #define CF_SYSTEM   -1
 207: #define CF_TIME     -2
 208: #define CF_LOCK     -3
 209: #define CF_NODEV    -4
 210: #define CF_DIAL     -5
 211: #define CF_LOGIN    -6
 212: 
 213: #define F_NAME 0
 214: #define F_TIME 1
 215: #define F_LINE 2
 216: #define F_CLASS 3   /* an optional prefix and the speed */
 217: #define F_PHONE 4
 218: #define F_LOGIN 5
 219: 
 220: #define MAXPH   60  /* maximum length of a phone number */
 221: 
 222:     /* This structure tells how to get to a device */
 223: struct condev {
 224:     char *CU_meth;      /* method, such as 'ACU' or 'DIR' */
 225:     char *CU_brand;     /* brand, such as 'Hayes' or 'Vadic' */
 226:     int (*CU_gen)();    /* what to call to search for brands */
 227:     int (*CU_open)();   /* what to call to open brand */
 228:     int (*CU_clos)();   /* what to call to close brand */
 229: };
 230: 
 231:     /* This structure tells about a device */
 232: struct Devices {
 233:     char D_type[20];
 234:     char D_line[20];
 235:     char D_calldev[20];
 236:     char D_class[20];
 237:     int D_speed;
 238:     char D_brand[20];   /* brand name, as 'Hayes' or 'Vadic' */
 239: };
 240: 
 241:     /*  system status stuff  */
 242: #define SS_OK       0
 243: #define SS_FAIL     4
 244: #define SS_NODEVICE 1
 245: #define SS_CALLBACK 2
 246: #define SS_INPROGRESS   3
 247: #define SS_BADSEQ   5
 248: 
 249:     /*  fail/retry parameters  */
 250: #define RETRYTIME 600
 251: #define MAXRECALLS 20
 252: 
 253:     /*  stuff for command execution  */
 254: #define X_RQDFILE   'F'
 255: #define X_STDIN     'I'
 256: #define X_STDOUT    'O'
 257: #define X_CMD       'C'
 258: #define X_USER      'U'
 259: #define X_SENDFILE  'S'
 260: #define X_NONOTI    'N'
 261: #define X_RETURNTO  'R'
 262: #define X_NONZERO   'Z'
 263: #define X_LOCK      "LCK.XQT"
 264: #define X_LOCKTIME  3600
 265: 
 266: #define WKDSIZE 100 /*  size of work dir name  */
 267: 
 268: extern int Ifn, Ofn;
 269: extern char Rmtname[];
 270: extern char User[];
 271: extern char Loginuser[];
 272: extern char *Spool;
 273: extern char Myname[];
 274: extern char Myfullname[];
 275: extern int Debug;
 276: extern int Bspeed;
 277: extern char Wrkdir[];
 278: extern long Retrytime;
 279: extern short Usrf;
 280: extern int IsTcpIp;
 281: extern char Progname[];
 282: extern int (*CU_end)();
 283: extern struct condev condevs[];
 284: 
 285: extern  char DLocal[], DLocalX[], *subfile(), *subdir();
 286: 
 287: /* Commonly called routines which return non-int value */
 288: extern  char *ttyname(), *strcpy(), *strcat(), *index(), *rindex(),
 289:         *fgets(), *calloc(), *malloc(),
 290:         *cfgets();
 291: extern  long lseek();
 292: extern  FILE *rpopen();

Defined struct's

Devices defined in line 232; never used
condev defined in line 223; used 2 times
  • in line 283(2)

Defined macros

ACULAST defined in line 118; never used
ANYREAD defined in line 183; never used
ANYWRITE defined in line 184; never used
ASSERT defined in line 180; never used
BASEMODE defined in line 135; never used
BSDTCP defined in line 67; used 1 times
  • in line 72
CALLBACK defined in line 195; never used
CF_DIAL defined in line 210; never used
CF_LOCK defined in line 208; never used
CF_LOGIN defined in line 211; never used
CF_NODEV defined in line 209; never used
CF_SYSTEM defined in line 206; never used
CF_TIME defined in line 207; never used
CMDFILE defined in line 152; never used
CMDPRE defined in line 163; never used
CMDSDIR defined in line 158; never used
CNULL defined in line 187; never used
CORRUPT defined in line 171; never used
DATADIR defined in line 159; never used
DATAPRE defined in line 164; never used
DEBUG defined in line 178; never used
DEVFILE defined in line 149; never used
DIALFILE defined in line 150; never used
EOTMSG defined in line 194; never used
ERRLOG defined in line 168; never used
FAIL defined in line 185; used 1 times
FTIME defined in line 85; never used
F_CLASS defined in line 216; never used
F_LINE defined in line 215; never used
F_LOGIN defined in line 218; never used
F_NAME defined in line 213; never used
F_PHONE defined in line 217; never used
F_TIME defined in line 214; never used
GETHOSTNAME defined in line 38; never used
LLEN defined in line 175; never used
LOGFILE defined in line 167; never used
LOGMASK defined in line 130; never used
MAIL defined in line 199; never used
MASTER defined in line 189; never used
MAXFULLNAME defined in line 191; never used
MAXMSGTIME defined in line 192; never used
MAXPH defined in line 220; never used
MAXRECALLS defined in line 251; never used
MAXRQST defined in line 176; never used
MYNAME defined in line 41; never used
NAMESIZE defined in line 193; never used
NDIR defined in line 94; never used
PUBDIR defined in line 157; never used
RETRYTIME defined in line 250; never used
RMTDEBUG defined in line 170; never used
SAME defined in line 182; never used
SEQFILE defined in line 147; never used
SEQLOCK defined in line 162; never used
SHELL defined in line 198; never used
SLAVE defined in line 190; never used
SLCKTIME defined in line 146; never used
SPOOL defined in line 154; never used
SQFILE defined in line 144; never used
SQLOCK defined in line 155; never used
SQTIME defined in line 172; never used
SQTMP defined in line 145; never used
SS_BADSEQ defined in line 247; never used
SS_CALLBACK defined in line 245; never used
SS_FAIL defined in line 243; never used
SS_INPROGRESS defined in line 246; never used
SS_NODEVICE defined in line 244; never used
SS_OK defined in line 242; never used
STARTUUCP defined in line 203; never used
STBNULL defined in line 188; never used
SUCCESS defined in line 186; never used
SYSFILE defined in line 148; never used
SYSLOG defined in line 156; never used
TCPIP defined in line 73; never used
TRYCALLS defined in line 173; never used
USERFILE defined in line 151; never used
UUCICO defined in line 200; never used
UUCP defined in line 202; never used
UUXQT defined in line 201; never used
VMS defined in line 107; never used
VMSDTR defined in line 114; never used
WFMASK defined in line 121; never used
WKDSIZE defined in line 266; never used
XEQTDIR defined in line 160; never used
XQTDIR defined in line 143; never used
XQTPRE defined in line 165; never used
X_CMD defined in line 257; never used
X_LOCK defined in line 263; never used
X_LOCKTIME defined in line 264; never used
X_NONOTI defined in line 260; never used
X_NONZERO defined in line 262; never used
X_RETURNTO defined in line 261; never used
X_RQDFILE defined in line 254; never used
X_SENDFILE defined in line 259; never used
X_STDIN defined in line 255; never used
X_STDOUT defined in line 256; never used
X_USER defined in line 258; never used
Last modified: 1986-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1386
Valid CSS Valid XHTML 1.0 Strict