[comp.protocols.appletalk] Rutgers CAP

rapatel@khnphwzhn.njin.net ( Rakesh Patel) (10/18/90)

There is now an updated Rutgers CAP available. I'm calling it
ru-cap2 because it is reorganized a bit. This version does
not contain Phase 2 compatability (yet). The next release is likely
to have Phase 2 support and possibly yet another mechanism for Ethertalk
support (using System V shared memory instead of the Sun specific
mmap() call, so that it can be ported to other machines along with the
enet driver). It is available from rutgers.edu via anonymous ftp.
Retrieve src/ru-cap2.tar.Z.

This release removes the need for the 'etalk' version of cap, and
fixes the problems encountered when using uab+.

Thanks to Charles Hedrick - Rutgers University, Phil Farrell -
Stanford University, and others for providing patches/enhancements.

Rakesh Patel.

(NOTE: For using the below features, you will want to get from rutgers.edu
via anonymous ftp: 
	For Suns: src/enet.tar.Z
	For using UAB: src/uab+.tar.Z
	Strongly recommended with lwsrv: src/macps-22.shar.Z
See the description below for more info on what is required.)

This is the second release of the Rutgers CAP.  It is based on the 
first "Rutgers CAP" distribution (with the latest patches), but has been 
modified to support native Ethertalk Phase I on Suns.  The Configure script 
(and its Rutgers version) will now ask which of three configurations you 
want the library to be built for.  They are:

  - traditional CAP.  Uses your system's TCP/IP software to access
	Appletalk by encapsulating it in UDP (IPTalk).  Must talk to Appletalk
	bridges with special KIP compatible software.

  - Ethertalk.  Supports both traditional CAP and native Ethernet
	(phase I).  The format of /etc/atalk.local controls which is 
	used.  When used with an old format /etc/atalk.local file, this 
	version will behave exactly like the traditional CAP version.
	Currently supported only for Suns.

  - UAB.  Produces a modified version of the CAP libraries and applications 
	designed for use with the Unix Appletalk Bridge. The iptalk 
	configuration is used to build libuabcap.a, to be used with uab.
	This option builds the CAP libraries and clients to be used for
	communicating with uab. Further details can be found later in this
	document.

Software that has been changed for Ethertalk support includes:

  - configure scripts

  - lib/cap, which now has a subdirectory for each of the three
	configurations.  The configuration you choose gets copied
	to the subdirectory encap.

  - lib/cap/aarpd, a new subdirectory.  Contains the aarpd daemon,
	which is needed to do AARP for the Ethertalk version

  - etc/atis.  Code has been added so that atis listens to RTMP
	broadcasts.  This allows it to discover what network your
	system is on automatically, as called for by the spec.

I have updated man pages for programs changed by these edits.  However
I have not updated the installation document.  Installation of the
traditional configuration is unchanged, so you should use
doc/installation for that case.  If you want to use Ethertalk,
everything that documentation says about installing CAP is still true,
but you can ignore the comments about installing KIP in your KFPS.
Note that the UDP ports used by KIP are still necessary, so you will
still need to install entries in /etc/services as described there
(the Ethertalk code still uses UDP to send packets between services on
the local machine.).  The following additional configuration steps will 
be necessary after building and installing the software.  They should
be inserted right before the Verification step.

1) You must install kernel support for /dev/enet.  This is distributed
separately.  As part of installation for /dev/enet, you will add a
device driver to the kernel, make enet devices (one per Ethernet
interface), and install the monitoring software etherstat.  If you
have only one Ethernet, you'll probably call the device /dev/enet.  If
you have more than one, you may choose numbers like /dev/enet0 and
/dev/enet1, or you may choose to name them so that it is clear which
device corresponds to which interface, e.g. /dev/enet-ie0,
/dev/enet-le1.  The Ethertalk support requires that the device name
begin with /dev/enet.

2) /etc/atalk.local needs only one line, which must contain the name
of the enet device, and the zone name.  /dev/ will be added to the
device name.  E.g. if your enet device is /dev/enet-ie1, here's an
example /etc/atalk.local:

   # Native EtherTalk using experimental CAP
   enet-ie1 Etalk-4

Optionally, you can add an appletalk network number in either the
KIP format (xx.xx), or decimal. This is necessary for those networks
which do not have any Appletalk routers. For example:

   # Native EtherTalk using experimental CAP
   enet-ie1 Etalk-4 4.1

or:

   # Native EtherTalk using experimental CAP
   enet-ie1 Etalk-4 1025


