uucp.h revision ace1a5f11236a072fca1b5e0ea1416a083a9f2aa
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License, Version 1.0 only
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (the "License"). You may not use this file except in compliance
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore/*
e4dcf6b386220918d8a355e951a2d7e8a73e5a6dTony Nguyen * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* All Rights Reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _UUCP_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _UUCP_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#pragma ident "%Z%%M% %I% %E% SMI"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <unistd.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <stdlib.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <string.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <locale.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <wchar.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <widec.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <wctype.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <ulimit.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <values.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/types.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/wait.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "parms.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef ATTSV
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ATTSVKILL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ATTSVTTY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UNAME
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#ifdef ATTSVR4
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#define ATTSVR3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*ATTSVR4*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*ATTSV*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef BSD4_3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define BSD4_2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define BSDINETD
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*BSD4_3 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef DIAL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXTERN static
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GLOBAL static
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXTERN extern
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GLOBAL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef BSD4_2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define V7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ATTSVKILL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#undef NONAP /* conn.c has a nap() for 4.2 -- it's called select() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#undef FASTTIMER
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef V8
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define V7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ATTSVKILL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UNAME
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* V8 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef FASTTIMER
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#undef NONAP
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <stdio.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <ctype.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <setjmp.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/param.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * param.h includes types.h and signal.h in 4bsd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef V7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef ATTSVTTY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <termio.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* ATTSVTTY */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sgtty.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVTTY */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/timeb.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef BSD4_2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <fcntl.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !V7 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <termio.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/types.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <signal.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <fcntl.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* V7 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/stat.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <utime.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <dirent.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef BSD4_2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/time.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <time.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/times.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <errno.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef ATTSV
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef ATTSVR4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/mkdev.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !ATTSVR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/sysmacros.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSV */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef RT
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "rt/types.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "rt/unix/param.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "rt/stat.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/ustat.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* RT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sysexits.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef ATTSVR4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define const
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should user files be allowed to have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* NOTE: This does not allow setuid or execute bits on transfer. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LEGALMODE (mode_t) 0666
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should public files have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PUB_FILEMODE (mode_t) 0666
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should log files have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LOGFILEMODE (mode_t) 0644
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan/* what mode should C. files have upon creation? */
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan#define CFILEMODE (mode_t) 0644
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allan/* what mode should D. files have upon creation? */
c946faca5d4627284fb79c6b04e652b471034495allan#define DFILEMODE (mode_t) 0600
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the value of PUBMASK, used for creating "public" directories */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PUBMASK (mode_t) 0000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should public directories have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PUB_DIRMODE (mode_t) 0777
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the value of DIRMASK, used for creating "system" subdirectories */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DIRMASK (mode_t) 0022
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXSTART 300 /* how long to wait on startup */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the last characters for ACU (used for 801/212 dialers) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ACULAST "<"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* caution - the fillowing names are also in Makefile
c946faca5d4627284fb79c6b04e652b471034495allan * any changes here have to also be made there
c946faca5d4627284fb79c6b04e652b471034495allan *
c946faca5d4627284fb79c6b04e652b471034495allan * it's a good idea to make directories .foo, since this ensures
c946faca5d4627284fb79c6b04e652b471034495allan * that they'll be ignored by processes that search subdirectories in SPOOL
c946faca5d4627284fb79c6b04e652b471034495allan *
c946faca5d4627284fb79c6b04e652b471034495allan * XQTDIR=/var/uucp/.Xqtdir
c946faca5d4627284fb79c6b04e652b471034495allan * CORRUPT=/var/uucp/.Corrupt
c946faca5d4627284fb79c6b04e652b471034495allan * LOGDIR=/var/uucp/.Log
c946faca5d4627284fb79c6b04e652b471034495allan * SEQDIR=/var/uucp/.Sequence
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * STATDIR=/var/uucp/.Status
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* where to put the STST. files? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define STATDIR "/var/uucp/.Status"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* where should logfiles be kept? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LOGUUX "/var/uucp/.Log/uux"
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore#define LOGUUXQT "/var/uucp/.Log/uuxqt"
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore#define LOGUUCP "/var/uucp/.Log/uucp"
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore#define LOGCICO "/var/uucp/.Log/uucico"
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore/* some sites use /var/uucp/.Corrupt and /var/uucp/.Xqtdir here */
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore/* use caution since things are linked into there from /var/spool/uucp */
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore#define CORRUPTDIR "/var/spool/uucp/.Corrupt"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define XQTDIR "/var/spool/uucp/.Xqtdir"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
162fafd3d0764eb6022fe01ce970de8775eda209allan/* how much of a system name can we print in a [CX]. file? */
162fafd3d0764eb6022fe01ce970de8775eda209allan/* MAXBASENAME - 1 (pre) - 1 ('.') - 1 (grade) - 4 (sequence number) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SYSNSIZE (MAXBASENAME - 7)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef USRSPOOLLOCKS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LOCKPRE "/var/spool/locks/LCK."
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /*!USRSPOOLLOCKS*/
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#define LOCKPRE "/var/spool/uucp/LCK."
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#endif /* USRSPOOLLOCKS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SQFILE "/etc/uucp/SQFILE"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SQTMP "/etc/uucp/SQTMP"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SLCKTIME 5400 /* system/device timeout (LCK.. files) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DIALCODES "/etc/uucp/Dialcodes"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PERMISSIONS "/etc/uucp/Permissions"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SYSNAMEFILE "/etc/uucp/Sysname"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SPOOL "/var/spool/uucp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SEQDIR "/var/uucp/.Sequence"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCKTIME 3600
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef USRSPOOLLOCKS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SEQLOCK "/var/spool/locks/LCK.SQ."
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SQLOCK "/var/spool/locks/LCK.SQ"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCK "/var/spool/locks/LCK.X"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define S_LOCK "/var/spool/locks/LCK.S"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define L_LOCK "/var/spool/locks/LK"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCKDIR "/var/spool/locks" /* must be dir part of above */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /*!USRSPOOLLOCKS*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SEQLOCK "/var/spool/uucp/LCK.SQ."
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SQLOCK "/var/spool/uucp/LCK.SQ"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCK "/var/spool/uucp/LCK.X"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define S_LOCK "/var/spool/uucp/LCK.S"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define L_LOCK "/var/spool/uucp/LK"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCKDIR "/var/spool/uucp" /* must be dir part of above */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* USRSPOOLLOCKS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCKPRE "LCK.X" /* must be last part of above */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define S_LOCKPRE "LCK.S"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note: this should be "/usr/spool/uucppublic", not "/var/spool/uucppublic",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * because if a Permissions file entry doesn't explicitly list directories to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which and from which files can be copied you can only copy files to and from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PUBDIR, and most systems out there will think PUBDIR is
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * "/usr/spool/uucppublic" not "/var/spool/uucppublic" (i.e., if you change
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this, other systems may be rudely surprised when they try to get things from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or to PUBDIR).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PUBDIR "/usr/spool/uucppublic"
c946faca5d4627284fb79c6b04e652b471034495allan#define ADMIN "/var/uucp/.Admin"
c946faca5d4627284fb79c6b04e652b471034495allan#define ERRLOG "/var/uucp/.Admin/errors"
c946faca5d4627284fb79c6b04e652b471034495allan#define SYSLOG "/var/uucp/.Admin/xferstats"
162fafd3d0764eb6022fe01ce970de8775eda209allan#define RMTDEBUG "/var/uucp/.Admin/audit"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CLEANUPLOGFILE "/var/uucp/.Admin/uucleanup"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CMDLOG "/var/uucp/.Admin/command"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PERFLOG "/var/uucp/.Admin/perflog"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ACCOUNT "/var/uucp/.Admin/account"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SECURITY "/var/uucp/.Admin/security"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * WORKSPACE should be in the same filesystem as SPOOL so that "mv"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * between the two will work. Otherwise, the file must be copied
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and a window exists during which the file is mode 666.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WORKSPACE "/var/spool/uucp/.Workspace"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SQTIME 60
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TRYCALLS 2 /* number of tries to dial call */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MINULIMIT (1L<<11) /* minimum reasonable ulimit */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_LOCKTRY 5 /* number of attempts to lock device */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDEBUG is for communication line debugging
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * DEBUG is for program debugging
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * #define SMALL to compile without the DEBUG code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef DIAL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CDEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CDEBUG(l, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMALL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef SMALL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEBUG(l, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SMALL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * VERBOSE is used by cu and ct to inform the user of progress
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * In other programs, the Value of Verbose is always 0.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define VERBOSE(f, s) { if (Verbose > 0) fprintf(stderr, f, s); }
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PREFIX(pre, str) (strncmp((pre), (str), strlen(pre)) == SAME)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define BASENAME(str, c) ((Bnptr = strrchr((str), c)) ? (Bnptr + 1) : (str))
c946faca5d4627284fb79c6b04e652b471034495allan#define EQUALS(a,b) ((a != CNULL) && (b != CNULL) && (strcmp((a),(b))==SAME))
c946faca5d4627284fb79c6b04e652b471034495allan#define WEQUALS(a,b) ((a != CNULL) && (b != CNULL) && (wcscmp((a),(b))==SAME))
c946faca5d4627284fb79c6b04e652b471034495allan#define EQUALSN(a,b,n) ((a != CNULL) && (b != CNULL) && (strncmp((a),(b),(n))==SAME))
c946faca5d4627284fb79c6b04e652b471034495allan#define WEQUALSN(a,b,n) ((a != CNULL) && (b != CNULL) && (wcsncmp((a),(b),(n))==SAME))
c946faca5d4627284fb79c6b04e652b471034495allan#define LASTCHAR(s) (s+strlen(s)-1)
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allan#define SAME 0
c946faca5d4627284fb79c6b04e652b471034495allan#define ANYREAD 04
c946faca5d4627284fb79c6b04e652b471034495allan#define ANYWRITE 02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FAIL -1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUCCESS 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NULLCHAR '\0'
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CNULL ((void *) 0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define STBNULL (struct sgttyb *) 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MASTER 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SLAVE 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXBASENAME 14 /* should be DIRSIZ but that is now fs dependent */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXFULLNAME BUFSIZ
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXNAMESIZE 64 /* /var/spool/uucp/<14 chars>/<14 chars>+slop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CONNECTTIME 30
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXPECTTIME 45
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MSGTIME 60
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NAMESIZE MAXBASENAME+1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SIZEOFPID 10 /* maximum number of digits in a pid */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EOTMSG "\004\n\004\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CALLBACK 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* manifests for sysfiles.c's sysaccess() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* check file access for REAL user id */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ACCESS_SYSTEMS 1
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang#define ACCESS_DEVICES 2
e4dcf6b386220918d8a355e951a2d7e8a73e5a6dTony Nguyen#define ACCESS_DIALERS 3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* check file access for EFFECTIVE user id */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EACCESS_SYSTEMS 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EACCESS_DEVICES 5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EACCESS_DIALERS 6
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* manifest for chkpth flag */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CK_READ 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CK_WRITE 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * commands
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SHELL "/usr/bin/sh"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAIL "mail"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UUCICO "/usr/lib/uucp/uucico"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UUXQT "/usr/lib/uucp/uuxqt"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UUX "/usr/bin/uux"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define UUCP "/usr/bin/uucp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* system status stuff */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_OK 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_NO_DEVICE 1
a79493184c9332129c9c91500069322f6f3fafddReed#define SS_TIME_WRONG 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_INPROGRESS 3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_CONVERSATION 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_SEQBAD 5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_LOGIN_FAILED 6
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_DIAL_FAILED 7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_BAD_LOG_MCH 8
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_LOCKED_DEVICE 9
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_ASSERT_ERROR 10
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald#define SS_BADSYSTEM 11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_CANT_ACCESS_DEVICE 12
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_DEVICE_FAILED 13 /* used for interface failure */
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald#define SS_WRONG_MCH 14
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_CALLBACK 15
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald#define SS_RLOCKED 16
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_RUNKNOWN 17
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald#define SS_RLOGIN 18
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_UNKNOWN_RESPONSE 19
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_STARTUP 20
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_CHAT_FAILED 21
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_CALLBACK_LOOP 22
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXPH 60 /* maximum phone string size */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXC BUFSIZ
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TRUE 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FALSE 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NAMEBUF 32
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* The call structure is used by ct.c, cu.c, and dial.c. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic struct call {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *speed; /* transmission baud rate */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *line; /* device name for outgoing line */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *telno; /* ptr to tel-no digit string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *type; /* type of device to use for call. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte};
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* structure of an Systems file line */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_MAX 50 /* max number of fields in Systems file line */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_NAME 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_TIME 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_TYPE 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_CLASS 3 /* an optional prefix and the speed */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_PHONE 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define F_LOGIN 5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* structure of an Devices file line */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_TYPE 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_LINE 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_CALLDEV 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_CLASS 3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_CALLER 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_ARG 5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_MAX 50 /* max number of fields in Devices file line */
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_ACU 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_DIRECT 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_PROT 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GRADES "/etc/uucp/Grades"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
#define D_QUEUE 'Z' /* default queue */
/* past here, local changes are not recommended */
#define CMDPRE 'C'
#define DATAPRE 'D'
#define XQTPRE 'X'
/*
* stuff for command execution
*/
#define X_RQDFILE 'F'
#define X_STDIN 'I'
#define X_STDOUT 'O'
#define X_STDERR 'E'
#define X_CMD 'C'
#define X_USER 'U'
#define X_BRINGBACK 'B'
#define X_MAILF 'M'
#define X_RETADDR 'R'
#define X_COMMENT '#'
#define X_NONZERO 'Z'
#define X_SENDNOTHING 'N'
#define X_SENDZERO 'n'
#define X_JOBID 'J'
/* This structure describes call routines */
struct caller {
char *CA_type;
int (*CA_caller)();
};
/* structure for a saved C file */
static struct cs_struct {
char file[NAMESIZE];
char sys[NAMESIZE+5];
char sgrade[NAMESIZE];
char grade;
long jsize;
};
/* This structure describes dialing routines */
struct dialer {
char *DI_type;
int (*DI_dialer)();
};
struct nstat {
pid_t t_pid; /* process id */
time_t t_start; /* start time */
time_t t_scall; /* start call to system */
time_t t_ecall; /* end call to system */
time_t t_tacu; /* acu time */
time_t t_tlog; /* login time */
time_t t_sftp; /* start file transfer protocol */
time_t t_sxf; /* start xfer */
time_t t_exf; /* end xfer */
time_t t_eftp; /* end file transfer protocol */
time_t t_qtime; /* time file queued */
int t_ndial; /* # of dials */
int t_nlogs; /* # of login trys */
struct tms t_tbb; /* start execution times */
struct tms t_txfs; /* xfer start times */
struct tms t_txfe; /* xfer end times */
struct tms t_tga; /* garbage execution times */
};
/* This structure describes the values from Limits file */
struct limits {
int totalmax; /* overall limit */
int sitemax; /* limit per site */
char mode[64]; /* uucico mode */
};
/* external declarations */
EXTERN ssize_t (*Read)(), (*Write)();
#if defined(__STDC__)
EXTERN int (*Ioctl)(int,int,...);
#else
EXTERN int (*Ioctl)();
#endif
EXTERN int Ifn, Ofn;
EXTERN int Debug, Verbose;
EXTERN uid_t Uid, Euid; /* user-id and effective-uid */
EXTERN long Ulimit;
EXTERN mode_t Dev_mode; /* save device mode here */
EXTERN char Wrkdir[];
EXTERN long Retrytime;
EXTERN char **Env;
EXTERN char Uucp[];
EXTERN char Pchar;
EXTERN struct nstat Nstat;
EXTERN char Dc[]; /* line name */
EXTERN int Seqn; /* sequence # */
EXTERN int Role;
EXTERN int Sgrades; /* flag for administrator defined service grades */
EXTERN char Grade;
EXTERN char Logfile[MAXFULLNAME];
EXTERN char Rmtname[MAXFULLNAME];
EXTERN char JobGrade[MAXBASENAME+1];
EXTERN char User[MAXFULLNAME];
EXTERN char Loginuser[NAMESIZE];
EXTERN char *Spool;
EXTERN char *Pubdir;
EXTERN char Myname[];
EXTERN char Progname[];
EXTERN char RemSpool[];
EXTERN char *Bnptr; /* used when BASENAME macro is expanded */
EXTERN char *Shchar; /* shell meta-charaters */
EXTERN int SizeCheck; /* ulimit check supported flag */
EXTERN long RemUlimit; /* remote ulimit if supported */
EXTERN int Restart; /* checkpoint restart supported flag */
EXTERN char Jobid[NAMESIZE]; /* Jobid of current C. file */
EXTERN int Uerror; /* global error code */
EXTERN char *UerrorText[]; /* text for error code */
#define UERRORTEXT UerrorText[Uerror]
#define UTEXT(x) UerrorText[x]
/* things get kind of tricky beyond this point -- please stay out */
#ifdef ATTSV
#define index strchr
#define rindex strrchr
#else /*!ATTSV*/
#define strchr index
#define strrchr rindex
#endif /*ATTSV*/
#ifdef BSD4_2
#define memcpy(s1,s2,n) bcopy(s2,s1,n)
extern void bcopy();
#else
#ifndef ATTSVR4
#define vfork fork
extern char *memcpy();
#endif
#endif
EXTERN struct stat __s_;
#define F_READANY(f) ((fstat((f),&__s_)==0) && ((__s_.st_mode&(0004))!=0) )
#define READANY(f) ((stat((f),&__s_)==0) && ((__s_.st_mode&(0004))!=0) )
#define WRITEANY(f) ((stat((f),&__s_)==0) && ((__s_.st_mode&(0002))!=0) )
#define DIRECTORY(f) ((stat((f),&__s_)==0) && ((__s_.st_mode&(S_IFMT))==S_IFDIR) )
#define NOTEMPTY(f) ((stat((f),&__s_)==0) && (__s_.st_size!=0) )
/* uucp functions and subroutine */
EXTERN void (*genbrk)();
extern int iswrk(), gtwvec(); /* anlwrk.c */
extern void findgrade(); /* grades.c */
extern void chremdir(), mkremdir(); /* chremdir.c */
extern void toCorrupt(); /* cpmv.c */
extern int xmv(); /* cpmv.c */
EXTERN int getargs(); /* getargs.c */
EXTERN void bsfix(); /* getargs.c */
extern char *_uu_setlocale(); /* getargs.c */
extern void _uu_resetlocale(); /* getargs.c */
extern char *getprm(); /* getprm.c */
extern char *next_token(); /* permission.c */
extern char *nextarg(); /* permission.c */
extern int getuline(); /* permission.c */
EXTERN void logent(), usyslog(), ucloselog(); /* logent.c */
extern void commandlog(); /* logent.c */
extern time_t millitick(); /* logent.c */
extern unsigned long getfilesize(); /* statlog.c */
extern void putfilesize(); /* statlog.c */
EXTERN char *protoString(); /* permission.c */
extern logFind(), mchFind(); /* permission.c */
extern chkperm(), chkpth(); /* permission.c */
extern cmdOK(), switchRole(); /* permission.c */
extern callBack(), requestOK(); /* permission.c */
extern noSpool(); /* permission.c */
extern void myName(); /* permission.c */
extern int mkdirs(); /* expfile.c */
extern int scanlimit(); /* limits.c */
extern void systat(); /* systat.c */
EXTERN int fd_mklock(), fd_cklock(); /* ulockf.c */
EXTERN int fn_cklock(); /* ulockf.c */
EXTERN int mklock(), cklock(), umlock(); /* ulockf.c */
EXTERN void fd_rmlock(), delock(), rmlock(); /* ulockf.c */
extern char *timeStamp(); /* utility.c */
EXTERN void assert(), errent(); /* utility.c */
extern void uucpname(); /* uucpname.c */
extern int versys(); /* versys.c */
extern void xuuxqt(), xuucico(); /* xqt.c */
EXTERN void cleanup(); /* misc main.c */
#define ASSERT(e, s1, s2, i1) if (!(e)) {\
assert(s1, s2, i1, __FILE__, __LINE__);\
cleanup(FAIL);};
#ifdef ATTSV
void setbuf();
#else /* !ATTSV */
int setbuf(), ftime();
char *mktemp();
#endif /*ATTSV*/
#ifdef UNAME
#include <sys/utsname.h>
#endif /* UNAME */
#ifndef NOUSTAT
#ifdef V7USTAT
struct ustat {
daddr_t f_tfree; /* total free */
ino_t f_tinode; /* total inodes free */
};
#else /* !NOUSTAT && !V7USTAT */
#ifdef STATFS
#include <sys/vfs.h>
#else
#include <ustat.h>
#endif /* STATFS */
#endif /* V7USTAT */
#endif /* NOUSTAT */
#ifdef BSD4_2
int gethostname();
#endif /* BSD4_2 */
/* messages */
EXTERN char *Ct_OPEN;
EXTERN char *Ct_WRITE;
EXTERN char *Ct_READ;
EXTERN char *Ct_CREATE;
EXTERN char *Ct_ALLOCATE;
EXTERN char *Ct_LOCK;
EXTERN char *Ct_STAT;
EXTERN char *Ct_CHOWN;
EXTERN char *Ct_CHMOD;
EXTERN char *Ct_LINK;
EXTERN char *Ct_CHDIR;
EXTERN char *Ct_UNLINK;
EXTERN char *Wr_ROLE;
EXTERN char *Ct_CORRUPT;
EXTERN char *Ct_FORK;
EXTERN char *Ct_CLOSE;
EXTERN char *Ct_BADOWN;
EXTERN char *Fl_EXISTS;
#ifdef __cplusplus
}
#endif
#endif /* _UUCP_H */