COHERENT manpages
This page displays the COHERENT manpage for pathalias [Generate a set of paths among computers].
List of available manpages
Index
pathalias -- Command
Generate a set of paths among computers
/usr/lib/mail/pathalias [-ivcDf] [-d link] [-l host] [-t link] [ datafile
... ]
The command pathalias computes the shortest path and corresponding route
from a host to every other known, reachable host. It reads host-to-host
connectivity information from the standard input or datafile, then writes a
list of host-route pairs onto the standard output. This command normally
is used only by administrators of busy systems, to maintain the path
information used by smail.
pathalias recognizes the following command-line options:
-c Print costs: print the path cost before each host-route pair.
-D Terminal domains: see domains section, below.
-d arg
arg is a dead link, host, or network. If arg is of the form
host-1!host-2
pathalias treats the link from host-1 to host-2 as an extremely high-
cost (i.e., dead) link. If arg is a single host name, pathalias
treats that host as dead and uses it on any path only as the relay
host of last resort. If arg names a network, the network requires a
gateway.
-f First-hop cost: the printed cost is the cost to the first relay in a
path, instead of the cost of the entire path. This option implies
(and overrides) option -c.
-i Ignore case: map all host names to lower case. By default, case is
significant.
-l host
Set the name of the local host to host. By default, pathalias reads
file /etc/uucpname to discover the name of your system.
-t arg
Output trace information for arg onto the standard error.
-v Verbose: report some statistics on the standard error output.
Input Format
A line that begins with white space continues the preceding line.
pathalias ignores anything following a `#'.
A list of a host-to-host connection consists of a from host in column one,
followed by white space, followed by a comma-separated list of to hosts,
called links. A link may be preceded or followed by a network character to
use in the route. Valid network characters are `!' (default), `@', `:',
and `%'. A link (and network character, if present) can be followed by a
``cost'' enclosed between parentheses.
The cost is an arithmetic expression that includes numbers, parentheses,
and the operators `+', `-', `*', and `/'. It cannot be negative.
pathalias recognizes the following symbolic costs:
LOCAL A local-area-network connection. Set cost to 25.
DEDICATED A high-speed dedicated link. Set cost to 95.
DIRECT A toll-free telephone call. Set cost to 200.
DEMAND A long-distance telephone call. Set cost to 300.
HOURLY An hourly poll. Set cost to 500.
EVENING A time-restricted telephone call. Set cost to 1,800.
DAILY A daily poll (also called POLLED). Set cost to 5,000.
WEEKLY An irregular poll. Set cost to 30,000.
In addition, the symbolic cost DEAD is a very large number (effectively,
infinite); HIGH and LOW are -5 and +5, respectively, for baud-rate or
quality bonuses/penalties; and FAST is -80, for adjusting costs of links
that use high-speed modems (9600 baud or faster). These symbolic costs
represent an imperfect measure of bandwidth, monetary cost, and frequency
of connections. For most mail traffic, it is important to minimize the
number of hosts in a route; for this reason, HOURLY times 24 is much
larger than DAILY. If no cost is given, pathalias uses a default cost of
4,000.
For the most part, an arithmetic expression that mixes symbolic constants
other than HIGH, LOW, and FAST makes no sense. For example, if a host
calls a local neighbor whenever there is work, and in addition polls every
evening, the cost is DIRECT, not DIRECT+EVENING.
Examples
Consider the following input:
down princeton!(DEDICATED), tilt,
%thrash(LOCAL)
princeton topaz!(DEMAND+LOW)
topaz @rutgers(LOCAL+1)
If a link is encountered more than once, the least-cost occurrence dictates
the cost and network character. pathalias treats links as bidirectional
but asymmetric: for each link declared in the input, pathalias assumes a
DEAD reverse link.
If the ``to'' host in a link is enclosed by angle brackets, pathalias
regards the link as being terminal, and heavily penalizes all links beyond
it. For example, when given the input
seismo <research>(10), research(100), ihnp4(10)
research allegra(10)
ihnp4 allegra(50)
pathalias generates a direct path from site seismo to site research;
however, the path from seismo to allegra uses ihnp4 as a relay, not
research.
The set of names by which a host is known to its neighbors is called its
aliases. Aliases are declared as follows:
name = alias, alias ...
name is the name by which the host is known to its predecessor in the
route.
Fully connected networks, such as the Internet or a local-area network, are
declared as follows:
net = {host, host, ...}
The list of hosts may be preceded or followed by a routing character (by
default, `!'), and may be followed by a cost (default 4,000). The network
name is optional; if not given, pathalias makes one up. Consider the
following input:
etherhosts = {rahway, milan, joliet}!(LOCAL)
ringhosts = @{gimli, alida, almo}(DEDICATED)
= {etherhosts, ringhosts}(0)
The routing character used in a route to a network member is the one
encountered when ``entering'' the network. For details, see the sections
on gateways and domains, below.
If you wish to give connection data, but also wish to hide the host names,
use a declaration of the form:
private {host, host, ...}
pathalias will not generate a route to a private host, but it may produce
routes through it. The scope of a private declaration extends from the
declaration either to the end of the input file in which it appears, or to
a private declaration with an empty host list, whichever comes first. The
latter scope rule lets you retain the semantics of a private declarations
when you pass data to pathalias via the standard input.
Dead hosts, links, or networks may be presented in the input stream by
declaring
dead {arg, ...}
where arg has the same form as the argument to the command-line option -d.
To force a specific cost for a link, use
delete {host-1!host-2}
to delete all prior declarations, then re-declare the link as desired. To
delete a host and all its links, use the instruction:
delete {host}
Diagnostic messages name the file in which pathalias found the error. To
change the file's name, use the instruction:
file {filename}
You can fine-tune an entry by adjusting the weights of all links from a
given host. For example:
adjust {host-1, host-2(LOW), host-3(-1)}
If no cost is given, pathalias uses a default of 4,000.
The following script pipes into pathalias input from compressed (and
uncompressed) files:
for i in $*; do
case $i in
*.Z) echo "file {`expr $i : '.Z'`}
zcat $i ;;
*) echo "file {$i}"
cat $i ;;
esac
echo "private {}"
done
Output Format
pathalias writes to the standard output a list of host-route pairs, where
the route is a string appropriate for use with printf(), e.g.:
rutgers princeton!topaz!%s@rutgers
%s in the route string is replaced by the name of the user to whom the
message is being sent. This task normally is performed by a mailer, e.g.,
mail or elm.
Except for domains, the name of a network is never used in routes. Thus,
in the earlier example, the path from down to up would be up!%s, not
princeton-ethernet!up!%s.
Gateways
pathalias represents a network by a pseudo-host and a set of network
members. Links from the members to the network have the weight given in
the input, whereas the cost from the network to its members is zero. If a
network is declared dead, the member-to-network links are marked dead,
which effectively prohibits access to the network from its members.
If, however, the input also shows an explicit link from any host to the
network, then that host can be used as a gateway. In particular, the
gateway need not be a network member. For example, if CSNET is declared
dead and the input contains
CSNET = {...}
csnet-relay CSNET
then routes to CSNET hosts will use csnet-relay as a gateway.
Domains
A network whose name begins with `.' is called a domain. Domains are
assumed to require gateways, i.e., they are DEAD. The route given by a path
through a domain is similar to that for a network, but here the domain name
is tacked onto the end of the next host. Subdomains are permitted. For
example, the definition
harvard .EDU # harvard is gateway to .EDU domain
.EDU = {.BERKELEY, .UMICH}
.BERKELEY = {ernie}
yields:
ernie ...!harvard!ernie.BERKELEY.EDU!%s
Output is given for the nearest gateway to a domain. For example, the
example above yields:
.EDU ...!harvard!%s
Output is given for a subdomain if it has a different route than its parent
domain, or if all its ancestor domains are private.
If the you use its command-line option -D, pathalias treats a link from a
domain to a host member of that domain as terminal. This property extends
to host members of subdomains, etc., and discourages routes that use any
domain member as a relay.
Files
/usr/local/lib/palias.dir -- Default output
/usr/local/lib/palias.pag -- Default output
comp.mail.maps -- Likely location of some input files
See Also
commands,
mail [overview],
pathmerge,
smail
Honeyman P., Bellovin, S.M.: PATHALIAS, or the care and feeding of relative
addresses. Atlanta, Proceedings of the Summer USENIX Conference, 1986.
Notes
This command is not used by the implementation of smail that COHERENT uses.
It is included, however, for compatibility with other implementations.
The order of arguments is significant. In particular, options -i and -t
should appear early.




