Annotation of 42BSD/usr.bin/uucp/uucp.h, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.