1This file describes the layout of the L.sys and L-devices files.
2
3Here's my interpretation of L.sys:
4	Site When Caller Class CallCode Login
5
6The nominal value for Caller is ACU, but it can be the code for any
7device that places calls, e.g., micom, datakit, ethernet, etc.  The
8CallCode field contains the dope needed by the caller to complete the
9connection, e.g., for an ACU, CallCode is the phone number, while for,
10say, a micom, CallCode is the micom code for Site.  Class is nominally
11speed, but circumstances sometimes make it necessary to encode other
12information here.  E.g., at Bell Labs many sites distinguish centrex and
13dimension.  Some use it to identify sites that answer vadic only.
14
15For ACU Callers, this is the old interpretation.  Some examples:
16	lento Any ACU	   D1200  MHd7464	 ...
17	lento Any ACU	   C1200  MH2057	 ...
18	lento Any MICOM    9600   lento 	 ...
19	lento Any DK	   unused mh/tempo/lento ...
20	lento Any UNET	   lento  33		 ...
21	lento Any DIR	   9600   tty42 	 ...
22	lento Any DIR	   2400	  tty43		 ...
23
24i.e., to get to lento, dial on an ACU, or open a micom port and whisper
25"lento" down it, or open a datakit port and shout "mh/tempo/lento" down
26it, or open Unet server 33 on Unet host 'lento', or call on tty42.
27
28Here's my interpretation of L-devices:
29	Caller	Line	Useful	Class	Dialer
30
31Caller and Class are as above.  Line identifies the device on which the
32call is placed.  The Useful field is a place to identify something else
33needed to dial, e.g., the name of a dialing device, or a code to get
34past a sentry.  The (new) Dialer field identifies the type of dialer
35being used so that the right dialing function can be called.  Some examples:
36
37	ACU	cul0	cua0	1200	dn11
38	ACU	cul1	cua1	1200	dn11
39	ACU	tty49	unused	1200	ventel
40	ACU	tty49	unused	300	ventel
41	ACU	tty48	unused	V1200	vadic
42	ACU	tty47	unused	1200	hayes
43	ACU	tty47	unused	300	hayes
44	MICOM	micom	unused	9600	micom
45	DIR	tty42	unused	9600	direct
46
47If you wish to add another dialer/caller type, you must add a line to the
48condevs structure definded in condevs.c.  There is a line in the condevs
49table for each device type listed in the L-devices file.  The condev structure
50looks like:
51	struct condev {
52		char *CU_meth;		/* method, such as "ACU" or "DIR" */
53		char *CU_brand;		/* brand, such as "vadic" or "ventel" */
54		int (*CU_gen)();	/* what to call to search for brands */
55		int (*CU_open)();	/* what to call to open brand */
56		int (*CU_clos)();	/* what to call to close brand */
57		} condevs[];
58
59The line for the Ventel might look like:
60	{ "ACU", "ventel", Acuopn, ventopn, ventcls },
61While the line for the UNET interface might look like:
62	{ "UNET", "unet", unetopn, nulldev, unetcls },
63
64There can be many 'brands' of the same kind of device, such as auto-dialers.
65The condevs array is searched for a method that matches the one in the L.sys
66file.  The string comparison is done without regard to case, so "Acu" will
67match "ACU".  Once a match is found, the routine pointed to by CU_gen is
68called.  It is passed a pointer to the flds array, the array of pointers to
69strings derived from the L.sys entry.
70
71Typically, the CU_gen vector goes through the L-device table looking for
72a entry that is available, then trys to connect on that brand via the
73CU_open vector.  If that fails, it might go on to the next brand.
74When it succeeds in opening a line, it should assign the brand closing
75vector (CU_clos) to the global symbol CU_end (i.e. CU_end = cd->CU_clos).
76The routine pointed to by CU_end is called when the line is to be shutdown.
77It is passed a file descriptor which it is to close.
78
79Another ACU can be added by writing the code for the CU_open and CU_clos
80and adding a line in the condevs[] table.  The routine pointed to by
81CU_open is passed a pointer to the phone number; a pointer to the flds array;
82and a pointer to the dev structure, which contains the information from the
83L-devices entry.  It should return a file descriptor that can be used to
84communicate with the other machine, or CF_DIAL if the connection was not made.
85