uucp.h revision ace1a5f11236a072fca1b5e0ea1416a083a9f2aa
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
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 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
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 * CDDL HEADER END
e4dcf6b386220918d8a355e951a2d7e8a73e5a6dTony Nguyen * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* All Rights Reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#pragma ident "%Z%%M% %I% %E% SMI"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*ATTSVR4*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*ATTSV*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /*BSD4_3 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXTERN static
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GLOBAL static
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXTERN extern
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#undef NONAP /* conn.c has a nap() for 4.2 -- it's called select() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* V8 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * param.h includes types.h and signal.h in 4bsd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* ATTSVTTY */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVTTY */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !V7 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* V7 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* BSD4_2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* !ATTSVR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSV */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* RT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define const
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ATTSVR4 */
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/* what mode should public files have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should log files have upon creation? */
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan/* what mode should C. files have upon creation? */
c946faca5d4627284fb79c6b04e652b471034495allan/* what mode should D. files have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the value of PUBMASK, used for creating "public" directories */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* what mode should public directories have upon creation? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the value of DIRMASK, used for creating "system" subdirectories */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXSTART 300 /* how long to wait on startup */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* define the last characters for ACU (used for 801/212 dialers) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* caution - the fillowing names are also in Makefile
c946faca5d4627284fb79c6b04e652b471034495allan * any changes here have to also be made there
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 * 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/* where to put the STST. files? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* where should logfiles be kept? */
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 */
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#else /*!USRSPOOLLOCKS*/
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#endif /* USRSPOOLLOCKS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SLCKTIME 5400 /* system/device timeout (LCK.. files) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define X_LOCKDIR "/var/spool/locks" /* must be dir part of above */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /*!USRSPOOLLOCKS*/
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 * 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#define CLEANUPLOGFILE "/var/uucp/.Admin/uucleanup"
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#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 * 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#define CDEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CDEBUG(l, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEBUG(l, f, s)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SMALL */
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#define VERBOSE(f, s) { if (Verbose > 0) fprintf(stderr, f, s); }
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))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CNULL ((void *) 0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXBASENAME 14 /* should be DIRSIZ but that is now fs dependent */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAXNAMESIZE 64 /* /var/spool/uucp/<14 chars>/<14 chars>+slop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SIZEOFPID 10 /* maximum number of digits in a pid */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* manifests for sysfiles.c's sysaccess() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* check file access for REAL user id */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* check file access for EFFECTIVE user id */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* manifest for chkpth flag */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* system status stuff */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SS_DEVICE_FAILED 13 /* used for interface failure */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* The call structure is used by ct.c, cu.c, and dial.c. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic struct call {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *type; /* type of device to use for call. */
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_CLASS 3 /* an optional prefix and the speed */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* structure of an Devices file line */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define D_MAX 50 /* max number of fields in Devices file line */
struct caller {
char *CA_type;
int (*CA_caller)();
static struct cs_struct {
char grade;
long jsize;
struct dialer {
char *DI_type;
int (*DI_dialer)();
struct nstat {
struct limits {
#if defined(__STDC__)
#ifdef ATTSV
#ifdef BSD4_2
extern void bcopy();
#ifndef ATTSVR4
extern char *memcpy();
#ifdef ATTSV
void setbuf();
char *mktemp();
#ifdef UNAME
#ifndef NOUSTAT
#ifdef V7USTAT
struct ustat {
#ifdef STATFS
#include <ustat.h>
#ifdef BSD4_2
int gethostname();
#ifdef __cplusplus