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

Defined struct's

Devices defined in line 202; used 22 times
condev defined in line 193; used 10 times

Defined macros

ACULAST defined in line 100; used 1 times
ANYREAD defined in line 154; never used
ANYWRITE defined in line 155; never used
ASSERT defined in line 148; used 12 times
BASEMODE defined in line 111; never used
CALLBACK defined in line 166; never used
CF_DIAL defined in line 180; used 12 times
CF_LOCK defined in line 178; never used
CF_LOGIN defined in line 181; used 1 times
CF_NODEV defined in line 179; used 15 times
CF_SYSTEM defined in line 176; used 1 times
CF_TIME defined in line 177; used 1 times
CMDFILE defined in line 126; never used
CMDPRE defined in line 134; never used
CNULL defined in line 158; never used
DATAPRE defined in line 135; never used
DEBUG defined in line 146; used 105 times
DEVFILE defined in line 123; used 6 times
DIALFILE defined in line 124; used 2 times
DN11 defined in line 57; used 3 times
EOTMSG defined in line 165; never used
ERRLOG defined in line 139; never used
FAIL defined in line 156; used 27 times
FTIME defined in line 77; used 1 times
F_CLASS defined in line 186; used 5 times
F_LINE defined in line 185; used 6 times
F_LOGIN defined in line 188; used 1 times
F_NAME defined in line 183; used 4 times
F_PHONE defined in line 187; used 11 times
F_TIME defined in line 184; used 2 times
GETHOSTNAME defined in line 36; never used
HAYES defined in line 61; used 3 times
LOGFILE defined in line 138; never used
LOGMASK defined in line 106; never used
MAIL defined in line 170; never used
MASTER defined in line 160; never used
MAXFULLNAME defined in line 162; never used
MAXMSGTIME defined in line 163; used 1 times
MAXPH defined in line 190; used 8 times
MAXRECALLS defined in line 221; never used
MYNAME defined in line 38; never used
NAMESIZE defined in line 164; never used
PRIV_UIDS defined in line 115; never used
PUBDIR defined in line 131; never used
RETRYTIME defined in line 220; used 1 times
RMTDEBUG defined in line 141; never used
SAME defined in line 153; used 21 times
SEQFILE defined in line 121; never used
SEQLOCK defined in line 133; never used
SHELL defined in line 169; never used
SLAVE defined in line 161; never used
SLCKTIME defined in line 120; never used
SPOOL defined in line 128; never used
SQFILE defined in line 118; never used
SQLOCK defined in line 129; never used
SQTIME defined in line 142; never used
SQTMP defined in line 119; never used
SS_BADSEQ defined in line 217; never used
SS_CALLBACK defined in line 215; never used
SS_FAIL defined in line 213; never used
SS_INPROGRESS defined in line 216; never used
SS_NODEVICE defined in line 214; never used
SS_OK defined in line 212; never used
STBNULL defined in line 159; used 8 times
SUCCESS defined in line 157; never used
SYSFILE defined in line 122; used 2 times
SYSLOG defined in line 130; never used
TRYCALLS defined in line 143; never used
USERFILE defined in line 125; never used
UUCICO defined in line 171; never used
UUCP defined in line 173; never used
UUDIR defined in line 51; used 1 times
UUXQT defined in line 172; never used
VADIC defined in line 63; used 3 times
VENTEL defined in line 62; used 4 times
WFMASK defined in line 103; never used
WKDSIZE defined in line 235; never used
XQTDIR defined in line 117; never used
XQTPRE defined in line 136; never used
X_CMD defined in line 227; never used
X_LOCK defined in line 232; never used
X_LOCKTIME defined in line 233; never used
X_NONOTI defined in line 230; never used
X_NONZERO defined in line 231; never used
X_RQDFILE defined in line 224; never used
X_SENDFILE defined in line 229; never used
X_STDIN defined in line 225; never used
X_STDOUT defined in line 226; never used
X_USER defined in line 228; never used
subchdir defined in line 262; never used
subdir defined in line 261; never used
subfile defined in line 260; never used

Usage of this include

Last modified: 1983-07-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1325
Valid CSS Valid XHTML 1.0 Strict