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