1 /* BEGIN INCLUDE FILE ... cdt.incl.pl1 */
  2 
  3 /* format: style3,idind25,indcomtxt */
  4 
  5 /* Channel Definition Table.
  6    This table lists all of the hardware channels (ports) connected
  7    to the system, and maintains the attributes of each one.
  8 
  9    PG 741230
 10    Modified by Mike Grady 5/6/76 to add FNP info.
 11    Modified by Tom Casey 7/29/76 to add more FNP info and a few other things.
 12    Modified by Robert Coren 6/13/77 to make terminal types be character strings.
 13    Modified July 1979 by T. Casey to add several variables for MR8.0 process preservation facility.
 14    Modified December 1980 by E. N. Kittlitz to eliminate cdte.phone_no.
 15    Modified March 1981 by Robert Coren to add "listening" flag for multiplexers and to add TANDD_SERVICE service_type.
 16    Modified April 1981 by E. N. Kittlitz to add cdte.dial_ev_chn, cdte.recent_wakeup_time, cdte.recent_wakeup_count.
 17    Modified July 1981 by T. Casey for MR9.0 to add dialup_flags.detach_after_hangup
 18    Modified December 1981 by E. N. Kittlitz for cdte.leave_edited, cdte.hold_arg,
 19    Modified September 1981 by Benson I. Margulies for cdt_mgr_'s tree of multiplexer's.
 20    Modified August 1982 by E. N. Kittlitz for check_acs.
 21    Modified January 1983 by Keith Loepere for generic_destination.
 22    Modified August 1983 by Robert Coren to add mpxe.check and mpxe.retry_load.
 23    Modified 831216 by E. N. Kittlitz for required_access_class.
 24    Modified 84-04-01 by BIM to finish communications AIM:
 25    access class ranges,
 26    access_control flags.
 27 */
 28 
 29 
 30 /****^  HISTORY COMMENTS:
 31   1) change(87-03-17,Beattie), approve(87-04-06,MCR7656),
 32      audit(87-07-13,Parisek), install(87-08-04,MR12.1-1056):
 33      Add support for answering service to use IOCBs when tty_ cannot be
 34      used to service login channels.
 35                                                    END HISTORY COMMENTS */
 36 
 37 
 38 dcl       CDT_version_5            fixed bin internal static initial (5) options (constant);
 39 dcl       CDT_version              fixed bin internal static initial (6) options (constant);
 40 
 41 dcl       (cdtp, cdtep, fnpep, mpxep)
 42                                    ptr;
 43 
 44 dcl       1 cdt                    based (cdtp) aligned,    /* all of the system channels */
 45             2 author               like author_dcl.author,  /* standard header */
 46             2 max_size             fixed bin,               /* maximum number of cdte's in 255K */
 47             2 current_size         fixed bin,               /* number of last cdte. */
 48             2 version              fixed bin,
 49             2 freep                fixed bin,               /* chain of free cdte's */
 50             2 n_cdtes              fixed bin,               /* number of used cdte's */
 51             2 meters_last_reset    fixed bin (71),          /* clock time dialup meters were reset */
 52             2 realtime_in_dialup   fixed bin (71),          /* Dialup meter */
 53             2 cpu_in_dialup        fixed bin (71),          /* .. */
 54             2 pf_in_dialup         fixed bin,               /* .. */
 55             2 pp_in_dialup         fixed bin,               /* .. */
 56             2 entries_to_dialup    fixed bin,               /* .. */
 57             2 flags,
 58               3 go                 bit (1) unal,            /* ans. serv. said "go ahead and answer the phones" */
 59               3 cdt_is_live        bit (1) unal,            /* cdt is active */
 60               3 mux_mgr_system_init
 61                                    bit (1) unal,            /* mux mgr has loaded top-levels */
 62               3 pad1               bit (33) unal,
 63             2 acceptable_fnp_tbf   fixed bin,               /* acceptable minutes between FNP crashes */
 64             2 spare_channel_count  fixed bin,               /* number of extra channels to leave room for in ring0 */
 65             2 threads              aligned like channel_threads,
 66                                                             /* root of non-fnp-top-level-multiplexers */
 67             2 pad2                 (31) bit (36) aligned,   /* pad header to 80 words */
 68             2 fnp_entry            dim (8) like fnpe,       /* max of 8 FNPs for now */
 69             2 cdt_entry            dim (2500) like cdte;    /* # of cdte's in 255K */
 70 
 71 %page;
 72 dcl       1 cdte                   based (cdtep) aligned,   /* a channel */
 73             2 in_use               fixed bin,               /* see dialup_values. 0=NOW_FREE */
 74 /**** * These variables are filled in when the CDTE is created by cv_cmf. They are not dynamic. */
 75             2 pad1                 bit (36) aligned,
 76             2 name                 char (32),               /* ASCII name of channel */
 77             2 access_class         (2) bit (72) aligned,    /* access class range */
 78             2 comment              char (48),               /* printable message about channel */
 79             2 charge_type          fixed bin (17) unal,     /* billing group */
 80             2 service_type         fixed bin (17) unal,     /* service group (AS, ftp, mc) */
 81             2 line_type            fixed bin (17) unal,     /* tty line type (protocol) */
 82             2 baud_rate            fixed bin (17) unal,     /* 110, 133, 150, etc. */
 83             2 modem_type           fixed bin (17) unal,     /* type of modem on this channel */
 84             2 pad2                 bit (18) unaligned,
 85             2 answerback           char (8),                /* answerback string expected */
 86             2 initial_terminal_type
 87                                    char (32) unal,          /* as specified in the CMF */
 88             2 mpx_data             unal,                    /* data used only for multiplexed channels */
 89               3 mpx_type           fixed bin (17),          /* type of multiplexing used */
 90               3 mpx_service        fixed bin (17),          /* service type, active or inactive */
 91             2 flags,
 92             ( 3 attributes,
 93                 4 ck_answerback    bit (1),                 /* ON means that ansbk must equal our records */
 94                 4 audit_access_error
 95                                    bit (1),                 /* ON means ck that person auth is inside access class range  */
 96                                                             /*    this implies that the access_class describes a range of
 97                                                                legitimate user auths. */
 98                 4 hardwired        bit (1),                 /* ON means it is */
 99                 4 set_modes        bit (1),                 /* ON means to set initial modes at dialup */
100                 4 dont_read_answerback
101                                    bit (1),                 /* ON means don't try to read answerback */
102                 4 pada             bit (4),
103               3 access_control     unaligned,               /* As below */
104                 4 dial_out         bit (1),                 /* dialing user must be on ACS */
105                 4 priv_attach      bit (1),                 /* PA_ user must be on ACS */
106                 4 dial_server      bit (1),                 /* accept_dials process must be on acs */
107                 4 login            bit (1),                 /* logging in user must be on acs */
108                 4 slave_dial       bit (1),                 /* dialing user must give -user and be on acs */
109                 4 pado             bit (3),
110               3 options,
111                 4 execute_initial_command
112                                    bit (1),                 /* ON means to do it */
113                 4 attached_by_operator
114                                    bit (1),                 /* ON means temporary attachment. */
115                 4 private_line     bit (1),                 /* ON means private_line sync modem in use */
116                 4 bsc_ebcdic       bit (1),                 /* ON means bsc would like to use ebcdic code set */
117                 4 bsc_transparent  bit (1),                 /* ON means bsc is in transparent mode */
118                 4 vip_pollselect   bit (1),                 /* ON means VIP line is multidrop */
119                 4 autobaud         bit (1),                 /* ON means auto baud detection this channel */
120                 4 generic_destination_present
121                                    bit (1),                 /* ON means that the initial_command field contains
122                                                                a generic destination to match on dial_out or priv attach */
123                 4 use_iocb         bit (1),                 /* ON means to use IOCB operations to support channel */
124                 4 pado             bit (9)
125                 )                  unaligned,
126             2 initial_command      char (64),               /* pseudo first input line */
127 /**** The following variables represent dynamic control info, and
128       are used mostly by dialup_ and asu_ */
129             2 event                fixed bin (71),          /* event call channel for channel events */
130             2 current_service_type fixed bin (17) unal,     /* Current usage of line. */
131             2 tra_vec              fixed bin (17) unal,     /* which section of dialup_ to do next */
132             2 count                fixed bin (17) unal,     /* How many login tries he's had. */
133             2 dialup_flags         unal,                    /* flag bits for dialup to maintain */
134               3 ppm                bit (1) unal,            /* print preaccess message for IBM terminals */
135               3 cpo                bit (1) unal,            /* conditional printer-off (depends on answerback */
136               3 wakeup_handler     bit (1) unal,            /* says who is wakeup handler for this channel */
137                                                             /* 0 = dialup_, 1 = mc_tty_ */
138               3 save_arg           bit (1) unal,            /* -save login arg given */
139               3 nosave_arg         bit (1) unal,            /* -nosave login arg given */
140               3 detach_after_hangup
141                                    bit (1) unal,            /* remember WAIT_DETACH when setting WAIT_BEFORE_HANGUP */
142               3 leave_edited       bit (1) unal,            /* user control of edited mode */
143               3 hold_arg           bit (1) unal,            /* -hold arg given */
144               3 no_hold_arg        bit (1) unal,            /* -no_hold arg given */
145               3 immediate_arg      bit (1) unal,            /* -immediate arg given */
146               3 current_access_class_valid
147                                    bit (1) unal,            /* dialup_ or lg_ctl_ has determined the current_access_class */
148               3 pad                bit (7) unal,
149             2 twx                  fixed bin,               /* channel device index */
150             2 state                fixed bin,               /* channel state */
151             2 tty_id_code          char (4),                /* channel id (answerback) */
152             2 current_terminal_type
153                                    char (32) unal,          /* most recently-set terminal type */
154             2 process              ptr unal,                /* ptr to ATE owning this channel */
155             2 dialed_to_procid     bit (36),                /* Dialed channels remember owner's proc id */
156             2 next_channel         fixed bin (17) unal,     /* cdte index of next channel for this process */
157             2 cur_line_type        fixed bin (17) unal,     /* line type of currently dialed terminal */
158             2 current_access_class (2) bit (72) aligned,    /* This is a range, but at this time it must be a null range.
159                                                                We do not yet define multi-class connections, but we will someday. */
160             2 disconnected_ate_index
161                                    fixed bin (17) unal,     /* index of ate of disconnected process */
162             2 dial_ctl_ring        fixed bin (3) unsigned unaligned,
163                                                             /* used by dial_ctl_ to record ring of priv_attach or dial_out attachments */
164             2 dial_rq_privileged   bit (1) unaligned,       /* used by dial ctl to record comm priv from priv_attach or dial_out request */
165             2 pad3                 bit (14) unaligned,
166 /**** The following variables are kept for metering purposes. */
167             2 n_dialups            fixed bin,               /* number of times channel has been dialed up */
168             2 n_logins             fixed bin,               /* number of login sessions on this channel */
169             2 dialed_up_time       fixed bin (35),          /* total time channel was dialed up (seconds) */
170             2 dialup_time          fixed bin (71),          /* time of present dialup */
171             2 disconnected_proc_command
172                                    fixed bin (12) unsigned unal,
173                                                             /* 1 to 5 for -list,-create,-connect,-new_proc,-destroy */
174             2 disconnected_proc_number
175                                    fixed bin (12) unsigned unal,
176                                                             /* {N} in -connect {N}, -new_proc {N}, -destroy {N} */
177             2 n_disconnected_procs fixed bin (12) unsigned unal,
178                                                             /* number of disconnected processes that user has */
179             2 recent_wakeup_count  fixed bin,               /* counter to detect channel wakeup loop */
180             2 recent_wakeup_time   fixed bin (71),          /* time of first wakeup in suspected channel wakeup loop */
181             2 dial_ev_chn          fixed bin (71),          /* Dialed channels remember master's IPC channel */
182 /**** cdt_mgr_ uses these to maintain the tree of channels. They ****/
183 /**** really belong in the mpxe, but it is full up, and the cdte ****/
184 /**** had the space. */
185             2 threads              aligned like channel_threads,
186 /**** The use name is that of the user who gave the dial or slave ****/
187 /**** preaccess request. ****/
188             2 user_name            unaligned,
189               3 person             char (20) unaligned,
190               3 project            char (9) unaligned,
191               3 pad                char (3) unaligned,      /* no tag */
192             2 iocbp                ptr unaligned;           /* 104 words */
193 
194 
195 dcl       generic_destination      based char (32);         /* used to match destinations on dial_out and priv_attach,
196                                                                overlays initial_command field for slave and autocall lines */
197 
198 %page;
199 
200 dcl       1 fnpe                   based (fnpep) aligned,   /* an FNP */
201                                                             /* These variables are filled in from the CMF */
202             2 type                 fixed bin,               /* type of this FNP, DN355, DN6670, etc. */
203             2 memory               fixed bin,               /* amount of memory on this FNP */
204             2 nlslas               fixed bin,               /* number of lslas on this FNP */
205             2 nhslas               fixed bin,               /* number of hslas on this FNP */
206             2 service_type         fixed bin,               /* service type */
207             2 mpx_type             fixed bin,               /* type of multiplexer on this fnp */
208             2 coreimage            char (168),              /* pathname of image, maybe in >sl1 */
209 /**** The following are used during system operation to remember the state of the FNP */
210             2 boot_segp            ptr,                     /* ptr to seg used for bootload */
211             2 boot_ev_chan         fixed bin (71),          /* for ring0 to report crashes and bootload complete */
212             2 mpxe                 like mpxe,               /* standard multiplexer data */
213             2 threads              aligned like channel_threads,
214                                                             /* same mpx threads as channel */
215             2 pad3                 (25) fixed bin;          /* pad to 96 words per entry */
216 
217 /* This structure describes the data necessary to control a multiplexer.
218    For FNP's., a copy appears in the fnpe. For communications lines, it
219    overlays the initial_command field in the cdte. */
220 
221 dcl       1 mpxe                   based (mpxep) aligned,
222             2 state                fixed bin,               /* current state, up, down, loading */
223             2 current_service_type fixed bin,               /* usually = service type, unless cdt installation changes it */
224             2 current_mpx_type     fixed bin,               /* type of multiplexer currently running */
225             2 n_bootloads          fixed bin,               /* count of load attempts */
226             2 time_initial_load    fixed bin (71),          /* time this MPX first completed a load */
227             2 time_last_load       fixed bin (71),          /* time MPX last completed a bootload */
228             2 time_last_crash      fixed bin (71),          /* time MPX last crashed */
229             2 time_load_start      fixed bin (71),          /* time current load started */
230             2 last_tbf             fixed bin,               /* number of minutes this MPX was up last bootload */
231             2 flags                unal,
232               3 go                 bit (1),                 /* start MPX after it loads */
233               3 listening          bit (1),                 /* listen has been done on subchannels */
234               3 check              bit (1),                 /* loaded with check option */
235               3 retry_load         bit (1),                 /* reload if load fails */
236               3 pad1               bit (32),
237             2 pad2                 (2) fixed bin;           /* pad to 16 words */
238 
239 /* These threads define the tree of multiplexers in the cdt. */
240 /* next_sister and prev_sister link nodes at the same level, ordered */
241 /* by alpha sort order of the channel name. Daughter points to the */
242 /* first child of this node, if any. Daughter count is the number */
243 /* of children, as a consistency check. Mother is a back pointer to */
244 /* the parent, present in all the children, not just the first. */
245 /* threads are cdt indexes. If positive, they index the cdt_entry array */
246 /* in cdt, if negative, they are the negative of an index into the fnp_entry */
247 /* array. If zero, they refer to the top of the non-fnp mpx tree. */
248 
249 dcl       1 channel_threads        aligned based,
250             2 next_sister          fixed bin unaligned,
251             2 prev_sister          fixed bin unaligned,
252             2 daughter             fixed bin unaligned,
253             2 mother               fixed bin unaligned,     /* negative is a fnpx, positive a cdtx */
254             2 pad                  bit (18) unaligned,
255             2 daughter_count       fixed bin unaligned;
256 
257 /* Values for cdte.service_type field */
258 
259 dcl       (
260           ANS_SERVICE              init (1),                /* login or dial */
261           FTP_SERVICE              init (2),                /* file transfer service */
262           MC_SERVICE               init (3),                /* message coordinator */
263           SLAVE_SERVICE            init (4),                /* special channel */
264           DIAL_SERVICE             init (5),                /* transient state */
265           DIAL_OUT_SERVICE         init (6),                /* auto call line */
266           MPX_SERVICE              init (8),                /* ring0 demultiplexed line */
267           TANDD_SERVICE            init (9)                 /* transient state, attached for T & D */
268           )                        fixed bin internal static options (constant);
269 
270 /* Values for service type in both cdte and fnpe */
271 
272 dcl       (
273           INACTIVE                 init (7),                /* not to be used, even though configured */
274           ACTIVE                   init (1)
275           ) /* for FNP only, configured and to be used */
276                                    fixed bin internal static options (constant);
277 
278 /* Value for both cdte.in_use and fnpe.state */
279 
280 dcl       NOT_CONFIGURED           fixed bin int static init (-1) options (constant);
281                                                             /* was not configured at Multics bootload time */
282 
283 /* NOTE: an INACTIVE channel can be made active by operator command or CDT installation,
284    but a NOT_CONFIGURED channel can not be used until its multiplexer is reloaded */
285 
286 /* Value for cdte.in_use */
287 
288 dcl       CHANNEL_DELETED          fixed bin int static init (-2);
289                                                             /* channel deleted by CDT installation */
290 
291 /* NOTE: a configured channel being deleted by a CDT installation is set to CHANNEL_DELETED.
292    multiplexer_mgr_ sets cdte.in_use to NOW_FREE at the next reload of its multiplexer.
293    A NOT_CONFIGURED channel is set to NOW_FREE immediately when deleted by a CDT installation. */
294 
295 
296 /* Values for mpxe.state field */
297 
298 dcl       (
299           FNP_FREE                 init (0),                /* this fnpe is not used */
300           FNP_UNKNOWN              init (1),                /* FNP is in some unknown state */
301           FNP_DOWN                 init (2),                /* FNP crashed, not yet reloaded */
302           FNP_BOOT                 init (3),                /* FNP has been booted, but no response yet */
303           FNP_UP                   init (4)                 /* FNP is up and running fine */
304           )                        fixed bin internal static options (constant);
305 
306 dcl       (
307           MPX_FREE                 init (0),                /* this mpxe is not used */
308           MPX_UNKNOWN              init (1),                /* MPX is in some unknown state */
309           MPX_DOWN                 init (2),                /* MPX crashed, not yet reloaded */
310           MPX_BOOT                 init (3),                /* MPX has been booted, but no response yet */
311           MPX_UP                   init (4)                 /* MPX is up and running fine */
312           )                        fixed bin internal static options (constant);
313 
314 %include fnp_types;
315 
316 /* END INCLUDE FILE ... cdt.incl.pl1 */