1 /* BEGIN INCLUDE FILE ... login_server_messages.incl.pl1 */
  2 
  3 /****^  HISTORY COMMENTS:
  4   1) change(86-06-30,Coren), approve(86-06-30,MCR7415),
  5      audit(86-07-02,Margolin), install(86-07-11,MR12.0-1092):
  6      Initial implementation.
  7   2) change(87-04-16,GDixon), approve(87-07-13,MCR7679),
  8      audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056):
  9       A) Add REQUEST_TYPES and RESPONSE_TYPES arrays.
 10       B) Add login_server_validate_response.last_incorrect_password.time.
 11       C) Add user_connection_info.line_type.
 12       D) Add login_server_process_request.minimum_ring.
 13   3) change(87-05-14,GDixon), approve(87-07-13,MCR7737),
 14      audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056):
 15       A) Add login_server_process_response.brief.
 16       B) Add login_server_list_response.initial_ring.
 17       C) Separate login_server_process_response into fixed and variable parts.
 18       D) Move user_connection_info into login_server_request_header.
 19                                                    END HISTORY COMMENTS */
 20 
 21 /* This include file defines all the structures passed in message segments
 22    between a login server process and the Initializer (or "answering service")
 23    process. For convenience, messages from the server to the initializer,
 24    passed using the send_ls_request_ subroutine, are called "requests";
 25    messages from the initializer to the server, passed using the user_message_
 26    mechanism, are called "responses".
 27 */
 28 
 29 /* Request types */
 30 
 31 dcl  (LS_VALIDATE_REQUEST initial (1),                      /* validate user ID and password */
 32       LS_PROCESS_REQUEST initial (2),                       /* create or connect to a process */
 33       LS_LIST_REQUEST initial (3),                          /* list disconnected processes */
 34       LS_DIAL_REQUEST initial (4),                          /* find a dial server */
 35       LS_DISCONNECT_REQUEST initial (5),                    /* report disconnection of a login channel */
 36       LS_LOGOUT_REQUEST initial (6),                        /* discard UTE (end of dialogue) */
 37       LS_OPERATOR_REQUEST initial (7))                      /* log the user in as an operator */
 38       fixed bin internal static options (constant);
 39 
 40 dcl  LS_REQUEST_TYPES        (7) char (10) internal static options (constant) initial
 41                             (
 42                             "validate",
 43                             "process",
 44                             "list",
 45                             "dial",
 46                             "disconnect",
 47                             "logout",
 48                             "operator");
 49 
 50 dcl  ls_request_ptr pointer;
 51 
 52 /* common header for all requests */
 53 
 54 dcl 1 ls_request_header aligned based (ls_request_ptr),
 55     2 header_version char (8),                              /* version for this header */
 56     2 request_version char (8),                             /* varies depending on the request */
 57     2 request_type fixed bin,
 58     2 pad1 bit (36),
 59     2 reply_event_channel fixed bin (71),                   /* event channel over which reply_message should be sent */
 60     2 reply_handle bit (72) aligned,                        /* used for dispatching response */
 61     2 connection_info like user_connection_info;            /* connection making this request. */
 62 
 63 dcl  LS_REQUEST_HEADER_VERSION_1 char (8) initial ("lsrh0001") internal static options (constant);
 64 
 65 dcl 1 user_connection_info aligned based,                   /* common info passed in most requests */
 66     2 connection_name char (32),
 67     2 access_class_range (2) bit (72),
 68     2 terminal_type char (32),
 69     2 terminal_id char (4),
 70     2 line_type fixed bin;
 71 
 72 
 73 
 74 /* "validate" request: validate user ID and password */
 75 
 76 dcl 1 login_server_validate_request aligned based (ls_request_ptr),
 77     2 header like ls_request_header,                        /* request_type = LS_VALIDATE_REQUEST */
 78     2 current_password char (8),                            /* scrambled */
 79     2 authorization bit (72),                               /* only valid if auth_given = "1"b */
 80     2 terminate_event_channel fixed bin (71),               /* event channel to notify server when process terminates */
 81     2 person_id char (22),                                  /* as specified in login line */
 82     2 project_id char (9),                                  /* likewise, might be null string */
 83     2 network_connection_type fixed bin,                    /* see below for values */
 84     2 new_password char (8),                                /* only valid if change_password = "1"b */
 85     2 flags,
 86       3 gpw bit (1) unaligned,                              /* password generated in response to -generate_password */
 87       3 auth_given bit (1) unaligned,                       /* -authorization specified */
 88       3 anonymous bit (1) unaligned,                        /* "enterp" request */
 89       3 anon_no_password bit (1) unaligned,                 /* "enter" request */
 90       3 change_password bit (1) unaligned,                  /* gave -cpw or -gpw */
 91       3 change_default_auth bit (1) unaligned,              /* gave -change_default_authorization */
 92       3 change_default_proj bit (1) unaligned,              /* gave -change_default_project */
 93       3 operator bit (1) unaligned,                         /* gave -operator */
 94       3 pad bit (28) unaligned;
 95 
 96 
 97 dcl  LS_VALIDATE_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lsvr0001");
 98 
 99 
