COMPILATION LISTING OF SEGMENT kermit_server_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 09/16/88 1316.2 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 9 10 /****^ HISTORY COMMENTS: 11* 1) change(87-11-24,Huen), approve(87-11-24,MCR7803), audit(87-12-07,RWaters), 12* install(88-09-16,MR12.2-1113): 13* Fix kermit error 13. 14* END HISTORY COMMENTS */ 15 16 17 kermit_server_: 18 proc (infop, filenames_areap); 19 20 /**********************************************************************/ 21 /* */ 22 /*n Name: kermit_server_$kermit_server_ external */ 23 /*i Input: infop, filenames_areap */ 24 /*f Function: Provides a state-switching mechanism and data */ 25 /*f interface for the server. */ 26 /*f Implemented states are: */ 27 /*f rec_init, send_init, init, generic_logout, */ 28 /*f generic_finish. */ 29 /*f An error packet is returned if the remote issues */ 30 /*f an unimplemented command to the Multics server */ 31 /*o Output: none */ 32 /* */ 33 /**********************************************************************/ 34 35 36 /* parameters */ 37 38 dcl infop ptr; 39 dcl filenames_areap ptr; 40 41 /* automatic */ 42 43 dcl ec fixed bin (35); 44 dcl generic_sw bit (1); 45 dcl packet_n fixed bin; 46 dcl packet_type char (1); 47 dcl remote_data char (Max_remote_packet_size); 48 dcl remote_data_lth fixed bin (21); 49 dcl generic_state fixed bin; 50 dcl state fixed bin; 51 52 /* based */ 53 54 dcl generic_type char (1) based (addr (remote_data)); 55 dcl remote_datap ptr; 56 57 /* labels */ 58 59 dcl server_state (0:4) label init (Other, Server_Rec_Init, Server_Send_Init, Server_Init, Server_Generic); 60 dcl generic_command (0:2) label init (Generic_Other, Generic_Logout, Generic_Finish); 61 62 /* constant */ 63 64 dcl Error_msg char (15) internal static options (constant) init ("Not Implemented"); 65 dcl Generic_packet char (1) unal internal static options (constant) init ("G"); 66 dcl Generic_packets char (2) internal static options (constant) init ("LF"); 67 dcl GF_packet char (1) unal internal static options (constant) init ("F"); 68 dcl GL_packet char (1) unal internal static options (constant) init ("L"); 69 dcl Max_remote_packet_size fixed bin internal static options (constant) init (3000); 70 dcl Max_packet_size fixed bin internal static options (constant) init (94); 71 dcl Server_packets char (4) internal static options (constant) init ("RSIG"); 72 dcl True bit (1) internal static options (constant) init ("1"b); 73 74 75 /* builtin */ 76 77 dcl (addr, before, index, length, ltrim, null, rtrim, size, unspec) builtin; 78 79 /* procedures */ 80 81 dcl convert_status_code_ entry (fixed bin (35), char (8) aligned, char (100) aligned); 82 83 /* include */ 84 1 1 /* START OF: kermit_dcls.incl.pl1 * * * * * */ 1 2 1 3 /********************************************************************/ 1 4 /* */ 1 5 /*n kermit_dcls */ 1 6 /* */ 1 7 /*d This include file contains the declarations of the external */ 1 8 /*d kermit entrypoints that are called by other modules within */ 1 9 /*d kermit as well as an explanation of the parameters. */ 1 10 /* */ 1 11 /*l Written: 84-10-11 by Dean Elhard */ 1 12 /* */ 1 13 /********************************************************************/ 1 14 1 15 dcl kermit_comm_mgr_$flush_input 1 16 entry 1 17 (ptr, /* kermit info ptr */ 1 18 fixed bin(35)); /* error code */ 1 19 1 20 dcl kermit_comm_mgr_$reset_line_modes 1 21 entry 1 22 (ptr, /* kermit info ptr */ 1 23 fixed bin(35)); /* error code */ 1 24 1 25 dcl kermit_comm_mgr_$set_line_modes 1 26 entry 1 27 (ptr, /* kermit info ptr */ 1 28 fixed bin(35)); /* error code */ 1 29 1 30 dcl kermit_get_filenames_ entry 1 31 (ptr, /* kermit info ptr */ 1 32 char(*), /* argument */ 1 33 ptr, /* filename ptr */ 1 34 char(*), /* reason */ 1 35 fixed bin(35)); /* error code */ 1 36 1 37 dcl kermit_log_mgr_$close_log 1 38 entry 1 39 (ptr, /* kermit info ptr */ 1 40 fixed bin (35)); /* error code */ 1 41 1 42 dcl kermit_log_mgr_$disable entry 1 43 (ptr, /* kermit info ptr */ 1 44 fixed bin (35)); /* error code */ 1 45 1 46 dcl kermit_log_mgr_$display_stats 1 47 entry /* statistics command */ 1 48 (ptr, /* sci ptr */ 1 49 ptr); /* kermit info ptr */ 1 50 1 51 dcl kermit_log_mgr_$enable entry 1 52 (ptr, /* kermit info ptr */ 1 53 fixed bin (35)); /* error code */ 1 54 1 55 dcl kermit_log_mgr_$log_message 1 56 entry 1 57 (ptr, /* kermit info ptr */ 1 58 ptr); /* log info ptr */ 1 59 1 60 dcl kermit_log_mgr_$open_log 1 61 entry 1 62 (ptr, /* kermit info ptr */ 1 63 char (*) varying, /* log file name */ 1 64 fixed bin (35)); /* error code */ 1 65 1 66 dcl kermit_log_mgr_$start entry /* start log command */ 1 67 (ptr, /* sci ptr */ 1 68 ptr); /* kermit info ptr */ 1 69 1 70 dcl kermit_log_mgr_$stop entry /* stop log command */ 1 71 (ptr, /* sci ptr */ 1 72 ptr); /* kermit info ptr */ 1 73 1 74 dcl kermit_mode_mgr_$get entry /* get modes command */ 1 75 (ptr, /* sci ptr */ 1 76 ptr); /* kermit info ptr */ 1 77 1 78 dcl kermit_mode_mgr_$retrieve 1 79 entry 1 80 (ptr, /* kermit info ptr */ 1 81 fixed bin, /* permanent/temporary select */ 1 82 (*) fixed bin, /* mode selector array */ 1 83 ptr, /* mode value ptr */ 1 84 fixed bin (35)); /* error code */ 1 85 1 86 dcl kermit_mode_mgr_$set entry /* set modes command */ 1 87 (ptr, /* sci ptr */ 1 88 ptr); /* kermit info ptr */ 1 89 1 90 dcl kermit_mode_mgr_$store entry 1 91 (ptr, /* kermit info ptr */ 1 92 fixed bin, /* permanent/temporary select */ 1 93 (*) fixed bin, /* mode selector array */ 1 94 ptr, /* mode value ptr */ 1 95 fixed bin (35)); /* error code */ 1 96 1 97 dcl kermit_pad_$receive entry 1 98 (ptr, /* kermit info ptr */ 1 99 char (1), /* packet type */ 1 100 ptr, /* buffer pointer */ 1 101 fixed bin (21), /* buffer length */ 1 102 fixed bin, /* sequence number */ 1 103 fixed bin (21), /* chars received */ 1 104 fixed bin (21), /* packet size */ 1 105 bit (1), /* CR/NL split flag */ 1 106 fixed bin (35)); /* error code */ 1 107 1 108 dcl kermit_pad_$send entry 1 109 (ptr, /* kermit info ptr */ 1 110 char (1), /* packet type */ 1 111 ptr, /* data ptr */ 1 112 fixed bin (21), /* data length */ 1 113 fixed bin, /* sequence number */ 1 114 fixed bin (21), /* chars transmitted */ 1 115 fixed bin (21), /* packet length */ 1 116 fixed bin (35)); /* error code */ 1 117 1 118 dcl kermit_receive_$receive_from_remote 1 119 entry 1 120 (ptr, /* kermit info ptr */ 1 121 fixed bin, /* initial state */ 1 122 fixed bin, /* initial sequence number */ 1 123 char (*), /* user filename (first file) */ 1 124 bit (1), /* =1 if user gave filename */ 1 125 fixed bin, /* number of files received */ 1 126 fixed bin (35)); /* error code */ 1 127 1 128 dcl kermit_send_$send_to_remote 1 129 entry 1 130 (ptr, /* kermit info ptr */ 1 131 ptr, /* filenames area ptr */ 1 132 char (*), /* user filename (first file) */ 1 133 bit (1), /* =1 if user gave filename */ 1 134 fixed bin, /* number of files sent */ 1 135 fixed bin (35)); /* error code */ 1 136 1 137 1 138 dcl kermit_server_ 1 139 entry 1 140 (ptr, /* kermit info ptr */ 1 141 ptr); /* filenames area ptr */ 1 142 1 143 1 144 dcl kermit_xfer_modes_$check_params 1 145 entry 1 146 (ptr, /* kermit info ptr */ 1 147 ptr, /* remote parameters */ 1 148 fixed bin (21), /* remote parameters length */ 1 149 ptr, /* local parameters */ 1 150 fixed bin (35)); /* error code */ 1 151 1 152 dcl kermit_xfer_modes_$init 1 153 entry 1 154 (ptr, /* ptr to kermit info */ 1 155 fixed bin (35)); /* error code */ 1 156 1 157 dcl kermit_xfer_modes_$get_local_params 1 158 entry 1 159 (ptr, /* kermit info ptr */ 1 160 ptr, /* local parameters */ 1 161 fixed bin (21), /* local parameters length */ 1 162 ptr, /* encoded parameters */ 1 163 fixed bin (21), /* encoded parameters length */ 1 164 fixed bin (35)); /* error code */ 1 165 1 166 dcl kermit_xfer_modes_$process_params 1 167 entry 1 168 (ptr, /* kermit info ptr */ 1 169 ptr, /* remote parameters */ 1 170 fixed bin (21), /* remote parameters length */ 1 171 ptr, /* local parameters */ 1 172 fixed bin (35)); /* error code */ 1 173 1 174 /* END OF: kermit_dcls.incl.pl1 * * * * * */ 85 86 2 1 /* START OF: kermit_mode_info.incl.pl1 * * * * * */ 2 2 2 3 2 4 2 5 2 6 /****^ HISTORY COMMENTS: 2 7* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 2 8* install(88-07-05,MR12.2-1054): 2 9* Fix kermit 15, 16, 17, and 18. 2 10* END HISTORY COMMENTS */ 2 11 2 12 2 13 /************************************************************************/ 2 14 /* */ 2 15 /*l Modified: 87-06-19 by S. Huen - Add fields for capabilities, */ 2 16 /*l window_size, max_len_ext_1 and max_len_ext_2 based */ 2 17 /*l on D. Kozlowski's version. (kermit 16) */ 2 18 /* */ 2 19 /************************************************************************/ 2 20 2 21 dcl Permanent fixed bin static options (constant) init (1); 2 22 dcl Temporary fixed bin static options (constant) init (2); 2 23 2 24 dcl Store_all (1:1) fixed bin static options (constant) init (0); 2 25 dcl Retrieve_all (1:1) fixed bin static options (constant) init (0); 2 26 2 27 dcl Maxl fixed bin static options (constant) init (1); 2 28 dcl Timeout fixed bin static options (constant) init (2); 2 29 dcl N_pads fixed bin static options (constant) init (3); 2 30 dcl Pad_char fixed bin static options (constant) init (4); 2 31 dcl Eol_char fixed bin static options (constant) init (5); 2 32 dcl Quote_char fixed bin static options (constant) init (6); 2 33 dcl Eight_bit_char fixed bin static options (constant) init (7); 2 34 dcl Repeat_char fixed bin static options (constant) init (8); 2 35 dcl Start_char fixed bin static options (constant) init (9); 2 36 dcl Check_type fixed bin static options (constant) init (10); 2 37 dcl Parity fixed bin static options (constant) init (11); 2 38 dcl Incomplete fixed bin static options (constant) init (12); 2 39 dcl File_warning fixed bin static options (constant) init (13); 2 40 dcl File_type fixed bin static options (constant) init (14); 2 41 dcl Retry_threshold fixed bin static options (constant) init (15); 2 42 dcl Line_byte_size fixed bin static options (constant) init (16); 2 43 dcl Window_size fixed bin static options (constant) init (17); 2 44 dcl Max_len_ext_1 fixed bin static options (constant) init (18); 2 45 dcl Max_len_ext_2 fixed bin static options (constant) init (19); 2 46 dcl Capabilities fixed bin static options (constant) init (20); 2 47 2 48 dcl 01 Perm_defaults aligned static options (constant), 2 49 02 maxl fixed bin (8) unal init (80), 2 50 02 time fixed bin (8) unal init (15), 2 51 02 npad fixed bin (8) unal init (0), 2 52 02 padc char (1) unal init (""), 2 53 02 eol char (1) unal init (" "), 2 54 02 qctl char (1) unal init ("#"), 2 55 02 qbin char (1) unal init ("&"), 2 56 02 rept char (1) unal init ("~"), 2 57 02 start char (1) unal init (""), 2 58 02 chkt fixed bin (8) unal init (1), 2 59 02 parity char (1) unal init ("N"), 2 60 02 incomplete char (1) unal init ("K"), 2 61 02 file_warning char (1) unal init ("Y"), 2 62 02 file_type char (1) unal init ("A"), 2 63 02 retry_threshold fixed bin (8) unal init (5), 2 64 02 line_type fixed bin (8) unal init (7), 2 65 02 window_size fixed bin (8) unal init (0), 2 66 02 max_len_ext_1 fixed bin (8) unal init (5), 2 67 02 max_len_ext_2 fixed bin (8) unal init (25), 2 68 02 capabilities fixed bin (8) unal init (2); 2 69 2 70 2 71 dcl I_maxl fixed bin static options (constant) init (1); 2 72 dcl I_timeout fixed bin static options (constant) init (2); 2 73 dcl I_n_pads fixed bin static options (constant) init (3); 2 74 dcl I_pad_char fixed bin static options (constant) init (4); 2 75 dcl I_eol_char fixed bin static options (constant) init (5); 2 76 dcl I_quote_char fixed bin static options (constant) init (6); 2 77 dcl O_maxl fixed bin static options (constant) init (7); 2 78 dcl O_timeout fixed bin static options (constant) init (8); 2 79 dcl O_n_pads fixed bin static options (constant) init (9); 2 80 dcl O_pad_char fixed bin static options (constant) init (10); 2 81 dcl O_eol_char fixed bin static options (constant) init (11); 2 82 dcl O_quote_char fixed bin static options (constant) init (12); 2 83 dcl G_eight_bit_char fixed bin static options (constant) init (13); 2 84 dcl G_repeat_char fixed bin static options (constant) init (14); 2 85 dcl G_start_char fixed bin static options (constant) init (15); 2 86 dcl G_check_type fixed bin static options (constant) init (16); 2 87 dcl G_parity fixed bin static options (constant) init (17); 2 88 dcl G_window fixed bin static options (constant) init (18); 2 89 dcl I_max_lenx1 fixed bin static options (constant) init (19); 2 90 dcl I_max_lenx2 fixed bin static options (constant) init (20); 2 91 dcl O_max_lenx1 fixed bin static options (constant) init (21); 2 92 dcl O_max_lenx2 fixed bin static options (constant) init (22); 2 93 dcl G_capabilities fixed bin static options (constant) init (23); 2 94 2 95 dcl 01 Temp_defaults aligned static options (constant), 2 96 02 i_maxl fixed bin (8) unal init (80), 2 97 02 i_time fixed bin (8) unal init (15), 2 98 02 i_npad fixed bin (8) unal init (0), 2 99 02 i_padc char (1) unal init (""), 2 100 02 i_eol char (1) unal init (" "), 2 101 02 i_qctl char (1) unal init ("#"), 2 102 02 o_maxl fixed bin (8) unal init (80), 2 103 02 o_time fixed bin (8) unal init (15), 2 104 02 o_npad fixed bin (8) unal init (0), 2 105 02 o_padc char (1) unal init (""), 2 106 02 o_eol char (1) unal init (" "), 2 107 02 o_qctl char (1) unal init ("#"), 2 108 02 qbin char (1) unal init ("N"), 2 109 02 rept char (1) unal init (" "), 2 110 02 start char (1) unal init (""), 2 111 02 chkt fixed bin (8) unal init (1), 2 112 02 parity char (1) unal init ("N"), 2 113 02 window fixed bin (8) unal init (0), 2 114 02 i_maxlx1 fixed bin (8) unal init (5), 2 115 02 i_maxlx2 fixed bin (8) unal init (25), 2 116 02 o_maxlx1 fixed bin (8) unal init (5), 2 117 02 o_maxlx2 fixed bin (8) unal init (25), 2 118 02 capabilities fixed bin (8) unal init (2); 2 119 2 120 dcl Ext_Headers bit (9) static options (constant) init ("002"b3); 2 121 2 122 2 123 /* END OF: kermit_mode_info.incl.pl1 * * * * * */ 87 88 3 1 /* START OF: kermit_transfer_info.incl.pl1 * * * * * */ 3 2 3 3 3 4 3 5 /****^ HISTORY COMMENTS: 3 6* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 3 7* install(88-07-05,MR12.2-1054): 3 8* Fix kermit 15, 16, 17, and 18. 3 9* END HISTORY COMMENTS */ 3 10 3 11 3 12 /********************************************************************/ 3 13 /* */ 3 14 /*n kermit_transfer_info */ 3 15 /* */ 3 16 /*d This data structure is the info structure used */ 3 17 /*d during file transfer. */ 3 18 /* */ 3 19 /*l Written: 84-10-11 by Maureen Mallmes */ 3 20 /*l Modified: 87-06-19 by Don Kozlowski - Add flags in kti */ 3 21 /*l structure. (kermit 15) */ 3 22 /*l Modified: 87-07-22 by Don Kozlowski - Add msf flag in */ 3 23 /*l kti structure. (kermit 17) */ 3 24 /* */ 3 25 /********************************************************************/ 3 26 3 27 dcl 01 kermit_transfer_info aligned based (transfer_infop), 3 28 02 retry_count fixed bin (21), /* for current packet */ 3 29 02 retry_threshold fixed bin (8) unal, /* maximum retries */ 3 30 02 sequence_n fixed bin, /* sequence number */ 3 31 02 filenamesp ptr, /* ptr to filenames */ 3 32 02 filenames_idx fixed bin, /* current filename */ 3 33 02 filep ptr, /* start of file ptr */ 3 34 02 buffp ptr, /* file data ptr */ 3 35 02 msf_count fixed bin (21), /* msf segments to send */ 3 36 02 msf_current fixed bin (21), /* current msf module */ 3 37 02 file_count fixed bin, /* per transaction */ 3 38 02 statisticsp ptr, /* statistics info ptr */ 3 39 02 flags, 3 40 03 msf bit (1), /* Is this an MSF */ 3 41 03 owe_a_cr bit (1), /* Holding back a CR */ 3 42 03 pad bit (34), 3 43 02 iocb_ptr ptr; /* for vfile_ */ 3 44 3 45 3 46 3 47 dcl transfer_infop ptr; 3 48 dcl kermit_transfer_info_version 3 49 char (9) static options (constant) 3 50 init ("kti 1.1"); 3 51 3 52 3 53 3 54 3 55 /********************************************************************/ 3 56 /* */ 3 57 /*n kermit_filenames */ 3 58 /* */ 3 59 /*d This data structure defines the overlay for the filenames. */ 3 60 /* */ 3 61 /*l Written: 84-10-11 by Maureen Mallmes */ 3 62 /*l Modified: 84-11-05 by Dean Elhard to add archive support */ 3 63 /* */ 3 64 /********************************************************************/ 3 65 3 66 dcl 01 kermit_filenames aligned based (kermit_transfer_info.filenamesp), 3 67 02 n_paths fixed bin, 3 68 02 pathname (0 refer (kermit_filenames.n_paths)) aligned, 3 69 03 directory char (168) unal, 3 70 03 entry_name char (32) unal, 3 71 03 component char (32) unal; 3 72 3 73 3 74 /********************************************************************/ 3 75 /* */ 3 76 /*n kermit_packets */ 3 77 /* */ 3 78 /*d This data defines the packet types. */ 3 79 /* */ 3 80 /*l Written: 84-10-11 by Maureen Mallmes */ 3 81 /* */ 3 82 /********************************************************************/ 3 83 3 84 3 85 dcl Data_packet char (1) internal static options (constant) init ("D"); 3 86 dcl Ack_packet char (1) internal static options (constant) init ("Y"); 3 87 dcl Nak_packet char (1) internal static options (constant) init ("N"); 3 88 dcl Send_init_packet char (1) internal static options (constant) init ("S"); 3 89 dcl Eot_packet char (1) internal static options (constant) init ("B"); 3 90 dcl File_header_packet char (1) internal static options (constant) init ("F"); 3 91 dcl Eof_packet char (1) internal static options (constant) init ("Z"); 3 92 dcl Error_packet char (1) internal static options (constant) init ("E"); 3 93 dcl Reserved_packet char (1) internal static options (constant) init ("T"); 3 94 3 95 3 96 /********************************************************************/ 3 97 /* */ 3 98 /*n kermit_states */ 3 99 /* */ 3 100 /*d This data defines the transfer states. */ 3 101 /* */ 3 102 /*l Written: 84-10-11 by Maureen Mallmes */ 3 103 /* */ 3 104 /********************************************************************/ 3 105 3 106 dcl Rec_init fixed bin internal static options (constant) init (0); 3 107 dcl Rec_file_header fixed bin internal static options (constant) init (1); 3 108 dcl Rec_data fixed bin internal static options (constant) init (2); 3 109 dcl Rec_file_abort fixed bin internal static options (constant) init (3); 3 110 dcl Rec_abort fixed bin internal static options (constant) init (4); 3 111 dcl Rec_complete fixed bin internal static options (constant) init (5); 3 112 3 113 dcl Send_init fixed bin internal static options (constant) init (0); 3 114 dcl Send_file_header fixed bin internal static options (constant) init (1); 3 115 dcl Send_data fixed bin internal static options (constant) init (2); 3 116 dcl Send_eof fixed bin internal static options (constant) init (3); 3 117 dcl Send_break fixed bin internal static options (constant) init (4); 3 118 dcl Send_abort fixed bin internal static options (constant) init (5); 3 119 dcl Send_complete fixed bin internal static options (constant) init (6); 3 120 3 121 3 122 /* END OF: kermit_transfer_info.incl.pl1 * * * * * */ 89 90 91 92 /* clear any garbage on the line */ 93 call kermit_comm_mgr_$flush_input (infop, ec); 94 95 remote_datap = addr (remote_data); 96 97 do while ("1"b); 98 99 packet_n = 0; 100 call rec_server_idle (infop, packet_n, packet_type, remote_datap, remote_data_lth); 101 102 state = index (Server_packets, packet_type); 103 goto server_state (state); 104 105 106 Server_Rec_Init: 107 call svr_send_file (infop, packet_n, remote_datap, remote_data_lth, filenames_areap); 108 goto exit_state; 109 110 Server_Send_Init: 111 call svr_receive_file (infop, packet_n, remote_datap, remote_data_lth); 112 goto exit_state; 113 114 Server_Init: 115 call svr_init (infop, packet_n, remote_datap, remote_data_lth); 116 goto exit_state; 117 118 Server_Generic: 119 generic_state = index (Generic_packets, generic_type); 120 goto generic_command (generic_state); 121 122 Generic_Finish: 123 call kermit_pad_$send (infop, Ack_packet, null (), (0), packet_n, (0), (0), (0)); 124 generic_sw = True; 125 call verify_termination (infop, Generic_packet, generic_sw, GF_packet); 126 goto shutdown_server; 127 128 Generic_Logout: 129 call kermit_pad_$send (infop, Ack_packet, null (), (0), packet_n, (0), (0), (0)); 130 generic_sw = True; 131 call verify_termination (infop, Generic_packet, generic_sw, GL_packet); 132 call logout_user; 133 goto exit_state; /* should never come back here */ 134 135 Generic_Other: 136 Other: 137 call kermit_pad_$send (infop, Error_packet, addr (Error_msg), length (Error_msg), packet_n, (0), (0), ec); 138 139 exit_state: 140 end; 141 shutdown_server: 142 return; 143 144 rec_server_idle: 145 proc (infop, sequence_n, packet_type, packet_datap, packet_data_lth); 146 147 /**********************************************************************/ 148 /* */ 149 /*n Name: kermit_server_$rec_server_idle internal */ 150 /*i Input: infop, sequence_n, */ 151 /*f Function: Waits for messages from remote. */ 152 /*o Output: packet_type, packet_datap, packet_data_lth */ 153 /*l Modified: 86-01-24 by Don Kozlowski - Idle until a packet */ 154 /*l is received regardless of the packet */ 155 /*l number. Remove all reset_line_modes */ 156 /*l except before logout. (kermit 13) */ 157 /* */ 158 /**********************************************************************/ 159 160 /* parameters */ 161 162 dcl infop ptr; 163 dcl packet_datap ptr; 164 dcl packet_data_lth fixed bin (21); 165 dcl packet_type char (1); 166 dcl sequence_n fixed bin; 167 168 /* automatic */ 169 170 dcl ec fixed bin (35); 171 dcl old_timeout fixed bin (8) unal; 172 dcl old_timeout_select (1) fixed bin; 173 dcl server_timeout fixed bin (8) unal; 174 dcl timeout_select (1) fixed bin; 175 176 /* based */ 177 178 dcl packet_data char (Max_remote_packet_size) based (packet_datap); 179 180 /* constants */ 181 182 dcl Thirty_seconds fixed bin (8) unal internal static options (constant) init (30); 183 184 185 /* Make the timeout interval reasonable for this state */ 186 timeout_select (1) = I_timeout; 187 server_timeout = Thirty_seconds; 188 sequence_n = 0; 189 ec = 0; 190 191 call kermit_mode_mgr_$store (infop, Temporary, timeout_select, addr (server_timeout), ec); 192 193 /* Loop until we get a packet */ 194 195 call kermit_pad_$receive (infop, packet_type, packet_datap, length (packet_data), packet_n, packet_data_lth, (0), ("0"b), ec); 196 197 do while (ec ^= 0); 198 call kermit_pad_$send (infop, Nak_packet, null (), (0), sequence_n, (0), (0), ec); 199 call kermit_pad_$receive (infop, packet_type, packet_datap, length (packet_data), packet_n, packet_data_lth, (0), ("0"b), ec); 200 end; 201 202 /* Have a packet. Let's reset the timeout interval */ 203 old_timeout_select (1) = Timeout; 204 call kermit_mode_mgr_$retrieve (infop, Permanent, old_timeout_select, addr (old_timeout), ec); 205 call kermit_mode_mgr_$store (infop, Temporary, timeout_select, addr (old_timeout), ec); 206 207 return; 208 end rec_server_idle; 209 210 svr_init: 211 proc (infop, sequence_n, packet_datap, packet_data_lth); 212 213 /**********************************************************************/ 214 /* */ 215 /*n Name: kermit_server_$svr_init internal */ 216 /*i Input: infop, sequence_n, packet_datap, packet_data_lth */ 217 /*f Function: Negotiates parameters with remote */ 218 /*o Output: none */ 219 /* */ 220 /**********************************************************************/ 221 222 /* parameters */ 223 224 dcl infop ptr; 225 dcl packet_datap ptr; 226 dcl packet_data_lth fixed bin (21); 227 dcl sequence_n fixed bin; 228 229 /* automatic */ 230 231 dcl ack_init_data char (Max_packet_size); 232 dcl ack_init_data_lth fixed bin (21); 233 dcl ack_init_datap ptr; 234 dcl ack_init_packet char (Max_packet_size); 235 dcl ack_init_packet_lth fixed bin (21); 236 dcl ack_init_packetp ptr; 237 dcl ec fixed bin (35); 238 dcl short_message char (8) aligned; 239 dcl long_message char (100) aligned; 240 241 242 ec = 0; 243 ack_init_datap = addr (ack_init_data); 244 ack_init_packetp = addr (ack_init_packet); 245 246 /* Get the local modes */ 247 call kermit_xfer_modes_$get_local_params (infop, ack_init_datap, ack_init_data_lth, ack_init_packetp, ack_init_packet_lth, ec); 248 if ec ^= 0 then goto init_error; 249 250 call kermit_xfer_modes_$check_params (infop, packet_datap, packet_data_lth, ack_init_datap, ec); 251 if ec ^= 0 then 252 goto init_error; 253 254 /* else all is fine, so give the remote kermit the local modes */ 255 call kermit_pad_$send (infop, Ack_packet, ack_init_packetp, ack_init_packet_lth, sequence_n, (0), (0), ec); 256 if ec ^= 0 then 257 goto init_error; 258 259 /* All okay, so set the tty_ line to the new modes */ 260 call kermit_xfer_modes_$process_params (infop, packet_datap, packet_data_lth, ack_init_datap, ec); 261 262 call kermit_comm_mgr_$set_line_modes (infop, ec); 263 return; 264 265 init_error: 266 call convert_status_code_ (ec, short_message, long_message); 267 call kermit_pad_$send (infop, Error_packet, addr (long_message), length (rtrim (long_message)), packet_n, (0), (0), ec); 268 return; 269 end svr_init; 270 271 svr_send_file: 272 proc (infop, sequence_n, packet_datap, packet_data_lth, filenames_areap); 273 274 /**********************************************************************/ 275 /* */ 276 /*n Name: kermit_server_$svr_send_files internal */ 277 /*i Input: infop, sequence_n, packet_datap, packet_data_lth, */ 278 /*f filenames_areap */ 279 /*f Function: Gets the names of the files to be sent. */ 280 /*f Calls kermit_send_$send_to_remote to send a file. */ 281 /*o Output: none */ 282 /* */ 283 /**********************************************************************/ 284 285 /* parameters */ 286 287 dcl infop ptr; 288 dcl filenames_areap ptr; 289 dcl packet_datap ptr; 290 dcl packet_data_lth fixed bin (21); 291 dcl sequence_n fixed bin; 292 293 /* automatic */ 294 295 dcl error_msg char (256); 296 dcl filename char (packet_data_lth); 297 dcl long_message char (100) aligned; 298 dcl short_message char (8) aligned; 299 300 301 /* based */ 302 303 dcl 01 filenames like kermit_filenames based (filenames_areap); 304 dcl packet_data char (packet_data_lth) based (packet_datap); 305 306 307 /* external */ 308 309 dcl error_table_$noarg fixed bin (35) ext static; 310 311 ec = 0; 312 313 if packet_data_lth = 0 then do; 314 ec = error_table_$noarg; 315 goto send_error; 316 end; 317 318 filenames.n_paths = 0; 319 filename = before (ltrim (packet_data), " "); 320 321 call kermit_get_filenames_ (infop, rtrim (filename), filenames_areap, error_msg, ec); 322 323 if ec ^= 0 then goto send_error; 324 325 call kermit_send_$send_to_remote (infop, filenames_areap, "", "0"b, (0), ec); 326 if ec ^= 0 then goto send_error; 327 return; 328 329 send_error: 330 call convert_status_code_ (ec, short_message, long_message); 331 call kermit_pad_$send (infop, Error_packet, addr (long_message), length (rtrim (long_message)), packet_n, (0), (0), ec); 332 return; 333 end svr_send_file; 334 335 svr_receive_file: 336 proc (infop, sequence_n, packet_datap, packet_data_lth); 337 338 /**********************************************************************/ 339 /* */ 340 /*n Name: kermit_server_$svr_receive_file internal */ 341 /*i Input: infop, sequence_n, packet_datap, packet_data_lth */ 342 /*f Function: Receives a file or file group from the remote. */ 343 /*f Negotiates parameters. Calls */ 344 /*f kermit_receive_$receive_from_remote to receive */ 345 /*f a file or file group */ 346 /*o Output: none */ 347 /* */ 348 /**********************************************************************/ 349 350 /* parameters */ 351 352 dcl infop ptr; 353 dcl packet_datap ptr; 354 dcl packet_data_lth fixed bin (21); 355 dcl sequence_n fixed bin; 356 357 /* automatic */ 358 dcl ack_init_data char (Max_packet_size); 359 dcl ack_init_data_lth fixed bin (21); 360 dcl ack_init_datap ptr; 361 dcl ack_init_packet char (Max_packet_size); 362 dcl ack_init_packet_lth fixed bin (21); 363 dcl ack_init_packetp ptr; 364 dcl ec fixed bin (35); 365 dcl file_sw bit (1); 366 dcl first_filename char (packet_data_lth); 367 dcl initial_state fixed bin; 368 dcl long_message char (100) aligned; 369 dcl short_message char (8) aligned; 370 371 /* constants */ 372 373 dcl False bit (1) internal static options (constant) init ("0"b); 374 375 ec = 0; 376 ack_init_datap = addr (ack_init_data); 377 ack_init_packetp = addr (ack_init_packet); 378 379 call kermit_xfer_modes_$get_local_params (infop, ack_init_datap, ack_init_data_lth, ack_init_packetp, ack_init_packet_lth, ec); 380 if ec ^= 0 then goto modes_error; 381 382 call kermit_xfer_modes_$check_params (infop, packet_datap, packet_data_lth, ack_init_datap, ec); 383 if ec ^= 0 then 384 goto modes_error; 385 386 /* else all is fine, so give the remote kermit the local modes */ 387 call kermit_pad_$send (infop, Ack_packet, ack_init_packetp, ack_init_packet_lth, sequence_n, (0), 388 (0), ec); 389 if ec ^= 0 then 390 goto modes_error; 391 392 /* All okay, so set the tty_ line to the new modes */ 393 call kermit_xfer_modes_$process_params (infop, packet_datap, packet_data_lth, ack_init_datap, ec); 394 395 call kermit_comm_mgr_$set_line_modes (infop, ec); 396 397 initial_state = Rec_file_header; 398 first_filename = ""; 399 file_sw = False; 400 sequence_n = sequence_n + 1; 401 402 call kermit_receive_$receive_from_remote (infop, initial_state, sequence_n, first_filename, file_sw, (0), ec); 403 return; 404 405 modes_error: 406 call convert_status_code_ (ec, short_message, long_message); 407 call kermit_pad_$send (infop, Error_packet, addr (long_message), length (rtrim (long_message)), packet_n, (0), (0), ec); 408 return; 409 end svr_receive_file; 410 411 logout_user: proc; 412 413 /**********************************************************************/ 414 /* */ 415 /*n Name: kermit_server_$logout_user internal */ 416 /*i Input: none */ 417 /*f Function: Logs out the user in response to a Generic Logout */ 418 /*f packet. */ 419 /*o Output: state */ 420 /* */ 421 /**********************************************************************/ 422 423 /* automatic */ 424 425 dcl action char (7); 426 dcl 01 local_finish_info aligned like finish_info; 427 dcl 1 logout_string aligned, /* information about logouts */ 428 02 version fixed bin, /* this is version 0 */ 429 02 hold bit (1) unaligned, /* don't hangup line */ 430 02 brief bit (1) unaligned, /* don't print logout message */ 431 02 pad bit (34) unaligned;/* must be zero */ 432 dcl term_structure_ptr ptr; 433 434 435 /* procedures */ 436 437 dcl signal_ entry (char (*), ptr, ptr); 438 dcl execute_epilogue_ entry (bit (1) aligned); 439 dcl terminate_process_ entry (char (*), ptr); 440 441 442 /* include */ 443 4 1 /* Begin include file finish_info.incl.pl1 3/82 BIM */ 4 2 /* format: style3 */ 4 3 /* condition_info_header.incl.pl1 must be included with this file */ 4 4 4 5 declare finish_info_ptr pointer; 4 6 declare 1 finish_info aligned based (finish_info_ptr), 4 7 2 header aligned like condition_info_header, 4 8 2 type character (8) aligned; 4 9 4 10 /* End include file finish_info.incl.pl1 */ 444 5 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 5 2 /* format: style2 */ 5 3 5 4 declare condition_info_header_ptr 5 5 pointer; 5 6 declare 1 condition_info_header 5 7 aligned based (condition_info_header_ptr), 5 8 2 length fixed bin, /* length in words of this structure */ 5 9 2 version fixed bin, /* version number of this structure */ 5 10 2 action_flags aligned, /* tell handler how to proceed */ 5 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 5 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 5 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 5 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 5 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 5 16 3 pad bit (32) unaligned, 5 17 2 info_string char (256) varying, /* may contain printable message */ 5 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 5 19 5 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 445 446 447 448 call kermit_comm_mgr_$reset_line_modes (infop, (0)); 449 450 action = "logout"; 451 logout_string.version = 0; 452 logout_string.hold = "0"b; /* set default values for arguments */ 453 logout_string.brief = "1"b; /* .. */ 454 logout_string.pad = "0"b; 455 term_structure_ptr = addr (logout_string); 456 457 finish_info_ptr = addr (local_finish_info); 458 finish_info.type = "logout"; 459 460 no_more_arguments: 461 finish_info.length = size (finish_info); 462 finish_info.version = 1; 463 finish_info.info_string = ""; 464 unspec (finish_info.action_flags) = ""b; 465 finish_info.status_code = 0; 466 call signal_ ("finish", null (), addr (finish_info)); 467 call execute_epilogue_ ("0"b); 468 call terminate_process_ (action, term_structure_ptr); 469 go to no_more_arguments; /* and don't come back */ 470 end logout_user; 471 472 verify_termination: 473 proc (infop, packet_type, generic_sw, generic_packet_type); 474 475 /**********************************************************************/ 476 /* */ 477 /*n Name: kermit_server_$verify_termination internal */ 478 /*i Input: infop, packet_type, generic_sw, */ 479 /*i generic_packet_type */ 480 /*f Function: Verifies receipt of the transmitted ack before */ 481 /*f exiting the server. */ 482 /*o Output: none */ 483 /* */ 484 /**********************************************************************/ 485 486 /* parameters */ 487 488 dcl infop ptr; 489 dcl generic_sw bit (1); 490 dcl generic_packet_type char (1); 491 dcl packet_type char (1); 492 493 /* automatic */ 494 495 dcl chars_received fixed bin (21); 496 dcl chars_sent fixed bin (21); 497 dcl done bit (1); 498 dcl ec fixed bin (35); 499 dcl eol_split bit (1); 500 dcl packet_n fixed bin; 501 dcl packet_size fixed bin (21); 502 dcl packet_timeout fixed bin (8) unal; 503 dcl r_packet_size fixed bin (21); 504 dcl remote_data char (Max_remote_packet_size); 505 dcl remote_datap ptr; 506 dcl remote_packet_type char (1); 507 dcl timeout_select (1) fixed bin; 508 509 /* based */ 510 dcl remote_generic_type char (1) based (addr (remote_data)); 511 512 /* constants */ 513 514 dcl False bit (1) internal static options (constant) init ("0"b); 515 dcl Five_seconds fixed bin (8) unal internal static options (constant) init (5); 516 dcl True bit (1) internal static options (constant) init ("1"b); 517 518 519 timeout_select (1) = I_timeout; 520 packet_timeout = Five_seconds; 521 522 call kermit_mode_mgr_$store (infop, Temporary, timeout_select, addr (packet_timeout), ec); 523 524 done = False; 525 remote_packet_type = ""; 526 remote_data = ""; 527 remote_datap = addr (remote_data); 528 529 call kermit_pad_$receive (infop, remote_packet_type, remote_datap, length (remote_data), packet_n, chars_received, 530 r_packet_size, eol_split, ec); 531 532 533 do while (remote_packet_type = packet_type & ^done); 534 if generic_sw & remote_generic_type ^= generic_packet_type then done = True; 535 else call kermit_pad_$send (infop, Ack_packet, null (), 0, packet_n, chars_sent, packet_size, ec); 536 537 remote_packet_type = ""; 538 remote_data = ""; 539 if ^done then call kermit_pad_$receive (infop, remote_packet_type, remote_datap, length (remote_data), packet_n, chars_received, 540 packet_size, eol_split, ec); 541 end; 542 return; 543 end verify_termination; 544 545 end kermit_server_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/16/88 1315.0 kermit_server_.pl1 >spec>install>1113>kermit_server_.pl1 85 1 11/20/84 1351.4 kermit_dcls.incl.pl1 >ldd>include>kermit_dcls.incl.pl1 87 2 07/07/88 2041.4 kermit_mode_info.incl.pl1 >ldd>include>kermit_mode_info.incl.pl1 89 3 07/07/88 2041.4 kermit_transfer_info.incl.pl1 >ldd>include>kermit_transfer_info.incl.pl1 444 4 04/21/82 1211.8 finish_info.incl.pl1 >ldd>include>finish_info.incl.pl1 445 5 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. Ack_packet 000002 constant char(1) initial packed unaligned dcl 3-86 set ref 122* 128* 255* 387* 535* Error_msg 000007 constant char(15) initial packed unaligned dcl 64 set ref 135 135 135 135 Error_packet 000000 constant char(1) initial packed unaligned dcl 3-92 set ref 135* 267* 331* 407* False constant bit(1) initial packed unaligned dcl 373 in procedure "svr_receive_file" ref 399 False constant bit(1) initial packed unaligned dcl 514 in procedure "verify_termination" ref 524 Five_seconds constant fixed bin(8,0) initial packed unaligned dcl 515 ref 520 GF_packet 000005 constant char(1) initial packed unaligned dcl 67 set ref 125* GL_packet 000004 constant char(1) initial packed unaligned dcl 68 set ref 131* Generic_packet 000006 constant char(1) initial packed unaligned dcl 65 set ref 125* 131* Generic_packets 002347 constant char(2) initial packed unaligned dcl 66 ref 118 I_timeout constant fixed bin(17,0) initial dcl 2-72 ref 186 519 Max_packet_size internal static fixed bin(17,0) initial dcl 70 ref 231 234 358 361 Max_remote_packet_size constant fixed bin(17,0) initial dcl 69 ref 47 178 504 Nak_packet 000001 constant char(1) initial packed unaligned dcl 3-87 set ref 198* Permanent 000027 constant fixed bin(17,0) initial dcl 2-21 set ref 204* Rec_file_header constant fixed bin(17,0) initial dcl 3-107 ref 397 Server_packets 000003 constant char(4) initial packed unaligned dcl 71 ref 102 Temporary 000026 constant fixed bin(17,0) initial dcl 2-22 set ref 191* 205* 522* Thirty_seconds constant fixed bin(8,0) initial packed unaligned dcl 182 ref 187 Timeout constant fixed bin(17,0) initial dcl 2-28 ref 203 True constant bit(1) initial packed unaligned dcl 72 in procedure "kermit_server_" ref 124 130 True constant bit(1) initial packed unaligned dcl 516 in procedure "verify_termination" ref 534 ack_init_data 000202 automatic char(94) packed unaligned dcl 231 in procedure "svr_init" set ref 243 ack_init_data 000100 automatic char(94) packed unaligned dcl 358 in procedure "svr_receive_file" set ref 376 ack_init_data_lth 000232 automatic fixed bin(21,0) dcl 232 in procedure "svr_init" set ref 247* ack_init_data_lth 000130 automatic fixed bin(21,0) dcl 359 in procedure "svr_receive_file" set ref 379* ack_init_datap 000132 automatic pointer dcl 360 in procedure "svr_receive_file" set ref 376* 379* 382* 393* ack_init_datap 000234 automatic pointer dcl 233 in procedure "svr_init" set ref 243* 247* 250* 260* ack_init_packet 000236 automatic char(94) packed unaligned dcl 234 in procedure "svr_init" set ref 244 ack_init_packet 000134 automatic char(94) packed unaligned dcl 361 in procedure "svr_receive_file" set ref 377 ack_init_packet_lth 000266 automatic fixed bin(21,0) dcl 235 in procedure "svr_init" set ref 247* 255* ack_init_packet_lth 000164 automatic fixed bin(21,0) dcl 362 in procedure "svr_receive_file" set ref 379* 387* ack_init_packetp 000270 automatic pointer dcl 236 in procedure "svr_init" set ref 244* 247* 255* ack_init_packetp 000166 automatic pointer dcl 363 in procedure "svr_receive_file" set ref 377* 379* 387* action 000336 automatic char(7) packed unaligned dcl 425 set ref 450* 468* action_flags 2 based structure level 3 dcl 4-6 set ref 464* addr builtin function dcl 77 ref 95 118 135 135 191 191 204 204 205 205 243 244 267 267 331 331 376 377 407 407 455 457 466 466 522 522 527 534 before builtin function dcl 77 ref 319 brief 1(01) 000450 automatic bit(1) level 2 packed packed unaligned dcl 427 set ref 453* chars_received 000464 automatic fixed bin(21,0) dcl 495 set ref 529* 539* chars_sent 000465 automatic fixed bin(21,0) dcl 496 set ref 535* condition_info_header based structure level 1 dcl 5-6 convert_status_code_ 000010 constant entry external dcl 81 ref 265 329 405 done 000466 automatic bit(1) packed unaligned dcl 497 set ref 524* 533 534* 539 ec 000100 automatic fixed bin(35,0) dcl 43 in procedure "kermit_server_" set ref 93* 135* 311* 314* 321* 323 325* 326 329* 331* ec 000272 automatic fixed bin(35,0) dcl 237 in procedure "svr_init" set ref 242* 247* 248 250* 251 255* 256 260* 262* 265* 267* ec 000166 automatic fixed bin(35,0) dcl 170 in procedure "rec_server_idle" set ref 189* 191* 195* 197 198* 199* 204* 205* ec 000170 automatic fixed bin(35,0) dcl 364 in procedure "svr_receive_file" set ref 375* 379* 380 382* 383 387* 389 393* 395* 402* 405* 407* ec 000467 automatic fixed bin(35,0) dcl 498 in procedure "verify_termination" set ref 522* 529* 535* 539* eol_split 000470 automatic bit(1) packed unaligned dcl 499 set ref 529* 539* error_msg 000100 automatic char(256) packed unaligned dcl 295 set ref 321* error_table_$noarg 000044 external static fixed bin(35,0) dcl 309 ref 314 execute_epilogue_ 000050 constant entry external dcl 438 ref 467 file_sw 000171 automatic bit(1) packed unaligned dcl 365 set ref 399* 402* filename 000200 automatic char packed unaligned dcl 296 set ref 319* 321 321 filenames based structure level 1 unaligned dcl 303 filenames_areap parameter pointer dcl 288 in procedure "svr_send_file" set ref 271 318 321* 325* filenames_areap parameter pointer dcl 39 in procedure "kermit_server_" set ref 17 106* finish_info based structure level 1 dcl 4-6 set ref 460 466 466 finish_info_ptr 000454 automatic pointer dcl 4-5 set ref 457* 458 460 460 462 463 464 465 466 466 first_filename 000172 automatic char packed unaligned dcl 366 set ref 398* 402* generic_command 000136 automatic label variable initial array dcl 60 set ref 60* 60* 60* 120 generic_packet_type parameter char(1) packed unaligned dcl 490 ref 472 534 generic_state 000105 automatic fixed bin(17,0) dcl 49 set ref 118* 120 generic_sw parameter bit(1) packed unaligned dcl 489 in procedure "verify_termination" ref 472 534 generic_sw 000101 automatic bit(1) packed unaligned dcl 44 in procedure "kermit_server_" set ref 124* 125* 130* 131* generic_type based char(1) packed unaligned dcl 54 ref 118 header based structure level 2 dcl 4-6 hold 1 000450 automatic bit(1) level 2 packed packed unaligned dcl 427 set ref 452* index builtin function dcl 77 ref 102 118 info_string 3 based varying char(256) level 3 dcl 4-6 set ref 463* infop parameter pointer dcl 287 in procedure "svr_send_file" set ref 271 321* 325* 331* infop parameter pointer dcl 488 in procedure "verify_termination" set ref 472 522* 529* 535* 539* infop parameter pointer dcl 38 in procedure "kermit_server_" set ref 17 93* 100* 106* 110* 114* 122* 125* 128* 131* 135* 448* infop parameter pointer dcl 162 in procedure "rec_server_idle" set ref 144 191* 195* 198* 199* 204* 205* infop parameter pointer dcl 352 in procedure "svr_receive_file" set ref 335 379* 382* 387* 393* 395* 402* 407* infop parameter pointer dcl 224 in procedure "svr_init" set ref 210 247* 250* 255* 260* 262* 267* initial_state 000172 automatic fixed bin(17,0) dcl 367 set ref 397* 402* kermit_comm_mgr_$flush_input 000012 constant entry external dcl 1-15 ref 93 kermit_comm_mgr_$reset_line_modes 000014 constant entry external dcl 1-20 ref 448 kermit_comm_mgr_$set_line_modes 000016 constant entry external dcl 1-25 ref 262 395 kermit_filenames based structure level 1 dcl 3-66 kermit_get_filenames_ 000020 constant entry external dcl 1-30 ref 321 kermit_mode_mgr_$retrieve 000022 constant entry external dcl 1-78 ref 204 kermit_mode_mgr_$store 000024 constant entry external dcl 1-90 ref 191 205 522 kermit_pad_$receive 000026 constant entry external dcl 1-97 ref 195 199 529 539 kermit_pad_$send 000030 constant entry external dcl 1-108 ref 122 128 135 198 255 267 331 387 407 535 kermit_receive_$receive_from_remote 000032 constant entry external dcl 1-118 ref 402 kermit_send_$send_to_remote 000034 constant entry external dcl 1-128 ref 325 kermit_xfer_modes_$check_params 000036 constant entry external dcl 1-144 ref 250 382 kermit_xfer_modes_$get_local_params 000040 constant entry external dcl 1-157 ref 247 379 kermit_xfer_modes_$process_params 000042 constant entry external dcl 1-166 ref 260 393 length based fixed bin(17,0) level 3 in structure "finish_info" dcl 4-6 in procedure "logout_user" set ref 460* length builtin function dcl 77 in procedure "kermit_server_" ref 135 135 195 195 199 199 267 267 331 331 407 407 529 529 539 539 local_finish_info 000340 automatic structure level 1 dcl 426 set ref 457 logout_string 000450 automatic structure level 1 dcl 427 set ref 455 long_message 000200 automatic char(100) dcl 297 in procedure "svr_send_file" set ref 329* 331 331 331 331 long_message 000173 automatic char(100) dcl 368 in procedure "svr_receive_file" set ref 405* 407 407 407 407 long_message 000276 automatic char(100) dcl 239 in procedure "svr_init" set ref 265* 267 267 267 267 ltrim builtin function dcl 77 ref 319 n_paths based fixed bin(17,0) level 2 dcl 303 set ref 318* null builtin function dcl 77 ref 122 122 128 128 198 198 466 466 535 535 old_timeout 000167 automatic fixed bin(8,0) packed unaligned dcl 171 set ref 204 204 205 205 old_timeout_select 000170 automatic fixed bin(17,0) array dcl 172 set ref 203* 204* packet_data based char(3000) packed unaligned dcl 178 in procedure "rec_server_idle" ref 195 195 199 199 packet_data based char packed unaligned dcl 304 in procedure "svr_send_file" ref 319 packet_data_lth parameter fixed bin(21,0) dcl 226 in procedure "svr_init" set ref 210 250* 260* packet_data_lth parameter fixed bin(21,0) dcl 164 in procedure "rec_server_idle" set ref 144 195* 199* packet_data_lth parameter fixed bin(21,0) dcl 354 in procedure "svr_receive_file" set ref 335 366 382* 393* packet_data_lth parameter fixed bin(21,0) dcl 290 in procedure "svr_send_file" ref 271 296 313 319 packet_datap parameter pointer dcl 225 in procedure "svr_init" set ref 210 250* 260* packet_datap parameter pointer dcl 289 in procedure "svr_send_file" ref 271 319 packet_datap parameter pointer dcl 163 in procedure "rec_server_idle" set ref 144 195* 195 195 199* 199 199 packet_datap parameter pointer dcl 353 in procedure "svr_receive_file" set ref 335 382* 393* packet_n 000102 automatic fixed bin(17,0) dcl 45 in procedure "kermit_server_" set ref 99* 100* 106* 110* 114* 122* 128* 135* 195* 199* 267* 331* 407* packet_n 000471 automatic fixed bin(17,0) dcl 500 in procedure "verify_termination" set ref 529* 535* 539* packet_size 000472 automatic fixed bin(21,0) dcl 501 set ref 535* 539* packet_timeout 000473 automatic fixed bin(8,0) packed unaligned dcl 502 set ref 520* 522 522 packet_type 000103 automatic char(1) packed unaligned dcl 46 in procedure "kermit_server_" set ref 100* 102 packet_type parameter char(1) packed unaligned dcl 165 in procedure "rec_server_idle" set ref 144 195* 199* packet_type parameter char(1) packed unaligned dcl 491 in procedure "verify_termination" ref 472 533 pad 1(02) 000450 automatic bit(34) level 2 packed packed unaligned dcl 427 set ref 454* r_packet_size 000474 automatic fixed bin(21,0) dcl 503 set ref 529* remote_data 000475 automatic char(3000) packed unaligned dcl 504 in procedure "verify_termination" set ref 526* 527 529 529 534 538* 539 539 remote_data 000104 automatic char packed unaligned dcl 47 in procedure "kermit_server_" set ref 95 118 remote_data_lth 000104 automatic fixed bin(21,0) dcl 48 set ref 100* 106* 110* 114* remote_datap 002054 automatic pointer dcl 505 in procedure "verify_termination" set ref 527* 529* 539* remote_datap 000110 automatic pointer dcl 55 in procedure "kermit_server_" set ref 95* 100* 106* 110* 114* remote_generic_type based char(1) packed unaligned dcl 510 ref 534 remote_packet_type 002056 automatic char(1) packed unaligned dcl 506 set ref 525* 529* 533 537* 539* rtrim builtin function dcl 77 ref 267 267 321 321 331 331 407 407 sequence_n parameter fixed bin(17,0) dcl 166 in procedure "rec_server_idle" set ref 144 188* 198* sequence_n parameter fixed bin(17,0) dcl 227 in procedure "svr_init" set ref 210 255* sequence_n parameter fixed bin(17,0) dcl 355 in procedure "svr_receive_file" set ref 335 387* 400* 400 402* sequence_n parameter fixed bin(17,0) dcl 291 in procedure "svr_send_file" ref 271 server_state 000112 automatic label variable initial array dcl 59 set ref 59* 59* 59* 59* 59* 103 server_timeout 000171 automatic fixed bin(8,0) packed unaligned dcl 173 set ref 187* 191 191 short_message 000224 automatic char(8) dcl 369 in procedure "svr_receive_file" set ref 405* short_message 000274 automatic char(8) dcl 238 in procedure "svr_init" set ref 265* short_message 000232 automatic char(8) dcl 298 in procedure "svr_send_file" set ref 329* signal_ 000046 constant entry external dcl 437 ref 466 size builtin function dcl 77 ref 460 state 000106 automatic fixed bin(17,0) dcl 50 set ref 102* 103 status_code 104 based fixed bin(35,0) level 3 dcl 4-6 set ref 465* term_structure_ptr 000452 automatic pointer dcl 432 set ref 455* 468* terminate_process_ 000052 constant entry external dcl 439 ref 468 timeout_select 002057 automatic fixed bin(17,0) array dcl 507 in procedure "verify_termination" set ref 519* 522* timeout_select 000172 automatic fixed bin(17,0) array dcl 174 in procedure "rec_server_idle" set ref 186* 191* 205* type 105 based char(8) level 2 dcl 4-6 set ref 458* unspec builtin function dcl 77 set ref 464* version 000450 automatic fixed bin(17,0) level 2 in structure "logout_string" dcl 427 in procedure "logout_user" set ref 451* version 1 based fixed bin(17,0) level 3 in structure "finish_info" dcl 4-6 in procedure "logout_user" set ref 462* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Capabilities internal static fixed bin(17,0) initial dcl 2-46 Check_type internal static fixed bin(17,0) initial dcl 2-36 Data_packet internal static char(1) initial packed unaligned dcl 3-85 Eight_bit_char internal static fixed bin(17,0) initial dcl 2-33 Eof_packet internal static char(1) initial packed unaligned dcl 3-91 Eol_char internal static fixed bin(17,0) initial dcl 2-31 Eot_packet internal static char(1) initial packed unaligned dcl 3-89 Ext_Headers internal static bit(9) initial packed unaligned dcl 2-120 File_header_packet internal static char(1) initial packed unaligned dcl 3-90 File_type internal static fixed bin(17,0) initial dcl 2-40 File_warning internal static fixed bin(17,0) initial dcl 2-39 G_capabilities internal static fixed bin(17,0) initial dcl 2-93 G_check_type internal static fixed bin(17,0) initial dcl 2-86 G_eight_bit_char internal static fixed bin(17,0) initial dcl 2-83 G_parity internal static fixed bin(17,0) initial dcl 2-87 G_repeat_char internal static fixed bin(17,0) initial dcl 2-84 G_start_char internal static fixed bin(17,0) initial dcl 2-85 G_window internal static fixed bin(17,0) initial dcl 2-88 I_eol_char internal static fixed bin(17,0) initial dcl 2-75 I_max_lenx1 internal static fixed bin(17,0) initial dcl 2-89 I_max_lenx2 internal static fixed bin(17,0) initial dcl 2-90 I_maxl internal static fixed bin(17,0) initial dcl 2-71 I_n_pads internal static fixed bin(17,0) initial dcl 2-73 I_pad_char internal static fixed bin(17,0) initial dcl 2-74 I_quote_char internal static fixed bin(17,0) initial dcl 2-76 Incomplete internal static fixed bin(17,0) initial dcl 2-38 Line_byte_size internal static fixed bin(17,0) initial dcl 2-42 Max_len_ext_1 internal static fixed bin(17,0) initial dcl 2-44 Max_len_ext_2 internal static fixed bin(17,0) initial dcl 2-45 Maxl internal static fixed bin(17,0) initial dcl 2-27 N_pads internal static fixed bin(17,0) initial dcl 2-29 O_eol_char internal static fixed bin(17,0) initial dcl 2-81 O_max_lenx1 internal static fixed bin(17,0) initial dcl 2-91 O_max_lenx2 internal static fixed bin(17,0) initial dcl 2-92 O_maxl internal static fixed bin(17,0) initial dcl 2-77 O_n_pads internal static fixed bin(17,0) initial dcl 2-79 O_pad_char internal static fixed bin(17,0) initial dcl 2-80 O_quote_char internal static fixed bin(17,0) initial dcl 2-82 O_timeout internal static fixed bin(17,0) initial dcl 2-78 Pad_char internal static fixed bin(17,0) initial dcl 2-30 Parity internal static fixed bin(17,0) initial dcl 2-37 Perm_defaults internal static structure level 1 dcl 2-48 Quote_char internal static fixed bin(17,0) initial dcl 2-32 Rec_abort internal static fixed bin(17,0) initial dcl 3-110 Rec_complete internal static fixed bin(17,0) initial dcl 3-111 Rec_data internal static fixed bin(17,0) initial dcl 3-108 Rec_file_abort internal static fixed bin(17,0) initial dcl 3-109 Rec_init internal static fixed bin(17,0) initial dcl 3-106 Repeat_char internal static fixed bin(17,0) initial dcl 2-34 Reserved_packet internal static char(1) initial packed unaligned dcl 3-93 Retrieve_all internal static fixed bin(17,0) initial array dcl 2-25 Retry_threshold internal static fixed bin(17,0) initial dcl 2-41 Send_abort internal static fixed bin(17,0) initial dcl 3-118 Send_break internal static fixed bin(17,0) initial dcl 3-117 Send_complete internal static fixed bin(17,0) initial dcl 3-119 Send_data internal static fixed bin(17,0) initial dcl 3-115 Send_eof internal static fixed bin(17,0) initial dcl 3-116 Send_file_header internal static fixed bin(17,0) initial dcl 3-114 Send_init internal static fixed bin(17,0) initial dcl 3-113 Send_init_packet internal static char(1) initial packed unaligned dcl 3-88 Start_char internal static fixed bin(17,0) initial dcl 2-35 Store_all internal static fixed bin(17,0) initial array dcl 2-24 Temp_defaults internal static structure level 1 dcl 2-95 Window_size internal static fixed bin(17,0) initial dcl 2-43 condition_info_header_ptr automatic pointer dcl 5-4 kermit_log_mgr_$close_log 000000 constant entry external dcl 1-37 kermit_log_mgr_$disable 000000 constant entry external dcl 1-42 kermit_log_mgr_$display_stats 000000 constant entry external dcl 1-46 kermit_log_mgr_$enable 000000 constant entry external dcl 1-51 kermit_log_mgr_$log_message 000000 constant entry external dcl 1-55 kermit_log_mgr_$open_log 000000 constant entry external dcl 1-60 kermit_log_mgr_$start 000000 constant entry external dcl 1-66 kermit_log_mgr_$stop 000000 constant entry external dcl 1-70 kermit_mode_mgr_$get 000000 constant entry external dcl 1-74 kermit_mode_mgr_$set 000000 constant entry external dcl 1-86 kermit_server_ 000000 constant entry external dcl 1-138 kermit_transfer_info based structure level 1 dcl 3-27 kermit_transfer_info_version internal static char(9) initial packed unaligned dcl 3-48 kermit_xfer_modes_$init 000000 constant entry external dcl 1-152 transfer_infop automatic pointer dcl 3-47 NAMES DECLARED BY EXPLICIT CONTEXT. Generic_Finish 000313 constant label dcl 122 set ref 60 Generic_Logout 000367 constant label dcl 128 ref 60 Generic_Other 000444 constant label dcl 135 ref 60 Other 000444 constant label dcl 135 ref 59 Server_Generic 000276 constant label dcl 118 set ref 59 Server_Init 000260 constant label dcl 114 ref 59 Server_Rec_Init 000222 constant label dcl 106 ref 59 Server_Send_Init 000242 constant label dcl 110 ref 59 exit_state 000500 constant label dcl 139 ref 108 112 116 133 init_error 001127 constant label dcl 265 ref 248 251 256 kermit_server_ 000052 constant entry external dcl 17 logout_user 002002 constant entry internal dcl 411 ref 132 modes_error 001721 constant label dcl 405 ref 380 383 389 no_more_arguments 002036 constant label dcl 460 ref 469 rec_server_idle 000502 constant entry internal dcl 144 ref 100 send_error 001406 constant label dcl 329 ref 315 323 326 shutdown_server 000501 constant label dcl 141 ref 126 svr_init 000766 constant entry internal dcl 210 ref 114 svr_receive_file 001471 constant entry internal dcl 335 ref 110 svr_send_file 001210 constant entry internal dcl 271 ref 106 verify_termination 002123 constant entry internal dcl 472 ref 125 131 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2646 2722 2350 2656 Length 3244 2350 54 306 275 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME kermit_server_ 1233 external procedure is an external procedure. rec_server_idle internal procedure shares stack frame of external procedure kermit_server_. svr_init internal procedure shares stack frame of external procedure kermit_server_. svr_send_file 214 internal procedure uses auto adjustable storage. svr_receive_file 222 internal procedure uses auto adjustable storage. logout_user internal procedure shares stack frame of external procedure kermit_server_. verify_termination internal procedure shares stack frame of external procedure kermit_server_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME kermit_server_ 000100 ec kermit_server_ 000101 generic_sw kermit_server_ 000102 packet_n kermit_server_ 000103 packet_type kermit_server_ 000104 remote_data kermit_server_ 000104 remote_data_lth kermit_server_ 000105 generic_state kermit_server_ 000106 state kermit_server_ 000110 remote_datap kermit_server_ 000112 server_state kermit_server_ 000136 generic_command kermit_server_ 000166 ec rec_server_idle 000167 old_timeout rec_server_idle 000170 old_timeout_select rec_server_idle 000171 server_timeout rec_server_idle 000172 timeout_select rec_server_idle 000202 ack_init_data svr_init 000232 ack_init_data_lth svr_init 000234 ack_init_datap svr_init 000236 ack_init_packet svr_init 000266 ack_init_packet_lth svr_init 000270 ack_init_packetp svr_init 000272 ec svr_init 000274 short_message svr_init 000276 long_message svr_init 000336 action logout_user 000340 local_finish_info logout_user 000450 logout_string logout_user 000452 term_structure_ptr logout_user 000454 finish_info_ptr logout_user 000464 chars_received verify_termination 000465 chars_sent verify_termination 000466 done verify_termination 000467 ec verify_termination 000470 eol_split verify_termination 000471 packet_n verify_termination 000472 packet_size verify_termination 000473 packet_timeout verify_termination 000474 r_packet_size verify_termination 000475 remote_data verify_termination 002054 remote_datap verify_termination 002056 remote_packet_type verify_termination 002057 timeout_select verify_termination svr_receive_file 000100 ack_init_data svr_receive_file 000130 ack_init_data_lth svr_receive_file 000132 ack_init_datap svr_receive_file 000134 ack_init_packet svr_receive_file 000164 ack_init_packet_lth svr_receive_file 000166 ack_init_packetp svr_receive_file 000170 ec svr_receive_file 000171 file_sw svr_receive_file 000172 initial_state svr_receive_file 000172 first_filename svr_receive_file 000173 long_message svr_receive_file 000224 short_message svr_receive_file svr_send_file 000100 error_msg svr_send_file 000200 filename svr_send_file 000200 long_message svr_send_file 000232 short_message svr_send_file THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out call_int_this return_mac tra_ext_2 alloc_auto_adj shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. convert_status_code_ execute_epilogue_ kermit_comm_mgr_$flush_input kermit_comm_mgr_$reset_line_modes kermit_comm_mgr_$set_line_modes kermit_get_filenames_ kermit_mode_mgr_$retrieve kermit_mode_mgr_$store kermit_pad_$receive kermit_pad_$send kermit_receive_$receive_from_remote kermit_send_$send_to_remote kermit_xfer_modes_$check_params kermit_xfer_modes_$get_local_params kermit_xfer_modes_$process_params signal_ terminate_process_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 17 000046 47 000057 59 000066 60 000126 93 000152 95 000163 97 000165 99 000166 100 000167 102 000206 103 000217 106 000222 108 000241 110 000242 112 000257 114 000260 116 000275 118 000276 120 000310 122 000313 124 000347 125 000351 126 000366 128 000367 130 000423 131 000425 132 000442 133 000443 135 000444 139 000500 141 000501 144 000502 186 000504 187 000506 188 000510 189 000511 191 000512 195 000544 197 000601 198 000604 199 000637 200 000674 203 000675 204 000677 205 000732 207 000765 210 000766 242 000770 243 000771 244 000773 247 000775 248 001016 250 001020 251 001040 255 001042 256 001072 260 001074 262 001114 263 001126 265 001127 267 001142 268 001206 271 001207 296 001215 311 001225 313 001227 314 001231 315 001233 318 001234 319 001236 321 001267 323 001337 325 001343 326 001403 329 001406 331 001422 332 001467 335 001470 366 001476 402 001506 375 001511 376 001512 377 001514 379 001516 380 001536 382 001540 383 001560 387 001562 389 001612 393 001614 395 001634 397 001646 398 001650 399 001655 400 001656 402 001660 403 001720 405 001721 407 001734 408 002001 411 002002 448 002003 450 002016 451 002020 452 002021 453 002023 454 002025 455 002027 457 002031 458 002033 460 002036 462 002040 463 002043 464 002044 465 002045 466 002046 467 002074 468 002105 469 002122 472 002123 519 002125 520 002127 522 002131 524 002163 525 002164 526 002166 527 002171 529 002173 533 002225 534 002236 535 002253 537 002303 538 002305 539 002310 541 002344 542 002345 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved