1\input texinfo @c -*-texinfo-*- 2@c %**start of header 3@setfilename uucp.info 4@settitle Taylor UUCP 5@setchapternewpage odd 6@c %**end of header 7 8@iftex 9@finalout 10@end iftex 11 12@ifinfo 13@format 14START-INFO-DIR-ENTRY 15* UUCP: (uucp). Transfer mail and news across phone lines. 16END-INFO-DIR-ENTRY 17@end format 18 19This file documents Taylor UUCP, version 1.07. 20 21Copyright @copyright{} 1992, 1993, 1994, 1995, 2002 Ian Lance Taylor 22 23Permission is granted to make and distribute verbatim copies of this 24manual provided the copyright notice and this permission notice are 25preserved on all copies. 26 27@ignore 28Permission is granted to process this file through TeX and print the 29results, provided the printed document carries a copying permission 30notice identical to this one except for the removal of this paragraph 31(this paragraph not being relevant to the printed manual). 32 33@end ignore 34Permission is granted to copy and distribute modified versions of this 35manual under the conditions for verbatim copying, provided also that the 36section entitled ``Copying'' are included exactly as in the original, and 37provided that the entire resulting derived work is distributed under the 38terms of a permission notice identical to this one. 39 40Permission is granted to copy and distribute translations of this manual 41into another language, under the above conditions for modified versions, 42except that the section entitled ``Copying'' may be included in a 43translation approved by the author instead of in the original English. 44@end ifinfo 45 46@titlepage 47@title Taylor UUCP 48@subtitle Version 1.07 49@author Ian Lance Taylor @email{ian@@airs.com} 50 51@page 52@vskip 0pt plus 1filll 53Copyright @copyright{} 1992, 1993, 1994, 1995, 2002 Ian Lance Taylor 54 55Published by Ian Lance Taylor @email{ian@@airs.com}. 56 57Permission is granted to make and distribute verbatim copies of this 58manual provided the copyright notice and this permission notice are 59preserved on all copies. 60 61Permission is granted to copy and distribute modified versions of this 62manual under the conditions for verbatim copying, provided also that the 63section entitled ``Copying'' are included exactly as in the original, and 64provided that the entire resulting derived work is distributed under the 65terms of a permission notice identical to this one. 66 67Permission is granted to copy and distribute translations of this manual 68into another language, under the above conditions for modified versions, 69except that the section entitled ``Copying'' may be included in a 70translation approved by the author instead of in the original English. 71@end titlepage 72 73@node Top, Copying, (dir), (dir) 74@top Taylor UUCP 1.07 75 76This is the documentation for the Taylor UUCP package, version 1.07. 77The programs were written by Ian Lance Taylor. The author can be 78reached at @email{ian@@airs.com}. 79 80There is a mailing list for discussion of the package. The list is 81hosted by Eric Schnoebelen at @email{cirr.com}. To join (or get off) the 82list, send mail to @email{taylor-uucp-request@@gnu.org}. Mail to this 83address is answered by the majordomo program. To join the list, send 84the message @samp{subscribe @var{address}} where @var{address} is your 85e-mail address. To send a message to the list, send it to 86@email{taylor-uucp@@gnu.org}. There is an archive 87of all messages sent to the mailing list at 88@url{http://lists.cirr.com}. 89 90@menu 91* Copying:: Taylor UUCP Copying Conditions 92* Introduction:: Introduction to Taylor UUCP 93* Invoking the UUCP Programs:: Invoking the UUCP Programs 94* Installing Taylor UUCP:: Installing Taylor UUCP 95* Using Taylor UUCP:: Using Taylor UUCP 96* Configuration Files:: Taylor UUCP Configuration Files 97* Protocols:: UUCP Protocol Descriptions 98* Hacking:: Hacking Taylor UUCP 99* Acknowledgements:: Acknowledgements 100 101* Index (concepts):: Concept Index 102* Index (configuration file):: Index to New Configuration Files 103 104 --- The Detailed Node Listing --- 105 106Invoking the UUCP Programs 107 108* Standard Options:: Standard Options for the UUCP Programs 109* Invoking uucp:: Invoking uucp 110* Invoking uux:: Invoking uux 111* Invoking uustat:: Invoking uustat 112* Invoking uuname:: Invoking uuname 113* Invoking uulog:: Invoking uulog 114* Invoking uuto:: Invoking uuto 115* Invoking uupick:: Invoking uupick 116* Invoking cu:: Invoking cu 117* Invoking uucico:: Invoking uucico 118* Invoking uuxqt:: Invoking uuxqt 119* Invoking uuchk:: Invoking uuchk 120* Invoking uuconv:: Invoking uuconv 121* Invoking uusched:: Invoking uusched 122 123Invoking uucp 124 125* uucp Description:: Description of uucp 126* uucp Options:: Options Supported by uucp 127 128Invoking uux 129 130* uux Description:: Description of uux 131* uux Options:: Options Supported by uux 132* uux Examples:: Examples of uux Usage 133 134Invoking uustat 135 136* uustat Description:: Description of uustat 137* uustat Options:: Options Supported by uustat 138* uustat Examples:: Examples of uustat Usage 139 140Invoking cu 141 142* cu Description:: Description of cu 143* cu Commands:: Commands Supported by cu 144* cu Variables:: Variables Supported by cu 145* cu Options:: Options Supported by cu 146 147Invoking uucico 148 149* uucico Description:: Description of uucico 150* uucico Options:: Options Supported by uucico 151 152Installing Taylor UUCP 153 154* Compilation:: Compiling Taylor UUCP 155* Testing the Compilation:: Testing the Compilation 156* Installing the Binaries:: Installing the Binaries 157* Configuration:: Configuring Taylor UUCP 158* Testing the Installation:: Testing the Installation 159 160Using Taylor UUCP 161 162* Calling Other Systems:: Calling Other Systems 163* Accepting Calls:: Accepting Calls 164* Mail and News:: Using UUCP for Mail and News 165* The Spool Directory Layout:: The Spool Directory Layout 166* Spool Directory Cleaning:: Cleaning the UUCP Spool Directory 167 168Using UUCP for Mail and News. 169 170* Sending mail or news:: Sending mail or news via UUCP 171* Receiving mail or news:: Receiving mail or news via UUCP 172 173The Spool Directory Layout 174 175* System Spool Directories:: System Spool Directories 176* Status Directory:: Status Spool Directory 177* Execution Subdirectories:: Execution Spool Subdirectories 178* Other Spool Subdirectories:: Other Spool Subdirectories 179* Spool Lock Files:: Spool Directory Lock Files 180 181Taylor UUCP Configuration Files 182 183* Configuration Overview:: Configuration File Overview 184* Configuration File Format:: Configuration File Format 185* Configuration Examples:: Examples of Configuration Files 186* Time Strings:: How to Write Time Strings 187* Chat Scripts:: How to Write Chat Scripts 188* config File:: The Main Configuration File 189* sys File:: The System Configuration File 190* port File:: The Port Configuration Files 191* dial File:: The Dialer Configuration Files 192* UUCP Over TCP:: UUCP Over TCP 193* Security:: Security Issues 194 195Examples of Configuration Files 196 197* config File Examples:: Examples of the Main Configuration File 198* Leaf Example:: Call a Single Remote Site 199* Gateway Example:: The Gateway for Several Local Systems 200 201The Main Configuration File 202 203* Miscellaneous (config):: Miscellaneous config File Commands 204* Configuration File Names:: Using Different Configuration Files 205* Log File Names:: Using Different Log Files 206* Debugging Levels:: Debugging Levels 207 208The System Configuration File 209 210* Defaults and Alternates:: Using Defaults and Alternates 211* Naming the System:: Naming the System 212* Calling Out:: Calling Out 213* Accepting a Call:: Accepting a Call 214* Protocol Selection:: Protocol Selection 215* File Transfer Control:: File Transfer Control 216* Miscellaneous (sys):: Miscellaneous sys File Commands 217* Default sys File Values:: Default Values 218 219Calling Out 220 221* When to Call:: When to Call 222* Placing the Call:: Placing the Call 223* Logging In:: Logging In 224 225UUCP Over TCP 226 227* TCP Client:: Connecting to Another System Over TCP 228* TCP Server:: Running a TCP Server 229 230UUCP Protocol Internals 231 232* UUCP Protocol Sources:: Sources for UUCP Protocol Information 233* UUCP Grades:: UUCP Grades 234* UUCP Lock Files:: UUCP Lock Files 235* Execution File Format:: Execution File Format 236* UUCP Protocol:: UUCP Protocol 237* g Protocol:: g protocol 238* f Protocol:: f protocol 239* t Protocol:: t protocol 240* e Protocol:: e protocol 241* Big G Protocol:: G protocol 242* i Protocol:: i protocol 243* j Protocol:: j protocol 244* x Protocol:: x protocol 245* y Protocol:: y protocol 246* d Protocol:: d protocol 247* h Protocol:: h protocol 248* v Protocol:: v protocol 249 250UUCP Protocol 251 252* The Initial Handshake:: The Initial Handshake 253* UUCP Protocol Commands:: UUCP Protocol Commands 254* The Final Handshake:: The Final Handshake 255 256UUCP Protocol Commands 257 258* The S Command:: The S Command 259* The R Command:: The R Command 260* The X Command:: The X Command 261* The E Command:: The E Command 262* The H Command:: The H Command 263 264Hacking Taylor UUCP 265 266* System Dependence:: System Dependence 267* Naming Conventions:: Naming Conventions 268* Patches:: Patches 269@end menu 270 271@node Copying, Introduction, Top, Top 272@unnumbered Taylor UUCP Copying Conditions 273 274This package is covered by the GNU Public License. See the file 275@file{COPYING} for details. If you would like to do something with this 276package that you feel is reasonable, but you feel is prohibited by the 277license, contact me to see if we can work it out. 278 279The rest of this section is some descriptive text from the Free Software 280Foundation. 281 282All the programs, scripts and documents relating to Taylor UUCP are 283@dfn{free}; this means that everyone is free to use them and free to 284redistribute them on a free basis. The Taylor UUCP-related programs are 285not in the public domain; they are copyrighted and there are 286restrictions on their distribution, but these restrictions are designed 287to permit everything that a good cooperating citizen would want to do. 288What is not allowed is to try to prevent others from further sharing any 289version of these programs that they might get from you. 290 291Specifically, we want to make sure that you have the right to give away 292copies of the programs that relate to Taylor UUCP, that you receive 293source code or else can get it if you want it, that you can change these 294programs or use pieces of them in new free programs, and that you know 295you can do these things. 296 297To make sure that everyone has such rights, we have to forbid you to 298deprive anyone else of these rights. For example, if you distribute 299copies of the Taylor UUCP related programs, you must give the recipients 300all the rights that you have. You must make sure that they, too, 301receive or can get the source code. And you must tell them their 302rights. 303 304Also, for our own protection, we must make certain that everyone finds 305out that there is no warranty for the programs that relate to Taylor 306UUCP. If these programs are modified by someone else and passed on, we 307want their recipients to know that what they have is not what we 308distributed, so that any problems introduced by others will not reflect 309on our reputation. 310 311The precise conditions of the licenses for the programs currently being 312distributed that relate to Taylor UUCP are found in the General Public 313Licenses that accompany them. 314 315@node Introduction, Invoking the UUCP Programs, Copying, Top 316@chapter Introduction to Taylor UUCP 317 318General introductions to UUCP are available, and perhaps one day I will 319write one. In the meantime, here is a very brief one that concentrates 320on the programs provided by Taylor UUCP. 321 322Taylor UUCP is a complete UUCP package. It is covered by the GNU Public 323License, which means that the source code is always available. It is 324composed of several programs; most of the names of these programs are 325based on earlier UUCP packages. 326 327@table @command 328 329@item uucp 330 331The @command{uucp} program is used to copy file between systems. It is 332similar to the standard Unix @command{cp} program, except that you can 333refer to a file on a remote system by using @samp{system!} before the 334file name. For example, to copy the file @file{notes.txt} to the system 335@samp{airs}, you would say @samp{uucp notes.txt airs!~/notes.txt}. In 336this example @samp{~} is used to name the UUCP public directory on 337@samp{airs}. For more details, see @ref{Invoking uucp, uucp}. 338 339@item uux 340 341The @command{uux} program is used to request the execution of a program 342on a remote system. This is how mail and news are transferred over 343UUCP. As with @command{uucp}, programs and files on remote systems may 344be named by using @samp{system!}. For example, to run the 345@command{rnews} program on @samp{airs}, passing it standard input, you 346would say @samp{uux - airs!rnews}. The @option{-} means to read standard 347input and set things up such that when @command{rnews} runs on 348@samp{airs} it will receive the same standard input. For more details, 349see @ref{Invoking uux, uux}. 350 351@end table 352 353Neither @command{uucp} nor @command{uux} actually do any work 354immediately. Instead, they queue up requests for later processing. 355They then start a daemon process which processes the requests and calls 356up the appropriate systems. Normally the system will also start the 357daemon periodically to check if there is any work to be done. The 358advantage of this approach is that it all happens automatically. You 359don't have to sit around waiting for the files to be transferred. The 360disadvantage is that if anything goes wrong it might be a while before 361anybody notices. 362 363@table @command 364 365@item uustat 366 367The @command{uustat} program does many things. By default it will 368simply list all the jobs you have queued with @command{uucp} or 369@command{uux} that have not yet been processed. You can use 370@command{uustat} to remove any of your jobs from the queue. You can 371also it use it to show the status of the UUCP system in various ways, 372such as showing the connection status of all the remote systems your 373system knows about. The system administrator can use @command{uustat} 374to automatically discard old jobs while sending mail to the user who 375requested them. For more details, see @ref{Invoking uustat, uustat}. 376 377@item uuname 378 379The @command{uuname} program by default lists all the remote systems 380your system knows about. You can also use it to get the name of your 381local system. It is mostly useful for shell scripts. For more details, 382see @ref{Invoking uuname, uuname}. 383 384@item uulog 385 386The @command{uulog} program can be used to display entries in the UUCP 387log file. It can select the entries for a particular system or a 388particular user. You can use it to see what has happened to your queued 389jobs in the past. For more details, see @ref{Invoking uulog, uulog}. 390 391@item uuto 392@item uupick 393 394@command{uuto} is a simple shell script interface to @command{uucp}. It 395will transfer a file, or the contents of a directory, to a remote 396system, and notify a particular user on the remote system when it 397arrives. The remote user can then retrieve the file(s) with 398@command{uupick}. For more details, see @ref{Invoking uuto, uuto}, and 399see @ref{Invoking uupick, uupick}. 400 401@item cu 402 403The @command{cu} program can be used to call up another system and 404communicate with it as though you were directly connected. It can also 405do simple file transfers, though it does not provide any error checking. 406For more details, @ref{Invoking cu, cu}. 407 408@end table 409 410These eight programs just described, @command{uucp}, @command{uux}, 411@command{uuto}, @command{uupick}, @command{uustat}, @command{uuname}, 412@command{uulog}, and @command{cu} are the user programs provided by 413Taylor UUCP@. @command{uucp}, @command{uux}, and @command{uuto} add 414requests to the work queue, @command{uupick} extracts files from the 415UUCP public directory, @command{uustat} examines the work queue, 416@command{uuname} examines the configuration files, @command{uulog} 417examines the log files, and @command{cu} just uses the UUCP 418configuration files. 419 420The real work is actually done by two daemon processes, which are 421normally run automatically rather than by a user. 422 423@table @command 424 425@item uucico 426 427The @command{uucico} daemon is the program which actually calls the 428remote system and transfers files and requests. @command{uucico} is 429normally started automatically by @command{uucp} and @command{uux}. 430Most systems will also start it periodically to make sure that all work 431requests are handled. @command{uucico} checks the queue to see what 432work needs to be done, and then calls the appropriate systems. If the 433call fails, perhaps because the phone line is busy, @command{uucico} 434leaves the requests in the queue and goes on to the next system to call. 435It is also possible to force @command{uucico} to call a remote system 436even if there is no work to be done for it, so that it can pick up any 437work that may be queued up remotely. For more details, see 438@ref{Invoking uucico, uucico}. 439 440@need 1000 441@item uuxqt 442 443The @command{uuxqt} daemon processes execution requests made by the 444@command{uux} program on remote systems. It also processes requests 445made on the local system which require files from a remote system. It 446is normally started by @command{uucico}. For more details, see 447@ref{Invoking uuxqt, uuxqt}. 448 449@end table 450 451Suppose you, on the system @samp{bantam}, want to copy a file to the 452system @samp{airs}. You would run the @command{uucp} command locally, 453with a command like @samp{uucp notes.txt airs!~/notes.txt}. This would 454queue up a request on @samp{bantam} for @samp{airs}, and would then 455start the @command{uucico} daemon. @command{uucico} would see that 456there was a request for @samp{airs} and attempt to call it. When the 457call succeeded, another copy of @command{uucico} would be started on 458@samp{airs}. The two copies of @command{uucico} would tell each other 459what they had to do and transfer the file from @samp{bantam} to 460@samp{airs}. When the file transfer was complete the @command{uucico} 461on @samp{airs} would move it into the UUCP public directory. 462 463UUCP is often used to transfer mail. This is normally done 464automatically by mailer programs. When @samp{bantam} has a mail message 465to send to @samp{ian} at @samp{airs}, it executes @samp{uux - airs!rmail 466ian} and writes the mail message to the @command{uux} process as 467standard input. The @command{uux} program, running on @samp{bantam}, 468will read the standard input and store it, as well as the 469@command{rmail} request itself, on the work queue for @samp{airs}. 470@command{uux} will then start the @command{uucico} daemon. The 471@command{uucico} daemon will call up @samp{airs}, just as in the 472@command{uucp} example, and transfer the work request and the mail 473message. The @command{uucico} daemon on @samp{airs} will put the files 474on a local work queue. When the communication session is over, the 475@command{uucico} daemon on @samp{airs} will start the @command{uuxqt} 476daemon. @command{uuxqt} will see the request on the work queue, and 477will run @samp{rmail ian} with the mail message as standard input. The 478@command{rmail} program, which is not part of the UUCP package, is then 479responsible for either putting the message in the right mailbox on 480@samp{airs} or forwarding the message on to another system. 481 482Taylor UUCP comes with a few other programs that are useful when 483installing and configuring UUCP. 484 485@table @command 486 487@item uuchk 488 489The @command{uuchk} program reads the UUCP configuration files and 490displays a rather lengthy description of what it finds. This is useful 491when configuring UUCP to make certain that the UUCP package will do what 492you expect it to do. For more details, see @ref{Invoking uuchk, uuchk}. 493 494@item uuconv 495 496The @command{uuconv} program can be used to convert UUCP configuration 497files from one format to another. This can be useful for administrators 498converting from an older UUCP package. Taylor UUCP is able to read and 499use old configuration file formats, but some new features can not be 500selected using the old formats. For more details, see @ref{Invoking 501uuconv, uuconv}. 502 503@item uusched 504 505The @command{uusched} script is provided for compatibility with older 506UUCP releases. It starts @command{uucico} to call, one at a time, all 507the systems for which work has been queued. For more details, see 508@ref{Invoking uusched, uusched}. 509 510@item tstuu 511 512The @command{tstuu} program is a test harness for the UUCP package; it 513can help check that the package has been configured and compiled 514correctly. However, it uses pseudo-terminals, which means that it is 515less portable than the rest of the package. If it works, it can be 516useful when initially installing Taylor UUCP. For more details, see 517@ref{Testing the Compilation, tstuu}. 518 519@end table 520 521@node Invoking the UUCP Programs, Installing Taylor UUCP, Introduction, Top 522@chapter Invoking the UUCP Programs 523 524This chapter describes how to run the UUCP programs. 525 526@menu 527* Standard Options:: Standard Options for the UUCP Programs 528* Invoking uucp:: Invoking uucp 529* Invoking uux:: Invoking uux 530* Invoking uustat:: Invoking uustat 531* Invoking uuname:: Invoking uuname 532* Invoking uulog:: Invoking uulog 533* Invoking uuto:: Invoking uuto 534* Invoking uupick:: Invoking uupick 535* Invoking cu:: Invoking cu 536* Invoking uucico:: Invoking uucico 537* Invoking uuxqt:: Invoking uuxqt 538* Invoking uuchk:: Invoking uuchk 539* Invoking uuconv:: Invoking uuconv 540* Invoking uusched:: Invoking uusched 541@end menu 542 543@node Standard Options, Invoking uucp, Invoking the UUCP Programs, Invoking the UUCP Programs 544@section Standard Options 545 546All of the UUCP programs support a few standard options. 547 548@table @option 549@item -x type 550@itemx --debug type 551Turn on particular debugging types. The following types are recognized: 552@samp{abnormal}, @samp{chat}, @samp{handshake}, @samp{uucp-proto}, 553@samp{proto}, @samp{port}, @samp{config}, @samp{spooldir}, 554@samp{execute}, @samp{incoming}, @samp{outgoing}. Not all types of 555debugging are effective for all programs. See the @code{debug} 556configuration command for details (@pxref{Debugging Levels}). 557 558Multiple types may be given, separated by commas, and the 559@option{--debug} option may appear multiple times. A number may also be 560given, which will turn on that many types from the foregoing list; for 561example, @samp{--debug 2} is equivalent to @samp{--debug abnormal,chat}. 562To turn on all types of debugging, use @samp{-x all}. 563 564The @command{uulog} program uses @option{-X} rather than @option{-x} to 565select the debugging type; for @command{uulog}, @option{-x} has a 566different meaning, for reasons of historical compatibility. 567 568@item -I file 569@itemx --config file 570Set the main configuration file to use. @xref{config File}. When this 571option is used, the programs will revoke any setuid privileges. 572 573@item -v 574@itemx --version 575Report version information and exit. 576 577@item --help 578Print a help message and exit. 579@end table 580 581@need 2000 582@node Invoking uucp, Invoking uux, Standard Options, Invoking the UUCP Programs 583@section Invoking uucp 584 585@menu 586* uucp Description:: Description of uucp 587* uucp Options:: Options Supported by uucp 588@end menu 589 590@node uucp Description, uucp Options, Invoking uucp, Invoking uucp 591@subsection uucp Description 592 593@example 594uucp [options] @file{source-file} @file{destination-file} 595uucp [options] @file{source-file}... @file{destination-directory} 596@end example 597 598The @command{uucp} command copies files between systems. Each 599@file{file} argument is either a file name on the local machine or is of 600the form @samp{system!file}. The latter is interpreted as being on a 601remote system. 602 603When @command{uucp} is used with two non-option arguments, the contents 604of the first file are copied to the second. With more than two 605non-option arguments, each source file is copied into the destination 606directory. 607 608A file may be transferred to or from @samp{system2} via @samp{system1} 609by using @samp{system1!system2!file}. 610 611Any file name that does not begin with @samp{/} or @samp{~} will be 612prepended with the current directory (unless the @option{-W} or 613@option{--noexpand} options are used). For example, if you are in the 614directory @samp{/home/ian}, then @samp{uucp foo remote!bar} is 615equivalent to @samp{uucp /home/ian/foo remote!/home/ian/bar}. Note that 616the resulting file name may not be valid on a remote system. 617 618A file name beginning with a simple @samp{~} starts at the UUCP public 619directory; a file name beginning with @samp{~name} starts at the home 620directory of the named user. The @samp{~} is interpreted on the 621appropriate system. Note that some shells will interpret an initial 622@samp{~} before @command{uucp} sees it; to avoid this the @samp{~} must 623be quoted. 624 625The shell metacharacters @samp{?} @samp{*} @samp{[} and @samp{]} are 626interpreted on the appropriate system, assuming they are quoted to 627prevent the shell from interpreting them first. 628 629The file copy does not take place immediately, but is queued up for the 630@command{uucico} daemon; the daemon is started immediately unless the 631@option{-r} or @option{--nouucico} option is given. The next time the 632remote system is called, the file(s) will be copied. @xref{Invoking 633uucico}. 634 635The file mode is not preserved, except for the execute bit. The 636resulting file is owned by the uucp user. 637 638@node uucp Options, , uucp Description, Invoking uucp 639@subsection uucp Options 640 641The following options may be given to @command{uucp}. 642 643@table @option 644@item -c 645@itemx --nocopy 646Do not copy local source files to the spool directory. If they are 647removed before being processed by the @command{uucico} daemon, the copy 648will fail. The files must be readable by the @command{uucico} daemon, 649and by the invoking user. 650 651@item -C 652@itemx --copy 653Copy local source files to the spool directory. This is the default. 654 655@item -d 656@itemx --directories 657Create all necessary directories when doing the copy. This is the 658default. 659 660@item -f 661@itemx --nodirectories 662If any necessary directories do not exist for the destination file name, 663abort the copy. 664 665@item -R 666@itemx --recursive 667If any of the source file names are directories, copy their contents 668recursively to the destination (which must itself be a directory). 669 670@item -g grade 671@itemx --grade grade 672Set the grade of the file transfer command. Jobs of a higher grade are 673executed first. Grades run @kbd{0} to @kbd{9}, @kbd{A} to @kbd{Z}, 674@kbd{a} to @kbd{z}, from high to low. @xref{When to Call}. 675 676@item -m 677@itemx --mail 678Report completion or failure of the file transfer by sending mail. 679 680@item -n user 681@itemx --notify user 682Report completion or failure of the file transfer by sending mail to the 683named user on the destination system. 684 685@item -r 686@itemx --nouucico 687Do not start the @command{uucico} daemon immediately; merely queue up 688the file transfer for later execution. 689 690@item -j 691@itemx --jobid 692Print the jobid on standard output. The job may be later cancelled by 693passing this jobid to the @option{-kill} switch of @command{uustat}. 694@xref{Invoking uustat}. 695 696It is possible for some complex operations to produce more than one 697jobid, in which case each will be printed on a separate line. For 698example 699@example 700uucp sys1!~user1/file1 sys2!~user2/file2 ~user3 701@end example 702will generate two separate jobs, one for the system @samp{sys1} and one 703for the system @samp{sys2}. 704 705@item -W 706@itemx --noexpand 707Do not prepend remote relative file names with the current directory. 708 709@item -t 710@itemx --uuto 711This option is used by the @command{uuto} shell script; see 712@ref{Invoking uuto}. It causes @command{uucp} to interpret the final 713argument as @samp{system!user}. The file(s) are sent to 714@samp{~/receive/@var{user}/@var{local}} on the remote system, where 715@var{user} is from the final argument and @var{local} is the local UUCP 716system name. Also, @command{uucp} will act as though @option{--notify 717user} were specified. 718 719@item -x type 720@itemx --debug type 721@itemx -I file 722@itemx --config file 723@itemx -v 724@itemx --version 725@itemx --help 726@xref{Standard Options}. 727@end table 728 729@node Invoking uux, Invoking uustat, Invoking uucp, Invoking the UUCP Programs 730@section Invoking uux 731 732@menu 733* uux Description:: Description of uux 734* uux Options:: Options Supported by uux 735* uux Examples:: Examples of uux Usage 736@end menu 737 738@node uux Description, uux Options, Invoking uux, Invoking uux 739@subsection uux Description 740 741@example 742uux [options] command 743@end example 744 745The @command{uux} command is used to execute a command on a remote 746system, or to execute a command on the local system using files from 747remote systems. The command is not executed immediately; the request is 748queued until the @command{uucico} daemon calls the system and transfers 749the necessary files. The daemon is started automatically unless one of 750the @option{-r} or @option{--nouucico} options is given. 751 752The actual command execution is done by the @command{uuxqt} daemon on 753the appropriate system. 754 755File arguments can be gathered from remote systems to the execution 756system, as can standard input. Standard output may be directed to a 757file on a remote system. 758 759The command name may be preceded by a system name followed by an 760exclamation point if it is to be executed on a remote system. An empty 761system name is taken as the local system. 762 763Each argument that contains an exclamation point is treated as naming a 764file. The system which the file is on is before the exclamation point, 765and the file name on that system follows it. An empty system name is 766taken as the local system; this form must be used to transfer a file to 767a command being executed on a remote system. If the file name is not 768absolute, the current working directory will be prepended to it; the 769result may not be meaningful on the remote system. A file name may 770begin with @samp{~/}, in which case it is relative to the UUCP public 771directory on the appropriate system. A file name may begin with 772@samp{~name/}, in which case it is relative to the home directory of the 773named user on the appropriate system. 774 775Standard input and output may be redirected as usual; the file names 776used may contain exclamation points to indicate that they are on remote 777systems. Note that the redirection characters must be quoted so that 778they are passed to @command{uux} rather than interpreted by the shell. 779Append redirection (@samp{>>}) does not work. 780 781All specified files are gathered together into a single directory 782before execution of the command begins. This means that each file 783must have a distinct name. For example, 784@example 785uux 'sys1!diff sys2!~user1/foo sys3!~user2/foo >!foo.diff' 786@end example 787will fail because both files will be copied to @samp{sys1} and stored 788under the name @file{foo}. 789 790Arguments may be quoted by parentheses to avoid interpretation of 791exclamation points. This is useful when executing the @command{uucp} 792command on a remote system. 793 794Most systems restrict the commands which may be executed using 795@samp{uux}. Many permit only the execution of @samp{rmail} and 796@samp{rnews}. 797 798A request to execute an empty command (e.g., @samp{uux sys!}) will 799create a poll file for the specified system; see @ref{Calling Other 800Systems} for an example of why this might be useful. 801 802The exit status of @command{uux} is one of the codes found in the header 803file @file{sysexits.h}. In particular, @samp{EX_OK} (@samp{0}) 804indicates success, and @samp{EX_TEMPFAIL} (@samp{75}) indicates a 805temporary failure. 806 807@node uux Options, uux Examples, uux Description, Invoking uux 808@subsection uux Options 809 810The following options may be given to @command{uux}. 811 812@table @option 813@item - 814@itemx -p 815@itemx --stdin 816Read standard input up to end of file, and use it as the standard input 817for the command to be executed. 818 819@item -c 820@itemx --nocopy 821Do not copy local files to the spool directory. This is the default. 822If they are removed before being processed by the @command{uucico} 823daemon, the copy will fail. The files must be readable by the 824@command{uucico} daemon, as well as the by the invoker of @command{uux}. 825 826@item -C 827@itemx --copy 828Copy local files to the spool directory. 829 830@item -l 831@itemx --link 832Link local files into the spool directory. If a file can not be linked 833because it is on a different device, it will be copied unless one of the 834@option{-c} or @option{--nocopy} options also appears (in other words, use 835of @option{--link} switches the default from @option{--nocopy} to 836@option{--copy}). If the files are changed before being processed by the 837@command{uucico} daemon, the changed versions will be used. The files 838must be readable by the @command{uucico} daemon, as well as by the 839invoker of @command{uux}. 840 841@item -g grade 842@itemx --grade grade 843Set the grade of the file transfer command. Jobs of a higher grade are 844executed first. Grades run @kbd{0} to @kbd{9}, @kbd{A} to @kbd{Z}, 845@kbd{a} to @kbd{z}, from high to low. @xref{When to Call}. 846 847@item -n 848@itemx --notification=no 849Do not send mail about the status of the job, even if it fails. 850 851@item -z 852@itemx --notification=error 853Send mail about the status of the job if an error occurs. For many 854@command{uuxqt} daemons, including the Taylor UUCP @command{uuxqt}, this 855is the default action; for those, @option{--notification=error} will have 856no effect. However, some @command{uuxqt} daemons will send mail if the 857job succeeds, unless the @option{--notification=error} option is used. 858Some other @command{uuxqt} daemons will not send mail even if the job 859fails, unless the @option{--notification=error} option is used. 860 861@item -a address 862@itemx --requestor address 863Report job status, as controlled by the @option{--notification} option, to 864the specified mail address. 865 866@item -r 867@itemx --nouucico 868Do not start the @command{uucico} daemon immediately; merely queue up 869the execution request for later processing. 870 871@item -j 872@itemx --jobid 873Print the jobid on standard output. A jobid will be generated for each 874file copy operation required to execute the command. These file copies 875may be later cancelled by passing the jobid to the @option{-kill} switch 876of @command{uustat}. @xref{Invoking uustat}. Cancelling any file copies 877will make it impossible to complete execution of the job. 878 879@item -x type 880@itemx --debug type 881@itemx -v 882@itemx --version 883@itemx --help 884@xref{Standard Options}. 885@end table 886 887@node uux Examples, , uux Options, Invoking uux 888@subsection uux Examples 889 890Here are some examples of using @command{uux}. 891 892@example 893uux -z - sys1!rmail user1 894@end example 895This will execute the command @samp{rmail user1} on the system 896@samp{sys1}, giving it as standard input whatever is given to @command{uux} 897as standard input. If a failure occurs, mail will be sent to the user 898who ran the command. 899 900@example 901uux 'diff -c sys1!~user1/file1 sys2!~user2/file2 >!file.diff' 902@end example 903This will fetch the two named files from system @samp{sys1} and system 904@samp{sys2} and execute @samp{diff}, putting the result in 905@file{file.diff} in the current directory on the local system. The 906current directory must be writable by the @command{uuxqt} daemon for 907this to work. 908 909@example 910uux 'sys1!uucp ~user1/file1 (sys2!~user2/file2)' 911@end example 912Execute @command{uucp} on the system @samp{sys1} copying @file{file1} 913(on system @samp{sys1}) to @samp{sys2}. This illustrates the use of 914parentheses for quoting. 915 916@node Invoking uustat, Invoking uuname, Invoking uux, Invoking the UUCP Programs 917@section Invoking uustat 918 919@menu 920* uustat Description:: Description of uustat 921* uustat Options:: Options Supported by uustat 922* uustat Examples:: Examples of uustat Usage 923@end menu 924 925@node uustat Description, uustat Options, Invoking uustat, Invoking uustat 926@subsection uustat Description 927 928@example 929uustat -a 930uustat --all 931uustat [-eKRiMNQ] [-sS system] [-uU user] [-cC command] [-oy hours] 932 [-B lines] [--executions] [--kill-all] [--rejuvenate-all] 933 [--prompt] [--mail] [--notify] [--no-list] [--system system] 934 [--not-system system] [--user user] [--not-user user] 935 [--command command] [--not-command command] [--older-than hours] 936 [--younger-than hours] [--mail-lines lines] 937uustat [-kr jobid] [--kill jobid] [--rejuvenate jobid] 938uustat -q [-sS system] [-oy hours] [--system system] 939 [--not-system system ] [--older-than hours] [--younger-than hours] 940uustat --list [-sS system] [-oy hours] [--system system ] 941 [--not-system system] [--older-than hours] [--younger-than hours] 942uustat -m 943uustat --status 944uustat -p 945uustat --ps 946@end example 947 948The @command{uustat} command can display various types of status 949information about the UUCP system. It can also be used to cancel or 950rejuvenate requests made by @command{uucp} or @command{uux}. 951 952With no options, @command{uustat} displays all jobs queued up for the 953invoking user, as if given the @option{--user} option with the appropriate 954argument. 955 956If any of the @option{-a}, @option{--all}, @option{-e}, 957@option{--executions}, @option{-s}, @option{--system}, @option{-S}, 958@option{--not-system}, @option{-u}, @option{--user}, @option{-U}, 959@option{--not-user}, @option{-c}, @option{--command}, @option{-C}, 960@option{--not-command}, @option{-o}, @option{--older-than}, @option{-y}, 961or @option{--younger-than} options are given, then all jobs which match 962the combined specifications are displayed. 963 964The @option{-K} or @option{--kill-all} option may be used to kill off a 965selected group of jobs, such as all jobs more than 7 days old. 966 967@node uustat Options, uustat Examples, uustat Description, Invoking uustat 968@subsection uustat Options 969 970The following options may be given to @command{uustat}. 971 972@table @option 973@item -a 974@itemx --all 975List all queued file transfer requests. 976 977@item -e 978@itemx --executions 979List queued execution requests rather than queued file transfer 980requests. Queued execution requests are processed by @command{uuxqt} 981rather than @command{uucico}. Queued execution requests may be waiting for 982some file to be transferred from a remote system. They are created by 983an invocation of @command{uux}. 984 985@item -s system 986@itemx --system system 987List all jobs queued up for the named system. These options may be 988specified multiple times, in which case all jobs for all the named 989systems will be listed. If used with @option{--list}, only the systems 990named will be listed. 991 992@item -S system 993@itemx --not-system system 994List all jobs queued for systems other than the one named. These 995options may be specified multiple times, in which case no jobs from any 996of the specified systems will be listed. If used with @option{--list}, 997only the systems not named will be listed. These options may not be 998used with @option{-s} or @option{--system}. 999 1000@item -u user 1001@itemx --user user 1002List all jobs queued up for the named user. These options may be 1003specified multiple times, in which case all jobs for all the named users 1004will be listed. 1005 1006@item -U user 1007@itemx --not-user user 1008List all jobs queued up for users other than the one named. These 1009options may be specified multiple times, in which case no jobs from any 1010of the specified users will be listed. These options may not be used 1011with @option{-u} or @option{--user}. 1012 1013@item -c command 1014@itemx --command command 1015List all jobs requesting the execution of the named command. If 1016@samp{command} is @samp{ALL} this will list all jobs requesting the 1017execution of some command (as opposed to simply requesting a file 1018transfer). These options may be specified multiple times, in which case 1019all jobs requesting any of the commands will be listed. 1020 1021@item -C command 1022@itemx --not-command command 1023List all jobs requesting execution of some command other than the named 1024command, or, if @samp{command} is @samp{ALL}, list all jobs that simply 1025request a file transfer (as opposed to requesting the execution of some 1026command). These options may be specified multiple times, in which case 1027no job requesting one of the specified commands will be listed. These 1028options may not be used with @option{-c} or @option{--command}. 1029 1030@item -o hours 1031@itemx --older-than hours 1032List all queued jobs older than the given number of hours. If used with 1033@option{--list}, only systems whose oldest job is older than the given 1034number of hours will be listed. 1035 1036@item -y hours 1037@itemx --younger-than hours 1038List all queued jobs younger than the given number of hours. If used 1039with @option{--list}, only systems whose oldest job is younger than the 1040given number of hours will be listed. 1041 1042@item -k jobid 1043@itemx --kill jobid 1044Kill the named job. The job id is shown by the default output format, 1045as well as by the @option{-j} or @option{--jobid} options to @command{uucp} 1046or @command{uux}. A job may only be killed by the user who created the 1047job, or by the UUCP administrator, or the superuser. The @option{-k} or 1048@option{--kill} options may be used multiple times on the command line to 1049kill several jobs. 1050 1051@item -r jobid 1052@itemx --rejuvenate jobid 1053Rejuvenate the named job. This will mark it as having been invoked at 1054the current time, affecting the output of the @option{-o}, 1055@option{--older-than}, @option{-y}, or @option{--younger-than} options, 1056possibly preserving it from any automated cleanup daemon. The job id is 1057shown by the default output format, as well as by the @option{-j} or 1058@option{--jobid} options to @command{uucp} or @command{uux}. A job may 1059only be rejuvenated by the user who created the job, or by the UUCP 1060administrator, or the superuser. The @option{-r} or @option{--rejuvenate} 1061options may be used multiple times on the command line to rejuvenate 1062several jobs. 1063 1064@item -q 1065@itemx --list 1066Display the status of commands, executions and conversations for all 1067remote systems for which commands or executions are queued. The 1068@option{-s}, @option{--system}, @option{-S}, @option{--not-system}, 1069@option{-o}, @option{--older-than}, @option{-y}, and 1070@option{--younger-than} options may be used to restrict the systems which 1071are listed. Systems for which no commands or executions are queued will 1072never be listed. 1073 1074@item -m 1075@itemx --status 1076Display the status of conversations for all remote systems. 1077 1078@item -p 1079@itemx --ps 1080Display the status of all processes holding UUCP locks on systems or 1081ports. 1082 1083@need 500 1084@item -i 1085@itemx --prompt 1086For each listed job, prompt whether to kill the job or not. If the 1087first character of the input line is @kbd{y} or @kbd{Y}, the job will be 1088killed. 1089 1090@item -K 1091@itemx --kill-all 1092Automatically kill each listed job. This can be useful for automatic 1093cleanup scripts, in conjunction with the @option{--mail} and 1094@option{--notify} options. 1095 1096@item -R 1097@itemx --rejuvenate-all 1098Automatically rejuvenate each listed job. This may not be used with 1099@option{--kill-all}. 1100 1101@item -M 1102@itemx --mail 1103For each listed job, send mail to the UUCP administrator. If the job is 1104killed (due to @option{--kill-all}, or @option{--prompt} with an affirmative 1105response) the mail will indicate that. A comment specified by the 1106@option{--comment} option may be included. If the job is an execution, 1107the initial portion of its standard input will be included in the mail 1108message; the number of lines to include may be set with the 1109@option{--mail-lines} option (the default is 100). If the standard input 1110contains null characters, it is assumed to be a binary file and is not 1111included. 1112 1113@item -N 1114@itemx --notify 1115For each listed job, send mail to the user who requested the job. The 1116mail is identical to that sent by the @option{-M} or @option{--mail} 1117options. 1118 1119@item -W comment 1120@itemx --comment comment 1121Specify a comment to be included in mail sent with the @option{-M}, 1122@option{--mail}, @option{-N}, or @option{--notify} options. 1123 1124@item -B lines 1125@itemx --mail-lines lines 1126When the @option{-M}, @option{--mail}, @option{-N}, or @option{--notify} 1127options are used to send mail about an execution with standard input, 1128this option controls the number of lines of standard input to include in 1129the message. The default is 100. 1130 1131@item -Q 1132@itemx --no-list 1133Do not actually list the job, but only take any actions indicated by the 1134@option{-i}, @option{--prompt}, @option{-K}, @option{--kill-all}, 1135@option{-M}, @option{--mail}, @option{-N} or @option{--notify} options. 1136 1137@item -x type 1138@itemx --debug type 1139@itemx -I file 1140@itemx --config file 1141@itemx -v 1142@itemx --version 1143@itemx --help 1144@xref{Standard Options}. 1145@end table 1146 1147@node uustat Examples, , uustat Options, Invoking uustat 1148@subsection uustat Examples 1149 1150@example 1151uustat --all 1152@end example 1153Display status of all jobs. A sample output line is as follows: 1154@smallexample 1155bugsA027h bugs ian 04-01 13:50 Executing rmail ian@@airs.com (sending 12 bytes) 1156@end smallexample 1157The format is 1158@example 1159jobid system user queue-date command (size) 1160@end example 1161The jobid may be passed to the @option{--kill} or @option{--rejuvenate} 1162options. The size indicates how much data is to be transferred to the 1163remote system, and is absent for a file receive request. The 1164@option{--system}, @option{--not-system}, @option{--user}, @option{--not-user}, 1165@option{--command}, @option{--not-command}, @option{--older-than}, and 1166@option{--younger-than} options may be used to control which jobs are 1167listed. 1168 1169@example 1170uustat --executions 1171@end example 1172Display status of queued up execution requests. A sample output line 1173is as follows: 1174@smallexample 1175bugs bugs!ian 05-20 12:51 rmail ian 1176@end smallexample 1177The format is 1178@example 1179system requestor queue-date command 1180@end example 1181The @option{--system}, @option{--not-system}, @option{--user}, 1182@option{--not-user}, @option{--command}, @option{--not-command}, 1183@option{--older-than}, and @option{--younger-than} options may be used to 1184control which requests are listed. 1185 1186@example 1187uustat --list 1188@end example 1189Display status for all systems with queued up commands. A sample 1190output line is as follows: 1191@smallexample 1192bugs 4C (1 hour) 0X (0 secs) 04-01 14:45 Dial failed 1193@end smallexample 1194This indicates the system, the number of queued commands, the age of the 1195oldest queued command, the number of queued local executions, the age of 1196the oldest queued execution, the date of the last conversation, and the 1197status of that conversation. 1198 1199@example 1200uustat --status 1201@end example 1202Display conversation status for all remote systems. A sample output 1203line is as follows: 1204@smallexample 1205bugs 04-01 15:51 Conversation complete 1206@end smallexample 1207This indicates the system, the date of the last conversation, and the 1208status of that conversation. If the last conversation failed, 1209@command{uustat} will indicate how many attempts have been made to call 1210the system. If the retry period is currently preventing calls to that 1211system, @command{uustat} also displays the time when the next call will 1212be permitted. 1213 1214@example 1215uustat --ps 1216@end example 1217Display the status of all processes holding UUCP locks. The output 1218format is system dependent, as @command{uustat} simply invokes 1219@command{ps} on each process holding a lock. 1220 1221@example 1222uustat -c rmail -o 168 -K -Q -M -N -W "Queued for over 1 week" 1223@end example 1224This will kill all @samp{rmail} commands that have been queued up 1225waiting for delivery for over 1 week (168 hours). For each such 1226command, mail will be sent both to the UUCP administrator and to the 1227user who requested the rmail execution. The mail message sent will 1228include the string given by the @option{-W} option. The @option{-Q} option 1229prevents any of the jobs from being listed on the terminal, so any 1230output from the program will be error messages. 1231 1232@node Invoking uuname, Invoking uulog, Invoking uustat, Invoking the UUCP Programs 1233@section Invoking uuname 1234 1235@example 1236uuname [-a] [--aliases] 1237uuname -l 1238uuname --local 1239@end example 1240 1241By default, the @command{uuname} program simply lists the names of all 1242the remote systems mentioned in the UUCP configuration files. 1243 1244The @command{uuname} program may also be used to print the UUCP name of 1245the local system. 1246 1247The @command{uuname} program is mainly for use by shell scripts. 1248 1249The following options may be given to @command{uuname}. 1250 1251@table @option 1252@item -a 1253@itemx --aliases 1254List all aliases for remote systems, as well as their canonical names. 1255Aliases may be specified in the @file{sys} file (@pxref{Naming the 1256System}). 1257 1258@item -l 1259@itemx --local 1260Print the UUCP name of the local system, rather than listing the names 1261of all the remote systems. 1262 1263@item -x type 1264@itemx --debug type 1265@itemx -I file 1266@itemx --config file 1267@itemx -v 1268@itemx --version 1269@itemx --help 1270@xref{Standard Options}. 1271@end table 1272 1273@node Invoking uulog, Invoking uuto, Invoking uuname, Invoking the UUCP Programs 1274@section Invoking uulog 1275 1276@example 1277uulog [-#] [-n lines] [-sf system] [-u user] [-DSF] [--lines lines] 1278 [--system system] [--user user] [--debuglog] [--statslog] 1279 [--follow] [--follow=system] 1280@end example 1281 1282The @command{uulog} program may be used to display the UUCP log file. 1283Different options may be used to select which parts of the file to 1284display. 1285 1286@table @option 1287@item -# 1288@itemx -n lines 1289@itemx --lines lines 1290Here @samp{#} is a number; e.g., @option{-10}. The specified number of 1291lines is displayed from the end of the log file. The default is to 1292display the entire log file, unless the @option{-f}, @option{-F}, or 1293@option{--follow} options are used, in which case the default is to 1294display 10 lines. 1295 1296@item -s system 1297@itemx --system system 1298Display only log entries pertaining to the specified system. 1299 1300@item -u user 1301@itemx --user user 1302Display only log entries pertaining to the specified user. 1303 1304@item -D 1305@itemx --debuglog 1306Display the debugging log file. 1307 1308@item -S 1309@itemx --statslog 1310Display the statistics log file. 1311 1312@item -F 1313@itemx --follow 1314Keep displaying the log file forever, printing new lines as they are 1315appended to the log file. 1316 1317@item -f system 1318@itemx --follow=system 1319Keep displaying the log file forever, displaying only log entries 1320pertaining to the specified system. 1321 1322@item -X type 1323@itemx --debug type 1324@itemx -I file 1325@itemx --config file 1326@itemx -v 1327@itemx --version 1328@itemx --help 1329@xref{Standard Options}. Note that @command{uulog} specifies the 1330debugging type using @option{-X} rather than the usual @option{-x}. 1331@end table 1332 1333The operation of @command{uulog} depends to some degree upon the type of 1334log files generated by the UUCP programs. This is a compile time 1335option. If the UUCP programs have been compiled to use HDB style log 1336files, @command{uulog} changes in the following ways: 1337 1338@itemize @bullet 1339@item 1340The new options @option{-x} and @option{--uuxqtlog} may be used to list the 1341@command{uuxqt} log file. 1342 1343@item 1344It is no longer possible to omit all arguments: one of @option{-s}, 1345@option{--system}, @option{-f}, @option{--follow=system}, @option{-D}, 1346@option{--debuglog}, @option{-S}, @option{--statslog}, @option{-x}, or 1347@option{--uuxqtlog} must be used. 1348 1349@item 1350The option @option{--system ANY} may be used to list log file entries 1351which do not pertain to any particular system. 1352@end itemize 1353 1354@node Invoking uuto, Invoking uupick, Invoking uulog, Invoking the UUCP Programs 1355@section Invoking uuto 1356 1357@example 1358uuto files... system!user 1359@end example 1360 1361The @command{uuto} program may be used to conveniently send files to a 1362particular user on a remote system. It will arrange for mail to be sent 1363to the remote user when the files arrive on the remote system, and he or 1364she may easily retrieve the files using the @command{uupick} program 1365(@pxref{Invoking uupick}). Note that @command{uuto} does not provide 1366any security---any user on the remote system can examine the files. 1367 1368The last argument specifies the system and user name to which to send 1369the files. The other arguments are the files or directories to be sent. 1370 1371The @command{uuto} program is actually just a trivial shell script which 1372invokes the @command{uucp} program with the appropriate arguments. Any 1373option which may be given to @command{uucp} may also be given to 1374@command{uuto}. @xref{Invoking uucp}. 1375 1376@need 2000 1377@node Invoking uupick, Invoking cu, Invoking uuto, Invoking the UUCP Programs 1378@section Invoking uupick 1379 1380@example 1381uupick [-s system] [--system system] 1382@end example 1383 1384The @command{uupick} program is used to conveniently retrieve files 1385transferred by the @command{uuto} program. 1386 1387For each file transferred by @command{uuto}, @command{uupick} will 1388display the source system, the file name, and whether the name refers to 1389a regular file or a directory. It will then wait for the user to 1390specify an action to take. One of the following commands must be 1391entered: 1392 1393@table @samp 1394@item q 1395Quit out of @command{uupick}. 1396 1397@item RETURN 1398Skip the file. 1399 1400@item m [directory] 1401Move the file or directory to the specified directory. If no directory 1402is specified, the file is moved to the current directory. 1403 1404@item a [directory] 1405Move all files from this system to the specified directory. If no 1406directory is specified, the files are moved to the current directory. 1407 1408@item p 1409List the file on standard output. 1410 1411@item d 1412Delete the file. 1413 1414@item ! [command] 1415Execute @samp{command} as a shell escape. 1416@end table 1417 1418The @option{-s} or @option{--system} option may be used to restrict 1419@command{uupick} to only present files transferred from a particular 1420system. The @command{uupick} program also supports the standard UUCP 1421program options; see @ref{Standard Options}. 1422 1423@need 2000 1424@node Invoking cu, Invoking uucico, Invoking uupick, Invoking the UUCP Programs 1425@section Invoking cu 1426 1427@menu 1428* cu Description:: Description of cu 1429* cu Commands:: Commands Supported by cu 1430* cu Variables:: Variables Supported by cu 1431* cu Options:: Options Supported by cu 1432@end menu 1433 1434@node cu Description, cu Commands, Invoking cu, Invoking cu 1435@subsection cu Description 1436 1437@example 1438cu [options] [system | phone | "dir"] 1439@end example 1440 1441The @command{cu} program is used to call up another system and act as a 1442dial in terminal. It can also do simple file transfers with no error 1443checking. 1444 1445The @command{cu} program takes a single non-option argument. 1446 1447If the argument is the string @samp{dir} cu will make a direct 1448connection to the port. This may only be used by users with write 1449access to the port, as it permits reprogramming the modem. 1450 1451Otherwise, if the argument begins with a digit, it is taken to be a 1452phone number to call. 1453 1454Otherwise, it is taken to be the name of a system to call. 1455 1456The @option{-z} or @option{--system} options may be used to name a system 1457beginning with a digit, and the @option{-c} or @option{--phone} options may 1458be used to name a phone number that does not begin with a digit. 1459 1460The @command{cu} program locates a port to use in the UUCP configuration 1461files. If a simple system name is given, it will select a port 1462appropriate for that system. The @option{-p}, @option{--port}, @option{-l}, 1463@option{--line}, @option{-s}, and @option{--speed} options may be used to 1464control the port selection. 1465 1466When a connection is made to the remote system, @command{cu} forks into 1467two processes. One reads from the port and writes to the terminal, 1468while the other reads from the terminal and writes to the port. 1469 1470@node cu Commands, cu Variables, cu Description, Invoking cu 1471@subsection cu Commands 1472 1473The @command{cu} program provides several commands that may be used during 1474the conversation. The commands all begin with an escape character, 1475which by default is @kbd{~} (tilde). The escape character is only 1476recognized at the beginning of a line. To send an escape character to 1477the remote system at the start of a line, it must be entered twice. All 1478commands are either a single character or a word beginning with @kbd{%} 1479(percent sign). 1480 1481The @command{cu} program recognizes the following commands. 1482 1483@table @samp 1484@item ~. 1485Terminate the conversation. 1486 1487@item ~! command 1488Run command in a shell. If command is empty, starts up a shell. 1489 1490@item ~$ command 1491Run command, sending the standard output to the remote system. 1492 1493@item ~| command 1494Run command, taking the standard input from the remote system. 1495 1496@item ~+ command 1497Run command, taking the standard input from the remote system and 1498sending the standard output to the remote system. 1499 1500@item ~#, ~%break 1501Send a break signal, if possible. 1502 1503@item ~c directory, ~%cd directory 1504Change the local directory. 1505 1506@item ~> file 1507Send a file to the remote system. This just dumps the file over the 1508communication line. It is assumed that the remote system is expecting 1509it. 1510 1511@item ~< 1512Receive a file from the remote system. This prompts for the local file 1513name and for the remote command to execute to begin the file transfer. 1514It continues accepting data until the contents of the @samp{eofread} 1515variable are seen. 1516 1517@item ~p from to 1518@itemx ~%put from to 1519Send a file to a remote Unix system. This runs the appropriate 1520commands on the remote system. 1521 1522@item ~t from to 1523@itemx ~%take from to 1524Retrieve a file from a remote Unix system. This runs the appropriate 1525commands on the remote system. 1526 1527@item ~s variable value 1528Set a @command{cu} variable to the given value. If value is not given, the 1529variable is set to @samp{true}. 1530 1531@item ~! variable 1532Set a @command{cu} variable to @samp{false}. 1533 1534@item ~z 1535Suspend the cu session. This is only supported on some systems. On 1536systems for which @kbd{^Z} may be used to suspend a job, @samp{~^Z} will 1537also suspend the session. 1538 1539@item ~%nostop 1540Turn off XON/XOFF handling. 1541 1542@item ~%stop 1543Turn on XON/XOFF handling. 1544 1545@item ~v 1546List all the variables and their values. 1547 1548@item ~? 1549List all commands. 1550@end table 1551 1552@node cu Variables, cu Options, cu Commands, Invoking cu 1553@subsection cu Variables 1554 1555The @command{cu} program also supports several variables. They may be 1556listed with the @samp{~v} command, and set with the @samp{~s} or 1557@samp{~!} commands. 1558 1559@table @samp 1560@item escape 1561The escape character. The default is @kbd{~} (tilde). 1562 1563@item delay 1564If this variable is true, @command{cu} will delay for a second, after 1565recognizing the escape character, before printing the name of the local 1566system. The default is true. 1567 1568@item eol 1569The list of characters which are considered to finish a line. The 1570escape character is only recognized after one of these is seen. The 1571default is @kbd{carriage return}, @kbd{^U}, @kbd{^C}, @kbd{^O}, 1572@kbd{^D}, @kbd{^S}, @kbd{^Q}, @kbd{^R}. 1573 1574@item binary 1575Whether to transfer binary data when sending a file. If this is false, 1576then newlines in the file being sent are converted to carriage returns. 1577The default is false. 1578 1579@item binary-prefix 1580A string used before sending a binary character in a file transfer, if 1581the @samp{binary} variable is true. The default is @samp{^V}. 1582 1583@item echo-check 1584Whether to check file transfers by examining what the remote system 1585echoes back. This probably doesn't work very well. The default is 1586false. 1587 1588@item echonl 1589The character to look for after sending each line in a file. The 1590default is carriage return. 1591 1592@item timeout 1593The timeout to use, in seconds, when looking for a character, either 1594when doing echo checking or when looking for the @samp{echonl} 1595character. The default is 30. 1596 1597@item kill 1598The character to use delete a line if the echo check fails. The default 1599is @kbd{^U}. 1600 1601@item resend 1602The number of times to resend a line if the echo check continues to 1603fail. The default is 10. 1604 1605@item eofwrite 1606The string to write after sending a file with the @samp{~>} command. 1607The default is @samp{^D}. 1608 1609@item eofread 1610The string to look for when receiving a file with the @samp{ ~<} 1611command. The default is @samp{$}, which is intended to be a typical 1612shell prompt. 1613 1614@item verbose 1615Whether to print accumulated information during a file transfer. The 1616default is true. 1617@end table 1618 1619@node cu Options, , cu Variables, Invoking cu 1620@subsection cu Options 1621 1622The following options may be given to @command{cu}. 1623 1624@table @option 1625@item -e 1626@itemx --parity=even 1627Use even parity. 1628 1629@item -o 1630@itemx --parity=odd 1631Use odd parity. 1632 1633@item --parity=none 1634Use no parity. No parity is also used if both @option{-e} and @option{-o} 1635are given. 1636 1637@item -h 1638@itemx --halfduplex 1639Echo characters locally (half-duplex mode). 1640 1641@item --nostop 1642Turn off XON/XOFF handling (it is on by default). 1643 1644@item -E char 1645@itemx --escape char 1646Set the escape character. Initially @kbd{~} (tilde). To eliminate the 1647escape character, use @samp{-E ''}. 1648 1649@item -z system 1650@itemx --system system 1651The system to call. 1652 1653@item -c phone-number 1654@itemx --phone phone-number 1655The phone number to call. 1656 1657@item -p port 1658@itemx -a port 1659@itemx --port port 1660Name the port to use. 1661 1662@item -l line 1663@itemx --line line 1664Name the line to use by giving a device name. This may be used to dial 1665out on ports that are not listed in the UUCP configuration files. Write 1666access to the device is required. 1667 1668@item -s speed 1669@itemx -# 1670@itemx --speed speed 1671The speed (baud rate) to use. Here, @option{-#} means an actual number; 1672e.g., @option{-9600}. 1673 1674@item -n 1675@itemx --prompt 1676Prompt for the phone number to use. 1677 1678@item -d 1679Enter debugging mode. Equivalent to @option{--debug all}. 1680 1681@item -x type 1682@itemx --debug type 1683@itemx -I file 1684@itemx --config file 1685@itemx -v 1686@itemx --version 1687@itemx --help 1688@xref{Standard Options}. 1689@end table 1690 1691@node Invoking uucico, Invoking uuxqt, Invoking cu, Invoking the UUCP Programs 1692@section Invoking uucico 1693 1694@menu 1695* uucico Description:: Description of uucico 1696* uucico Options:: Options Supported by uucico 1697@end menu 1698 1699@node uucico Description, uucico Options, Invoking uucico, Invoking uucico 1700@subsection uucico Description 1701 1702@example 1703uucico [options] 1704@end example 1705 1706The @command{uucico} daemon processes file transfer requests queued by 1707@command{uucp} and @command{uux}. It is started when @command{uucp} or 1708@command{uux} is run (unless they are given the @option{-r} or 1709@option{--nouucico} options). It is also typically started periodically 1710using entries in the @file{crontab} table(s). 1711 1712When @command{uucico} is invoked with @option{-r1}, @option{--master}, 1713@option{-s}, @option{--system}, or @option{-S}, the daemon will place a call 1714to a remote system, running in master mode. Otherwise the daemon will 1715start in slave mode, accepting a call from a remote system. Typically a 1716special login name will be set up for UUCP which automatically invokes 1717@command{uucico} when a remote system calls in and logs in under that name. 1718 1719When @command{uucico} terminates, it invokes the @command{uuxqt} daemon, 1720unless the @option{-q} or @option{--nouuxqt} options were given; 1721@command{uuxqt} executes any work orders created by @command{uux} on a remote 1722system, and any work orders created locally which have received remote 1723files for which they were waiting. 1724 1725If a call fails, @command{uucico} will normally refuse to retry the call 1726until a certain (configurable) amount of time has passed. This may be 1727overriden by the @option{-f}, @option{--force}, or @option{-S} options. 1728 1729The @option{-l}, @option{--prompt}, @option{-e}, or @option{--loop} options may 1730be used to force @command{uucico} to produce its own prompts of 1731@samp{login: } and @samp{Password:}. When another @command{uucico} daemon 1732calls in, it will see these prompts and log in as usual. The login name 1733and password will normally be checked against a separate list kept 1734specially for @command{uucico}, rather than the @file{/etc/passwd} file 1735(@pxref{Configuration File Names}). It is possible, on some systems, to 1736configure @command{uucico} to use @file{/etc/passwd}. The @option{-l} or 1737@option{--prompt} options will prompt once and then exit; in this mode the 1738UUCP administrator, or the superuser, may use the @option{-u} or 1739@option{--login} option to force a login name, in which case @command{uucico} 1740will not prompt for one. The @option{-e} or @option{--loop} options will 1741prompt again after the first session is over; in this mode @command{uucico} 1742will permanently control a port. 1743 1744If @command{uucico} receives a @code{SIGQUIT}, @code{SIGTERM} or 1745@code{SIGPIPE} signal, it will cleanly abort any current conversation 1746with a remote system and exit. If it receives a @code{SIGHUP} signal it 1747will abort any current conversation, but will continue to place calls to 1748(if invoked with @option{-r1} or @option{--master}) and accept calls from 1749(if invoked with @option{-e} or @option{--loop}) other systems. If it 1750receives a @code{SIGINT} signal it will finish the current conversation, 1751but will not place or accept any more calls. 1752 1753@node uucico Options, , uucico Description, Invoking uucico 1754@subsection uucico Options 1755 1756The following options may be given to @command{uucico}. 1757 1758@table @option 1759@item -r1 1760@itemx --master 1761Start in master mode: call out to a remote system. Implied by 1762@option{-s}, @option{--system}, or @option{-S}. If no system is specified, 1763sequentially call every system for which work is waiting to be done. 1764 1765@item -r0 1766@itemx --slave 1767Start in slave mode. This is the default. 1768 1769@item -s system 1770@itemx --system system 1771Call the specified system. 1772 1773@item -S system 1774Call the specified system, ignoring any required wait. This is 1775equivalent to @samp{-s system -f}. 1776 1777@item -f 1778@itemx --force 1779Ignore any required wait for any systems to be called. 1780 1781@item -l 1782@itemx --prompt 1783Prompt for login name and password using @samp{login: } and 1784@samp{Password:}. This allows @command{uucico} to be easily run from 1785@command{inetd}. The login name and password are checked against the UUCP 1786password file, which need not be @file{/etc/passwd}. The @option{--login} 1787option may be used to force a login name, in which cause @command{uucico} 1788will only prompt for a password. 1789 1790@item -p port 1791@itemx --port port 1792Specify a port to call out on or to listen to. 1793 1794@item -e 1795@itemx --loop 1796Enter an endless loop of login/password prompts and slave mode daemon 1797execution. The program will not stop by itself; you must use 1798@command{kill} to shut it down. 1799 1800@item -w 1801@itemx --wait 1802After calling out (to a particular system when @option{-s}, 1803@option{--system}, or @option{-S} is specifed, or to all systems which have 1804work when just @option{-r1} or @option{--master} is specifed), begin an 1805endless loop as with @option{--loop}. 1806 1807@item -q 1808@itemx --nouuxqt 1809Do not start the @command{uuxqt} daemon when finished. 1810 1811@item -c 1812@itemx --quiet 1813If no calls are permitted at this time, then don't make the call, but 1814also do not put an error message in the log file and do not update the 1815system status (as reported by @command{uustat}). This can be convenient 1816for automated polling scripts, which may want to simply attempt to call 1817every system rather than worry about which particular systems may be 1818called at the moment. This option also suppresses the log message 1819indicating that there is no work to be done. 1820 1821@item -C 1822@itemx --ifwork 1823Only call the system named by @option{-s}, @option{--system}, or @option{-S} 1824if there is work for that system. 1825 1826@item -D 1827@itemx --nodetach 1828Do not detach from the controlling terminal. Normally @command{uucico} 1829detaches from the terminal before each call out to another system and 1830before invoking @command{uuxqt}. This option prevents this. 1831 1832@item -u name 1833@itemx --login name 1834Set the login name to use instead of that of the invoking user. This 1835option may only be used by the UUCP administrator or the superuser. If 1836used with @option{--prompt}, this will cause @command{uucico} to prompt only 1837for the password, not the login name. 1838 1839@item -z 1840@itemx --try-next 1841If a call fails after the remote system is reached, try the next 1842alternate rather than simply exiting. 1843 1844@item -i type 1845@itemx --stdin type 1846Set the type of port to use when using standard input. The only 1847supported port type is TLI, and this is only available on machines which 1848support the TLI networking interface. Specifying @samp{-i TLI} causes 1849@command{uucico} to use TLI calls to perform I/O. 1850 1851@item -X type 1852Same as the standard option @option{-x type}. Provided for historical 1853compatibility. 1854 1855@item -x type 1856@itemx --debug type 1857@itemx -I file 1858@itemx --config file 1859@itemx -v 1860@itemx --version 1861@itemx --help 1862@xref{Standard Options}. 1863@end table 1864 1865@node Invoking uuxqt, Invoking uuchk, Invoking uucico, Invoking the UUCP Programs 1866@section Invoking uuxqt 1867 1868@example 1869uuxqt [-c command] [-s system] [--command command] [--system system] 1870@end example 1871 1872The @command{uuxqt} daemon executes commands requested by @command{uux} from 1873either the local system or from remote systems. It is started 1874automatically by the @command{uucico} daemon (unless @command{uucico} is given 1875the @option{-q} or @option{--nouuxqt} options). 1876 1877There is normally no need to run @command{uuxqt}, since it will be invoked 1878by @command{uucico}. However, @command{uuxqt} can be invoked directly to 1879provide greater control over the processing of the work queue. 1880 1881Multiple invocations of @command{uuxqt} may be run at once, as controlled 1882by the @code{max-uuxqts} configuration command; see @ref{Miscellaneous 1883(config)}. 1884 1885The following options may be given to @command{uuxqt}. 1886 1887@table @option 1888@item -c command 1889@itemx --command command 1890Only execute requests for the specified command. For example, 1891@samp{uuxqt --command rmail}. 1892 1893@item -s system 1894@itemx --system system 1895Only execute requests originating from the specified system. 1896 1897@item -x type 1898@itemx --debug type 1899@itemx -I file 1900@itemx --config 1901@itemx -v 1902@itemx --version 1903@itemx --help 1904@xref{Standard Options}. 1905@end table 1906 1907@node Invoking uuchk, Invoking uuconv, Invoking uuxqt, Invoking the UUCP Programs 1908@section Invoking uuchk 1909 1910@example 1911uuchk [-s system] [--system system] 1912@end example 1913 1914The @command{uuchk} program displays information read from the UUCP 1915configuration files. It should be used to ensure that UUCP has been 1916configured correctly. 1917 1918The @option{-s} or @option{--system} options may be used to display the 1919configuration for just the specified system, rather than for all 1920systems. The @command{uuchk} program also supports the standard UUCP 1921program options; see @ref{Standard Options}. 1922 1923@need 2000 1924@node Invoking uuconv, Invoking uusched, Invoking uuchk, Invoking the UUCP Programs 1925@section Invoking uuconv 1926 1927@example 1928uuconv -i type -o type [-p program] [--program program] 1929uuconv --input type --output type [-p program] [--program program] 1930@end example 1931 1932The @command{uuconv} program converts UUCP configuration files from one 1933format to another. The type of configuration file to read is specified 1934using the @option{-i} or @option{--input} options. The type of 1935configuration file to write is specified using the @option{-o} or 1936@option{--output} options. 1937 1938The supported configuration file types are @samp{taylor}, @samp{v2}, and 1939@samp{hdb}. For a description of the @samp{taylor} configuration files, 1940see @ref{Configuration Files}. The other types of configuration files 1941are used by traditional UUCP packages, and are not described in this 1942manual. 1943 1944An input configuration of type @samp{v2} or @samp{hdb} is read from a 1945compiled in directory (specified by @samp{oldconfigdir} in 1946@file{Makefile}). An input configuration of type @samp{taylor} is read 1947from a compiled in directory by default, but may be overridden with the 1948standard @option{-I} or @option{--config} options (@pxref{Standard 1949Options}). 1950 1951The output configuration is written to files in the directory in which 1952@command{uuconv} is run. 1953 1954Some information in the input files may not be representable in the 1955desired output format, in which case @command{uuconv} will silently discard 1956it. The output of @command{uuconv} should be carefully checked before it 1957is used. The @command{uuchk} program may be used for this purpose; see 1958@ref{Invoking uuchk}. 1959 1960The @option{-p} or @option{--program} option may be used to convert specific 1961@command{cu} configuration information, rather than the default of only 1962converting the @command{uucp} configuration information; see @ref{config 1963File}. 1964 1965The @command{uuchk} program also supports the standard UUCP program 1966options; see @ref{Standard Options}. 1967 1968@node Invoking uusched, , Invoking uuconv, Invoking the UUCP Programs 1969@section Invoking uusched 1970 1971The @command{uusched} program is actually just a shell script which 1972invokes the @command{uucico} daemon. It is provided for backward 1973compatibility. It causes @command{uucico} to call all systems for which 1974there is work. Any option which may be given to @command{uucico} may 1975also be given to @command{uusched}. @xref{Invoking uucico}. 1976 1977@node Installing Taylor UUCP, Using Taylor UUCP, Invoking the UUCP Programs, Top 1978@chapter Installing Taylor UUCP 1979 1980These are the installation instructions for the Taylor UUCP package. 1981 1982@menu 1983* Compilation:: Compiling Taylor UUCP 1984* Testing the Compilation:: Testing the Compilation 1985* Installing the Binaries:: Installing the Binaries 1986* Configuration:: Configuring Taylor UUCP 1987* Testing the Installation:: Testing the Installation 1988@end menu 1989 1990@node Compilation, Testing the Compilation, Installing Taylor UUCP, Installing Taylor UUCP 1991@section Compiling Taylor UUCP 1992 1993If you have a source code distribution, you must first compile it for 1994your system. Free versions of Unix, such as Linux, NetBSD, or FreeBSD, 1995often come with pre-compiled binary distributions of UUCP. If you are 1996using a binary distribution, you may skip to the configuration section 1997(@pxref{Configuration}). 1998 1999Follow these steps to compile the source code. 2000 2001@enumerate 2002 2003@item 2004Take a look at the top of @file{Makefile.in} and set the appropriate 2005values for your system. These control where the programs are installed 2006and which user on the system owns them (normally they will be owned by a 2007special user @command{uucp} rather than a real person; they should probably 2008not be owned by @code{root}). 2009 2010@item 2011Run the shell script @code{configure}. This script was generated using 2012the @command{autoconf} program written by David MacKenzie of the Free 2013Software Foundation. It takes a while to run. It will generate the 2014file @file{config.h} based on @file{config.h.in}, and, for each source 2015code directory, will generate @file{Makefile} based on 2016@file{Makefile.in}. 2017 2018You can pass certain arguments to @code{configure} in the environment. 2019Because @code{configure} will compile little test programs to see what 2020is available on your system, you must tell it how to run your compiler. 2021It recognizes the following environment variables: 2022 2023@table @samp 2024@item CC 2025The C compiler. If this is not set, then if @code{configure} can find 2026@samp{gcc} it will use it, otherwise it will use @samp{cc}. 2027@item CFLAGS 2028Flags to pass to the C compiler when compiling the actual code. If this 2029is not set, @code{configure} will use @option{-g}. 2030@item LDFLAGS 2031Flags to pass to the C compiler when only linking, not compiling. If 2032this is not set, @code{configure} will use the empty string. 2033@item LIBS 2034Libraries to pass to the C compiler. If this is not set, 2035@code{configure} will use the empty string. 2036@item INSTALL 2037The program to run to install UUCP in the binary directory. If this is 2038not set, then if @code{configure} finds the BSD @command{install} 2039program, it will set this to @samp{install -c}; otherwise, it will use 2040@samp{cp}. 2041@end table 2042 2043Suppose, for example, you want to set the environment variable @samp{CC} 2044to @samp{rcc}. If you are using @command{sh}, @command{bash}, or 2045@command{ksh}, invoke @code{configure} as @samp{CC=rcc configure}. If 2046you are using @command{csh}, do @samp{setenv CC rcc; sh configure}. 2047 2048On some systems you will want to use @samp{LIBS=-lmalloc}. On Xenix 2049derived versions of Unix do not use @samp{LIBS=-lx} because this will 2050bring in the wrong versions of certain routines; if you want to use 2051@option{-lx} you must specify @samp{LIBS=-lc -lx}. 2052 2053You can also pass other arguments to @code{configure} on the command 2054line. Use @samp{configure --help} for a complete list. Of particular 2055interest: 2056@table @option 2057@item --prefix=@var{dirname} 2058The directory under which all files are installed. Default 2059@file{/usr/local}. 2060@item --with-newconfigdir=@var{dirname} 2061The directory in which to find new style configuration files. Default 2062@file{@var{prefix}/conf/uucp}. 2063@item --with-oldconfigdir=@var{dirname} 2064The directory in which to find old style configuration files. Default 2065@file{/usr/lib/uucp}. 2066@end table 2067 2068If @code{configure} fails for some reason, or if you have a very weird 2069system, you may have to configure the package by hand. To do this, copy 2070the file @file{config.h.in} to @file{config.h} and edit it for your 2071system. Then for each source directory (the top directory, and the 2072subdirectories @file{lib}, @file{unix}, and @file{uuconf}) copy 2073@file{Makefile.in} to @file{Makefile}, find the words within @kbd{@@} 2074characters, and set them correctly for your system. 2075 2076@item 2077Igor V. Semenyuk provided this (lightly edited) note about ISC Unix 3.0. 2078The @code{configure} script will default to passing @option{-posix} to 2079@command{gcc}. However, using @option{-posix} changes the environment to 2080POSIX, and on ISC 3.0, at least, the default for @code{POSIX_NO_TRUNC} 2081is 1. This can lead to a problem when @command{uuxqt} executes 2082@command{rmail}. @code{IDA sendmail} has dbm configuration files named 2083@file{mailertable.@{dir,pag@}}. Notice these names are 15 characters 2084long. When @command{uuxqt} compiled with the @option{-posix} executes 2085@command{rmail}, which in turn executes @command{sendmail}, the later is run 2086under the POSIX environment too. This leads to @command{sendmail} bombing 2087out with @samp{'error opening 'M' database: name too long' 2088(mailertable.dir)}. It's rather obscure behaviour, and it took me a day 2089to find out the cause. I don't use the @option{-posix} switch; instead, I 2090run @command{gcc} with @option{-D_POSIX_SOURCE}, and add @option{-lcposix} to 2091@samp{LIBS}. 2092 2093@item 2094On some versions of BSDI there is a bug in the shell which causes the 2095default value for @samp{CFLAGS} to be set incorrectly. If @samp{echo 2096$@{CFLAGS--g@}} echoes @samp{g} rather than @option{-g}, then you must set 2097@samp{CFLAGS} in the environment before running configure. There is a 2098patch available from BSDI for this bug. (Reported by David Vrona). 2099 2100@item 2101On AIX 3.2.5, and possibly other versions, @samp{cc -E} does not work, 2102reporting @samp{Option NOROCONST is not valid}. Test this before 2103running configure by doing something like @samp{touch /tmp/foo.c; cc -E 2104/tmp/foo.c}. This may give a warning about the file being empty, but it 2105should not give the @samp{Option NOROCONST} warning. The workaround is 2106to remove the @samp{,noroconst} entry from the @samp{options} clause in 2107the @samp{cc} stanza in @file{/etc/xlc.cfg}. (Reported by Chris Lewis). 2108 2109@item 2110You should verify that @code{configure} worked correctly by checking 2111@file{config.h} and the instances of @file{Makefile}. 2112 2113@item 2114Edit @file{policy.h} for your local system. The comments explain the 2115various choices. The default values are intended to be reasonable, so 2116you may not have to make any changes. 2117 2118You must decide what type of configuration files to use; for more 2119information on the choices, see @ref{Configuration}. 2120 2121You must also decide what sort of spool directory you want to use. If 2122this is a new installation, I recommend @samp{SPOOLDIR_TAYLOR}; 2123otherwise, select the spool directory corresponding to your existing 2124UUCP package. 2125 2126@item 2127Type @samp{make} to compile everything. 2128 2129The @file{tstuu.c} file is not particularly portable; if you can't 2130figure out how to compile it you can safely ignore it, as it is only 2131used for testing. To use STREAMS pseudo-terminals, tstuu.c must be 2132compiled with @option{-DHAVE_STREAMS_PTYS}; this is not determined by the 2133configure script. 2134 2135If you have any other problems there is probably a bug in the 2136@code{configure} script. 2137 2138@item 2139Please report any problems you have. That is the only way they will get 2140fixed for other people. Supply a patch if you can (@pxref{Patches}), or 2141just ask for help. 2142 2143@end enumerate 2144 2145@node Testing the Compilation, Installing the Binaries, Compilation, Installing Taylor UUCP 2146@section Testing the Compilation 2147 2148If your system supports pseudo-terminals, and you compiled the code to 2149support the new style of configuration files (@code{HAVE_TAYLOR_CONFIG} 2150was set to 1 in @file{policy.h}), you should be able to use the 2151@command{tstuu} program to test the @command{uucico} daemon. If your 2152system supports STREAMS based pseudo-terminals, you must compile tstuu.c 2153with @option{-DHAVE_STREAMS_PTYS}. (The STREAMS based code was 2154contributed by Marc Boucher). 2155 2156To run @command{tstuu}, just type @samp{tstuu} with no arguments. You 2157must run it in the compilation directory, since it runs @file{./uucp}, 2158@file{./uux} and @file{./uucico}. The @command{tstuu} program will run 2159a lengthy series of tests (it takes over ten minutes on a slow VAX). 2160You will need a fair amount of space available in @file{/usr/tmp}. You 2161will probably want to put it in the background. Do not use @kbd{^Z}, 2162because the program traps on @code{SIGCHLD} and winds up dying. The 2163@command{tstuu} program will create a directory @file{/usr/tmp/tstuu} and 2164fill it with configuration files, and create spool directories 2165@file{/usr/tmp/tstuu/spool1} and @file{/usr/tmp/tstuu/spool2}. 2166 2167If your system does not support the @code{FIONREAD} call, the 2168@samp{tstuu} program will run very slowly. This may or may not get 2169fixed in a later version. 2170 2171The @command{tstuu} program will finish with an execute file named 2172@file{X.@var{something}} and a data file named @file{D.@var{something}} 2173in the directory @file{/usr/tmp/tstuu/spool1} (or, more likely, in 2174subdirectories, depending on the choice of @code{SPOOLDIR} in 2175@file{policy.h}). Two log files will be created in the directory 2176@file{/usr/tmp/tstuu}. They will be named @file{Log1} and @file{Log2}, 2177or, if you have selected @code{HAVE_HDB_LOGGING} in @file{policy.h}, 2178@file{Log1/uucico/test2} and @file{Log2/uucico/test1}. There should be 2179no errors in the log files. 2180 2181You can test @command{uuxqt} with @samp{./uuxqt -I 2182/usr/tmp/tstuu/Config1}. This should leave a command file 2183@file{C.@var{something}} and a data file @file{D.@var{something}} in 2184@file{/usr/tmp/tstuu/spool1} or in subdirectories. Again, there should 2185be no errors in the log file. 2186 2187Assuming you compiled the code with debugging enabled, the @option{-x} 2188switch can be used to set debugging modes; see the @code{debug} command 2189for details (@pxref{Debugging Levels}). Use @option{-x all} to turn on 2190all debugging and generate far more output than you will ever want to 2191see. The @command{uucico} daemons will put debugging output in the 2192files @file{Debug1} and @file{Debug2} in the directory 2193@file{/usr/tmp/tstuu}. After that, you're pretty much on your own. 2194 2195On some systems you can also use @command{tstuu} to test @command{uucico} 2196against the system @command{uucico}, by using the @option{-u} switch. For 2197this to work, change the definitions of @code{ZUUCICO_CMD} and 2198@code{UUCICO_EXECL} at the top of @file{tstuu.c} to something 2199appropriate for your system. The definitions in @file{tstuu.c} are what 2200I used for Ultrix 4.0, on which @file{/usr/lib/uucp/uucico} is 2201particularly obstinate about being run as a child; I was only able to 2202run it by creating a login name with no password whose shell was 2203@file{/usr/lib/uucp/uucico}. Calling login in this way will leave fake 2204entries in @file{wtmp} and @file{utmp}; if you compile @file{tstout.c} 2205(in the @file{contrib} directory) as a setuid @code{root} program, 2206@command{tstuu} will run it to clear those entries out. On most systems, 2207such hackery should not be necessary, although on SCO I had to su to 2208@code{root} (@code{uucp} might also have worked) before I could run 2209@file{/usr/lib/uucp/uucico}. 2210 2211You can test @command{uucp} and @command{uux} (give them the @option{-r} 2212switch to keep them from starting @command{uucico}) to make sure they 2213create the right sorts of files. Unfortunately, if you don't know what 2214the right sorts of files are, I'm not going to tell you here. 2215 2216If you can not run @command{tstuu}, or if it fails inexplicably, don't 2217worry about it too much. On some systems @command{tstuu} will fail 2218because of problems using pseudo terminals, which will not matter in 2219normal use. The real test of the package is talking to another system. 2220 2221@node Installing the Binaries, Configuration, Testing the Compilation, Installing Taylor UUCP 2222@section Installing the Binaries 2223 2224You can install the executable files by becoming @code{root} and typing 2225@samp{make install}. Or you can look at what @samp{make install} does 2226and do it by hand. It tries to preserve your old programs, if any, but 2227it only does this the first time Taylor UUCP is installed (so that if 2228you install several versions of Taylor UUCP, you can still go back to 2229your original UUCP programs). You can retrieve the original programs by 2230typing @samp{make uninstall}. 2231 2232Note that by default the programs are compiled with debugging 2233information, and they are not stripped when they are installed. You may 2234want to strip the installed programs to save disk space. For more 2235information, see your system documentation for the @command{strip} 2236program. 2237 2238Of course, simply installing the executable files is not enough. You 2239must also arrange for them to be used correctly. 2240 2241@node Configuration, Testing the Installation, Installing the Binaries, Installing Taylor UUCP 2242@section Configuring Taylor UUCP 2243 2244You will have to decide what types of configuration files you want to 2245use. This package supports a new sort of configuration file; see 2246@ref{Configuration Files}. It also supports V2 configuration files 2247(@file{L.sys}, @file{L-devices}, etc.) and HDB configuration files 2248(@file{Systems}, @file{Devices}, etc.). No documentation is provided 2249for V2 or HDB configuration files. All types of configuration files can 2250be used at once, if you are so inclined. Currently using just V2 2251configuration files is not really possible, because there is no way to 2252specify a dialer (there are no built in dialers, and the program does 2253not know how to read @file{acucap} or @file{modemcap}); however, V2 2254configuration files can be used with a new style dial file (@pxref{dial 2255File}), or with a HDB @file{Dialers} file. 2256 2257Use of HDB configuration files has two known bugs. A blank line in the 2258middle of an entry in the @file{Permissions} file will not be ignored as 2259it should be. Dialer programs, as found in some versions of HDB, are 2260not recognized directly. If you must use a dialer program, rather than 2261an entry in @file{Devices}, you must use the @code{chat-program} command 2262in a new style dial file; see @ref{dial File}. You will have to invoke 2263the dialer program via a shell script or another program, since an exit 2264code of 0 is required to recognize success; the @code{dialHDB} program 2265in the @file{contrib} directory may be used for this purpose. 2266 2267The @command{uuconv} (@pxref{Invoking uuconv}) program can be used to 2268convert from V2 or HDB configuration files to the new style (it can also 2269do the reverse translation, if you are so inclined). It will not do all 2270of the work, and the results should be carefully checked, but it can be 2271quite useful. 2272 2273If you are installing a new system, you will, of course, have to write 2274the configuration files; see @ref{Configuration Files} for details on 2275how to do this. 2276 2277After writing the configuration files, use the @command{uuchk} program 2278to verify that they are what you expect; see @ref{Invoking uuchk}. 2279 2280@node Testing the Installation, , Configuration, Installing Taylor UUCP 2281@section Testing the Installation 2282 2283After you have written the configuration files, and verified them with 2284the @command{uuchk} program (@pxref{Invoking uuchk}), you must check that 2285UUCP can correctly contact another system. 2286 2287Tell @command{uucico} to dial out to the system by using the @option{-s} 2288system switch (e.g., @samp{uucico -s uunet}). The log file should tell 2289you what happens. The exact location of the log file depends upon the 2290settings in @file{policy.h} when you compiled the program, and on the 2291use of the @code{logfile} command in the @file{config} file. Typical 2292locations are @file{/usr/spool/uucp/Log} or a subdirectory under 2293@file{/usr/spool/uucp/.Log}. 2294 2295If you compiled the code with debugging enabled, you can use debugging 2296mode to get a great deal of information about what sort of data is 2297flowing back and forth; the various possibilities are described with the 2298@code{debug} command (@pxref{Debugging Levels}). When initially setting 2299up a connection @samp{-x chat} is probably the most useful (e.g., 2300@samp{uucico -s uunet -x chat}); you may also want to use @samp{-x 2301handshake,incoming,outgoing}. You can use @option{-x} multiple times on 2302one command line, or you can give it comma separated arguments as in the 2303last example. Use @samp{-x all} to turn on all possible debugging 2304information. 2305 2306The debugging information is written to a file, normally 2307@file{/usr/spool/uucp/Debug}, although the default can be changed in 2308@file{policy.h}, and the @file{config} file can override the default 2309with the @code{debugfile} command. The debugging file may contain 2310passwords and some file contents as they are transmitted over the line, 2311so the debugging file is only readable by the @code{uucp} user. 2312 2313You can use the @option{-f} switch to force @command{uucico} to call out 2314even if the last call failed recently; using @option{-S} when naming a 2315system has the same effect. Otherwise the status file (in the 2316@file{.Status} subdirectory of the main spool directory, normally 2317@file{/usr/spool/uucp}) (@pxref{Status Directory}) will prevent too many 2318attempts from occurring in rapid succession. 2319 2320On older System V based systems which do not have the @code{setreuid} 2321system call, problems may arise if ordinary users can start an execution 2322of @command{uuxqt}, perhaps indirectly via @command{uucp} or 2323@command{uux}. UUCP jobs may wind up executing with a real user ID of 2324the user who invoked @command{uuxqt}, which can cause problems if the 2325UUCP job checks the real user ID for security purposes. On such 2326systems, it is safest to put @samp{run-uuxqt never} 2327(@pxref{Miscellaneous (config)}) in the @file{config} file, so that 2328@command{uucico} never starts @command{uuxqt}, and invoke 2329@command{uuxqt} directly from a @file{crontab} file. 2330 2331Please let me know about any problems you have and how you got around 2332them. If you do report a problem, please include the version number of 2333the package you are using, the operating system you are running it on, 2334and a sample of the debugging file showing the problem (debugging 2335information is usually what is needed, not just the log file). General 2336questions such as ``why doesn't @command{uucico} dial out'' are 2337impossible to answer without much more information. 2338 2339@node Using Taylor UUCP, Configuration Files, Installing Taylor UUCP, Top 2340@chapter Using Taylor UUCP 2341 2342@menu 2343* Calling Other Systems:: Calling Other Systems 2344* Accepting Calls:: Accepting Calls 2345* Mail and News:: Using UUCP for Mail and News 2346* The Spool Directory Layout:: The Spool Directory Layout 2347* Spool Directory Cleaning:: Cleaning the UUCP Spool Directory 2348@end menu 2349 2350@node Calling Other Systems, Accepting Calls, Using Taylor UUCP, Using Taylor UUCP 2351@section Calling Other Systems 2352@cindex calling out 2353 2354By default @command{uucp} and @command{uux} will automatically start up 2355@command{uucico} to call another system whenever work is queued up. 2356However, the call may fail, or you may have put in time restrictions 2357which prevent the call at that time (perhaps because telephone rates are 2358high) (@pxref{When to Call}). Also, a remote system may have work 2359queued up for your system, but may not be calling you for some reason 2360(perhaps you have agreed that your system should always place the call). 2361To make sure that work gets transferred between the systems withing a 2362reasonable time period, you should arrange to periodically invoke 2363@command{uucico}. 2364 2365These periodic invocations are normally triggered by entries in the 2366@file{crontab} file. The exact format of @file{crontab} files, and how 2367new entries are added, varies from system to system; check your local 2368documentation (try @samp{man cron}). 2369 2370To attempt to call all systems with outstanding work, use the command 2371@samp{uucico -r1}. To attempt to call a particular system, use the 2372command @samp{uucico -s @var{system}}. To attempt to call a particular 2373system, but only if there is work for it, use the command @samp{uucico 2374-C -s @var{system}}. (@pxref{Invoking uucico}). 2375 2376A common case is to want to try to call a system at a certain time, with 2377periodic retries if the call fails. A simple way to do this is to 2378create an empty UUCP command file, known as a @dfn{poll file}. If a 2379poll file exists for a system, then @samp{uucico -r1} will place a call 2380to it. If the call succeeds, the poll file will be deleted. 2381 2382A poll file can be easily created using the @samp{uux} command, by 2383requesting the execution of an empty command. To create a poll file for 2384@var{system}, just do something like this: 2385@example 2386uux -r @var{system}! 2387@end example 2388The @option{-r} tells @samp{uux} to not start up @samp{uucico} 2389immediately. Of course, if you do want @samp{uucico} to start up right 2390away, omit the @option{-r}; if the call fails, the poll file will be left 2391around to cause a later call. 2392 2393For example, I use the following crontab entries locally: 2394 2395@example 239645 * * * * /bin/echo /usr/lib/uucp/uucico -r1 | /bin/su uucpa 239740 4,10,15 * * * /usr/bin/uux -r uunet! 2398@end example 2399 2400Every hour, at 45 minutes past, this will check if there is any work to 2401be done, and, if there is, will call the appropriate system. Also, at 24024:40am, 10:40am, and 3:40pm, this will create a poll file file for 2403@samp{uunet}, forcing the next run of @command{uucico} to call 2404@samp{uunet}. 2405 2406@node Accepting Calls, Mail and News, Calling Other Systems, Using Taylor UUCP 2407@section Accepting Calls 2408@cindex calling in 2409@cindex accepting calls 2410 2411To accept calls from another system, you must arrange matters such that 2412when that system calls in, it automatically invokes @command{uucico} on 2413your system. 2414 2415The most common arrangement is to create a special user name and 2416password for incoming UUCP calls. This user name typically uses the 2417same user ID as the regular @code{uucp} user (Unix permits several user 2418names to share the same user ID). The shell for this user name should 2419be set to @command{uucico}. 2420 2421Here is a sample @file{/etc/passwd} line to accept calls from a remote 2422system named airs: 2423@example 2424Uairs:@var{password}:4:8:airs UUCP:/usr/spool/uucp:/usr/lib/uucp/uucico 2425@end example 2426The details may vary on your system. You must use reasonable user and 2427group ID's. You must use the correct file name for @command{uucico}. 2428The @var{password} must appear in the UUCP configuration files on the 2429remote system, but will otherwise never be seen or typed by a human. 2430 2431Note that @command{uucico} appears as the login shell, and that it will 2432be run with no arguments. This means that it will start in slave mode 2433and accept an incoming connection. @xref{Invoking uucico}. 2434 2435On some systems, creating an empty file named @file{.hushlogin} in the 2436home directory will skip the printing of various bits of information 2437when the remote @command{uucico} logs in, speeding up the UUCP connection 2438process. 2439 2440For the greatest security, each system which calls in should use a 2441different user name, each with a different password, and the 2442@code{called-login} command should be used in the @file{sys} file to 2443ensure that the correct login name is used. @xref{Accepting a Call}, 2444and see @ref{Security}. 2445 2446If you never need to dial out from your system, but only accept incoming 2447calls, you can arrange for @command{uucico} to handle logins itself, 2448completely controlling the port, by using the @option{--endless} option. 2449@xref{Invoking uucico}. 2450 2451@node Mail and News, The Spool Directory Layout, Accepting Calls, Using Taylor UUCP 2452@section Using UUCP for Mail and News. 2453@cindex mail 2454@cindex news 2455 2456Taylor UUCP does not include a mail package. All Unix systems come with 2457some sort of mail delivery agent, typically @command{sendmail} or 2458@code{MMDF}. Source code is available for some alternative mail 2459delivery agents, such as @code{IDA sendmail} and @command{smail}. 2460 2461Taylor UUCP also does not include a news package. The two major Unix 2462news packages are @code{C-news} and @code{INN}. Both are available in 2463source code form. 2464 2465Configuring and using mail delivery agents is a notoriously complex 2466topic, and I will not be discussing it here. Configuring news systems 2467is usually simpler, but I will not be discussing that either. I will 2468merely describe the interactions between the mail and news systems and 2469UUCP. 2470 2471A mail or news system interacts with UUCP in two ways: sending and 2472receiving. 2473 2474@menu 2475* Sending mail or news:: Sending mail or news via UUCP 2476* Receiving mail or news:: Receiving mail or news via UUCP 2477@end menu 2478 2479@node Sending mail or news, Receiving mail or news, Mail and News, Mail and News 2480@subsection Sending mail or news via UUCP 2481 2482When mail is to be sent from your machine to another machine via UUCP, 2483the mail delivery agent will invoke @command{uux}. It will generally 2484run a command such as @samp{uux - @var{system}!rmail @var{address}}, 2485where @var{system} is the remote system to which the mail is being sent. 2486It may pass other options to @command{uux}, such as @option{-r} or 2487@option{-g} (@pxref{Invoking uux}). 2488 2489The news system also invokes @command{uux} in order to transfer articles 2490to another system. The only difference is that news will use 2491@command{uux} to invoke @command{rnews} on the remote system, rather 2492than @command{rmail}. 2493 2494You should arrange for your mail and news systems to invoke the Taylor 2495UUCP version of @command{uux}. If you only have Taylor UUCP, or if you 2496simply replace any existing version of @command{uux} with the Taylor UUCP 2497version, this will probably happen automatically. However, if you have 2498two UUCP packages installed on your system, you will probably have to 2499modify the mail and news configuration files in some way. 2500 2501Actually, if both the system UUCP and Taylor UUCP are using the same 2502spool directory format, the system @command{uux} will probably work fine 2503with the Taylor @command{uucico} (the reverse is not the case: the 2504Taylor @command{uux} requires the Taylor @command{uucico}). However, 2505data transfer will be somewhat more efficient if the Taylor 2506@command{uux} is used. 2507 2508@node Receiving mail or news, , Sending mail or news, Mail and News 2509@subsection Receiving mail or news via UUCP 2510 2511To receive mail, all that is necessary is for UUCP to invoke 2512@command{rmail}. Any mail delivery agent will provide an appropriate 2513version of @command{rmail}; you must simply make sure that it is in the 2514command path used by UUCP (it almost certainly already is). The default 2515command path is set in @file{policy.h}, and it may be overridden for a 2516particular system by the @code{command-path} command 2517(@pxref{Miscellaneous (sys)}). 2518 2519Similarly, for news UUCP must be able to invoke @command{rnews}. Any 2520news system will provide a version of @command{rnews}, and you must 2521ensure that is in a directory on the path that UUCP will search. 2522 2523@node The Spool Directory Layout, Spool Directory Cleaning, Mail and News, Using Taylor UUCP 2524@section The Spool Directory Layout 2525@cindex spool directory 2526 2527In general, the layout of the spool directory may be safely ignored. 2528However, it is documented here for the curious. This description only 2529covers the @code{SPOOLDIR_TAYLOR} layout. The ways in which the other 2530spool directory layouts differ are described in the source file 2531@file{unix/spool.c}. 2532 2533Directories and files are only created when they are needed, so a 2534typical system will not have all of the entries described here. 2535 2536@menu 2537* System Spool Directories:: System Spool Directories 2538* Status Directory:: Status Spool Directory 2539* Execution Subdirectories:: Execution Spool Subdirectories 2540* Other Spool Subdirectories:: Other Spool Subdirectories 2541* Spool Lock Files:: Spool Directory Lock Files 2542@end menu 2543 2544@node System Spool Directories, Status Directory, The Spool Directory Layout, The Spool Directory Layout 2545@subsection System Spool Directories 2546@cindex system spool directories 2547 2548@table @file 2549@item @var{system} 2550There is a subdirectory of the main spool directory for each remote 2551system. 2552 2553@item @var{system}/C. 2554This directory stores files describing file transfer commands to be sent 2555to the @var{system}. Each file name starts with @file{C.@var{g}}, where 2556@var{g} is the job grade. Each file contains one or more commands. For 2557details of the commands, see @ref{UUCP Protocol Commands}. 2558 2559@item @var{system}/D. 2560This directory stores data files. Files with names like 2561@file{D.@var{g}@var{ssss}}, where @var{g} is the grade and @var{ssss} is 2562a sequence number, are waiting to be transferred to the @var{system}, as 2563directed by the files in the @file{@var{system}/C.} directory. Files 2564with other names, typically @file{D.@var{system}@var{g}@var{ssss}}, have 2565been received from @var{system} and are waiting to be processed by an 2566execution file in the @file{@var{system}/X.} directory. 2567 2568@item @var{system}/D.X 2569This directory stores data files which will become execution files on 2570the remote system. In current practice, this directory rarely exists, 2571because most simple executions, including typical uses of 2572@command{rmail} and @command{rnews}, send an @samp{E} command rather 2573than an execution file (@pxref{The E Command}). 2574 2575@item @var{system}/X. 2576This directory stores execution files which have been received from 2577@var{system}. This directory normally exists, even though the 2578corresponding @file{D.X} directory does not, because @command{uucico} 2579will create an execution file on the fly when it receives an @samp{E} 2580command. 2581 2582@item @var{system}/SEQF 2583This file holds the sequence number of the last job sent to 2584@var{system}. The sequence number is used to ensure that file names are 2585unique in the remote system spool directory. The file is four bytes 2586long. Sequence numbers are composed of digits and the upper case 2587letters. 2588@end table 2589 2590@node Status Directory, Execution Subdirectories, System Spool Directories, The Spool Directory Layout 2591@subsection Status Directory 2592 2593@table @file 2594@item .Status 2595@cindex .Status 2596@cindex status files 2597This directory holds status files for each remote system. The name of 2598the status file is the name of the system which it describes. Each 2599status file describes the last conversation with the system. Running 2600@samp{uustat --status} basically just formats and prints the contents of 2601the status files (@pxref{uustat Examples}). 2602 2603Each status file has a single text line with six fields. 2604 2605@table @asis 2606@item code 2607A code indicating the status of the last conversation. The following 2608values are defined, though not all are actually used. 2609@table @samp 2610@item 0 2611Conversation completed normally. 2612@item 1 2613@command{uucico} was unable to open the port. 2614@item 2 2615The last call to the system failed while dailing. 2616@item 3 2617The last call to the system failed while logging in. 2618@item 4 2619The last call to the system failed during the initial UUCP protocol 2620handshake (@pxref{The Initial Handshake}). 2621@item 5 2622The last call to the system failed after the initial handshake. 2623@item 6 2624@command{uucico} is currently talking to the system. 2625@item 7 2626The last call to the system failed because it was the wrong time to call 2627(this is not used if calling the system is never permitted). 2628@end table 2629 2630@item retries 2631The number of retries since the last successful call. 2632 2633@item time of last call 2634The time of the last call, in seconds since the epoch (as returned by 2635the @code{time} system call). 2636 2637@item wait 2638If the last call failed, this is the number of seconds since the last 2639call before @command{uucico} may attempt another call. This is set 2640based on the retry time; see @ref{When to Call}. The @option{-f} or 2641@option{-S} options to @command{uucico} direct it to ignore this wait time; 2642see @ref{Invoking uucico}. 2643 2644@item description 2645A text description of the status, corresponding to the code in the first 2646field. This may contain spaces. 2647 2648@item system name 2649The name of the remote system. 2650@end table 2651@end table 2652 2653@node Execution Subdirectories, Other Spool Subdirectories, Status Directory, The Spool Directory Layout 2654@subsection Execution Subdirectories 2655 2656@table @file 2657@item .Xqtdir 2658@cindex .Xqtdir 2659When @command{uuxqt} executes a job requested by @command{uux}, it first 2660changes the working directory to the @file{.Xqtdir} subdirectory. This 2661permits the job to create any sort of temporary file without worrying 2662about overwriting other files in the spool directory. Any files left 2663in the @file{.Xqtdir} subdirectory are removed after each execution is 2664complete. 2665 2666@item .Xqtdir@var{nnnn} 2667When several instances of @command{uuxqt} are executing simultaneously, 2668each one executes jobs in a separate directory. The first uses 2669@file{.Xqtdir}, the second uses @file{.Xqtdir0001}, the third uses 2670@file{.Xqtdir0002}, and so forth. 2671 2672@item .Corrupt 2673@cindex .Corrupt 2674If @command{uuxqt} encounters an execution file which it is unable to 2675parse, it saves it in the @file{.Corrupt} directory, and sends mail 2676about it to the UUCP administrator. 2677 2678@item .Failed 2679@cindex .Failed 2680If @command{uuxqt} executes a job, and the job fails, and there is enough 2681disk space to hold the command file and all the data files, then 2682@command{uuxqt} saves the files in the @file{.Failed} directory, and sends 2683mail about it to the UUCP administrator. 2684@end table 2685 2686@node Other Spool Subdirectories, Spool Lock Files, Execution Subdirectories, The Spool Directory Layout 2687@subsection Other Spool Subdirectories 2688 2689@table @file 2690@item .Sequence 2691@cindex .Sequence 2692This directory holds conversation sequence number files. These are used 2693if the @code{sequence} command is used for a system 2694(@pxref{Miscellaneous (sys)}). The sequence number for the system 2695@var{system} is stored in the file @file{.Sequence/@var{system}}. It is 2696simply stored as a printable number. 2697 2698@item .Temp 2699@cindex .Temp 2700This directory holds data files as they are being received from a remote 2701system, before they are moved to their final destination. For file send 2702requests which use a valid temporary file name in the @var{temp} field 2703of the @samp{S} or @samp{E} command (@pxref{The S Command}), 2704@command{uucico} receives the file into 2705@file{.Temp/@var{system}/@var{temp}}, where @var{system} is the name of 2706the remote system, and @var{temp} is the temporary file name. If a 2707conversation fails during a file transfer, these files are used to 2708automatically restart the file transfer from the point of failure. 2709 2710If the @samp{S} or @samp{E} command does not include a temporary file 2711name, automatic restart is not possible. In this case, the files are 2712received into a randomly named file in the @file{.Temp} directory 2713itself. 2714 2715@item .Preserve 2716@cindex .Preserve 2717This directory holds data files which could not be transferred to a 2718remote system for some reason (for example, the data file might be 2719large, and exceed size restrictions imposed by the remote system). When 2720a locally requested file transfer fails, @command{uucico} will store the 2721data file in the @file{.Preserve} directory, and send mail to the 2722requestor describing the failure and naming the saved file. 2723 2724@item .Received 2725@cindex .Received 2726This directory records which files have been received. If a 2727conversation fails just after @command{uucico} acknowledges receipt of a 2728file, it is possible for the acknowledgement to be lost. If this 2729happens, the remote system will resend the file. If the file were an 2730execution request, and @command{uucico} did not keep track of which 2731files it had already received, this could lead to the execution being 2732performed twice. 2733 2734To avoid this problem, when a conversation fails, @command{uucico} 2735records each file that has been received, but for which the remote 2736system may not have received the acknowledgement. It records this 2737information by creating an empty file with the name 2738@file{.Received/@var{system}/@var{temp}}, where @var{system} is the name 2739of the remote system, and @var{temp} is the @var{temp} field of the 2740@samp{S} or @samp{E} command from the remote system (@pxref{The S 2741Command}). Then, if the remote system offers the file again in the next 2742conversation, @command{uucico} refuses the send request and deletes the 2743record in the @file{.Received} directory. This approach only works for 2744file sends which use a temporary file name, but this is true of all 2745execution requests. 2746@end table 2747 2748@node Spool Lock Files, , Other Spool Subdirectories, The Spool Directory Layout 2749@subsection Lock Files in the Spool Directory 2750@cindex lock files in spool directory 2751 2752Lock files for devices and systems are stored in the lock directory, 2753which may or may not be the same as the spool directory. The lock 2754directory is set at compilation time by @code{LOCKDIR} in 2755@file{policy.h}, which may be overridden by the @code{lockdir} command 2756in the @file{config} file (@pxref{Miscellaneous (config)}). 2757 2758For a description of the names used for device lock files, and the 2759format of the contents of a lock file, see @ref{UUCP Lock Files}. 2760 2761@table @file 2762@item LCK..@var{sys} 2763@cindex LCK..@var{sys} 2764@cindex system lock files 2765A lock file for a system, where @var{sys} is the system name. As noted 2766above, these lock files are kept in the lock directory, which may not be 2767the spool directory. These lock files are created by @command{uucico} 2768while talking to a remote system, and are used to prevent multiple 2769simultaneous conversations with a system. 2770 2771On systems which limit file names to 14 characters, only the first eight 2772characters of the system name are used in the lock file name. This 2773requires that the names of each directly connected remote system be 2774unique in the first eight characters. 2775 2776@item LCK.XQT.@var{NN} 2777@cindex LCK.XQT.@var{NN} 2778When @command{uuxqt} starts up, it uses lock files to determine how many 2779other @command{uuxqt} daemons are currently running. It first tries to 2780lock @file{LCK.XQT.0}, then @file{LCK.XQT.1}, and so forth. This is 2781used to implement the @code{max-uuxqts} command (@pxref{Miscellaneous 2782(config)}). It is also used to parcel out the @file{.Xqtdir} 2783subdirectories (@pxref{Execution Subdirectories}). 2784 2785@item LXQ.@var{cmd} 2786@cindex LXQ.@var{cmd} 2787When @command{uuxqt} is invoked with the @option{-c} or @option{--command} 2788option (@pxref{Invoking uuxqt}), it creates a lock file named after the 2789command it is executing. For example, @samp{uuxqt -c rmail} will create 2790the lock file @file{LXQ.rmail}. This prevents other @command{uuxqt} 2791daemons from executing jobs of the specified type. 2792 2793@item @var{system}/X./L.@var{xxx} 2794@cindex L.@var{xxx} 2795While @command{uuxqt} is executing a particular job, it creates a lock file 2796with the same name as the @file{X.} file describing the job, but 2797replacing the initial @samp{X} with @samp{L}. This ensures that if 2798multiple @command{uuxqt} daemons are running, they do not simultaneously 2799execute the same job. 2800 2801@item LCK..SEQ 2802This lock file is used to control access to the sequence files for each 2803system (@pxref{System Spool Directories}). It is only used on systems 2804which do not support POSIX file locking using the @code{fcntl} system 2805call. 2806@end table 2807 2808@node Spool Directory Cleaning, , The Spool Directory Layout, Using Taylor UUCP 2809@section Cleaning the Spool Directory 2810@cindex spool directory, cleaning 2811@cindex cleaning the spool directory 2812 2813The spool directory may need to be cleaned up periodically. Under some 2814circumstances, files may accumulate in various subdirectories, such as 2815@file{.Preserve} (@pxref{Other Spool Subdirectories}) or @file{.Corrupt} 2816(@pxref{Execution Subdirectories}). 2817 2818Also, if a remote system stops calling in, you may want to arrange for 2819any queued up mail to be returned to the sender. This can be done using 2820the @command{uustat} command (@pxref{Invoking uustat}). 2821 2822The @file{contrib} directory includes a simple @file{uuclean} script 2823which may be used as an example of a clean up script. It can be run 2824daily out of @file{crontab}. 2825 2826You should periodically trim the UUCP log files, as they will otherwise 2827grow without limit. The names of the log files are set in 2828@file{policy.h}, and may be overridden in the configuration file 2829(@pxref{config File}). By default they are are 2830@file{/usr/spool/uucp/Log} and @file{/usr/spool/uucp/Stats}. You may 2831find the @code{savelog} program in the @file{contrib} directory to be of 2832use. There is a manual page for it in @file{contrib} as well. 2833 2834@node Configuration Files, Protocols, Using Taylor UUCP, Top 2835@chapter Taylor UUCP Configuration Files 2836 2837This chapter describes the configuration files accepted by the Taylor 2838UUCP package if compiled with @code{HAVE_TAYLOR_CONFIG} set to 1 in 2839@file{policy.h}. 2840 2841The configuration files are normally found in the directory 2842@var{newconfigdir}, which is defined by the @code{configure} option 2843@option{--with-newconfigdir}; by default @var{newconfigdir} is 2844@file{/usr/local/conf/uucp}. However, the main configuration file, 2845@file{config}, is the only one which must be in that directory, since it 2846may specify a different location for any or all of the other files. You 2847may run any of the UUCP programs with a different main configuration 2848file by using the @option{-I} or @option{--config} option; this can be 2849useful when testing a new configuration. When you use the @option{-I} 2850option the programs will revoke any setuid privileges. 2851 2852@menu 2853* Configuration Overview:: Configuration File Overview 2854* Configuration File Format:: Configuration File Format 2855* Configuration Examples:: Examples of Configuration Files 2856* Time Strings:: How to Write Time Strings 2857* Chat Scripts:: How to Write Chat Scripts 2858* config File:: The Main Configuration File 2859* sys File:: The System Configuration File 2860* port File:: The Port Configuration Files 2861* dial File:: The Dialer Configuration Files 2862* UUCP Over TCP:: UUCP Over TCP 2863* Security:: Security Issues 2864@end menu 2865 2866@node Configuration Overview, Configuration File Format, Configuration Files, Configuration Files 2867@section Configuration File Overview 2868 2869UUCP uses several different types of configuration files, each 2870describing a different kind of information. The commands permitted in 2871each file are described in detail below. This section is a brief 2872description of some of the different types of files. 2873 2874The @file{config} file is the main configuration file. It describes 2875general information not associated with a particular remote system, such 2876as the location of various log files. There are reasonable defaults for 2877everything that may be specified in the @file{config} file, so you may 2878not actually need one on your system. 2879 2880There may be only one @file{config} file, but there may be one or more 2881of each other type of file. The default is one file for each type, but 2882more may be listed in the @file{config} file. 2883 2884The @file{sys} files are used to describe remote systems. Each remote 2885system to which you connect must be listed in a @file{sys} file. A 2886@file{sys} file will include information for a system, such as the speed 2887(baud rate) to use, or when to place calls. 2888 2889For each system you wish to call, you must describe one or more ports; 2890these ports may be defined directly in the @file{sys} file, or they may 2891be defined in a @file{port} file. 2892 2893The @file{port} files are used to describe ports. A port is a 2894particular hardware connection on your computer. You would normally 2895define as many ports as there are modems attached to your computer. A 2896TCP connection is also described using a port. 2897 2898The @file{dial} files are used to describe dialers. Dialer is 2899essentially another word for modem. The @file{dial} file describes the 2900commands UUCP should use to dial out on a particular type of modem. You 2901would normally define as many dialers as there are types of modems 2902attached to your computer. For example, if you have three Telebit 2903modems used for UUCP, you would probably define three ports and one 2904dialer. 2905 2906There are other types of configuration files, but these are the 2907important ones. The other types are described below. 2908 2909@node Configuration File Format, Configuration Examples, Configuration Overview, Configuration Files 2910@section Configuration File Format 2911 2912All the configuration files follow a simple line-oriented 2913@samp{@var{keyword} @var{value}} format. Empty lines are ignored, as 2914are leading spaces; unlike HDB, lines with leading spaces are read. The 2915first word on each line is a keyword. The rest of the line is 2916interpreted according to the keyword. Most keywords are followed by 2917numbers, boolean values or simple strings with no embedded spaces. 2918 2919The @kbd{#} character is used for comments. Everything from a @kbd{#} 2920to the end of the line is ignored unless the @kbd{#} is preceded by a 2921@kbd{\} (backslash); if the @kbd{#} is preceeded by a @kbd{\}, the 2922@kbd{\} is removed but the @kbd{#} remains in the line. This can be 2923useful for a phone number containing a @kbd{#}. To enter the sequence 2924@samp{\#}, use @samp{\\#}. 2925 2926The backslash character may be used to continue lines. If the last 2927character in a line is a backslash, the backslash is removed and the 2928line is continued by the next line. The second line is attached to the 2929first with no intervening characters; if you want any whitespace between 2930the end of the first line and the start of the second line, you must 2931insert it yourself. 2932 2933However, the backslash is not a general quoting character. For example, 2934you cannot use it to get an embedded space in a string argument. 2935 2936Everything after the keyword must be on the same line. A @var{boolean} 2937may be specified as @kbd{y}, @kbd{Y}, @kbd{t}, or @kbd{T} for true and 2938@kbd{n}, @kbd{N}, @kbd{f}, or @kbd{F} for false; any trailing characters 2939are ignored, so @code{true}, @code{false}, etc., are also acceptable. 2940 2941@node Configuration Examples, Time Strings, Configuration File Format, Configuration Files 2942@section Examples of Configuration Files 2943 2944This section provides few typical examples of configuration files. 2945There are also sample configuration files in the @file{sample} 2946subdirectory of the distribution. 2947 2948@menu 2949* config File Examples:: Examples of the Main Configuration File 2950* Leaf Example:: Call a Single Remote Site 2951* Gateway Example:: The Gateway for Several Local Systems 2952@end menu 2953 2954@node config File Examples, Leaf Example, Configuration Examples, Configuration Examples 2955@subsection config File Examples 2956@cindex config file examples 2957 2958To start with, here are some examples of uses of the main configuration 2959file, @file{config}. For a complete description of the commands that 2960are permitted in @file{config}, see @ref{config File}. 2961 2962In many cases you will not need to create a @file{config} file at all. 2963The most common reason to create one is to give your machine a special 2964UUCP name. Other reasons might be to change the UUCP spool directory, 2965or to permit any remote system to call in. 2966 2967If you have an internal network of machines, then it is likely that the 2968internal name of your UUCP machine is not the name you want to use when 2969calling other systems. For example, here at @file{airs.com} our 2970mail/news gateway machine is named @file{elmer.airs.com} (it is one of 2971several machines all named @file{@var{localname}.airs.com}). If we did 2972not provide a @file{config} file, then our UUCP name would be 2973@file{elmer}; however, we actually want it to be @file{airs}. 2974Therefore, we use the following line in @file{config}: 2975 2976@example 2977nodename airs 2978@end example 2979 2980@cindex changing spool directory 2981@cindex spool directory, changing 2982The UUCP spool directory name is set in @file{policy.h} when the code is 2983compiled. You might at some point decide that it is appropriate to move 2984the spool directory, perhaps to put it on a different disk partition. 2985You would use the following commands in @file{config} to change to 2986directories on the partition @file{/uucp}: 2987 2988@example 2989spool /uucp/spool 2990pubdir /uucp/uucppublic 2991logfile /uucp/spool/Log 2992debugfile /uucp/spool/Debug 2993@end example 2994 2995You would then move the contents of the current spool directory to 2996@file{/uucp/spool}. If you do this, make sure that no UUCP processes 2997are running while you change @file{config} and move the spool directory. 2998 2999@cindex anonymous UUCP 3000Suppose you wanted to permit any system to call in to your system and 3001request files. This is generally known as @dfn{anonymous UUCP}, since 3002the systems which call in are effectively anonymous. By default, 3003unknown systems are not permitted to call in. To permit this you must 3004use the @code{unknown} command in @file{config}. The @code{unknown} 3005command is followed by any command that may appear in the system file; 3006for full details, see @ref{sys File}. 3007 3008I will show two possible anonymous UUCP configurations. The first will 3009let any system call in and download files, but will not permit them to 3010upload files to your system. 3011 3012@example 3013# No files may be transferred to this system 3014unknown receive-request no 3015# The public directory is /usr/spool/anonymous 3016unknown pubdir /usr/spool/anonymous 3017# Only files in the public directory may be sent (the default anyhow) 3018unknown remote-send ~ 3019@end example 3020 3021@noindent 3022Setting the public directory is convenient for the systems which call 3023in. It permits to request a file by prefixing it with @file{~/}. For 3024example, assuming your system is known as @samp{server}, then to 3025retrieve the file @file{/usr/spool/anonymous/INDEX} a user on a remote 3026site could just enter @samp{uucp server!~/INDEX ~}; this would transfer 3027@file{INDEX} from @samp{server}'s public directory to the user's local 3028public directory. Note that when using @samp{csh} or @samp{bash} the 3029@kbd{!} and the second @kbd{~} must be quoted. 3030 3031The next example will permit remote systems to upload files to a special 3032directory named @file{/usr/spool/anonymous/upload}. Permitting a remote 3033system to upload files permits it to send work requests as well; this 3034example is careful to prohibit commands from unknown systems. 3035 3036@example 3037# No commands may be executed (the list of permitted commands is empty) 3038unknown commands 3039# The public directory is /usr/spool/anonymous 3040unknown pubdir /usr/spool/anonymous 3041# Only files in the public directory may be sent; users may not download 3042# files from the upload directory 3043unknown remote-send ~ !~/upload 3044# May only upload files into /usr/spool/anonymous/upload 3045unknown remote-receive ~/upload 3046@end example 3047 3048@node Leaf Example, Gateway Example, config File Examples, Configuration Examples 3049@subsection Leaf Example 3050 3051@cindex leaf site 3052@cindex sys file example (leaf) 3053A relatively common simple case is a @dfn{leaf site}, a system which 3054only calls or is called by a single remote site. Here is a typical 3055@file{sys} file that might be used in such a case. For full details on 3056what commands can appear in the @file{sys} file, see @ref{sys File}. 3057 3058This is the @file{sys} file that is used at @file{airs.com}. We use a 3059single modem to dial out to @file{uunet}. This example shows how you 3060can specify the port and dialer information directly in the @file{sys} 3061file for simple cases. It also shows the use of the following: 3062 3063@table @code 3064 3065@item call-login 3066Using @code{call-login} and @code{call-password} allows the default 3067login chat script to be used. In this case, the login name is specified 3068in the call-out login file (@pxref{Configuration File Names}). 3069 3070@item call-timegrade 3071@file{uunet} is requested to not send us news during the daytime. 3072 3073@item chat-fail 3074If the modem returns @samp{BUSY} or @samp{NO CARRIER} the call is 3075immediately aborted. 3076 3077@item protocol-parameter 3078Since @file{uunet} tends to be slow, the default timeout has been 3079increased. 3080 3081@end table 3082 3083This @file{sys} file relies on certain defaults. It will allow 3084@file{uunet} to queue up @samp{rmail} and @samp{rnews} commands. It 3085will allow users to request files from @file{uunet} into the UUCP public 3086directory. It will also allow @file{uunet} to request files from the 3087UUCP public directory; in fact @file{uunet} never requests files, but 3088for additional security we could add the line @samp{request false}. 3089 3090@example 3091# The following information is for uunet 3092system uunet 3093 3094# The login name and password are kept in the callout password file 3095call-login * 3096call-password * 3097 3098# We can send anything at any time. 3099time any 3100 3101# During the day we only accept grade `Z' or above; at other times 3102# (not mentioned here) we accept all grades. uunet queues up news 3103# at grade `d', which is lower than `Z'. 3104call-timegrade Z Wk0755-2305,Su1655-2305 3105 3106# The phone number. 3107phone 7389449 3108 3109# uunet tends to be slow, so we increase the timeout 3110chat-timeout 120 3111 3112# We are using a preconfigured Telebit 2500. 3113port type modem 3114port device /dev/ttyd0 3115port speed 19200 3116port carrier true 3117port dialer chat "" ATZ\r\d\c OK ATDT\D CONNECT 3118port dialer chat-fail BUSY 3119port dialer chat-fail NO\sCARRIER 3120port dialer complete \d\d+++\d\dATH\r\c 3121port dialer abort \d\d+++\d\dATH\r\c 3122 3123# Increase the timeout and the number of retries. 3124protocol-parameter g timeout 20 3125protocol-parameter g retries 10 3126@end example 3127 3128@node Gateway Example, , Leaf Example, Configuration Examples 3129@subsection Gateway Example 3130 3131@cindex gateway 3132@cindex sys file example (gateway) 3133Many organizations have several local machines which are connected by 3134UUCP, and a single machine which connects to the outside world. This 3135single machine is often referred to as a @dfn{gateway} machine. 3136 3137For this example I will assume a fairly simple case. It should still 3138provide a good general example. There are three machines, @file{elmer}, 3139@file{comton} and @file{bugs}. @file{elmer} is the gateway machine for 3140which I will show the configuration file. @file{elmer} calls out to 3141@file{uupsi}. As an additional complication, @file{uupsi} knows 3142@file{elmer} as @file{airs}; this will show how a machine can have one 3143name on an internal network but a different name to the external world. 3144@file{elmer} has two modems. It also has an TCP connection to 3145@file{uupsi}, but since that is supposed to be reserved for interactive 3146work (it is, perhaps, only a 9600 baud SLIP line) it will only use it if 3147the modems are not available. 3148 3149A network this small would normally use a single @file{sys} file. 3150However, for pedagogical purposes I will show two separate @file{sys} 3151files, one for the local systems and one for @file{uupsi}. This is done 3152with the @code{sysfile} command in the @file{config} file. Here is the 3153@file{config} file. 3154 3155@example 3156# This is config 3157# The local sys file 3158sysfile /usr/local/lib/uucp/sys.local 3159# The remote sys file 3160sysfile /usr/local/lib/uucp/sys.remote 3161@end example 3162 3163Using the defaults feature of the @file{sys} file can greatly simplify 3164the listing of local systems. Here is @file{sys.local}. Note that this 3165assumes that the local systems are trusted; they are permited to request 3166any world readable file and to write files into any world writable 3167directory. 3168 3169@example 3170# This is sys.local 3171# Get the login name and password to use from the call-out file 3172call-login * 3173call-password * 3174 3175# The systems must use a particular login 3176called-login Ulocal 3177 3178# Permit sending any world readable file 3179local-send / 3180remote-send / 3181 3182# Permit receiving into any world writable directory 3183local-receive / 3184remote-receive / 3185 3186# Call at any time 3187time any 3188 3189# Use port1, then port2 3190port port1 3191 3192alternate 3193 3194port port2 3195 3196# Now define the systems themselves. Because of all the defaults we 3197# used, there is very little to specify for the systems themselves. 3198 3199system comton 3200phone 5551212 3201 3202system bugs 3203phone 5552424 3204@end example 3205 3206The @file{sys.remote} file describes the @file{uupsi} connection. The 3207@code{myname} command is used to change the UUCP name to @file{airs} 3208when talking to @file{uupsi}. 3209 3210@example 3211# This is sys.remote 3212# Define uupsi 3213system uupsi 3214 3215# The login name and password are in the call-out file 3216call-login * 3217call-password * 3218 3219# We can call out at any time 3220time any 3221 3222# uupsi uses a special login name 3223called-login Uuupsi 3224 3225# uuspi thinks of us as `airs' 3226myname airs 3227 3228# The phone number 3229phone 5554848 3230 3231# We use port2 first, then port1, then TCP 3232 3233port port2 3234 3235alternate 3236 3237port port1 3238 3239alternate 3240 3241# We don't bother to make a special entry in the port file for TCP, we 3242# just describe the entire port right here. We use a special chat 3243# script over TCP because the usual one confuses some TCP servers. 3244port type TCP 3245address uu.psi.com 3246chat ogin: \L word: \P 3247@end example 3248 3249The ports are defined in the file @file{port} (@pxref{port File}). For 3250this example they are both connected to the same type of 2400 baud 3251Hayes-compatible modem. 3252 3253@example 3254# This is port 3255 3256port port1 3257type modem 3258device /dev/ttyd0 3259dialer hayes 3260speed 2400 3261 3262port port2 3263type modem 3264device /dev/ttyd1 3265dialer hayes 3266speed 2400 3267@end example 3268 3269Dialers are described in the @file{dial} file (@pxref{dial File}). 3270 3271@example 3272# This is dial 3273 3274dialer hayes 3275 3276# The chat script used to dial the phone. \D is the phone number. 3277chat "" ATZ\r\d\c OK ATDT\D CONNECT 3278 3279# If we get BUSY or NO CARRIER we abort the dial immediately 3280chat-fail BUSY 3281chat-fail NO\sCARRIER 3282 3283# When the call is over we make sure we hangup the modem. 3284complete \d\d+++\d\dATH\r\c 3285abort \d\d+++\d\dATH\r\c 3286@end example 3287 3288@node Time Strings, Chat Scripts, Configuration Examples, Configuration Files 3289@section Time Strings 3290@cindex time strings 3291 3292Several commands use time strings to specify a range of times. This 3293section describes how to write time strings. 3294 3295A time string may be a list of simple time strings separated with a 3296vertical bar @samp{|} or a comma @samp{,}. 3297 3298Each simple time string must begin with @samp{Su}, @samp{Mo}, @samp{Tu}, 3299@samp{We}, @samp{Th}, @samp{Fr}, or @samp{Sa}, or @samp{Wk} for any 3300weekday, or @samp{Any} for any day. 3301 3302Following the day may be a range of hours separated with a hyphen using 330324 hour time. The range of hours may cross 0; for example 3304@samp{2300-0700} means any time except 7 AM to 11 PM. If no time is 3305given, calls may be made at any time on the specified day(s). 3306 3307The time string may also be the single word @samp{Never}, which does not 3308match any time. The time string may also be a single word with a name 3309defined in a previous @code{timetable} command (@pxref{Miscellaneous 3310(config)}). 3311 3312Here are a few sample time strings with an explanation of what they 3313mean. 3314 3315@table @samp 3316 3317@item Wk2305-0855,Sa,Su2305-1655 3318 3319This means weekdays before 8:55 AM or after 11:05 PM, any time Saturday, 3320or Sunday before 4:55 PM or after 11:05 PM. These are approximately the 3321times during which night rates apply to phone calls in the U.S.A. Note 3322that this time string uses, for example, @samp{2305} rather than 3323@samp{2300}; this will ensure a cheap rate phone call even if the 3324computer clock is running up to five minutes ahead of the real time. 3325 3326@item Wk0905-2255,Su1705-2255 3327 3328This means weekdays from 9:05 AM to 10:55 PM, or Sunday from 5:05 PM to 332910:55 PM. This is approximately the opposite of the previous example. 3330 3331@item Any 3332 3333This means any day. Since no time is specified, it means any time on 3334any day. 3335 3336@end table 3337 3338@node Chat Scripts, config File, Time Strings, Configuration Files 3339@section Chat Scripts 3340@cindex chat scripts 3341 3342Chat scripts are used in several different places, such as dialing out 3343on modems or logging in to remote systems. Chat scripts are made up of 3344pairs of strings. The program waits until it sees the first string, 3345known as the @dfn{expect} string, and then sends out the second string, 3346the @dfn{send} string. 3347 3348Each chat script is defined using a set of commands. These commands 3349always end in a string beginning with @code{chat}, but may start with 3350different strings. For example, in the @file{sys} file there is one set 3351of commands beginning with @code{chat} and another set beginning with 3352@code{called-chat}. The prefixes are only used to disambiguate 3353different types of chat scripts, and this section ignores the prefixes 3354when describing the commands. 3355 3356@table @code 3357 3358@item chat @var{strings} 3359@findex chat 3360 3361Specify a chat script. The arguments to the @code{chat} command are 3362pairs of strings separated by whitespace. The first string of each pair 3363is an expect string, the second is a send string. The program will wait 3364for the expect string to appear; when it does, the program will send the 3365send string. If the expect string does not appear within a certain 3366number of seconds (as set by the @code{chat-timeout} command), the chat 3367script fails and, typically, the call is aborted. If the final expect 3368string is seen (and the optional final send string has been sent), the 3369chat script is successful. 3370 3371An expect string may contain additional subsend and subexpect strings, 3372separated by hyphens. If the expect string is not seen, the subsend 3373string is sent and the chat script continues by waiting for the 3374subexpect string. This means that a hyphen may not appear in an expect 3375string; on an ASCII system, use @samp{\055} instead. 3376 3377An expect string may simply be @samp{""}, meaning to skip the expect 3378phase. Otherwise, the following escape characters may appear in expect 3379strings: 3380 3381@table @samp 3382@item \b 3383a backspace character 3384@item \n 3385a newline or line feed character 3386@item \N 3387a null character (for HDB compatibility) 3388@item \r 3389a carriage return character 3390@item \s 3391a space character 3392@item \t 3393a tab character 3394@item \\ 3395a backslash character 3396@item \@var{ddd} 3397character @var{ddd}, where @var{ddd} are up to three octal digits 3398@item \x@var{ddd} 3399character @var{ddd}, where @var{ddd} are hexadecimal digits. 3400@end table 3401 3402As in C, there may be up to three octal digits following a backslash, 3403but the hexadecimal escape sequence continues as far as possible. To 3404follow a hexadecimal escape sequence with a hex digit, interpose a send 3405string of @samp{""}. 3406 3407A chat script expect string may also specify a timeout. This is done by 3408using the escape sequence @samp{\W@var{seconds}}. This escape sequence 3409may only appear at the very end of the expect string. It temporarily 3410overrides the timeout set by @code{chat-timeout} (described below) only 3411for the expect string to which it is attached. 3412 3413A send string may simply be @samp{""} to skip the send phase. 3414Otherwise, all of the escape characters legal for expect strings may be 3415used, and the following escape characters are also permitted: 3416 3417@table @samp 3418@item EOT 3419send an end of transmission character (@kbd{^D}) 3420@item BREAK 3421send a break character (may not work on all systems) 3422@item \c 3423suppress trailing carriage return at end of send string 3424@item \d 3425delay sending for 1 or 2 seconds 3426@item \e 3427disable echo checking 3428@item \E 3429enable echo checking 3430@item \K 3431same as @samp{BREAK} 3432@item \p 3433pause sending for a fraction of a second 3434@item \M 3435do not require carrier signal 3436@item \m 3437require carrier signal (fail if not present) 3438@end table 3439 3440Some specific types of chat scripts also define additional escape 3441sequences that may appear in the send string. For example, the login 3442chat script defines @samp{\L} and @samp{\P} to send the login name and 3443password, respectively. 3444 3445A carriage return will be sent at the end of each send string, unless 3446the @kbd{\c} escape sequence appears in the string. Note that some UUCP 3447packages use @kbd{\b} for break, but here it means backspace. 3448 3449Echo checking means that after writing each character the program will 3450wait until the character is echoed. Echo checking must be turned on 3451separately for each send string for which it is desired; it will be 3452turned on for characters following @kbd{\E} and turned off for characters 3453following @kbd{\e}. 3454 3455When used with a port which does not support the carrier signal, as set 3456by the @code{carrier} command in the port file, @kbd{\M} and @kbd{\m} 3457are ignored. Similarly, when used in a dialer chat script with a dialer 3458which does not support the carrier signal, as set by the @code{carrier} 3459command in the dial file, @kbd{\M} and @kbd{\m} are ignored. 3460 3461@item chat-timeout @var{number} 3462@findex chat-timeout 3463 3464The number of seconds to wait for an expect string in the chat script, 3465before timing out and sending the next subsend, or failing the chat 3466script entirely. The default value is 10 for a login chat or 60 for any 3467other type of chat. 3468 3469@item chat-fail @var{string} 3470@findex chat-fail 3471 3472If the @var{string} is seen at any time during a chat script, the chat 3473script is aborted. The string may not contain any whitespace 3474characters: escape sequences must be used for them. Multiple 3475@code{chat-fail} commands may appear in a single chat script. The 3476default is to have none. 3477 3478This permits a chat script to be quickly aborted if an error string is 3479seen. For example, a script used to dial out on a modem might use the 3480command @samp{chat-fail BUSY} to stop the chat script immediately if the 3481string @samp{BUSY} was seen. 3482 3483The @code{chat-fail} strings are considered in the order they are 3484listed, so if one string is a suffix of another the longer one should be 3485listed first. This affects the error message which will be logged. Of 3486course, if one string is contained within another, but is not a suffix, 3487the smaller string will always be found before the larger string could 3488match. 3489 3490@item chat-seven-bit @var{boolean} 3491@findex chat-seven-bit 3492 3493If the argument is true, all incoming characters are stripped to seven 3494bits when being compared to the expect string. Otherwise all eight bits 3495are used in the comparison. The default is true, because some Unix 3496systems generate parity bits during the login prompt which must be 3497ignored while running a chat script. This has no effect on any 3498@code{chat-program}, which must ignore parity by itself if necessary. 3499 3500@item chat-program @var{strings} 3501@findex chat-program 3502 3503Specify a program to run before executing the chat script. This program 3504could run its own version of a chat script, or it could do whatever it 3505wants. If both @code{chat-program} and @code{chat} are specified, the 3506program is executed first followed by the chat script. 3507 3508The first argument to the @code{chat-program} command is the program 3509name to run. The remaining arguments are passed to the program. The 3510following escape sequences are recognized in the arguments: 3511 3512@table @kbd 3513@item \Y 3514port device name 3515@item \S 3516port speed 3517@item \\ 3518backslash 3519@end table 3520 3521Some specific uses of @code{chat-program} define additional escape 3522sequences. 3523 3524Arguments other than escape sequences are passed exactly as they appear 3525in the configuration file, except that sequences of whitespace are 3526compressed to a single space character (this exception may be removed in 3527the future). 3528 3529If the @code{chat-program} command is not used, no program is run. 3530 3531On Unix, the standard input and standard output of the program will be 3532attached to the port in use. Anything the program writes to standard 3533error will be written to the UUCP log file. No other file descriptors 3534will be open. If the program does not exit with a status of 0, it will 3535be assumed to have failed. This means that the dialing programs used by 3536some versions of HDB may not be used directly, but you may be able to 3537run them via the @code{dialHDB} program in the @file{contrib} directory. 3538 3539The program will be run as the @code{uucp} user, and the environment 3540will be that of the process that started @command{uucico}, so care must 3541be taken to maintain security. 3542 3543No search path is used to find the program; a full file name must be 3544given. If the program is an executable shell script, it will be passed 3545to @file{/bin/sh} even on systems which are unable to execute shell 3546scripts. 3547 3548@end table 3549 3550Here is a simple example of a chat script that might be used to reset a 3551Hayes compatible modem. 3552 3553@example 3554chat "" ATZ OK-ATZ-OK 3555@end example 3556 3557The first expect string is @samp{""}, so it is ignored. The chat script 3558then sends @samp{ATZ}. If the modem responds with @samp{OK}, the chat 3559script finishes. If 60 seconds (the default timeout) pass before seeing 3560@samp{OK}, the chat script sends another @samp{ATZ}. If it then sees 3561@samp{OK}, the chat script succeeds. Otherwise, the chat script fails. 3562 3563For a more complex chat script example, see @ref{Logging In}. 3564 3565@node config File, sys File, Chat Scripts, Configuration Files 3566@section The Main Configuration File 3567@cindex config file 3568@cindex main configuration file 3569@cindex configuration file (config) 3570 3571The main configuration file is named @file{config}. 3572 3573Since all the values that may be specified in the main configuration 3574file also have defaults, there need not be a main configuration file at 3575all. 3576 3577Each command in @file{config} may have a program prefix, which is a 3578separate word appearing at the beginning of the line. The currently 3579supported prefixes are @samp{uucp} and @samp{cu}. Any command prefixed 3580by @samp{uucp} will not be read by the @command{cu} program. Any 3581command prefixed by @samp{cu} will only be read by the @command{cu} 3582program. For example, to use a list of systems known only to 3583@command{cu}, list them in a separate file @file{@var{file}} and put 3584@samp{cu sysfile @file{@var{file}}} in @file{config}. 3585 3586@menu 3587* Miscellaneous (config):: Miscellaneous config File Commands 3588* Configuration File Names:: Using Different Configuration Files 3589* Log File Names:: Using Different Log Files 3590* Debugging Levels:: Debugging Levels 3591@end menu 3592 3593@node Miscellaneous (config), Configuration File Names, config File, config File 3594@subsection Miscellaneous config File Commands 3595 3596@table @code 3597 3598@item nodename @var{string} 3599@findex nodename 3600@itemx hostname @var{string} 3601@findex hostname 3602@itemx uuname @var{string} 3603@findex uuname 3604@cindex UUCP system name 3605@cindex system name 3606 3607These keywords are equivalent. They specify the UUCP name of the local 3608host. If there is no configuration file, an appropriate system function 3609will be used to get the host name, if possible. 3610 3611@item spool @var{string} 3612@findex spool 3613@cindex spool directory, setting 3614@cindex /usr/spool/uucp 3615 3616Specify the spool directory. The default is from @file{policy.h}. This 3617is where UUCP files are queued. Status files and various sorts of 3618temporary files are also stored in this directory and subdirectories of 3619it. 3620 3621@item pubdir @var{string} 3622@findex pubdir in config file 3623@cindex public directory 3624@cindex uucppublic 3625@cindex /usr/spool/uucppublic 3626 3627Specify the public directory. The default is from @file{policy.h}. 3628When a file is named using a leading @kbd{~/}, it is taken from or to 3629the public directory. Each system may use a separate public directory 3630by using the @code{pubdir} command in the system configuration file; see 3631@ref{Miscellaneous (sys)}. 3632 3633@item lockdir @var{string} 3634@findex lockdir 3635@cindex lock directory 3636 3637Specify the directory to place lock files in. The default is from 3638@file{policy.h}; see the information in that file. Normally the lock 3639directory should be set correctly in @file{policy.h}, and not changed 3640here. However, changing the lock directory is sometimes useful for 3641testing purposes. This only affects lock files for devices and systems; 3642it does not affect certain internal lock files which are stored in the 3643spool directory (@pxref{Spool Lock Files}). 3644 3645@item unknown @var{string} @dots{} 3646@findex unknown 3647@cindex unknown systems 3648 3649The @var{string} and subsequent arguments are treated as though they 3650appeared in the system file (@pxref{sys File}). They are used to apply 3651to any unknown systems that may call in, probably to set file transfer 3652permissions and the like. If the @code{unknown} command is not used, 3653unknown systems are not permitted to call in. 3654 3655@item strip-login @var{boolean} 3656@findex strip-login 3657@cindex parity in login names 3658 3659If the argument is true, then, when @command{uucico} is doing its own 3660login prompting with the @option{-e}, @option{-l}, or @option{-w} switches, it 3661will strip the parity bit when it reads the login name and password. 3662Otherwise all eight bits will be used when checking the strings against 3663the UUCP password file. The default is true, since some other UUCP 3664packages send parity bits with the login name and password, and few 3665systems use eight bit characters in the password file. 3666 3667@item strip-proto @var{boolean} 3668@findex strip-proto 3669 3670If the argument is true, then @command{uucico} will strip the parity bit 3671from incoming UUCP protocol commands. Otherwise all eight bits will be 3672used. This only applies to commands which are not encapsulated in a 3673link layer protocol. The default is true, which should always be 3674correct unless your UUCP system names use eight bit characters. 3675 3676@item max-uuxqts @var{number} 3677@findex max-uuxqts 3678 3679Specify the maximum number of @command{uuxqt} processes which may run at 3680the same time. Having several @command{uuxqt} processes running at once 3681can significantly slow down a system, but, since @command{uuxqt} is 3682automatically started by @command{uucico}, it can happen quite easily. The 3683default for @code{max-uuxqts} is 0, which means that there is no limit. 3684If HDB configuration files are being read and the code was compiled 3685without @code{HAVE_TAYLOR_CONFIG}, then, if the file @file{Maxuuxqts} in 3686the configuration directory contains a readable number, it will be used 3687as the value for @code{max-uuxqts}. 3688 3689@item run-uuxqt @var{string} or @var{number} 3690@findex run-uuxqt 3691 3692Specify when @command{uuxqt} should be run by @command{uucico}. This 3693may be a positive number, in which case @command{uucico} will start a 3694@command{uuxqt} process whenever it receives the given number of 3695execution files from the remote system, and, if necessary, at the end of 3696the call. The argument may also be one of the strings @samp{once}, 3697@samp{percall}, or @samp{never}. The string @samp{once} means that 3698@command{uucico} will start @command{uuxqt} once at the end of 3699execution. The string @samp{percall} means that @command{uucico} will 3700start @command{uuxqt} once per call that it makes (this is only 3701different from @code{once} when @command{uucico} is invoked in a way 3702that causes it to make multiple calls, such as when the @option{-r1} 3703option is used without the @option{-s} option). The string @samp{never} 3704means that @command{uucico} will never start @command{uuxqt}, in which 3705case @command{uuxqt} should be periodically run via some other 3706mechanism. The default depends upon which type of configuration files 3707are being used; if @code{HAVE_TAYLOR_CONFIG} is used the default is 3708@samp{once}, otherwise if @code{HAVE_HDB_CONFIG} is used the default is 3709@samp{percall}, and otherwise, for @code{HAVE_V2_CONFIG}, the default is 3710@samp{10}. 3711 3712@item timetable @var{string} @var{string} 3713@findex timetable 3714 3715The @code{timetable} defines a timetable that may be used in 3716subsequently appearing time strings; see @ref{Time Strings}. The first 3717string names the timetable entry; the second is a time string. 3718 3719The following @code{timetable} commands are predefined. The NonPeak 3720timetable is included for compatibility. It originally described the 3721offpeak hours of Tymnet and Telenet, but both have since changed their 3722schedules. 3723 3724@example 3725timetable Evening Wk1705-0755,Sa,Su 3726timetable Night Wk2305-0755,Sa,Su2305-1655 3727timetable NonPeak Wk1805-0655,Sa,Su 3728@end example 3729 3730If this command does not appear, then, obviously, no additional 3731timetables will be defined. 3732 3733@item v2-files @var{boolean} 3734@findex v2-files 3735 3736If the code was compiled to be able to read V2 configuration files, a 3737false argument to this command will prevent them from being read. 3738This can be useful while testing. The default is true. 3739 3740@item hdb-files @var{boolean} 3741@findex hdb-files 3742 3743If the code was compiled to be able to read HDB configuration files, a 3744false argument to this command will prevent them from being read. 3745This can be useful while testing. The default is true. 3746 3747@end table 3748 3749@node Configuration File Names, Log File Names, Miscellaneous (config), config File 3750@subsection Configuration File Names 3751 3752@table @code 3753 3754@item sysfile @var{strings} 3755@findex sysfile 3756 3757Specify the system file(s). The default is the file @file{sys} in the 3758directory @var{newconfigdir}. These files hold information about other 3759systems with which this system communicates; see @ref{sys File}. 3760Multiple system files may be given on the line, and the @code{sysfile} 3761command may be repeated; each system file has its own set of defaults. 3762 3763@item portfile @var{strings} 3764@findex portfile 3765 3766Specify the port file(s). The default is the file @file{port} in the 3767directory @var{newconfigdir}. These files describe ports which are used 3768to call other systems and accept calls from other systems; see @ref{port 3769File}. No port files need be named at all. Multiple port files may be 3770given on the line, and the @code{portfile} command may be repeated. 3771 3772@item dialfile @var{strings} 3773@findex dialfile 3774 3775Specify the dial file(s). The default is the file @file{dial} in the 3776directory @var{newconfigdir}. These files describe dialing devices 3777(modems); see @ref{dial File}. No dial files need be named at all. 3778Multiple dial files may be given on the line, and the @code{dialfile} 3779command may be repeated. 3780 3781@item dialcodefile @var{strings} 3782@findex dialcodefile 3783@cindex configuration file (dialcode) 3784@cindex dialcode file 3785@cindex dialcode configuration file 3786 3787Specify the dialcode file(s). The default is the file @file{dialcode} 3788in the directory @var{newconfigdir}. These files specify dialcodes that 3789may be used when sending phone numbers to a modem. This permits using 3790the same set of phone numbers in different area-codes or with different 3791phone systems, by using dialcodes to specify the calling sequence. When 3792a phone number goes through dialcode translation, the leading alphabetic 3793characters are stripped off. The dialcode files are read line by line, 3794just like any other configuration file, and when a line is found whose 3795first word is the same as the leading characters from the phone number, 3796the second word on the line (which would normally consist of numbers) 3797replaces the dialcode in the phone number. No dialcode file need be 3798used. Multiple dialcode files may be specified on the line, and the 3799@code{dialcodefile} command may be repeated; all the dialcode files will 3800be read in turn until a dialcode is located. 3801 3802@item callfile @var{strings} 3803@findex callfile 3804@cindex call out file 3805@cindex call configuration file 3806@cindex call out login name 3807@cindex call out password 3808@cindex configuration file (call) 3809 3810Specify the call out login name and password file(s). The default is 3811the file @file{call} in the directory @var{newconfigdir}. If the call 3812out login name or password for a system are given as @kbd{*} 3813(@pxref{Logging In}), these files are read to get the real login name or 3814password. Each line in the file(s) has three words: the system name, 3815the login name, and the password. The login name and password may 3816contain escape sequences like those in a chat script expect string 3817(@pxref{Chat Scripts}). This file is only used when placing calls to 3818remote systems; the password file described under @code{passwdfile} 3819below is used for incoming calls. The intention of the call out file is 3820to permit the system file to be publically readable; the call out files 3821must obviously be kept secure. These files need not be used. Multiple 3822call out files may be specified on the line, and the @code{callfile} 3823command may be repeated; all the files will be read in turn until the 3824system is found. 3825 3826@item passwdfile @var{strings} 3827@findex passwdfile 3828@cindex passwd file 3829@cindex passwd configuration file 3830@cindex configuration file (passwd) 3831@cindex call in login name 3832@cindex call in password 3833 3834Specify the password file(s) to use for login names when 3835@command{uucico} is doing its own login prompting, which it does when 3836given the @option{-e}, @option{-l} or @option{-w} switches. The default is 3837the file @file{passwd} in the directory @var{newconfigdir}. Each line 3838in the file(s) has two words: the login name and the password (e.g., 3839@samp{Ufoo foopas}). They may contain escape sequences like those in a 3840chat script expect string (@pxref{Chat Scripts}). The login name is 3841accepted before the system name is known, so these are independent of 3842which system is calling in; a particular login may be required for a 3843system by using the @code{called-login} command in the system file 3844(@pxref{Accepting a Call}). These password files are optional, although 3845one must exist if @command{uucico} is to present its own login prompts. 3846 3847As a special exception, a colon may be used to separate the login name 3848from the password, and a colon may be used to terminate the password. 3849This means that the login name and password may not contain a colon. 3850This feature, in conjunction with the @code{HAVE_ENCRYPTED_PASSWORDS} 3851macro in @file{policy.h}, permits using a standard Unix 3852@file{/etc/passwd} as a UUCP password file, providing the same set of 3853login names and passwords for both @command{getty} and @command{uucico}. 3854 3855Multiple password files may be specified on the line, and the 3856@code{passwdfile} command may be repeated; all the files will be read in 3857turn until the login name is found. 3858 3859@end table 3860 3861@node Log File Names, Debugging Levels, Configuration File Names, config File 3862@subsection Log File Names 3863 3864@table @code 3865 3866@item logfile @var{string} 3867@findex logfile 3868@cindex log file 3869 3870Name the log file. The default is from @file{policy.h}. Logging 3871information is written to this file. If @code{HAVE_HDB_LOGGING} is 3872defined in @file{policy.h}, then by default a separate log file is used 3873for each system; using this command to name a log file will cause all 3874the systems to use it. 3875 3876@item statfile @var{string} 3877@findex statfile 3878@cindex statistics file 3879 3880Name the statistics file. The default is from @file{policy.h}. 3881Statistical information about file transfers is written to this file. 3882 3883@item debugfile @var{string} 3884@findex debugfile 3885@cindex debugging file 3886 3887Name the file to which all debugging information is written. The 3888default is from @file{policy.h}. This command is only effective if the 3889code has been compiled to include debugging (this is controlled by the 3890@code{DEBUG} macro in @file{policy.h}). If debugging is on, messages 3891written to the log file are also written to the debugging file to make 3892it easier to keep the order of actions straight. The debugging file is 3893different from the log file because information such as passwords can 3894appear in it, so it must be not be publically readable. 3895 3896@end table 3897 3898@node Debugging Levels, , Log File Names, config File 3899@subsection Debugging Levels 3900 3901@table @code 3902 3903@item debug @var{string} @dots{} 3904@findex debug in config file 3905 3906Set the debugging level. This command is only effective if the code has 3907been compiled to include debugging. The default is to have no 3908debugging. The arguments are strings which name the types of debugging 3909to be turned on. The following types of debugging are defined: 3910 3911@table @samp 3912@item abnormal 3913Output debugging messages for abnormal situations, such as recoverable errors. 3914@item chat 3915Output debugging messages for chat scripts. 3916@item handshake 3917Output debugging messages for the initial handshake. 3918@item uucp-proto 3919Output debugging messages for the UUCP session protocol. 3920@item proto 3921Output debugging messages for the individual link protocols. 3922@item port 3923Output debugging messages for actions on the communication port. 3924@item config 3925Output debugging messages while reading the configuration files. 3926@item spooldir 3927Output debugging messages for actions in the spool directory. 3928@item execute 3929Output debugging messages whenever another program is executed. 3930@item incoming 3931List all incoming data in the debugging file. 3932@item outgoing 3933List all outgoing data in the debugging file. 3934@item all 3935All of the above. 3936@end table 3937 3938The debugging level may also be specified as a number. A 1 will set 3939@samp{chat} debugging, a 2 will set both @samp{chat} and 3940@samp{handshake} debugging, and so on down the possibilities. Currently 3941an 11 will turn on all possible debugging, since there are 11 types of 3942debugging messages listed above; more debugging types may be added in 3943the future. The @code{debug} command may be used several times in the 3944configuration file; every debugging type named will be turned on. When 3945running any of the programs, the @option{-x} switch (actually, for 3946@command{uulog} it's the @option{-X} switch) may be used to turn on 3947debugging. The argument to the @option{-x} switch is one of the strings 3948listed above, or a number as described above, or a comma separated list 3949of strings (e.g., @option{-x chat,handshake}). The @option{-x} switch may 3950also appear several times on the command line, in which case all named 3951debugging types will be turned on. The @option{-x} debugging is in 3952addition to any debugging specified by the @code{debug} command; there 3953is no way to cancel debugging information. The debugging level may also 3954be set specifically for calls to or from a specific system with the 3955@code{debug} command in the system file (@pxref{Miscellaneous (sys)}). 3956 3957The debugging messages are somewhat idiosyncratic; it may be necessary 3958to refer to the source code for additional information in some cases. 3959 3960@end table 3961 3962@node sys File, port File, config File, Configuration Files 3963@section The System Configuration File 3964@cindex sys file 3965@cindex system configuration file 3966@cindex configuration file (sys) 3967 3968By default there is a single system configuration, named @file{sys} in 3969the directory @var{newconfigdir}. This may be overridden by the 3970@code{sysfile} command in the main configuration file; see 3971@ref{Configuration File Names}. 3972 3973These files describe all remote systems known to the UUCP package. 3974 3975@menu 3976* Defaults and Alternates:: Using Defaults and Alternates 3977* Naming the System:: Naming the System 3978* Calling Out:: Calling Out 3979* Accepting a Call:: Accepting a Call 3980* Protocol Selection:: Protocol Selection 3981* File Transfer Control:: File Transfer Control 3982* Miscellaneous (sys):: Miscellaneous sys File Commands 3983* Default sys File Values:: Default Values 3984@end menu 3985 3986@node Defaults and Alternates, Naming the System, sys File, sys File 3987@subsection Defaults and Alternates 3988 3989The first set of commands in the file, up to the first @code{system} 3990command, specify defaults to be used for all systems in that file. Each 3991@file{sys} file uses a different set of defaults. 3992 3993Subsequently, each set of commands from @code{system} up to the next 3994@code{system} command describe a particular system. Default values may 3995be overridden for specific systems. 3996 3997Each system may then have a series of alternate choices to use when 3998calling out or calling in. The first set of commands for a particular 3999system, up to the first @code{alternate} command, provide the first 4000choice. Subsequently, each set of commands from @code{alternate} up to 4001the next @code{alternate} command describe an alternate choice for 4002calling out or calling in. 4003 4004When a system is called, the commands before the first @code{alternate} 4005are used to select a phone number, port, and so forth; if the call fails 4006for some reason, the commands between the first @code{alternate} and the 4007second are used, and so forth. Well, not quite. Actually, each 4008succeeding alternate will only be used if it is different in some 4009relevant way (different phone number, different chat script, etc.). If 4010you want to force the same alternate to be used again (to retry a phone 4011call more than once, for example), enter the phone number (or any other 4012relevant field) again to make it appear different. 4013 4014The alternates can also be used to give different permissions to an 4015incoming call based on the login name. This will only be done if the 4016first set of commands, before the first @code{alternate} command, uses 4017the @code{called-login} command. The list of alternates will be 4018searched, and the first alternate with a matching @code{called-login} 4019command will be used. If no alternates match, the call will be 4020rejected. 4021 4022The @code{alternate} command may also be used in the file-wide defaults 4023(the set of commands before the first @code{system} command). This 4024might be used to specify a list of ports which are available for all 4025systems (for an example of this, see @ref{Gateway Example}) or to 4026specify permissions based on the login name used by the remote system 4027when it calls in. The first alternate for each system will default to 4028the first alternate for the file-wide defaults (as modified by the 4029commands used before the first @code{alternate} command for this 4030system), the second alternate for each system to the second alternate 4031for the file-wide defaults (as modified the same way), and so forth. If 4032a system specifies more alternates than the file-wide defaults, the 4033trailing ones will default to the last file-wide default alternate. If 4034a system specifies fewer alternates than the file-wide defaults, the 4035trailing file-wide default alternates will be used unmodified. The 4036@code{default-alternates} command may be used to modify this behaviour. 4037 4038This can all get rather confusing, although it's easier to use than to 4039describe concisely; the @command{uuchk} program may be used to ensure 4040that you are getting what you want. 4041 4042@need 2000 4043@node Naming the System, Calling Out, Defaults and Alternates, sys File 4044@subsection Naming the System 4045 4046@table @code 4047 4048@item system @var{string} 4049@findex system 4050 4051Specify the remote system name. Subsequent commands up to the next 4052@code{system} command refer to this system. 4053 4054@item alternate [@var{string}] 4055@findex alternate 4056 4057Start an alternate set of commands (@pxref{Defaults and Alternates}). 4058An optional argument may be used to name the alternate. This name will 4059be recorded in the log file if the alternate is used to call the system. 4060There is no way to name the first alternate (the commands before the 4061first @code{alternate} command). 4062 4063@item default-alternates @var{boolean} 4064@findex default-alternates 4065 4066If the argument is false, any remaining default alternates (from the 4067defaults specified at the top of the current system file) will not be 4068used. The default is true. 4069 4070@item alias @var{string} 4071@findex alias 4072 4073Specify an alias for the current system. The alias may be used by local 4074@command{uucp} and @command{uux} commands, as well as by the remote 4075system (which can be convenient if a remote system changes its name). 4076The default is to have no aliases. 4077 4078@item myname @var{string} 4079@findex myname 4080 4081Specifies a different system name to use when calling the remote system. 4082Also, if @code{called-login} is used and is not @samp{ANY}, then, when a 4083system logs in with that login name, @var{string} is used as the local 4084system name. Because the local system name must be determined before 4085the remote system has identified itself, using @code{myname} and 4086@code{called-login} together for any system will set the local name for 4087that login; this means that each locally used system name must have a 4088unique login name associated with it. This allows a system to have 4089different names for an external and an internal network. The default is 4090to not use a special local name. 4091 4092@end table 4093 4094@node Calling Out, Accepting a Call, Naming the System, sys File 4095@subsection Calling Out 4096 4097This section describes commands used when placing a call to another 4098system. 4099 4100@menu 4101* When to Call:: When to Call 4102* Placing the Call:: Placing the Call 4103* Logging In:: Logging In 4104@end menu 4105 4106@need 2000 4107@node When to Call, Placing the Call, Calling Out, Calling Out 4108@subsubsection When to Call 4109 4110@table @code 4111 4112@item time @var{string} [@var{number}] 4113@findex time 4114 4115Specify when the system may be called. The first argument is a time 4116string; see @ref{Time Strings}. The optional second argument specifies 4117a retry time in minutes. If a call made during a time that matches the 4118time string fails, no more calls are permitted until the retry time has 4119passed. By default an exponentially increasing retry time is used: 4120after each failure the next retry period is longer. A retry time 4121specified in the @code{time} command is always a fixed amount of time. 4122 4123The @code{time} command may appear multiple times in a single alternate, 4124in which case if any time string matches the system may be called. When 4125the @code{time} command is used for a particular system, any @code{time} 4126or @code{timegrade} commands that appeared in the system defaults are 4127ignored. 4128 4129The default time string is @samp{Never}. 4130 4131@item timegrade @var{character} @var{string} [@var{number}] 4132@findex timegrade 4133@cindex grades 4134 4135The @var{character} specifies a grade. It must be a single letter or 4136digit. The @var{string} is a time string (@pxref{Time Strings}). All 4137jobs of grade @var{character} or higher (where @kbd{0} > @kbd{9} > 4138@kbd{A} > @kbd{Z} > @kbd{a} > @kbd{z}) may be run at the specified time. 4139An ordinary @code{time} command is equivalent to using @code{timegrade} 4140with a grade of @kbd{z}, permitting all jobs. If there are no jobs of a 4141sufficiently high grade according to the time string, the system will 4142not be called. Giving the @option{-s} switch to @command{uucico} to force 4143it to call a system causes it to assume there is a job of grade @kbd{0} 4144waiting to be run. 4145 4146The optional third argument specifies a retry time in minutes. See the 4147@code{time} command, above, for more details. 4148 4149Note that the @code{timegrade} command serves two purposes: 1) if there 4150is no job of sufficiently high grade the system will not be called, and 41512) if the system is called anyway (because the @option{-s} switch was 4152given to @command{uucico}) only jobs of sufficiently high grade will be 4153transferred. However, if the other system calls in, the 4154@code{timegrade} commands are ignored, and jobs of any grade may be 4155transferred (but see @code{call-timegrade} and @code{called-timegrade}, 4156below). Also, the @code{timegrade} command will not prevent the other 4157system from transferring any job it chooses, regardless of who placed 4158the call. 4159 4160The @code{timegrade} command may appear multiple times without using 4161@code{alternate}. When the @code{timegrade} command is used for a 4162particular system, any @code{time} or @code{timegrade} commands that 4163appeared in the system defaults are ignored. 4164 4165If this command does not appear, there are no restrictions on what grade 4166of work may be done at what time. 4167 4168@item max-retries @var{number} 4169@findex max-retries 4170 4171Gives the maximum number of times this system may be retried. If this 4172many calls to the system fail, it will be called at most once a day 4173whatever the retry time is. The default is 26. 4174 4175@item success-wait @var{number} 4176 4177A retry time, in seconds, which applies after a successful call. This 4178can be used to put a limit on how frequently the system is called. For 4179example, an argument of 1800 means that the system will not be called 4180more than once every half hour. The default is 0, which means that 4181there is no limit. 4182 4183@item call-timegrade @var{character} @var{string} 4184@findex call-timegrade 4185 4186The @var{character} is a single character @kbd{A} to @kbd{Z}, @kbd{a} to 4187@kbd{z}, or @kbd{0} to @kbd{9} and specifies a grade. The @var{string} 4188is a time string (@pxref{Time Strings}). If a call is placed to the 4189other system during a time which matches the time string, the remote 4190system will be requested to only run jobs of grade @var{character} or 4191higher. Unfortunately, there is no way to guarantee that the other 4192system will obey the request (this UUCP package will, but there are 4193others which will not); moreover, job grades are historically somewhat 4194arbitrary, so specifying a grade will only be meaningful if the other 4195system cooperates in assigning grades. This grade restriction only 4196applies when the other system is called, not when the other system calls 4197in. 4198 4199The @code{call-timegrade} command may appear multiple times without 4200using @code{alternate}. If this command does not appear, or if none of 4201the time strings match, the remote system will be allowed to send 4202whatever grades of work it chooses. 4203 4204@item called-timegrade @var{character} @var{string} 4205@findex called-timegrade 4206 4207The @var{character} is a single character @kbd{A} to @kbd{Z}, @kbd{a} to 4208@kbd{z}, or @kbd{0} to @kbd{9} and specifies a grade. The @var{string} 4209is a time string (@pxref{Time Strings}). If a call is received from the 4210other system during a time which matches the time string, only jobs of 4211grade @var{character} or higher will be sent to the remote system. This 4212allows the job grade to be set for incoming calls, overriding any 4213request made by the remote uucico. As noted above, job grades are 4214historically somewhat arbitrary, so specifying a grade will only be 4215meaningful if the other system cooperates in assigning grades. This 4216grade restriction only applies to jobs on the local system; it does not 4217affect the jobs transferred by the remote system. This grade 4218restriction only applies when the other system calls in, not when the 4219other system is called. 4220 4221The @code{called-timegrade} command may appear multiple times. If this 4222command does not appear, or if none of the time strings match, any grade 4223may be sent to the remote system upon receiving a call. 4224 4225@end table 4226 4227@need 2000 4228@node Placing the Call, Logging In, When to Call, Calling Out 4229@subsubsection Placing the Call 4230 4231@table @code 4232 4233@itemx speed @var{number} 4234@findex speed in sys file 4235@item baud @var{number} 4236@findex baud in sys file 4237 4238Specify the speed (the term @dfn{baud} is technically incorrect, but 4239widely understood) at which to call the system. This will try all 4240available ports with that speed until an unlocked port is found. The 4241ports are defined in the port file. If both @code{speed} and 4242@code{port} commands appear, both are used when selecting a port. To 4243allow calls at more than one speed, the @code{alternate} command must be 4244used (@pxref{Defaults and Alternates}). If this command does not 4245appear, there is no default; the speed may be specified in the port 4246file, but if it is not then the natural speed of the port will be used 4247(whatever that means on the system). Specifying an explicit speed of 0 4248will request the natural speed of the port (whatever the system sets it 4249to), overriding any default speed from the defaults at the top of the 4250file. 4251 4252@item port @var{string} 4253@findex port in sys file 4254 4255Name a particular port or type of port to use when calling the system. 4256The information for this port is obtained from the port file. If this 4257command does not appear, there is no default; a port must somehow be 4258specified in order to call out (it may be specified implicitly using the 4259@code{speed} command or explicitly using the next version of 4260@code{port}). There may be many ports with the same name; each will be 4261tried in turn until an unlocked one is found which matches the desired 4262speed. 4263 4264@item port @var{string} @dots{} 4265 4266If more than one string follows the @code{port} command, the strings are 4267treated as a command that might appear in the port file (@pxref{port 4268File}). If a port is named (by using a single string following 4269@code{port}) these commands are ignored; their purpose is to permit 4270defining the port completely in the system file rather than always 4271requiring entries in two different files. In order to call out, a port 4272must be specified using some version of the @code{port} command, or by 4273using the @code{speed} command to select ports from the port file. 4274 4275@item phone @var{string} 4276@findex phone 4277@itemx address @var{string} 4278@findex address 4279 4280Give a phone number to call (when using a modem port) or a remote host 4281to contact (when using a TCP or TLI port). The commands @code{phone} 4282and @code{address} are equivalent; the duplication is intended to 4283provide a mnemonic choice depending on the type of port in use. 4284 4285When used with a modem port, an @kbd{=} character in the phone number 4286means to wait for a secondary dial tone (although only some modems 4287support this); a @kbd{-} character means to pause while dialing for 1 4288second (again, only some modems support this). If the system has more 4289than one phone number, each one must appear in a different alternate. 4290The @code{phone} command must appear in order to call out on a modem; 4291there is no default. 4292 4293When used with a TCP port, the string names the host to contact. It may 4294be a domain name or a numeric Internet address. If no address is 4295specified, the system name is used. 4296 4297When used with a TLI port, the string is treated as though it were an 4298expect string in a chat script, allowing the use of escape characters 4299(@pxref{Chat Scripts}). The @code{dialer-sequence} command in the port 4300file may override this address (@pxref{port File}). 4301 4302When used with a port that not a modem or TCP or TLI, this command is 4303ignored. 4304 4305@end table 4306 4307@node Logging In, , Placing the Call, Calling Out 4308@subsubsection Logging In 4309@table @code 4310 4311@item chat @var{strings} 4312@findex chat in sys file 4313@item chat-timeout @var{number} 4314@findex chat-timeout in sys file 4315@item chat-fail @var{string} 4316@findex chat-fail in sys file 4317@item chat-seven-bit @var{boolean} 4318@findex chat-seven-bit in sys file 4319@item chat-program @var{strings} 4320@findex chat-program in sys file 4321 4322These commands describe a chat script to use when logging on to a remote 4323system. This login chat script is run after any chat script defined in 4324the @file{dial} file (@pxref{dial File}). Chat scripts are explained in 4325@ref{Chat Scripts}. 4326 4327Two additional escape sequences may be used in send strings. 4328 4329@table @samp 4330@item \L 4331Send the login name, as set by the @code{call-login} command. 4332@item \P 4333Send the password, as set by the @code{call-password} command. 4334@end table 4335 4336Three additional escape sequences may be used with the 4337@code{chat-program} command. These are @samp{\L} and @samp{\P}, which 4338become the login name and password, respectively, and @samp{\Z}, which 4339becomes the name of the system of being called. 4340 4341The default chat script is: 4342 4343@example 4344chat "" \r\c ogin:-BREAK-ogin:-BREAK-ogin: \L word: \P 4345@end example 4346 4347This will send a carriage return (the @kbd{\c} suppresses the additional 4348trailing carriage return that would otherwise be sent) and waits for the 4349string @samp{ogin:} (which would be the last part of the @samp{login:} 4350prompt supplied by a Unix system). If it doesn't see @samp{ogin:}, it 4351sends a break and waits for @samp{ogin:} again. If it still doesn't see 4352@samp{ogin:}, it sends another break and waits for @samp{ogin:} again. 4353If it still doesn't see @samp{ogin:}, the chat script aborts and hangs 4354up the phone. If it does see @samp{ogin:} at some point, it sends the 4355login name (as specified by the @code{call-login} command) followed by a 4356carriage return (since all send strings are followed by a carriage 4357return unless @kbd{\c} is used) and waits for the string @samp{word:} 4358(which would be the last part of the @samp{Password:} prompt supplied by 4359a Unix system). If it sees @samp{word:}, it sends the password and a 4360carriage return, completing the chat script. The program will then 4361enter the handshake phase of the UUCP protocol. 4362 4363This chat script will work for most systems, so you will only be 4364required to use the @code{call-login} and @code{call-password} commands. 4365In fact, in the file-wide defaults you could set defaults of 4366@samp{call-login *} and @samp{call-password *}; you would then just have 4367to make an entry for each system in the call-out login file. 4368 4369Some systems seem to flush input after the @samp{login:} prompt, so they 4370may need a version of this chat script with a @kbd{\d} before the 4371@kbd{\L}. When using UUCP over TCP, some servers will not be handle the 4372initial carriage return sent by this chat script; in this case you may 4373have to specify the simple chat script @samp{ogin: \L word: \P}. 4374 4375@item call-login @var{string} 4376@findex call-login 4377 4378Specify the login name to send with @kbd{\L} in the chat script. If the 4379string is @samp{*} (e.g., @samp{call-login *}) the login name will be 4380fetched from the call out login name and password file 4381(@pxref{Configuration File Names}). The string may contain escape 4382sequences as though it were an expect string in a chat script 4383(@pxref{Chat Scripts}). There is no default. 4384 4385@item call-password @var{string} 4386@findex call-password 4387 4388Specify the password to send with @kbd{\P} in the chat script. If the 4389string is @samp{*} (e.g., @samp{call-password *}) the password will be 4390fetched from the call-out login name and password file 4391(@pxref{Configuration File Names}). The string may contain escape 4392sequences as though it were an expect string in a chat script 4393(@pxref{Chat Scripts}). There is no default. 4394 4395@end table 4396 4397@node Accepting a Call, Protocol Selection, Calling Out, sys File 4398@subsection Accepting a Call 4399 4400@table @code 4401 4402@item called-login @var{strings} 4403@findex called-login 4404 4405The first @var{string} specifies the login name that the system must use 4406when calling in. If it is @samp{ANY} (e.g., @samp{called-login ANY}) any 4407login name may be used; this is useful to override a file-wide default 4408and to indicate that future alternates may have different login names. 4409Case is significant. The default value is @samp{ANY}. 4410 4411Different alternates (@pxref{Defaults and Alternates}) may use different 4412@code{called-login} commands, in which case the login name will be used 4413to select which alternate is in effect; this will only work if the first 4414alternate (before the first @code{alternate} command) uses the 4415@code{called-login} command. 4416 4417Additional strings may be specified after the login name; they are a 4418list of which systems are permitted to use this login name. If this 4419feature is used, then normally the login name will only be given in a 4420single @code{called-login} command. Only systems which appear on the 4421list, or which use an explicit @code{called-login} command, will be 4422permitted to use that login name. If the same login name is used more 4423than once with a list of systems, all the lists are concatenated 4424together. This feature permits you to restrict a login name to a 4425particular set of systems without requiring you to use the 4426@code{called-login} command for every single system; you can achieve a 4427similar effect by using a different system file for each permitted login 4428name with an appropriate @code{called-login} command in the file-wide 4429defaults. 4430 4431@item callback @var{boolean} 4432@findex callback 4433 4434If @var{boolean} is true, then when the remote system calls 4435@command{uucico} will hang up the connection and prepare to call it 4436back. The default is false. 4437 4438@item called-chat @var{strings} 4439@findex called-chat 4440@item called-chat-timeout @var{number} 4441@findex called-chat-timeout 4442@item called-chat-fail @var{string} 4443@findex called-chat-fail 4444@item called-chat-seven-bit @var{boolean} 4445@findex called-chat-seven-bit 4446@item called-chat-program @var{strings} 4447@findex called-chat-program 4448 4449These commands may be used to define a chat script (@pxref{Chat 4450Scripts}) that is run whenever the local system is called by the system 4451being defined. The chat script defined by the @code{chat} command 4452(@pxref{Logging In}), on the other hand, is used when the remote system 4453is called. This called chat script might be used to set special modem 4454parameters that are appropriate to a particular system. It is run after 4455protocol negotiation is complete, but before the protocol has been 4456started. For additional escape sequence which may be used besides those 4457defined for all chat scripts, see @ref{Logging In}. There is no default 4458called chat script. If the called chat script fails, the incoming call 4459will be aborted. 4460 4461@end table 4462 4463@node Protocol Selection, File Transfer Control, Accepting a Call, sys File 4464@subsection Protocol Selection 4465 4466@table @code 4467 4468@item protocol @var{string} 4469@findex protocol in sys file 4470 4471Specifies which protocols to use for the other system, and in which 4472order to use them. This would not normally be used. For example, 4473@samp{protocol tfg}. 4474 4475The default depends on the characteristics of the port and the dialer, 4476as specified by the @code{seven-bit} and @code{reliable} commands. If 4477neither the port nor the dialer use either of these commands, the 4478default is to assume an eight-bit reliable connection. The commands 4479@samp{seven-bit true} or @samp{reliable false} might be used in either 4480the port or the dialer to change this. Each protocol has particular 4481requirements that must be met before it will be considered during 4482negotiation with the remote side. 4483 4484The @samp{t} and @samp{e} protocols are intended for use over TCP or 4485some other communication path with end to end reliability, as they do no 4486checking of the data at all. They will only be considered on a TCP port 4487which is both reliable and eight bit. For technical details, see @ref{t 4488Protocol}, and @ref{e Protocol}. 4489 4490The @samp{i} protocol is a bidirectional protocol. It requires an 4491eight-bit connection. It will run over a half-duplex link, such as 4492Telebit modems in PEP mode, but for efficient use of such a connection 4493you must use the @code{half-duplex} command (@pxref{port File}). 4494@xref{i Protocol}. 4495 4496The @samp{g} protocol is robust, but requires an eight-bit connection. 4497@xref{g Protocol}. 4498 4499The @samp{G} protocol is the System V Release 4 version of the @samp{g} 4500protocol. @xref{Big G Protocol}. 4501 4502The @samp{a} protocol is a Zmodem like protocol, contributed by Doug 4503Evans. It requires an eight-bit connection, but unlike the @samp{g} or 4504@samp{i} protocol it will work if certain control characters may not be 4505transmitted. 4506 4507The @samp{j} protocol is a variant of the @samp{i} protocol which can 4508avoid certain control characters. The set of characters it avoids can 4509be set by a parameter. While it technically does not require an eight 4510bit connection (it could be configured to avoid all characters with the 4511high bit set) it would be very inefficient to use it over one. It is 4512useful over a eight-bit connection that will not transmit certain 4513control characters. @xref{j Protocol}. 4514 4515The @samp{f} protocol is intended for use with X.25 connections; it 4516checksums each file as a whole, so any error causes the entire file to 4517be retransmitted. It requires a reliable connection, but only uses 4518seven-bit transmissions. It is a streaming protocol, so, while it can 4519be used on a serial port, the port must be completely reliable and flow 4520controlled; many aren't. @xref{f Protocol}. 4521 4522The @samp{v} protocol is the @samp{g} protocol as used by the DOS 4523program UUPC/Extended. It is provided only so that UUPC/Extended users 4524can use it; there is no particular reason to select it. @xref{v 4525Protocol}. 4526 4527The @samp{y} protocol is an efficient streaming protocol. It does error 4528checking, but when it detects an error it immediately aborts the 4529connection. This requires a reliable, flow controlled, eight-bit 4530connection. In practice, it is only useful on a connection that is 4531nearly always error-free. Unlike the @samp{t} and @samp{e} protocols, 4532the connection need not be entirely error-free, so the @samp{y} protocol 4533can be used on a serial port. @xref{y Protocol}. 4534 4535The protocols will be considered in the order shown above. This means 4536that if neither the @code{seven-bit} nor the @code{reliable} command are 4537used, the @samp{t} protocol will be used over a TCP connection and the 4538@samp{i} protocol will be used over any other type of connection 4539(subject, of course, to what is supported by the remote system; it may 4540be assumed that all systems support the @samp{g} protocol). 4541 4542Note that currently specifying both @samp{seven-bit true} and 4543@samp{reliable false} will not match any protocol. If this occurs 4544through a combination of port and dialer specifications, you will have 4545to use the @code{protocol} command for the system or no protocol will be 4546selected at all (the only reasonable choice would be @samp{protocol f}). 4547 4548A protocol list may also be specified for a port (@pxref{port File}), 4549but, if there is a list for the system, the list for the port is 4550ignored. 4551 4552@item protocol-parameter @var{character} @var{string} @dots{} 4553@findex protocol-parameter in sys file 4554 4555@var{character} is a single character specifying a protocol. The 4556remaining strings are a command specific to that protocol which will be 4557executed if that protocol is used. A typical command is something like 4558@samp{window 7}. The particular commands are protocol specific. 4559 4560The @samp{i} protocol supports the following commands, all of which take 4561numeric arguments: 4562 4563@table @code 4564@item window 4565The window size to request the remote system to use. This must be 4566between 1 and 16 inclusive. The default is 16. 4567@item packet-size 4568The packet size to request the remote system to use. This must be 4569between 1 and 4095 inclusive. The default is 1024. 4570@item remote-packet-size 4571If this is between 1 and 4095 inclusive, the packet size requested by 4572the remote system is ignored, and this is used instead. The default is 45730, which means that the remote system's request is honored. 4574@item sync-timeout 4575The length of time, in seconds, to wait for a SYNC packet from the remote 4576system. SYNC packets are exchanged when the protocol is started. The 4577default is 10. 4578@item sync-retries 4579The number of times to retry sending a SYNC packet before giving up. 4580The default is 6. 4581@item timeout 4582The length of time, in seconds, to wait for an incoming packet before 4583sending a negative acknowledgement. The default is 10. 4584@item retries 4585The number of times to retry sending a packet or a negative 4586acknowledgement before giving up and closing the connection. The 4587default is 6. 4588@item errors 4589The maximum number of errors to permit before closing the connection. 4590The default is 100. 4591@item error-decay 4592The rate at which to ignore errors. Each time this many packets are 4593received, the error count is decreased by one, so that a long connection 4594with an occasional error will not exceed the limit set by @code{errors}. 4595The default is 10. 4596@item ack-frequency 4597The number of packets to receive before sending an acknowledgement. The 4598default is half the requested window size, which should provide good 4599performance in most cases. 4600@end table 4601 4602The @samp{g}, @samp{G} and @samp{v} protocols support the following 4603commands, all of which take numeric arguments, except 4604@code{short-packets} which takes a boolean argument: 4605 4606@table @code 4607@item window 4608The window size to request the remote system to use. This must be 4609between 1 and 7 inclusive. The default is 7. 4610@item packet-size 4611The packet size to request the remote system to use. This must be a 4612power of 2 between 32 and 4096 inclusive. The default is 64 for the 4613@samp{g} and @samp{G} protocols and 1024 for the @samp{v} protocol. 4614Many older UUCP packages do not support packet sizes larger than 64, and 4615many others do not support packet sizes larger than 128. Some UUCP 4616packages will even dump core if a larger packet size is requested. The 4617packet size is not a negotiation, and it may be different in each 4618direction. If you request a packet size larger than the remote system 4619supports, you will not be able to send any files. 4620@item startup-retries 4621The number of times to retry the initialization sequence. The default 4622is 8. 4623@item init-retries 4624The number of times to retry one phase of the initialization sequence 4625(there are three phases). The default is 4. 4626@item init-timeout 4627The timeout in seconds for one phase of the initialization sequence. The 4628default is 10. 4629@item retries 4630The number of times to retry sending either a data packet or a request 4631for the next packet. The default is 6. 4632@item timeout 4633The timeout in seconds when waiting for either a data packet or an 4634acknowledgement. The default is 10. 4635@item garbage 4636The number of unrecognized bytes to permit before dropping the 4637connection. This must be larger than the packet size. The default is 463810000. 4639@item errors 4640The number of errors (malformed packets, out of order packets, bad 4641checksums, or packets rejected by the remote system) to permit before 4642dropping the connection. The default is 100. 4643@item error-decay 4644The rate at which to ignore errors. Each time this many packets are 4645received, the error count is decreased by one, so that a long connection 4646with an occasional error will not exceed the limit set by @code{errors}. 4647The default is 10. 4648@item remote-window 4649If this is between 1 and 7 inclusive, the window size requested by the 4650remote system is ignored and this is used instead. This can be useful 4651when dealing with some poor UUCP packages. The default is 0, which 4652means that the remote system's request is honored. 4653@item remote-packet-size 4654If this is between 32 and 4096 inclusive the packet size requested by 4655the remote system is ignored and this is used instead. There is 4656probably no good reason to use this. The default is 0, which means that 4657the remote system's request is honored. 4658@item short-packets 4659If this is true, then the code will optimize by sending shorter packets 4660when there is less data to send. This confuses some UUCP packages, such 4661as System V Release 4 (when using the @samp{G} protocol) and Waffle; 4662when connecting to such a package, this parameter must be set to false. 4663The default is true for the @samp{g} and @samp{v} protocols and false 4664for the @samp{G} protocol. 4665@end table 4666 4667The @samp{a} protocol is a Zmodem like protocol contributed by Doug 4668Evans. It supports the following commands, all of which take numeric 4669arguments except for @code{escape-control}, which takes a boolean 4670argument: 4671 4672@table @code 4673@item timeout 4674Number of seconds to wait for a packet to arrive. The default is 10. 4675@item retries 4676The number of times to retry sending a packet. The default is 10. 4677@item startup-retries 4678The number of times to retry sending the initialization packet. The 4679default is 4. 4680@item garbage 4681The number of garbage characters to accept before closing the 4682connection. The default is 2400. 4683@item send-window 4684The number of characters that may be sent before waiting for an 4685acknowledgement. The default is 1024. 4686@item escape-control 4687Whether to escape control characters. If this is true, the protocol may 4688be used over a connection which does not transmit certain control 4689characters, such as @code{XON} or @code{XOFF}. The connection must 4690still transmit eight bit characters other than control characters. The 4691default is false. 4692@end table 4693 4694The @samp{j} protocol can be used over an eight bit connection that will 4695not transmit certain control characters. It accepts the same protocol 4696parameters that the @samp{i} protocol accepts, as well as one more: 4697 4698@table @code 4699@item avoid 4700A list of characters to avoid. This is a string which is interpreted as 4701an escape sequence (@pxref{Chat Scripts}). The protocol does not have a 4702way to avoid printable ASCII characters (byte values from 32 to 126, 4703inclusive); only ASCII control characters and eight-bit characters may 4704be avoided. The default value is @samp{\021\023}; these are the 4705characters @code{XON} and @code{XOFF}, which many connections use for 4706flow control. If the package is configured to use @code{HAVE_BSD_TTY}, 4707then on some versions of Unix you may have to avoid @samp{\377} as well, 4708due to the way some implementations of the BSD terminal driver handle 4709signals. 4710@end table 4711 4712The @samp{f} protocol is intended for use with error-correcting modems 4713only; it checksums each file as a whole, so any error causes the entire 4714file to be retransmitted. It supports the following commands, both of 4715which take numeric arguments: 4716 4717@table @code 4718@item timeout 4719The timeout in seconds before giving up. The default is 120. 4720@item retries 4721How many times to retry sending a file. The default is 2. 4722@end table 4723 4724The @samp{t} and @samp{e} protocols are intended for use over TCP or 4725some other communication path with end to end reliability, as they do no 4726checking of the data at all. They both support a single command, which 4727takes a numeric argument: 4728 4729@table @code 4730@item timeout 4731The timeout in seconds before giving up. The default is 120. 4732@end table 4733 4734The @samp{y} protocol is a streaming protocol contributed by Jorge Cwik. 4735It supports the following commands, both of which take numeric 4736arguments: 4737 4738@table @code 4739@item timeout 4740The timeout in seconds when waiting for a packet. The default is 60. 4741@item packet-size 4742The packet size to use. The default is 1024. 4743@end table 4744 4745The protocol parameters are reset to their default values after each 4746call. 4747 4748@end table 4749 4750@node File Transfer Control, Miscellaneous (sys), Protocol Selection, sys File 4751@subsection File Transfer Control 4752 4753@table @code 4754 4755@item send-request @var{boolean} 4756@findex send-request 4757 4758The @var{boolean} determines whether the remote system is permitted to 4759request files from the local system. The default is yes. 4760 4761@item receive-request @var{boolean} 4762@findex receive-request 4763 4764The @var{boolean} determines whether the remote system is permitted to 4765send files to the local system. The default is yes. 4766 4767@item request @var{boolean} 4768@findex request 4769 4770A shorthand command, equivalent to specifying both @samp{send-request 4771@var{boolean}} and @samp{receive-request @var{boolean}}. 4772 4773@item call-transfer @var{boolean} 4774@findex call-transfer 4775 4776The @var{boolean} is checked when the local system places the call. It 4777determines whether the local system may do file transfers queued up for 4778the remote system. The default is yes. 4779 4780@item called-transfer @var{boolean} 4781@findex called-transfer 4782 4783The @var{boolean} is checked when the remote system calls in. It 4784determines whether the local system may do file transfers queued up for 4785the remote system. The default is yes. 4786 4787@item transfer @var{boolean} 4788@findex transfer 4789 4790A shorthand command, equivalent to specifying both @samp{call-transfer 4791@var{boolean}} and @samp{called-transfer @var{boolean}}. 4792 4793@item call-local-size @var{number} @var{string} 4794@findex call-local-size 4795 4796The @var{string} is a time string (@pxref{Time Strings}). The 4797@var{number} is the size in bytes of the largest file that should be 4798transferred at a time matching the time string, if the local system 4799placed the call and the request was made by the local system. This 4800command may appear multiple times in a single alternate. If this 4801command does not appear, or if none of the time strings match, there are 4802no size restrictions. 4803 4804With all the size control commands, the size of a file from the remote 4805system (as opposed to a file from the local system) will only be checked 4806if the other system is running this package: other UUCP packages will 4807not understand a maximum size request, nor will they provide the size of 4808remote files. 4809 4810@item call-remote-size @var{number} @var{string} 4811@findex call-remote-size 4812 4813Specify the size in bytes of the largest file that should be transferred 4814at a given time by remote request, when the local system placed the 4815call. This command may appear multiple times in a single alternate. If 4816this command does not appear, there are no size restrictions. 4817 4818@item called-local-size @var{number} @var{string} 4819@findex called-local-size 4820 4821Specify the size in bytes of the largest file that should be transferred 4822at a given time by local request, when the remote system placed the 4823call. This command may appear multiple times in a single alternate. If 4824this command does not appear, there are no size restrictions. 4825 4826@item called-remote-size @var{number} @var{string} 4827@findex called-remote-size 4828 4829Specify the size in bytes of the largest file that should be transferred 4830at a given time by remote request, when the remote system placed the 4831call. This command may appear multiple times in a single alternate. If 4832this command does not appear, there are no size restrictions. 4833 4834@item local-send @var{strings} 4835@findex local-send 4836 4837Specifies that files in the directories named by the @var{strings} may 4838be sent to the remote system when requested locally (using 4839@command{uucp} or @command{uux}). The directories in the list should be 4840separated by whitespace. A @samp{~} may be used for the public 4841directory. On a Unix system, this is typically 4842@file{/usr/spool/uucppublic}; the public directory may be set with the 4843@code{pubdir} command. Here is an example of @code{local-send}: 4844 4845@example 4846local-send ~ /usr/spool/ftp/pub 4847@end example 4848 4849Listing a directory allows all files within the directory and all 4850subdirectories to be sent. Directories may be excluded by preceding 4851them with an exclamation point. For example: 4852 4853@example 4854local-send /usr/ftp !/usr/ftp/private ~ 4855@end example 4856 4857@noindent 4858means that all files in @file{/usr/ftp} or the public directory may be 4859sent, except those files in @file{/usr/ftp/private}. The list of 4860directories is read from left to right, and the last directory to apply 4861takes effect; this means that directories should be listed from top 4862down. The default is the root directory (i.e., any file at all may be 4863sent by local request). 4864 4865@item remote-send @var{strings} 4866@findex remote-send 4867 4868Specifies that files in the named directories may be sent to the remote 4869system when requested by the remote system. The default is @samp{~}. 4870 4871@item local-receive @var{strings} 4872@findex local-receive 4873 4874Specifies that files may be received into the named directories when 4875requested by a local user. The default is @samp{~}. 4876 4877@item remote-receive @var{strings} 4878@findex remote-receive 4879 4880Specifies that files may be received into the named directories when 4881requested by the remote system. The default is @samp{~}. On Unix, the 4882remote system may only request that files be received into directories 4883that are writeable by the world, regardless of how this is set. 4884 4885@item forward-to @var{strings} 4886@findex forward-to 4887 4888Specifies a list of systems to which files may be forwarded. The remote 4889system may forward files through the local system on to any of the 4890systems in this list. The string @samp{ANY} may be used to permit 4891forwarding to any system. The default is to not permit forwarding to 4892other systems. Note that if the remote system is permitted to execute 4893the @command{uucp} command, it effectively has the ability to forward to 4894any system. 4895 4896@item forward-from @var{strings} 4897@findex forward-from 4898 4899Specifies a list of systems from which files may be forwarded. The 4900remote system may request files via the local system from any of the 4901systems in this list. The string @samp{ANY} may be used to permit 4902forwarding to any system. The default is to not permit forwarding from 4903other systems. Note that if a remote system is permitted to execute the 4904@command{uucp} command, it effectively has the ability to request files 4905from any system. 4906 4907@item forward @var{strings} 4908@findex forward 4909 4910Equivalent to specifying both @samp{forward-to @var{strings}} and 4911@samp{forward-from @var{strings}}. This would normally be used rather 4912than either of the more specific commands. 4913 4914@item max-file-time @var{number} 4915@findex max-file-time 4916 4917The maximum amount of time which will be sent sending any one file if 4918there are other files to send. This will only be effective when using a 4919protocol which permits interrupting one file send to send another file. 4920This is true of the @samp{i} and @samp{j} protocols. The default is to 4921have no maximum. 4922 4923@end table 4924 4925@node Miscellaneous (sys), Default sys File Values, File Transfer Control, sys File 4926@subsection Miscellaneous sys File Commands 4927 4928@table @code 4929 4930@item sequence @var{boolean} 4931@findex sequence 4932 4933If @var{boolean} is true, then conversation sequencing is automatically 4934used for the remote system, so that if somebody manages to spoof as the 4935remote system, it will be detected the next time the remote system 4936actually calls. This is false by default. 4937 4938@item command-path @var{strings} 4939@findex command-path 4940 4941Specifies the path (a list of whitespace separated directories) to be 4942searched to locate commands to execute. This is only used for commands 4943requested by @command{uux}, not for chat programs. The default is from 4944@file{policy.h}. 4945 4946@item commands @var{strings} 4947@findex commands 4948 4949The list of commands which the remote system is permitted to execute 4950locally. For example: @samp{commands rnews rmail}. If the value is 4951@samp{ALL} (case significant), all commands may be executed. The 4952default is @samp{rnews rmail}. 4953 4954@item free-space @var{number} 4955@findex free-space 4956 4957Specify the minimum amount of file system space (in bytes) to leave free 4958after receiving a file. If the incoming file will not fit, it will be 4959rejected. This initial rejection will only work when talking to another 4960instance of this package, since older UUCP packages do not provide the 4961file size of incoming files. Also, while a file is being received, 4962@command{uucico} will periodically check the amount of free space. If 4963it drops below the amount given by the @code{free-space} command, the 4964file transfer will be aborted. The default amount of space to leave 4965free is from @file{policy.h}. This file space checking may not work on 4966all systems. 4967 4968@item pubdir @var{string} 4969@findex pubdir in sys file 4970 4971Specifies the public directory that is used when @samp{~} is specifed in 4972a file transfer or a list of directories. This essentially overrides 4973the public directory specified in the main configuration file for this 4974system only. The default is the public directory specified in the main 4975configuration file (which defaults to a value from @file{policy.h}). 4976 4977@item debug @var{string} @dots{} 4978@findex debug in sys file 4979 4980Set additional debugging for calls to or from the system. This may be 4981used to debug a connection with a specific system. It is particularly 4982useful when debugging incoming calls, since debugging information will 4983be generated whenever the call comes in. See the @code{debug} command 4984in the main configuration file (@pxref{Debugging Levels}) for more 4985details. The debugging information specified here is in addition to 4986that specified in the main configuration file or on the command line. 4987 4988@item max-remote-debug @var{string} @dots{} 4989@findex max-remote-debug 4990 4991When the system calls in, it may request that the debugging level be set 4992to a certain value. The @code{max-remote-debug} command may be used to 4993put a limit on the debugging level which the system may request, to 4994avoid filling up the disk with debugging information. Only the 4995debugging types named in the @code{max-remote-debug} command may be 4996turned on by the remote system. To prohibit any debugging, use 4997@samp{max-remote-debug none}. 4998 4999@end table 5000 5001@node Default sys File Values, , Miscellaneous (sys), sys File 5002@subsection Default sys File Values 5003 5004The following are used as default values for all systems; they can be 5005considered as appearing before the start of the file. 5006 5007@example 5008time Never 5009chat "" \r\c ogin:-BREAK-ogin:-BREAK-ogin: \L word: \P 5010chat-timeout 10 5011callback n 5012sequence n 5013request y 5014transfer y 5015local-send / 5016remote-send ~ 5017local-receive ~ 5018remove-receive ~ 5019command-path [ from @file{policy.h} ] 5020commands rnews rmail 5021max-remote-debug abnormal,chat,handshake 5022@end example 5023 5024@node port File, dial File, sys File, Configuration Files 5025@section The Port Configuration File 5026@cindex port file 5027@cindex port configuration file 5028@cindex configuration file (port) 5029 5030The port files may be used to name and describe ports. By default there 5031is a single port file, named @file{port} in the directory 5032@var{newconfigdir}. This may be overridden by the @code{portfile} 5033command in the main configuration file; see @ref{Configuration File 5034Names}. 5035 5036Any commands in a port file before the first @code{port} command specify 5037defaults for all ports in the file; however, since the @code{type} 5038command must appear before all other commands for a port, the defaults 5039are only useful if all ports in the file are of the same type (this 5040restriction may be lifted in a later version). All commands after a 5041@code{port} command up to the next @code{port} command then describe 5042that port. There are different types of ports; each type supports its 5043own set of commands. Each command indicates which types of ports 5044support it. There may be many ports with the same name; if a system 5045requests a port by name then each port with that name will be tried 5046until an unlocked one is found. 5047 5048@table @code 5049 5050@item port @var{string} 5051@findex port in port file 5052 5053Introduces and names a port. 5054 5055@item type @var{string} 5056@findex type 5057 5058Define the type of port. The default is @samp{modem}. If this command 5059appears, it must immediately follow the @code{port} command. The type defines 5060what commands are subsequently allowed. Currently the types are: 5061 5062@table @samp 5063@item modem 5064For a modem hookup. 5065@item stdin 5066For a connection through standard input and standard output, as when 5067@command{uucico} is run as a login shell. 5068@item direct 5069For a direct connection to another system. 5070@item tcp 5071For a connection using TCP. 5072@item tli 5073For a connection using TLI. 5074@item pipe 5075For a connection through a pipe running another program. 5076@end table 5077 5078@item protocol @var{string} 5079@findex protocol in port file 5080 5081Specify a list of protocols to use for this port. This is just like the 5082corresponding command for a system (@pxref{Protocol Selection}). A 5083protocol list for a system takes precedence over a list for a port. 5084 5085@item protocol-parameter @var{character} @var{strings} [ any type ] 5086@findex protocol-parameter in port file 5087 5088The same command as the @code{protocol-parameter} command used for 5089systems (@pxref{Protocol Selection}). This one takes precedence. 5090 5091@item seven-bit @var{boolean} [ any type ] 5092@findex seven-bit in port file 5093 5094This is only used during protocol negotiation; if the argument is true, 5095it forces the selection of a protocol which works across a seven-bit 5096link. It does not prevent eight bit characters from being transmitted. 5097The default is false. 5098 5099@item reliable @var{boolean} [ any type ] 5100@findex reliable in port file 5101 5102This is only used during protocol negotiation; if the argument is 5103false, it forces the selection of a protocol which works across 5104an unreliable communication link. The default is true. It would 5105be more common to specify this for a dialer rather than a port. 5106 5107@item half-duplex @var{boolean} [ any type ] 5108@findex half-duplex in port file 5109 5110If the argument is true, it means that the port only supports 5111half-duplex connections. This only affects bidirectional protocols, and 5112causes them to not do bidirectional transfers. 5113 5114@item device @var{string} [ modem, direct and tli only ] 5115@findex device 5116 5117Names the device associated with this port. If the device is not named, 5118the port name is taken as the device. Device names are system 5119dependent. On Unix, a modem or direct connection might be something 5120like @file{/dev/ttyd0}; a TLI port might be @file{/dev/inet/tcp}. 5121 5122@itemx speed @var{number} [modem and direct only ] 5123@findex speed in port file 5124@item baud @var{number} [ modem and direct only ] 5125@findex baud in port file 5126 5127The speed this port runs at. If a system specifies a speed but no port 5128name, then all ports which match the speed will be tried in order. If 5129the speed is not specified here and is not specified by the system, the 5130natural speed of the port will be used by default. 5131 5132@itemx speed-range @var{number} @var{number} [ modem only ] 5133@findex speed-range 5134@item baud-range @var{number} @var{number} [ modem only ] 5135@findex baud-range 5136 5137Specify a range of speeds this port can run at. The first number is the 5138minimum speed, the second number is the maximum speed. These numbers 5139will be used when matching a system which specifies a desired speed. 5140The simple @code{speed} (or @code{baud}) command is still used to 5141determine the speed to run at if the system does not specify a speed. 5142For example, the command @samp{speed-range 300 19200} means that the 5143port will match any system which uses a speed from 300 to 19200 baud 5144(and will use the speed specified by the system); this could be combined 5145with @samp{speed 2400}, which means that when this port is used with a 5146system that does not specify a speed, the port will be used at 2400 5147baud. 5148 5149@item carrier @var{boolean} [ modem and direct only ] 5150@findex carrier in port file 5151 5152The argument indicates whether the port supports carrier. 5153 5154If a modem port does not support carrier, the carrier detect signal will 5155never be required on this port, regardless of what the modem chat script 5156indicates. The default for a modem port is true. 5157 5158If a direct port supports carrier, the port will be set to expect 5159carrier whenever it is used. The default for a direct port is false. 5160 5161@item hardflow @var{boolean} [ modem and direct only ] 5162@findex hardflow 5163 5164The argument indicates whether the port supports hardware flow control. 5165If it does not, hardware flow control will not be turned on for this 5166port. The default is true. Hardware flow control is only supported on 5167some systems. 5168 5169@item dial-device @var{string} [ modem only ] 5170@findex dial-device 5171 5172Dialing instructions should be output to the named device, rather than 5173to the normal port device. The default is to output to the normal port 5174device. 5175 5176@item dialer @var{string} [ modem only ] 5177@findex dialer in port file 5178 5179Name a dialer to use. The information is looked up in the dial file. 5180There is no default. Some sort of dialer information must be specified 5181to call out on a modem. 5182 5183@item dialer @var{string} @dots{} [ modem only ] 5184 5185If more than one string follows the @code{dialer} command, the strings 5186are treated as a command that might appear in the dial file (@pxref{dial 5187File}). If a dialer is named (by using the first form of this command, 5188described just above), these commands are ignored. They may be used to 5189specify dialer information directly in simple situations without needing 5190to go to a separate file. There is no default. Some sort of dialer 5191information must be specified to call out on a modem. 5192 5193@item dialer-sequence @var{strings} [ modem or tcp or tli only ] 5194@findex dialer-sequence 5195 5196Name a sequence of dialers and tokens (phone numbers) to use. The first 5197argument names a dialer, and the second argument names a token. The 5198third argument names another dialer, and so on. If there are an odd 5199number of arguments, the phone number specified with a @code{phone} 5200command in the system file is used as the final token. The token is 5201what is used for @kbd{\D} or @kbd{\T} in the dialer chat script. If the 5202token in this string is @kbd{\D}, the system phone number will be used; 5203if it is @kbd{\T}, the system phone number will be used after undergoing 5204dialcodes translation. A missing final token is taken as @kbd{\D}. 5205 5206This command currently does not work if @code{dial-device} is specified; 5207to handle this correctly will require a more systematic notion of chat 5208scripts. Moreover, the @code{complete} and @code{abort} chat scripts, 5209the protocol parameters, and the @code{carrier} and @code{dtr-toggle} 5210commands are ignored for all but the first dialer. 5211 5212This command basically lets you specify a sequence of chat scripts to 5213use. For example, the first dialer might get you to a local network and 5214the second dialer might describe how to select a machine from the local 5215network. This lets you break your dialing sequence into simple modules, 5216and may make it easier to share dialer entries between machines. 5217 5218This command is to only way to use a chat script with a TCP port. This 5219can be useful when using a modem which is accessed via TCP. 5220 5221When this command is used with a TLI port, then if the first dialer is 5222@samp{TLI} or @samp{TLIS} the first token is used as the address to 5223connect to. If the first dialer is something else, or if there is no 5224token, the address given by the @code{address} command is used 5225(@pxref{Placing the Call}). Escape sequences in the address are 5226expanded as they are for chat script expect strings (@pxref{Chat 5227Scripts}). The different between @samp{TLI} and @samp{TLIS} is that the 5228latter implies the command @samp{stream true}. These contortions are 5229all for HDB compatibility. Any subsequent dialers are treated as they 5230are for a TCP port. 5231 5232@item lockname @var{string} [ modem and direct only ] 5233@findex lockname 5234 5235Give the name to use when locking this port. On Unix, this is the name 5236of the file that will be created in the lock directory. It is used as 5237is, so on Unix it should generally start with @samp{LCK..}. For 5238example, if a single port were named both @file{/dev/ttycu0} and 5239@file{/dev/tty0} (perhaps with different characteristics keyed on the 5240minor device number), then the command @code{lockname LCK..ttycu0} could 5241be used to force the latter to use the same lock file name as the 5242former. 5243 5244@item service @var{string} [ tcp only ] 5245@findex service 5246 5247Name the TCP port number to use. This may be a number. If not, it will 5248be looked up in @file{/etc/services}. If this is not specified, the 5249string @samp{uucp} is looked up in @file{/etc/services}. If it is not 5250found, port number 540 (the standard UUCP-over-TCP port number) will be 5251used. 5252 5253@item version @var{string} [ tcp only ] 5254@findex version 5255 5256Specify the IP version number to use. The default is @samp{0}, which 5257permits any version. The other possible choices are @samp{4}, which 5258requires @samp{IPv4}, or @samp{6}, which requires @samp{IPv6}. Normally 5259it is not necessary to use this command, but in some cases, as 5260@samp{IPv6} is rolled out across the Internet, it may be necessary to 5261require UUCP to use a particular type of connection. 5262 5263@item push @var{strings} [ tli only ] 5264@findex push 5265 5266Give a list of modules to push on to the TLI stream. 5267 5268@item stream @var{boolean} [ tli only ] 5269@findex stream 5270 5271If this is true, and the @code{push} command was not used, the 5272@samp{tirdwr} module is pushed on to the TLI stream. 5273 5274@item server-address @var{string} [ tli only ] 5275@findex server-address 5276 5277Give the address to use when running as a TLI server. Escape sequences 5278in the address are expanded as they are for chat script expect strings 5279(@pxref{Chat Scripts}). 5280 5281The string is passed directly to the TLI @code{t_bind} function. The 5282value needed may depend upon your particular TLI implementation. Check 5283the manual pages, and, if necessary, try writing some sample programs. 5284 5285For AT&T 3B2 System V Release 3 using the Wollongong TCP/IP stack, which 5286is probably typical, the format of TLI string is @samp{SSPPIIII}, where 5287@samp{SS} is the service number (for TCP, this is 2), @samp{PP} is the 5288TCP port number, and @samp{IIII} is the Internet address. For example, 5289to accept a connection from on port 540 from any interface, use 5290@samp{server-address \x00\x02\x02\x1c\x00\x00\x00\x00}. To only accept 5291connections from a particular interface, replace the last four digits 5292with the network address of the interface. (Thanks to Paul Pryor for 5293the information in this paragraph). 5294 5295@item command @var{strings} [ pipe only ] 5296@findex command 5297 5298Give the command, with arguments, to run when using a pipe port type. 5299When a port of this type is used, the command is executed and 5300@command{uucico} communicates with it over a pipe. This permits 5301@command{uucico} or @command{cu} to communicate with another system 5302which can only be reached through some unusual means. A sample use 5303might be @samp{command /bin/rlogin -E -8 -l @var{login} @var{system}}. 5304The command is run with the full privileges of UUCP; it is responsible 5305for maintaining security. 5306 5307@end table 5308 5309@node dial File, UUCP Over TCP, port File, Configuration Files 5310@section The Dialer Configuration File 5311@cindex dial file 5312@cindex dialer configuration file 5313@cindex configuration file (dial) 5314 5315The dialer configuration files define dialers. By default there is a 5316single dialer file, named @file{dial} in the directory 5317@var{newconfigdir}. This may be overridden by the @code{dialfile} 5318command in the main configuration file; see @ref{Configuration File 5319Names}. 5320 5321Any commands in the file before the first @code{dialer} command specify 5322defaults for all the dialers in the file. All commands after a 5323@code{dialer} command up to the next @code{dialer} command are 5324associated with the named dialer. 5325 5326@table @code 5327 5328@item dialer @var{string} 5329@findex dialer in dial file 5330 5331Introduces and names a dialer. 5332 5333@item chat @var{strings} 5334@findex chat in dial file 5335@item chat-timeout @var{number} 5336@findex chat-timeout in dial file 5337@item chat-fail @var{string} 5338@findex chat-fail in dial file 5339@item chat-seven-bit @var{boolean} 5340@findex chat-seven-bit in dial file 5341@item chat-program @var{strings} 5342@findex chat-program in dial file 5343 5344Specify a chat script to be used to dial the phone. This chat script is 5345used before the login chat script in the @file{sys} file, if any 5346(@pxref{Logging In}). For full details on chat scripts, see @ref{Chat 5347Scripts}. 5348 5349The @command{uucico} daemon will sleep for one second between attempts 5350to dial out on a modem. If your modem requires a longer wait period, 5351you must start your chat script with delays (@samp{\d} in a send 5352string). 5353 5354The chat script will be read from and sent to the port specified by the 5355@code{dial-device} command for the port, if there is one. 5356 5357The following escape addition escape sequences may appear in send 5358strings: 5359 5360@table @kbd 5361@item \D 5362send phone number without dialcode translation 5363@item \T 5364send phone number with dialcode translation 5365@end table 5366 5367See the description of the dialcodes file (@pxref{Configuration File 5368Names}) for a description of dialcode translation. 5369 5370If both the port and the dialer support carrier, as set by the 5371@code{carrier} command in the port file and the @code{carrier} command 5372in the dialer file, then every chat script implicitly begins with 5373@kbd{\M} and ends with @kbd{\m}. 5374 5375There is no default chat script for dialers. 5376 5377The following additional escape sequences may be used in 5378@code{chat-program}: 5379 5380@table @kbd 5381@item \D 5382phone number without dialcode translation 5383@item \T 5384phone number with dialcode translation 5385@end table 5386 5387If the program changes the port in any way (e.g., sets parity) the 5388changes will be preserved during protocol negotiation, but once the 5389protocol is selected it will change the port settings. 5390 5391@item dialtone @var{string} 5392@findex dialtone 5393 5394A string to output when dialing the phone number which causes the modem 5395to wait for a secondary dial tone. This is used to translate the 5396@kbd{=} character in a phone number. The default is a comma. 5397 5398@item pause @var{string} 5399@findex pause 5400 5401A string to output when dialing the phone number which causes the modem 5402to wait for 1 second. This is used to translate the @kbd{-} character 5403in a phone number. The default is a comma. 5404 5405@item carrier @var{boolean} 5406@findex carrier in dial file 5407 5408An argument of true means that the dialer supports the modem carrier 5409signal. After the phone number is dialed, @command{uucico} will require 5410that carrier be on. One some systems, it will be able to wait for it. 5411If the argument is false, carrier will not be required. The default is 5412true. 5413 5414@item carrier-wait @var{number} 5415@findex carrier-wait 5416 5417If the port is supposed to wait for carrier, this may be used to 5418indicate how many seconds to wait. The default is 60 seconds. Only 5419some systems support waiting for carrier. 5420 5421@item dtr-toggle @var{boolean} @var{boolean} 5422@findex dtr-toggle 5423 5424If the first argument is true, then DTR is toggled before using 5425the modem. This is only supported on some systems and some ports. The 5426second @var{boolean} need not be present; if it is, and it is 5427true, the program will sleep for 1 second after toggling DTR. 5428The default is to not toggle DTR. 5429 5430@need 500 5431@item complete-chat @var{strings} 5432@findex complete-chat 5433@item complete-chat-timeout @var{number} 5434@findex complete-chat-timeout 5435@item complete-chat-fail @var{string} 5436@findex complete-chat-fail 5437@item complete-chat-seven-bit @var{boolean} 5438@findex complete-chat-seven-bit 5439@item complete-chat-program @var{strings} 5440@findex complete-chat-program 5441 5442These commands define a chat script (@pxref{Chat Scripts}) which is run 5443when a call is finished normally. This allows the modem to be reset. 5444There is no default. No additional escape sequences may be used. 5445 5446@item complete @var{string} 5447@findex complete 5448 5449This is a simple use of @code{complete-chat}. It is equivalent to 5450@code{complete-chat "" @var{string}}; this has the effect of sending 5451@var{string} to the modem when a call finishes normally. 5452 5453@item abort-chat @var{strings} 5454@findex abort-chat 5455@item abort-chat-timeout @var{number} 5456@findex abort-chat-timeout 5457@item abort-chat-fail @var{string} 5458@findex abort-chat-fail 5459@item abort-chat-seven-bit @var{boolean} 5460@findex abort-chat-seven-bit 5461@item abort-chat-program @var{strings} 5462@findex abort-chat-program 5463 5464These commands define a chat script (@pxref{Chat Scripts}) to be run 5465when a call is aborted. They may be used to interrupt and reset the 5466modem. There is no default. No additional escape sequences may be 5467used. 5468 5469@item abort @var{string} 5470@findex abort 5471 5472This is a simple use of @code{abort-chat}. It is equivalent to 5473@code{abort-chat "" @var{string}}; this has the effect of sending 5474@var{string} to the modem when a call is aborted. 5475 5476@item protocol-parameter @var{character} @var{strings} 5477@findex protocol-parameter in dial file 5478 5479Set protocol parameters, just like the @code{protocol-parameter} command 5480in the system configuration file or the port configuration file; see 5481@ref{Protocol Selection}. These parameters take precedence, then those 5482for the port, then those for the system. 5483 5484@item seven-bit @var{boolean} 5485@findex seven-bit in dial file 5486 5487This is only used during protocol negotiation; if it is true, it 5488forces selection of a protocol which works across a seven-bit link. It 5489does not prevent eight bit characters from being transmitted. The 5490default is false. It would be more common to specify this for a 5491port than for a dialer. 5492 5493@item reliable @var{boolean} 5494@findex reliable in dial file 5495 5496This is only used during protocol negotiation; if it is false, it 5497forces selection of a protocol which works across an unreliable 5498communication link. The default is true. 5499 5500@item half-duplex @var{boolean} [ any type ] 5501@findex half-duplex in dial file 5502 5503If the argument is true, it means that the dialer only supports 5504half-duplex connections. This only affects bidirectional protocols, and 5505causes them to not do bidirectional transfers. 5506 5507@end table 5508 5509@node UUCP Over TCP, Security, dial File, Configuration Files 5510@section UUCP Over TCP 5511 5512If your system has a Berkeley style socket library, or a System V style 5513TLI interface library, you can compile the code to permit making 5514connections over TCP. Specifying that a system should be reached via 5515TCP is easy, but nonobvious. 5516 5517@menu 5518* TCP Client:: Connecting to Another System Over TCP 5519* TCP Server:: Running a TCP Server 5520@end menu 5521 5522@node TCP Client, TCP Server, UUCP Over TCP, UUCP Over TCP 5523@subsection Connecting to Another System Over TCP 5524 5525If you are using the new style configuration files (@pxref{Configuration 5526Files}), add the line @samp{port type tcp} to the entry in the 5527@file{sys} file. By default UUCP will get the port number by looking up 5528@samp{uucp} in @file{/etc/services}; if the @samp{uucp} service is not 5529defined, port 540 will be used. You can set the port number to use with 5530the command @samp{port service @var{xxx}}, where @var{xxx} can be either 5531a number or a name to look up in @file{/etc/services}. You can specify 5532the address of the remote host with @samp{address @var{a.b.c}}; if you 5533don't give an address, the remote system name will be used. You should 5534give an explicit chat script for the system when you use TCP; the 5535default chat script begins with a carriage return, which will not work 5536with some UUCP TCP servers. 5537 5538If you are using V2 configuration files, add a line like this to 5539@file{L.sys}: 5540@example 5541@var{sys} Any TCP uucp @var{host}.@var{domain} chat-script 5542@end example 5543This will make an entry for system @var{sys}, to be called at any time, 5544over TCP, using port number @samp{uucp} (as found in 5545@file{/etc/services}; this may be specified as a number), using remote 5546host @file{@var{host}.@var{domain}}, with some chat script. 5547 5548If you are using HDB configuration files, add a line like this to 5549Systems: 5550@example 5551@var{sys} Any TCP - @var{host}.@var{domain} chat-script 5552@end example 5553and a line like this to @file{Devices}: 5554@example 5555TCP uucp - - 5556@end example 5557You only need one line in @file{Devices} regardless of how many systems 5558you contact over TCP. This will make an entry for system @var{sys}, to 5559be called at any time, over TCP, using port number @samp{uucp} (as found 5560in @file{/etc/services}; this may be specified as a number), using 5561remote host @file{@var{host}.@var{domain}}, with some chat script. 5562 5563@node TCP Server, , TCP Client, UUCP Over TCP 5564@subsection Running a TCP Server 5565 5566The @command{uucico} daemon may be run as a TCP server. To use the 5567default port number, which is a reserved port, @command{uucico} must be 5568invoked by the superuser (or it must be set user ID to the superuser, 5569but I don't recommend doing that). 5570 5571You must define a port, either using the port file (@pxref{port File}), 5572if you are using the new configuration method, or with an entry in 5573@file{Devices} if you are using HDB; there is no way to define a port 5574using V2. If you are using HDB the port must be named @samp{TCP}; a 5575line as shown above will suffice. You can then start @command{uucico} 5576as @samp{uucico -p TCP} (after the @option{-p}, name the port; in HDB it 5577must be @samp{TCP}). This will wait for incoming connections, and fork 5578off a child for each one. Each connection will be prompted with 5579@samp{login:} and @samp{Password:}; the results will be checked against 5580the UUCP (not the system) password file (@pxref{Configuration File 5581Names}). 5582 5583Another way to run a UUCP TCP server is to use the BSD @command{uucpd} 5584program. 5585 5586Yet another way to run a UUCP TCP server is to use @command{inetd}. 5587Arrange for @command{inetd} to start up @command{uucico} with the @option{-l} 5588switch. This will cause @command{uucico} to prompt with @samp{login:} and 5589@samp{Password:} and check the results against the UUCP (not the system) 5590password file (you may want to also use the @option{-D} switch to avoid a 5591fork, which in this case is unnecessary). 5592 5593@node Security, , UUCP Over TCP, Configuration Files 5594@section Security 5595 5596This discussion of UUCP security applies only to Unix. It is a bit 5597cursory; suggestions for improvement are solicited. 5598 5599UUCP is traditionally not very secure. Taylor UUCP addresses some 5600security issues, but is still far from being a secure system. 5601 5602If security is very important to you, then you should not permit any 5603external access to your computer, including UUCP. Any opening to the 5604outside world is a potential security risk. 5605 5606When local users use UUCP to transfer files, Taylor UUCP can do little 5607to secure them from each other. You can allow somewhat increased 5608security by putting the owner of the UUCP programs (normally 5609@code{uucp}) into a separate group; the use of this is explained in the 5610following paragraphs, which refer to this separate group as 5611@code{uucp-group}. 5612 5613When the @command{uucp} program is invoked to copy a file to a remote 5614system, it will, by default, copy the file into the UUCP spool 5615directory. When the @command{uux} program is used, the @option{-C} switch 5616must be used to copy the file into the UUCP spool directory. In any 5617case, once the file has been copied into the spool directory, other 5618local users will not be able to access it. 5619 5620When a file is requested from a remote system, UUCP will only permit it 5621to be placed in a directory which is writable by the requesting user. 5622The directory must also be writable by UUCP. A local user can create a 5623directory with a group of @code{uucp-group} and set the mode to permit 5624group write access. This will allow the file be requested without 5625permitting it to be viewed by any other user. 5626 5627There is no provision for security for @command{uucp} requests (as 5628opposed to @command{uux} requests) made by a user on a remote system. A 5629file sent over by a remote request may only be placed in a directory 5630which is world writable, and the file will be world readable and 5631writable. This will permit any local user to destroy or replace the 5632contents of the file. A file requested by a remote system must be world 5633readable, and the directory it is in must be world readable. Any local 5634user will be able to examine, although not necessarily modify, the file 5635before it is sent. 5636 5637There are some security holes and race conditions that apply to the 5638above discussion which I will not elaborate on. They are not hidden 5639from anybody who reads the source code, but they are somewhat technical 5640and difficult (though scarcely impossible) to exploit. Suffice it to 5641say that even under the best of conditions UUCP is not completely 5642secure. 5643 5644For many sites, security from remote sites is a more important 5645consideration. Fortunately, Taylor UUCP does provide some support in 5646this area. 5647 5648The greatest security is provided by always dialing out to the other 5649site. This prevents anybody from pretending to be the other site. Of 5650course, only one side of the connection can do this. 5651 5652If remote dialins must be permitted, then it is best if the dialin line 5653is used only for UUCP. If this is the case, then you should create a 5654call-in password file (@pxref{Configuration File Names}) and let 5655@command{uucico} do its own login prompting. For example, to let remote 5656sites log in on a port named @samp{entry} in the port file (@pxref{port 5657File}), you might invoke @samp{uucico -e -p entry}. This would cause 5658@command{uucico} to enter an endless loop of login prompts and daemon 5659executions. The advantage of this approach is that even if remote users 5660break into the system by guessing or learning the password, they will 5661only be able to do whatever @command{uucico} permits them to do. They will 5662not be able to start a shell on your system. 5663 5664If remote users can dial in and log on to your system, then you have a 5665security hazard more serious than that posed by UUCP. But then, you 5666probably knew that already. 5667 5668Once your system has connected with the remote UUCP, there is a fair 5669amount of control you can exercise. You can use the @code{remote-send} 5670and @code{remote-receive} commands to control the directories the remote 5671UUCP can access. You can use the @code{request} command to prevent the 5672remote UUCP from making any requests of your system at all; however, if 5673you do this it will not even be able to send you mail or news. If you 5674do permit remote requests, you should be careful to restrict what 5675commands may be executed at the remote system's request. The default is 5676@command{rmail} and @command{rnews}, which will suffice for most 5677systems. 5678 5679If different remote systems call in and they must be granted different 5680privileges (perhaps some systems are within the same organization and 5681some are not) then the @code{called-login} command should be used for 5682each system to require that they use different login names. Otherwise, 5683it would be simple for a remote system to use the @code{myname} command 5684and pretend to be a different system. The @code{sequence} command can 5685be used to detect when one system pretended to be another, but, since 5686the sequence numbers must be reset manually after a failed handshake, 5687this can sometimes be more trouble than it's worth. 5688 5689@c START-OF-FAQ 5690@ignore 5691This chapter is used to generate the comp.mail.uucp UUCP Internals FAQ, 5692as well as being part of the Taylor UUCP manual. Text that should 5693appear only in the manual is bracketed by ifclear faq. Text that should 5694appear only in the FAQ is bracketed by ifset faq. 5695@end ignore 5696 5697@ifset faq 5698@paragraphindent asis 5699@format 5700Subject: UUCP Internals Frequently Asked Questions 5701Newsgroups: comp.mail.uucp,comp.answers,news.answers 5702Followup-To: comp.mail.uucp 5703Reply-To: ian@@airs.com (Ian Lance Taylor) 5704Keywords: UUCP, protocol, FAQ 5705Approved: news-answers-request@@MIT.Edu 5706 5707Archive-name: uucp-internals 5708Version: $Revision: 1.132 $ 5709Last-modified: $Date: 2002/03/07 05:56:27 $ 5710@end format 5711@end ifset 5712 5713@node Protocols, Hacking, Configuration Files, Top 5714@chapter UUCP Protocol Internals 5715 5716@ifclear faq 5717This chapter describes how the various UUCP protocols work, and 5718discusses some other internal UUCP issues. 5719 5720This chapter is quite technical. You do not need to understand it, or 5721even read it, in order to use Taylor UUCP. It is intended for people 5722who are interested in how the UUCP code works. 5723 5724The information in this chapter is posted monthly to the Usenet 5725newsgroups @samp{comp.mail.uucp}, @samp{news.answers}, and 5726@samp{comp.answers}. The posting is available from any 5727@samp{news.answers} archive site, such as @samp{rtfm.mit.edu}. If you 5728plan to use this information to write a UUCP program, please make sure 5729you get the most recent version of the posting, in case there have been 5730any corrections. 5731@end ifclear 5732 5733@ifset faq 5734Recent changes: 5735@itemize @bullet 5736@item Conversion to Texinfo format. 5737@item Description of the @samp{E} command. 5738@item Description of optional number following @samp{-N} and @samp{ROKN} 5739in UUCP protocol startup. 5740@item Detailed description of the @samp{y} protocol. 5741@item Mention the name uuxqt uses for lock files. 5742@end itemize 5743 5744This article was written by Ian Lance Taylor @samp{<ian@@airs.com>} and 5745I may even update it periodically. Please send me mail about 5746suggestions or inaccuracies. 5747 5748This article describes how the various UUCP protocols work, and 5749discusses some other internal UUCP issues. It does not describe how to 5750configure UUCP, nor how to solve UUCP connection problems, nor how to 5751deal with UUCP mail. I do not know of any FAQ postings on these topics. 5752There are some documents on the net describing UUCP configuration, but I 5753can not keep an up to date list here; try using archie. 5754 5755If you haven't read the @samp{news.announce.newusers} articles, read 5756them. 5757 5758This article is in digest format. Some newsreaders will be able to 5759break it apart into separate articles. Please don't ask me how to do 5760this, though. 5761 5762This article covers the following topics. If questions about one of 5763these topics is posted to @samp{comp.mail.uucp}, please send mail to the 5764poster referring her or him to this FAQ. There is no reason to post a 5765followup, as most of us know the answer already. 5766@end ifset 5767 5768@menu 5769* UUCP Protocol Sources:: Sources for UUCP Protocol Information 5770* UUCP Grades:: UUCP Grades 5771* UUCP Lock Files:: UUCP Lock Files 5772* Execution File Format:: Execution File Format 5773* UUCP Protocol:: UUCP Protocol 5774* g Protocol:: g protocol 5775* f Protocol:: f protocol 5776* t Protocol:: t protocol 5777* e Protocol:: e protocol 5778* Big G Protocol:: G protocol 5779* i Protocol:: i protocol 5780* j Protocol:: j protocol 5781* x Protocol:: x protocol 5782* y Protocol:: y protocol 5783* d Protocol:: d protocol 5784* h Protocol:: h protocol 5785* v Protocol:: v protocol 5786@end menu 5787 5788@ifset faq 5789@format 5790UUCP Protocol Sources 5791Alarm in Debugging Output 5792UUCP Grades 5793UUCP Lock Files 5794Execution File Format 5795UUCP Protocol 5796UUCP @samp{g} Protocol 5797UUCP @samp{f} Protocol 5798UUCP @samp{t} Protocol 5799UUCP @samp{e} Protocol 5800UUCP @samp{G} Protocol 5801UUCP @samp{i} Protocol 5802UUCP @samp{j} Protocol 5803UUCP @samp{x} Protocol 5804UUCP @samp{y} Protocol 5805UUCP @samp{d} Protocol 5806UUCP @samp{h} Protocol 5807UUCP @samp{v} Protocol 5808Thanks 5809 5810---------------------------------------------------------------------- 5811 5812From: UUCP Protocol Sources 5813Subject: UUCP Protocol Sources 5814 5815@end format 5816@end ifset 5817 5818@node UUCP Protocol Sources, UUCP Grades, Protocols, Protocols 5819@section UUCP Protocol Sources 5820 5821@quotation 5822``Unix-to-Unix Copy Program,'' said PDP-1. ``You will never find a more 5823wretched hive of bugs and flamers. We must be cautious.'' 5824@flushright 5825---DECWars 5826@end flushright 5827@end quotation 5828 5829I took a lot of the information from Jamie E. Hanrahan's paper in the 5830Fall 1990 DECUS Symposium, and from @cite{Managing UUCP and Usenet} by Tim 5831O'Reilly and Grace Todino (with contributions by several other 5832people). The latter includes most of the former, and is published by 5833@example 5834O'Reilly & Associates, Inc. 5835103 Morris Street, Suite A 5836Sebastopol, CA 95472 5837@end example 5838It is currently in its tenth edition. The ISBN number is 5839@samp{0-937175-93-5}. 5840 5841Some information is originally due to a Usenet article by Chuck Wegrzyn. 5842The information on execution files comes partially from Peter Honeyman. 5843The information on the @samp{g} protocol comes partially from a paper by 5844G.L.@: Chesson of Bell Laboratories, partially from Jamie E. Hanrahan's 5845paper, and partially from source code by John Gilmore. The information 5846on the @samp{f} protocol comes from the source code by Piet Berteema. 5847The information on the @samp{t} protocol comes from the source code by 5848Rick Adams. The information on the @samp{e} protocol comes from a 5849Usenet article by Matthias Urlichs. The information on the @samp{d} 5850protocol comes from Jonathan Clark, who also supplied information about 5851QFT. The UUPlus information comes straight from Christopher J. Ambler, 5852of UUPlus Development; it applies to version 1.52 and up of the 5853shareware version of UUPlus Utilities, called FSUUCP 1.52, but referred 5854to in this article as UUPlus. 5855 5856Although there are few books about UUCP, there are many about networks 5857and protocols in general. I recommend two non-technical books which 5858describe the sorts of things that are available on the network: 5859@cite{The Whole Internet}, by Ed Krol, and @cite{Zen and the Art of the 5860Internet}, by Brendan P. Kehoe. Good technical discussions of 5861networking issues can be found in @cite{Internetworking with TCP/IP}, by 5862Douglas E. Comer and David L. Stevens and in @cite{Design and Validation 5863of Computer Protocols} by Gerard J. Holzmann. 5864 5865@ifset faq 5866@c Note that this section is only in the FAQ, since it does not fit in 5867@c here in the manual. 5868@format 5869------------------------------ 5870 5871From: Alarm in Debugging Output 5872Subject: Alarm in Debugging Output 5873 5874Alarm in Debugging Output 5875========================= 5876@end format 5877 5878The debugging output of many versions of UUCP will include messages like 5879@samp{alarm 1} or @samp{pkcget: alarm 1}. Taylor UUCP does not use the 5880word @samp{alarm}, but will instead log messages like @samp{Timed out 5881waiting for packet}. 5882 5883These types of messages mean that the UUCP package has timed out while 5884waiting for some sort of response from the remote system. If it happens 5885consistently when trying to transfer a particular file, then the most 5886likely problem is that one of the modems will not transmit the XON or 5887XOFF characters. Several UUCP protocols require an eight bit clean 5888connection, which means that the modems must treat XON or XOFF as normal 5889data characters, not as flow control signals. This should always be 5890checked first. 5891 5892Other possible problems are that the modems have simply dropped their 5893connection, or perhaps on one side or the other the serial buffer is 5894overflowing and dropping characters. Another possibility is that the 5895UUCP packages disagree about some aspect of the UUCP protocol, which is 5896uncommon but does happen occasionally. 5897 5898Using the information in the following sections, you should be able to 5899figure out what type of data your UUCP was expecting to receive. This 5900may give some indication as to exactly what the problem is. It is 5901difficult to be more specific, since there are many possiblities. 5902 5903@format 5904------------------------------ 5905 5906From: UUCP Grades 5907Subject: UUCP Grades 5908@end format 5909@end ifset 5910 5911@node UUCP Grades, UUCP Lock Files, UUCP Protocol Sources, Protocols 5912@section UUCP Grades 5913@cindex grades implementation 5914 5915Modern UUCP packages support a priority grade for each command. The 5916grades generally range from @kbd{A} (the highest) to @kbd{Z} followed by 5917@kbd{a} to @kbd{z}. Some UUCP packages (including Taylor UUCP) also 5918support @kbd{0} to @kbd{9} before @kbd{A}. Some UUCP packages may 5919permit any ASCII character as a grade. 5920 5921On Unix, these grades are encoded in the name of the command file 5922created by @command{uucp} or @command{uux}. A command file name 5923generally has the form @file{C.nnnngssss} where @samp{nnnn} is the 5924remote system name for which the command is queued, @samp{g} is a single 5925character grade, and @samp{ssss} is a four character sequence number. 5926For example, a command file created for the system @samp{airs} at grade 5927@samp{Z} might be named @file{C.airsZ2551}. 5928 5929The remote system name will be truncated to seven characters, to 5930ensure that the command file name will fit in the 14 character file 5931name limit of the traditional Unix file system. UUCP packages which 5932have no other means of distinguishing which command files are intended 5933for which systems thus require all systems they connect to to have 5934names that are unique in the first seven characters. Some UUCP 5935packages use a variant of this format which truncates the system name 5936to six characters. HDB and Taylor UUCP use a different spool 5937directory format, which allows up to fourteen characters to be used 5938for each system name. 5939 5940The sequence number in the command file name may be a decimal integer, 5941or it may be a hexadecimal integer, or it may contain any alphanumeric 5942character. Different UUCP packages are different. 5943@ifclear faq 5944Taylor UUCP uses any alphanumeric character. 5945@end ifclear 5946 5947UUPlus Utilities (as FSUUCP, a shareware DOS based UUCP and news 5948package) uses up to 8 characters for file names in the spool (this is a 5949DOS file system limitation; actually, with the extension, 11 characters 5950are available, but FSUUCP reserves that for future use). FSUUCP 5951defaults mail to grade @samp{D}, and news to grade @samp{N}, except that 5952when the grade of incoming mail can be determined, that grade is 5953preserved if the mail is forwarded to another system. The default grades 5954may be changed by editing the @file{LIB/MAILRC} file for mail, or the 5955@file{UUPLUS.CFG} file for news. 5956 5957UUPC/extended for DOS, OS/2 and Windows NT handles mail at grade 5958@samp{C}, news at grade @samp{d}, and file transfers at grade @samp{n}. 5959The UUPC/extended @command{UUCP} and @command{RMAIL} commands accept 5960grades to override the default, the others do not. 5961 5962I do not know how command grades are handled in other non-Unix UUCP 5963packages. 5964 5965Modern UUCP packages allow you to restrict file transfer by grade 5966depending on the time of day. Typically this is done with a line in 5967the @file{Systems} (or @file{L.sys}) file like this: 5968@example 5969 airs Any/Z,Any2305-0855 ... 5970@end example 5971This allows grades @samp{Z} and above to be transferred at any time. 5972Lower grades may only be transferred at night. I believe that this 5973grade restriction applies to local commands as well as to remote 5974commands, but I am not sure. It may only apply if the UUCP package 5975places the call, not if it is called by the remote system. 5976 5977Taylor UUCP can use the @code{timegrade} and @code{call-timegrade} 5978commands to achieve the same effect. 5979@ifclear faq 5980@xref{When to Call}. 5981@end ifclear 5982It supports the above format when reading @file{Systems} or 5983@file{L.sys}. 5984 5985UUPC/extended provides the @code{symmetricgrades} option to announce the 5986current grade in effect when calling the remote system. 5987 5988UUPlus allows specification of the highest grade accepted on a per-call 5989basis with the @option{-g} option in @command{UUCICO}. 5990 5991This sort of grade restriction is most useful if you know what grades 5992are being used at the remote site. The default grades used depend on 5993the UUCP package. Generally @command{uucp} and @command{uux} have 5994different defaults. A particular grade can be specified with the 5995@option{-g} option to @command{uucp} or @command{uux}. For example, to 5996request execution of @command{rnews} on @samp{airs} with grade @samp{d}, 5997you might use something like 5998@example 5999 uux -gd - airs!rnews < article 6000@end example 6001 6002Uunet queues up mail at grade @samp{C}, but increases the grade based on 6003the size. News is queued at grade @samp{d}, and file transfers at grade 6004@samp{n}. The example above would allow mail (below some large size) to 6005be received at any time, but would only permit news to be transferred at 6006night. 6007 6008@ifset faq 6009@format 6010------------------------------ 6011 6012From: UUCP Lock Files 6013Subject: UUCP Lock Files 6014@end format 6015@end ifset 6016 6017@node UUCP Lock Files, Execution File Format, UUCP Grades, Protocols 6018@section UUCP Lock Files 6019@cindex lock files 6020 6021This discussion applies only to Unix. I have no idea how UUCP locks 6022ports on other systems. 6023 6024UUCP creates files to lock serial ports and systems. On most, if not 6025all, systems, these same lock files are also used by @command{cu} to 6026coordinate access to serial ports. On some systems @command{getty} also 6027uses these lock files, often under the name @command{uugetty}. 6028 6029The lock file normally contains the process ID of the locking process. 6030This makes it easy to determine whether a lock is still valid. The 6031algorithm is to create a temporary file and then link it to the name 6032that must be locked. If the link fails because a file with that name 6033already exists, the existing file is read to get the process ID. If the 6034process still exists, the lock attempt fails. Otherwise the lock file 6035is deleted and the locking algorithm is retried. 6036 6037Older UUCP packages put the lock files in the main UUCP spool directory, 6038@file{/usr/spool/uucp}. HDB UUCP generally puts the lock files in a 6039directory of their own, usually @file{/usr/spool/locks} or 6040@file{/etc/locks}. 6041 6042The original UUCP lock file format encodes the process ID as a four byte 6043binary number. The order of the bytes is host-dependent. HDB UUCP 6044stores the process ID as a ten byte ASCII decimal number, with a 6045trailing newline. For example, if process 1570 holds a lock file, it 6046would contain the eleven characters space, space, space, space, space, 6047space, one, five, seven, zero, newline. Some versions of UUCP add a 6048second line indicating which program created the lock (@command{uucp}, 6049@command{cu}, or @command{getty/uugetty}). I have also seen a third 6050type of UUCP lock file which does not contain the process ID at all. 6051 6052The name of the lock file is traditionally @file{LCK..} followed by the 6053base name of the device. For example, to lock @file{/dev/ttyd0} the 6054file @file{LCK..ttyd0} would be created. On SCO Unix, the last letter 6055of the lock file name is always forced to lower case even if the device 6056name ends with an upper case letter. 6057 6058System V Release 4 UUCP names the lock file using the major and minor 6059device numbers rather than the device name. The file is named 6060@file{LK.@var{XXX}.@var{YYY}.@var{ZZZ}}, where @var{XXX}, @var{YYY} and 6061@var{ZZZ} are all three digit decimal numbers. @var{XXX} is the major 6062device number of the device holding the directory holding the device 6063file (e.g., @file{/dev}). @var{YYY} is the major device number of the 6064device file itself. @var{ZZZ} is the minor device number of the device 6065file itself. If @code{s} holds the result of passing the device to the 6066stat system call (e.g., @code{stat ("/dev/ttyd0", &s)}), the following 6067line of C code will print out the corresponding lock file name: 6068@example 6069 printf ("LK.%03d.%03d.%03d", major (s.st_dev), 6070 major (s.st_rdev), minor (s.st_rdev)); 6071@end example 6072The advantage of this system is that even if there are several links to 6073the same device, they will all use the same lock file name. 6074 6075When two or more instances of @command{uuxqt} are executing, some sort 6076of locking is needed to ensure that a single execution job is only 6077started once. I don't know how most UUCP packages deal with this. 6078Taylor UUCP uses a lock file for each execution job. The name of the 6079lock file is the same as the name of the @file{X.*} file, except that 6080the initial @samp{X} is changed to an @samp{L}. The lock file holds the 6081process ID as described above. 6082 6083@ifset faq 6084@format 6085------------------------------ 6086 6087From: Execution File Format 6088Subject: Execution File Format 6089@end format 6090@end ifset 6091 6092@node Execution File Format, UUCP Protocol, UUCP Lock Files, Protocols 6093@section Execution File Format 6094@cindex execution file format 6095@cindex @file{X.*} file format 6096 6097UUCP @file{X.*} files control program execution. They are created by 6098@command{uux}. They are transferred between systems just like any other 6099file. The @command{uuxqt} daemon reads them to figure out how to 6100execute the job requested by @command{uux}. 6101 6102An @file{X.*} file is simply a text file. The first character of each 6103line is a command, and the remainder of the line supplies arguments. 6104The following commands are defined: 6105 6106@table @samp 6107@item C command 6108This gives the command to execute, including the program and all 6109arguments. For example, @samp{rmail ian@@airs.com}. 6110 6111@item U user system 6112This names the user who requested the command, and the system from which 6113the request came. 6114 6115@item I standard-input 6116This names the file from which standard input is taken. If no standard 6117input file is given, the standard input will probably be attached to 6118@file{/dev/null}. If the standard input file is not from the system on 6119which the execution is to occur, it will also appear in an @samp{F} 6120command. 6121 6122@item O standard-output [system] 6123This names the standard output file. The optional second argument names 6124the system to which the file should be sent. If there is no second 6125argument, the file should be created on the executing system. 6126 6127@item F required-file [filename-to-use] 6128The @samp{F} command can appear multiple times. Each @samp{F} command 6129names a file which must exist before the execution can proceed. This 6130will usually be a file which is transferred from the system on which 6131@command{uux} was executed, but it can also be a file from the local 6132system or some other system. If the file is not from the local system, 6133then the command will usually name a file in the spool directory. If 6134the optional second argument appears, then the file should be copied to 6135the execution directory under that name. This is necessary for any file 6136other than the standard input file. If the standard input file is not 6137from the local system, it will appear in both an @samp{F} command and an 6138@samp{I} command. 6139 6140@item R requestor-address 6141This is the address to which mail about the job should be sent. It is 6142relative to the system named in the @samp{U} command. If the @samp{R} 6143command does not appear, then mail is sent to the user named in the 6144@samp{U} command. 6145 6146@item Z 6147This command takes no arguments. It means that a mail message should be 6148sent if the command failed. This is the default behaviour for most 6149modern UUCP packages, and for them the @samp{Z} command does not 6150actually do anything. 6151 6152@item N 6153This command takes no arguments. It means that no mail message should 6154be sent, even if the command failed. 6155 6156@item n 6157This command takes no arguments. It means that a mail message should be 6158sent if the command succeeded. Normally a message is sent only if the 6159command failed. 6160 6161@item B 6162This command takes no arguments. It means that the standard input 6163should be returned with any error message. This can be useful in cases 6164where the input would otherwise be lost. 6165 6166@item e 6167This command takes no arguments. It means that the command should be 6168processed with @file{/bin/sh}. For some packages this is the default 6169anyhow. Most packages will refuse to execute complex commands or 6170commands containing wildcards, because of the security holes this opens. 6171 6172@item E 6173This command takes no arguments. It means that the command should be 6174processed with the @code{execve} system call. For some packages this is 6175the default anyhow. 6176 6177@item M status-file 6178This command means that instead of mailing a message, the message should 6179be copied to the named file on the system named by the @samp{U} command. 6180 6181@item Q 6182This command takes no arguments. It means that the string arguments to 6183all the other commands are backslash quoted. Any backslash in one of 6184the strings should be followed by either a backslash or three octal 6185digits. The backslash quoting is interpreted as in a C string. If the 6186@samp{Q} command does not appear, backslashes in the strings are not 6187treated specially. The @samp{Q} command was introduced in Taylor UUCP 6188version 1.07. 6189 6190@item # comment 6191This command is ignored, as is any other unrecognized command. 6192@end table 6193 6194Here is an example. Given the following command executed on system 6195test1 6196@example 6197 uux - test2!cat - test2!~ian/bar !qux '>~/gorp' 6198@end example 6199(this is only an example, as most UUCP systems will not permit the cat 6200command to be executed) Taylor UUCP will produce something like the 6201following @file{X.} file: 6202@example 6203U ian test1 6204F D.test1N003r qux 6205O /usr/spool/uucppublic/gorp test1 6206F D.test1N003s 6207I D.test1N003s 6208C cat - ~ian/bar qux 6209@end example 6210The standard input will be read into a file and then transferred to the 6211file @file{D.test1N003s} on system @samp{test2}. The file @file{qux} 6212will be transferred to @file{D.test1N003r} on system @samp{test2}. When 6213the command is executed, the latter file will be copied to the execution 6214directory under the name @samp{qux}. Note that since the file 6215@file{~ian/bar} is already on the execution system, no action need be 6216taken for it. The standard output will be collected in a file, then 6217copied to the file @file{/usr/spool/uucppublic/gorp} on the system 6218@samp{test1}. 6219 6220@ifset faq 6221@format 6222------------------------------ 6223 6224From: UUCP Protocol 6225Subject: UUCP Protocol 6226@end format 6227@end ifset 6228 6229@node UUCP Protocol, g Protocol, Execution File Format, Protocols 6230@section UUCP Protocol 6231@cindex UUCP protocol 6232@cindex protocol, UUCP 6233 6234The UUCP protocol is a conversation between two UUCP packages. A UUCP 6235conversation consists of three parts: an initial handshake, a series of 6236file transfer requests, and a final handshake. 6237 6238@menu 6239* The Initial Handshake:: The Initial Handshake 6240* UUCP Protocol Commands:: UUCP Protocol Commands 6241* The Final Handshake:: The Final Handshake 6242@end menu 6243 6244@node The Initial Handshake, UUCP Protocol Commands, UUCP Protocol, UUCP Protocol 6245@subsection The Initial Handshake 6246@cindex initial handshake 6247 6248Before the initial handshake, the caller will usually have logged in the 6249called machine and somehow started the UUCP package there. On Unix this 6250is normally done by setting the shell of the login name used to 6251@file{/usr/lib/uucp/uucico}. 6252 6253All messages in the initial handshake begin with a @kbd{^P} (a byte with 6254the octal value @samp{\020}) and end with a null byte (@samp{\000}). A 6255few systems end these messages with a line feed character (@samp{\012}) 6256instead of a null byte; the examples below assume a null byte is being 6257used. 6258 6259Some options below are supported by QFT, which stands for Queued File 6260Transfer, and is (or was) an internal Bell Labs version of UUCP. 6261 6262Taylor UUCP size negotiation was introduced by Taylor UUCP, and is 6263also supported by DOS based UUPlus and Amiga based wUUCP and 6264UUCP-1.17. 6265 6266The initial handshake goes as follows. It is begun by the called 6267machine. 6268 6269@table @asis 6270@item called: @samp{\020Shere=hostname\000} 6271The hostname is the UUCP name of the called machine. Older UUCP 6272packages do not output it, and simply send @samp{\020Shere\000}. 6273 6274@item caller: @samp{\020Shostname options\000} 6275The hostname is the UUCP name of the calling machine. The following 6276options may appear (or there may be none): 6277 6278@table @samp 6279@item -QSEQ 6280Report sequence number for this conversation. The sequence number is 6281stored at both sites, and incremented after each call. If there is a 6282sequence number mismatch, something has gone wrong (somebody may have 6283broken security by pretending to be one of the machines) and the call is 6284denied. If the sequence number changes on one of the machines, perhaps 6285because of an attempted breakin or because a disk backup was restored, 6286the sequence numbers on the two machines must be reconciled manually. 6287 6288@item -xLEVEL 6289Requests the called system to set its debugging level to the specified 6290value. This is not supported by all systems. 6291 6292@item -pGRADE 6293@itemx -vgrade=GRADE 6294Requests the called system to only transfer files of the specified grade 6295or higher. This is not supported by all systems. Some systems support 6296@samp{-p}, some support @samp{-vgrade=}. UUPlus allows either @samp{-p} 6297or @samp{-v} to be specified on a per-system basis in the @file{SYSTEMS} 6298file (@samp{gradechar} option). 6299 6300@item -R 6301Indicates that the calling UUCP understands how to restart failed file 6302transmissions. Supported only by System V Release 4 UUCP, QFT, and 6303Taylor UUCP. 6304 6305@item -ULIMIT 6306Reports the ulimit value of the calling UUCP. The limit is specified as 6307a base 16 number in C notation (e.g., @samp{-U0x1000000}). This number 6308is the number of 512 byte blocks in the largest file which the calling 6309UUCP can create. The called UUCP may not transfer a file larger than 6310this. Supported only by System V Release 4 UUCP, QFT and UUPlus. 6311UUPlus reports the lesser of the available disk space on the spool 6312directory drive and the ulimit variable in @file{UUPLUS.CFG}. Taylor 6313UUCP understands this option, but does not generate it. 6314 6315@item -N[NUMBER] 6316Indicates that the calling UUCP understands the Taylor UUCP size 6317negotiation extension. Not supported by traditional UUCP packages. 6318Supported by UUPlus. The optional number is a bitmask of features 6319supported by the calling UUCP, and is described below. 6320@end table 6321 6322@item called: @samp{\020ROK\000} 6323There are actually several possible responses. 6324@table @samp 6325@item ROK 6326The calling UUCP is acceptable, and the handshake proceeds to the 6327protocol negotiation. Some options may also appear; see below. 6328@item ROKN[NUMBER] 6329The calling UUCP is acceptable, it specified @samp{-N}, and the called 6330UUCP also understands the Taylor UUCP size limiting extensions. The 6331optional number is a bitmask of features supported by the called UUCP, 6332and is described below. 6333@item RLCK 6334The called UUCP already has a lock for the calling UUCP, which normally 6335indicates the two machines are already communicating. 6336@item RCB 6337The called UUCP will call back. This may be used to avoid impostors 6338(but only one machine out of each pair should call back, or no 6339conversation will ever begin). 6340@item RBADSEQ 6341The call sequence number is wrong (see the @samp{-Q} discussion above). 6342@item RLOGIN 6343The calling UUCP is using the wrong login name. 6344@item RYou are unknown to me 6345The calling UUCP is not known to the called UUCP, and the called UUCP 6346does not permit connections from unknown systems. Some versions of UUCP 6347just drop the line rather than sending this message. 6348@end table 6349 6350If the response is @samp{ROK}, the following options are supported by 6351System V Release 4 UUCP and QFT. 6352@table @samp 6353@item -R 6354The called UUCP knows how to restart failed file transmissions. 6355@item -ULIMIT 6356Reports the ulimit value of the called UUCP. The limit is specified as 6357a base 16 number in C notation. This number is the number of 512 byte 6358blocks in the largest file which the called UUCP can create. The 6359calling UUCP may not send a file larger than this. Also supported by 6360UUPlus. Taylor UUCP understands this option, but does not generate it. 6361@item -xLEVEL 6362I'm not sure just what this means. It may request the 6363calling UUCP to set its debugging level to the specified 6364value. 6365@end table 6366 6367If the response is not @samp{ROK} (or @samp{ROKN}) both sides hang up 6368the phone, abandoning the call. 6369 6370@item called: @samp{\020Pprotocols\000} 6371Note that the called UUCP outputs two strings in a row. The protocols 6372string is a list of UUCP protocols supported by the caller. Each UUCP 6373protocol has a single character name. These protocols are discussed in 6374more detail later in this document. For example, the called UUCP might 6375send @samp{\020Pgf\000}. 6376 6377@item caller: @samp{\020Uprotocol\000} 6378The calling UUCP selects which protocol to use out of the protocols 6379offered by the called UUCP. If there are no mutually supported 6380protocols, the calling UUCP sends @samp{\020UN\000} and both sides hang 6381up the phone. Otherwise the calling UUCP sends something like 6382@samp{\020Ug\000}. 6383@end table 6384 6385Most UUCP packages will consider each locally supported protocol in turn 6386and select the first one supported by the called UUCP. With some 6387versions of HDB UUCP, this can be modified by giving a list of protocols 6388after the device name in the @file{Devices} file or the @file{Systems} 6389file. For example, to select the @samp{e} protocol in @file{Systems}, 6390@example 6391 airs Any ACU,e ... 6392@end example 6393or in Devices, 6394@example 6395 ACU,e ttyXX ... 6396@end example 6397Taylor UUCP provides the @code{protocol} 6398command which may be used either 6399for a system 6400@ifclear faq 6401(@pxref{Protocol Selection}) 6402@end ifclear 6403or a 6404@ifclear faq 6405port (@pxref{port File}). 6406@end ifclear 6407@ifset faq 6408port. 6409@end ifset 6410UUPlus allows specification of the protocol string on a per-system basis 6411in the @file{SYSTEMS} file. 6412 6413The optional number following a @samp{-N} sent by the calling system, or 6414an @samp{ROKN} sent by the called system, is a bitmask of features 6415supported by the UUCP package. The optional number was introduced in 6416Taylor UUCP version 1.04. The number is sent as an octal number with a 6417leading zero. The following bits are currently defined. A missing 6418number should be taken as @samp{011}. 6419 6420@table @samp 6421@item 01 6422UUCP supports size negotiation. 6423 6424@item 02 6425UUCP supports file restart. 6426 6427@item 04 6428UUCP supports the @samp{E} command. 6429 6430@item 010 6431UUCP requires the file size in the @samp{S} and @samp{R} commands to be 6432in base 10. This bit is used by default if no number appears, but 6433should not be explicitly sent. 6434 6435@item 020 6436UUCP expects a dummy string between the notify field and the size field 6437in an @samp{S} command. This is true of SVR4 UUCP. This bit should not 6438be used. 6439 6440@item 040 6441UUCP supports the @samp{q} option in the @samp{S}, @samp{R}, @samp{X}, 6442and @samp{E} commands. 6443@end table 6444 6445After the protocol has been selected and the initial handshake has been 6446completed, both sides turn on the selected protocol. For some protocols 6447(notably @samp{g}) a further handshake is done at this point. 6448 6449@node UUCP Protocol Commands, The Final Handshake, The Initial Handshake, UUCP Protocol 6450@subsection UUCP Protocol Commands 6451 6452Each protocol supports a method for sending a command to the remote 6453system. This method is used to transmit a series of commands between 6454the two UUCP packages. At all times, one package is the master and the 6455other is the slave. Initially, the calling UUCP is the master. 6456 6457If a protocol error occurs during the exchange of commands, both sides 6458move immediately to the final handshake. 6459 6460The master will send one of five commands: @samp{S}, @samp{R}, @samp{X}, 6461@samp{E}, or @samp{H}. 6462 6463Any file name referred to below is either an absolute file name 6464beginning with @file{/}, a public directory file name beginning with 6465@file{~/}, a file name relative to a user's home directory beginning 6466with @file{~@var{USER}/}, or a spool directory file name. File names in 6467the spool directory are not absolute, but instead are converted to file 6468names within the spool directory by UUCP. They always begin with 6469@file{C.} (for a command file created by @command{uucp} or 6470@command{uux}), @file{D.} (for a data file created by @command{uucp}, 6471@command{uux} or by an execution, or received from another system for an 6472execution), or @file{X.} (for an execution file created by @command{uux} 6473or received from another system). 6474 6475All the commands other than the @samp{H} command support options. The 6476@samp{q} option indicates that the command argument strings are 6477backslash quoted. If the @samp{q} option appears, then any backslash in 6478one of the arguments should be followed by either a backslash or three 6479octal digits. The backslash quoting is interpreted as in a C string. 6480If the @samp{q} option does not appear, backslashes in the strings are 6481not treated specially. The @samp{q} option was introduced in Taylor 6482UUCP version 1.07. 6483 6484@menu 6485* The S Command:: The S Command 6486* The R Command:: The R Command 6487* The X Command:: The X Command 6488* The E Command:: The E Command 6489* The H Command:: The H Command 6490@end menu 6491 6492@node The S Command, The R Command, UUCP Protocol Commands, UUCP Protocol Commands 6493@subsubsection The S Command 6494@cindex S UUCP protocol command 6495@cindex UUCP protocol S command 6496 6497@table @asis 6498@item master: @samp{S @var{from} @var{to} @var{user} -@var{options} @var{temp} @var{mode} @var{notify} @var{size}} 6499The @samp{S} and the @samp{-} are literal characters. This is a request 6500by the master to send a file to the slave. 6501 6502@table @var 6503@item from 6504The name of the file to send. If the @samp{C} option does not appear in 6505@var{options}, the master will actually open and send this file. 6506Otherwise the file has been copied to the spool directory, where it is 6507named @var{temp}. The slave ignores this field unless @var{to} is a 6508directory, in which case the basename of @var{from} will be used as the 6509file name. If @var{from} is a spool directory filename, it must be a 6510data file created for or by an execution, and must begin with @file{D.}. 6511 6512@item to 6513The name to give the file on the slave. If this field names a directory 6514the file is placed within that directory with the basename of 6515@var{from}. A name ending in @samp{/} is taken to be a directory even 6516if one does not already exist with that name. If @var{to} begins with 6517@file{X.}, an execution file will be created on the slave. Otherwise, 6518if @var{to} begins with @file{D.} it names a data file to be used by 6519some execution file. Otherwise, @var{to} should not be in the spool 6520directory. 6521 6522@item user 6523The name of the user who requested the transfer. 6524 6525@item options 6526A list of options to control the transfer. The following 6527options are defined (all options are single characters): 6528@table @samp 6529@item C 6530The file has been copied to the spool directory 6531(the master should use @var{temp} rather than @var{from}). 6532@item c 6533The file has not been copied to the spool directory (this is the 6534default). 6535@item d 6536The slave should create directories as necessary (this is the default). 6537@item f 6538The slave should not create directories if necessary, but should fail 6539the transfer instead. 6540@item m 6541The master should send mail to @var{user} when the transfer is complete. 6542@item n 6543The slave should send mail to @var{notify} when the transfer is 6544complete. 6545@item q 6546Backslash quoting is applied to the @var{from}, @var{to}, @var{user}, 6547and @var{notify} arguments. @xref{UUCP Protocol Commands}. This option 6548was introduced in Taylor UUCP version 1.07. 6549@end table 6550 6551@item temp 6552If the @samp{C} option appears in @var{options}, this names the file to 6553be sent. Otherwise if @var{from} is in the spool directory, @var{temp} 6554is the same as @var{from}. Otherwise @var{temp} may be a dummy string, 6555such as @file{D.0}. After the transfer has been succesfully completed, 6556the master will delete the file @var{temp}. 6557 6558@item mode 6559This is an octal number giving the mode of the file on the master. If 6560the file is not in the spool directory, the slave will always create it 6561with mode 0666, except that if (@var{mode} & 0111) is not zero (the file 6562is executable), the slave will create the file with mode 0777. If the 6563file is in the spool directory, some UUCP packages will use the 6564algorithm above and some will always create the file with mode 0600. 6565This field is ignored by UUPlus, since it is meaningless on DOS; UUPlus 6566uses 0666 for outgoing files. 6567 6568@item notify 6569This field may not be present, and in any case is only meaningful if the 6570@samp{n} option appears in @var{options}. If the @samp{n} option 6571appears, then, when the transfer is successfully completed, the slave 6572will send mail to @var{notify}, which must be a legal mailing address on 6573the slave. If a @var{size} field will appear but the @samp{n} option 6574does not appear, @var{notify} will always be present, typically as the 6575string @samp{dummy} or simply a pair of double quotes. 6576 6577@item size 6578This field is only present when doing Taylor UUCP or SVR4 UUCP size 6579negotiation. It is the size of the file in bytes. Taylor UUCP version 65801.03 sends the size as a decimal integer, while versions 1.04 and up, 6581and all other UUCP packages that support size negotiation, send the size 6582in base 16 with a leading 0x. 6583@end table 6584 6585The slave then responds with an @samp{S} command response. 6586 6587@table @samp 6588@item SY @var{start} 6589The slave is willing to accept the file, and file transfer begins. The 6590@var{start} field will only be present when using file restart. It 6591specifies the byte offset into the file at which to start sending. If 6592this is a new file, @var{start} will be 0x0. 6593 6594@item SN2 6595The slave denies permission to transfer the file. This can mean that 6596the destination directory may not be accessed, or that no requests are 6597permitted. It implies that the file transfer will never succeed. 6598 6599@item SN4 6600The slave is unable to create the necessary temporary file. This 6601implies that the file transfer might succeed later. 6602 6603@item SN6 6604This is only used by Taylor UUCP size negotiation. It means that the 6605slave considers the file too large to transfer at the moment, but it may 6606be possible to transfer it at some other time. 6607 6608@item SN7 6609This is only used by Taylor UUCP size negotiation. It means that the 6610slave considers the file too large to ever transfer. 6611 6612@item SN8 6613This is only used by Taylor UUCP. It means that the file was already 6614received in a previous conversation. This can happen if the receive 6615acknowledgement was lost after it was sent by the receiver but before it 6616was received by the sender. 6617 6618@item SN9 6619This is only used by Taylor UUCP (versions 1.05 and up) and UUPlus 6620(versions 2.0 and up). It means that the remote system was unable to 6621open another channel (see the discussion of the @samp{i} protocol for 6622more information about channels). This implies that the file transfer 6623might succeed later. 6624 6625@item SN10 6626This is reportedly used by SVR4 UUCP to mean that the file size is too 6627large. 6628@end table 6629 6630If the slave responds with @samp{SY}, a file transfer begins. When the 6631file transfer is complete, the slave sends a @samp{C} command response. 6632 6633@table @samp 6634@item CY 6635The file transfer was successful. 6636@item CYM 6637The file transfer was successful, and the slave wishes to become the 6638master; the master should send an @samp{H} command, described below. 6639@item CN5 6640The temporary file could not be moved into the final location. This 6641implies that the file transfer will never succeed. 6642@end table 6643@end table 6644 6645After the @samp{C} command response has been received (in the @samp{SY} 6646case) or immediately (in an @samp{SN} case) the master will send another 6647command. 6648 6649@node The R Command, The X Command, The S Command, UUCP Protocol Commands 6650@subsubsection The R Command 6651@cindex R UUCP protocol command 6652@cindex UUCP protocol R command 6653 6654@table @asis 6655@item master: @samp{R @var{from} @var{to} @var{user} -@var{options} @var{size}} 6656The @samp{R} and the @samp{-} are literal characters. This is a request 6657by the master to receive a file from the slave. I do not know how SVR4 6658UUCP or QFT implement file transfer restart in this case. 6659 6660@table @var 6661@item from 6662This is the name of the file on the slave which the master wishes to 6663receive. It must not be in the spool directory, and it may not contain 6664any wildcards. 6665 6666@item to 6667This is the name of the file to create on the master. I do not believe 6668that it can be a directory. It may only be in the spool directory if 6669this file is being requested to support an execution either on the 6670master or on some system other than the slave. 6671 6672@item user 6673The name of the user who requested the transfer. 6674 6675@item options 6676A list of options to control the transfer. The following 6677options are defined (all options are single characters): 6678@table @samp 6679@item d 6680The master should create directories as necessary (this is the default). 6681@item f 6682The master should not create directories if necessary, but should fail 6683the transfer instead. 6684@item m 6685The master should send mail to @var{user} when the transfer is complete. 6686@item q 6687Backslash quoting is applied to the @var{from}, @var{to}, and @var{user} 6688arguments. @xref{UUCP Protocol Commands}. This option was introduced 6689in Taylor UUCP version 1.07. 6690@end table 6691 6692@item size 6693This only appears if Taylor UUCP size negotiation is being used. It 6694specifies the largest file which the master is prepared to accept (when 6695using SVR4 UUCP or QFT, this was specified in the @samp{-U} option 6696during the initial handshake). 6697@end table 6698 6699The slave then responds with an @samp{R} command response. UUPlus does 6700not support @samp{R} requests, and always responds with @samp{RN2}. 6701 6702@table @samp 6703@item RY @var{mode} [@var{size}] 6704The slave is willing to send the file, and file transfer begins. The 6705@var{mode} argument is the octal mode of the file on the slave. The 6706master treats this just as the slave does the @var{mode} argument in the 6707send command, q.v. I am told that SVR4 UUCP sends a trailing @var{size} 6708argument. For some versions of BSD UUCP, the @var{mode} argument may 6709have a trailing @samp{M} character (e.g., @samp{RY 0666M}). This means 6710that the slave wishes to become the master. 6711 6712@item RN2 6713The slave is not willing to send the file, either because it is not 6714permitted or because the file does not exist. This implies that the 6715file request will never succeed. 6716 6717@item RN6 6718This is only used by Taylor UUCP size negotiation. It means that the 6719file is too large to send, either because of the size limit specifies by 6720the master or because the slave considers it too large. The file 6721transfer might succeed later, or it might not (this may be cleared up in 6722a later release of Taylor UUCP). 6723 6724@item RN9 6725This is only used by Taylor UUCP (versions 1.05 and up) and FSUUCP 6726(versions 1.5 and up). It means that the remote system was unable to 6727open another channel (see the discussion of the @samp{i} protocol for 6728more information about channels). This implies that the file transfer 6729might succeed later. 6730@end table 6731 6732If the slave responds with @samp{RY}, a file transfer begins. When the 6733file transfer is complete, the master sends a @samp{C} command. The 6734slave pretty much ignores this, although it may log it. 6735 6736@table @samp 6737@item CY 6738The file transfer was successful. 6739@item CN5 6740The temporary file could not be moved into the final location. 6741@end table 6742 6743After the @samp{C} command response has been sent (in the @samp{RY} 6744case) or immediately (in an @samp{RN} case) the master will send another 6745command. 6746@end table 6747 6748@node The X Command, The E Command, The R Command, UUCP Protocol Commands 6749@subsubsection The X Command 6750@cindex X UUCP protocol command 6751@cindex UUCP protocol X command 6752 6753@table @asis 6754@item master: @samp{X @var{from} @var{to} @var{user} -@var{options}} 6755The @samp{X} and the @samp{-} are literal characters. This is a request 6756by the master to, in essence, execute uucp on the slave. The slave 6757should execute @samp{uucp @var{from} @var{to}}. 6758 6759@table @var 6760@item from 6761This is the name of the file or files on the slave which the master 6762wishes to transfer. Any wildcards are expanded on the slave. If the 6763master is requesting that the files be transferred to itself, the 6764request would normally contain wildcard characters, since otherwise an 6765@samp{R} command would suffice. The master can also use this command to 6766request that the slave transfer files to a third system. 6767 6768@item to 6769This is the name of the file or directory to which the files should be 6770transferred. This will normally use a UUCP name. For example, if the 6771master wishes to receive the files itself, it would use 6772@samp{master!path}. 6773 6774@item user 6775The name of the user who requested the transfer. 6776 6777@item options 6778A list of options to control the transfer. As far as I know, only one 6779option is defined: 6780@table @samp 6781@item q 6782Backslash quoting is applied to the @var{from}, @var{to}, and @var{user} 6783arguments. @xref{UUCP Protocol Commands}. This option was introduced 6784in Taylor UUCP version 1.07. 6785@end table 6786@end table 6787 6788The slave then responds with an @samp{X} command response. FSUUCP does 6789not support @samp{X} requests, and always responds with @samp{XN}. 6790 6791@table @samp 6792@item XY 6793The request was accepted, and the appropriate file transfer commands 6794have been queued up for later processing. 6795 6796@item XN 6797The request was denied. No particular reason is given. 6798@end table 6799 6800In either case, the master will then send another command. 6801@end table 6802 6803@node The E Command, The H Command, The X Command, UUCP Protocol Commands 6804@subsubsection The E Command 6805@cindex E UUCP protocol command 6806@cindex UUCP protocol E command 6807 6808@table @asis 6809@item master: @samp{E @var{from} @var{to} @var{user} -@var{options} @var{temp} @var{mode} @var{notify} @var{size} @var{command}} 6810The @samp{E} command is only supported by Taylor UUCP 1.04 and up. It 6811is used to make an execution request without requiring a separate 6812@file{X.*} file. 6813@ifclear faq 6814@xref{Execution File Format}. 6815@end ifclear 6816It is only used when the command to be executed requires a single input 6817file which is passed to it as standard input. 6818 6819All the fields have the same meaning as they do for an @samp{S} command, 6820except for @var{options} and @var{command}. 6821 6822@table @var 6823@item options 6824A list of options to control the transfer. The following options are 6825defined (all options are single characters): 6826@table @samp 6827@item C 6828The file has been copied to the spool directory (the master should use 6829@var{temp} rather than @var{from}). 6830@item c 6831The file has not been copied to the spool directory (this is the 6832default). 6833@item N 6834No mail message should be sent, even if the command fails. This is the 6835equivalent of the @samp{N} command in an @file{X.*} file. 6836@item Z 6837A mail message should be sent if the command fails (this is generally 6838the default in any case). This is the equivalent of the @samp{Z} 6839command in an @file{X.*} file. 6840@item R 6841Mail messages about the execution should be sent to the address in the 6842@var{notify} field. This is the equivalent of the @samp{R} command in 6843an @file{X.*} file. 6844@item e 6845The execution should be done with @file{/bin/sh}. This is the 6846equivalent of the @samp{e} command in an @file{X.*} file. 6847@item q 6848Backslash quoting is applied to the @var{from}, @var{to}, @var{user}, 6849and @var{notify} arguments. @xref{UUCP Protocol Commands}. This option 6850was introduced in Taylor UUCP version 1.07. Note that the @var{command} 6851argument is not backslash quoted---that argument is defined as the 6852remainder of the line, and so is already permitted to contain any 6853character. 6854@end table 6855 6856@item command 6857The command which should be executed. This is the equivalent of the 6858@samp{C} command in an @file{X.*} file. 6859@end table 6860 6861The slave then responds with an @samp{E} command response. These are 6862the same as the @samp{S} command responses, but the initial character is 6863@samp{E} rather than @samp{S}. 6864 6865If the slave responds with @samp{EY}, the file transfer begins. When 6866the file transfer is complete, the slave sends a @samp{C} command 6867response, just as for the @samp{S} command. After a successful file 6868transfer, the slave is responsible for arranging for the command to be 6869executed. The transferred file is passed as standard input, as though 6870it were named in the @samp{I} and @samp{F} commands of an @file{X.*} 6871file. 6872 6873After the @samp{C} command response has been received (in the @samp{EY} 6874case) or immediately (in an @samp{EN} case) the master will send another 6875command. 6876@end table 6877 6878@node The H Command, , The E Command, UUCP Protocol Commands 6879@subsubsection The H Command 6880@cindex H UUCP protocol command 6881@cindex UUCP protocol H command 6882 6883@table @asis 6884@item master: @samp{H} 6885This is used by the master to hang up the connection. The slave will 6886respond with an @samp{H} command response. 6887 6888@table @samp 6889@item HY 6890The slave agrees to hang up the connection. In this case the master 6891sends another @samp{HY} command. In some UUCP packages the slave will 6892then send a third @samp{HY} command. At this point the protocol is shut 6893down, and the final handshake is begun. 6894@item HN 6895The slave does not agree to hang up. In this case the master and the 6896slave exchange roles. The next command will be sent by the former 6897slave, which is the new master. The roles may be reversed several times 6898during a single connection. 6899@end table 6900@end table 6901 6902@node The Final Handshake, , UUCP Protocol Commands, UUCP Protocol 6903@subsection The Final Handshake 6904@cindex final handshake 6905 6906After the protocol has been shut down, the final handshake is performed. 6907This handshake has no real purpose, and some UUCP packages simply drop 6908the connection rather than do it (in fact, some will drop the connection 6909immediately after both sides agree to hangup, without even closing down 6910the protocol). 6911 6912@table @asis 6913@item caller: @samp{\020OOOOOO\000} 6914 6915@item called: @samp{\020OOOOOOO\000} 6916@end table 6917 6918That is, the calling UUCP sends six @samp{O} characters and the called 6919UUCP replies with seven @samp{O} characters. Some UUCP packages always 6920send six @samp{O} characters. 6921 6922@ifset faq 6923@format 6924------------------------------ 6925 6926From: UUCP @samp{g} Protocol 6927Subject: UUCP @samp{g} Protocol 6928@end format 6929@end ifset 6930 6931@node g Protocol, f Protocol, UUCP Protocol, Protocols 6932@section UUCP @samp{g} Protocol 6933@cindex @samp{g} protocol 6934@cindex protocol @samp{g} 6935 6936The @samp{g} protocol is a packet based flow controlled error correcting 6937protocol that requires an eight bit clear connection. It is the 6938original UUCP protocol, and is supported by all UUCP implementations. 6939Many implementations of it are only able to support small window and 6940packet sizes, specifically a window size of 3 and a packet size of 64 6941bytes, but the protocol itself can support up to a window size of 7 and 6942a packet size of 4096 bytes. Complaints about the inefficiency of the 6943@samp{g} protocol generally refer to specific implementations, rather 6944than to the correctly implemented protocol. 6945 6946The @samp{g} protocol was originally designed for general packet 6947drivers, and thus contains some features that are not used by UUCP, 6948including an alternate data channel and the ability to renegotiate 6949packet and window sizes during the communication session. 6950 6951The @samp{g} protocol is spoofed by many Telebit modems. When spoofing 6952is in effect, each Telebit modem uses the @samp{g} protocol to 6953communicate with the attached computer, but the data between the modems 6954is sent using a Telebit proprietary error correcting protocol. This 6955allows for very high throughput over the Telebit connection, which, 6956because it is half-duplex, would not normally be able to handle the 6957@samp{g} protocol very well at all. When a Telebit is spoofing the 6958@samp{g} protocol, it forces the packet size to be 64 bytes and the 6959window size to be 3. 6960 6961This discussion of the @samp{g} protocol explains how it works, but does 6962not discuss useful error handling techniques. Some discussion of this 6963can be found in Jamie E. Hanrahan's paper, cited 6964@ifclear faq 6965above (@pxref{UUCP Protocol Sources}). 6966@end ifclear 6967@ifset faq 6968above. 6969@end ifset 6970 6971All @samp{g} protocol communication is done with packets. Each packet 6972begins with a six byte header. Control packets consist only of the 6973header. Data packets contain additional data. 6974 6975The header is as follows: 6976 6977@table @asis 6978@item @samp{\020} 6979Every packet begins with a @kbd{^P}. 6980 6981@item @var{k} (1 <= @var{k} <= 9) 6982The @var{k} value is always 9 for a control packet. For a data packet, 6983the @var{k} value indicates how much data follows the six byte header. 6984The amount of data is 6985@ifinfo 69862 ** (@var{k} + 4), where ** indicates exponentiation. 6987@end ifinfo 6988@iftex 6989@tex 6990$2^{k + 4}$. 6991@end tex 6992@end iftex 6993Thus a @var{k} value of 1 means 32 data bytes and a 6994@var{k} value of 8 means 4096 data bytes. The @var{k} value for a data 6995packet must be between 1 and 8 inclusive. 6996 6997@item checksum low byte 6998@itemx checksum high byte 6999The checksum value is described below. 7000 7001@item control byte 7002The control byte indicates the type of packet, and is described below. 7003 7004@item xor byte 7005This byte is the xor of @var{k}, the checksum low byte, the checksum 7006high byte and the control byte (i.e., the second, third, fourth and 7007fifth header bytes). It is used to ensure that the header data is 7008valid. 7009@end table 7010 7011The control byte in the header is composed of three bit fields, referred 7012to here as @var{tt} (two bits), @var{xxx} (three bits) and @var{yyy} 7013(three bits). The control is @var{tt}@var{xxx}@var{yyy}, or @code{(@var{tt} 7014<< 6) + (@var{xxx} << 3) + @var{yyy}}. 7015 7016The @var{TT} field takes on the following values: 7017 7018@table @samp 7019@item 0 7020This is a control packet. In this case the @var{k} byte in the 7021header must be 9. The @var{xxx} field indicates the type of control 7022packet; these types are described below. 7023 7024@item 1 7025This is an alternate data channel packet. This is not used by UUCP. 7026 7027@item 2 7028This is a data packet, and the entire contents of the attached data 7029field (whose length is given by the @var{k} byte in the header) are 7030valid. The @var{xxx} and @var{yyy} fields are described below. 7031 7032@item 3 7033This is a short data packet. Let the length of the data field (as given 7034by the @var{k} byte in the header) be @var{l}. Let the first byte in 7035the data field be @var{b1}. If @var{b1} is less than 128 (if the most 7036significant bit of @var{b1} is 0), then there are @code{@var{l} - 7037@var{b1}} valid bytes of data in the data field, beginning with the 7038second byte. If @code{@var{b1} >= 128}, let @var{b2} be the second byte 7039in the data field. Then there are @code{@var{l} - ((@var{b1} & 0x7f) + 7040(@var{b2} << 7))} valid bytes of data in the data field, beginning with 7041the third byte. In all cases @var{l} bytes of data are sent (and all 7042data bytes participate in the checksum calculation) but some of the 7043trailing bytes may be dropped by the receiver. The @var{xxx} and 7044@var{yyy} fields are described below. 7045@end table 7046 7047In a data packet (short or not) the @var{xxx} field gives the sequence 7048number of the packet. Thus sequence numbers can range from 0 to 7, 7049inclusive. The @var{yyy} field gives the sequence number of the last 7050correctly received packet. 7051 7052Each communication direction uses a window which indicates how many 7053unacknowledged packets may be transmitted before waiting for an 7054acknowledgement. The window may range from 1 to 7, and may be different 7055in each direction. For example, if the window is 3 and the last packet 7056acknowledged was packet number 6, packet numbers 7, 0 and 1 may be sent 7057but the sender must wait for an acknowledgement before sending packet 7058number 2. This acknowledgement could come as the @var{yyy} field of a 7059data packet, or as the @var{yyy} field of a @samp{RJ} or @samp{RR} 7060control packet (described below). 7061 7062Each packet must be transmitted in order (the sender may not skip 7063sequence numbers). Each packet must be acknowledged, and each packet 7064must be acknowledged in order. 7065 7066In a control packet, the @var{xxx} field takes on the following values: 7067 7068@table @asis 7069@item 1 @samp{CLOSE} 7070The connection should be closed immediately. This is typically sent 7071when one side has seen too many errors and wants to give up. It is also 7072sent when shutting down the protocol. If an unexpected @samp{CLOSE} 7073packet is received, a @samp{CLOSE} packet should be sent in reply and 7074the @samp{g} protocol should halt, causing UUCP to enter the final 7075handshake. 7076 7077@item 2 @samp{RJ} or @samp{NAK} 7078The last packet was not received correctly. The @var{yyy} field 7079contains the sequence number of the last correctly received packet. 7080 7081@item 3 @samp{SRJ} 7082Selective reject. The @var{yyy} field contains the sequence number of a 7083packet that was not received correctly, and should be retransmitted. 7084This is not used by UUCP, and most implementations will not recognize 7085it. 7086 7087@item 4 @samp{RR} or @samp{ACK} 7088Packet acknowledgement. The @var{yyy} field contains the sequence 7089number of the last correctly received packet. 7090 7091@item 5 @samp{INITC} 7092Third initialization packet. The @var{yyy} field contains the maximum 7093window size to use. 7094 7095@item 6 @samp{INITB} 7096Second initialization packet. The @var{yyy} field contains the 7097packet size to use. It requests a size of 7098@ifinfo 70992 ** (@var{yyy} + 5). 7100@end ifinfo 7101@iftex 7102@tex 7103$2^{yyy + 5}$. 7104@end tex 7105@end iftex 7106Note that this is not the same coding used for the @var{k} byte in the 7107packet header (it is 1 less). Most UUCP implementations that request a 7108packet size larger than 64 bytes can handle any packet size up to that 7109specified. 7110 7111@item 7 @samp{INITA} 7112First initialization packet. The @var{yyy} field contains the maximum 7113window size to use. 7114@end table 7115 7116To compute the checksum, call the control byte (the fifth byte in the 7117header) @var{c}. 7118 7119The checksum of a control packet is simply @code{0xaaaa - @var{c}}. 7120 7121The checksum of a data packet is @code{0xaaaa - (@var{check} ^ 7122@var{c})}, where @code{^} denotes exclusive or, and @var{check} is the 7123result of the following routine as run on the contents of the data field 7124(every byte in the data field participates in the checksum, even for a 7125short data packet). Below is the routine used by an early version of 7126Taylor UUCP; it is a slightly modified version of a routine which John 7127Gilmore patched from G.L.@: Chesson's original paper. The @code{z} 7128argument points to the data and the @code{c} argument indicates how much 7129data there is. 7130 7131@example 7132int 7133igchecksum (z, c) 7134 register const char *z; 7135 register int c; 7136@{ 7137 register unsigned int ichk1, ichk2; 7138 7139 ichk1 = 0xffff; 7140 ichk2 = 0; 7141 7142 do 7143 @{ 7144 register unsigned int b; 7145 7146 /* Rotate ichk1 left. */ 7147 if ((ichk1 & 0x8000) == 0) 7148 ichk1 <<= 1; 7149 else 7150 @{ 7151 ichk1 <<= 1; 7152 ++ichk1; 7153 @} 7154 7155 /* Add the next character to ichk1. */ 7156 b = *z++ & 0xff; 7157 ichk1 += b; 7158 7159 /* Add ichk1 xor the character position in the buffer counting from 7160 the back to ichk2. */ 7161 ichk2 += ichk1 ^ c; 7162 7163 /* If the character was zero, or adding it to ichk1 caused an 7164 overflow, xor ichk2 to ichk1. */ 7165 if (b == 0 || (ichk1 & 0xffff) < b) 7166 ichk1 ^= ichk2; 7167 @} 7168 while (--c > 0); 7169 7170 return ichk1 & 0xffff; 7171@} 7172@end example 7173 7174When the @samp{g} protocol is started, the calling UUCP sends an 7175@samp{INITA} control packet with the window size it wishes the called 7176UUCP to use. The called UUCP responds with an @samp{INITA} packet with 7177the window size it wishes the calling UUCP to use. Pairs of 7178@samp{INITB} and @samp{INITC} packets are then similarly exchanged. 7179When these exchanges are completed, the protocol is considered to have 7180been started. 7181 7182Note that the window and packet sizes are not a negotiation. Each 7183system announces the window and packet size which the other system 7184should use. It is possible that different window and packet sizes will 7185be used in each direction. The protocol works this way on the theory 7186that each system knows how much data it can accept without getting 7187overrun. Therefore, each system tells the other how much data to send 7188before waiting for an acknowledgement. 7189 7190When a UUCP package transmits a command, it sends one or more data 7191packets. All the data packets will normally be complete, although some 7192UUCP packages may send the last one as a short packet. The command 7193string is sent with a trailing null byte, to let the receiving package 7194know when the command is finished. Some UUCP packages require the last 7195byte of the last packet sent to be null, even if the command ends 7196earlier in the packet. Some packages may require all the trailing bytes 7197in the last packet to be null, but I have not confirmed this. 7198 7199When a UUCP package sends a file, it will send a sequence of data 7200packets. The end of the file is signalled by a short data packet 7201containing zero valid bytes (it will normally be preceeded by a short 7202data packet containing the last few bytes in the file). 7203 7204Note that the sequence numbers cover the entire communication session, 7205including both command and file data. 7206 7207When the protocol is shut down, each UUCP package sends a @samp{CLOSE} 7208control packet. 7209 7210@ifset faq 7211@format 7212------------------------------ 7213 7214From: UUCP @samp{f} Protocol 7215Subject: UUCP @samp{f} Protocol 7216@end format 7217@end ifset 7218 7219@node f Protocol, t Protocol, g Protocol, Protocols 7220@section UUCP @samp{f} Protocol 7221@cindex @samp{f} protocol 7222@cindex protocol @samp{f} 7223 7224The @samp{f} protocol is a seven bit protocol which checksums an entire 7225file at a time. It only uses the characters between @samp{\040} and 7226@samp{\176} (ASCII @kbd{space} and @kbd{~}) inclusive, as well as the 7227carriage return character. It can be very efficient for transferring 7228text only data, but it is very inefficient at transferring eight bit 7229data (such as compressed news). It is not flow controlled, and the 7230checksum is fairly insecure over large files, so using it over a serial 7231connection requires handshaking (XON/XOFF can be used) and error 7232correcting modems. Some people think it should not be used even under 7233those circumstances. 7234 7235I believe that the @samp{f} protocol originated in BSD versions of UUCP. 7236It was originally intended for transmission over X.25 PAD links. 7237 7238The @samp{f} protocol has no startup or finish protocol. However, both 7239sides typically sleep for a couple of seconds before starting up, 7240because they switch the terminal into XON/XOFF mode and want to allow 7241the changes to settle before beginning transmission. 7242 7243When a UUCP package transmits a command, it simply sends a string 7244terminated by a carriage return. 7245 7246When a UUCP package transmits a file, each byte @var{b} of the file is 7247translated according to the following table: 7248 7249@example 7250 0 <= @var{b} <= 037: 0172, @var{b} + 0100 (0100 to 0137) 7251 040 <= @var{b} <= 0171: @var{b} ( 040 to 0171) 7252 0172 <= @var{b} <= 0177: 0173, @var{b} - 0100 ( 072 to 077) 7253 0200 <= @var{b} <= 0237: 0174, @var{b} - 0100 (0100 to 0137) 7254 0240 <= @var{b} <= 0371: 0175, @var{b} - 0200 ( 040 to 0171) 7255 0372 <= @var{b} <= 0377: 0176, @var{b} - 0300 ( 072 to 077) 7256@end example 7257 7258That is, a byte between @samp{\040} and @samp{\171} inclusive is 7259transmitted as is, and all other bytes are prefixed and modified as 7260shown. 7261 7262When all the file data is sent, a seven byte sequence is sent: two bytes 7263of @samp{\176} followed by four ASCII bytes of the checksum as printed 7264in base 16 followed by a carriage return. For example, if the checksum 7265was 0x1234, this would be sent: @samp{\176\1761234\r}. 7266 7267The checksum is initialized to 0xffff. For each byte that is sent it is 7268modified as follows (where @var{b} is the byte before it has been 7269transformed as described above): 7270 7271@example 7272 /* Rotate the checksum left. */ 7273 if ((ichk & 0x8000) == 0) 7274 ichk <<= 1; 7275 else 7276 @{ 7277 ichk <<= 1; 7278 ++ichk; 7279 @} 7280 7281 /* Add the next byte into the checksum. */ 7282 ichk += @var{b}; 7283@end example 7284 7285When the receiving UUCP sees the checksum, it compares it against its 7286own calculated checksum and replies with a single character followed 7287by a carriage return. 7288 7289@table @samp 7290@item G 7291The file was received correctly. 7292 7293@item R 7294The checksum did not match, and the file should be resent from the 7295beginning. 7296 7297@item Q 7298The checksum did not match, but too many retries have occurred and the 7299communication session should be abandoned. 7300@end table 7301 7302The sending UUCP checks the returned character and acts accordingly. 7303 7304@ifset faq 7305@format 7306------------------------------ 7307 7308From: UUCP @samp{t} Protocol 7309Subject: UUCP @samp{t} Protocol 7310@end format 7311@end ifset 7312 7313@node t Protocol, e Protocol, f Protocol, Protocols 7314@section UUCP @samp{t} Protocol 7315@cindex @samp{t} protocol 7316@cindex protocol @samp{t} 7317 7318The @samp{t} protocol is intended for use on links which provide 7319reliable end-to-end connections, such as TCP. It does no error checking 7320or flow control, and requires an eight bit clear channel. 7321 7322I believe the @samp{t} protocol originated in BSD versions of UUCP. 7323 7324When a UUCP package transmits a command, it first gets the length of the 7325command string, @var{c}. It then sends @code{((@var{c} / 512) + 1) * 7326512} bytes (the smallest multiple of 512 which can hold @var{c} bytes 7327plus a null byte) consisting of the command string itself followed by 7328trailing null bytes. 7329 7330When a UUCP package sends a file, it sends it in blocks. Each block 7331contains at most 1024 bytes of data. Each block consists of four bytes 7332containing the amount of data in binary (most significant byte first, 7333the same format as used by the Unix function @code{htonl}) followed by 7334that amount of data. The end of the file is signalled by a block 7335containing zero bytes of data. 7336 7337@ifset faq 7338@format 7339------------------------------ 7340 7341From: UUCP @samp{e} Protocol 7342Subject: UUCP @samp{e} Protocol 7343@end format 7344@end ifset 7345 7346@node e Protocol, Big G Protocol, t Protocol, Protocols 7347@section UUCP @samp{e} Protocol 7348@cindex @samp{e} protocol 7349@cindex protocol @samp{e} 7350 7351The @samp{e} protocol is similar to the @samp{t} protocol. It does no 7352flow control or error checking and is intended for use over networks 7353providing reliable end-to-end connections, such as TCP. 7354 7355The @samp{e} protocol originated in versions of HDB UUCP. 7356 7357When a UUCP package transmits a command, it simply sends the command 7358as an ASCII string terminated by a null byte. 7359 7360When a UUCP package transmits a file, it sends the complete size of the 7361file as an ASCII decimal number. The ASCII string is padded out to 20 7362bytes with null bytes (i.e. if the file is 1000 bytes long, it sends 7363@samp{1000\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}). It then sends the entire 7364file. 7365 7366@ifset faq 7367@format 7368------------------------------ 7369 7370From: UUCP @samp{G} Protocol 7371Subject: UUCP @samp{G} Protocol 7372@end format 7373@end ifset 7374 7375@node Big G Protocol, i Protocol, e Protocol, Protocols 7376@section UUCP @samp{G} Protocol 7377@cindex @samp{G} protocol 7378@cindex protocol @samp{G} 7379 7380The @samp{G} protocol is used by SVR4 UUCP. It is identical to the 7381@samp{g} protocol, except that it is possible to modify the window and 7382packet sizes. The SVR4 implementation of the @samp{g} protocol 7383reportedly is fixed at a packet size of 64 and a window size of 7. 7384Supposedly SVR4 chose to implement a new protocol using a new letter to 7385avoid any potential incompatibilities when using different packet or 7386window sizes. 7387 7388Most implementations of the @samp{g} protocol that accept packets larger 7389than 64 bytes will also accept packets smaller than whatever they 7390requested in the @samp{INITB} packet. The SVR4 @samp{G} implementation 7391is an exception; it will only accept packets of precisely the size it 7392requests in the INITB packet. 7393 7394@ifset faq 7395@format 7396------------------------------ 7397 7398From: UUCP @samp{i} Protocol 7399Subject: UUCP @samp{i} Protocol 7400@end format 7401@end ifset 7402 7403@node i Protocol, j Protocol, Big G Protocol, Protocols 7404@section UUCP @samp{i} Protocol 7405@cindex @samp{i} protocol 7406@cindex protocol @samp{i} 7407 7408The @samp{i} protocol was written by Ian Lance Taylor (who also wrote 7409this 7410@ifclear faq 7411manual). 7412@end ifclear 7413@ifset faq 7414FAQ). 7415@end ifset 7416It was first used by Taylor UUCP version 1.04. 7417 7418It is a sliding window packet protocol, like the @samp{g} protocol, but 7419it supports bidirectional transfers (i.e., file transfers in both 7420directions simultaneously). It requires an eight bit clear connection. 7421Several ideas for the protocol were taken from the paper @cite{A 7422High-Throughput Message Transport System} by P.@: Lauder. I don't know 7423where the paper was published, but the author's e-mail address is 7424@email{piers@@cs.su.oz.au}. The @samp{i} protocol does not adopt his 7425main idea, which is to dispense with windows entirely. This is because 7426some links still do require flow control and, more importantly, because 7427using windows sets a limit to the amount of data which the protocol must 7428be able to resend upon request. To reduce the costs of window 7429acknowledgements, the protocol uses a large window and only requires an 7430ack at the halfway point. 7431 7432Each packet starts with a six byte header, optionally followed by data 7433bytes with a four byte checksum. There are currently five defined 7434packet types (@samp{DATA}, @samp{SYNC}, @samp{ACK}, @samp{NAK}, 7435@samp{SPOS}, @samp{CLOSE}) which are described below. Although any 7436packet type may include data, any data provided with an @samp{ACK}, 7437@samp{NAK} or @samp{CLOSE} packet is ignored. 7438 7439Every @samp{DATA}, @samp{SPOS} and @samp{CLOSE} packet has a sequence 7440number. The sequence numbers are independent for each side. The first 7441packet sent by each side is always number 1. Each packet is numbered 7442one greater than the previous packet, modulo 32. 7443 7444Every packet has a local channel number and a remote channel number. 7445For all packets at least one channel number is zero. When a UUCP 7446command is sent to the remote system, it is assigned a non-zero local 7447channel number. All packets associated with that UUCP command sent by 7448the local system are given the selected local channel number. All 7449associated packets sent by the remote system are given the selected 7450number as the remote channel number. This permits each UUCP command 7451to be uniquely identified by the channel number on the originating 7452system, and therefore each UUCP package can associate all file data 7453and UUCP command responses with the appropriate command. This is a 7454requirement for bidirectional UUCP transfers. 7455 7456The protocol maintains a single global file position, which starts at 0. 7457For each incoming packet, any associated data is considered to occur at 7458the current file position, and the file position is incremented by the 7459amount of data contained. The exception is a packet of type 7460@samp{SPOS}, which is used to change the file position. The reason for 7461keeping track of the file position is described below. 7462 7463The header is as follows: 7464 7465@table @asis 7466@item @samp{\007} 7467Every packet begins with @kbd{^G}. 7468 7469@item @code{(@var{packet} << 3) + @var{locchan}} 7470The five bit packet number combined with the three bit local channel 7471number. @samp{DATA}, @samp{SPOS} and @samp{CLOSE} packets use the 7472packet sequence number for the @var{packet} field. @samp{NAK} packet 7473types use the @var{packet} field for the sequence number to be resent. 7474@samp{ACK} and @samp{SYNC} do not use the @var{packet} field, and 7475generally leave it set to 0. Packets which are not associated with a 7476UUCP command from the local system use a local channel number of 0. 7477 7478@item @code{(@var{ack} << 3) + @var{remchan}} 7479The five bit packet acknowledgement combined with the three bit remote 7480channel number. The packet acknowledgement is the number of the last 7481packet successfully received; it is used by all packet types. Packets 7482which are not sent in response to a UUCP command from the remote system 7483use a remote channel number of 0. 7484 7485@item @code{(@var{type} << 5) + (@var{caller} << 4) + @var{len1}} 7486The three bit packet type combined with the one bit packet direction 7487combined with the upper four bits of the data length. The packet 7488direction bit is always 1 for packets sent by the calling UUCP, and 0 7489for packets sent by the called UUCP. This prevents confusion caused by 7490echoed packets. 7491 7492@item @var{len2} 7493The lower eight bits of the data length. The twelve bits of data length 7494permit packets ranging in size from 0 to 4095 bytes. 7495 7496@item @var{check} 7497The exclusive or of the second through fifth bytes of the header. This 7498provides an additional check that the header is valid. 7499@end table 7500 7501If the data length is non-zero, the packet is immediately followed by 7502the specified number of data bytes. The data bytes are followed by a 7503four byte CRC 32 checksum, with the most significant byte first. The 7504CRC is calculated over the contents of the data field. 7505 7506The defined packet types are as follows: 7507 7508@table @asis 7509@item 0 @samp{DATA} 7510This is a plain data packet. 7511 7512@item 1 @samp{SYNC} 7513@samp{SYNC} packets are exchanged when the protocol is initialized, and 7514are described further below. @samp{SYNC} packets do not carry sequence 7515numbers (that is, the @var{packet} field is ignored). 7516 7517@item 2 @samp{ACK} 7518This is an acknowledgement packet. Since @samp{DATA} packets also carry 7519packet acknowledgements, @samp{ACK} packets are only used when one side 7520has no data to send. @samp{ACK} packets do not carry sequence numbers. 7521 7522@item 3 @samp{NAK} 7523This is a negative acknowledgement. This is sent when a packet is 7524received incorrectly, and means that the packet number appearing in the 7525@var{packet} field must be resent. @samp{NAK} packets do not carry 7526sequence numbers (the @var{packet} field is already used). 7527 7528@item 4 @samp{SPOS} 7529This packet changes the file position. The packet contains four bytes 7530of data holding the file position, most significant byte first. The 7531next packet received will be considered to be at the named file 7532position. 7533 7534@item 5 @samp{CLOSE} 7535When the protocol is shut down, each side sends a @samp{CLOSE} packet. 7536This packet does have a sequence number, which could be used to ensure 7537that all packets were correctly received (this is not needed by UUCP, 7538however, which uses the higher level @samp{H} command with an @samp{HY} 7539response). 7540@end table 7541 7542When the protocol starts up, both systems send a @samp{SYNC} packet. 7543The @samp{SYNC} packet includes at least three bytes of data. The first 7544two bytes are the maximum packet size the remote system should send, 7545most significant byte first. The third byte is the window size the 7546remote system should use. The remote system may send packets of any 7547size up to the maximum. If there is a fourth byte, it is the number of 7548channels the remote system may use (this must be between 1 and 7, 7549inclusive). Additional data bytes may be defined in the future. 7550 7551The window size is the number of packets that may be sent before a 7552packet is acknowledged. There is no requirement that every packet be 7553acknowledged; any acknowledgement is considered to acknowledge all 7554packets through the number given. In the current implementation, if one 7555side has no data to send, it sends an @samp{ACK} when half the window is 7556received. 7557 7558Note that the @samp{NAK} packet corresponds to the unused @samp{g} 7559protocol @samp{SRJ} packet type, rather than to the @samp{RJ} packet 7560type. When a @samp{NAK} is received, only the named packet should be 7561resent, not any subsequent packets. 7562 7563Note that if both sides have data to send, but a packet is lost, it is 7564perfectly reasonable for one side to continue sending packets, all of 7565which will acknowledge the last packet correctly received, while the 7566system whose packet was lost will be unable to send a new packet because 7567the send window will be full. In this circumstance, neither side will 7568time out and one side of the communication will be effectively shut down 7569for a while. Therefore, any system with outstanding unacknowledged 7570packets should arrange to time out and resend a packet even if data is 7571being received. 7572 7573Commands are sent as a sequence of data packets with a non-zero local 7574channel number. The last data packet for a command includes a trailing 7575null byte (normally a command will fit in a single data packet). Files 7576are sent as a sequence of data packets ending with one of length zero. 7577 7578The channel numbers permit a more efficient implementation of the UUCP 7579file send command. Rather than send the command and then wait for the 7580@samp{SY} response before sending the file, the file data is sent 7581beginning immediately after the @samp{S} command is sent. If an 7582@samp{SN} response is received, the file send is aborted, and a final 7583data packet of length zero is sent to indicate that the channel number 7584may be reused. If an @samp{SY} reponse with a file position indicator 7585is received, the file send adjusts to the file position; this is why the 7586protocol maintains a global file position. 7587 7588Note that the use of channel numbers means that each UUCP system may 7589send commands and file data simultaneously. Moreover, each UUCP system 7590may send multiple files at the same time, using the channel number to 7591disambiguate the data. Sending a file before receiving an 7592acknowledgement for the previous file helps to eliminate the round trip 7593delays inherent in other UUCP protocols. 7594 7595@ifset faq 7596@format 7597------------------------------ 7598 7599From: UUCP @samp{j} Protocol 7600Subject: UUCP @samp{j} Protocol 7601@end format 7602@end ifset 7603 7604@node j Protocol, x Protocol, i Protocol, Protocols 7605@section UUCP @samp{j} Protocol 7606@cindex @samp{j} protocol 7607@cindex protocol @samp{j} 7608 7609The @samp{j} protocol is a variant of the @samp{i} protocol. It was 7610also written by Ian Lance Taylor, and first appeared in Taylor UUCP 7611version 1.04. 7612 7613The @samp{j} protocol is a version of the @samp{i} protocol designed for 7614communication links which intercept a few characters, such as XON or 7615XOFF. It is not efficient to use it on a link which intercepts many 7616characters, such as a seven bit link. The @samp{j} protocol performs no 7617error correction or detection; that is presumed to be the responsibility 7618of the @samp{i} protocol. 7619 7620When the @samp{j} protocol starts up, each system sends a printable 7621ASCII string indicating which characters it wants to avoid using. The 7622string begins with the ASCII character @kbd{^} (octal 136) and ends with 7623the ASCII character @kbd{~} (octal 176). After sending this string, 7624each system looks for the corresponding string from the remote system. 7625The strings are composed of escape sequences: @samp{\ooo}, where 7626@samp{o} is an octal digit. For example, sending the string 7627@samp{^\021\023~} means that the ASCII XON and XOFF characters should be 7628avoided. The union of the characters described in both strings (the 7629string which is sent and the string which is received) is the set of 7630characters which must be avoided in this conversation. Avoiding a 7631printable ASCII character (octal 040 to octal 176, inclusive) is not 7632permitted. 7633 7634After the exchange of characters to avoid, the normal @samp{i} protocol 7635start up is done, and the rest of the conversation uses the normal 7636@samp{i} protocol. However, each @samp{i} protocol packet is wrapped to 7637become a @samp{j} protocol packet. 7638 7639Each @samp{j} protocol packet consists of a seven byte header, followed 7640by data bytes, followed by index bytes, followed by a one byte trailer. 7641The packet header looks like this: 7642 7643@table @asis 7644@item @kbd{^} 7645Every packet begins with the ASCII character @kbd{^}, octal 136. 7646 7647@item @var{high} 7648@itemx @var{low} 7649These two characters give the total number of bytes in the packet. Both 7650@var{high} and @var{low} are printable ASCII characters. The length of 7651the packet is @code{(@var{high} - 040) * 0100 + (@var{low} - 040)}, 7652where @code{040 <= @var{high} < 0177} and @code{040 <= @var{low} < 76530140}. This permits a length of 6079 bytes, but there is a further 7654restriction on packet size described below. 7655 7656@item @kbd{=} 7657The ASCII character @kbd{=}, octal 075. 7658 7659@item @var{data-high} 7660@itemx @var{data-low} 7661These two characters give the total number of data bytes in the packet. 7662The encoding is as described for @var{high} and @var{low}. The number 7663of data bytes is the size of the @samp{i} protocol packet wrapped inside 7664this @samp{j} protocol packet. 7665 7666@item @kbd{@@} 7667The ASCII character @kbd{@@}, octal 100. 7668@end table 7669 7670The header is followed by the number of data bytes given in 7671@var{data-high} and @var{data-low}. These data bytes are the @samp{i} 7672protocol packet which is being wrapped in the @samp{j} protocol packet. 7673However, each character in the @samp{i} protocol packet which the 7674@samp{j} protocol must avoid is transformed into a printable ASCII 7675character (recall that avoiding a printable ASCII character is not 7676permitted). Two index bytes are used for each character which must be 7677transformed. 7678 7679The index bytes immediately follow the data bytes. The index bytes are 7680created in pairs. Each pair of index bytes encodes the location of a 7681character in the @samp{i} protocol packet which was transformed to 7682become a printable ASCII character. Each pair of index bytes also 7683encodes the precise transformation which was performed. 7684 7685When the sender finds a character which must be avoided, it will 7686transform it using one or two operations. If the character is 0200 or 7687greater, it will subtract 0200. If the resulting character is less than 7688020, or is equal to 0177, it will xor by 020. The result is a printable 7689ASCII character. 7690 7691The zero based byte index of the character within the @samp{i} protocol 7692packet is determined. This index is turned into a two byte printable 7693ASCII index, @var{index-high} and @var{index-low}, such that the index 7694is @code{(@var{index-high} - 040) * 040 + (@var{index-low} - 040)}. 7695@var{index-low} is restricted such that @code{040 <= @var{index-low} < 76960100}. @var{index-high} is not permitted to be 0176, so @code{040 <= 7697@var{index-high} < 0176}. @var{index-low} is then modified to encode 7698the transformation: 7699 7700@itemize @bullet 7701@item If the character transformation only had to subtract 0200, then 7702@var{index-low} is used as is. 7703 7704@item If the character transformation only had to xor by 020, then 040 7705is added to @var{index-low}. 7706 7707@item If both operations had to be performed, then 0100 is added to 7708@var{index-low}. However, if the value of @var{index-low} was initially 7709077, then adding 0100 would result in 0177, which is not a printable 7710ASCII character. For that special case, @var{index-high} is set to 77110176, and @var{index-low} is set to the original value of 7712@var{index-high}. 7713@end itemize 7714 7715The receiver decodes the index bytes as follows (this is the reverse of 7716the operations performed by the sender, presented here for additional 7717clarity): 7718 7719@itemize @bullet 7720@item The first byte in the index is @var{index-high}, and the second is 7721@var{index-low}. 7722 7723@item If @code{040 <= @var{index-high} < 0176}, the index refers to the 7724data byte at position @code{(@var{index-high} - 040) * 040 + 7725@var{index-low} % 040}. 7726 7727@item If @code{040 <= @var{index-low} < 0100}, then 0200 must be added 7728to indexed byte. 7729 7730@item If @code{0100 <= @var{index-low} < 0140}, then 020 must be xor'ed 7731to the indexed byte. 7732 7733@item If @code{0140 <= @var{index-low} < 0177}, then 0200 must be added 7734to the indexed byte, and 020 must be xor'ed to the indexed byte. 7735 7736@item If @code{@var{index-high} == 0176}, the index refers to the data 7737byte at position @code{(@var{index-low} - 040) * 040 + 037}. 0200 must 7738be added to the indexed byte, and 020 must be xor'ed to the indexed 7739byte. 7740@end itemize 7741 7742This means the largest @samp{i} protocol packet which may be wrapped 7743inside a @samp{j} protocol packet is @code{(0175 - 040) * 040 + (077 - 7744040) == 3007} bytes. 7745 7746The final character in a @samp{j} protocol packet, following the index 7747bytes, is the ASCII character @kbd{~} (octal 176). 7748 7749The motivation behind using an indexing scheme, rather than escape 7750characters, is to avoid data movement. The sender may simply add a 7751header and a trailer to the @samp{i} protocol packet. Once the receiver 7752has loaded the @samp{j} protocol packet, it may scan the index bytes, 7753transforming the data bytes, and then pass the data bytes directly on to 7754the @samp{i} protocol routine. 7755 7756@ifset faq 7757@format 7758------------------------------ 7759 7760From: UUCP @samp{x} Protocol 7761Subject: UUCP @samp{x} Protocol 7762@end format 7763@end ifset 7764 7765@node x Protocol, y Protocol, j Protocol, Protocols 7766@section UUCP @samp{x} Protocol 7767@cindex @samp{x} protocol 7768@cindex protocol @samp{x} 7769 7770The @samp{x} protocol is used in Europe (and probably elsewhere) with 7771machines that contain an builtin X.25 card and can send eight bit data 7772transparently across X.25 circuits, without interference from the X.28 7773or X.29 layers. The protocol sends packets of 512 bytes, and relies on 7774a write of zero bytes being read as zero bytes without stopping 7775communication. It first appeared in the original System V UUCP 7776implementation. 7777 7778@ifset faq 7779@format 7780------------------------------ 7781 7782From: UUCP @samp{y} Protocol 7783Subject: UUCP @samp{y} Protocol 7784@end format 7785@end ifset 7786 7787@node y Protocol, d Protocol, x Protocol, Protocols 7788@section UUCP @samp{y} Protocol 7789@cindex @samp{y} protocol 7790@cindex protocol @samp{y} 7791 7792The @samp{y} protocol was developed by Jorge Cwik for use in FX UUCICO, 7793a PC uucico program. It is designed for communication lines which 7794handle error correction and flow control. It requires an eight bit 7795clean connection. It performs error detection, but not error 7796correction: when an error is detected, the line is dropped. It is a 7797streaming protocol, like the @samp{f} protocol; there are no packet 7798acknowledgements, so the protocol is efficient over a half-duplex 7799communication line such as PEP. 7800 7801Every packet contains a six byte header: 7802 7803@table @asis 7804@item sequence low byte 7805@itemx sequence high byte 7806A two byte sequence number, in little endian order. The first sequence 7807number is 0. Since the first packet is always a sync packet (described 7808below) the sequence number of the first data packet is always 1. Each 7809system counts sequence numbers independently. 7810 7811@item length low byte 7812@itemx length high byte 7813A two byte data length, in little endian order. If the high bit of the 7814sixteen bit field is clear, this is the number of data bytes which 7815follow the six byte header. If the high bit is set, there is no data, 7816and the length field is a type of control packet. 7817 7818@item checksum low byte 7819@itemx checksum high byte 7820A two byte checksum, in little endian order. The checksum is computed 7821over the data bytes. The checksum algorithm is described below. If 7822there are no data bytes, the checksum is sent as 0. 7823@end table 7824 7825When the protocol starts up, each side must send a sync packet. This is 7826a packet with a normal six byte header followed by data. The sequence 7827number of the sync packet should be 0. Currently at least four bytes of 7828data must be sent with the sync packet. Additional bytes should be 7829ignored. They are defined as follows: 7830 7831@table @asis 7832@item version 7833The version number of the protocol. Currently this must be 1. Larger 7834numbers should be ignored; it is the responsibility of the newer version 7835to accommodate the older one. 7836 7837@item packet size 7838The maximum data length to use divided by 256. This is sent as a single 7839byte. The maximum data length permitted is 32768, which would be sent 7840as 128. Customarily both systems will use the same maximum data length, 7841the lower of the two requested. 7842 7843@item flags low byte 7844@itemx flags high byte 7845Two bytes of flags. None are currently defined. These bytes should be 7846sent as 0, and ignored by the receiver. 7847@end table 7848 7849A length field with the high bit set is a control packet. The 7850following control packet types are defined: 7851 7852@table @asis 7853@item 0xfffe @samp{YPKT_ACK} 7854Acknowledges correct receipt of a file. 7855 7856@item 0xfffd @samp{YPKT_ERR} 7857Indicates an incorrect checksum. 7858 7859@item 0xfffc @samp{YPKT_BAD} 7860Indicates a bad sequence number, an invalid length, or some other error. 7861@end table 7862 7863If a control packet other than @samp{YPKT_ACK} is received, the 7864connection is dropped. If a checksum error is detected for a received 7865packet, a @samp{YPKT_ERR} control packet is sent, and the connection is 7866dropped. If a packet is received out of sequence, a @samp{YPKT_BAD} 7867control packet is sent, and the connection is dropped. 7868 7869The checksum is initialized to 0xffff. For each data byte in a packet 7870it is modified as follows (where @var{b} is the byte before it has been 7871transformed as described above): 7872 7873@example 7874 /* Rotate the checksum left. */ 7875 if ((ichk & 0x8000) == 0) 7876 ichk <<= 1; 7877 else 7878 @{ 7879 ichk <<= 1; 7880 ++ichk; 7881 @} 7882 7883 /* Add the next byte into the checksum. */ 7884 ichk += @var{b}; 7885@end example 7886 7887This is the same algorithm as that used by the @samp{f} protocol. 7888 7889A command is sent as a sequence of data packets followed by a null byte. 7890In the normal case, a command will fit into a single packet. The packet 7891should be exactly the length of the command plus a null byte. If the 7892command is too long, more packets are sent as required. 7893 7894A file is sent as a sequence of data packets, ending with a zero length 7895packet. The data packets may be of any length greater than zero and 7896less than or equal to the maximum permitted packet size specified in the 7897initial sync packet. 7898 7899After the zero length packet ending a file transfer has been received, 7900the receiving system sends a @samp{YPKT_ACK} control packet. The 7901sending system waits for the @samp{YPKT_ACK} control packet before 7902continuing; this wait should be done with a large timeout, since there 7903may be a considerable amount of data buffered on the communication path. 7904 7905@ifset faq 7906@format 7907------------------------------ 7908 7909From: UUCP @samp{d} Protocol 7910Subject: UUCP @samp{d} Protocol 7911@end format 7912@end ifset 7913 7914@node d Protocol, h Protocol, y Protocol, Protocols 7915@section UUCP @samp{d} Protocol 7916@cindex @samp{d} protocol 7917@cindex protocol @samp{d} 7918 7919The @samp{d} protocol is apparently used for DataKit muxhost (not 7920RS-232) connections. No file size is sent. When a file has been 7921completely transferred, a write of zero bytes is done; this must be read 7922as zero bytes on the other end. 7923 7924@ifset faq 7925@format 7926------------------------------ 7927 7928From: UUCP @samp{h} Protocol 7929Subject: UUCP @samp{h} Protocol 7930@end format 7931@end ifset 7932 7933@node h Protocol, v Protocol, d Protocol, Protocols 7934@section UUCP @samp{h} Protocol 7935@cindex @samp{h} protocol 7936@cindex protocol @samp{h} 7937 7938The @samp{h} protocol is apparently used in some places with HST modems. 7939It does no error checking, and is not that different from the @samp{t} 7940protocol. I don't know the details. 7941 7942@ifset faq 7943@format 7944------------------------------ 7945 7946From: UUCP @samp{v} Protocol 7947Subject: UUCP @samp{v} Protocol 7948@end format 7949@end ifset 7950 7951@node v Protocol, , h Protocol, Protocols 7952@section UUCP @samp{v} Protocol 7953@cindex @samp{v} protocol 7954@cindex protocol @samp{v} 7955 7956The @samp{v} protocol is used by UUPC/extended, a PC UUCP program. It 7957is simply a version of the @samp{g} protocol which supports packets of 7958any size, and also supports sending packets of different sizes during 7959the same conversation. There are many @samp{g} protocol implementations 7960which support both, but there are also many which do not. Using 7961@samp{v} ensures that everything is supported. 7962 7963@ifset faq 7964@format 7965------------------------------ 7966 7967From: Thanks 7968Subject: Thanks 7969@end format 7970 7971Besides the papers and information acknowledged at the top of this 7972article, the following people have contributed help, advice, 7973suggestions and information: 7974@format 7975 Earle Ake 513-429-6500 <ake@@Dayton.SAIC.COM> 7976 chris@@uuplus.com (Christopher J. Ambler) 7977 jhc@@iscp.bellcore.com (Jonathan Clark) 7978 jorge@@laser.satlink.net (Jorge Cwik) 7979 celit!billd@@UCSD.EDU (Bill Davidson) 7980 "Drew Derbyshire" <ahd@@kew.com> 7981 erik@@pdnfido.fidonet.org 7982 Matthew Farwell <dylan@@ibmpcug.co.uk> 7983 dgilbert@@gamiga.guelphnet.dweomer.org (David Gilbert) 7984 kherron@@ms.uky.edu (Kenneth Herron) 7985 Mike Ipatow <mip@@fido.itc.e-burg.su> 7986 Romain Kang <romain@@pyramid.com> 7987 "Jonathan I. Kamens" <jik@@GZA.COM> 7988 "David J. MacKenzie" <djm@@eng.umd.edu> 7989 jum@@helios.de (Jens-Uwe Mager) 7990 peter@@xpoint.ruessel.sub.org (Peter Mandrella) 7991 david nugent <david@@csource.oz.au> 7992 Stephen.Page@@prg.oxford.ac.uk 7993 joey@@tessi.UUCP (Joey Pruett) 7994 James Revell <revell@@uunet.uu.net> 7995 Larry Rosenman <ler@@lerami.lerctr.org> 7996 Rich Salz <rsalz@@bbn.com> 7997 evesg@@etlrips.etl.go.jp (Gjoen Stein) 7998 kls@@ditka.Chicago.COM (Karl Swartz) 7999 Dima Volodin <dvv@@hq.demos.su> 8000 John.Woods@@proteon.com (John Woods) 8001 jon@@console.ais.org (Jon Zeeff) 8002 Eric Ziegast <ziegast@@uunet.uu.net> 8003 8004------------------------------ 8005 8006End of UUCP Internals Frequently Asked Questions 8007****************************** 8008@end format 8009@end ifset 8010@c END-OF-FAQ 8011 8012@node Hacking, Acknowledgements, Protocols, Top 8013@chapter Hacking Taylor UUCP 8014 8015This chapter provides the briefest of guides to the Taylor UUCP source 8016code itself. 8017 8018@menu 8019* System Dependence:: System Dependence 8020* Naming Conventions:: Naming Conventions 8021* Patches:: Patches 8022@end menu 8023 8024@node System Dependence, Naming Conventions, Hacking, Hacking 8025@section System Dependence 8026 8027The code is carefully segregated into a system independent portion and a 8028system dependent portion. The system dependent code is in the 8029@file{unix} subdirectory, and also in the file @file{sysh.unx} (also 8030known as @file{sysdep.h}). 8031 8032With the right configuration parameters, the system independent code 8033calls only ANSI C functions. Some of the less common ANSI C functions 8034are also provided in the @file{lib} directory. The replacement function 8035@code{strtol} in @file{lib/strtol.c} assumes that the characters @kbd{A} 8036to @kbd{F} and @kbd{a} to @kbd{f} appear in strictly sequential order. 8037The function @code{igradecmp} in @file{uuconf/grdcmp.c} assumes that the 8038upper and lower case letters appear in order. Both assumptions are true 8039for ASCII and EBCDIC, but neither is guaranteed by ANSI C. Disregarding 8040these caveats, I believe that the system independent portion of the code 8041is strictly conforming. 8042 8043That's not too exciting, since all the work is done in the system 8044dependent code. I think that this code can conform to POSIX 1003.1, 8045given the right compilation parameters. I'm a bit less certain about 8046this, though. 8047 8048The code has been used on a 16 bit segmented system with no function 8049prototypes, so I'm fairly certain that all casts to long and pointers 8050are done when necessary. 8051 8052@node Naming Conventions, Patches, System Dependence, Hacking 8053@section Naming Conventions 8054 8055I use a modified Hungarian naming convention for my variables and 8056functions. As with all naming conventions, the code is rather opaque if 8057you are not familiar with it, but becomes clear and easy to use with 8058time. 8059 8060The first character indicates the type of the variable (or function 8061return value). Sometimes additional characters are used. I use the 8062following type prefixes: 8063 8064@table @samp 8065@item a 8066array; the next character is the type of an element 8067@item b 8068byte or character 8069@item c 8070count of something 8071@item e 8072stdio FILE * 8073@item f 8074boolean 8075@item i 8076generic integer 8077@item l 8078double 8079@item o 8080file descriptor (as returned by open, creat, etc.) 8081@item p 8082generic pointer 8083@item q 8084pointer to structure 8085@item s 8086structure 8087@item u 8088void (function return values only) 8089@item z 8090character string 8091@end table 8092 8093A generic pointer (@code{p}) is sometimes a @code{void *}, sometimes a 8094function pointer in which case the prefix is pf, and sometimes a pointer 8095to another type, in which case the next character is the type to which 8096it points (pf is overloaded). 8097 8098An array of strings (@code{char *[]}) would be named @code{az} (array of 8099string). If this array were passed to a function, the function 8100parameter would be named @code{paz} (pointer to array of string). 8101 8102Note that the variable name prefixes do not necessarily indicate the 8103type of the variable. For example, a variable prefixed with @kbd{i} may 8104be int, long or short. Similarly, a variable prefixed with @kbd{b} may 8105be a char or an int; for example, the return value of @code{getchar} 8106would be caught in an int variable prefixed with @kbd{b}. 8107 8108For a non-local variable (extern or file static), the first character 8109after the type prefix is capitalized. 8110 8111Most static variables and functions use another letter after the type 8112prefix to indicate which module they come from. This is to help 8113distinguish different names in the debugger. For example, all static 8114functions in @file{protg.c}, the @samp{g} protocol source code, use a 8115module prefix of @samp{g}. This isn't too useful, as a number of 8116modules use a module prefix of @samp{s}. 8117 8118@node Patches, , Naming Conventions, Hacking 8119@section Patches 8120 8121I am always grateful for any patches sent in. Much of the flexibility 8122and portability of the code is due to other people. Please do not 8123hesitate to send me any changes you have found necessary or useful. 8124 8125When sending a patch, please send the output of the Unix @command{diff} 8126program invoked with the @option{-c} option (if you have the GNU version 8127of @command{diff}, use the @option{-p} option). Always invoke 8128@command{diff} with the original file first and the modified file 8129second. 8130 8131If your @command{diff} does not support @option{-c} (or you don't have 8132@command{diff}), send a complete copy of the modified file (if you have 8133just changed a single function, you can just send the new version of the 8134function). In particular, please do not send @command{diff} output 8135without the @option{-c} option, as it is useless. 8136 8137If you have made a number of changes, it is very convenient for me if 8138you send each change as a separate mail message. Sometimes I will think 8139that one change is useful but another one is not. If they are in 8140different messages it is much easier for me to apply one but not the 8141other. 8142 8143I rarely apply the patches directly. Instead I work my way through the 8144hunks and apply each one separately. This ensures that the naming 8145remains consistent, and that I understand all the code. 8146 8147If you can not follow all these rules, then don't. But if you do, it 8148makes it more likely that I will incorporate your changes. I am not 8149paid for my UUCP work, and my available time is unfortunately very 8150restricted. The package is important to me, and I do what I can, but I 8151can not do all that I would like, much less all that everybody else 8152would like. 8153 8154Finally, please do not be offended if I do not reply to messages for 8155some time, even a few weeks. I am often behind on my mail, and if I 8156think your message deserves a considered reply I will often put it aside 8157until I have time to deal with it. 8158 8159@node Acknowledgements, Index (concepts), Hacking, Top 8160@chapter Acknowledgements 8161 8162This is a list of people who gave help or suggestions while I was 8163working on the Taylor UUCP project. Appearance on this list does not 8164constitute endorsement of the program, particularly since some of the 8165comments were criticisms. I've probably left some people off, and I 8166apologize for any oversight; it does not mean your contribution was 8167unappreciated. 8168 8169First of all, I would like to thank the people at Infinity Development 8170Systems (formerly AIRS, which lives on in the domain name) for 8171permitting me to use their computers and @file{uunet} access. I would 8172also like to thank Richard Stallman @email{rms@@gnu.org} for founding 8173the Free Software Foundation, and John Gilmore @email{gnu@@toad.com} 8174for writing the initial version of gnuucp (based on uuslave) which was a 8175direct inspiration for this somewhat larger project. Chip Salzenberg 8176@email{chip@@tct.com} has contributed many patches. 8177@ifinfo 8178Franc,ois 8179@end ifinfo 8180@iftex 8181@tex 8182Fran\c cois 8183@end tex 8184@end iftex 8185Pinard @email{pinard@@iro.umontreal.ca} tirelessly tested the code and 8186suggested many improvements. He also put together the initial version 8187of this manual. Doug Evans contributed the zmodem protocol. Marc 8188Boucher @email{marc@@CAM.ORG} contributed the code supporting the pipe 8189port type. Jorge Cwik @email{jorge@@laser.satlink.net} contributed the 8190@samp{y} protocol code. Finally, Verbus M. Counts 8191@email{verbus@@westmark.com} and Centel Federal Systems, Inc., deserve 8192special thanks, since they actually paid me money to port this code to 8193System III. 8194 8195In alphabetical order: 8196 8197@example 8198Meno Abels @email{Meno.Abels@@Technical.Adviser.com} 8199"Earle F. Ake - SAIC" @email{ake@@Dayton.SAIC.COM} 8200@email{mra@@searchtech.com} (Michael Almond) 8201@email{cambler@@zeus.calpoly.edu} (Christopher J. Ambler) 8202Brian W. Antoine @email{briana@@tau-ceti.isc-br.com} 8203@email{jantypas@@soft21.s21.com} (John Antypas) 8204@email{james@@bigtex.cactus.org} (James Van Artsdalen) 8205@email{jima@@netcom.com} (Jim Avera) 8206@email{nba@@sysware.DK} (Niels Baggesen) 8207@email{uunet!hotmomma!sdb} (Scott Ballantyne) 8208Zacharias Beckman @email{zac@@dolphin.com} 8209@email{mike@@mbsun.ann-arbor.mi.us} (Mike Bernson) 8210@email{bob@@usixth.sublink.org} (Roberto Biancardi) 8211@email{statsci!scott@@coco.ms.washington.edu} (Scott Blachowicz) 8212@email{bag%wood2.cs.kiev.ua@@relay.ussr.eu.net} (Andrey G Blochintsev) 8213@email{spider@@Orb.Nashua.NH.US} (Spider Boardman) 8214Gregory Bond @email{gnb@@bby.com.au} 8215Marc Boucher @email{marc@@CAM.ORG} 8216Ard van Breemen @email{ard@@cstmel.hobby.nl} 8217@email{dean@@coplex.com} (Dean Brooks) 8218@email{jbrow@@radical.com} (Jim Brownfield) 8219@email{dave@@dlb.com} (Dave Buck) 8220@email{gordon@@sneaky.lonestar.org} (Gordon Burditt) 8221@email{dburr@@sbphy.physics.ucsb.edu} (Donald Burr) 8222@email{mib@@gnu.ai.mit.edu} (Michael I Bushnell) 8223Brian Campbell @email{brianc@@quantum.on.ca} 8224Andrew A. Chernov @email{ache@@astral.msk.su} 8225@email{jhc@@iscp.bellcore.com} (Jonathan Clark) 8226@email{mafc!frank@@bach.helios.de} (Frank Conrad) 8227Ed Carp @email{erc@@apple.com} 8228@email{mpc@@mbs.linet.org} (Mark Clements) 8229@email{verbus@@westmark.westmark.com} (Verbus M. Counts) 8230@email{cbmvax!snark.thyrsus.com!cowan} (John Cowan) 8231Bob Cunningham @email{bob@@soest.hawaii.edu} 8232@email{jorge@@laser.satlink.net} (Jorge Cwik) 8233@email{kdburg@@incoahe.hanse.de} (Klaus Dahlenburg) 8234Damon @email{d@@exnet.co.uk} 8235@email{celit!billd@@UCSD.EDU} (Bill Davidson) 8236@email{hubert@@arakis.fdn.org} (Hubert Delahaye) 8237@email{markd@@bushwire.apana.org.au} (Mark Delany) 8238Allen Delaney @email{allen@@brc.ubc.ca} 8239Gerriet M. Denkmann @email{gerriet@@hazel.north.de} 8240@email{denny@@dakota.alisa.com} (Bob Denny) 8241Drew Derbyshire @email{ahd@@kew.com} 8242@email{ssd@@nevets.oau.org} (Steven S. Dick) 8243@email{gert@@greenie.gold.sub.org} (Gert Doering) 8244@email{gemini@@geminix.in-berlin.de} (Uwe Doering) 8245Hans-Dieter Doll @email{hd2@@Insel.DE} 8246@email{deane@@deane.teleride.on.ca} (Dean Edmonds) 8247Mark W. Eichin @email{eichin@@cygnus.com} 8248@email{erik@@pdnfido.fidonet.org} 8249Andrew Evans @email{andrew@@airs.com} 8250@email{dje@@cygnus.com} (Doug Evans) 8251Marc Evans @email{marc@@synergytics.com} 8252Dan Everhart @email{dan@@dyndata.com} 8253@email{kksys!kegworks!lfahnoe@@cs.umn.edu} (Larry Fahnoe) 8254Matthew Farwell @email{dylan@@ibmpcug.co.uk} 8255@email{fenner@@jazz.psu.edu} (Bill Fenner) 8256@email{jaf@@inference.com} (Jose A. Fernandez) 8257"David J. Fiander" @email{golem!david@@news.lsuc.on.ca} 8258Thomas Fischer @email{batman@@olorin.dark.sub.org} 8259Mister Flash @email{flash@@sam.imash.ras.ru} 8260@email{louis@@marco.de} (Ju"rgen Fluk) 8261@email{erik@@eab.retix.com} (Erik Forsberg) 8262@email{andy@@scp.caltech.edu} (Andy Fyfe) 8263Lele Gaifax @email{piggy@@idea.sublink.org} 8264@email{Peter.Galbavy@@micromuse.co.uk} 8265@email{hunter@@phoenix.pub.uu.oz.au} (James Gardiner [hunter]) 8266Terry Gardner @email{cphpcom!tjg01} 8267@email{dgilbert@@gamiga.guelphnet.dweomer.org} (David Gilbert) 8268@email{ol@@infopro.spb.su} (Oleg Girko) 8269@email{jimmy@@tokyo07.info.com} (Jim Gottlieb) 8270Benoit Grange @email{ben@@fizz.fdn.org} 8271@email{elg@@elgamy.jpunix.com} (Eric Lee Green) 8272@email{ryan@@cs.umb.edu} (Daniel R. Guilderson) 8273@email{greg@@gagme.chi.il.us} (Gregory Gulik) 8274Richard H. Gumpertz @email{rhg@@cps.com} 8275Scott Guthridge @email{scooter@@cube.rain.com} 8276Michael Haberler @email{mah@@parrot.prv.univie.ac.at} 8277Daniel Hagerty @email{hag@@eddie.mit.edu} 8278@email{jh@@moon.nbn.com} (John Harkin) 8279@email{guy@@auspex.auspex.com} (Guy Harris) 8280@email{hsw1@@papa.attmail.com} (Stephen Harris) 8281Tom Ivar Helbekkmo @email{tih@@Norway.EU.net} 8282Petri Helenius @email{pete@@fidata.fi} 8283@email{gabe@@edi.com} (B. Gabriel Helou) 8284Bob Hemedinger @email{bob@@dalek.mwc.com} 8285Andrew Herbert @email{andrew@@werple.pub.uu.oz.au} 8286@email{kherron@@ms.uky.edu} (Kenneth Herron) 8287Peter Honeyman @email{honey@@citi.umich.edu} 8288@email{jhood@@smoke.marlboro.vt.us} (John Hood) 8289Mark Horsburgh @email{markh@@kcbbs.gen.nz} 8290John Hughes @email{john@@Calva.COM} 8291Mike Ipatow @email{mip@@fido.itc.e-burg.su} 8292Bill Irwin @email{bill@@twg.bc.ca} 8293@email{pmcgw!personal-media.co.jp!ishikawa} (Chiaki Ishikawa) 8294@email{ai@@easy.in-chemnitz.de} (Andreas Israel) 8295@email{iverson@@lionheart.com} (Tim Iverson) 8296@email{bei@@dogface.austin.tx.us} (Bob Izenberg) 8297@email{djamiga!djjames@@fsd.com} (D.J.James) 8298Rob Janssen @email{cmgit!rob@@relay.nluug.nl} 8299@email{harvee!esj} (Eric S Johansson) 8300Kevin Johnson @email{kjj@@pondscum.phx.mcd.mot.com} 8301@email{rj@@rainbow.in-berlin.de} (Robert Joop) 8302Alan Judge @email{aj@@dec4ie.IEunet.ie} 8303@email{chris@@cj_net.in-berlin.de} (Christof Junge) 8304Romain Kang @email{romain@@pyramid.com} 8305@email{tron@@Veritas.COM} (Ronald S. Karr) 8306Brendan Kehoe @email{brendan@@cs.widener.edu} 8307@email{warlock@@csuchico.edu} (John Kennedy) 8308@email{kersing@@nlmug.nl.mugnet.org} (Jac Kersing) 8309@email{ok@@daveg.PFM-Mainz.de} (Olaf Kirch) 8310Gabor Kiss @email{kissg@@sztaki.hu} 8311@email{gero@@gkminix.han.de} (Gero Kuhlmann) 8312@email{rob@@pact.nl} (Rob Kurver) 8313"C.A. Lademann" @email{cal@@zls.gtn.com} 8314@email{kent@@sparky.IMD.Sterling.COM} (Kent Landfield) 8315Tin Le @email{tin@@saigon.com} 8316@email{lebaron@@inrs-telecom.uquebec.ca} (Gregory LeBaron) 8317@email{karl@@sugar.NeoSoft.Com} (Karl Lehenbauer) 8318@email{alex@@hal.rhein-main.de} (Alexander Lehmann) 8319@email{merlyn@@digibd.com} (Merlyn LeRoy) 8320@email{clewis@@ferret.ocunix.on.ca} (Chris Lewis) 8321@email{gdonl@@ssi1.com} (Don Lewis) 8322@email{libove@@libove.det.dec.com} (Jay Vassos-Libove) 8323@email{bruce%blilly@@Broadcast.Sony.COM} (Bruce Lilly) 8324Godfrey van der Linden @email{Godfrey_van_der_Linden@@NeXT.COM} 8325Ted Lindgreen @email{tlindgreen@@encore.nl} 8326@email{andrew@@cubetech.com} (Andrew Loewenstern) 8327"Arne Ludwig" @email{arne@@rrzbu.hanse.de} 8328Matthew Lyle @email{matt@@mips.mitek.com} 8329@email{djm@@eng.umd.edu} (David J. MacKenzie) 8330John R MacMillan @email{chance!john@@sq.sq.com} 8331@email{jum@@helios.de} (Jens-Uwe Mager) 8332Giles D Malet @email{shrdlu!gdm@@provar.kwnet.on.ca} 8333@email{mem@@mv.MV.COM} (Mark E. Mallett) 8334@email{pepe@@dit.upm.es} (Jose A. Manas) 8335@email{peter@@xpoint.ruessel.sub.org} (Peter Mandrella) 8336@email{martelli@@cadlab.sublink.org} (Alex Martelli) 8337W Christopher Martin @email{wcm@@geek.ca.geac.com} 8338Yanek Martinson @email{yanek@@mthvax.cs.miami.edu} 8339@email{thomasm@@mechti.wupper.de} (Thomas Mechtersheimer) 8340@email{jm@@aristote.univ-paris8.fr} (Jean Mehat) 8341@email{me@@halfab.freiburg.sub.org} (Udo Meyer) 8342@email{les@@chinet.chi.il.us} (Leslie Mikesell) 8343@email{bug@@cyberdex.cuug.ab.ca} (Trever Miller) 8344@email{mmitchel@@digi.lonestar.org} (Mitch Mitchell) 8345Emmanuel Mogenet @email{mgix@@krainte.jpn.thomson-di.fr} 8346@email{rmohr@@infoac.rmi.de} (Rupert Mohr) 8347Jason Molenda @email{molenda@@sequent.com} 8348@email{ianm@@icsbelf.co.uk} (Ian Moran) 8349@email{jmorriso@@bogomips.ee.ubc.ca} (John Paul Morrison) 8350@email{brian@@ilinx.wimsey.bc.ca} (Brian J. Murrell) 8351@email{service@@infohh.rmi.de} (Dirk Musstopf) 8352@email{lyndon@@cs.athabascau.ca} (Lyndon Nerenberg) 8353@email{rolf@@saans.north.de} (Rolf Nerstheimer) 8354@email{tom@@smart.bo.open.de} (Thomas Neumann) 8355@email{mnichols@@pacesetter.com} 8356Richard E. Nickle @email{trystro!rick@@Think.COM} 8357@email{stephan@@sunlab.ka.sub.org} (Stephan Niemz) 8358@email{raymond@@es.ele.tue.nl} (Raymond Nijssen) 8359@email{nolan@@helios.unl.edu} (Michael Nolan) 8360david nugent @email{david@@csource.oz.au} 8361Jim O'Connor @email{jim@@bahamut.fsc.com} 8362@email{kevin%kosman.uucp@@nrc.com} (Kevin O'Gorman) 8363Petri Ojala @email{ojala@@funet.fi} 8364@email{oneill@@cs.ulowell.edu} (Brian 'Doc' O'Neill) 8365@email{Stephen.Page@@prg.oxford.ac.uk} 8366Peter Palfrader @email{peter@@palfrader.org} 8367@email{abekas!dragoman!mikep@@decwrl.dec.com} (Mike Park) 8368Tim Peiffer @email{peiffer@@cs.umn.edu} 8369@email{don@@blkhole.resun.com} (Don Phillips) 8370"Mark Pizzolato 415-369-9366" @email{mark@@infocomm.com} 8371John Plate @email{plate@@infotek.dk} 8372@email{dplatt@@ntg.com} (Dave Platt) 8373@email{eldorado@@tharr.UUCP} (Mark Powell) 8374Mark Powell @email{mark@@inet-uk.co.uk} 8375@email{pozar@@kumr.lns.com} (Tim Pozar) 8376@email{joey@@tessi.UUCP} (Joey Pruett) 8377Paul Pryor @email{ptp@@fallschurch-acirs2.army.mil} 8378@email{putsch@@uicc.com} (Jeff Putsch) 8379@email{ar@@nvmr.robin.de} (Andreas Raab) 8380Vadim Radionov @email{rvp@@zfs.lg.ua} 8381Jarmo Raiha @email{jarmo@@ksvltd.FI} 8382James Revell @email{revell@@uunet.uu.net} 8383Scott Reynolds @email{scott@@clmqt.marquette.Mi.US} 8384@email{mcr@@Sandelman.OCUnix.On.Ca} (Michael Richardson) 8385Kenji Rikitake @email{kenji@@rcac.astem.or.jp} 8386@email{arnold@@cc.gatech.edu} (Arnold Robbins) 8387@email{steve@@Nyongwa.cam.org} (Steve M. Robbins) 8388Ollivier Robert @email{Ollivier.Robert@@keltia.frmug.fr.net} 8389Serge Robyns @email{sr@@denkart.be} 8390Lawrence E. Rosenman @email{ler@@lerami.lerctr.org} 8391Jeff Ross @email{jeff@@wisdom.bubble.org} 8392Aleksey P. Rudnev @email{alex@@kiae.su} 8393"Heiko W.Rupp" @email{hwr@@pilhuhn.ka.sub.org} 8394@email{wolfgang@@wsrcc.com} (Wolfgang S. Rupprecht) 8395@email{tbr@@tfic.bc.ca} (Tom Rushworth) 8396Peter Rye @email{prye@@picu-sgh.demon.co.uk} 8397@email{jsacco@@ssl.com} (Joseph E. Sacco) 8398@email{rsalz@@bbn.com} (Rich Salz) 8399Curt Sampson @email{curt@@portal.ca} 8400@email{sojurn!mike@@hobbes.cert.sei.cmu.edu} (Mike Sangrey) 8401Nickolay Saukh @email{nms@@ussr.EU.net} 8402Ignatios Souvatzis @email{is@@jocelyn.rhein.de} 8403@email{heiko@@lotte.sax.de} (Heiko Schlittermann) 8404Eric Schnoebelen @email{eric@@cirr.com} 8405@email{russell@@alpha3.ersys.edmonton.ab.ca} (Russell Schulz) 8406@email{scott@@geom.umn.edu} 8407Igor V. Semenyuk @email{iga@@argrd0.argonaut.su} 8408Christopher Sawtell @email{chris@@gerty.equinox.gen.nz} 8409@email{schuler@@bds.sub.org} (Bernd Schuler) 8410@email{uunet!gold.sub.org!root} (Christian Seyb) 8411Marcus Shang @email{marcus.shang@@canada.cdev.com} 8412@email{s4mjs!mjs@@nirvo.nirvonics.com} (M. J. Shannon Jr.) 8413@email{shields@@tembel.org} (Michael Shields) 8414@email{peter@@ficc.ferranti.com} (Peter da Silva) 8415@email{vince@@victrola.sea.wa.us} (Vince Skahan) 8416@email{frumious!pat} (Patrick Smith) 8417@email{roscom!monty@@bu.edu} (Monty Solomon) 8418@email{sommerfeld@@orchard.medford.ma.us} (Bill Sommerfeld) 8419Julian Stacey @email{stacey@@guug.de} 8420@email{evesg@@etlrips.etl.go.jp} (Gjoen Stein) 8421Harlan Stenn @email{harlan@@mumps.pfcs.com} 8422Ralf Stephan @email{ralf@@ark.abg.sub.org} 8423@email{johannes@@titan.westfalen.de} (Johannes Stille) 8424@email{chs@@antic.apu.fi} (Hannu Strang) 8425@email{ralf@@reswi.ruhr.de} (Ralf E. Stranzenbach) 8426@email{sullivan@@Mathcom.com} (S. Sullivan) 8427Shigeya Suzuki @email{shigeya@@dink.foretune.co.jp} 8428@email{kls@@ditka.Chicago.COM} (Karl Swartz) 8429@email{swiers@@plains.NoDak.edu} 8430Oleg Tabarovsky @email{olg@@olghome.pccentre.msk.su} 8431@email{ikeda@@honey.misystems.co.jp} (Takatoshi Ikeda) 8432John Theus @email{john@@theus.rain.com} 8433@email{rd@@aii.com} (Bob Thrush) 8434ppKarsten Thygesen @email{karthy@@dannug.dk} 8435Graham Toal @email{gtoal@@pizzabox.demon.co.uk} 8436@email{rmtodd@@servalan.servalan.com} (Richard Todd) 8437Michael Ju. Tokarev @email{mjt@@tls.msk.ru} 8438Martin Tomes @email{mt00@@controls.eurotherm.co.uk} 8439Len Tower @email{tower-prep@@ai.mit.edu} 8440Mark Towfiq @email{justice!towfiq@@Eingedi.Newton.MA.US} 8441@email{mju@@mudos.ann-arbor.mi.us} (Marc Unangst) 8442Matthias Urlichs @email{urlichs@@smurf.noris.de} 8443Tomi Vainio @email{tomppa@@fidata.fi} 8444@email{a3@@a3.xs4all.nl} (Adri Verhoef) 8445Andrew Vignaux @email{ajv@@ferrari.datamark.co.nz} 8446@email{vogel@@omega.ssw.de} (Andreas Vogel) 8447Dima Volodin @email{dvv@@hq.demos.su} 8448@email{jos@@bull.nl} (Jos Vos) 8449@email{jv@@nl.net} (Johan Vromans) 8450David Vrona @email{dave@@sashimi.wwa.com} 8451@email{Marcel.Waldvogel@@nice.usergroup.ethz.ch} (Marcel Waldvogel) 8452@email{steve@@nshore.org} (Stephen J. Walick) 8453@email{syd@@dsinc.dsi.com} (Syd Weinstein) 8454@email{gerben@@rna.indiv.nluug.nl} (Gerben Wierda) 8455@email{jbw@@cs.bu.edu} (Joe Wells) 8456@email{frnkmth!twwells.com!bill} (T. William Wells) 8457Peter Wemm @email{Peter_Wemm@@zeus.dialix.oz.au} 8458@email{mauxci!eci386!woods@@apple.com} (Greg A. Woods) 8459@email{John.Woods@@proteon.com} (John Woods) 8460Michael Yu.Yaroslavtsev @email{mike@@yaranga.ipmce.su} 8461Alexei K. Yushin @email{root@@july.elis.crimea.ua} 8462@email{jon@@console.ais.org} (Jon Zeeff) 8463Matthias Zepf @email{agnus@@amylnd.stgt.sub.org} 8464Eric Ziegast @email{uunet!ziegast} 8465@end example 8466 8467@node Index (concepts), Index (configuration file), Acknowledgements, Top 8468@unnumbered Concept Index 8469 8470@printindex cp 8471 8472@node Index (configuration file), , Index (concepts), Top 8473@unnumbered Configuration File Index 8474 8475@printindex fn 8476 8477@contents 8478@bye 8479