/* %M%	%I%	(CARL)	%G%	%U% */

This is a program to manage a dialer, a direct line to another cpu, or
a Develcon dataswitch line. It has been modified so that software for
other types of connections should be easy to add. It is decended from
the v7 cu program.

If you are going to be adding a new connect routine you will need to
(1) edit conn.c and add the external declarations for its connect
routine and its device table, add its info to conntab (2) create the
connect routine (???conn.c), put the declaration for its device table
here, add its name to the list of .c and .o files in the makefile (3)
add the -D define for it in the makefile. dirconn.c is a good template
to use since it is the simplest case.

The program chooses the connect routine by looking at argv[0]. There is
also a kludge for the dataswitch routine; if argv[0] doesn't match any
known connect type then it calls the dataswitch routine which also
looks at argv[0] for the name of the machine to request from the
dataswitch.

There should be a way for the dialer routine to pick the right
dialer/modem if you specify a speed (if any of your dialers have their
speed fixed and they all don't run at the same speed). I haven't done
any work in this area since we only have one dialer.

The following is a list of site specific stuff and a short description
of the file:

    makefile:
	use -D to #define the various drivers
	you will use. it shouldn't hurt to leave
	all of them defined.

    conn.c:
	struct conntab conntab[];

	conn() is the "driver" of the catt program.
	it just searches through conntab[] looking
	for a match on argv[]. it also does some
	other housekeeping.

    dirconn.c:
	DIRSPEED
	struct conndev dirdev[];

	dirconn() is for connecting to a tty line
	(which might have another computer or anything
	else on the other end). it is the simplest connect
	routine and doesn't do anything special. it is
	currently configured to connect to our pdp11.

    dswconn.c:
	struct dswtab dswtab[];
	struct conndev dswdev[];

	dswconn() is called to connect to a develcon
	dataswitch. it types the "rs" and requests the
	machine automatically. dswtab[] has the name
	of each machine known to the dataswitch. it has
	a few "features"; examine the code if you really
	want to know everything it does.

    vadconn.c: (NO LONGER SUPPORTED)
	VADSPEED
	struct conndev vaddev[];

	vadconn() is called to dial a number with a vadic
	single speed dialer. it is possible to have "aliases"
	for phone numbers (undocumented). this is handled by
	the routines in the file curc.c, in a nutshell if the
	phone number you give has alphabetics in it and you
	have a file .curc in your home directory then it uses
	the phone number from there. the format of the .curc
	file is

		alias:<1 or more spaces or tabs><telno1>,<telno2>,...

	<telno> must be in the correct form to send directly
	to the dialer.

    penconn.c:
	PENSPEED
	struct conndev pendev[];

	penconn() is called to dial a number with a penril
	dual speed dialer. it is possible to have "aliases"
	for phone numbers (undocumented). this is handled by
	the routines in the file curc.c, in a nutshell if the
	phone number you give has alphabetics in it and you
	have a file .curc in your home directory then it uses
	the phone number from there. the format of the .curc
	file is

		alias:<1 or more spaces or tabs><telno1>,<telno2>,...

	<telno> must be in the correct form to send directly
	to the dialer.

Things that should be done:
    (*) the code needs to be eyeballed carefully and have more
	comments added to it.
    (*) should be made to work as similarly as possible as the
	4bsd tip command so that people that use both programs
	have minimal inconsistencies to remember.
    (*) maybe could add a connect routine that worked with sockets
	then this could be used instead of rlogin. (the only reason
	for this is that i wish that instead of ~^Z rlogin allowed
	you to use ~z to stop it.)
    (*) make it more 4.2bsd specific (e.g. use wait3 instead of wait,
	etc.). presumably for efficiency.
