4496 lines
179 KiB
Plaintext
4496 lines
179 KiB
Plaintext
\input texinfo @c -*-texinfo-*-
|
|
@c %**start of header
|
|
@setfilename uucp.info
|
|
@settitle Taylor UUCP
|
|
@setchapternewpage odd
|
|
@c %**end of header
|
|
@setchapternewpage odd
|
|
|
|
@ignore
|
|
---------------------------------------------------------------------->
|
|
Franc,ois Pinard says:
|
|
|
|
Hi, Ian! This is the promised merging of the current documents from
|
|
Taylor UUCP 1.01, plus the patches to documentation you sent to me, into
|
|
a taylor.texi file. Many things remain to do, among which:
|
|
|
|
- merging in the Taylor UUCP program man pages.
|
|
- integrating the three documents describing the protocol.
|
|
- gleaning miscellaneous information from my archives.
|
|
----------------------------------------------------------------------<
|
|
@end ignore
|
|
|
|
@ifinfo
|
|
This file documents Taylor UUCP, version 1.03.
|
|
|
|
Copyright @copyright{} 1992 Free Software Foundation, Inc.
|
|
|
|
Permission is granted to make and distribute verbatim copies of this
|
|
manual provided the copyright notice and this permission notice are
|
|
preserved on all copies.
|
|
|
|
@ignore
|
|
Permission is granted to process this file through TeX and print the
|
|
results, provided the printed document carries a copying permission
|
|
notice identical to this one except for the removal of this paragraph
|
|
(this paragraph not being relevant to the printed manual).
|
|
|
|
@end ignore
|
|
Permission is granted to copy and distribute modified versions of this
|
|
manual under the conditions for verbatim copying, provided also that the
|
|
section entitled ``Copying'' are included exactly as in the original, and
|
|
provided that the entire resulting derived work is distributed under the
|
|
terms of a permission notice identical to this one.
|
|
|
|
Permission is granted to copy and distribute translations of this manual
|
|
into another language, under the above conditions for modified versions,
|
|
except that the section entitled ``Copying'' may be included in a
|
|
translation approved by the author instead of in the original English.
|
|
@end ifinfo
|
|
|
|
@titlepage
|
|
@title Taylor UUCP
|
|
@subtitle Version 1.03
|
|
@author Ian Lance Taylor @file{<ian@@airs.com>}
|
|
|
|
@page
|
|
@vskip 0pt plus 1filll
|
|
Copyright @copyright{} 1992 Free Software Foundation, Inc.
|
|
|
|
Published by Ian Lance Taylor @file{<ian@@airs.com>}.
|
|
|
|
Permission is granted to make and distribute verbatim copies of this
|
|
manual provided the copyright notice and this permission notice are
|
|
preserved on all copies.
|
|
|
|
Permission is granted to copy and distribute modified versions of this
|
|
manual under the conditions for verbatim copying, provided also that the
|
|
section entitled ``Copying'' are included exactly as in the original, and
|
|
provided that the entire resulting derived work is distributed under the
|
|
terms of a permission notice identical to this one.
|
|
|
|
Permission is granted to copy and distribute translations of this manual
|
|
into another language, under the above conditions for modified versions,
|
|
except that the section entitled ``Copying'' may be included in a
|
|
translation approved by the author instead of in the original English.
|
|
@end titlepage
|
|
|
|
@node Top, Copying, (dir), (dir)
|
|
@top Taylor UUCP 1.03
|
|
|
|
This is the documentation for the Taylor UUCP package, version 1.03.
|
|
The programs were written by Ian Lance Taylor. The author can be
|
|
reached at @file{<ian@@airs.com>}, or, equivalently,
|
|
@file{<uunet!airs!ian>}, or @cite{c/o Infinity Development, P.O. Box
|
|
520, Waltham MA, 02254}.
|
|
|
|
There is a mailing list for discussion of the package. To join the
|
|
list, send a message to @file{<taylor-uucp-request@@gnu.ai.mit.edu>}.
|
|
Make sure you include the address you want to receive messages at; do
|
|
not rely on the @code{From:} header. To send a message to the list,
|
|
send it to @file{<taylor-uucp@@gnu.ai.mit.edu>}.
|
|
|
|
@menu
|
|
* Copying:: Taylor UUCP copying conditions
|
|
* Introduction:: Introduction to Taylor UUCP
|
|
* Overall Installation:: Taylor UUCP installation
|
|
* Configuration Files:: Taylor UUCP configuration files
|
|
* Protocols:: UUCP protocol internals
|
|
* Hacking:: Hacking Taylor UUCP
|
|
* Acknowledgements:: Acknowledgements
|
|
|
|
* Index (concepts):: Concept index
|
|
* Index (configuration file):: Index to new configuration files
|
|
|
|
--- The Detailed Node Listing ---
|
|
|
|
Taylor UUCP Overall Installation
|
|
|
|
* Configuration:: Configuring Taylor UUCP
|
|
* Compilation:: Compiling Taylor UUCP
|
|
* Testing:: Testing Taylor UUCP
|
|
* Installation:: Installing Taylor UUCP
|
|
* Usage:: Using Taylor UUCP
|
|
* TCP:: TCP together with Taylor UUCP
|
|
|
|
Taylor UUCP Configuration Files
|
|
|
|
* Configuration File Format:: Configuration file format
|
|
* Configuration Examples:: Examples of configuration files
|
|
* Time Strings:: How to write time strings
|
|
* Chat Scripts:: How to write chat scripts
|
|
* config File:: The main configuration file
|
|
* sys File:: The system configuration file
|
|
* port File:: The port configuration files
|
|
* dial File:: The dialer configuration files
|
|
* Security:: Security issues
|
|
|
|
Examples of Configuration Files
|
|
|
|
* config File Examples:: Examples of the main configuration file
|
|
* Leaf Example:: Call a single remote site
|
|
* Gateway Example:: The gateway for several local systems
|
|
|
|
The Main Configuration File
|
|
|
|
* Miscellaneous (config):: Miscellaneous config file commands
|
|
* Configuration File Names:: Using different configuration files
|
|
* Log File Names:: Using different log files
|
|
* Debugging Levels:: Debugging levels
|
|
|
|
The System Configuration File
|
|
|
|
* Defaults and Alternates:: Using defaults and alternates
|
|
* Naming the System:: Naming the system
|
|
* Calling Out:: Calling out
|
|
* Accepting a Call:: Accepting a call
|
|
* Protocol Selection:: Protocol selection
|
|
* File Transfer Control:: File transfer control
|
|
* Miscellaneous (sys):: Miscellaneous sys file commands
|
|
* Default sys File Values:: Default values
|
|
|
|
Calling Out
|
|
|
|
* When to Call:: When to call
|
|
* Placing the Call:: Placing the call
|
|
* Logging In:: Logging in
|
|
|
|
UUCP protocol internals
|
|
|
|
* Grades:: UUCP grades
|
|
* Lock Files:: UUCP lock file format
|
|
* UUCP Protocol:: The common UUCP protocol
|
|
* g Protocol:: The UUCP @samp{g} protocol
|
|
* f Protocol:: The UUCP @samp{f} protocol
|
|
* t Protocol:: The UUCP @samp{t} protocol
|
|
* e Protocol:: The UUCP @samp{e} protocol
|
|
* x Protocol:: The UUCP @samp{x} protocol
|
|
* d Protocol:: The UUCP @samp{d} protocol
|
|
* Capital G Protocol:: The UUCP @samp{G} protocol
|
|
* Documentation References:: Documentation references
|
|
|
|
The Common UUCP Protocol
|
|
|
|
* Initial Handshake:: Initial handshake
|
|
* File Requests:: File requests
|
|
* Final Handshake:: Final handshake
|
|
|
|
File Requests
|
|
|
|
* S Request:: S request
|
|
* R Request:: R request
|
|
* X Request:: X request
|
|
* H Request:: H request
|
|
|
|
Hacking Taylor UUCP
|
|
|
|
* System Dependence:: System Dependence
|
|
* Naming Conventions:: Naming Conventions
|
|
* Patches:: Patches
|
|
@end menu
|
|
|
|
@node Copying, Introduction, Top, Top
|
|
@unnumbered Taylor UUCP Copying Conditions
|
|
|
|
This package is covered by the GNU Public License. See the file
|
|
@file{COPYING} for details. If you would like to do something with this
|
|
package that you feel is reasonable but you feel is prohibited by the
|
|
license, contact me to see if we can work it out.
|
|
|
|
Here is some propaganda from the Free Software Foundation. If you find
|
|
this stuff offensive or annoying, remember that you probably did not
|
|
spend any money to get this code. I did not write this code to make
|
|
life easier for developers of UUCP packages, I wrote it to help end
|
|
users, and I believe that these are the most appropriate conditions for
|
|
distribution.
|
|
|
|
All the programs, scripts and documents relating to Taylor UUCP are
|
|
@dfn{free}; this means that everyone is free to use them and free to
|
|
redistribute them on a free basis. The Taylor UUCP-related programs are
|
|
not in the public domain; they are copyrighted and there are
|
|
restrictions on their distribution, but these restrictions are designed
|
|
to permit everything that a good cooperating citizen would want to do.
|
|
What is not allowed is to try to prevent others from further sharing any
|
|
version of these programs that they might get from you.
|
|
|
|
Specifically, we want to make sure that you have the right to give away
|
|
copies of the programs that relate to Taylor UUCP, that you receive
|
|
source code or else can get it if you want it, that you can change these
|
|
programs or use pieces of them in new free programs, and that you know
|
|
you can do these things.
|
|
|
|
To make sure that everyone has such rights, we have to forbid you to
|
|
deprive anyone else of these rights. For example, if you distribute
|
|
copies of the Taylor UUCP related programs, you must give the recipients
|
|
all the rights that you have. You must make sure that they, too,
|
|
receive or can get the source code. And you must tell them their
|
|
rights.
|
|
|
|
Also, for our own protection, we must make certain that everyone finds
|
|
out that there is no warranty for the programs that relate to Taylor
|
|
UUCP. If these programs are modified by someone else and passed on, we
|
|
want their recipients to know that what they have is not what we
|
|
distributed, so that any problems introduced by others will not reflect
|
|
on our reputation.
|
|
|
|
The precise conditions of the licenses for the programs currently being
|
|
distributed that relate to Taylor UUCP are found in the General Public
|
|
Licenses that accompany them.
|
|
|
|
@node Introduction, Overall Installation, Copying, Top
|
|
@chapter Introduction to Taylor UUCP
|
|
|
|
General introductions to UUCP are available, and perhaps one day I will
|
|
write one. In the meantime, here is a very brief one that concentrates
|
|
on the programs provided by Taylor UUCP.
|
|
|
|
Taylor UUCP is a complete UUCP package. It is covered by the GNU Public
|
|
License, which means that the source code is always available. It is
|
|
composed of several programs, the names of which were established by
|
|
earlier UUCP packages.
|
|
|
|
@table @code
|
|
|
|
@item uucp
|
|
|
|
The @code{uucp} program is used to copy file between systems. It is
|
|
similar to the standard Unix @code{cp} program, except that you can
|
|
refer to a file on a remote system by using @samp{system!} before the
|
|
file name. For example, to copy the file @file{notes.txt} to the system
|
|
@samp{airs}, you would say @samp{uucp notes.txt airs!~/notes.txt}. In
|
|
this example @samp{~} is used to name the UUCP public directory on
|
|
@samp{airs}.
|
|
|
|
@item uux
|
|
|
|
The @code{uux} program is used to request a program to be executed on a
|
|
remote system. This is how mail and news are transferred over UUCP. As
|
|
with @code{uucp}, programs and files on remote systems may be named by
|
|
using @samp{system!}. For example, to run the @code{rnews} program on
|
|
@samp{airs} passing it standard input, you would say @samp{uux -
|
|
airs!rnews}. The @samp{-} means to read standard input and set things
|
|
up so that when @code{rnews} runs on @samp{airs} it will receive the
|
|
same standard input.
|
|
|
|
@end table
|
|
|
|
Neither @code{uucp} nor @code{uux} actually do any work immediately.
|
|
Instead, they queue up requests for later processing. They then start a
|
|
daemon process which processes the requests and calls up the appropriate
|
|
systems. Usually the daemon will also be started regularly to check if
|
|
there is any work to be done and to do it. The advantage of this system
|
|
is that it all happens automatically. You don't have to sit around
|
|
waiting for the files to be transferred. The disadvantage is that if
|
|
anything goes wrong it might be a while before anybody notices.
|
|
|
|
@table @code
|
|
|
|
@item uustat
|
|
|
|
The @code{uustat} program does several things. By default it will
|
|
simply list all the jobs you have queued with @code{uucp} or @code{uux}
|
|
that have not yet been processed. You can use @code{uustat} to remove
|
|
any of your jobs from the queue. You can also it use it to show the
|
|
status of the UUCP system in various ways, such as showing the
|
|
connection status of all systems your system knows about.
|
|
|
|
@item uuname
|
|
|
|
The @code{uuname} program by default lists all the remote systems your
|
|
system knows about. You can also use it to get the name of your local
|
|
system. It is mostly useful for shell scripts.
|
|
|
|
@item uulog
|
|
|
|
The @code{uulog} program can be used to display entries in the UUCP log
|
|
file. It can select the entries for a particular system or a particular
|
|
user. You can use it to see what has happened to your queued jobs in
|
|
the past.
|
|
|
|
@end table
|
|
|
|
These five programs just described, @code{uucp}, @code{uux},
|
|
@code{uustat}, @code{uuname}, and @code{uulog}, are the user programs
|
|
provided by Taylor UUCP. The first two add requests to the work queue,
|
|
the third examines the work queue, the fourth examines the configuration
|
|
files, and the last examines the log files. The real work is actually
|
|
done by two daemon processes, which are normally run automatically
|
|
rather than by a user.
|
|
|
|
@table @code
|
|
|
|
@item uucico
|
|
|
|
The @code{uucico} daemon is the program which actually calls the remote
|
|
system and transfers files and requests. @code{uucico} is normally
|
|
started automatically by @code{uucp} and @code{uux}. Most systems will
|
|
also start it periodically to make sure that all work requests are
|
|
handled. @code{uucico} checks the queue to see what work needs to be
|
|
done, and then calls the appropriate systems. If the call fails,
|
|
perhaps because the phone line is busy, @code{uucico} leaves the
|
|
requests in the queue and goes on to the next system to call. It is
|
|
also possible to force @code{uucico} to call a remote system even if
|
|
there is no work to be done for it, so that it can pick up any work that
|
|
may be queued up remotely.
|
|
|
|
@item uuxqt
|
|
|
|
The @code{uuxqt} daemon processes execution requests made by the
|
|
@code{uux} program on remote systems. It also processes requests made
|
|
on the local system which require files from a remote system. It is
|
|
normally started by @code{uucico}.
|
|
|
|
@end table
|
|
|
|
Suppose you, on the system @samp{bantam}, want to copy a file to the
|
|
system @samp{airs}. You would run the @code{uucp} command locally, with
|
|
a command like @samp{uucp notes.txt airs!~/notes.txt}. This would queue
|
|
up a request on @samp{bantam} for @samp{airs}, and would then start the
|
|
@code{uucico} daemon. @code{uucico} would see that there was a request
|
|
for @samp{airs} and attempt to call it. When the call succeeded,
|
|
another copy of @code{uucico} would be started on @samp{airs}. The two
|
|
copies of @code{uucico} would tell each other what they had to do and
|
|
transfer the file from @samp{bantam} to @samp{airs}. When the file
|
|
transfer was complete the @code{uucico} on @samp{airs} would move it
|
|
into the UUCP public directory.
|
|
|
|
UUCP is often used to transfer mail. This is normally done
|
|
automatically by mailer programs. When @samp{bantam} has a mail message
|
|
to send to @samp{ian} at @samp{airs}, it executes @samp{uux - airs!rmail
|
|
ian} and writes the mail message to the @code{uux} process as standard
|
|
input. The @code{uux} program, running on @samp{bantam}, will read the
|
|
standard input and store it and the @code{rmail} request on the work
|
|
queue for @code{airs}. @code{uux} will then start the @code{uucico}
|
|
daemon. The @code{uucico} daemon will call up @samp{airs}, just as in
|
|
the @code{uucp} example, and transfer the work request and the mail
|
|
message itself. The @code{uucico} daemon on @samp{airs} will put the
|
|
files on a local work queue. When the communication session is over,
|
|
the @code{uucico} daemon on @samp{airs} will start the @code{uuxqt}
|
|
daemon. @code{uuxqt} will see the request to run, and will run
|
|
@samp{rmail ian} with the mail message as standard input. The
|
|
@code{rmail} program, which is not part of the UUCP package, is then
|
|
responsible for either putting the message in the right mailbox on
|
|
@samp{airs} or forwarding the message on to another system.
|
|
|
|
Taylor UUCP comes with two other programs that are useful when
|
|
installing and configuring UUCP.
|
|
|
|
@table @code
|
|
|
|
@item uuchk
|
|
|
|
The @code{uuchk} program reads the UUCP configuration files and displays
|
|
a rather lengthy description of what it finds. This is very useful when
|
|
configuring UUCP to make certain that the UUCP package will do what you
|
|
expect it to do.
|
|
|
|
@item tstuu
|
|
|
|
The @code{tstuu} program is a test harness for the UUCP package, which
|
|
will help ensure that it has been configured and compiled correctly. It
|
|
does not test everything, however, and it only runs on Unix systems
|
|
which support Berkeley style pseudo-terminals. It can be useful when
|
|
initially installing Taylor UUCP.
|
|
|
|
@end table
|
|
|
|
@node Overall Installation, Configuration Files, Introduction, Top
|
|
@chapter Taylor UUCP Overall Installation
|
|
|
|
These are the installation instructions for the Taylor UUCP package.
|
|
|
|
@menu
|
|
* Configuration:: Configuring Taylor UUCP
|
|
* Compilation:: Compiling Taylor UUCP
|
|
* Testing:: Testing Taylor UUCP
|
|
* Installation:: Installing Taylor UUCP
|
|
* Usage:: Using Taylor UUCP
|
|
* TCP:: TCP together with Taylor UUCP
|
|
@end menu
|
|
|
|
@node Configuration, Compilation, Overall Installation, Overall Installation
|
|
@section Configuring Taylor UUCP
|
|
|
|
You will have to decide what types of configuration files you want to
|
|
use. This package supports a new sort of configuration file;
|
|
@xref{Configuration files}. It also supports V2 configuration files
|
|
(@file{L.sys}, @file{L-devices}, etc.) and BNU configuration files
|
|
(@file{Systems}, @file{Devices}, etc.). No documentation is provided
|
|
for V2 or BNU configuration files. All types of configuration files can
|
|
be used at once, if you are so inclined. Currently using just V2
|
|
configuration files is not really possible, because there is no way to
|
|
specify a dialer (there are no built in dialers, and the program does
|
|
not know how to read @file{acucap} or @file{modemcap}); however, V2
|
|
configuration files can be used with a new style dialer file
|
|
(@pxref{dial file}), or with a BNU @file{Dialers} file.
|
|
|
|
Use of BNU configuration files has two known bugs. A blank line in the
|
|
middle of an entry in the @file{Permissions} file will not be ignored as
|
|
it should be. Dialer programs are not recognized directly. If you must
|
|
use a dialer program, rather than an entry in @file{Devices}, you must
|
|
use the @code{chat-program} command in a new style dialer file; see
|
|
@ref{dial file}. You will have to invoke the dialer program via a shell
|
|
script, since an exit code of 0 is required to recognize success.
|
|
|
|
If you are installing a new system, or you want to use the new form of
|
|
configuration files, you must write the configuration files.
|
|
|
|
You must also decide what sort of spool directory you want to use. If
|
|
you will only be using these programs, I recommend
|
|
@samp{SPOOLDIR_TAYLOR}; otherwise select the spool directory
|
|
corresponding to your existing UUCP package. The details of the spool
|
|
directory choices are described at somewhat tedious length in
|
|
@file{sys3.unx}.
|
|
|
|
@node Compilation, Testing, Configuration, Overall Installation
|
|
@section Compiling Taylor UUCP
|
|
|
|
@enumerate
|
|
|
|
@item
|
|
Take a look at the top of @file{Makefile.in} and set the appropriate
|
|
values for your system. These control where the program is installed
|
|
and which user on the system owns them (normally they will be owned by a
|
|
special user @code{uucp} rather than a real person; they should probably
|
|
not be owned by @code{root}).
|
|
|
|
@item
|
|
Run the shell script @code{configure}. This script was generated using
|
|
David MacKenzie's @code{autoconf} program. It takes a while to run. It
|
|
will generate a file @file{conf.h}, and copy @file{Makefile.in} to
|
|
@file{Makefile} with substitions (specifically, it will replace all
|
|
words between @kbd{@@} characters in @file{Makefile.in}).
|
|
|
|
You can pass certain arguments to @code{configure} in the environment.
|
|
Because @code{configure} will compile and run little test programs to
|
|
see what is available on your system, you must tell it how to run your
|
|
compiler. It recognizes the following environment variables:
|
|
|
|
@table @samp
|
|
@item CC
|
|
The C compiler. If this is not set, then if @code{configure} can find
|
|
@code{gcc} it will use @samp{gcc -O}, otherwise it will use @samp{cc}.
|
|
@item DEFS
|
|
Flags to pass the C compiler during configuration testing. If this is
|
|
not set, @code{configure} will use the empty string.
|
|
@item CFLAGS
|
|
Flags to pass to the C compiler when compiling the actual code. If this
|
|
is not set, @code{configure} will use @samp{-g}.
|
|
@item LDFLAGS
|
|
Flags to pass to the C compiler when only linking, not compiling. If
|
|
this is not set, @code{configure} will use the empty string.
|
|
@item LIBS
|
|
Libraries to pass to the C compiler. If this is not set,
|
|
@code{configure} will use the empty string.
|
|
@item INSTALL
|
|
The program to run to install UUCP in the binary directory. If
|
|
@code{configure} finds the BSD @code{install} program, it will set this
|
|
to @samp{install -c}; otherwise, it will use @samp{cp}.
|
|
@item INSTALLDATA
|
|
The program to run to install UUCP data files, such as the man pages and
|
|
the info pages. If @code{configure} finds the BSD @code{install}
|
|
program, it will set this to @samp{install -c -m 644}; otherwise, it
|
|
will use @samp{cp}.
|
|
@end table
|
|
|
|
Suppose you want to set the environment variable @samp{CC} to
|
|
@samp{rcc}. If you are using @code{sh} or @code{bash}, invoke
|
|
@code{configure} as @samp{CC=rcc configure}. If you are using
|
|
@code{csh}, do @samp{setenv CC rcc; sh configure}.
|
|
|
|
On some systems you will want to use @samp{LIBS=-lmalloc}. On some you
|
|
will want @samp{LIBS=-lsocket}. On Xenix derived systems do not use
|
|
@samp{LIBS=-lx} because this will bring in the wrong versions of certain
|
|
routines; if you want to use @samp{-lx} you must specify @samp{LIBS=-lc
|
|
-lx}.
|
|
|
|
If @code{configure} fails for some reason, or if you have a very wierd
|
|
system, you may have to configure the package by hand. To do this, copy
|
|
the file @file{conf.h-dist} to @file{conf.h} and edit it for your
|
|
system. Then copy @file{Makefile.in} to @file{Makefile}, find the words
|
|
within @kbd{@@} characters, and set them correctly for your system.
|
|
|
|
@item
|
|
You should verify that @code{configure} worked correctly by checking
|
|
the files @file{conf.h} and @file{Makefile}.
|
|
|
|
@item
|
|
This package uses the @code{alloca} function. The @code{configure}
|
|
script will try to figure out how to make it work on your system. If
|
|
@code{alloca} cannot be found, a simplistic substitute from
|
|
@file{alloca.c} will be used. If you provide your own @file{alloca.o}
|
|
file, it will be used instead; you might, for example, use the one from
|
|
the GNU emacs distribution. If none of this makes any sense to you,
|
|
don't worry; everything will probably work fine.
|
|
|
|
@item
|
|
Edit @file{policy.h} for your local system. The comments should explain
|
|
the various choices. The default values are intended to be reasonable,
|
|
so you may not have to make any changes.
|
|
|
|
@item
|
|
Type @samp{make} to compile everything. You may get warnings about
|
|
implicit function declarations; ignore these (if you think they can be
|
|
eliminated, and you really know what you are talking about, you may tell
|
|
me about them). You may also get warnings about @file{getopt.c} (this
|
|
is from the GNU library and I do not want to change it) and about a
|
|
variable not protected from @code{setjmp} in @file{sys2.c} (the data
|
|
flow ensures that this can never be a problem). The @file{tstuu.c} file
|
|
is not particularly portable; if you can't figure out how to compile it
|
|
you can safely ignore it, as it is only used for testing. If you have
|
|
any other problems there is probably a bug in the @code{configure}
|
|
script.
|
|
|
|
@item
|
|
Please report any problems you have. That is the only way they will get
|
|
fixed for other people. Supply a patch if you can, or just ask for
|
|
help.
|
|
|
|
@end enumerate
|
|
|
|
@node Testing, Installation, Compilation, Overall Installation
|
|
@section Testing Taylor UUCP
|
|
|
|
This package is in use at many sites, and has been running at
|
|
@file{airs.com} for several months. However, it will doubtless fail in
|
|
some situations. Do not rely on this code until you have proven to
|
|
yourself that it will work.
|
|
|
|
You can use the @code{uuchk} program to test your configuration files.
|
|
It will read them and print out a verbose description. This is
|
|
particularly important if you are using V2 or BNU configuration files,
|
|
because there may be bugs in how they are read. This program should not
|
|
be made suid, because it will display passwords if it can read them.
|
|
|
|
If your system supports BSD style pseudo-terminals, and you compiled the
|
|
code to support the new style of configuration files, you should be able
|
|
to use the @code{tstuu} program to test the @code{uucico} daemon. Just
|
|
type @samp{tstuu} with no arguments while logged in to the compilation
|
|
directory (since it runs @file{./uucp}, @file{./uux} and
|
|
@file{./uucico}) to run a lengthy series of tests (it takes over ten
|
|
minutes on a slow VAX). You will need a fair amount of space available
|
|
in @file{/usr/tmp}. You will probably want to put it in the background.
|
|
Do not use @kbd{^Z}, because the program traps on @code{SIGCHLD} and
|
|
winds up dying. It will create a directory @file{/usr/tmp/tstuu} and
|
|
fill it with configuration files, and create spool directories
|
|
@file{/usr/tmp/tstuu/spool1} and @file{/usr/tmp/tstuu/spool2}.
|
|
|
|
The program will finish with an execute file @file{X.@var{something}}
|
|
and a data file @file{D.@var{something}} in @file{/usr/tmp/tstuu/spool1}
|
|
(or, more likely, in subdirectories, depending on the choice of
|
|
@code{SPOOLDIR} in @file{sysdep.h}). The log files
|
|
@file{/usr/tmp/tstuu/Log1} and @file{/usr/tmp/tstuu/Log2} (or, if you
|
|
have selected @code{HAVE_BNU_LOGGING},
|
|
@file{/usr/tmp/tstuu/Log1/uucico/test2} and
|
|
@file{/usr/tmp/tstuu/Log2/uucico/test1}) should look fairly normal. You
|
|
can test @code{uuxqt} by typing @samp{./uuxqt -I
|
|
/usr/tmp/tstuu/Config1}. This should leave a command file
|
|
@file{C.@var{something}} and a data file @file{D.@var{something}} in
|
|
@file{/usr/tmp/tstuu/spool1} or in subdirectories. Again, there should
|
|
be no errors in the log file.
|
|
|
|
Assuming you compiled the code with debugging enabled, the @samp{-x}
|
|
switch can be used to set debugging modes; see the @code{debug} command
|
|
for details (@pxref{Debugging Levels}). Use @samp{-x all} to turn on
|
|
all debugging and generate far more output than you will ever want to
|
|
see. The @code{uucico} daemons will put debugging output in
|
|
@file{/usr/tmp/tstuu/Debug1} and @file{/usr/tmp/tstuu/Debug2}. At this
|
|
point you're pretty much on your own.
|
|
|
|
On some systems you can also use @code{tstuu} to test my @code{uucico}
|
|
against the system @code{uucico}, by using the @samp{-u} switch. For
|
|
this to work, change the definitions of @code{ZUUCICO_CMD} and
|
|
@code{UUCICO_EXECL} at the top of @file{tstuu.c} to something
|
|
appropriate for your system. The definitions in @file{tstuu.c} are what
|
|
I used for Ultrix 4.0, in which @file{/usr/lib/uucp/uucico} is
|
|
particularly obstinate about being run as a child; I was only able to
|
|
run it by creating a login name with no password whose shell was
|
|
@file{/usr/lib/uucp/uucico}. Calling login in this way will leave fake
|
|
entries in @file{wtmp} and @file{utmp}; if you compile @file{tstout.c}
|
|
(in the @file{contrib} directory) as an suid @code{root} program,
|
|
@code{tstuu} will run it to clear those entries out. On most systems,
|
|
such hackery should not be necessary, although on SCO I had to su to
|
|
@code{root} (@code{uucp} might also have worked) before I could run
|
|
@file{/usr/lib/uucp/uucico}.
|
|
|
|
You can test @code{uucp} and @code{uux} (give them the @samp{-r} switch
|
|
to keep them from starting @code{uucico}) to make sure they create the
|
|
right sorts of files. Unfortunately if you don't know what the right
|
|
sorts of files are I'm not going to tell you here.
|
|
|
|
If @code{tstuu} passes, or you can't run it for some reason or other,
|
|
move on to testing with some other system. Set up the configuration
|
|
files (@pxref{Configuration files}), or use an existing configuration.
|
|
Tell @code{uucico} to dial out to the system by using the @samp{-s}
|
|
system switch (e.g. @samp{uucico -s uunet}). The log file should tell
|
|
you what happens.
|
|
|
|
If you compiled the code with debugging enabled, you can use debugging
|
|
mode to get a great deal of information about what sort of data is
|
|
flowing back and forth; the various possibilities are described under
|
|
the @code{debug} command (@pxref{Debugging Levels}). When initially
|
|
setting up a connection @samp{-x chat} is probably the most useful (e.g.
|
|
@samp{uucico -s uunet -x chat}); you may also want to use @samp{-x
|
|
handshake,incoming,outgoing}. You can use @samp{-x} multiple times on
|
|
one command line, or you can give it comma separated arguments as in the
|
|
last example. Use @samp{-x all} to turn on all possible debugging
|
|
information. The debugging information is written to a file, normally
|
|
@file{/usr/spool/uucp/Debug} although the default can be changed in
|
|
@file{policy.h} and the configuration file can override the name with
|
|
the @code{debugfile} command. The debugging file may contain passwords
|
|
and some file contents as they are transmitted over the line, so the
|
|
debugging file is only readable by the @code{uucp} user.
|
|
|
|
You can use the @samp{-f} switch to force @code{uucico} to call out even
|
|
if the last call failed recently; using @samp{-S} when naming a system
|
|
has the same effect. Otherwise the status file (in the @file{.Status}
|
|
subdirectory of the main spool directory, normally
|
|
@file{/usr/spool/uucp}) will prevent too many attempts from occurring in
|
|
rapid succession.
|
|
|
|
Again, let me know about any problems you have and how you got around
|
|
them.
|
|
|
|
@node Installation, Usage, Testing, Overall Installation
|
|
@section Installing Taylor UUCP
|
|
|
|
You can install by suing to @code{root} and typing @samp{make install}.
|
|
Or you can look at what make install does and do it by hand. It tries
|
|
to preserve your old programs, if any. You can retrieve them by typing
|
|
@samp{make uninstall}.
|
|
|
|
@node Usage, TCP, Installation, Overall Installation
|
|
@section Using Taylor UUCP
|
|
|
|
This package does not come with any fancy shell scripts or scheduling
|
|
programs. Maybe someday. If you have another package, you may well
|
|
be able to use the scheduling mechanisms it provides.
|
|
|
|
Otherwise, the program can be used by making crontab entries.
|
|
Whenever you want to call all systems with outstanding work, use
|
|
@example
|
|
uucico -r1
|
|
@end example
|
|
Whenever you want to call a specific system @samp{foo}, use
|
|
@example
|
|
uucico -s foo
|
|
@end example
|
|
If you want to make sure that a system foo gets retried if the
|
|
original call fails, create an empty work file for it. For example,
|
|
if using @code{SPOOLDIR_TAYLOR},
|
|
@example
|
|
touch /usr/spool/uucp/foo/C./C.A0000
|
|
@end example
|
|
If using @code{SPOOLDIR_BNU}, use
|
|
@example
|
|
touch /usr/spool/uucp/foo/C.fooA0000
|
|
@end example
|
|
|
|
I use the following crontab entries locally:
|
|
|
|
@example
|
|
45 * * * * /bin/echo /usr/lib/uucp/uucico -r1 | /bin/su uucpa
|
|
40 4,10,15 * * * touch /usr/spool/uucp/uunet/C./C.A0000
|
|
@end example
|
|
|
|
Every hour, at 45 minutes past, this will check if there is any work to
|
|
be done. Also, at 4:40am, 10:40am and 3:40pm this will create an empty
|
|
work file for @file{uunet}, forcing the next check to call @file{uunet}.
|
|
|
|
You will also want to periodically trim the log files, which by default
|
|
are @file{/usr/spool/uucp/Log} and @file{/usr/spool/uucp/Stats}. The
|
|
@code{savelog} program in the @file{contrib} directory may be of use.
|
|
|
|
@node TCP, , Usage, Overall Installation
|
|
@section TCP together with Taylor UUCP
|
|
|
|
If your system has a Berkeley style socket library, you can compile
|
|
the code to permit making connections over TCP. Specifying that a
|
|
system should be reached via TCP is easy, but nonobvious.
|
|
|
|
If you are using the new style configuration files, see
|
|
@ref{Configuration files}. Basically, you can just add the line
|
|
@samp{port type tcp} to the entry in the system configuration file. By
|
|
default UUCP will get the port number by looking up @samp{uucp} in
|
|
@file{/etc/services}; if @samp{uucp} is not found, port 540 will be
|
|
used. You can set the port number to use with the command @samp{port
|
|
service @var{xxx}}, where @var{xxx} can be either a number or a name to
|
|
look up in @file{/etc/services}. You can specify the address of the
|
|
remote host with @samp{address @var{a.b.c}}; if you don't give an
|
|
address, the remote system name will be used. You should give an
|
|
explicit chat script for the system when you use TCP; the default chat
|
|
script begins with a carriage return, which will not work with some UUCP
|
|
TCP servers.
|
|
|
|
If you are using V2 configuration files, add a line like this to
|
|
@file{L.sys}:
|
|
|
|
@example
|
|
foo Any TCP uucp foo.domain chat-script
|
|
@end example
|
|
|
|
This will make an entry for system foo, to be called at any time, over
|
|
TCP, using port number @samp{uucp} (as found in @file{/etc/services};
|
|
this may be specified as a number), using remote host @file{foo.domain},
|
|
with some chat script.
|
|
|
|
If you are using BNU configuration files, add a line like this to
|
|
Systems:
|
|
|
|
@example
|
|
foo Any TCP - foo.domain chat-script
|
|
@end example
|
|
|
|
and a line like this to Devices:
|
|
|
|
@example
|
|
TCP uucp - -
|
|
@end example
|
|
|
|
You only need one line in Devices regardless of how many systems you
|
|
contact over TCP. This will make an entry for system foo, to be called
|
|
at any time, over TCP, using port number @samp{uucp} (as found in
|
|
@file{/etc/services}; this may be specified as a number), using remote
|
|
host @file{foo.domain}, with some chat script.
|
|
|
|
The @code{uucico} daemon can also be run as a TCP server. This code
|
|
mostly works, but it's not perfect. I don't recommend investigating it
|
|
unless you are willing to tinker a bit. You will not be able to use the
|
|
default port number because @code{uucico} will not be running as
|
|
@code{root} and will therefore not be able to bind a reserved port.
|
|
|
|
Basically, you must define a port, either using the port file
|
|
(@pxref{port file}) if you are using the new configuration method or
|
|
with an entry in Devices if you are using BNU; there is no way to define
|
|
a port using V2. If you are using BNU the port must be named
|
|
@samp{TCP}; a line as shown above will suffice. You can then start
|
|
@code{uucico} as @samp{uucico -p TCP} (after the @samp{-p}, name the
|
|
port; in BNU it must be @samp{TCP}). This will wait for incoming
|
|
connections, and fork off a child for each one. Each connection will be
|
|
prompted with @samp{login:} and @samp{Password:}; the results will be
|
|
checked against the UUCP (not the system) password file
|
|
(@pxref{Configuration File Names}). Of course, you can get a similar
|
|
effect by using the BSD @code{uucpd} program.
|
|
|
|
You can also have @code{inetd} start up @code{uucico} with the @samp{-l}
|
|
switch, which will cause it to prompt with @samp{login:} and
|
|
@samp{Password:} and check the results against the UUCP (not the system)
|
|
password file. This may be used in place of @code{uucpd}.
|
|
|
|
@node Configuration Files, Protocols, Overall Installation, Top
|
|
@chapter Taylor UUCP Configuration Files
|
|
|
|
This chapter describes the configuration files accepted by the Taylor
|
|
UUCP package if compiled with @code{HAVE_TAYLOR_CONFIG} defined in
|
|
@file{conf.h}.
|
|
|
|
The configuration files are normally found in the directory
|
|
@var{newconfigdir}, which is defined by the @file{Makefile} variable
|
|
@file{newconfigdir}; by default @var{newconfigdir} is
|
|
@file{/usr/local/lib/uucp}. However, the main configuration file,
|
|
@file{config}, is the only one which must be in that directory, since it
|
|
may specify a different location for any or all of the other files. You
|
|
may run any of the UUCP programs with a different main configuration
|
|
file by using the @samp{-I} option; this can be useful when testing a
|
|
new configuration. When you use the @samp{-I} option the programs will
|
|
revoke their setuid privileges.
|
|
|
|
@menu
|
|
* Configuration File Format:: Configuration file format
|
|
* Configuration Examples:: Examples of configuration files
|
|
* Time Strings:: How to write time strings
|
|
* Chat Scripts:: How to write chat scripts
|
|
* config File:: The main configuration file
|
|
* sys File:: The system configuration file
|
|
* port File:: The port configuration files
|
|
* dial File:: The dialer configuration files
|
|
* Security:: Security issues
|
|
@end menu
|
|
|
|
@node Configuration File Format, Configuration Examples, Configuration Files, Configuration Files
|
|
@section Configuration File Format
|
|
|
|
All the configuration files follow a simple line-oriented
|
|
@samp{@var{keyword} @var{value}} format. Empty lines are ignored, as
|
|
are leading spaces; unlike BNU, lines with leading spaces are read. The
|
|
first word on each line is a keyword. The rest of the line is
|
|
interpreted according to the keyword. Most keywords are followed by
|
|
numbers, boolean values or simple strings with no embedded spaces.
|
|
|
|
The @kbd{#} character is used for comments. Everything from a @kbd{#}
|
|
to the end of the line is ignored unless the @kbd{#} is preceded by a
|
|
@kbd{\} (backslash); if the @kbd{#} is preceeded by a @kbd{\}, the
|
|
@kbd{\} is removed but the @kbd{#} remains in the line. This can be
|
|
useful for a phone number containing a @kbd{#}. To enter the sequence
|
|
@samp{\#}, you would use @samp{\\#}.
|
|
|
|
The backslash character may be used to continue lines. If the last
|
|
character in a line is a backslash, the backslash is removed and the
|
|
line is continued by the next line. The second line is attached to the
|
|
first with no intervening characters; if you want any whitespace between
|
|
the end of the first line and the start of the second line, you must
|
|
insert it yourself.
|
|
|
|
However, the backslash is not a general quoting character. For example,
|
|
you cannot use it to get an embedded space in a string argument.
|
|
|
|
Everything after the keyword must be on the same line. A @var{boolean}
|
|
may be specified as @kbd{y}, @kbd{Y}, @kbd{t}, or @kbd{T} for true and
|
|
@kbd{n}, @kbd{N}, @kbd{f}, or @kbd{F} for false; any trailing characters
|
|
are ignored, so @code{true}, @code{false}, etc., are also acceptable.
|
|
|
|
@node Configuration Examples, Time Strings, Configuration File Format, Configuration Files
|
|
@section Examples of Configuration Files
|
|
|
|
All the configuration commands are explained in the following sections.
|
|
However, I'll start by giving a few examples of configuration files.
|
|
For a more complete description of any of the commands used here see the
|
|
appropriate section of this chapter.
|
|
|
|
@menu
|
|
* config File Examples:: Examples of the main configuration file
|
|
* Leaf Example:: Call a single remote site
|
|
* Gateway Example:: The gateway for several local systems
|
|
@end menu
|
|
|
|
@node config File Examples, Leaf Example, Configuration Examples, Configuration Examples
|
|
@subsection config File Examples
|
|
@cindex config file examples
|
|
|
|
To start with, here are some examples of uses of the main configuration
|
|
file, @file{config}. For a complete description of the commands that
|
|
are permitted in @file{config}, see @ref{config file}.
|
|
|
|
In many cases you will not need to create a @file{config} file at all.
|
|
The most common reason to create one is to give your machine a special
|
|
UUCP name. Other reasons might be to change the UUCP spool directory or
|
|
to permit any remote system to call in.
|
|
|
|
If you have an internal network of machines, then it is likely that the
|
|
internal name of your UUCP machine is not the name you want to use when
|
|
calling other systems. For example, here at @file{airs.com} our
|
|
mail/news gateway machine is named @file{elmer.airs.com} (it is one of
|
|
several machines all named @file{@var{localname}.airs.com}). If we did
|
|
not provide a @file{config} file, then our UUCP name would be
|
|
@file{elmer}; however, we actually want it to be @file{airs}.
|
|
Therefore, we use the following line in @file{config}:
|
|
|
|
@example
|
|
nodename airs
|
|
@end example
|
|
|
|
@cindex changing spool directory
|
|
@cindex spool directory (changing)
|
|
The UUCP spool directory name is set in @file{policy.h} when the code is
|
|
compiled. You might at some point decide that it is appropriate to move
|
|
the spool directory, perhaps to put it on a different disk partition.
|
|
You might use the following commands in @file{config} to change to
|
|
directories on the partition @file{/uucp}:
|
|
|
|
@example
|
|
spool /uucp/spool
|
|
pubdir /uucp/uucppublic
|
|
logfile /uucp/spool/Log
|
|
debugfile /uucp/spool/Debug
|
|
@end example
|
|
|
|
You would then move the contents of the current spool directory to
|
|
@file{/uucp/spool}. If you do this, make sure that no UUCP processes
|
|
are running while you change @file{config} and move the spool directory.
|
|
|
|
@cindex anonymous UUCP
|
|
Suppose you wanted to permit any system to call in to your system and
|
|
request files. This is generally known as @dfn{anonymous UUCP}, since
|
|
the systems which call in are effectively anonymous. By default,
|
|
unknown systems are not permitted to call in. To permit this you must
|
|
use the @code{unknown} command in @file{config}. The @code{unknown}
|
|
command is followed by any command that may appear in the system file;
|
|
for full details, see @ref{sys file}.
|
|
|
|
I will show two possible anonymous UUCP configurations. The first will
|
|
let any system call in and download files, but will not permit them to
|
|
upload files to your system.
|
|
|
|
@example
|
|
# No files may be transferred to this system
|
|
unknown request no
|
|
# The public directory is /usr/spool/anonymous
|
|
unknown pubdir /usr/spool/anonymous
|
|
# Only files in the public directory may be sent (the default anyhow)
|
|
unknown remote-send ~
|
|
@end example
|
|
|
|
@noindent
|
|
Setting the public directory is convenient for the systems which call
|
|
in. It permits to request a file by prefixing it with @file{~/}. For
|
|
example, assuming your system is known as @samp{server}, then to
|
|
retrieve the file @file{/usr/spool/anonymous/INDEX} a user on a remote
|
|
site could just enter @samp{uucp server!~/INDEX ~}; this would transfer
|
|
@file{INDEX} from @samp{server}'s public directory to the user's local
|
|
public directory. Note that when using @samp{csh} or @samp{bash} the
|
|
@kbd{!} and the second @kbd{~} must be quoted.
|
|
|
|
The next example will permit remote systems to upload files to a special
|
|
directory @file{/usr/spool/anonymous/upload}. Permitting a remote
|
|
system to upload files permits it to send work requests as well; this
|
|
example is careful to prohibit commands from unknown systems.
|
|
|
|
@example
|
|
# No commands may be executed (the list of permitted commands is empty)
|
|
unknown commands
|
|
# The public directory is /usr/spool/anonymous
|
|
unknown pubdir /usr/spool/anonymous
|
|
# Only files in the public directory may be sent; users may not download
|
|
# files from the upload directory
|
|
unknown remote-send ~ !~/upload
|
|
# May only upload files into /usr/spool/anonymous/upload
|
|
unknown remote-receive ~/upload
|
|
@end example
|
|
|
|
@node Leaf Example, Gateway Example, config File Examples, Configuration Examples
|
|
@subsection Leaf Example
|
|
|
|
@cindex leaf site
|
|
@cindex sys file example (leaf)
|
|
A relatively common simple case is a @dfn{leaf site}, a system which
|
|
only calls or is called by a single remote site. Here is a typical
|
|
@file{sys} file that might be used in such a case. For full details on
|
|
what commands can appear in the @file{sys} file, see @ref{sys file}.
|
|
|
|
This is the @file{sys} file that is used at @file{airs.com}. We use a
|
|
single modem to dial out to @file{uunet}. This example shows how you
|
|
can specify the port and dialer information directly in the @file{sys}
|
|
file for simple cases. It also shows the use of the following:
|
|
|
|
@table @code
|
|
|
|
@item call-login
|
|
Using @code{call-login} and @code{call-password} allows the default
|
|
login chat script to be used. In this case, the login name is specified
|
|
in the call-out login file (@pxref{Configuration File Names}).
|
|
|
|
@item call-timegrade
|
|
@file{uunet} is requested to not send us news during the daytime.
|
|
|
|
@item chat-fail
|
|
If the modem returns @samp{BUSY} or @samp{NO CARRIER} the call is
|
|
immediately aborted.
|
|
|
|
@item protocol-parameter
|
|
Since @file{uunet} tends to be slow, the default timeout has been
|
|
increased.
|
|
|
|
@end table
|
|
|
|
This @file{sys} file relies on certain defaults. It will allow
|
|
@file{uunet} to queue up @samp{rmail} and @samp{rnews} commands. It
|
|
will allow users to request files from @file{uunet} into the UUCP public
|
|
directory. It will also @file{uunet} to request files from the UUCP
|
|
public directory; in fact @file{uunet} never requests files, but for
|
|
additional security we could add the line @samp{request false}.
|
|
|
|
@example
|
|
# The following information is for uunet
|
|
system uunet
|
|
|
|
# The login name and password are kept in the callout password file
|
|
call-login *
|
|
call-password *
|
|
|
|
# We can send anything at any time.
|
|
time any
|
|
|
|
# During the day we only accept grade 'Z' or above; at other times
|
|
# (not mentioned here) we accept all grades. uunet queues up news
|
|
# at grade 'd', which is lower than 'Z'.
|
|
call-timegrade Z Wk0755-2305,Su1655-2305
|
|
|
|
# The phone number.
|
|
phone 7389449
|
|
|
|
# uunet tends to be slow, so we increase the timeout
|
|
chat-timeout 120
|
|
|
|
# We are using a preconfigured Telebit 2500.
|
|
port type modem
|
|
port device /dev/ttyd0
|
|
port baud 19200
|
|
port carrier true
|
|
port dialer chat "" ATZ\r\d\c OK ATDT\D CONNECT
|
|
port dialer chat-fail BUSY
|
|
port dialer chat-fail NO\sCARRIER
|
|
port dialer complete \d\d+++\d\dATH\r\c
|
|
port dialer abort \d\d+++\d\dATH\r\c
|
|
|
|
# Increase the timeout and the number of retries.
|
|
protocol-parameter g timeout 20
|
|
protocol-parameter g retries 10
|
|
@end example
|
|
|
|
@node Gateway Example, , Leaf Example, Configuration Examples
|
|
@subsection Gateway Example
|
|
|
|
@cindex gateway
|
|
@cindex sys file example (gateway)
|
|
Many organizations have several local machines which are connected by
|
|
UUCP, and a single machine which connects to the outside world. This
|
|
single machine is often referred to as a @dfn{gateway} machine.
|
|
|
|
For this example I will assume a fairly simple case. It should still
|
|
provide a good general example. There are three machines, @file{elmer},
|
|
@file{comton} and @file{bugs}. @file{elmer} is the gateway machine for
|
|
which I will show the configuration file. @file{elmer} calls out to
|
|
@file{uupsi}. As an additional complication, @file{uupsi} knows
|
|
@file{elmer} as @file{airs}; this will show how a machine can have one
|
|
name on an internal network but a different name to the external world.
|
|
@file{elmer} has two modems. It also has an TCP/IP connection to
|
|
@file{uupsi}, but since that is supposed to be reserved for interactive
|
|
work (it is, perhaps, only a 9600 baud SLIP line) it will only use it if
|
|
the modems are not available.
|
|
|
|
A network this small would normally use a single @file{sys} file.
|
|
However, for pedagogical purposes I will show two separate @file{sys}
|
|
files, one for the local systems and one for @file{uupsi}. This is done
|
|
with the @code{sysfile} command in the @file{config} file. Here is the
|
|
@file{config} file.
|
|
|
|
@example
|
|
# This is config
|
|
# The local sys file
|
|
sysfile /usr/local/lib/uucp/sys.local
|
|
# The remote sys file
|
|
sysfile /usr/local/lib/uucp/sys.remote
|
|
@end example
|
|
|
|
Using the defaults feature of the @file{sys} file can greatly simplify
|
|
the listing of local systems. Here is @file{sys.local}. Note that this
|
|
assumes that the local systems are trusted; they are permited to request
|
|
any world readable file and to write files into any world writable
|
|
directory.
|
|
|
|
@example
|
|
# This is sys.local
|
|
# Get the login name and password to use from the call-out file
|
|
call-login *
|
|
call-password *
|
|
|
|
# The systems must use a particular login
|
|
called-login Ulocal
|
|
|
|
# Permit sending any world readable file
|
|
local-send /
|
|
remote-send /
|
|
|
|
# Permit requesting into any world writable directory
|
|
local-receive /
|
|
remote-receive /
|
|
|
|
# Call at any time
|
|
time any
|
|
|
|
# Use port1, then port2
|
|
port port1
|
|
|
|
alternate
|
|
|
|
port port2
|
|
|
|
# Now define the systems themselves. Because of all the defaults we
|
|
# used, there is very little to specify for the systems themselves.
|
|
|
|
system comton
|
|
phone 5551212
|
|
|
|
system bugs
|
|
phone 5552424
|
|
@end example
|
|
|
|
The @file{sys.remote} file describes the @file{uupsi} connection. The
|
|
@code{myname} command is used to change the UUCP name to @file{airs}
|
|
when talking to @file{uupsi}.
|
|
|
|
@example
|
|
# This is sys.remote
|
|
# Define uupsi
|
|
system uupsi
|
|
|
|
# The login name and password are in the call-out file
|
|
call-login *
|
|
call-password *
|
|
|
|
# We can call out at any time
|
|
time any
|
|
|
|
# uupsi uses a special login name
|
|
called-login Uuupsi
|
|
|
|
# uuspi thinks of us as `airs'
|
|
myname airs
|
|
|
|
# The phone number
|
|
phone 5554848
|
|
|
|
# We use port2 first, then port1, then TCP
|
|
|
|
port port2
|
|
|
|
alternate
|
|
|
|
port port1
|
|
|
|
alternate
|
|
|
|
# We don't bother to make a special entry in the port file for TCP, we
|
|
# just describe the entire port right here. We use a special chat
|
|
# script over TCP because the usual one confuses some TCP servers.
|
|
port type TCP
|
|
address uu.psi.com
|
|
chat ogin: \L word: \P
|
|
@end example
|
|
|
|
The ports are defined in the file @file{port} (@pxref{port file}). For
|
|
this example they are both connected to the same type of 2400 baud
|
|
Hayes-compatible modem.
|
|
|
|
@example
|
|
# This is port
|
|
|
|
port port1
|
|
type modem
|
|
device /dev/ttyd0
|
|
dialer hayes
|
|
speed 2400
|
|
|
|
port port2
|
|
type modem
|
|
device /dev/ttyd1
|
|
dialer hayes
|
|
speed 2400
|
|
@end example
|
|
|
|
Dialers are described in the @file{dial} file (@pxref{dial file}).
|
|
|
|
@example
|
|
# This is dial
|
|
|
|
dialer hayes
|
|
|
|
# The chat script used to dial the phone. \D is the phone number.
|
|
chat "" ATZ\r\d\c OK ATDT\D CONNECT
|
|
|
|
# If we get BUSY or NO CARRIER we abort the dial immediately
|
|
chat-fail BUSY
|
|
chat-fail NO\sCARRIER
|
|
|
|
# When the call is over we make sure we hangup the modem.
|
|
complete \d\d+++\d\dATH\r\c
|
|
abort \d\d+++\d\dATH\r\c
|
|
@end example
|
|
|
|
@node Time Strings, Chat Scripts, Configuration Examples, Configuration Files
|
|
@section Time Strings
|
|
@cindex time strings
|
|
|
|
Several commands use time strings to specify a range of times. This
|
|
section describes how to write time strings.
|
|
|
|
A time string may be a list of simple time strings separated with a
|
|
vertical bar @kbd{|} or a command @kbd{,}.
|
|
|
|
Each simple time string must begin with @samp{Su}, @samp{Mo}, @samp{Tu},
|
|
@samp{We}, @samp{Th}, @samp{Fr}, or @samp{Sa}, or @samp{Wk} for any
|
|
weekday, or @samp{Any} for any day.
|
|
|
|
Following the day may be a range of hours separated with a hyphen using
|
|
24 hour time. The range of hours may cross 0; for example
|
|
@samp{2300-0700} means any time except 7 AM to 11 PM. If no time is
|
|
given, calls may be made at any time on the specified day(s).
|
|
|
|
The time string may also consist of the single word @samp{Never}, which
|
|
does not match any time, or a single word with a name defined in a
|
|
previous @code{timetable} command (@pxref{Miscellaneous (sys)}).
|
|
|
|
Here are a few sample time strings with an explanation of what they
|
|
mean.
|
|
|
|
@table @samp
|
|
|
|
@item Wk2305-0855,Sa,Su2305-1655
|
|
|
|
This means weekdays before 8:55 AM or after 11:05 PM, any time Saturday,
|
|
or Sunday before 4:55 PM or after 11:05 PM. These are approximately the
|
|
times during which night rates apply to phone calls in the U.S.A. Note
|
|
that this time string uses, for example, @samp{2305} rather than
|
|
@samp{2300}; this will ensure a cheap rate phone call even if the
|
|
computer clock is running up to five minutes ahead of the real time.
|
|
|
|
@item Wk0905-2255,Su1705-2255
|
|
|
|
This means weekdays from 9:05 AM to 10:55 PM, or Sunday from 5:05 PM to
|
|
10:55 PM. This is approximately the opposite of the previous example.
|
|
|
|
@item Any
|
|
|
|
Since no time is specified, this means any time on any day.
|
|
|
|
@end table
|
|
|
|
@node Chat Scripts, config File, Time Strings, Configuration Files
|
|
@section Chat Scripts
|
|
@cindex chat scripts
|
|
|
|
Chat scripts are used in several different places, such as dialing out
|
|
on modems or logging in to remote systems. Chat scripts are made up of
|
|
pairs of strings. The program waits until it sees the first string,
|
|
known as the @dfn{expect} string, and then sends out the second string,
|
|
the @dfn{send} string.
|
|
|
|
Each chat script is defined using a set of commands. These commands
|
|
always end in a string beginning with @code{chat}, but may start with
|
|
different strings. For example, in the @file{sys} file there is one set
|
|
of commands beginning with @code{chat} and another set beginning with
|
|
@code{called-chat}. The prefixes are only used to disambiguate
|
|
different types of chat scripts, and this section ignores the prefixes
|
|
when describing the commands.
|
|
|
|
@table @code
|
|
|
|
@item chat @var{strings}
|
|
@findex chat
|
|
|
|
Specify a chat script. The arguments to the @code{chat} command are
|
|
pairs of strings separated by whitespace. The first string of each pair
|
|
is an expect string, the second is a send string. The program will wait
|
|
for the expect string to appear; when it does, the program will send the
|
|
send string. If the expect string does not appear within a certain
|
|
number of seconds (as set by the @code{chat-timeout} command) the chat
|
|
script fails and, typically, the call is aborted. If the final expect
|
|
string is seen (and the optional final send string has been sent), the
|
|
chat script is successful.
|
|
|
|
An expect string may contain additional subsend and subexpect strings,
|
|
separated by hyphens. If the expect string is not seen, the subsend
|
|
string is sent and the chat script continues by waiting for the
|
|
subexpect string. This means that a hyphen may not appear in an expect
|
|
string; use @samp{\055} instead.
|
|
|
|
An expect string may simply be @samp{""}, meaning to skip the expect
|
|
phase. Otherwise, the following escape characters may appear in expect
|
|
strings:
|
|
|
|
@table @samp
|
|
@item \b
|
|
a backspace character
|
|
@item \n
|
|
a newline or line feed character
|
|
@item \N
|
|
a null character (for BNU compatibility)
|
|
@item \r
|
|
a carriage return character
|
|
@item \s
|
|
a space character
|
|
@item \t
|
|
a tab character
|
|
@item \\
|
|
a backslash character
|
|
@item \@var{ddd}
|
|
character @var{ddd}, where @var{ddd} are up to three octal digits
|
|
@item \x@var{ddd}
|
|
character @var{ddd}, where @var{ddd} are hexadecimal digits.
|
|
@end table
|
|
|
|
As in C, there may be up to three octal digits following a backslash,
|
|
but the hexadecimal escape sequence continues as far as possible. To
|
|
follow a hexadecimal escape sequence with a hex digit, interpose a send
|
|
string of @samp{""}.
|
|
|
|
A send string may also simply be @samp{""} to skip the send phase.
|
|
Otherwise, all of the escape characters legal for expect strings may be
|
|
used, and the following escape characters are also permitted:
|
|
|
|
@table @samp
|
|
@item EOT
|
|
send an end of transmission character (@kbd{^D})
|
|
@item BREAK
|
|
send a break character (may not work on all systems)
|
|
@item \c
|
|
suppress trailing carriage return at end of send string
|
|
@item \d
|
|
delay sending for 1 second
|
|
@item \e
|
|
disable echo checking
|
|
@item \E
|
|
enable echo checking (wait for echo before continuing)
|
|
@item \K
|
|
same as @kbd{BREAK} (for BNU compatibility)
|
|
@item \p
|
|
pause sending for a fraction of a second
|
|
@end table
|
|
|
|
Some specific types of chat scripts also define additional escape
|
|
sequences that may appear in the send string. For example, the login
|
|
chat script defines @samp{\L} and @samp{\P} to send the login name and
|
|
password, respectively.
|
|
|
|
A carriage return will be sent at the end of each send string, unless
|
|
the @kbd{\c} escape sequence appears in the string. Note that some UUCP
|
|
packages use @kbd{\b} for break, but here it means backspace.
|
|
|
|
Echo checking means that after writing each character the program will
|
|
wait until the character is echoed. Echo checking must be turned on
|
|
separately for each send string for which it is desired; it will be
|
|
turned on for characters following @kbd{\E} and turned off for characters
|
|
following @kbd{\e}.
|
|
|
|
@item chat-timeout @var{number}
|
|
@findex chat-timeout
|
|
|
|
The number of seconds to wait for an expect string in the chat script
|
|
before timing out and sending the next subsend or failing the chat
|
|
script entirely. The default value is 10 for a login chat or 60 for
|
|
any other type of chat.
|
|
|
|
@item chat-fail @var{string}
|
|
@findex chat-fail
|
|
|
|
If the @var{string} is seen at any time during a chat script, the chat
|
|
script is aborted. The string may not contain any whitespace
|
|
characters; escape sequences must be used for them. Multiple
|
|
@code{chat-fail} commands may appear in a single chat script. The
|
|
default is to have none.
|
|
|
|
This permits a chat script to be quickly aborted if an error string is
|
|
seen. For example, a script used to dial out on a modem might use the
|
|
command @samp{chat-fail BUSY} to stop the chat script immediately if the
|
|
string @samp{BUSY} was seen.
|
|
|
|
@item chat-seven-bit @var{boolean}
|
|
@findex chat-seven-bit
|
|
|
|
If the argument is true, all incoming characters are stripped to seven
|
|
bits when being compared to the expect string. Otherwise all eight bits
|
|
are used in the comparison. The default is true because some Unix
|
|
systems generate parity bits during the login prompt which must be
|
|
ignored while running a chat script. This has no effect on any
|
|
@code{chat-program}, which must ignore parity by itself if necessary.
|
|
|
|
@item chat-program @var{strings}
|
|
@findex chat-program in sys file
|
|
|
|
Specify a program to run before executing the chat script. This program
|
|
could run its own version of a chat script, or it could do whatever it
|
|
wants. If both @code{chat-program} and @code{chat} are specified, the
|
|
program is executed first followed by the chat script.
|
|
|
|
The first argument to the @code{chat-program} command is the program
|
|
name to run. The remaining arguments are passed to the program. The
|
|
following escape sequences are recognized in the arguments:
|
|
|
|
@table @kbd
|
|
@item \Y
|
|
port device name
|
|
@item \S
|
|
port speed
|
|
@item \\
|
|
backslash
|
|
@end table
|
|
|
|
Some specific uses of @code{chat-program} define additional escape
|
|
sequences.
|
|
|
|
Arguments other than escape sequences are passed exactly as they appear
|
|
in the configuration file, except that sequences of whitespace are
|
|
compressed to a single space character; this exception may be removed in
|
|
the future.
|
|
|
|
If the @code{chat-program} command is not used, no program is run.
|
|
|
|
On Unix, the standard input and standard output of the program will be
|
|
attached to the port in use. Anything the program writes to standard
|
|
error will be written to the UUCP log file. No other file descriptors
|
|
will be open. If the program does not exit with a status of 0, it will
|
|
be assumed to have failed; this means that the dialing programs used by
|
|
some versions of BNU may not be used directly, although of course a
|
|
shell script could be used as an interface.
|
|
|
|
The program will be run as the @code{uucp} user, and the environment
|
|
will be that of the process that started @code{uucico}, so care must be
|
|
taken to maintain security.
|
|
|
|
No search path is used to find the program; a full path name must be
|
|
given. If the program is an executable shell script, it will be passed
|
|
to @file{/bin/sh} even on systems which are unable to execute shell
|
|
scripts. It is also easy to invoke @file{/bin/sh} directly.
|
|
|
|
@end table
|
|
|
|
Here is a simple example of a chat script that might be used to reset a
|
|
Hayes compatible modem.
|
|
|
|
@example
|
|
chat "" ATZ OK-ATZ-OK
|
|
@end example
|
|
|
|
The first expect string is @samp{""}, so it is ignored. The chat script
|
|
then sends @samp{ATZ}. If the modem responds with @samp{OK}, the chat
|
|
script finishes. If 60 seconds (the default timeout) pass before seeing
|
|
@samp{OK}, the chat script sends another @samp{ATZ}. If it then sees
|
|
@samp{OK}, the chat script succeeds. Otherwise, the chat script fails.
|
|
|
|
For a more complex chat script example, see @ref{Logging In}.
|
|
|
|
@node config File, sys File, Chat Scripts, Configuration Files
|
|
@section The Main Configuration File
|
|
@cindex config file
|
|
@cindex main configuration file
|
|
@cindex configuration file (config)
|
|
|
|
The main configuration file is named @file{config}.
|
|
|
|
Since all the values that may be specified in the main configuration
|
|
file also have defaults, there need not be a main configuration file at
|
|
all.
|
|
|
|
@menu
|
|
* Miscellaneous (config):: Miscellaneous config file commands
|
|
* Configuration File Names:: Using different configuration files
|
|
* Log File Names:: Using different log files
|
|
* Debugging Levels:: Debugging levels
|
|
@end menu
|
|
|
|
@node Miscellaneous (config), Configuration File Names, config File, config File
|
|
@subsection Miscellaneous config File Commands
|
|
|
|
@table @code
|
|
|
|
@item nodename @var{string}
|
|
@findex nodename
|
|
@itemx hostname @var{string}
|
|
@findex hostname
|
|
@itemx uuname @var{string}
|
|
@findex uuname
|
|
@cindex UUCP system name
|
|
@cindex system name
|
|
|
|
These keywords are equivalent. They specify the UUCP name of the
|
|
local host. If there is no configuration file, an appropriate
|
|
function will be used to get the host name, if possible.
|
|
|
|
@item spool @var{string}
|
|
@findex spool
|
|
@cindex spool directory
|
|
@cindex /usr/spool/uucp
|
|
|
|
Specify the spool directory. The default is from @file{policy.h}.
|
|
Command files, work files, temporary files, etc., are stored in this
|
|
directory and in subdirectories of it.
|
|
|
|
@item pubdir @var{string}
|
|
@findex pubdir in config file
|
|
@cindex public directory
|
|
@cindex uucppublic
|
|
@cindex /usr/spool/uucppublic
|
|
|
|
Specify the public directory. The default is from @file{policy.h}. On
|
|
Unix, when a file is named using a leading @kbd{~/}, it is taken from or
|
|
to the public directory. Each system may use a separate public
|
|
directory by using the @code{pubdir} command in the system configuration
|
|
file; see @ref{Miscellaneous (sys)}.
|
|
|
|
@item unknown @var{string} @dots{}
|
|
@findex unknown
|
|
@cindex unknown systems
|
|
|
|
The @var{string} and subsequent arguments are treated as though they
|
|
appeared in the system file (@pxref{sys file}). They are used to apply
|
|
to any unknown systems that may call in, probably to set file transfer
|
|
permissions and the like. If the @code{unknown} command is not used,
|
|
unknown systems are not permitted to call in.
|
|
|
|
@item max-uuxqts @var{number}
|
|
@findex max-uuxqts
|
|
|
|
Specify the maximum number of @code{uuxqt} processes which may run at
|
|
the same time. Having several @code{uuxqt} processes running at once
|
|
can significantly slow down a system, but since @code{uuxqt} is
|
|
automatically started by @code{uucico}, it can happen quite easily. The
|
|
default for @code{max-uuxqts} is 0, which means that there is no limit.
|
|
If BNU configuration files are being read and the code was compiled
|
|
without @code{HAVE_TAYLOR_CONFIG}, then if the file @file{Maxuuxqts} in
|
|
the configuration directory contains a readable number it will be used as
|
|
the value for @code{max-uuxqts}.
|
|
|
|
@item v2-files @var{boolean}
|
|
@findex v2-files
|
|
|
|
If the code was compiled to be able to read V2 configuration files, a
|
|
false argument to this command will prevent them from being read.
|
|
This can be useful while testing. The default is true.
|
|
|
|
@item bnu-files @var{boolean}
|
|
@findex bnu-files
|
|
|
|
If the code was compiled to be able to read BNU configuration files, a
|
|
false argument to this command will prevent them from being read.
|
|
This can be useful while testing. The default is true.
|
|
|
|
@end table
|
|
|
|
@node Configuration File Names, Log File Names, Miscellaneous (config), config File
|
|
@subsection Configuration File Names
|
|
|
|
@table @code
|
|
|
|
@item sysfile @var{strings}
|
|
@findex sysfile
|
|
|
|
Specify the system file(s). The default is the file @file{sys} in the
|
|
directory @var{newconfigdir}. These files hold information about other
|
|
systems with which this system communicates; see @ref{sys file}.
|
|
Multiple system files may be given on the line, and the @code{sysfile}
|
|
command may be repeated; each system file has its own set of defaults.
|
|
|
|
@item portfile @var{strings}
|
|
@findex portfile
|
|
|
|
Specify the port file(s). The default is the file @file{port} in the
|
|
directory @var{newconfigdir}. These files describe ports which are used
|
|
to call other systems and accept calls from other systems; see @ref{port
|
|
file}. No port files need be named at all. Multiple port files may be
|
|
given on the line, and the @code{portfile} command may be repeated.
|
|
|
|
@item dialfile @var{strings}
|
|
@findex dialfile
|
|
|
|
Specify the dial file(s). The default is the file @file{dial} in the
|
|
directory @var{newconfigdir}. These files describe dialing devices
|
|
(modems); @xref{dial file}. No dial files need be named at all.
|
|
Multiple dial files may be given on the line, and the @code{dialfile}
|
|
command may be repeated.
|
|
|
|
@item dialcodefile @var{strings}
|
|
@findex dialcodefile
|
|
@cindex configuration file (dialcode)
|
|
@cindex dialcode file
|
|
@cindex dialcode configuration file
|
|
|
|
Specify the dialcode file(s). The default is the file @file{dialcode}
|
|
in the directory @var{newconfigdir}. These files specify dialcodes that
|
|
may be used when sending phone numbers to a modem. This permits using
|
|
the same set of phone numbers in different area-codes or with different
|
|
phone systems, by using dialcodes to specify the calling sequence. When
|
|
a phone number goes through dialcode translation, the leading alphabetic
|
|
characters are stripped off. The dialcode files are read line by line,
|
|
just like any other configuration file, and when a line is found whose
|
|
first word is the same as the leading characters from the phone number,
|
|
the second word on the line (which would normally consist of numbers)
|
|
replaces the dialcode in the phone number. No dialcode file need be
|
|
used. Multiple dialcode files may be specified on the line, and the
|
|
@code{dialcodefile} command may be repeated; all the dialcode files will
|
|
be read in turn until a dialcode is located.
|
|
|
|
@item callfile @var{strings}
|
|
@findex callfile
|
|
@cindex call out file
|
|
@cindex call configuration file
|
|
@cindex call out login name
|
|
@cindex call out password
|
|
@cindex configuration file (call)
|
|
|
|
Specify the call out login name and password file(s). The default is
|
|
the file @file{call} in the directory @var{newconfigdir}. If the call
|
|
out login name or password for a system are given as @kbd{*}
|
|
(@pxref{Logging In}), these files are read to get the real login name or
|
|
password. Each line in the file(s) has three words: the system name,
|
|
the login name, and the password. This file is only used when placing
|
|
calls to remote systems; the password file described under
|
|
@code{passwdfile} below is used for incoming calls. The intention of
|
|
the call out file is to permit the system file to be publically
|
|
readable; the call out files must obviously be kept secure. These files
|
|
need not be used. Multiple call out files may be specified on the line,
|
|
and the @code{callfile} command may be repeated; all the files will be
|
|
read in turn until the system is found.
|
|
|
|
@item passwdfile @var{strings}
|
|
@findex passwdfile
|
|
@cindex passwd file
|
|
@cindex passwd configuration file
|
|
@cindex configuration file (passwd)
|
|
@cindex call in login name
|
|
@cindex call in password
|
|
|
|
Specify the password file(s) to use for login names when @code{uucico}
|
|
is doing its own login prompting, which it does when given the
|
|
@samp{-e}, @samp{-l} or @samp{-w} switch. The default is the file
|
|
@file{passwd} in the directory @var{newconfigdir}. Each line in the
|
|
file(s) has two words: the login name and the password (e.g. @code{Ufoo
|
|
foopas}). The login name is accepted before the system name is known,
|
|
so these are independent of which system is calling in; a particular
|
|
login may be required for a system by using the @code{called-login}
|
|
command in the system file (@pxref{Accepting a Call}). These password
|
|
files are optional, although one must exist if @code{uucico} is to
|
|
present its own login prompts. Multiple password files may be specified
|
|
on the line, and the @code{passwdfile} command may be repeated; all the
|
|
files will be read in turn until the login name is found.
|
|
|
|
@end table
|
|
|
|
@node Log File Names, Debugging Levels, Configuration File Names, config File
|
|
@subsection Log File Names
|
|
|
|
@table @code
|
|
|
|
@item logfile @var{string}
|
|
@findex logfile
|
|
@cindex log file
|
|
|
|
Name the log file. The default is from @file{policy.h}. Logging
|
|
information is written to this file. If @code{HAVE_BNU_LOGGING} is
|
|
defined in @file{conf.h}, then by default a separate log file is used
|
|
for each system. Using this command to name a log file will cause all
|
|
the systems to use it.
|
|
|
|
@item statfile @var{string}
|
|
@findex statfile
|
|
@cindex statistics file
|
|
|
|
Name the statistics file. The default is from @file{policy.h}.
|
|
Statistical information about file transfers is written to this file.
|
|
|
|
@item debugfile @var{string}
|
|
@findex debugfile
|
|
@cindex debugging file
|
|
|
|
Name the file to which debugging information is written. The default is
|
|
from @file{policy.h}. This command is only effective if the code has
|
|
been compiled to include debugging (this is controlled by the
|
|
@code{DEBUG} variable in @file{policy.h}). After the first debugging
|
|
message has been written, messages written to the log file are also
|
|
written to the debugging file to make it easier to keep the order of
|
|
actions straight. The debugging file is different from the log file
|
|
because information such as passwords can appear in it, so it must be
|
|
not be publically readable.
|
|
|
|
@end table
|
|
|
|
@node Debugging Levels, , Log File Names, config File
|
|
@subsection Debugging Levels
|
|
|
|
@table @code
|
|
|
|
@item debug @var{string} @dots{}
|
|
@findex debug in config file
|
|
|
|
Set the debugging level. This command is only effective if the code has
|
|
been compiled to include debugging. The default is to have no
|
|
debugging. The arguments are strings which name the types of debugging
|
|
to be turned on. The following types of debugging are defined:
|
|
|
|
@table @samp
|
|
@item abnormal
|
|
Output debugging messages for abnormal situations, such as recoverable errors.
|
|
@item chat
|
|
Output debugging messages for chat scripts.
|
|
@item handshake
|
|
Output debugging messages for the initial handshake.
|
|
@item uucp-proto
|
|
Output debugging messages for the UUCP protocol itself.
|
|
@item proto
|
|
Output debugging messages for the individual protocols.
|
|
@item port
|
|
Output debugging messages for actions on the communication port.
|
|
@item config
|
|
Output debugging messages while reading the configuration files.
|
|
@item spooldir
|
|
Output debugging messages for actions in the spool directory.
|
|
@item execute
|
|
Output debugging messages whenever another program is executed.
|
|
@item incoming
|
|
List all incoming data in the debugging file.
|
|
@item outgoing
|
|
List all outgoing data in the debugging file.
|
|
@item all
|
|
All of the above.
|
|
@end table
|
|
|
|
The debugging level may also be specified as a number. A 1 will set
|
|
@samp{chat} debugging, a 2 will set both @samp{chat} and
|
|
@samp{handshake} debugging, and so on down the possibilities. Currently
|
|
an 11 will turn on all possible debugging, since there are 11 types of
|
|
debugging messages listed above; more debugging types may be added in
|
|
the future. The @code{debug} command may be used several times in the
|
|
configuration file; every debugging type named will be turned on. When
|
|
running any of the programs, the @samp{-x} switch (actually, for
|
|
@code{uulog} it's the @samp{-X} switch) may be used to turn on
|
|
debugging. The argument to the @samp{-x} switch is one of the strings
|
|
listed above, or a number as described above, or a comma separated list
|
|
of strings (e.g. @samp{-x chat,handshake}). The @samp{-x} switch may
|
|
also appear several times on the command line, in which case all named
|
|
debugging types will be turned on. The @samp{-x} debugging is in
|
|
addition to any debugging specified by the @code{debug} command; there
|
|
is no way to cancel debugging information. The debugging level may also
|
|
be set specifically for calls to or from a specific system with the
|
|
@code{debug} command in the system file (@pxref{Miscellaneous (sys)}).
|
|
|
|
The debugging messages are somewhat idiosyncratic; it may be necessary
|
|
to refer to the source code for additional information in some cases.
|
|
|
|
@end table
|
|
|
|
@node sys File, port File, config File, Configuration Files
|
|
@section The System Configuration File
|
|
@cindex sys file
|
|
@cindex system configuration file
|
|
@cindex configuration file (sys)
|
|
|
|
By default there is a single system configuration, named @file{sys} in
|
|
the directory @var{newconfigdir}. This may be overridden by the
|
|
@code{sysfile} command in the main configuration file; see
|
|
@ref{Configuration File Names}.
|
|
|
|
These files describe all remote systems known to the UUCP package.
|
|
|
|
@menu
|
|
* Defaults and Alternates:: Using defaults and alternates
|
|
* Naming the System:: Naming the system
|
|
* Calling Out:: Calling out
|
|
* Accepting a Call:: Accepting a call
|
|
* Protocol Selection:: Protocol selection
|
|
* File Transfer Control:: File transfer control
|
|
* Miscellaneous (sys):: Miscellaneous sys file commands
|
|
* Default sys File Values:: Default values
|
|
@end menu
|
|
|
|
@node Defaults and Alternates, Naming the System, sys File, sys File
|
|
@subsection Defaults and Alternates
|
|
|
|
The first set of commands in the file, up to the first @code{system}
|
|
command, specify defaults to be used for all systems in that file. Each
|
|
system file uses a different set of defaults.
|
|
|
|
Subsequently, each set of commands from @code{system} up to the next
|
|
@code{system} command describe a particular system. Default values may
|
|
be overridden for specific systems.
|
|
|
|
Each system may then have a series of alternate choices to use when
|
|
calling out or calling in. The first set of commands for a particular
|
|
system, up to the first @code{alternate} command, provide the first
|
|
choice. Subsequently, each set of commands from @code{alternate} up to
|
|
the next @code{alternate} command describe an alternate choice for
|
|
calling out or calling in.
|
|
|
|
When a system is called, the commands before the first @code{alternate}
|
|
are used to select a phone number, port, and so forth; if the call fails
|
|
for some reason, the commands between the first @code{alternate} and the
|
|
second are used, and so forth. Well, not quite. Actually, each
|
|
succeeding alternate will only be used if it is different in some
|
|
relevant way (different phone number, different chat script, etc.). If
|
|
you want to force the same alternate to be used again (to retry a phone
|
|
call more than once, for example), enter the phone number (or any other
|
|
relevant field) again to make it appear different.
|
|
|
|
The alternates can also be used to give different permissions to an
|
|
incoming call based on the login name. This will only be done if the
|
|
first set of commands, before the first @code{alternate} command, uses
|
|
the @code{called-login} command. The list of alternates will be
|
|
searched, and the first alternate with a matching @code{called-login}
|
|
command will be used. If no alternates match, the call will be
|
|
rejected.
|
|
|
|
The @code{alternate} command may also be used in the file-wide defaults
|
|
(the set of commands before the first @code{system} command). This
|
|
might be used to specify a list of ports which are available for all
|
|
systems (for an example of this, see @ref{Gateway Example}) or to
|
|
specify permissions based on the login name used by the remote system
|
|
when it calls in. The first alternate for each system will default to
|
|
the first alternate for the file-wide defaults (as modified by the
|
|
commands used before the first @code{alternate} command for this
|
|
system), the second alternate for each system to the second alternate
|
|
for the file-wide defaults (as modified the same way), and so forth. If
|
|
a system specifies more alternates than the file-wide defaults, the
|
|
trailing ones will default to the last file-wide default alternate. If
|
|
a system specifies fewer alternates than the file-wide defaults, the
|
|
trailing file-wide default alternates will be used unmodified. The
|
|
@code{default-alternates} command may be used to modify this behaviour.
|
|
|
|
This can all get rather confusing, although it's easier to use than to
|
|
describe concisely; the @code{uuchk} program may be used to ensure that
|
|
you are getting what you want.
|
|
|
|
@node Naming the System, Calling Out, Defaults and Alternates, sys File
|
|
@subsection Naming the System
|
|
|
|
@table @code
|
|
|
|
@item system @var{string}
|
|
@findex system
|
|
|
|
Specify the remote system name. Subsequent commands up to the next
|
|
@code{system} command refer to this system.
|
|
|
|
@item alternate [@var{string}]
|
|
@findex alternate
|
|
|
|
Start an alternate set of commands (@pxref{Defaults and Alternates}).
|
|
An optional argument may be used to name the alternate. This name will
|
|
be put in the log file if the alternate is used to call the system.
|
|
There is no way to name the first alternate (the commands before the
|
|
first @code{alternate} command).
|
|
|
|
@item default-alternates @var{boolean}
|
|
@findex default-alternates
|
|
|
|
If the argument is false, any remaining default alternates (from the
|
|
defaults specified at the top of the current system file) will not be
|
|
used. The default is true.
|
|
|
|
@item alias @var{string}
|
|
@findex alias
|
|
|
|
Specify an alias for the current system. The alias may be used by local
|
|
@code{uucp} and @code{uux} commands. The default is to have no aliases.
|
|
|
|
@item myname @var{string}
|
|
@findex myname
|
|
|
|
Specifies a different system name to use when calling the remote system.
|
|
Also, if @code{called-login} is used and is not @samp{ANY}, then, when a
|
|
system logs in with that login name, @var{string} is used as the system
|
|
name. Because the local system name must be determined before the
|
|
remote system has identified itself, using @code{myname} and
|
|
@code{called-login} together for any system will set the local name for
|
|
that login; this means that each locally used system name must have a
|
|
unique login name associated with it. This allows a system to have
|
|
different names for an external and an internal network. The default is
|
|
to not use a special local name.
|
|
|
|
@end table
|
|
|
|
@node Calling Out, Accepting a Call, Naming the System, sys File
|
|
@subsection Calling Out
|
|
|
|
This section describes commands used when placing a call to another
|
|
system.
|
|
|
|
@menu
|
|
* When to Call:: When to call
|
|
* Placing the Call:: Placing the call
|
|
* Logging In:: Logging in
|
|
@end menu
|
|
|
|
@node When to Call, Placing the Call, Calling Out, Calling Out
|
|
@subsubsection When to Call
|
|
|
|
@table @code
|
|
|
|
@item time @var{string} [@var{number}]
|
|
@findex time
|
|
|
|
Specify when the system may be called. The first argument is a time
|
|
string; see @ref{Time Strings}. The optional second argument specifies
|
|
a retry time in minutes. If a call made during a time that matches the
|
|
time string fails, no more calls are permitted until the retry time has
|
|
passed. By default an exponentially increasing retry time is used:
|
|
after each failure the next retry period is longer. A retry time
|
|
specified in the @code{time} command is always a fixed amount of time.
|
|
|
|
The @code{time} command may appear multiple times in a single alternate,
|
|
in which case if any time string matches the system may be called. The
|
|
default time string is @samp{Never}.
|
|
|
|
@item timegrade @var{character} @var{string} [@var{number}]
|
|
@findex timegrade
|
|
|
|
The @var{character} specifies a grade. It must be a single letter or
|
|
digit. The @var{string} is a time string (@pxref{Time Strings}). All
|
|
jobs of grade @var{character} or higher (where @kbd{0} > @kbd{9} >
|
|
@kbd{A} > @kbd{Z} > @kbd{a} > @kbd{z}) may be run at the specified time.
|
|
An ordinary @code{time} command is equivalent to using @code{timegrade}
|
|
with a grade of @kbd{z}, permitting all jobs. If there are no jobs of a
|
|
sufficiently high grade according to the time string, the system will
|
|
not be called. Giving the @samp{-s} switch to @code{uucico} to force it
|
|
to call a system causes it to assume there is a job of grade @kbd{0}
|
|
waiting to be run.
|
|
|
|
The optional third argument specifies a retry time in minutes. See the
|
|
@code{time} command, above, for more details.
|
|
|
|
Note that the @code{timegrade} command serves two purposes: 1) if there
|
|
is no job of sufficiently high grade the system will not be called, and
|
|
2) if the system is called anyway (because the @samp{-s} switch was
|
|
given to @code{uucico}) only jobs of sufficiently high grade will be
|
|
transferred. However, if the other system calls in, the
|
|
@code{timegrade} commands are ignored, and jobs of any grade may be
|
|
transferred (but see @code{call-timegrade} below). Also, the
|
|
@code{timegrade} command will not prevent the other system from
|
|
transferring any job it chooses, regardless of who placed the call.
|
|
|
|
The @code{timegrade} command may appear multiple times without using
|
|
@code{alternate}. If this command does not appear, there are no
|
|
restrictions on what grade of work may be done at what time.
|
|
|
|
@item call-timegrade @var{character} @var{string}
|
|
@findex call-timegrade
|
|
|
|
The @var{character} is a single character @kbd{A} to @kbd{Z}, @kbd{a} to
|
|
@kbd{z}, or @kbd{0} to @kbd{9} and specifies a grade. The @var{string}
|
|
is a time string as described under the @code{time} command. If a call
|
|
is placed to the other system during a time which matches the time
|
|
string, the remote system will be requested to only run jobs of grade
|
|
@var{character} or higher. Unfortunately, there is no way to guarantee
|
|
that the other system will obey the request (this UUCP package will, but
|
|
there are others which will not); moreover job grades are historically
|
|
somewhat arbitrary, so specifying a grade will only be meaningful if the
|
|
other system cooperates in assigning grades. This grade restriction
|
|
only applies when the other system is called, not when the other system
|
|
calls in.
|
|
|
|
The @code{call-timegrade} command may appear multiple times without
|
|
using @code{alternate}. If this command does not appear, or if none of
|
|
the time strings match, the remote system will be allowed to send
|
|
whatever grades of work it chooses.
|
|
|
|
@end table
|
|
|
|
@node Placing the Call, Logging In, When to Call, Calling Out
|
|
@subsubsection Placing the Call
|
|
|
|
@table @code
|
|
|
|
@item baud @var{number}
|
|
@findex baud in sys file
|
|
@itemx speed @var{number}
|
|
@findex speed in sys file
|
|
|
|
Specify the speed (the term @dfn{baud} is technically incorrect, but
|
|
widely understood) at which to call the system. This will try all
|
|
available ports with that baud rate until an unlocked port is found.
|
|
The ports are defined in the port file. If both @code{baud} and
|
|
@code{port} commands appear, both are used when selecting a port. To
|
|
allow calls at more than one baud rate, the @code{alternate} command
|
|
must be used (@pxref{Defaults and Alternates}). If this command does
|
|
not appear, there is no default; the baud rate may be specified in the
|
|
port file, but if it is not then the natural baud rate of the port will
|
|
be used (whatever that means on the system). Specifying an explicit
|
|
baud rate of 0 will request the natural baud rate of the port,
|
|
overriding any default baud rate from the defaults at the top of the
|
|
file.
|
|
|
|
@item port @var{string}
|
|
@findex port in sys file
|
|
|
|
Name a particular port or type of port to use when calling the system.
|
|
The information for this port is obtained from the port file. If this
|
|
command does not appear, there is no default; a port must somehow be
|
|
specified in order to call out (it may be specified implicitly using the
|
|
@code{baud} command or explicitly using the next version of
|
|
@code{port}). There may be many ports with the same name; each will be
|
|
tried in turn until an unlocked one is found which matches the desired
|
|
baud rate.
|
|
|
|
@item port @var{string} @dots{}
|
|
|
|
If more than one string follows the @code{port} command, the subsequent
|
|
strings are treated as commands that might appear in the port file
|
|
(@pxref{port file}). If a port is named (by using a single string
|
|
following @code{port}) these commands are ignored; their purpose is to
|
|
permit defining the port completely in the system file rather than
|
|
always requiring entries in two different files. In order to call out,
|
|
a port must be specified using some version of the @code{port} command,
|
|
or by using the @code{baud} command to select ports from the port file.
|
|
|
|
@item phone @var{string}
|
|
@findex phone
|
|
@itemx address @var{string}
|
|
@findex address
|
|
|
|
Give a phone number to call (when using a modem port) or a remote host
|
|
to contact (when using a TCP port). The commands @code{phone} and
|
|
@code{address} are equivalent, but are intended to be more mnemonic
|
|
depending on the type of port in use.
|
|
|
|
When used with a modem port, an @kbd{=} character in the phone number
|
|
means to wait for a secondary dial tone (although only some modems
|
|
support this); a @kbd{-} character means to pause while dialing for 1
|
|
second (again, only some modems support this). If the system has more
|
|
than one phone number, each one must appear in a different alternate.
|
|
The @code{phone} command must appear in order to call out on a modem;
|
|
there is no default.
|
|
|
|
When used with a TCP port, the string names the host to contact. It may
|
|
be a domain name or a numeric Internet address. If no address is
|
|
specified, the system name is used.
|
|
|
|
When used with a port that neither is a modem nor TCP, this command is
|
|
ignored.
|
|
|
|
@end table
|
|
|
|
@node Logging In, , Placing the Call, Calling Out
|
|
@subsubsection Logging In
|
|
@table @code
|
|
|
|
@item chat @var{strings}
|
|
@findex chat in sys file
|
|
@item chat-timeout @var{number}
|
|
@findex chat-timeout in sys file
|
|
@item chat-fail @var{string}
|
|
@findex chat-fail in sys file
|
|
@item chat-seven-bit @var{boolean}
|
|
@findex chat-seven-bit in sys file
|
|
@item chat-program @var{strings}
|
|
@findex chat-program in sys file
|
|
|
|
These commands describe a chat script to use when logging on to a remote
|
|
system. Chat scripts are explained in @ref{Chat Scripts}.
|
|
|
|
Two additional escape sequences may be used in send strings.
|
|
|
|
@table @samp
|
|
@item \L
|
|
Send the login name, as set by the @code{call-login} command.
|
|
@item \P
|
|
Send the passowrd, as set by the @code{call-password} command.
|
|
@end table
|
|
|
|
Three additional escape sequences may be used with the
|
|
@code{chat-program} command. These are @samp{\L} and @samp{\P}, which
|
|
become the login name and password, respectively, and @samp{\Z}, which
|
|
becomes the name of the system of being called.
|
|
|
|
The default chat script is:
|
|
|
|
@example
|
|
chat "" \r\c ogin:-BREAK-ogin:-BREAK-ogin: \L word: \P
|
|
@end example
|
|
|
|
This will send a carriage return (the @kbd{\c} suppresses the additional
|
|
trailing carriage return that would otherwise be sent) and waits for the
|
|
string @samp{ogin:} (which would be the last part of the @samp{login:}
|
|
prompt supplied by a Unix system). If it doesn't see @samp{ogin:}, it
|
|
sends a break and waits for @samp{ogin:} again. If it still doesn't see
|
|
@samp{ogin:}, it sends another break and waits for @samp{ogin:} again.
|
|
If it still doesn't see @samp{ogin:}, the chat script aborts and hangs
|
|
up the phone. If it does see @samp{ogin:} at some point, it sends the
|
|
login name (as specified by the @code{call-login} command) followed by a
|
|
carriage return (since all send strings are followed by a carriage
|
|
return unless @kbd{\c} is used) and waits for the string @samp{word:}
|
|
(which would be the last part of the @samp{Password:} prompt supplied by
|
|
a Unix system). If it sees @samp{word:}, it sends the password and a
|
|
carriage return, completing the chat script. The program will then
|
|
enter the handshake phase of the UUCP protocol.
|
|
|
|
This chat script will work for most systems, so you will only be
|
|
required to use the @code{call-login} and @code{call-password} commands.
|
|
In fact, in the file-wide defaults you could set defaults of
|
|
@samp{call-login *} and @samp{call-password *}; you would then just have
|
|
to make an entry for each system in the call-out login file.
|
|
|
|
Some systems seem to flush input after the @samp{login:} prompt, so they
|
|
may need a version of this chat script with a @kbd{\d} before the
|
|
@kbd{\L}. When using UUCP over TCP, some servers will not be handle the
|
|
initial carriage return sent by this chat script; in this case you may
|
|
have to specify the simple chat script @samp{ogin: \L word: \P}.
|
|
|
|
@item call-login @var{string}
|
|
@findex call-login
|
|
|
|
Specify the login name to send with @kbd{\L} in the chat script. If the
|
|
string is @samp{*} (e.g. @samp{call-login *}) the login name will be
|
|
fetched from the call out login name and password file
|
|
(@pxref{Configuration File Names}). There is no default.
|
|
|
|
@item call-password @var{string}
|
|
@findex call-password
|
|
|
|
Specify the password to send with @kbd{\P} in the chat script. If the
|
|
string is @samp{*} (e.g. @samp{call-password *}) the password will be
|
|
fetched from the call-out login name and password file
|
|
(@pxref{Configuration File Names}). There is no default.
|
|
|
|
@end table
|
|
|
|
@node Accepting a Call, Protocol Selection, Calling Out, sys File
|
|
@subsection Accepting a Call
|
|
|
|
@table @code
|
|
|
|
@item called-login @var{strings}
|
|
@findex called-login
|
|
|
|
The first @var{string} specifies the login name that the system must use
|
|
when calling in. If it is @samp{ANY} (e.g. @samp{called-login ANY}) any
|
|
login name may be used; this is useful to override a file-wide default
|
|
and to indicate that future alternates may have different login names.
|
|
Case is significant. The default value is @samp{ANY}.
|
|
|
|
Different alternates (@pxref{Defaults and Alternates}) may use different
|
|
@code{called-login} commands, in which case the login name will be used
|
|
to select which alternate is in effect; this will only work if the first
|
|
alternate (before the first @code{alternate} command) uses the
|
|
@code{called-login} command.
|
|
|
|
Additional strings may be specified after the login name; they are a
|
|
list of which systems are permitted to use this login name. If this
|
|
feature is used, then normally the login name will only be given in a
|
|
single @code{called-login} command. Only systems which appear on the
|
|
list, or which use an explicit @code{called-login} command, will be
|
|
permitted to use that login name. If the same login name is used more
|
|
than once with a list of systems, all the lists are concatenated
|
|
together. This feature permits you to restrict a login name to a
|
|
particular set of systems without requiring you to use the
|
|
@code{called-login} command for every single system; you can achieve a
|
|
similar effect by using a different system file for each permitted login
|
|
name with an appropriate @code{called-login} command in the file-wide
|
|
defaults.
|
|
|
|
@item callback @var{boolean}
|
|
@findex callback
|
|
|
|
If @var{boolean} is true, then when the remote system calls
|
|
@code{uucico} will hang up the connection and prepare to call it back.
|
|
This is false by default.
|
|
|
|
@item called-chat @var{strings}
|
|
@findex called-chat
|
|
@item called-chat-timeout @var{number}
|
|
@findex called-chat-timeout
|
|
@item called-chat-fail @var{string}
|
|
@findex called-chat-fail
|
|
@item called-chat-seven-bit @var{boolean}
|
|
@findex called-chat-seven-bit
|
|
@item called-chat-program @var{strings}
|
|
@findex called-chat-program
|
|
|
|
These commands may be used to define a chat script (@pxref{Chat
|
|
Scripts}) that is run whenever the local system is called by the system
|
|
being defined. The chat script defined by the @code{chat} command
|
|
(@pxref{Logging In}), on the other hand, is used when the remote system
|
|
is called. This called chat script might be used to set special modem
|
|
parameters that are appropriate to a particular system. It is run after
|
|
protocol negotiation is complete, but before the protocol has been
|
|
started. See @ref{Logging In} for additional escape sequence which may
|
|
be used besides those defined for all chat scripts. There is no default
|
|
called chat script. If the called chat script fails, the incoming call
|
|
will be aborted.
|
|
|
|
@end table
|
|
|
|
@node Protocol Selection, File Transfer Control, Accepting a Call, sys File
|
|
@subsection Protocol Selection
|
|
|
|
@table @code
|
|
|
|
@item protocol @var{string}
|
|
@findex protocol in sys file
|
|
|
|
Specifies which protocols to use for the other system, and in which
|
|
order to use them. This would not normally be used. For example,
|
|
@samp{protocol tfg}.
|
|
|
|
The default depends on the characteristics of the port and the dialer,
|
|
as specified by the @code{seven-bit} and @code{reliable} commands. If
|
|
neither the port nor the dialer use either of these commands, the
|
|
default is to assume an eight-bit reliable connection. The commands
|
|
@samp{seven-bit true} or @samp{reliable false} might be used in either
|
|
the port or the dialer to change this. Each protocol has particular
|
|
requirements that must be met before it will be considered during
|
|
negotiation with the remote side.
|
|
|
|
The @samp{t} and @samp{e} protocols are intended for use over TCP or
|
|
some other communication path with end to end reliability, as they do no
|
|
checking of the data at all. They will only be considered on a TCP port
|
|
which is both reliable and eight bit.
|
|
|
|
The @samp{g} protocol is robust, but requires an eight-bit connection.
|
|
|
|
The @samp{f} protocol is intended for use with X.25 connections; it
|
|
checksums each file as a whole, so any error causes the entire file to
|
|
be retransmitted. It requires a reliable connection, but only uses
|
|
seven-bit transmissions. It is a streaming protocol, so, while it can
|
|
be used on a serial port, the port must be completely reliable and flow
|
|
controlled; many aren't.
|
|
|
|
The protocols will be considered in the order shown above. This means
|
|
that if neither the @code{seven-bit} nor the @code{reliable} command are
|
|
used, the @samp{t} protocol will be used over a TCP connection and the
|
|
@samp{g} protocol will be used over any other type of connection
|
|
(subject, of course, to what is supported by the remote system; it may
|
|
be assumed that all systems support the @samp{g} protocol).
|
|
|
|
Note that currently specifying both @samp{seven-bit true} and
|
|
@samp{reliable false} will not match any protocol. If this occurs
|
|
through a combination of port and dialer specifications, you will have
|
|
to use the @code{protocol} command for the system or no protocol will be
|
|
selected at all (the only reasonable choice would be @samp{protocol f}).
|
|
|
|
A protocol list may also be specified for a port (@pxref{port file}),
|
|
but if there is a list for the system the list for the port is ignored.
|
|
|
|
@item protocol-parameter @var{character} @var{string} @dots{}
|
|
@findex protocol-parameter in sys file
|
|
|
|
@var{character} is a single character specifying a protocol. The
|
|
remaining strings are a command specific to that protocol which will be
|
|
executed if that protocol is used. A typical command is something like
|
|
@samp{window 7}. The particular commands are protocol specific.
|
|
|
|
The @samp{g} protocol supports the following commands, all of which take
|
|
numeric arguments:
|
|
|
|
@table @code
|
|
@item window
|
|
The window size to request the remote system to use. This must be
|
|
between 1 and 7 inclusive. The default is 7.
|
|
@item packet-size
|
|
The packet size to request the remote system to use. This must be a
|
|
power of 2 between 32 and 4096 inclusive. The default is 64, which is
|
|
the only packet size supported by many older UUCP packages. Some UUCP
|
|
packages will even dump core if a larger packet size is requested.
|
|
@item startup-retries
|
|
The number of times to retry the initialization sequence. The default
|
|
is 8.
|
|
@item init-retries
|
|
The number of times to retry one phase of the initialization sequence
|
|
(there are three phases). The default is 4.
|
|
@item init-timeout
|
|
The timeout in seconds for one phase of the initialization sequence. The
|
|
default is 10.
|
|
@item retries
|
|
The number of times to retry sending either a data packet or a request
|
|
for the next packet. The default is 6.
|
|
@item timeout
|
|
The timeout in seconds when waiting for either a data packet or an
|
|
acknowledgement. The default is 10.
|
|
@item garbage
|
|
The number of unrecognized bytes to permit before dropping the
|
|
connection. This must be larger than the packet size. The default is
|
|
10000.
|
|
@item errors
|
|
The number of errors (malformed packets, out of order packets, bad
|
|
checksums, or packets rejected by the remote system) to permit before
|
|
dropping the connection. The default is 100.
|
|
@item remote-window
|
|
If this is between 1 and 7 inclusive, the window size requested by the
|
|
remote system is ignored and this is used instead. This can be useful
|
|
when dealing with some poor UUCP packages. The default is 0, which
|
|
means that the remote system's request is honored.
|
|
@item remote-packet-size
|
|
If this is between 32 and 4096 inclusive the packet size requested by
|
|
the remote system is ignored and this is used instead. There is
|
|
probably no good reason to use this. The default is 0, which means that
|
|
the remote system's request is honored.
|
|
@end table
|
|
|
|
The @samp{f} protocol is intended for use with error-correcting modems
|
|
only; it checksums each file as a whole, so any error causes the entire
|
|
file to be retransmitted. It supports the following commands, both of
|
|
which take numeric arguments:
|
|
|
|
@table @code
|
|
@item timeout
|
|
The timeout in seconds before giving up. The default is 120.
|
|
@item retries
|
|
How many times to retry sending a file. The default is 2.
|
|
@end table
|
|
|
|
The @samp{t} and @samp{e} protocols are intended for use over TCP or
|
|
some other communication path with end to end reliability, as they do no
|
|
checking of the data at all. They both support a single command, which
|
|
takes a numeric argument:
|
|
|
|
@table @code
|
|
@item timeout
|
|
The timeout in seconds before giving up. The default is 120.
|
|
@end table
|
|
|
|
The protocol parameters are reset to their default values after each
|
|
call.
|
|
|
|
@end table
|
|
|
|
@node File Transfer Control, Miscellaneous (sys), Protocol Selection, sys File
|
|
@subsection File Transfer Control
|
|
|
|
@table @code
|
|
|
|
@item call-request @var{boolean}
|
|
@findex call-request
|
|
|
|
The @var{boolean} is checked when the local system places the call. It
|
|
determines whether the remote system may request any file transfers.
|
|
The default is yes.
|
|
|
|
@item called-request @var{boolean}
|
|
@findex called-request
|
|
|
|
The @var{boolean} is checked when the remote system calls in. It
|
|
determines whether the remote system may request any file transfers.
|
|
The default is yes.
|
|
|
|
@item request @var{boolean}
|
|
@findex request
|
|
|
|
Equivalent to specifying both @samp{call-request @var{boolean}} and
|
|
@samp{called-request @var{boolean}}.
|
|
|
|
@item call-transfer @var{boolean}
|
|
@findex call-transfer
|
|
|
|
The @var{boolean} is checked when the local system places the call. It
|
|
determines whether the local system may do file transfers queued up for
|
|
the remote system. The default is yes.
|
|
|
|
@item called-transfer @var{boolean}
|
|
@findex called-transfer
|
|
|
|
The @var{boolean} is checked when the remote system calls in. It
|
|
determines whether the local system may do file transfers queued up for
|
|
the remote system. The default is yes.
|
|
|
|
@item transfer @var{boolean}
|
|
@findex transfer
|
|
|
|
Equivalent to specifying both @samp{call-transfer @var{boolean}}
|
|
@samp{called-transfer @var{boolean}}.
|
|
|
|
@item call-local-size @var{number} @var{string}
|
|
@findex call-local-size
|
|
|
|
The @var{string} is a time string (@pxref{Time Strings}). The
|
|
@var{number} is the size in bytes of the largest file that should be
|
|
transferred at a time matching the time string if the local system
|
|
placed the call and the request was made by the local system. This
|
|
command may appear multiple times in a single alternate. If this
|
|
command does not appear, or if none of the time strings match, there are
|
|
no size restrictions.
|
|
|
|
With all the size control commands, the size of a file from the remote
|
|
system (as opposed to a file from the local system) will only be checked
|
|
if the other system is running this package; other UUCP packages will
|
|
not understand a maximum size request, nor will they inform this package
|
|
of the size of remote files.
|
|
|
|
@item call-remote-size @var{number} @var{string}
|
|
@findex call-remote-size
|
|
|
|
Specify the size in bytes of the largest file that should be
|
|
transferred at a given time by remote request when the local system
|
|
placed the call. This command may appear multiple times in a single
|
|
alternate. If this command does not appear, there are no size
|
|
restrictions.
|
|
|
|
@item called-local-size @var{number} @var{string}
|
|
@findex called-local-size
|
|
|
|
Specify the size in bytes of the largest file that should be transferred
|
|
at a given time by local request when the remote system placed the call.
|
|
This command may appear multiple times in a single alternate. If this
|
|
command does not appear, there are no size restrictions.
|
|
|
|
@item called-remote-size @var{number} @var{string}
|
|
@findex called-remote-size
|
|
|
|
Specify the size in bytes of the largest file that should be transferred
|
|
at a given time by remote request when the remote system placed the
|
|
call. This command may appear multiple times in a single alternate. If
|
|
this command does not appear, there are no size restrictions.
|
|
|
|
@item local-send @var{strings}
|
|
@findex local-send
|
|
|
|
Specifies that files in the directories named by the @var{strings} may
|
|
be sent to the remote system when requested locally (using @code{uucp}
|
|
or @code{uux}). The directories in the list should be separated by
|
|
whitespace. A @kbd{~} may be used for the public directory. On a Unix
|
|
system, this is typically @file{/usr/spool/uucppublic}; the public
|
|
directory may be set with the @code{pubdir} command. Here is an example
|
|
of @code{local-send}:
|
|
|
|
@example
|
|
local-send ~ /usr/spool/ftp/pub
|
|
@end example
|
|
|
|
Listing a directory allows all files within the directory and all
|
|
subdirectories to be sent. Directories may be excluded by preceding
|
|
them with an exclamation point. For example:
|
|
|
|
@example
|
|
local-send /usr/ftp !/usr/ftp/private ~
|
|
@end example
|
|
|
|
@noindent
|
|
means that all files in @file{/usr/ftp} or the public directory may be
|
|
sent, except those files in @file{/usr/ftp/private}. The list of
|
|
directories is read from left to right, and the last directory to apply
|
|
takes effect; this means that directories should be listed from top
|
|
down. The default is the root directory (i.e., any file at all may be
|
|
sent by local request).
|
|
|
|
@item remote-send @var{strings}
|
|
@findex remote-send
|
|
|
|
Specifies that files in the named directories may be sent to the remote
|
|
system when requested by the remote system. The default is @kbd{~}.
|
|
|
|
@item local-receive @var{strings}
|
|
@findex local-receive
|
|
|
|
Specifies that files may be received into the named directories when
|
|
requested by a local user. The default is @kbd{~}.
|
|
|
|
@item remote-receive @var{strings}
|
|
@findex remote-receive
|
|
|
|
Specifies that files may be received into the named directories when
|
|
requested by the remote system. The default is @kbd{~}. On Unix, the
|
|
remote system may only request that files be received into directories
|
|
that are writeable by the world, regardless of how this is set.
|
|
|
|
@end table
|
|
|
|
@node Miscellaneous (sys), Default sys File Values, File Transfer Control, sys File
|
|
@subsection Miscellaneous sys File Commands
|
|
|
|
@table @code
|
|
|
|
@item sequence @var{boolean}
|
|
@findex sequence
|
|
|
|
If @var{boolean} is true, then conversation sequencing is automatically
|
|
used for the remote system, so that if somebody manages to spoof as the
|
|
remote system, it will be detected the next time the remote system
|
|
actually calls. This is false by default.
|
|
|
|
@item command-path @var{string}
|
|
@findex command-path
|
|
|
|
Specifies the path (a list of whitespace separated directories) to be
|
|
searched to locate commands to execute. This is only used for commands
|
|
requested by @code{uux}, not for chat programs. The default is from
|
|
@file{policy.h}.
|
|
|
|
@item commands @var{strings}
|
|
@findex commands
|
|
|
|
The list of commands which the remote system is permitted to execute
|
|
locally. For example: @samp{commands rnews rmail}. If the value is
|
|
@samp{ALL} (case significant), all commands may be executed. The
|
|
default is @samp{rnews rmail}.
|
|
|
|
@item free-space @var{number}
|
|
@findex free-space
|
|
|
|
Specify the minimum amount of file system space (in bytes) to leave free
|
|
after receiving a file. If the incoming file will not fit, it will be
|
|
rejected. This will only work when talking to another instance of this
|
|
package, since older UUCP packages do not provide the file size of
|
|
incoming files. There is no provision for reserving space, so it is
|
|
still possible for multiple @code{uucico} daemons to use up all
|
|
available file space; a sufficiently large value for @code{free-space}
|
|
will avoid this problem to some extent. The default is from
|
|
@file{policy.h}. Not all systems may be able to provide the amount of
|
|
available space.
|
|
|
|
@item pubdir @var{string}
|
|
@findex pubdir in sys file
|
|
|
|
Specifies the public directory that is used when @kbd{~} is specifed in
|
|
a file transfer or a list of directories. This essentially overrides
|
|
the public directory specified in the main configuration file for this
|
|
system only. The default is the public directory specified in the main
|
|
configuration file (which defaults to a value from @file{policy.h}).
|
|
|
|
@item debug @var{string} @dots{}
|
|
@findex debug in sys file
|
|
|
|
Set additional debugging for calls to or from the system. This may be
|
|
used to debug a connection with a specific system. It is particularly
|
|
useful when debugging incoming calls, since debugging information will
|
|
be generated whenever the call comes in. See the @code{debug} command
|
|
in the main configuration file (@pxref{Debugging Levels}) for more
|
|
details. The debugging information specified here is in addition to
|
|
that specified in the main configuration file or on the command line.
|
|
|
|
@item max-remote-debug @var{string} @dots{}
|
|
@findex max-remote-debug
|
|
|
|
When the system calls in, it may request that the debugging level be set
|
|
to a certain value. This command may be used to put a limit on the
|
|
debugging level which the system may request, to avoid filling up the
|
|
disk with debugging information. Only the debugging types named in the
|
|
@code{max-remote-debug} command may be turned on by the remote system.
|
|
To prohibit any debugging, use @samp{max-remote-debug none}. The
|
|
default is @samp{abnormal,chat,handshake}; to turn off these default
|
|
entries, you must use @samp{max-remote-debug none} followed by other
|
|
@code{max-remote-debug} commands specifying the settings you want.
|
|
|
|
@item timetable @var{string} @var{string}
|
|
@findex timetable
|
|
|
|
This is actually not specific to a system; it can appear anywhere in the
|
|
file(s). In a future release this command will probably be moved to the
|
|
main configuration file.
|
|
|
|
The @code{timetable} defines a timetable that may be used in
|
|
subsequently appearing time strings; @ref{Time Strings}. The first
|
|
string names the timetable entry; the second is a time string.
|
|
|
|
The following @code{timetable} commands are predefined. The NonPeak
|
|
timetable is included for compatibility. It originally described the
|
|
offpeak hours of Tymnet and Telenet, but both have since changed their
|
|
schedules.
|
|
|
|
@example
|
|
timetable Evening Wk1705-0755,Sa,Su
|
|
timetable Night Wk2305-0755,Sa,Su2305-1655
|
|
timetable NonPeak Wk1805-0655,Sa,Su
|
|
@end example
|
|
|
|
If this command does not appear, then obviously no additional timetables
|
|
will be defined.
|
|
|
|
@end table
|
|
|
|
@node Default sys File Values, , Miscellaneous (sys), sys File
|
|
@subsection Default sys File Values
|
|
|
|
The following are used as default values for all systems; they can be
|
|
considered as appearing before the start of the file.
|
|
|
|
@example
|
|
timetable Evening Wk1705-0755,Sa,Su
|
|
timetable Night Wk2305-0755,Sa,Su2305-1655
|
|
timetable NonPeak Wk1805-0655,Sa,Su
|
|
time Never
|
|
chat "" \r\c ogin:-BREAK-ogin:-BREAK-ogin: \L word: \P
|
|
chat-timeout 10
|
|
callback n
|
|
sequence n
|
|
request y
|
|
transfer y
|
|
local-send /
|
|
remote-send ~
|
|
local-receive ~
|
|
remove-receive ~
|
|
command-path [ from @file{policy.h} ]
|
|
commands rnews rmail
|
|
max-remote-debug abnormal,chat,handshake
|
|
@end example
|
|
|
|
@node port File, dial File, sys File, Configuration Files
|
|
@section The Port Configuration File
|
|
@cindex port file
|
|
@cindex port configuration file
|
|
@cindex configuration file (port)
|
|
|
|
The port files may be used to name and describe ports. The first
|
|
command in each file must be @code{port}. All command up to the next
|
|
@code{port} command then describe that port. There are different types
|
|
of ports; each type supports its own set of commands. Each command
|
|
indicates which types of ports support it. There may be many ports with
|
|
the same name; if a system requests a port by name then each port with
|
|
that name will be tried until an unlocked one is found.
|
|
|
|
@table @code
|
|
|
|
@item port @var{string}
|
|
@findex port in port file
|
|
|
|
Introduces and names a port.
|
|
|
|
@item type @var{string}
|
|
@findex type
|
|
|
|
Define the type of port. The default is @samp{modem}. If this command
|
|
appears, it must immediately follow the @code{port} command. The type defines
|
|
what commands are subsequently allowed. Currently the types are:
|
|
|
|
@table @samp
|
|
@item modem
|
|
For a modem hookup.
|
|
@item stdin
|
|
For a connection through standard input and standard output, as when
|
|
@code{uucico} is run as a login shell.
|
|
@item direct
|
|
For a direct connection to another system.
|
|
@item tcp
|
|
For a connection using TCP.
|
|
@end table
|
|
|
|
@item protocol @var{string}
|
|
@findex protocol in port file
|
|
|
|
Specify a list of protocols to use for this port. This is just like the
|
|
corresponding command for a system (@pxref{Protocol Selection}). A
|
|
protocol list for a system takes precedence over a list for a port.
|
|
|
|
@item protocol-parameter @var{character} @var{strings} [ any type ]
|
|
@findex protocol-parameter in port file
|
|
|
|
The same command as the @code{protocol-parameter} command used for
|
|
systems (@pxref{Protocol Selection}). This one takes precedence.
|
|
|
|
@item seven-bit @var{boolean} [ any type ]
|
|
@findex seven-bit in port file
|
|
|
|
This is only used during protocol negotiation; if the argument is
|
|
@samp{true}, it forces the selection of a protocol which works across a
|
|
seven-bit link. It does not prevent eight bit characters from being
|
|
transmitted. The default is @samp{false}.
|
|
|
|
@item reliable @var{boolean} [ any type ]
|
|
@findex reliable in port file
|
|
|
|
This is only used during protocol negotiation; if the argument is
|
|
@samp{false}, it forces the selection of a protocol which works across
|
|
an unreliable communication link. The default is @samp{true}. It would
|
|
be more common to specify this for a dialer rather than a port.
|
|
|
|
@item device @var{string} [ modem and direct only ]
|
|
@findex device
|
|
|
|
Names the device associated with this port. If the device is not named,
|
|
the port name is taken as the device. Device names are system
|
|
dependent, but a Unix example would be @file{/dev/ttyd0}.
|
|
|
|
@item baud @var{number} [ modem and direct only ]
|
|
@findex baud in port file
|
|
@itemx speed @var{number} [modem and direct only ]
|
|
@findex speed in port file
|
|
|
|
The speed this port runs at. If a system specifies a speed but no port
|
|
name, then all ports which match the speed will be tried in order. If
|
|
the speed is not specified here and is not specified by the system, the
|
|
natural speed of the port will be used by default.
|
|
|
|
@item baud-range @var{number} @var{number} [ modem only ]
|
|
@findex baud-range
|
|
@itemx speed-range @var{number} @var{number} [ modem only ]
|
|
@findex speed-range
|
|
|
|
Specify a range of speeds this port can run at. The first number is the
|
|
minimum speed, the second number is the maximum speed. These numbers
|
|
will be used when matching a system which specifies a desired speed.
|
|
The simple @code{speed} (or @code{baud}) command is still used to
|
|
determine the speed to run at if the system does not specify a speed.
|
|
For example, the command @samp{speed-range 300 19200} means that the
|
|
port will match any system which uses a speed from 300 to 19200 baud
|
|
(and will use the speed specified by the system); this could be combined
|
|
with @samp{speed 2400}, which means that when this port is used with a
|
|
system that does not specify a speed, the port will be used at 2400
|
|
baud.
|
|
|
|
@item carrier @var{boolean} [ modem only ]
|
|
@findex carrier in port file
|
|
|
|
The argument indicates whether the port supports carrier. If it does
|
|
not, carrier will never be required on this port, regardless of what the
|
|
modem chat script indicates. The default is @samp{true}.
|
|
|
|
@item dial-device @var{string} [ modem only ]
|
|
@findex dial-device
|
|
|
|
Dialing instructions should be output to the named device, rather than
|
|
to the normal port device. The default is to output to the normal port
|
|
device.
|
|
|
|
@item dialer @var{string} [ modem only ]
|
|
@findex dialer in port file
|
|
|
|
Name a dialer to use. The information is looked up in the dialer file.
|
|
There is no default. Some sort of dialer information must be specified
|
|
to call out on a modem.
|
|
|
|
@item dialer @var{string} @dots{} [ modem only ]
|
|
|
|
Execute a dialer command. If a dialer is named (by using the first form
|
|
of this command, described just above), these commands are ignored.
|
|
They may be used to specify dialer information directly in simple
|
|
situations without needing to go to a separate file. There is no
|
|
default. Some sort of dialer information must be specified to call out
|
|
on a modem.
|
|
|
|
@item dialer-sequence @var{strings} [ modem only ]
|
|
@findex dialer-sequence
|
|
|
|
Name a sequence of dialers and tokens (phone numbers) to use. The first
|
|
argument names a dialer, and the second argument names a token. The
|
|
third argument names another dialer, and so on. If there are an odd
|
|
number of arguments, the phone number specified with a @code{phone}
|
|
command in the system file is used as the final token. The token is
|
|
what is used for @kbd{\D} or @kbd{\T} in the dialer chat script. If the
|
|
token in this string is @kbd{\D}, the system phone number will be used;
|
|
if it is @kbd{\T}, the system phone number will be used after undergoing
|
|
dialcodes translation. A missing final token is taken as @kbd{\D}.
|
|
|
|
This command currently does not work if @code{dial-device} is specified;
|
|
to handle this correctly will require a more systematic notion of chat
|
|
scripts. Moreover, only the @code{complete} and @code{abort} chat
|
|
scripts from the first dialer specified are used, and only the protocol
|
|
parameters from the first dialer are used.
|
|
|
|
@item lockname @var{string} [ modem and direct only ]
|
|
@findex lockname
|
|
|
|
Give the name to use when locking this port. On Unix, this is the name
|
|
of the file that will be created in the lock directory. It is used as
|
|
is, so on Unix it should generally start with @samp{LCK..}. For
|
|
example, if a single port were named both @file{/dev/ttycu0} and
|
|
@file{/dev/tty0} (perhaps with different characteristics keyed on the
|
|
minor device number), then the command @code{lockname LCK..ttycu0} could
|
|
be used to force the latter to use the same lock file name as the
|
|
former.
|
|
|
|
@item service @var{string} [ tcp only ]
|
|
@findex service
|
|
|
|
Name the TCP port number to use. This may be a number. If not, it will
|
|
be looked up in @file{/etc/services}. If this is not specified, the
|
|
string @samp{uucp} is looked up in @file{/etc/services}. If it is not
|
|
found, port number 540 (the standard UUCP-over-TCP port number) will be
|
|
used.
|
|
|
|
@end table
|
|
|
|
@node dial File, Security, port File, Configuration Files
|
|
@section The Dialer Configuration File
|
|
@cindex dial file
|
|
@cindex dialer configuration file
|
|
@cindex configuration file (dial)
|
|
|
|
The dialer configuration files define dialers. The first command in
|
|
each file must be a @code{dialer} command, which names the dialer.
|
|
Subsequent commands up to the next @code{dialer} command are associated
|
|
with the named dialer.
|
|
|
|
@table @code
|
|
|
|
@item dialer @var{string}
|
|
@findex dialer in dial file
|
|
|
|
Introduces and names a dialer.
|
|
|
|
@item chat @var{strings}
|
|
@findex chat in dial file
|
|
@item chat-timeout @var{number}
|
|
@findex chat-timeout in dial file
|
|
@item chat-fail @var{string}
|
|
@findex chat-fail in dial file
|
|
@item chat-seven-bit @var{boolean}
|
|
@findex chat-seven-bit in dial file
|
|
@item chat-program @var{strings}
|
|
@findex chat-program in dial file
|
|
|
|
Specify a chat script to be used to dial the phone. See @ref{Chat
|
|
Scripts} for full details on chat scripts.
|
|
|
|
Taylor UUCP will sleep for one second between attempts to dial out on a
|
|
modem. If your modem requires a longer wait period, you must start your
|
|
chat script with delays (@samp{\d} in a send string).
|
|
|
|
The chat script will be read from and sent to the port specified by the
|
|
@code{dial-device} command for the port, if there is one.
|
|
|
|
The following escape addition escape sequences may appear in send
|
|
strings:
|
|
|
|
@table @kbd
|
|
@item \D
|
|
send phone number without dialcode translation
|
|
@item \T
|
|
send phone number with dialcode translation
|
|
@item \M
|
|
do not require carrier
|
|
@item \m
|
|
require carrier (fail if not present)
|
|
@end table
|
|
|
|
See the description of the dialcodes file (@pxref{Configuration File
|
|
Names}) for a description of dialcode translation. If the port does not
|
|
support carrier (as set by the @code{carrier} command in the port file)
|
|
@kbd{\M} and @kbd{\m} are ignored. If both the port and the dialer
|
|
support carrier (as set by the @code{carrier} command in the port file
|
|
and the @code{carrier} command in the dialer file), then every chat
|
|
script implicitly begins with @kbd{\M} and ends with @kbd{\m}. There is
|
|
no default chat script for dialers.
|
|
|
|
The following additional escape sequences may be used in
|
|
@code{chat-program}:
|
|
|
|
@table @kbd
|
|
@item \D
|
|
phone number without dialcode translation
|
|
@item \T
|
|
phone number with dialcode translation
|
|
@end table
|
|
|
|
If the program changes the port in any way (e.g., sets parity) the
|
|
changes will be preserved during protocol negotiation, but once the
|
|
protocol is selected it will change the port settings.
|
|
|
|
@item dialtone @var{string}
|
|
@findex dialtone
|
|
|
|
A string to output when dialing the phone number which causes the modem
|
|
to wait for a secondary dial tone. This is used to translate the
|
|
@kbd{=} character in a phone number. The default is a comma.
|
|
|
|
@item pause @var{string}
|
|
@findex pause
|
|
|
|
A string to output when dialing the phone number which causes the modem
|
|
to wait for 1 second. This is used to translate the @kbd{-} character
|
|
in a phone number. The default is a comma.
|
|
|
|
@item carrier @var{boolean}
|
|
@findex carrier in dial file
|
|
|
|
If the argument is @samp{true}, the dialer supports the modem carrier
|
|
signal. After the phone number is dialed, @code{uucico} will require
|
|
that carrier be on. One some systems, it will be able to wait for it.
|
|
If the argument is @samp{false}, carrier will not be required. The
|
|
default is @samp{true}.
|
|
|
|
@item carrier-wait @var{number}
|
|
@findex carrier-wait
|
|
|
|
If the port is supposed to wait for carrier, this may be used to
|
|
indicate how many seconds to wait. The default is 60 seconds. Only
|
|
some systems support waiting for carrier.
|
|
|
|
@item dtr-toggle @var{boolean} @var{boolean}
|
|
@findex dtr-toggle
|
|
|
|
If the first argument is @samp{true}, then DTR is toggled before using
|
|
the modem. This is only supported on some systems and some ports. The
|
|
second @var{boolean} need not be present; if it is, and it is
|
|
@samp{true}, the program will sleep for 1 second after toggling DTR.
|
|
The default is not to toggle DTR.
|
|
|
|
@item complete-chat @var{strings}
|
|
@findex complete-chat
|
|
@item complete-chat-timeout @var{number}
|
|
@findex complete-chat-timeout
|
|
@item complete-chat-fail @var{string}
|
|
@findex complete-chat-fail
|
|
@item complete-chat-seven-bit @var{boolean}
|
|
@findex complete-chat-seven-bit
|
|
@item complete-chat-program @var{strings}
|
|
@findex complete-chat-program
|
|
|
|
These commands define a chat script (@pxref{Chat Scripts}) which is run
|
|
when a call is finished normally. This allows the modem to be reset.
|
|
There is no default. No additional escape sequences may be used.
|
|
|
|
@item complete @var{string}
|
|
@findex complete
|
|
|
|
This is a simple use of @code{complete-chat}. It is equivalent to
|
|
@code{complete-chat "" @var{string}}; this has the effect of sending
|
|
@var{string} to the modem when a call finishes normally.
|
|
|
|
@item abort-chat @var{strings}
|
|
@findex abort-chat
|
|
@item abort-chat-timeout @var{number}
|
|
@findex abort-chat-timeout
|
|
@item abort-chat-fail @var{string}
|
|
@findex abort-chat-fail
|
|
@item abort-chat-seven-bit @var{boolean}
|
|
@findex abort-chat-seven-bit
|
|
@item abort-chat-program @var{strings}
|
|
@findex abort-chat-program
|
|
|
|
These commands define a chat script (@pxref{Chat Scripts}) to be run
|
|
when a call is aborted. They may be used to interrupt and reset the
|
|
modem. There is no default. No additional escape sequences may be
|
|
used.
|
|
|
|
@item abort @var{string}
|
|
@findex abort
|
|
|
|
This is a simple use of @code{abort-chat}. It is equivalent to
|
|
@code{abort-chat "" @var{string}}; this has the effect of sending
|
|
@var{string} to the modem when a call is aborted.
|
|
|
|
@item protocol-parameter @var{character} @var{strings}
|
|
@findex protocol-parameter in dial file
|
|
|
|
Set protocol parameters, just like the @code{protocol-parameter} command
|
|
in the system configuration file or the port configuration file; see
|
|
@ref{Protocol Selection}. These parameters take precedence, then those
|
|
for the port, then those for the system.
|
|
|
|
@item seven-bit @var{boolean}
|
|
@findex seven-bit in dial file
|
|
|
|
This is only used during protocol negotiation; if it is @samp{true}, it
|
|
forces selection of a protocol which works across a seven-bit link. It
|
|
does not prevent eight bit characters from being transmitted. The
|
|
default is @samp{false}. It would be more common to specify this for a
|
|
port than for a dialer.
|
|
|
|
@item reliable @var{boolean}
|
|
@findex reliable in dial file
|
|
|
|
This is only used during protocol negotiation; if it is @samp{false}, it
|
|
forces selection of a protocol which works across an unreliable
|
|
communication link. The default is @samp{true}.
|
|
|
|
@end table
|
|
|
|
@node Security, , dial File, Configuration Files
|
|
@section Security
|
|
|
|
This discussion of UUCP security applies only to Unix. It is a bit
|
|
cursory; suggestions for improvement are solicited.
|
|
|
|
UUCP is traditionally not very secure. Taylor UUCP addresses some
|
|
security issues, but is still far from being a secure system.
|
|
|
|
If security is very important to you, then you should not permit any
|
|
external access to your computer, including UUCP. Any opening to the
|
|
outside world is a potential security risk.
|
|
|
|
By default Taylor UUCP provides few mechanisms to secure local users of
|
|
the system from each other. You can allow increased security by putting
|
|
the owner of the UUCP programs (normally @code{uucp}) into a separate
|
|
group; the use of this is explained in the following paragraphs, which
|
|
refer to this separate group as @code{uucp-group}.
|
|
|
|
When the @code{uucp} program is invoked to copy a file to a remote
|
|
system, it will by default copy the file into the UUCP spool directory.
|
|
When the @code{uux} program is used, the @samp{-C} switch must be used
|
|
to copy the file into the UUCP spool directory. In any case, once the
|
|
file has been copied into the spool directory, other local users will
|
|
not be able to access it. In version 1.03 there is a security hole in
|
|
that for the file to be copied it must be readable by @code{uucp}.
|
|
Changing the group of the file to @code{uucp-group} and making it group
|
|
readable will permit UUCP to read it without granting access to other
|
|
users.
|
|
|
|
When a file is requested from a remote system, UUCP will only permit it
|
|
to be placed in a directory which is writable by the requesting user.
|
|
The directory must also be writable by UUCP. A local user can create a
|
|
directory with a group of @code{uucp-group} and set the mode to permit
|
|
group write access. This will allow the file be requested without
|
|
permitting it to be viewed by any other user.
|
|
|
|
There is no provision for security for @code{uucp} requests (as opposed
|
|
to @code{uux} requests) made by a user on a remote system. A file sent
|
|
over by a remote request may only be placed in a directory which is
|
|
world writable, and the file will be world readable and writable. This
|
|
will permit any local user to destroy or replace the contents of the
|
|
file. A file requested by a remote system must be world readable, and
|
|
the directory it is in must be world readable. Any local user will be
|
|
able to examine, although not necessarily modify, the file before it is
|
|
sent.
|
|
|
|
There are some security holes and race conditions that apply to the
|
|
above discussion which I will not elaborate on. They are not hidden
|
|
from anybody who reads the source code, but they are somewhat technical
|
|
and difficult (but scarcely impossible) to exploit. Suffice it to say
|
|
that even under the best of conditions UUCP is not completely secure.
|
|
|
|
For many sites, security from remote sites is a more important
|
|
consideration. Fortunately, Taylor UUCP does provide some support in
|
|
this area.
|
|
|
|
The greatest security is provided by always dialing out to the other
|
|
site. This prevents anybody from pretending to be the other site. Of
|
|
course, only one side of the connection can do this.
|
|
|
|
If remote dialins must be permitted, then it is best if the dialin line
|
|
is used only for UUCP. If this is the case, then you should create a
|
|
call-in password file (@pxref{Configuration File Names}) and let
|
|
@code{uucico} do its own login prompting. For example, to let remote
|
|
sites log in on a port named @samp{entry} in the port file (@pxref{port
|
|
file}) you might invoke @samp{uucico -p entry}. This would cause
|
|
@code{uucico} to enter an endless loop of login prompts and daemon
|
|
executions. The advantage of this approach is that even if remote users
|
|
break into the system by guessing or learning the password, they will
|
|
only be able to do whatever @code{uucico} permits them to do. They will
|
|
not be able to start a shell on your system.
|
|
|
|
If remote users can dial in and log on to your system, then you have a
|
|
security hazard more serious than that posed by UUCP. But then, you
|
|
probably knew that already.
|
|
|
|
Once your system has connected with the remote UUCP, there is a fair
|
|
amount of control you can exercise. You can use the @code{remote-send}
|
|
and @code{remote-receive} commands to control the directories the remote
|
|
UUCP can access. You can use the @code{request} command to prevent the
|
|
remote UUCP from making any requests of your system at all; however, if
|
|
you do this it will not even be able to send you mail or news. If you
|
|
do permit remote requests, you should be careful to restrict what
|
|
commands may be executed at the remote system's request. The default is
|
|
@code{rmail} and @code{rnews}, which will suffice for most systems.
|
|
|
|
If different remote systems call in and they must be granted different
|
|
privileges (perhaps some systems are within the same organization and
|
|
some are not) then the @code{called-login} command should be used for
|
|
each system to require that they different login names. Otherwise it
|
|
would be simple for a remote system to use the @code{myname} command and
|
|
pretend to be a different system. The @code{sequence} command can be
|
|
used to detect when one system pretended to be another, but since the
|
|
sequence numbers must be reset manually after a failed handshake this
|
|
can sometimes be more trouble than it's worth.
|
|
|
|
@node Protocols, Hacking, Configuration Files, Top
|
|
@chapter UUCP protocol internals
|
|
|
|
This chapter describes how the various UUCP protocols work, and
|
|
discusses some other internal UUCP issues.
|
|
|
|
This chapter is quite technical. You do not need to understand it, or
|
|
even read it, in order to use Taylor UUCP. It is intended for people
|
|
who are interested in how UUCP code works.
|
|
|
|
Most of the discussion covers the protocols used by all UUCP packages,
|
|
not just Taylor UUCP. Any information specific to Taylor UUCP is
|
|
indicated as such. There are some pointers to the actual functions in
|
|
the Taylor UUCP source code, for those who are extremely interested in
|
|
actual UUCP implementation.
|
|
|
|
@menu
|
|
* Grades:: UUCP grades
|
|
* Lock Files:: UUCP lock file format
|
|
* UUCP Protocol:: The common UUCP protocol
|
|
* g Protocol:: The UUCP @samp{g} protocol
|
|
* f Protocol:: The UUCP @samp{f} protocol
|
|
* t Protocol:: The UUCP @samp{t} protocol
|
|
* e Protocol:: The UUCP @samp{e} protocol
|
|
* x Protocol:: The UUCP @samp{x} protocol
|
|
* d Protocol:: The UUCP @samp{d} protocol
|
|
* Capital G Protocol:: The UUCP @samp{G} protocol
|
|
* Documentation References:: Documentation references
|
|
@end menu
|
|
|
|
@node Grades, Lock Files, Protocols, Protocols
|
|
@section UUCP Grades
|
|
@cindex grades
|
|
|
|
Modern UUCP packages support grades for each command. The grades
|
|
generally range from @samp{A} (the highest) to @samp{Z} followed by
|
|
@samp{a} to @samp{z}. Taylor UUCP also supports @samp{0} to @samp{9}
|
|
before @samp{A}. Some UUCP packages may permit any ASCII character as a
|
|
grade.
|
|
|
|
On Unix, these grades are encoded in the name of the command file. A
|
|
command file name generally has the form
|
|
|
|
@example
|
|
C.nnnngssss
|
|
@end example
|
|
|
|
@noindent
|
|
where @var{nnnn} is the remote system name for which the command is
|
|
queued, @var{g} is a single character grade, and @var{ssss} is a four
|
|
character sequence number. For example, a command file created for the
|
|
system @file{airs} at grade @samp{Z} might be named
|
|
|
|
@example
|
|
C.airsZ2551
|
|
@end example
|
|
|
|
The remote system name will be truncated to seven characters, to ensure
|
|
that the command file name will fit in the 14 character file name limit
|
|
of the traditional Unix file system. UUCP packages which have no other
|
|
means of distinguishing which command files are intended for which
|
|
systems thus require all @emph{systems they connect to} to have names
|
|
that are unique in the first seven characters. Some UUCP packages use a
|
|
variant of this format which truncates the system name to six
|
|
characters. BNU uses a different spool directory format, which allows
|
|
up to fourteen characters to be used for each system name. The Taylor
|
|
UUCP spool directory format is configurable. The new Taylor spool
|
|
directory format permits system names to be as long as file names; the
|
|
maximum length of a file name depends on the particular Unix file system
|
|
being used.
|
|
|
|
The sequence number in the command file name may be a decimal integer,
|
|
or it may be a hexadecimal integer, or it may contain any alphanumeric
|
|
character. Different UUCP packages are different.
|
|
|
|
Taylor UUCP creates command files in the function
|
|
@code{zsysdep_spool_commands}. The file name is constructed by the
|
|
function @code{zsfile_name}, which knows about all the different types
|
|
of spool directories supported by Taylor UUCP. The Taylor UUCP sequence
|
|
number can contain any alphanumeric character; the next sequence number
|
|
is determined by the function @code{fscmd_seq}.
|
|
|
|
I do not know how command grades are handled in non-Unix UUCP
|
|
packages.
|
|
|
|
Modern UUCP packages allow you to restrict file transfer by grade
|
|
depending on the time of day. Typically this is done with a line in
|
|
the @file{Systems} (or @file{L.sys}) file like this:
|
|
|
|
@example
|
|
airs Any/Z,Any2305-0855 ...
|
|
@end example
|
|
|
|
This allows only grades @samp{Z} and above to be transferred at any
|
|
time. Lower grades may only be transferred at night. I believe that
|
|
this grade restriction applies to local commands as well as to remote
|
|
commands, but I am not sure. It may only apply if the UUCP package
|
|
places the call, not if it is called by the remote system. Taylor UUCP
|
|
can use the @code{timegrade} and @code{call-timegrade} commands
|
|
(@pxref{When to Call}) to achieve the same effect (and supports the
|
|
above format when reading @file{Systems} or @file{L.sys}).
|
|
|
|
This sort of grade restriction is most useful if you know what grades
|
|
are being used at the remote site. The default grades used depend on
|
|
the UUCP package. Generally @code{uucp} and @code{uux} have different
|
|
defaults. A particular grade can be specified with the @samp{-g} option
|
|
to @code{uucp} or @code{uux}. For example, to request execution of
|
|
rnews on airs with grade @samp{d}, you might use something like
|
|
|
|
@example
|
|
uux -gd - airs!rnews <article
|
|
@end example
|
|
|
|
@samp{uunet} queues up mail at grade @samp{Z} and news at grade
|
|
@samp{d}. The example above would allow mail to be received at any
|
|
time, but would only permit news to be transferred at night.
|
|
|
|
@node Lock Files, UUCP Protocol, Grades, Protocols
|
|
@section UUCP Lock File Format
|
|
@cindex lock files
|
|
|
|
This discussion applies only to Unix. I have no idea how UUCP locks
|
|
ports on other systems.
|
|
|
|
UUCP creates files to lock serial ports and systems. On most (if not
|
|
all) systems, these same lock files are also used by cu to coordinate
|
|
access to serial ports. On some systems getty also uses these lock
|
|
files.
|
|
|
|
The lock file normally contains the process ID of the locking process.
|
|
This makes it easy to determine whether a lock is still valid. The
|
|
algorithm is to create a temporary file and then link it to the name
|
|
that must be locked. If the link fails because a file with that name
|
|
already exists, the existing file is read to get the process ID. If the
|
|
process still exists, the lock attempt fails. Otherwise the lock file
|
|
is deleted and the locking algorithm is retried.
|
|
|
|
Older UUCP packages put the lock files in the main UUCP spool
|
|
directory, /usr/spool/uucp. BNU UUCP generally puts the lock files in
|
|
a directory of their own, usually /usr/spool/locks or /etc/locks.
|
|
|
|
The original UUCP lock file format encoded the process ID as a four byte
|
|
binary number. The order of the bytes was host-dependent. BNU UUCP
|
|
stores the process ID as a ten byte ASCII decimal number, with a
|
|
trailing newline. For example, if process 1570 holds a lock file, it
|
|
would contain the eleven characters space, space, space, space, space,
|
|
space, one, five, seven, zero, newline. Some versions of UUCP add a
|
|
second line indicating which program created the lock (uucp, cu, or
|
|
getty). I have also seen a third type of UUCP lock file which did not
|
|
contain the process ID at all.
|
|
|
|
The name of the lock file is generally "LCK.." followed by the base name
|
|
of the device. For example, to lock /dev/ttyd0 the file LCK..ttyd0
|
|
would be created. There are various exceptions. On SCO Unix, the lock
|
|
file name is always forced to lower case even if the device name has
|
|
upper case letters. System V Release 4 UUCP forms the lock file name
|
|
using the major and minor device numbers rather than the device name
|
|
(this is pretty sensible if you think about it).
|
|
|
|
Taylor UUCP can be configured to use various different types of locking.
|
|
The actual locking code is in the function @code{fsdo_lock}.
|
|
|
|
@node UUCP Protocol, g Protocol, Lock Files, Protocols
|
|
@section The Common UUCP Protocol
|
|
@cindex UUCP protocol
|
|
@cindex handshake
|
|
@cindex protocol (UUCP)
|
|
|
|
The UUCP protocol is a conversation between two UUCP packages. A UUCP
|
|
conversation consists of three parts: an initial handshake, a series
|
|
of file transfer requests, and a final handshake.
|
|
|
|
Before the initial handshake, the caller will usually have logged in the
|
|
called machine and somehow started the UUCP package there. On Unix this
|
|
is normally done by setting the shell of the login name used to
|
|
@file{uucico}.
|
|
|
|
@menu
|
|
* Initial Handshake:: Initial handshake
|
|
* File Requests:: File requests
|
|
* Final Handshake:: Final handshake
|
|
@end menu
|
|
|
|
@node Initial Handshake, File Requests, UUCP Protocol, UUCP Protocol
|
|
@subsection Initial Handshake
|
|
|
|
All messages in the initial handshake begin with a @samp{^P} (a byte
|
|
with the octal value \020) and end with a null byte (\000).
|
|
|
|
Taylor UUCP implements the initial handshake for the calling machine in
|
|
@code{fdo_call}, and for the called machine in @code{faccept_call}.
|
|
|
|
The initial handshake goes as follows. It is begun by the called
|
|
machine.
|
|
|
|
@table @asis
|
|
|
|
@item called: @samp{\020Shere=@var{hostname}\000}
|
|
The @var{hostname} is the UUCP name of the called machine. Older UUCP
|
|
packages do not output it, and simply send @samp{\020Shere\000}.
|
|
|
|
@item caller: @samp{\020S@var{hostname} @var{options}\000}
|
|
The @var{hostname} is the UUCP name of the calling machine. The
|
|
following @var{options} may appear (or there may be none):
|
|
|
|
@table @samp
|
|
|
|
@item -Q@var{seq}
|
|
Report sequence number for this conversation. The sequence number is
|
|
stored at both sites, and incremented after each call. If there is a
|
|
sequence number mismatch, something has gone wrong (somebody may have
|
|
broken security by pretending to be one of the machines) and the call is
|
|
denied. If the sequence number changes on one of the machines, perhaps
|
|
because of an attempted breakin or because a disk backup was restored,
|
|
the sequence numbers on the two machines must be reconciled manually.
|
|
|
|
@item -x@var{level}
|
|
Requests the called system to set its debugging level to the specified
|
|
value. This is not supported by all systems. Taylor UUCP currently
|
|
never generates this switch. When it sees it, it restricts the value
|
|
according to @code{max-remote-debug} (@pxref{Miscellaneous (sys)}).
|
|
|
|
@item -p@var{grade}
|
|
@itemx -vgrade=@var{grade}
|
|
Requests the called system to only transfer files of the specified grade
|
|
or higher. This is not supported by all systems. Some systems support
|
|
@samp{-p}, some support @samp{-vgrade=}. Taylor UUCP supports both.
|
|
|
|
@item -R
|
|
Indicates that the calling UUCP understands how to restart failed file
|
|
transmissions. Supported only by System V Release 4 UUCP.
|
|
|
|
@item -U@var{limit}
|
|
Reports the @code{ulimit} value of the calling UUCP. The limit is
|
|
specified as a base 16 number in C notation (e.g., @samp{-U0x1000000}).
|
|
This number is the number of 512 byte blocks in the largest file which
|
|
the calling UUCP can create. The called UUCP may not transfer a file
|
|
larger than this. Supported by System V Release 4 UUCP. Taylor UUCP
|
|
understands this option, but never generates it.
|
|
|
|
@item -N
|
|
Indicates that the calling UUCP understands the Taylor UUCP size
|
|
limiting extensions. Supported only by Taylor UUCP.
|
|
|
|
@end table
|
|
|
|
@item called: @samp{\020ROK\000}
|
|
There are actually several possible responses.
|
|
|
|
@table @samp
|
|
|
|
@item ROK
|
|
The calling UUCP is acceptable, and the handshake proceeds to the
|
|
protocol negotiation. Some options may also appear; see below.
|
|
|
|
@item ROKN
|
|
The calling UUCP is acceptable, it specified @samp{-N}, and the called
|
|
UUCP also understands the Taylor UUCP size limiting extensions.
|
|
Supported only by Taylor UUCP.
|
|
|
|
@item RLCK
|
|
The called UUCP already has a lock for the calling UUCP, which normally
|
|
indicates the two machines are already communicating.
|
|
|
|
@item RCB
|
|
The called UUCP will call back. This may be used to avoid impostors.
|
|
Note that only one machine out of each pair should call back, or no
|
|
conversation will ever begin.
|
|
|
|
@item RBADSEQ
|
|
The call sequence number is wrong (see the @samp{-Q} discussion above).
|
|
|
|
@item RLOGIN
|
|
The calling UUCP is using the wrong login name.
|
|
|
|
@item RYou are unknown to me
|
|
The calling UUCP is not known to the called UUCP, and the called UUCP
|
|
does not permit connections from unknown systems.
|
|
|
|
@end table
|
|
|
|
If the response is @samp{ROK}, the following options are supported by
|
|
System V Release 4 UUCP.
|
|
|
|
@table @samp
|
|
|
|
@item -R
|
|
The called UUCP knows how to restart failed file transmissions.
|
|
|
|
@item -U@var{limit}
|
|
Reports the ulimit value of the called UUCP. The limit is specified as
|
|
a base 16 number in C notation. This number is the number of 512 byte
|
|
blocks in the largest file which the called UUCP can create. The
|
|
calling UUCP may not send a file larger than this.
|
|
|
|
@item -x@var{level}
|
|
I'm told that this is sometimes sent by SVR4 UUCP, but I'm not sure
|
|
exactly what it means. It may request the calling UUCP to set its
|
|
debugging level to the specified value.
|
|
|
|
@end table
|
|
|
|
If the response is not @samp{ROK} (or @samp{ROKN}) both sides hang up
|
|
the phone, abandoning the call.
|
|
|
|
@item called: @samp{\020P@var{protocols}\000}
|
|
The @kbd{P} is a literal character. Note that the called UUCP outputs
|
|
two strings in a row. The @var{protocols} string is a list of UUCP
|
|
protocols supported by the caller. Each UUCP protocol has a single
|
|
character name. For example, the called UUCP might send
|
|
@samp{\020Pgf\000}.
|
|
|
|
@item caller: @samp{\020U@var{protocol}\000}
|
|
The @kbd{U} is a literal character. The calling UUCP selects which
|
|
@var{protocol} to use out of the protocols offered by the called UUCP.
|
|
If there are no mutually supported protocols, the calling UUCP sends
|
|
@samp{\020UN\000} and both sides hang up the phone. Otherwise the
|
|
calling UUCP sends something like @samp{\020Ug\000}.
|
|
|
|
@end table
|
|
|
|
Most UUCP packages will consider each locally supported protocol in turn
|
|
and select the first one supported by the called UUCP. With some
|
|
versions of BNU UUCP, this can be modified by giving a list of protocols
|
|
after the device name in the Devices file or the @file{Systems} file.
|
|
Taylor UUCP provides the @code{protocol} command which may be used
|
|
either for a system (@pxref{Protocol Selection}) or a port (@pxref{port
|
|
file}).
|
|
|
|
After the protocol has been selected and the initial handshake has been
|
|
completed, both sides turn on the selected protocol. For some protocols
|
|
(notably @samp{g}) a further handshake is done at this point.
|
|
|
|
Each protocol supports a method for sending a command to the remote
|
|
system. This method is used to transmit a series of commands between
|
|
the two UUCP packages. At all times, one package is the master and the
|
|
other is the slave. Initially, the calling UUCP is the master.
|
|
|
|
If a protocol error occurs during the exchange of commands, both sides
|
|
move immediately to the final handshake.
|
|
|
|
@node File Requests, Final Handshake, Initial Handshake, UUCP Protocol
|
|
@subsection File Requests
|
|
|
|
The master will send one of four commands: @samp{S}, @samp{R}, @samp{X}
|
|
or @samp{H}.
|
|
|
|
Any file name referred to below is either an absolute pathname beginning
|
|
with @samp{/}, a public directory pathname beginning with @samp{~/}, a
|
|
pathname relative to a user's home directory beginning with
|
|
@samp{~@var{user}/}, or a spool directory file name. File names in the
|
|
spool directory are not pathnames, but instead are converted to
|
|
pathnames within the spool directory by UUCP. They always begin with
|
|
@samp{C.} (for a command file created by @code{uucp} or @code{uux}),
|
|
@samp{D.} (for a data file created by @code{uucp}, @code{uux} or by an
|
|
execution, or received from another system for an execution), or
|
|
@samp{X.} (for an execution file created by @code{uux} or received from
|
|
another system).
|
|
|
|
Taylor UUCP chooses which request to send next in the function
|
|
@code{fuucp}. This is also where Taylor UUCP processes incoming
|
|
commands from the remote system.
|
|
|
|
@menu
|
|
* S Request:: S request
|
|
* R Request:: R request
|
|
* X Request:: X request
|
|
* H Request:: H request
|
|
@end menu
|
|
|
|
@node S Request, R Request, File Requests, File Requests
|
|
@subsubsection S Request
|
|
|
|
master: @samp{S @var{from} @var{to} @var{user} -@var{options} @var{temp}
|
|
@var{mode} @var{notify} @var{size}}
|
|
|
|
The @samp{S} and the @samp{-} are literal characters. This is a request
|
|
by the master to send a file to the slave. Taylor UUCP handles the
|
|
@samp{S} request in the function @code{fsend_file}.
|
|
|
|
@table @var
|
|
|
|
@item from
|
|
The name of the file to send. If the @samp{C} option does not appear in
|
|
@var{options}, the master will actually open and send this file.
|
|
Otherwise the file has been copied to the spool directory, where it is
|
|
named @var{temp}. The slave ignores this field unless @var{to} is a
|
|
directory, in which case the basename of @var{from} will be used as the
|
|
file name. If @var{from} is a spool directory filename, it must be a
|
|
data file created for or by an execution, and must begin with @samp{D.}.
|
|
|
|
@item to
|
|
The name to give the file on the slave. If this field names a directory
|
|
the file is placed within that directory with the basename of
|
|
@var{from}. A name ending in @samp{/} is taken to be a directory even
|
|
if one does not already exist with that name. If @var{to} begins with
|
|
@samp{X.}, an execution file will be created on the slave. Otherwise,
|
|
if @var{to} begins with @samp{D.} it names a data file to be used by
|
|
some execution file. Otherwise, @var{to} should not be in the spool
|
|
directory.
|
|
|
|
@item user
|
|
The name of the user who requested the transfer.
|
|
|
|
@item options
|
|
A list of options to control the transfer. The following options are
|
|
defined (all options are single characters):
|
|
|
|
@table @samp
|
|
|
|
@item C
|
|
The file has been copied to the spool directory (the master should use
|
|
@var{temp} rather than @var{from}).
|
|
|
|
@item c
|
|
The file has not been copied to the spool directory (this is the
|
|
default).
|
|
|
|
@item d
|
|
The slave should create directories as necessary (this is the default).
|
|
|
|
@item f
|
|
The slave should not create directories if necessary, but should fail
|
|
the transfer instead.
|
|
|
|
@item m
|
|
The master should send mail to @var{user} when the transfer is complete.
|
|
|
|
@item n
|
|
The slave should send mail to @var{notify} when the transfer is
|
|
complete.
|
|
|
|
@end table
|
|
|
|
@item temp
|
|
If the @samp{C} option appears in @var{options}, this names the file to
|
|
be sent. Otherwise if @var{from} is in the spool directory, @var{temp}
|
|
is the same as @var{from}. Otherwise @var{temp} is a dummy string,
|
|
normally @samp{D.0}. After the transfer has been succesfully completed,
|
|
the master will delete the file @var{temp}.
|
|
|
|
@item mode
|
|
This is an octal number giving the mode of the file on the master. If
|
|
the file is not in the spool directory, the slave will always create it
|
|
with mode 0666, except that if (@var{mode} & 0111) is not zero (the file
|
|
is executable), the slave will create the file with mode 0777. If the
|
|
file is in the spool directory, some UUCP packages will use the
|
|
algorithm above and some will always create the file with mode 0600
|
|
(Taylor UUCP does the latter).
|
|
|
|
@item notify
|
|
This field is only used if the @samp{n} option appears in @var{options}.
|
|
Otherwise, it may not appear, or it may be the string @samp{dummy}, or
|
|
it may simply be a pair of double quotes. If the @samp{n} option is
|
|
specified, then when the transfer is successfully completed the slave
|
|
will send mail to @var{notify}, which must be a legal mailing address on
|
|
the slave.
|
|
|
|
@item size
|
|
This field is only present when doing size negotiation, either with
|
|
Taylor UUCP or SVR4 UUCP. It is the size of the file in bytes. SVR4
|
|
UUCP sends the size in base 16 as 0x@dots{} while Taylor UUCP sends the
|
|
size as a decimal integer (a later version of Taylor UUCP will probably
|
|
change to the SVR4 behaviour).
|
|
|
|
@end table
|
|
|
|
The slave then responds with an S command response. Taylor UUCP
|
|
generates these responses in @code{freceive_file} and
|
|
@code{ftransfer_fail}.
|
|
|
|
@table @samp
|
|
|
|
@item SY @var{start}
|
|
The slave is willing to accept the file, and file transfer begins. The
|
|
@var{start} field will only be present when using SVR4 file restart. It
|
|
specifies the byte offset into the file at which to start sending. If
|
|
this is a new file, @var{start} will be 0x0.
|
|
|
|
@item SN2
|
|
The slave denies permission to transfer the file. This can mean that
|
|
the destination directory may not be accessed, or that no requests are
|
|
permitted. It implies that the file transfer will never succeed.
|
|
|
|
@item SN4
|
|
The slave is unable to create the necessary temporary file. This
|
|
implies that the file transfer might succeed later.
|
|
|
|
@item SN6
|
|
This is only used by Taylor UUCP size negotiation. It means that the
|
|
slave considers the file too large to transfer at the moment, but it may
|
|
be possible to transfer it at some other time.
|
|
|
|
@item SN7
|
|
This is only used by Taylor UUCP size negotiation. It means that the
|
|
slave considers the file too large to ever transfer.
|
|
|
|
@end table
|
|
|
|
If the slave responds with @samp{SY}, a file transfer begins. When the
|
|
file transfer is complete, the slave sends a @samp{C} command response.
|
|
Taylor UUCP generates this confirmation in @code{fprecfile_confirm} and
|
|
checks it in @code{fpsendfile_confirm}.
|
|
|
|
@table @samp
|
|
|
|
@item CY
|
|
The file transfer was successful.
|
|
|
|
@item CN5
|
|
The temporary file could not be moved into the final location. This
|
|
implies that the file transfer will never succeed.
|
|
|
|
@end table
|
|
|
|
After the @samp{C} command response has been received (in the @samp{SY}
|
|
case) or immediately (in an @samp{SN} case) the master will send another
|
|
command.
|
|
|
|
@node R Request, X Request, S Request, File Requests
|
|
@subsubsection R Request
|
|
|
|
master: @samp{R @var{from} @var{to} @var{user} -@var{options}
|
|
@var{size}}
|
|
|
|
The @samp{R} and the @samp{-} are literal characters. This is a request
|
|
by the master to receive a file from the slave. I do not know how SVR4
|
|
UUCP implements file transfer restart in this case. Taylor UUCP
|
|
implements the @samp{R} request in @code{freceive_file}.
|
|
|
|
@table @var
|
|
|
|
@item from
|
|
This is the name of the file on the slave which the master wishes to
|
|
receive. It must not be in the spool directory, and it may not contain
|
|
any wildcards.
|
|
|
|
@item to
|
|
This is the name of the file to create on the master. I do not believe
|
|
that it can be a directory. It may only be in the spool directory if
|
|
this file is being requested to support an execution either on the
|
|
master or on some system other than the slave.
|
|
|
|
@item user
|
|
The name of the user who requested the transfer.
|
|
|
|
@item options
|
|
A list of options to control the transfer. The following options are
|
|
defined (all options are single characters):
|
|
|
|
@table @samp
|
|
|
|
@item d
|
|
The master should create directories as necessary (this is the default).
|
|
|
|
@item f
|
|
The master should not create directories if necessary, but should fail
|
|
the transfer instead.
|
|
|
|
@item m
|
|
The master should send mail to @var{user} when the transfer is complete.
|
|
|
|
@end table
|
|
|
|
@item size
|
|
This only appears if Taylor UUCP size negotiation is being used. It
|
|
specifies the largest file which the master is prepared to accept (when
|
|
using SVR4 UUCP, this was specified in the @samp{-U} option during the
|
|
initial handshake).
|
|
|
|
@end table
|
|
|
|
The slave then responds with an @samp{R} command response. Taylor UUCP
|
|
generates these responses in @code{fsend_file} and
|
|
@code{ftransfer_fail}.
|
|
|
|
@table @samp
|
|
|
|
@item RY @var{mode}
|
|
The slave is willing to send the file, and file transfer begins.
|
|
@var{mode} is the octal mode of the file on the slave. The master uses
|
|
this to set the mode of the file on the master's system just as the
|
|
slave does the @var{mode} argument in the send command (@pxref{S
|
|
Request}).
|
|
|
|
@item RN2
|
|
The slave is not willing to send the file, either because it is not
|
|
permitted or because the file does not exist. This implies that the
|
|
file request will never succeed.
|
|
|
|
@item RN6
|
|
This is only used by Taylor UUCP size negotiation. It means that the
|
|
file is too large to send, either because of the size limit specifies by
|
|
the master or because the slave considers it too large. The file
|
|
transfer might succeed later, or it might not (this will be cleared up
|
|
in a later release of Taylor UUCP).
|
|
|
|
@end table
|
|
|
|
If the slave responds with @samp{RY}, a file transfer begins. When the
|
|
file transfer is complete, the master sends a @samp{C} command. The
|
|
slave pretty much ignores this, although it may log it. Taylor UUCP
|
|
sends this confirmation in @code{fprecfile_confirm} and checks it in
|
|
@code{fpsendfile_confirm}.
|
|
|
|
@table @samp
|
|
|
|
@item CY
|
|
The file transfer was successful.
|
|
|
|
@item CN5
|
|
The temporary file could not be moved into the final
|
|
location.
|
|
|
|
@end table
|
|
|
|
After the @samp{C} command response has been sent (in the @samp{RY}
|
|
case) or immediately (in an @samp{RN} case) the master will send another
|
|
command.
|
|
|
|
@node X Request, H Request, R Request, File Requests
|
|
@subsubsection X Request
|
|
|
|
master: @samp{X @var{from} @var{to} @var{user} -@var{options}}
|
|
|
|
The @samp{X} and the @samp{-} are literal characters. This is a request
|
|
by the master to, in essence, execute @code{uucp} on the slave. The
|
|
slave should execute @samp{uucp @var{from} @var{to}}. Taylor UUCP
|
|
generates the @samp{X} request in @code{fxcmd} and handles it in
|
|
@code{fdo_xcmd}.
|
|
|
|
@table @var
|
|
|
|
@item from
|
|
This is the name of the file or files on the slave which the master
|
|
wishes to transfer. Any wildcards are expanded on the slave. If the
|
|
master is requesting that the files be transferred to itself, the
|
|
request would normally contain wildcard characters, since otherwise an
|
|
@samp{R} command would suffice. The master can also use this command to
|
|
request that the slave transfer files to a third system.
|
|
|
|
@item to
|
|
This is the name of the file or directory to which the files should be
|
|
transferred. This will normally use a UUCP name. For example, if the
|
|
master wishes to receive the files itself, it would use
|
|
@file{@var{master}!@var{path}}.
|
|
|
|
@item user
|
|
The name of the user who requested the transfer.
|
|
|
|
@item options
|
|
A list of options to control the transfer. It is not clear which, if
|
|
any, options are supported by most UUCP packages. Taylor UUCP ignores
|
|
the options field.
|
|
|
|
@end table
|
|
|
|
The slave then responds with an X command response. Taylor UUCP sends
|
|
this response in either @code{fxcmd_confirm} or @code{ftransfer_fail}.
|
|
|
|
@table @samp
|
|
|
|
@item XY
|
|
The request was accepted, and the appropriate file transfer commands
|
|
have been queued up for later processing.
|
|
|
|
@item XN
|
|
The request was denied. No particular reason is given.
|
|
|
|
@end table
|
|
|
|
In either case, the master will then send another command.
|
|
|
|
@node H Request, , X Request, File Requests
|
|
@subsubsection H Request
|
|
|
|
master: @samp{H}
|
|
|
|
This is used by the master to hang up the connection. The slave will
|
|
respond with an @samp{H} command response. Taylor UUCP processes this
|
|
request in @code{fhangup_request}, @code{fhangup_reply}, and
|
|
@code{fgetcmd}.
|
|
|
|
@table @samp
|
|
|
|
@item HY
|
|
The slave agrees to hang up the connection. In this case the master
|
|
sends another @samp{HY} command. In some UUCP packages, including
|
|
Taylor UUCP, the slave will then send a third @samp{HY} command. At
|
|
this point the protocol is shut down, and the final handshake is begun.
|
|
|
|
@item HN
|
|
The slave does not agree to hang up. In this case the master and the
|
|
slave exchange roles. The next command will be sent by the former
|
|
slave, which is the new master. The roles may be reversed several times
|
|
during a single connection.
|
|
|
|
@end table
|
|
|
|
@node Final Handshake, , File Requests, UUCP Protocol
|
|
@subsection Final Handshake
|
|
|
|
After the protocol has been shut down, the final handshake is
|
|
performed. This handshake has no real purpose, and some UUCP packages
|
|
simply drop the connection rather than do it (in fact, some will drop
|
|
the connection immediately after both sides agree to hangup, without
|
|
even closing down the protocol). Taylor UUCP always sends the
|
|
appropriate final handshake string (in @code{fdo_call} or
|
|
@code{faccept_call}) but ignores the handshake string from the other
|
|
side unless it is in @samp{handshake} debugging mode.
|
|
|
|
@table @asis
|
|
|
|
@item caller: @samp{\020OOOOOO\000}
|
|
|
|
@item called: @samp{\020OOOOOOO\000}
|
|
|
|
@end table
|
|
|
|
That is, the calling UUCP sends six letter O's and the called UUCP
|
|
replies with seven letter O's. Some UUCP packages always send six O's.
|
|
|
|
@node g Protocol, f Protocol, UUCP Protocol, Protocols
|
|
@section The UUCP @samp{g} Protocol
|
|
@cindex g protocol
|
|
@cindex protocol (g)
|
|
|
|
The @samp{g} protocol is a packet based flow controlled error correcting
|
|
protocol that requires an eight bit clear connection. It is the
|
|
original UUCP protocol, and is supported by all UUCP implementations.
|
|
Many implementations of it are only able to support small window and
|
|
packet sizes, specifically a window size of 3 and a packet size of 64
|
|
bytes, but the protocol itself can support up to a window size of 7 and
|
|
a packet size of 4096 bytes. Complaints about the inefficiency of the
|
|
@samp{g} protocol generally refer to specific implementations, rather
|
|
than the correctly implemented protocol.
|
|
|
|
The @samp{g} protocol was originally designed for general packet drivers,
|
|
and thus contains some features that are not used by UUCP, including
|
|
an alternate data channel and the ability to renegotiate packet and
|
|
window sizes during the communication session.
|
|
|
|
The @samp{g} protocol is spoofed by many Telebit modems. When spoofing is
|
|
in effect, each Telebit modem uses the @samp{g} protocol to communicate
|
|
with the attached computer, but the data between the modems is sent
|
|
using a Telebit proprietary error correcting protocol. This allows
|
|
for very high throughput over the Telebit connection, which, because
|
|
it is half-duplex, would not normally be able to handle the @samp{g}
|
|
protocol very well at all.
|
|
|
|
This discussion of the @samp{g} protocol explains how it works, but does
|
|
not discuss useful error handling techniques. Some discussion of this
|
|
can be found in Jamie E. Hanrahan's paper (@pxref{Documentation
|
|
references}). A detailed examination of the source code would also be
|
|
profitable.
|
|
|
|
The Taylor UUCP code to handle the @samp{g} protocol is in the file
|
|
@file{protg.c}. There are a number of functions; the most important
|
|
ones are @code{fgstart}, @code{fgsend_control}, @code{fgsenddata}, and
|
|
@code{fgprocess_data}.
|
|
|
|
All @samp{g} protocol communication is done with packets. Each packet
|
|
begins with a six byte header. Control packets consist only of the
|
|
header. Data packets contain additional data.
|
|
|
|
The header is as follows:
|
|
|
|
@table @asis
|
|
|
|
@item @samp{\020}
|
|
Every packet begins with a @samp{^P}.
|
|
|
|
@item @var{k} (1 <= @var{k} <= 9)
|
|
@ifinfo
|
|
The @var{k} value is always 9 for a control packet. For a data packet,
|
|
the @var{k} value indicates how must data follows the six byte header.
|
|
The amount of data is 2 ** (@var{k} + 4), where ** indicates
|
|
exponentiation. Thus a @var{k} value of 1 means 32 data bytes and a
|
|
@var{k} value of 8 means 4096 data bytes. The @var{k} value for a data
|
|
packet must be between 1 and 8 inclusive.
|
|
@end ifinfo
|
|
@iftex
|
|
The @var{k} value is always 9 for a control packet. For a data packet,
|
|
the @var{k} value indicates how must data follows the six byte header.
|
|
The amount of data is @math{2^{@var{k} + 4}}. Thus a @var{k} value of 1
|
|
means 32 data bytes and a @var{k} value of 8 means 4096 data bytes. The
|
|
@var{k} value for a data packet must be between 1 and 8 inclusive.
|
|
@end iftex
|
|
|
|
@item checksum low byte
|
|
@itemx checksum high byte
|
|
The checksum value is described below.
|
|
|
|
@item control byte
|
|
The control packet indicates the type of packet, and is described below.
|
|
|
|
@item xor byte
|
|
This byte is the xor of @var{k}, the checksum low byte, the checksum
|
|
high byte and the control byte (i.e. the second, third, fourth and fifth
|
|
header bytes). It is used to ensure that the header data is valid.
|
|
|
|
@end table
|
|
|
|
The control byte in the header is composed of three bit fields, referred
|
|
to here as @var{tt} (two bits), @var{xxx} (three bits) and @var{yyy}
|
|
(three bits). The complete byte is @var{ttxxxyyy}, or (@var{tt} << 6) +
|
|
(@var{xxx} << 3) + @var{yyy}.
|
|
|
|
The @var{tt} field takes on the following values:
|
|
|
|
@table @asis
|
|
|
|
@item 0
|
|
This is a control packet. In this case the @var{k} byte in the header
|
|
must be 9. The @var{xxx} field indicates the type of control packet;
|
|
the types are described below.
|
|
|
|
@item 1
|
|
This is an alternate data channel packet. This is not used by UUCP.
|
|
|
|
@item 2
|
|
This is a data packet, and the entire contents of the attached data
|
|
field (whose length is given by the @var{k} byte in the header) are
|
|
valid. The @var{xxx} and @var{yyy} fields are described below.
|
|
|
|
@item 3
|
|
This is a short data packet. Let the length of the data field (as given
|
|
by the @var{k} byte in the header) be @code{l}. Let the first byte in
|
|
the data field be @code{b1}. If @code{b1} is less than 128 (if the most
|
|
significant bit of @code{b1} is 0), then there are @code{l - b1} valid
|
|
bytes of data in the data field, beginning with the second byte. If
|
|
@code{b1 >= 128}, let @code{b2} be the second byte in the data field.
|
|
Then there are @code{l - ((b1 & 0x7f) + (b2 << 7))} valid bytes of data
|
|
in the data field, beginning with the third byte. In all cases @code{l}
|
|
bytes of data are sent (and all data bytes participate in the checksum
|
|
calculation) but some of the trailing bytes may be dropped by the
|
|
receiver. The @var{xxx} and @var{yyy} fields are described below.
|
|
|
|
@end table
|
|
|
|
In a data packet (short or not) the @var{xxx} field gives the sequence
|
|
number of the packet. Thus sequence numbers can range from 0 to 7,
|
|
inclusive. The @var{yyy} field gives the sequence number of the last
|
|
correctly received packet.
|
|
|
|
Each communication direction uses a window which indicates how many
|
|
unacknowledged packets may be transmitted before waiting for an
|
|
acknowledgement. The window may range from 1 to 7 packets, and may be
|
|
different in each direction. For example, if the window is 3 and the
|
|
last packet acknowledged was packet number 6, packet numbers 7, 0 and 1
|
|
may be sent but the sender must wait for an acknowledgement before
|
|
sending packet number 2. This acknowledgement could come as the
|
|
@var{yyy} field of a data packet or as the @var{yyy} field of a
|
|
@code{RJ} or @code{RR} control packet (described below).
|
|
|
|
Each packet must be transmitted in order (the sender may not skip
|
|
sequence numbers). Each packet must be acknowledged, and each packet
|
|
must be acknowledged in order.
|
|
|
|
In a control packet, the @var{xxx} field takes on the following values:
|
|
|
|
@table @asis
|
|
|
|
@item 1 @code{CLOSE}
|
|
The connection should be closed immediately. This is typically sent
|
|
when one side has seen too many errors and wants to give up. It is also
|
|
sent when shutting down the protocol. If an unexpected @code{CLOSE}
|
|
packet is received, a @code{CLOSE} packet should be sent in reply and
|
|
the @samp{g} protocol should halt, causing UUCP to enter the final
|
|
handshake.
|
|
|
|
@item 2 @code{RJ} or @code{NAK}
|
|
The last packet was not received correctly. The @var{yyy} field
|
|
contains the sequence number of the last correctly received packet.
|
|
|
|
@item 3 @code{SRJ}
|
|
Selective reject. The @var{yyy} field contains the sequence number of a
|
|
packet that was not received correctly, and should be retransmitted.
|
|
This is not used by UUCP, and most implementations will not recognize
|
|
it. Taylor UUCP will recognize it but not generate it.
|
|
|
|
@item 4 @code{RR} or @code{ACK}
|
|
Packet acknowledgement. The @var{yyy} field contains the sequence
|
|
number of the last correctly received packet.
|
|
|
|
@item 5 @code{INITC}
|
|
Third initialization packet. The @var{yyy} field contains the maximum
|
|
window size to use.
|
|
|
|
@item 6 @code{INITB}
|
|
@ifinfo
|
|
Second initialization packet. The @var{yyy} field contains the packet
|
|
size to use. It requests a size of 2 ** (@var{yyy} + 5). Note that
|
|
this is not the same coding used for the @var{k} byte in the packet
|
|
header (it is 1 less). Some UUCP implementations can handle any packet
|
|
size up to that specified; some can only handled exactly the size
|
|
specified. Taylor UUCP will always accept any packet size.
|
|
@end ifinfo
|
|
@iftex
|
|
Second initialization packet. The @var{yyy} field contains the packet
|
|
size to use. It requests a size of @math{2^{@var{yyy}+5}}. Note that
|
|
this is not the same coding used for the @var{k} byte in the packet
|
|
header (it is 1 less). Some UUCP implementations can handle any packet
|
|
size up to that specified; some can only handled exactly the size
|
|
specified. Taylor UUCP will always accept any packet size.
|
|
@end iftex
|
|
|
|
@item 7 @code{INITA}
|
|
First initialization packet. The @var{yyy} field contains the maximum
|
|
window size to use.
|
|
|
|
@end table
|
|
|
|
To compute the checksum, call the control byte (the fifth byte in the
|
|
header) @code{c}.
|
|
|
|
The checksum of a control packet is simply @code{0xaaaa - c}.
|
|
|
|
The checksum of a data packet is @code{0xaaaa - (@var{check} ^ c)}
|
|
(@code{^} denotes exclusive or, as in C), and @code{@var{check}} is the
|
|
result of the following routine run on the contents of the data field
|
|
(every byte in the data field participates in the checksum, even for a
|
|
short data packet). Below is the routine used by Taylor UUCP; it is a
|
|
slightly modified version of a routine which John Gilmore patched from
|
|
G.L. Chesson's original paper. The @code{z} argument points to the
|
|
data and the @code{c} argument indicates how much data there is.
|
|
|
|
@example
|
|
int
|
|
igchecksum (z, c)
|
|
register const char *z;
|
|
register int c;
|
|
@{
|
|
register unsigned int ichk1, ichk2;
|
|
|
|
ichk1 = 0xffff;
|
|
ichk2 = 0;
|
|
|
|
do
|
|
@{
|
|
register unsigned int b;
|
|
|
|
/* Rotate ichk1 left. */
|
|
if ((ichk1 & 0x8000) == 0)
|
|
ichk1 <<= 1;
|
|
else
|
|
@{
|
|
ichk1 <<= 1;
|
|
++ichk1;
|
|
@}
|
|
|
|
/* Add the next character to ichk1. */
|
|
b = *z++ & 0xff;
|
|
ichk1 += b;
|
|
|
|
/* Add ichk1 xor the character position in the buffer
|
|
counting from the back to ichk2. */
|
|
ichk2 += ichk1 ^ c;
|
|
|
|
/* If the character was zero, or adding it to ichk1
|
|
caused an overflow, xor ichk2 to ichk1. */
|
|
if (b == 0 || (ichk1 & 0xffff) < b)
|
|
ichk1 ^= ichk2;
|
|
@}
|
|
while (--c > 0);
|
|
|
|
return ichk1 & 0xffff;
|
|
@}
|
|
@end example
|
|
|
|
When the @samp{g} protocol is started, the calling UUCP sends an INITA
|
|
control packet with the window size it wishes the called UUCP to use.
|
|
The called UUCP responds with an INITA packet with the window size it
|
|
wishes the calling UUCP to use. Pairs of INITB and INITC packets are
|
|
then similarly exchanged. When these exchanges are completed, the
|
|
protocol is considered to have been started. The window size is sent
|
|
twice, with both the INITA and the INITC packets.
|
|
|
|
When a UUCP package transmits a command, it sends one or more data
|
|
packets. All the data packets will normally be complete, although some
|
|
UUCP packages may send the last one as a short packet. The command
|
|
string is sent with a trailing null byte, to let the receiving package
|
|
know when the command is finished. Some UUCP packages require the last
|
|
byte of the last packet sent to be null, even if the command ends
|
|
earlier in the packet. Some packages may require all the trailing bytes
|
|
in the last packet to be null, but I have not confirmed this.
|
|
|
|
When a UUCP package sends a file, it will send a sequence of data
|
|
packets. The end of the file is signalled by a short data packet
|
|
containing zero valid bytes (it will normally be preceeded by a short
|
|
data packet containing the last few bytes in the file).
|
|
|
|
Note that the sequence numbers cover the entire communication session,
|
|
including both command and file data.
|
|
|
|
When the protocol is shut down, each UUCP package sends a @code{CLOSE}
|
|
control packet.
|
|
|
|
@node f Protocol, t Protocol, g Protocol, Protocols
|
|
@section The UUCP @samp{f} Protocol
|
|
@cindex f protocol
|
|
@cindex protocol (f)
|
|
|
|
The @samp{f} protocol is a seven bit protocol which checksums an entire
|
|
file at a time. It only uses the characters between \040 and \176
|
|
(ASCII space and @samp{~}) inclusive as well as the carriage return
|
|
character. It can be very efficient for transferring text only data,
|
|
but it is very inefficient at transferring eight bit data (such as
|
|
compressed news). It is not flow controlled, and the checksum is fairly
|
|
insecure over large files, so using it over a serial connection requires
|
|
handshaking (@code{XON}/@code{XOFF} can be used) and error correcting
|
|
modems. Some people think it should not be used even under those
|
|
circumstances.
|
|
|
|
I believe the @samp{f} protocol originated in BSD versions of UUCP. It was
|
|
originally intended for transmission over X.25 PAD links.
|
|
|
|
The Taylor UUCP code for the @samp{f} protocol is in @file{protf.c}.
|
|
|
|
The @samp{f} protocol has no startup or finish protocol. However, both
|
|
sides typically sleep for a couple of seconds before starting up,
|
|
because they switch the terminal into @code{XON}/@code{XOFF} mode and
|
|
want to allow the changes to settle before beginning transmission.
|
|
|
|
When a UUCP package transmits a command, it simply sends a string
|
|
terminated by a carriage return.
|
|
|
|
When a UUCP package transmits a file, each byte b of the file is
|
|
translated according to the following table:
|
|
|
|
@example
|
|
0 <= b <= 037: 0172, b + 0100 (0100 to 0137)
|
|
040 <= b <= 0171: b ( 040 to 0171)
|
|
0172 <= b <= 0177: 0173, b - 0100 ( 072 to 077)
|
|
0200 <= b <= 0237: 0174, b - 0100 (0100 to 0137)
|
|
0240 <= b <= 0371: 0175, b - 0200 ( 040 to 0171)
|
|
0372 <= b <= 0377: 0176, b - 0300 ( 072 to 077)
|
|
@end example
|
|
|
|
That is, a byte between \040 and \171 inclusive is transmitted as is,
|
|
and all other bytes are prefixed and modified as shown.
|
|
|
|
When all the file data is sent, a seven byte sequence is sent: two bytes
|
|
of \176 followed by four ASCII bytes of the checksum as printed in base
|
|
16 followed by a carriage return. For example, if the checksum was
|
|
0x1234, this would be sent: "\176\1761234\r".
|
|
|
|
The checksum is initialized to 0xffff. For each byte that is sent it is
|
|
modified as follows (where @code{b} is the byte before it has been
|
|
transformed as described above):
|
|
|
|
@example
|
|
/* Rotate the checksum left. */
|
|
if ((ichk & 0x8000) == 0)
|
|
ichk <<= 1;
|
|
else
|
|
@{
|
|
ichk <<= 1;
|
|
++ichk;
|
|
@}
|
|
|
|
/* Add the next byte into the checksum. */
|
|
ichk += b;
|
|
@end example
|
|
|
|
When the receiving UUCP sees the checksum, it compares it against its
|
|
own calculated checksum and replies with a single character followed
|
|
by a carriage return.
|
|
|
|
@table @samp
|
|
|
|
@item G
|
|
The file was received correctly.
|
|
|
|
@item R
|
|
The checksum did not match, and the file should be resent from the
|
|
beginning.
|
|
|
|
@item Q
|
|
The checksum did not match, but too many retries have occurred and the
|
|
communication session should be abandoned.
|
|
|
|
@end table
|
|
|
|
The sending UUCP checks the returned character and acts accordingly.
|
|
|
|
@node t Protocol, e Protocol, f Protocol, Protocols
|
|
@section The UUCP @samp{t} Protocol
|
|
@cindex t protocol
|
|
@cindex protocol (t)
|
|
|
|
The @samp{t} protocol is intended for TCP links. It does no error
|
|
checking or flow control, and requires an eight bit clear channel.
|
|
|
|
I believe the @samp{t} protocol originated in BSD versions of UUCP.
|
|
|
|
The Taylor UUCP code for the @samp{t} protocol is in @file{prott.c}.
|
|
|
|
When a UUCP package transmits a command, it first gets the length of the
|
|
command string, @var{c}. It then sends ((@var{c} / 512) + 1) * 512
|
|
bytes (the smallest multiple of 512 which can hold @var{c} bytes plus a
|
|
null byte) consisting of the command string itself followed by trailing
|
|
null bytes.
|
|
|
|
When a UUCP package sends a file, it sends it in blocks. Each block
|
|
contains at most 1024 bytes of data. Each block consists of four bytes
|
|
containing the amount of data in binary (most significant byte first,
|
|
the same format as used by the Unix function @code{htonl}) followed by
|
|
that amount of data. The end of the file is signalled by a block
|
|
containing zero bytes of data.
|
|
|
|
@node e Protocol, x Protocol, t Protocol, Protocols
|
|
@section The UUCP @samp{e} Protocol
|
|
@cindex e protocol
|
|
@cindex protocol (e)
|
|
|
|
The @samp{e} protocol is similar to the @samp{t} protocol. It does no
|
|
flow control or error checking and is intended for use over TCP.
|
|
|
|
The @samp{e} protocol originated in versions of BNU UUCP.
|
|
|
|
The Taylor UUCP code for the @samp{e} protocol is in @file{prote.c}.
|
|
|
|
When a UUCP package transmits a command, it simply sends the command as
|
|
an ASCII string terminated by a null byte.
|
|
|
|
When a UUCP package transmits a file, it sends the complete size of the
|
|
file as an ASCII decimal number. The ASCII string is padded out to 20
|
|
bytes with null bytes (i.e., if the file is 1000 bytes long, it sends
|
|
@samp{1000\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}). It then sends the entire
|
|
file.
|
|
|
|
@node x Protocol, d Protocol, e Protocol, Protocols
|
|
@section The UUCP @samp{x} Protocol
|
|
|
|
I believe that the @samp{x} protocol was intended for use over X.25
|
|
virtual circuits. It relies on a write of zero bytes being read as zero
|
|
bytes without stopping communication. I have heard that it does not
|
|
work correctly. If someone would care to fill this in more, I would be
|
|
grateful. Taylor UUCP does not implement the @samp{x} protocol.
|
|
|
|
@node d Protocol, Capital G Protocol, x Protocol, Protocols
|
|
@section The UUCP @samp{d} Protocol
|
|
|
|
This is apparently used for DataKit connections, and relies on a write
|
|
of zero bytes being read as zero bytes, much as the @samp{x} protocol
|
|
does. I don't really know anything else about it. Taylor UUCP does not
|
|
implement the @samp{d} protocol.
|
|
|
|
@node Capital G Protocol, Documentation References, d Protocol, Protocols
|
|
@section The UUCP @samp{G} Protocol
|
|
|
|
The @samp{G} protocol is apparently simply the @samp{g} protocol, except
|
|
that it is known to support all possible window and packet sizes. It
|
|
was introduced by SVR4 UUCP; the SVR4 implementation of the @samp{g}
|
|
protocol is apparently fixed at a packet size of 64 and a window size of
|
|
7. Taylor UUCP does not recognize the @samp{G} protocol. It does
|
|
support all window and packet sizes for the @samp{g} protocol.
|
|
|
|
@node Documentation References, , Capital G Protocol, Protocols
|
|
@section Documentation References
|
|
|
|
I took a lot of the information from Jamie E. Hanrahan's paper in the
|
|
Fall 1990 DECUS Symposium, and from Managing UUCP and Usenet by Tim
|
|
O'Reilly and Grace Todino (with contributions by several other people).
|
|
The latter includes most of the former, and is published by O'Reilly &
|
|
Associates, Inc.
|
|
|
|
Some information is originally due to a Usenet article by Chuck Wegrzyn.
|
|
The information on the @samp{g} protocol comes partially from a paper by
|
|
G.L. Chesson of Bell Laboratories, partially from Jamie E. Hanrahan's
|
|
paper, and partially from source code by John Gilmore. The information
|
|
on the @samp{f} protocol comes from the source code by Piet Berteema.
|
|
The information on the @samp{t} protocol comes from the source code by
|
|
Rick Adams. The information on the @samp{e} protocol comes from a
|
|
Usenet article by Matthias Urlichs.
|
|
|
|
@node Hacking, Acknowledgements, Protocols, Top
|
|
@chapter Hacking Taylor UUCP
|
|
|
|
This chapter provides the briefest of guides to the Taylor UUCP source
|
|
code itself.
|
|
|
|
@menu
|
|
* System Dependence:: System Dependence
|
|
* Naming Conventions:: Naming Conventions
|
|
* Patches:: Patches
|
|
@end menu
|
|
|
|
@node System Dependence, Naming Conventions, Hacking, Hacking
|
|
@section System Dependence
|
|
|
|
The code is carefully segregated into a system independent portion and a
|
|
system dependent portion. The system dependent code is in @file{sys?.*}
|
|
and @file{tcp.c}. Note that @file{sysh.*} is included as
|
|
@file{sysdep.h}. Currently the only system dependent files are for
|
|
Unix, and the file name for all of them ends in @file{.unx}. Hopefully
|
|
the code will eventually be ported to other systems.
|
|
|
|
With the right configuration parameters, the system independent code
|
|
calls only ANSI C functions. Some of the less common ANSI C functions
|
|
are also provided in @file{util.c}. The replacement function
|
|
@code{strtol} in @file{util.c} assumes that the characters @kbd{A} to
|
|
@kbd{F} and @kbd{a} to @kbd{f} appear in strictly sequential order. The
|
|
function @code{igradecmp} in @file{config.c} assumes that the upper and
|
|
lower case letters appear in order. Both assumptions are true for ASCII
|
|
and EBCDIC, but neither is guaranteed by ANSI C. The replacement
|
|
function @code{memmove} in @file{util.c} assumes that two arbitrary
|
|
pointers may be safely compared. Disregarding these caveats, I believe
|
|
that the system independent portion of the code is strictly conforming.
|
|
|
|
That's not too exciting, since all the work is done in the system
|
|
dependent code. I think that this code can conform to POSIX 1003.1,
|
|
given the right compilation parameters. I'm a bit less certain about
|
|
this, though.
|
|
|
|
The code is in use on a 16 bit segmented system with no function
|
|
prototypes, so I'm certain that all casts to long and pointers are done
|
|
when necessary.
|
|
|
|
The code uses alloca extensively. It comes with a simple replacement,
|
|
in @file{alloca.c} (otherwise I would lost ANSI C conformance, after
|
|
all). Using a real @code{alloca} function will be considerably more
|
|
efficient. It will also cause significant stack usage, which may be a
|
|
problem on systems without virtual memory.
|
|
|
|
@node Naming Conventions, Patches, System Dependence, Hacking
|
|
@section Naming Conventions
|
|
|
|
I use a modified Hungarian naming convention for my variables and
|
|
functions. As with all naming conventions, the code is rather opaque if
|
|
you are not familiar with it, but becomes clear and easy to use with
|
|
time.
|
|
|
|
The first character indicates the type of the variable (or function
|
|
return value). Sometimes additional characters are used. I use the
|
|
following type prefixes:
|
|
|
|
@table @samp
|
|
@item a
|
|
array; the next character is the type of an element
|
|
@item b
|
|
byte or character
|
|
@item c
|
|
count of something
|
|
@item e
|
|
stdio FILE *
|
|
@item f
|
|
boolean
|
|
@item i
|
|
generic integer
|
|
@item l
|
|
double
|
|
@item o
|
|
file descriptor (as returned by open, creat, etc.)
|
|
@item p
|
|
generic pointer
|
|
@item q
|
|
pointer to structure
|
|
@item s
|
|
structure
|
|
@item u
|
|
void (function return values only)
|
|
@item z
|
|
character string
|
|
@end table
|
|
|
|
A generic pointer ('p') is sometimes a @code{void *}, sometimes a
|
|
function pointer in which case the prefix is pf, and sometimes a pointer
|
|
to another type, in which case the next character is the type to which
|
|
it points (pf is overloaded).
|
|
|
|
An array of strings (@code{char *[]}) would be named @code{az} (array of
|
|
string). If this array were passed to a function, the function
|
|
parameter would be named @code{paz} (pointer to array of string).
|
|
|
|
Note that the variable name prefixes do not necessarily indicate the
|
|
type of the variable. For example, a variable prefixed with i may be
|
|
int, long or short. Similarly, a variable prefixed with b may be a char
|
|
or an int; for example, the return value of getchar would be caught in
|
|
an int variable prefixed with b.
|
|
|
|
For a non-local variable (extern or file static), the first character
|
|
after the type prefix is capitalized.
|
|
|
|
Most static variables and functions use another letter after the type
|
|
prefix to indicate which module they come from. This is to help
|
|
distinguish different names in the debugger. For example, all static
|
|
functions in @file{protg.c}, the @samp{g} protocol source code, use a
|
|
module prefix of @samp{g}. This isn't too useful, as a number of
|
|
modules use a module prefix of @samp{s}.
|
|
|
|
@node Patches, , Naming Conventions, Hacking
|
|
@section Patches
|
|
|
|
I am always grateful for any patches sent in. Much of the flexibility
|
|
and portability of the code is due to other people. Please do not
|
|
hesitate to send me any changes you have found necessary or useful.
|
|
|
|
I rarely apply the patches directly. Instead I work my way through them
|
|
and apply each one separately. This ensures that the naming remains
|
|
consistent and that I understand all the code.
|
|
|
|
@node Acknowledgements, Index (concepts), Hacking, Top
|
|
@chapter Acknowledgements
|
|
|
|
This is a list of people who gave help or suggestions while I was
|
|
working on the Taylor UUCP project. Appearance on this list does not
|
|
constitute endorsement of the program, particularly since some of the
|
|
comments were criticisms. I've probably left some people off, and I
|
|
apologize for any oversight; it does not mean your contribution was
|
|
unappreciated.
|
|
|
|
@ifinfo
|
|
First of all, I would like to thank the people at Infinity Development
|
|
Systems (formerly AIRS, which lives on in the domain name, at least for
|
|
now) for permitting me to use their computers and @file{uunet} access.
|
|
I would also like to thank Richard Stallman @file{<rms@@gnu.ai.mit.edu>}
|
|
for founding the Free Software Foundation and John Gilmore
|
|
@file{<gnu@@cygnus.com>} for writing the initial version of gnuucp which
|
|
was a direct inspiration for this somewhat larger project. Chip
|
|
Salzenberg @file{<chip@@tct.com>} contributed many early patches.
|
|
Franc,ois Pinard @file{<pinard@@iro.umontreal.ca>} tirelessly tested the
|
|
code and suggested many improvements. He also put together the initial
|
|
version of this document. Finally, Verbus M. Counts
|
|
@file{<verbus@@westmark.com>} and Centel Federal Systems, Inc. deserve
|
|
special thanks, since they actually paid me money to port this code to
|
|
System III.
|
|
@end ifinfo
|
|
@iftex
|
|
First of all, I would like to thank the people at Infinity Development
|
|
Systems (formerly AIRS, which lives on in the domain name, at least for
|
|
now) for permitting me to use their computers and @file{uunet} access.
|
|
I would also like to thank Richard Stallman @file{<rms@@gnu.ai.mit.edu>}
|
|
for founding the Free Software Foundation and John Gilmore
|
|
@file{<gnu@@cygnus.com>} for writing the initial version of gnuucp which
|
|
was a direct inspiration for this somewhat larger project. Chip
|
|
Salzenberg @file{<chip@@tct.com>} contributed many early patches.
|
|
@tex
|
|
Fran\c cois Pinard
|
|
@end tex
|
|
@file{<pinard@@iro.umontreal.ca>} tirelessly tested
|
|
the code and suggested many improvements. He also put together the
|
|
initial version of this document. Finally, Verbus M. Counts
|
|
@file{<verbus@@westmark.com>} and Centel Federal Systems, Inc. deserve
|
|
special thanks, since they actually paid me money to port this code to
|
|
System III.
|
|
@end iftex
|
|
|
|
In alphabetical order:
|
|
|
|
@example
|
|
"Earle F. Ake - SAIC" @file{<ake@@Dayton.SAIC.COM>}
|
|
@file{mra@@searchtech.com} (Michael Almond)
|
|
@file{cambler@@zeus.calpoly.edu} (Christopher J. Ambler)
|
|
Brian W. Antoine @file{<briana@@tau-ceti.isc-br.com>}
|
|
@file{jantypas@@soft21.s21.com} (John Antypas)
|
|
@file{nba@@sysware.DK} (Niels Baggesen)
|
|
@file{uunet!hotmomma!sdb} (Scott Ballantyne)
|
|
@file{magus!dolphin!zack} (Zacharias Beckman)
|
|
@file{mike@@mbsun.ann-arbor.mi.us} (Mike Bernson)
|
|
@file{bob@@usixth.sublink.org} (Roberto Biancardi)
|
|
Marc Boucher @file{<marc@@CAM.ORG>}
|
|
@file{dean@@coplex.com} (Dean Brooks)
|
|
@file{dave@@dlb.com} (Dave Buck)
|
|
@file{gordon@@sneaky.lonestar.org} (Gordon Burditt)
|
|
@file{mib@@gnu.ai.mit.edu} (Michael I Bushnell)
|
|
Brian Campbell @file{<brianc@@quantum.on.ca>}
|
|
@file{verbus@@westmark.westmark.com} (Verbus M. Counts)
|
|
@file{cbmvax!snark.thyrsus.com!cowan} (John Cowan)
|
|
@file{denny@@dakota.alisa.com} (Bob Denny)
|
|
@file{dje@@ersys.edmonton.ab.ca} (Doug Evans)
|
|
@file{fenner@@jazz.psu.edu} (Bill Fenner)
|
|
"David J. Fiander" @file{<golem!david@@news.lsuc.on.ca>}
|
|
Thomas Fischer @file{<batman@@olorin.dark.sub.org>}
|
|
@file{erik@@eab.retix.com} (Erik Forsberg)
|
|
Lele Gaifax @file{<piggy@@idea.sublink.org>}
|
|
@file{Peter.Galbavy@@micromuse.co.uk}
|
|
@file{hunter@@phoenix.pub.uu.oz.au} (James Gardiner [hunter])
|
|
Terry Gardner @file{<cphpcom!tjg01>}
|
|
@file{jimmy@@tokyo07.info.com} (Jim Gottlieb)
|
|
@file{ryan@@cs.umb.edu} (Daniel R. Guilderson)
|
|
@file{greg@@gagme.chi.il.us} (Gregory Gulik)
|
|
Michael Haberler @file{<mah@@parrot.prv.univie.ac.at>}
|
|
@file{guy@@auspex.auspex.com} (Guy Harris)
|
|
Petri Helenius @file{<pete@@fidata.fi>}
|
|
Peter Honeyman @file{<honey@@citi.umich.edu>}
|
|
@file{bei@@dogface.austin.tx.us} (Bob Izenberg)
|
|
@file{harvee!esj} (Eric S Johansson)
|
|
@file{chris@@cj_net.in-berlin.de} (Christof Junge)
|
|
@file{tron@@Veritas.COM} (Ronald S. Karr)
|
|
@file{kent@@sparky.IMD.Sterling.COM} (Kent Landfield)
|
|
@file{lebaron@@inrs-telecom.uquebec.ca} (Gregory LeBaron)
|
|
@file{karl@@sugar.NeoSoft.Com} (Karl Lehenbauer)
|
|
@file{libove@@libove.det.dec.com} (Jay Vassos-Libove)
|
|
@file{bruce%blilly@@Broadcast.Sony.COM} (Bruce Lilly)
|
|
Ted Lindgreen @file{<tlindgreen@@encore.nl>}
|
|
"Arne Ludwig" @file{<arne@@rrzbu.hanse.de>}
|
|
Matthew Lyle @file{<matt@@mips.mitek.com>}
|
|
@file{djm@@eng.umd.edu} (David J. MacKenzie)
|
|
John R MacMillan @file{<chance!john@@sq.sq.com>}
|
|
@file{mem@@mv.MV.COM} (Mark E. Mallett)
|
|
@file{martelli@@cadlab.sublink.org} (Alex Martelli)
|
|
Yanek Martinson @file{<yanek@@mthvax.cs.miami.edu>}
|
|
@file{les@@chinet.chi.il.us} (Leslie Mikesell)
|
|
@file{mmitchel@@digi.lonestar.org} (Mitch Mitchell)
|
|
@file{rmohr@@infoac.rmi.de} (Rupert Mohr)
|
|
@file{service@@infohh.rmi.de} (Dirk Musstopf)
|
|
@file{lyndon@@cs.athabascau.ca} (Lyndon Nerenberg)
|
|
@file{nolan@@helios.unl.edu} (Michael Nolan)
|
|
david nugent @file{<david@@csource.oz.au>}
|
|
@file{abekas!dragoman!mikep@@decwrl.dec.com} (Mike Park)
|
|
"Mark Pizzolato 415-369-9366" @file{<mark@@infocomm.com>}
|
|
@file{dplatt@@ntg.com} (Dave Platt)
|
|
@file{eldorado@@tharr.UUCP} (Mark Powell)
|
|
@file{pozar@@kumr.lns.com} (Tim Pozar)
|
|
@file{putsch@@uicc.com} (Jeff Putsch)
|
|
Jarmo Raiha @file{<jarmo@@ksvltd.FI>}
|
|
@file{mcr@@Sandelman.OCUnix.On.Ca} (Michael Richardson)
|
|
@file{ross@@sun490.fdu.edu} (Jeff Ross)
|
|
Aleksey P. Rudnev @file{<alex@@kiae.su>}
|
|
@file{wolfgang@@wsrcc.com} (Wolfgang S. Rupprecht)
|
|
@file{tbr@@tfic.bc.ca} (Tom Rushworth)
|
|
@file{rsalz@@bbn.com} (Rich Salz)
|
|
@file{sojurn!mike@@hobbes.cert.sei.cmu.edu} (Mike Sangrey)
|
|
@file{swiers@@plains.NoDak.edu}
|
|
@file{s4mjs!mjs@@nirvo.nirvonics.com} (M. J. Shannon Jr.)
|
|
@file{peter@@ficc.ferranti.com} (Peter da Silva)
|
|
@file{frumious!pat} (Patrick Smith)
|
|
@file{roscom!monty@@bu.edu} (Monty Solomon)
|
|
@file{chs@@antic.apu.fi} (Hannu Strang)
|
|
@file{ralf@@reswi.ruhr.de} (Ralf E. Stranzenbach)
|
|
Oleg Tabarovsky @file{<olg@@olghome.pccentre.msk.su>}
|
|
John Theus @file{<john@@theus.rain.com>}
|
|
@file{rmtodd@@servalan.servalan.com} (Richard Todd)
|
|
Len Tower @file{<tower-prep@@ai.mit.edu>}
|
|
@file{mju@@mudos.ann-arbor.mi.us} (Marc Unangst)
|
|
@file{jv@@mh.nl} (Johan Vromans)
|
|
@file{rna-nl!gerben@@relay.nluug.nl} (Drs. Gerben C. Th. Wierda)
|
|
@file{frnkmth!twwells.com!bill} (T. William Wells)
|
|
@file{mauxci!eci386!woods@@apple.com} (Greg A. Woods)
|
|
@file{jon@@console.ais.org} (Jon Zeeff)
|
|
Eric Ziegast @file{<uunet!ziegast>}
|
|
@end example
|
|
|
|
@node Index (concepts), Index (configuration file), Acknowledgements, Top
|
|
@unnumbered Concept Index
|
|
|
|
@printindex cp
|
|
|
|
@node Index (configuration file), , Index (concepts), Top
|
|
@unnumbered Index to New Configuration File
|
|
|
|
@printindex fn
|
|
|
|
@contents
|
|
@bye
|