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

Defined struct's

Devices defined in line 204; used 22 times
condev defined in line 195; used 10 times

Defined macros

ACULAST defined in line 102; used 1 times
ANYREAD defined in line 156; never used
ANYWRITE defined in line 157; never used
ASSERT defined in line 150; used 12 times
BASEMODE defined in line 113; never used
BUSYLOOP defined in line 79; used 1 times
CALLBACK defined in line 168; never used
CF_LOCK defined in line 180; never used
CF_LOGIN defined in line 183; used 1 times
CF_NODEV defined in line 181; used 16 times
CF_SYSTEM defined in line 178; used 1 times
CF_TIME defined in line 179; used 1 times
CMDFILE defined in line 128; never used
CMDPRE defined in line 136; never used
CNULL defined in line 160; never used
DATAPRE defined in line 137; never used
DEBUG defined in line 148; used 109 times
DEVFILE defined in line 125; used 6 times
DIALFILE defined in line 126; used 2 times
EOTMSG defined in line 167; never used
ERRLOG defined in line 141; never used
FAIL defined in line 158; used 28 times
F_CLASS defined in line 188; used 5 times
F_LINE defined in line 187; used 6 times
F_LOGIN defined in line 190; used 1 times
F_PHONE defined in line 189; used 11 times
F_TIME defined in line 186; used 2 times
GETHOSTNAME defined in line 37; never used
LOGFILE defined in line 140; never used
LOGMASK defined in line 108; never used
MAIL defined in line 172; never used
MASTER defined in line 162; never used
MAXFULLNAME defined in line 164; never used
MAXMSGTIME defined in line 165; used 1 times
MAXPH defined in line 192; used 8 times
MAXRECALLS defined in line 223; never used
MYNAME defined in line 39; never used
NAMESIZE defined in line 166; never used
NDIR defined in line 88; never used
PRIV_UIDS defined in line 117; never used
PUBDIR defined in line 133; never used
RETRYTIME defined in line 222; used 1 times
RMTDEBUG defined in line 143; never used
SAME defined in line 155; used 21 times
SEQFILE defined in line 123; never used
SEQLOCK defined in line 135; never used
SHELL defined in line 171; never used
SLAVE defined in line 163; never used
SLCKTIME defined in line 122; never used
SPOOL defined in line 130; never used
SQFILE defined in line 120; never used
SQLOCK defined in line 131; never used
SQTIME defined in line 144; never used
SQTMP defined in line 121; never used
SS_BADSEQ defined in line 219; never used
SS_CALLBACK defined in line 217; never used
SS_FAIL defined in line 215; never used
SS_INPROGRESS defined in line 218; never used
SS_NODEVICE defined in line 216; never used
SS_OK defined in line 214; never used
STBNULL defined in line 161; used 9 times
SUCCESS defined in line 159; used 2 times
SYSFILE defined in line 124; used 2 times
SYSLOG defined in line 132; never used
TRYCALLS defined in line 145; never used
USERFILE defined in line 127; never used
UUCICO defined in line 173; never used
UUCP defined in line 175; never used
UUDIR defined in line 52; used 1 times
UUXQT defined in line 174; never used
VADIC defined in line 64; used 3 times
WFMASK defined in line 105; never used
WKDSIZE defined in line 237; never used
XQTDIR defined in line 119; never used
XQTPRE defined in line 138; never used
X_CMD defined in line 229; never used
X_LOCK defined in line 234; never used
X_LOCKTIME defined in line 235; never used
X_NONOTI defined in line 232; never used
X_NONZERO defined in line 233; never used
X_RQDFILE defined in line 226; never used
X_SENDFILE defined in line 231; never used
X_STDIN defined in line 227; never used
X_STDOUT defined in line 228; never used
X_USER defined in line 230; never used
subchdir defined in line 264; never used
subdir defined in line 263; never used
subfile defined in line 262; never used

Usage of this include

Last modified: 1983-10-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1445
Valid CSS Valid XHTML 1.0 Strict