Go forward to dial File.
Go backward to sys File.
Go up to Configuration Files.
The Port Configuration File
===========================
The port files may be used to name and describe ports. By default
there is a single port file, named `port' in the directory
NEWCONFIGDIR. This may be overridden by the `portfile' command in the
main configuration file; see See Configuration File Names.
Any commands in a port file before the first `port' command specify
defaults for all ports in the file; however, since the `type' command
must appear before all other commands for a port, the defaults are only
useful if all ports in the file are of the same type (this restriction
may be lifted in a later version). All commands after a `port' command
up to the next `port' command then describe that port. There are
different types of ports; each type supports its own set of commands.
Each command indicates which types of ports support it. There may be
many ports with the same name; if a system requests a port by name then
each port with that name will be tried until an unlocked one is found.
`port STRING'
Introduces and names a port.
`type STRING'
Define the type of port. The default is `modem'. If this command
appears, it must immediately follow the `port' command. The type
defines what commands are subsequently allowed. Currently the
types are:
`modem'
For a modem hookup.
`stdin'
For a connection through standard input and standard output,
as when `uucico' is run as a login shell.
`direct'
For a direct connection to another system.
`tcp'
For a connection using TCP.
`tli'
For a connection using TLI.
`pipe'
For a connection through a pipe running another program.
`protocol STRING'
Specify a list of protocols to use for this port. This is just
like the corresponding command for a system (*note Protocol
Selection::.). A protocol list for a system takes precedence over
a list for a port.
`protocol-parameter CHARACTER STRINGS [ any type ]'
The same command as the `protocol-parameter' command used for
systems (see Protocol Selection.). This one takes precedence.
`seven-bit BOOLEAN [ any type ]'
This is only used during protocol negotiation; if the argument is
true, it forces the selection of a protocol which works across a
seven-bit link. It does not prevent eight bit characters from
being transmitted. The default is false.
`reliable BOOLEAN [ any type ]'
This is only used during protocol negotiation; if the argument is
false, it forces the selection of a protocol which works across an
unreliable communication link. The default is true. It would be
more common to specify this for a dialer rather than a port.
`half-duplex BOOLEAN [ any type ]'
If the argument is true, it means that the port only supports
half-duplex connections. This only affects bidirectional
protocols, and causes them to not do bidirectional transfers.
`device STRING [ modem, direct and tli only ]'
Names the device associated with this port. If the device is not
named, the port name is taken as the device. Device names are
system dependent. On Unix, a modem or direct connection might be
something like `/dev/ttyd0'; a TLI port might be `/dev/inet/tcp'.
`speed NUMBER [modem and direct only ]'
`baud NUMBER [ modem and direct only ]'
The speed this port runs at. If a system specifies a speed but no
port name, then all ports which match the speed will be tried in
order. If the speed is not specified here and is not specified by
the system, the natural speed of the port will be used by default.
`speed-range NUMBER NUMBER [ modem only ]'
`baud-range NUMBER NUMBER [ modem only ]'
Specify a range of speeds this port can run at. The first number
is the minimum speed, the second number is the maximum speed.
These numbers will be used when matching a system which specifies
a desired speed. The simple `speed' (or `baud') command is still
used to determine the speed to run at if the system does not
specify a speed. For example, the command `speed-range 300 19200'
means that the port will match any system which uses a speed from
300 to 19200 baud (and will use the speed specified by the
system); this could be combined with `speed 2400', which means
that when this port is used with a system that does not specify a
speed, the port will be used at 2400 baud.
`carrier BOOLEAN [ modem and direct only ]'
The argument indicates whether the port supports carrier.
If a modem port does not support carrier, the carrier detect
signal will never be required on this port, regardless of what the
modem chat script indicates. The default for a modem port is true.
If a direct port supports carrier, the port will be set to expect
carrier whenever it is used. The default for a direct port is
false.
`hardflow BOOLEAN [ modem and direct only ]'
The argument indicates whether the port supports hardware flow
control. If it does not, hardware flow control will not be turned
on for this port. The default is true. Hardware flow control is
only supported on some systems.
`dial-device STRING [ modem only ]'
Dialing instructions should be output to the named device, rather
than to the normal port device. The default is to output to the
normal port device.
`dialer STRING [ modem only ]'
Name a dialer to use. The information is looked up in the dial
file. There is no default. Some sort of dialer information must
be specified to call out on a modem.
`dialer STRING ... [ modem only ]'
If more than one string follows the `dialer' command, the strings
are treated as a command that might appear in the dial file (
see dial File.). If a dialer is named (by using the first form of
this command, described just above), these commands are ignored.
They may be used to specify dialer information directly in simple
situations without needing to go to a separate file. There is no
default. Some sort of dialer information must be specified to
call out on a modem.
`dialer-sequence STRINGS [ modem or tcp or tli only ]'
Name a sequence of dialers and tokens (phone numbers) to use. The
first argument names a dialer, and the second argument names a
token. The third argument names another dialer, and so on. If
there are an odd number of arguments, the phone number specified
with a `phone' command in the system file is used as the final
token. The token is what is used for `\D' or `\T' in the dialer
chat script. If the token in this string is `\D', the system
phone number will be used; if it is `\T', the system phone number
will be used after undergoing dialcodes translation. A missing
final token is taken as `\D'.
This command currently does not work if `dial-device' is specified;
to handle this correctly will require a more systematic notion of
chat scripts. Moreover, the `complete' and `abort' chat scripts,
the protocol parameters, and the `carrier' and `dtr-toggle'
commands are ignored for all but the first dialer.
This command basically lets you specify a sequence of chat scripts
to use. For example, the first dialer might get you to a local
network and the second dialer might describe how to select a
machine from the local network. This lets you break your dialing
sequence into simple modules, and may make it easier to share
dialer entries between machines.
This command is to only way to use a chat script with a TCP port.
This can be useful when using a modem which is accessed via TCP.
When this command is used with a TLI port, then if the first
dialer is `TLI' or `TLIS' the first token is used as the address to
connect to. If the first dialer is something else, or if there is
no token, the address given by the `address' command is used
(see Placing the Call.). Escape sequences in the address are
expanded as they are for chat script expect strings (*note Chat
Scripts::.). The different between `TLI' and `TLIS' is that the
latter implies the command `stream true'. These contortions are
all for HDB compatibility. Any subsequent dialers are treated as
they are for a TCP port.
`lockname STRING [ modem and direct only ]'
Give the name to use when locking this port. On Unix, this is the
name of the file that will be created in the lock directory. It
is used as is, so on Unix it should generally start with `LCK..'.
For example, if a single port were named both `/dev/ttycu0' and
`/dev/tty0' (perhaps with different characteristics keyed on the
minor device number), then the command `lockname LCK..ttycu0' could
be used to force the latter to use the same lock file name as the
former.
`service STRING [ tcp only ]'
Name the TCP port number to use. This may be a number. If not,
it will be looked up in `/etc/services'. If this is not
specified, the string `uucp' is looked up in `/etc/services'. If
it is not found, port number 540 (the standard UUCP-over-TCP port
number) will be used.
`push STRINGS [ tli only ]'
Give a list of modules to push on to the TLI stream.
`stream BOOLEAN [ tli only ]'
If this is true, and the `push' command was not used, the `tirdwr'
module is pushed on to the TLI stream.
`server-address STRING [ tli only ]'
Give the address to use when running as a TLI server. Escape
sequences in the address are expanded as they are for chat script
expect strings (see Chat Scripts.).
The string is passed directly to the TLI `t_bind' function. The
value needed may depend upon your particular TLI implementation.
Check the manual pages, and, if necessary, try writing some sample
programs.
For AT&T 3B2 System V Release 3 using the Wollongong TCP/IP stack,
which is probably typical, the format of TLI string is `SSPPIIII',
where `SS' is the service number (for TCP, this is 2), `PP' is the
TCP port number, and `IIII' is the Internet address. For example,
to accept a connection from on port 540 from any interface, use
`server-address \x00\x02\x02\x1c\x00\x00\x00\x00'. To only accept
connections from a particular interface, replace the last four
digits with the network address of the interface. (Thanks to Paul
Pryor for the information in this paragraph).
`command STRINGS [ pipe only ]'
Give the command, with arguments, to run when using a pipe port
type. When a port of this type is used, the command is executed
and `uucico' communicates with it over a pipe. This permits
`uucico' or `cu' to communicate with another system which can only
be reached through some unusual means. A sample use might be
`command /bin/rlogin -E -8 -l LOGIN SYSTEM'. The command is run
with the full privileges of UUCP; it is responsible for
maintaining security.