100 
101 /* "process" request: create a process or reconnect to an existing process for the specified user */
102 
103 dcl 1 login_server_process_request aligned based (ls_request_ptr),
104     2 fixed_part,                                           /* to allow for automatic copies */
105       3 header like ls_request_header,                      /* request_type = LS_PROCESS_REQUEST */
106       3 handle bit (72),                                    /* as provided in validate_response */
107       3 person_id char (22),                                /* the real one */
108       3 project_id char (9),                                /* likewise */
109       3 project_pad fixed bin,
110       3 command_type fixed bin,                             /* login, connect, etc.; see below for names */
111       3 process_number fixed bin,                           /* 0 if unspecified or irrelevant */
112       3 default_io_module char (32),                        /* I/O module to use if no outer_module specified */
113       3 switch_flags,                                       /* used to indicate if "switch"-type control args were specified */
114         4 warn_given bit (1) unaligned,
115         4 force_given bit (1) unaligned,
116         4 save_given bit (1) unaligned,
117         4 preempt_given bit (1) unaligned,
118         4 brief_given bit (1) unaligned,
119         4 pad2 bit (31) unaligned,
120       3 switch_values,                                      /* these are only valid if corresponding bit in switch_flags is on */
121         4 warn bit (1) unaligned,
122         4 force bit (1) unaligned,
123         4 save_on_disconnect bit (1) unaligned,
124         4 preempt bit (1) unaligned,
125         4 brief bit (1) unaligned,                          /* "0"b & brief_given => -long */
126         4 pad3 bit (31) unaligned,
127       3 other_flags,
128         4 init_ring_given bit (1) unaligned,                /* "1"b if -ring */
129         4 minimum_ring_given bit (1) unaligned,             /* "1"b if MNA terminal interface ring > 1 */
130         4 immediate bit (1) unaligned,                      /* "1"b => -new_proc (or -destroy) -immediate */
131         4 no_start_up bit (1) unaligned,                    /* "1"b if -no_start_up */
132         4 pad4 bit (32) unaligned,
133       3 initial_ring fixed bin,                             /* valid iff init_ring_given = "1"b */
134       3 minimum_ring fixed bin,                             /* ring in which MNA terminal mgr operates */
135       3 home_dir char (168),                                /* null if not specified */
136       3 outer_module char (32),                             /* likewise */
137       3 process_overseer char (168),                        /* likewise */
138       3 subsystem char (168),                               /* likewise */
139       3 n_args fixed bin,                                   /* how many arguments specified after -ag; if 0, ignore the rest of the structure */
140     2 login_arguments,                                      /* variable part, describes stuff after -ag */
141       3 arg_string_length fixed bin (21),
142       3 args (ls_process_request_n_args refer (login_server_process_request.n_args)),
143         4 start_index fixed bin (21),                       /* position in arg_string at which arg (i) starts */
144         4 arg_length fixed bin (21),                        /* length of arg (i) */
145       3 arg_string char (ls_process_request_arg_string_length refer (login_server_process_request.arg_string_length));
146 
147 dcl ls_process_request_n_args fixed bin;
148 dcl ls_process_request_arg_string_length fixed bin (21);
149 
150 dcl  LS_PROCESS_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lspr0001");
151 
152 
153 
154 /* "list" request: list the user's disconnected processes, if any */
155 
156 dcl 1 login_server_list_request aligned based (ls_request_ptr),
157     2 header like ls_request_header,                        /* request_type = LS_LIST_REQUEST */
158     2 handle bit (72);
159 
160 dcl  LS_LIST_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lslr0001");
161 
162 
163 
164 /* "dial" request: find a process to accept a dial */
165 
166 /* Note: because a dial request may or may not have been preceded
167    by a validate request/response, the initializer_handle may be null.
168 */
169 
170 dcl 1 login_server_dial_request aligned based (ls_request_ptr),
171     2 header like ls_request_header,                        /* request_type = LS_DIAL_REQUEST */
172     2 initializer_handle bit (72),                          /* as provided in validate_response (if any) */
173     2 terminate_event_channel fixed bin (71),               /* event channel to wake up login server when master process terminates */
174     2 dial_qualifier char (22),
175     2 person_id char (22),                                  /* null if not specified */
176     2 project_id char (9),                                  /* likewise */
177     2 user_person_id char (22),                             /* if -user was specified, otherwise "" */
178     2 user_project_id char (9);                             /* likewise */
179 
180 dcl LS_DIAL_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lsdr0001");
181 
182 
183 
184 /* "disconnect" request: report that a login channel has disconnected */
185 /* Note: this message is sent if the connection is broken either during the login dialogue
186    or later on when the process was using it */
187 
188 dcl 1 login_server_disconnect_request aligned based (ls_request_ptr),
189     2 header like ls_request_header,                        /* request_type = LS_DISCONNECT_REQUEST */
190     2 handle bit (72),                                      /* from original validate_response */
191     2 process_id bit (36);                                  /* ""b if no process established */
192 
193 dcl LS_DISCONNECT_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lsdc0001");
194 
195 
196 
197 /* "logout" request: indicates that user entered the "logout" request, ending the dialogue; does not require any response */
198 
199 dcl 1 login_server_logout_request aligned based (ls_request_ptr),
200     2 header like ls_request_header,                        /* request_type = LS_LOGOUT_REQUEST */
201     2 handle bit (72);
202 
203 dcl LS_LOGOUT_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lslg0001");
204 
205 
206 
207 /* "operator" request: sign the user on as an operator, the result of either
208    "login -operator" or "dial system". Note that in the latter case, there may
209    not have been a validate request (if the -user control argument wasn't specified),
210     in which case initializer_handle is null, and the person_id and project_id
211     are blank.
212 */
213 
214 dcl 1 login_server_operator_request aligned based (ls_request_ptr),
215     2 header like ls_request_header,                        /* request_type = LS_OPERATOR_REQUEST */
216     2 initializer_handle bit (72) aligned,                  /* as provided in validate_response (if any) */
217     2 terminate_event_channel fixed bin (71),               /* event channel for wakeup when connection is dropped */
218     2 person_id char (22),                                  /* likewise */
219     2 project_id char (9),                                  /* likewise */
220     2 virtual_channel char (32);                            /* if -virtual_channel specified, otherwise "" */
221 
222 dcl  LOGIN_SERVER_OPERATOR_REQUEST_VERSION_1 char (8) internal static options (constant) initial ("lsor0001");
223 
224 ^L
225 
226 /* Response types */
227 
228 dcl (LS_UNKNOWN_RESPONSE initial (100),                     /* unknown response type. */
229      LS_VALIDATE_RESPONSE initial (101),                    /* response to validation request */
230      LS_PROCESS_RESPONSE initial (102),                     /* response to process request */
231      LS_LIST_RESPONSE initial (103),                        /* response to list request */
232      LS_DIAL_RESPONSE initial (104),                        /* response to dial request */
233      LS_TERMINATION_RESPONSE initial (105),                 /* to notify server of a logout */
234      LS_NEW_PROC_RESPONSE initial (106),                    /* to notify server of process termination */
235      LS_OPERATOR_RESPONSE initial (107))                    /* response to operator request */
236           fixed bin internal static options (constant);
237 
238 dcl  LS_RESPONSE_TYPES        (100:107) char (10) internal static options (constant) initial
239                             (
240                             "UNKNOWN",
241                             "validate",
242                             "process",
243                             "list",
244                             "dial",
245                             "terminate",
246                             "new_proc",
247                             "operator");
248 
249 /* NOTE: the server_handle is not included in the response structures because
250    it is provided in the user_message_ structures */
251 
252 
253 
254 dcl ls_response_ptr pointer;
255 
256 /* common header for all responses */
257 
258 dcl 1 login_server_response_header aligned based (ls_response_ptr),
259     2 message_type fixed bin,
260     2 header_pad bit (36),                                  /* force doubleword alignment */
261     2 version char (8);
262 
263 
264 
265 /* "validate" response: indicate whether user_id/password is valid */
266 
267 dcl 1 login_server_validate_response aligned based (ls_response_ptr),
268     2 header like login_server_response_header,             /* message_type = LS_VALIDATE_RESPONSE */
269     2 handle bit (72),                                      /* to be provided by the server in subsequent */
270                                                             /* messages for the same connection */
271     2 authorization bit (72),                               /* default if none was supplied */
272     2 authorization_range (2) bit (72),                     /* authorization range permitted for this user */
273     2 status_code fixed bin (35),                           /* 0 iff user is validated */
274     2 person_id char (22),                                  /* primary name from the PNT */
275     2 project_id char (9),                                  /* primary name from the PNT or PDT */
276     2 n_disconnected_processes fixed bin,                   /* number of disconnected processes for specified user */
277     2 validate_pad fixed bin,
278     2 previous_login_info,                                  /* for printing login message */
279       3 time fixed bin (71),
280       3 terminal_type char (32),
281       3 terminal_id char (4),
282     2 incorrect_passwords fixed bin,                        /* number of times password given incorrectly */
283     2 last_incorrect_password,                              /* where it came from */
284       3 time fixed bin (71),
285       3 terminal_type char (32),
286       3 terminal_id char (4),
287     2 password_interval fixed bin,                          /* limit (in days) for password use or change */
288     2 flags,
289       3 disconnect bit (1) unaligned,                       /* if "1"b, close the connection immediately */
290       3 password_changed bit (1) unal,                      /* "1"b => changed password */
291       3 default_auth_changed bit (1) unal,                  /* "1"b => changed default authorization */
292       3 default_proj_changed bit (1) unal,                  /* "1"b => changed default project */
293       3 password_expired bit (1) unal,                      /* "1"b => password not changed recently enough */
294       3 password_unused_too_long bit (1) unal,              /* "1"b => password hasn't been used recently */
295       3 pad bit (30) unaligned;
296 
297 dcl LS_VALIDATE_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lsvs0001");
298 
299 
300 
301 /* "process" response: responds to request to create or connect */
302 
303 dcl 1 login_server_process_response aligned based (ls_response_ptr),
304     2 fixed_part,
305       3 header like login_server_response_header,           /* message_type = LS_PROCESS_RESPONSE */
306       3 status_code fixed bin (35),                         /* 0 iff process was created or requested process exists */
307       3 process_id bit (36),
308       3 new_handle bit (72),                                /* changed if reconnecting, etc. to preexisting process, all 0 otherwise */
309       3 authorization bit (72),                             /* authorization of created or existing process */
310       3 process_group_id char (32),                         /* Person.Project.tag */
311       3 process_number fixed bin,                           /* as in, "Your disconnected process #2..." */
312       3 n_disconnected_processes fixed bin,                 /* valid even if code ^= 0, e.g., if request was ambiguous */
313       3 start_event_channel fixed bin (71),                 /* event channel to wake up user process on */
314       3 login_instance fixed bin,                           /* "This is your Nth interactive login" */
315       3 accounting_info,                                    /* for destroyed process, if any */
316         4 cpu_usage fixed bin (71),
317         4 cost float bin,
318       3 flags,                                              /* except for disconnect and logout, invalid if status_code ^= 0 */
319         4 disconnect bit (1) unaligned,                     /* "1"b => break the connection immediately */
320         4 logout bit (1) unaligned,                         /* "1"b => restart login sequence */
321         4 created bit (1) unaligned,                        /* "1"b => new process created */
322         4 connected bit (1) unaligned,                      /* "1"b => connected to old process */
323         4 new_proc bit (1) unaligned,                       /* "1"b => connected after new_proc */
324         4 destroyed bit (1) unaligned,                      /* "1"b => process destroyed */
325         4 anonymous bit (1) unaligned,                      /* "1"b => anonymous user ("enter" or "enterp") */
326         4 already_logged_in bit (1) unaligned,              /* "1"b => user can't log in because he already is */
327         4 message_coordinator bit (1) unaligned,            /* "1"b => this connection is going to be used by the message coordinator */
328         4 brief bit (1) unaligned,                          /* "1"b => brief user attribute from PDT */
329         4 pad bit (26) unaligned,
330       3 initial_ring fixed bin,                             /* ring in which process was created */
331       3 already_logged_in_info,                             /* relevant if already_logged_in flag is "1"b */
332         4 connection_name char (32),
333         4 terminal_type char (32),
334         4 terminal_id char (4),
335     2 accounting_message_struc,                             /* character string assembled by initializer giving error or warnings about the user's account */
336       3 accounting_message_length fixed bin,
337       3 accounting_message char (ls_process_response_accounting_message_length refer (login_server_process_response.accounting_message_length));
338 
339 dcl  ls_process_response_accounting_message_length fixed bin;
340 
341 dcl LOGIN_SERVER_PROCESS_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lsps0001");
342 
343 
344 
345 /* "list" response: used if create request specified "list" command */
346 
347 dcl 1 login_server_list_response aligned based (ls_response_ptr),
348     2 header like login_server_response_header,             /* message_type = LS_LIST_RESPONSE */
349     2 n_processes fixed bin,                                /* number of disconnected processes (might be 0) */
350     2 pad_header fixed bin,
351     2 process_info (login_server_list_response_n_processes refer (login_server_list_response.n_processes)),
352       3 creation_time fixed bin (71),
353       3 authorization bit (72),
354       3 initial_ring fixed bin,
355       3 pad_process_info fixed bin,
356       3 connection_info like user_connection_info;
357 
358 dcl login_server_list_response_n_processes fixed bin;
359 
360 dcl LOGIN_SERVER_LIST_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lslr0001");
361 
362 
363 
364 /* "dial" response: response to dial request */
365 
366 dcl 1 login_server_dial_response aligned based (ls_response_ptr),
367     2 header like login_server_response_header,             /* message_type = LS_DIAL_RESPONSE */
368     2 status_code fixed bin (35),                           /* 0 iff dial server was found and all is OK */
369     2 process_id bit (36),                                  /* of dial server */
370     2 process_group_id char (32),                           /* likewise */
371     2 authorization bit (72),                               /* likewise, to make sure connection is usable */
372     2 start_event_channel fixed bin (71),                   /* event channel to wake up user process on */
373     2 process_ring fixed bin,                               /* initial ring of dial server */
374     2 flags,
375       3 disconnect bit (1) unaligned,                       /* "1"b => break connection immediately */
376       3 pad bit (35) unaligned;
377 
378 dcl LOGIN_SERVER_DIAL_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lsds0001");
379 
380 
381 
382 /* "termination" response: (not a response to anything): notify server that a
383    process terminated other than by logout */
384 
385 dcl 1 login_server_termination_response aligned based (ls_response_ptr),
386     2 header like login_server_response_header,             /* message_type =  LS_TERMINATION_RESPONSE */
387     2 accounting_info,                                      /* for printing in logout message */
388       3 cpu_usage fixed bin (71),
389       3 cost float bin,
390       3 pad bit (33) unaligned,
391     2 process_id bit (36),                                  /* of the logged-out process */
392     2 process_group_id char (32),
393     2 status_code fixed bin (35),                           /* e.g., to indicate reason for fatal error */
394     2 flags,
395       3 logout bit (1) aligned,                             /* no new process coming */
396       3 automatic_logout bit (1) unaligned,
397       3 hold bit (1) unaligned,
398       3 brief bit (1) unaligned,
399       3 new_proc bit (1) unaligned,                         /* user-requested new process */
400       3 fatal_error bit (1) unaligned,                      /* process died unexpectedly */
401       3 fpe_caused_logout bit (1) unaligned,                /* fatal error doesn't generate new process */
402       3 fpe_loop bit (1) unaligned,                         /* fatal error loop: too many in too short a time */
403       3 fpe_during_init bit (1) unaligned,                  /* fatal error during process initialization */
404       3 offer_help bit (1) unaligned,                       /* print a message offering "help" */
405       3 pad bit (27) unaligned;
406 
407 dcl LOGIN_SERVER_TERMINATION_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lstr0001");
408 
409 
410 
411 /* "new_proc" response: (not actually a response to anything) -- describes a
412     new process (after a termination_response) */
413 
414 dcl 1 login_server_new_proc_response aligned based (ls_response_ptr),
415     2 header like login_server_response_header,             /* message_type = LS_NEW_PROC_RESPONSE */
416     2 new_authorization bit (72),                           /* in case of new_proc -auth */
417     2 new_start_event_channel fixed bin (71),               /* event channel for starting new process */
418     2 new_process_id bit (36);                              /* process_id of newly-created process */
419 
420 dcl  LOGIN_SERVER_NEW_PROC_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lsnp0001");
421 
422 
423 
424 /* "operator" response: indicates success or failure of operator request */
425 
426 dcl 1 login_server_operator_response aligned based (ls_response_ptr),
427     2 header like login_server_response_header,             /* message_type = LS_OPERATOR_RESPONSE */
428     2 status_code fixed bin (35),                           /* indicates success or failure */
429     2 process_id bit (36),                                  /* process ID of the message coordinator */
430     2 process_group_id char (32),                           /* Person.Project.tag */
431     2 event_channel fixed bin (71),                         /* event channel over which to send connect/disconnect wakeups */
432     2 ring fixed bin,                                       /* ring of message coordinator */
433     2 flags,
434       3 disconnect bit (1) unaligned,                       /* "1" => break the connection immediately */
435       3 mbz bit (35) unaligned;
436 
437 
438 dcl  LOGIN_SERVER_OPERATOR_RESPONSE_VERSION_1 char (8) internal static options (constant) initial ("lsos0001");
439 
440 
441 /* format of reply message sent to acknowledge receipt of a request */
442 
443 dcl  ls_reply_message_ptr pointer;
444 
445 dcl 1 ls_reply_message aligned based (ls_reply_message_ptr),
446     2 code fixed bin (35),
447     2 flags,
448       3 request_invalid bit (1) unaligned,                  /* "1"b => could not process request */
449       3 response_sent bit (1) unaligned,                    /* "1"b => there is a response message */
450       3 as_error_code bit (1) unaligned,                    /* "1"b => code is from as_error_table_ */
451       3 do_not_reply bit (1) unaligned, /* "1"b => special flag for AS to prevent any reply from being sent to login server */
452       3 mbz bit (32) unaligned;
453 
454 /* The following are values used to identify the various requests internally; those from CREATE_REQ on
455    can appear as "command_type" in ls_process_requests. */
456 
457 dcl (LOGIN_REQ initial (1),
458      ENTER_REQ initial (2),
459      ENTERP_REQ initial (3),
460      CREATE_REQ initial (4),
461      DESTROY_REQ initial (5),
462      CONNECT_REQ initial (6),
463      NEW_PROC_REQ initial (7),
464      LIST_REQ initial (8))
465           fixed bin internal static options (constant);
466 
467 /* The following are the possible values for login_server_validate_request.network_connection_type.
468    They are used by the initializer to select a default process overseer and an instance tag.
469 */
470 
471 dcl (NETWORK_CONNECTION_LOGIN initial (1),
472      NETWORK_CONNECTION_DSA_FILE_TRANSFER initial (2))
473           fixed bin internal static options (constant);
474 
475 /* END INCLUDE FILE ... login_server_messages.incl.pl1 */