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