3) You must create a file /etc/cap.ether.shared.  The simplest way is

        touch /etc/cap.ether.shared
	chmod 644 /etc/cap.ether.shared

It should be owned by whatever user your cap daemons run under.  This
user must be able to open the enet device for read and write.
(Typically we use root.)

4) Your cap startup file must run aarpd before any other daemon.  Do
not run it with &.  aarpd takes some time to start up, because it must
dynamically allocate a host number.  Once it has done that, it will
automatically disconnect from the controlling terminal.  By starting
it in the foreground, you will cause the startup script to pause
until aarpd has allocated the host number.

5) You must run atis.  It is used to determine the network number you
are using by listening to RTMP packets.  By default atis will listen
to RTMP packets if you are running in Ethertalk mode.  atis has a new
option -R, to disable listening to RTMP.  (This is a change because
running atis used to be optional.)

If for some reason you can't install the Ethernet packet filter, there
is also code to support Ethertalk using Sun's /dev/nit.  In
lib/cap/ethertalk, edit makefile (or Makefile.m4 and rerun gen.makes)
to use snitp.c instead of senetp.c.  In this case, the first item in
/etc/atalk.local should be of the form enet-ie1, i.e. enet- followed
by the name of the Ethernet interface to be used.  Note that this code
has not been well tested, and may have a tendency to drop packets.



For using CAP with UAB, you need to 'Configure' this version for iptalk.
In short, you need to:

	a. Run Configure - using "iptalk", not "ethertalk".
	b. Run gen.makes
	c. Do "make include"
	d. Do "make libsmade"
	e. Do "make libinstall"
	f. Do "mv /usr/local/lib/libcap.a /usr/local/lib/libuabcap.a"
		(use whatever path your cap libaray is installed in
		if it is not /usr/local/lib).
	g. Do "make clean"  - This is a necessary step!

Then build UAB using the uab+ distribution.
See the README.FIRST documentation for building uab,
and configuring it for different file locations. You
should install uab whereever you want it.
It is configured to use libuabcap.a. Now reconfigure CAP
to build a "uab" version:

	a. Run Configure - using "uab" this time instead of "iptalk"
	b. Do "make libsmade"
	c. Do "make libinstall"
	d. Do "make programs"
	e. Do "make install"

All the cap applications and libraries built will work with UAB.
Now you can follow the instructions in the README.FIRST file
in the uab+ distribution that explain how to set up a bridge_desc
file. Then skip to the section explaining how to run and test uab.
You do not need to do anything with the CAP library - the abkip.c
file is taken care of automatically by 'Configure'ing the CAP
distribution.

----------------------------------------------

This version of cap contains some modifications as outlined below:
Lwsrv and aufs have been modified to have an option "-X" to allow
access control for the spooler. Users would have to mount their aufs
volume to access the spooler. This allows authentication and
accounting for usage of the printers to be handled properly. The base
code was written by folks at Boston University. There have been many
bug fixes since we added that code. The access control can be enabled
by adding: "-X /tmp" as options to both aufs and lwsrv. This makes
aufs create a special file for lwsrv to check with for authentication.
Modifications were made to handle the security aspect of having the
files in a world-writable directory. In addition, we added a feature to
allow a bin to be specified for our I/O counters, so that the user can
have the output to go to a particular bin (we have some printers that
require a bin number). This feature is set up to allow the user to
specify a comment for lpr's "-C" option for non-Rutgers sites. When
the user mounts their aufs volume, they can mount it as {username}:{comment}.
instead of just {username}.  This feature is only available when using
the -X option for authentication.

Another modification is the support for Sun's fast-des routines when
using a password lookaside file for aufs. This only works for Suns
running SunOS 4.0 and above that include the fast-des routines.

In the samples directory, there is a modified lwpr.c called "ruiwpr.c"
which allows input from stdin for iwpr/lwpr.

All Rutgers specific code is #ifdef'd RUTGERS, and all Rutgers specific
configurations are in a separate Configure script. The accounting code for
lwsrv was modified (#ifdef'd for Rutgers) for Rutgers specific accounting
code. Non-Rutgers sites will get the normal accounting code.

This version of CAP also includes all of the modifications made available
by Dan Oscarsson. It also includes all the official patches from Columbia
as well as patches made available by Edward Moy from UCB.

Things not contained in this distribution:

The modifications to aufs for support of PCs.
The Xenix/System V modifications.

If anyone merges these changes into this distribution of cap, please let
me know by sending mail to: rapatel@pilot.njin.net.

Any bugs/fixes/suggestions should be sent to me at that address as well.

Rakesh Patel.