The uucico program will perform the following major functions:
Uucico may be started in several ways;
When started by method a, b or c, the program is considered to be in MASTER mode. In this mode, a connection will be made to a remote system. If started by a remote system (method d), the program is considered to be in SLAVE mode.
The MASTER mode will operate in one of two ways. If no system name is specified (-s option not specified) the program will scan the spool directory for systems to call. If a system name is specified, that system will be called, and work will only be done for that system.
The uucico program is generally started by another program. There are several options used for execution:
The following options are used primarily for debugging:
The next part of this section will describe the major steps within the uucico program.
The names of the work related files in the spool directory have format
where:
The file
would be a work file for a file transfer between the local machine and the ``res45'' machine.
The scan for work is done by looking through the spool directory for work files (files with prefix ``C.''). A list is made of all systems to be called. Uucico will then call each system and process all work files.
The call is made using information from several files which reside in the uucp program directory. At the start of the call process, a lock is set to forbid multiple conversations between the same two systems.
The system name is found in the L.sys file. The information contained for each system is;
The time field is checked against the present time to see if the call should be made.
The phone number may contain abbreviations (e.g. mh, py, boston) which get translated into dial sequences using the L-dialcodes file.
The L-devices file is scanned using fields [3] and [4] from the L.sys file to find an available device for the call. The program will try all devices which satisfy [3] and [4] until the call is made, or no more devices can be tried. If a device is successfully opened, a lock file is created so that another copy of uucico will not try to use it. If the call is complete, the login information (field [6] of L.sys) is used to login.
The conversation between the two uucico programs begins with a handshake started by the called, SLAVE, system. The SLAVE sends a message to let the MASTER know it is ready to receive the system identification and conversation sequence number. The response from the MASTER is verified by the SLAVE and if acceptable, protocol selection begins. The SLAVE can also reply with a ``call-back required'' message in which case, the current conversation is terminated.
The remote system sends a message
where proto-list is a string of characters, each representing a line protocol.
The calling program checks the proto-list for a letter corresponding to an available line protocol and returns a use-protocol message. The use-protocol message is
where code is either a one character protocol letter or N which means there is no common protocol.
The initial roles ( MASTER or SLAVE ) for the work processing are the mode in which each program starts. (The MASTER has been specified by the ``-r1'' uucico option.) The MASTER program does a work search similar to the one used in the ``Scan For Work'' section.
There are five messages used during the work processing, each specified by the first character of the message. They are;
The MASTER will send R, S or X messages until all work from the spool directory is complete, at which point an H message will be sent. The SLAVE will reply with SY, SN, RY, RN, HY, HN, XY, XN, corresponding to yes or no for each request.
The send and receive replies are based on permission to access the requested file/directory using the USERFILE and read/write permissions of the file/directory. After each file is copied into the spool directory of the receiving system, a copy-complete message is sent by the receiver of the file. The message CY will be sent if the file has successfully been moved from the temporary spool file to the actual destination. Otherwise, a CN message is sent. (In the case of CN, the transferred file will be in the spool directory with a name beginning with ``TM'.) The requests and results are logged on both systems.
The hangup response is determined by the SLAVE program by a work scan of the spool directory. If work for the remote system exists in the SLAVE's spool directory, an HN message is sent and the programs switch roles. If no work exists, an HY response is sent.
When a HY message is received by the MASTER it is echoed back to the SLAVE and the protocols are turned off. Each program sends a final ``OO'' message to the other. The original SLAVE program will clean up and terminate. The MASTER will proceed to call other systems and process work as long as possible or terminate if a -s option was specified.