COMPILATION LISTING OF SEGMENT kermit_receive_ Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 03/01/89 1434.1 mst Wed 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 11 /****^ HISTORY COMMENTS: 12* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 13* install(88-07-05,MR12.2-1054): 14* Fix kermit 15, 16, 17, and 18. 15* 2) change(89-01-02,Huen), approve(89-01-02,MCR8036), audit(89-01-25,Lee), 16* install(89-03-01,MR12.3-1020): 17* Fix kermit bug: PC_File_Transfer 24 - kermit is being changed to correctly 18* handle links to multisegment files. 19* END HISTORY COMMENTS */ 20 21 22 kermit_receive_: 23 proc; 24 25 /**********************************************************************/ 26 /* */ 27 /*n kermit_receive_ */ 28 /* */ 29 /*d This routine is responsible for receiving files from a */ 30 /*d remote kermit. */ 31 /* */ 32 /*l Written: 84-11-01 by Maureen Mallmes */ 33 /*l Modified: 85-01-23 by Maureen Mallmes */ 34 /*l modified the routine, find_file, to get */ 35 /*l a proper suffixed name when given an */ 36 /*l absolute path. */ 37 /*l Modified: 87-06-19 by Don Kozlowski - Move CR and NL */ 38 /*l constant definitions to include file. */ 39 /*l (kermit 15) */ 40 /*l Modified: 87-07-22 by Don Kozlowski - Support msf file */ 41 /*l and be more strict with lost packets */ 42 /*l (kermit 17) */ 43 /* */ 44 /**********************************************************************/ 45 46 /* Not an entry */ 47 return; 48 49 50 51 /* parameters */ 52 53 dcl ec fixed bin (35); 54 dcl file_sw bit (1); 55 dcl files_received fixed bin; 56 dcl first_filename char (*); 57 dcl infop ptr; 58 dcl initial_seq_n fixed bin; 59 dcl initial_state fixed bin; 60 61 /* automatic */ 62 63 dcl abnormal_termination bit (1); 64 dcl abort_sent bit (1); 65 dcl discard_sw bit (1); 66 dcl fw_sw bit (1); 67 dcl ktip ptr; 68 dcl 01 path aligned, 69 02 dir_name char (168) unal, 70 02 entry_name char (32) unal; 71 dcl receive_file_modes (3) fixed bin (8) unal; 72 dcl receive_file_select (3) fixed bin; 73 dcl state fixed bin; 74 75 /* based */ 76 77 dcl 01 kermit_stats aligned like kermit_stats_info; 78 dcl 01 kti like kermit_transfer_info; 79 80 /* labels */ 81 82 dcl receive_state (0:5) label init (Rec_Init, Rec_File, Rec_Data, Rec_File_Abort, Rec_Abort, Rec_Complete); 83 84 /* constants */ 85 86 dcl Discard char (1) internal static options (constant) init ("D"); 87 dcl False bit (1) internal static options (constant) init ("0"b); 88 dcl Max_packet_size fixed bin (21) internal static options (constant) init (94); 89 dcl Max_remote_packet_size fixed bin (21) internal static options (constant) init (10000); 90 91 dcl Mod_64 fixed bin internal static options (constant) init (64); 92 dcl True bit (1) internal static options (constant) init ("1"b); 93 dcl Whoami char (7) internal static options (constant) init ("receive"); 94 dcl Yes char (1) internal static options (constant) init ("Y"); 95 96 /* builtin */ 97 98 dcl (addr, byte, char, index, length, ltrim, min, mod, rtrim, substr, null) builtin; 99 100 /* conditions */ 101 102 dcl (cleanup, record_quota_overflow) condition; 103 104 /* external */ 105 106 dcl error_table_$rqover fixed bin (35) ext static; 107 dcl kermit_et_$fatal_error fixed bin (35) ext static; 108 dcl kermit_et_$no_file_abort fixed bin (35) ext static; 109 dcl kermit_et_$no_initialization fixed bin (35) ext static; 110 dcl kermit_et_$no_rename fixed bin (35) ext static; 111 dcl kermit_et_$remote_file_abort fixed bin (35) ext static; 112 dcl kermit_et_$too_many_retries fixed bin (35) ext static; 113 114 /* procedures */ 115 116 dcl clock_ entry () returns (fixed bin (71)); 117 dcl delete_$path entry (char (*), char (*), bit (6), char (*), fixed bin (35)); 118 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 119 dcl hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), fixed bin (35)); 120 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 121 dcl iox_$close entry (ptr, fixed bin (35)); 122 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 123 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 124 dcl iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); 125 dcl pathname_ entry (char (*), char (*)) returns (char (168)); 126 dcl suffixed_name_$make entry (char (*), char (*), char (32), fixed bin (35)); 127 dcl terminate_file_ entry (ptr, fixed bin (24), bit (*), fixed bin (35)); 128 dcl unique_chars_ entry (bit (*)) returns (char (15)); 129 130 131 /* include files */ 1 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 1 2* 1 3* Values for the "access mode" argument so often used in hardcore 1 4* James R. Davis 26 Jan 81 MCR 4844 1 5* Added constants for SM access 4/28/82 Jay Pattin 1 6* Added text strings 03/19/85 Chris Jones 1 7**/ 1 8 1 9 1 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 1 11 dcl ( 1 12 N_ACCESS init ("000"b), 1 13 R_ACCESS init ("100"b), 1 14 E_ACCESS init ("010"b), 1 15 W_ACCESS init ("001"b), 1 16 RE_ACCESS init ("110"b), 1 17 REW_ACCESS init ("111"b), 1 18 RW_ACCESS init ("101"b), 1 19 S_ACCESS init ("100"b), 1 20 M_ACCESS init ("010"b), 1 21 A_ACCESS init ("001"b), 1 22 SA_ACCESS init ("101"b), 1 23 SM_ACCESS init ("110"b), 1 24 SMA_ACCESS init ("111"b) 1 25 ) bit (3) internal static options (constant); 1 26 1 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 1 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 1 29 1 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 1 31 static options (constant); 1 32 1 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 1 34 static options (constant); 1 35 1 36 dcl ( 1 37 N_ACCESS_BIN init (00000b), 1 38 R_ACCESS_BIN init (01000b), 1 39 E_ACCESS_BIN init (00100b), 1 40 W_ACCESS_BIN init (00010b), 1 41 RW_ACCESS_BIN init (01010b), 1 42 RE_ACCESS_BIN init (01100b), 1 43 REW_ACCESS_BIN init (01110b), 1 44 S_ACCESS_BIN init (01000b), 1 45 M_ACCESS_BIN init (00010b), 1 46 A_ACCESS_BIN init (00001b), 1 47 SA_ACCESS_BIN init (01001b), 1 48 SM_ACCESS_BIN init (01010b), 1 49 SMA_ACCESS_BIN init (01011b) 1 50 ) fixed bin (5) internal static options (constant); 1 51 1 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 132 133 2 1 /* START OF: kermit_dcls.incl.pl1 * * * * * */ 2 2 2 3 /********************************************************************/ 2 4 /* */ 2 5 /*n kermit_dcls */ 2 6 /* */ 2 7 /*d This include file contains the declarations of the external */ 2 8 /*d kermit entrypoints that are called by other modules within */ 2 9 /*d kermit as well as an explanation of the parameters. */ 2 10 /* */ 2 11 /*l Written: 84-10-11 by Dean Elhard */ 2 12 /* */ 2 13 /********************************************************************/ 2 14 2 15 dcl kermit_comm_mgr_$flush_input 2 16 entry 2 17 (ptr, /* kermit info ptr */ 2 18 fixed bin(35)); /* error code */ 2 19 2 20 dcl kermit_comm_mgr_$reset_line_modes 2 21 entry 2 22 (ptr, /* kermit info ptr */ 2 23 fixed bin(35)); /* error code */ 2 24 2 25 dcl kermit_comm_mgr_$set_line_modes 2 26 entry 2 27 (ptr, /* kermit info ptr */ 2 28 fixed bin(35)); /* error code */ 2 29 2 30 dcl kermit_get_filenames_ entry 2 31 (ptr, /* kermit info ptr */ 2 32 char(*), /* argument */ 2 33 ptr, /* filename ptr */ 2 34 char(*), /* reason */ 2 35 fixed bin(35)); /* error code */ 2 36 2 37 dcl kermit_log_mgr_$close_log 2 38 entry 2 39 (ptr, /* kermit info ptr */ 2 40 fixed bin (35)); /* error code */ 2 41 2 42 dcl kermit_log_mgr_$disable entry 2 43 (ptr, /* kermit info ptr */ 2 44 fixed bin (35)); /* error code */ 2 45 2 46 dcl kermit_log_mgr_$display_stats 2 47 entry /* statistics command */ 2 48 (ptr, /* sci ptr */ 2 49 ptr); /* kermit info ptr */ 2 50 2 51 dcl kermit_log_mgr_$enable entry 2 52 (ptr, /* kermit info ptr */ 2 53 fixed bin (35)); /* error code */ 2 54 2 55 dcl kermit_log_mgr_$log_message 2 56 entry 2 57 (ptr, /* kermit info ptr */ 2 58 ptr); /* log info ptr */ 2 59 2 60 dcl kermit_log_mgr_$open_log 2 61 entry 2 62 (ptr, /* kermit info ptr */ 2 63 char (*) varying, /* log file name */ 2 64 fixed bin (35)); /* error code */ 2 65 2 66 dcl kermit_log_mgr_$start entry /* start log command */ 2 67 (ptr, /* sci ptr */ 2 68 ptr); /* kermit info ptr */ 2 69 2 70 dcl kermit_log_mgr_$stop entry /* stop log command */ 2 71 (ptr, /* sci ptr */ 2 72 ptr); /* kermit info ptr */ 2 73 2 74 dcl kermit_mode_mgr_$get entry /* get modes command */ 2 75 (ptr, /* sci ptr */ 2 76 ptr); /* kermit info ptr */ 2 77 2 78 dcl kermit_mode_mgr_$retrieve 2 79 entry 2 80 (ptr, /* kermit info ptr */ 2 81 fixed bin, /* permanent/temporary select */ 2 82 (*) fixed bin, /* mode selector array */ 2 83 ptr, /* mode value ptr */ 2 84 fixed bin (35)); /* error code */ 2 85 2 86 dcl kermit_mode_mgr_$set entry /* set modes command */ 2 87 (ptr, /* sci ptr */ 2 88 ptr); /* kermit info ptr */ 2 89 2 90 dcl kermit_mode_mgr_$store entry 2 91 (ptr, /* kermit info ptr */ 2 92 fixed bin, /* permanent/temporary select */ 2 93 (*) fixed bin, /* mode selector array */ 2 94 ptr, /* mode value ptr */ 2 95 fixed bin (35)); /* error code */ 2 96 2 97 dcl kermit_pad_$receive entry 2 98 (ptr, /* kermit info ptr */ 2 99 char (1), /* packet type */ 2 100 ptr, /* buffer pointer */ 2 101 fixed bin (21), /* buffer length */ 2 102 fixed bin, /* sequence number */ 2 103 fixed bin (21), /* chars received */ 2 104 fixed bin (21), /* packet size */ 2 105 bit (1), /* CR/NL split flag */ 2 106 fixed bin (35)); /* error code */ 2 107 2 108 dcl kermit_pad_$send entry 2 109 (ptr, /* kermit info ptr */ 2 110 char (1), /* packet type */ 2 111 ptr, /* data ptr */ 2 112 fixed bin (21), /* data length */ 2 113 fixed bin, /* sequence number */ 2 114 fixed bin (21), /* chars transmitted */ 2 115 fixed bin (21), /* packet length */ 2 116 fixed bin (35)); /* error code */ 2 117 2 118 dcl kermit_receive_$receive_from_remote 2 119 entry 2 120 (ptr, /* kermit info ptr */ 2 121 fixed bin, /* initial state */ 2 122 fixed bin, /* initial sequence number */ 2 123 char (*), /* user filename (first file) */ 2 124 bit (1), /* =1 if user gave filename */ 2 125 fixed bin, /* number of files received */ 2 126 fixed bin (35)); /* error code */ 2 127 2 128 dcl kermit_send_$send_to_remote 2 129 entry 2 130 (ptr, /* kermit info ptr */ 2 131 ptr, /* filenames area ptr */ 2 132 char (*), /* user filename (first file) */ 2 133 bit (1), /* =1 if user gave filename */ 2 134 fixed bin, /* number of files sent */ 2 135 fixed bin (35)); /* error code */ 2 136 2 137 2 138 dcl kermit_server_ 2 139 entry 2 140 (ptr, /* kermit info ptr */ 2 141 ptr); /* filenames area ptr */ 2 142 2 143 2 144 dcl kermit_xfer_modes_$check_params 2 145 entry 2 146 (ptr, /* kermit info ptr */ 2 147 ptr, /* remote parameters */ 2 148 fixed bin (21), /* remote parameters length */ 2 149 ptr, /* local parameters */ 2 150 fixed bin (35)); /* error code */ 2 151 2 152 dcl kermit_xfer_modes_$init 2 153 entry 2 154 (ptr, /* ptr to kermit info */ 2 155 fixed bin (35)); /* error code */ 2 156 2 157 dcl kermit_xfer_modes_$get_local_params 2 158 entry 2 159 (ptr, /* kermit info ptr */ 2 160 ptr, /* local parameters */ 2 161 fixed bin (21), /* local parameters length */ 2 162 ptr, /* encoded parameters */ 2 163 fixed bin (21), /* encoded parameters length */ 2 164 fixed bin (35)); /* error code */ 2 165 2 166 dcl kermit_xfer_modes_$process_params 2 167 entry 2 168 (ptr, /* kermit info ptr */ 2 169 ptr, /* remote parameters */ 2 170 fixed bin (21), /* remote parameters length */ 2 171 ptr, /* local parameters */ 2 172 fixed bin (35)); /* error code */ 2 173 2 174 /* END OF: kermit_dcls.incl.pl1 * * * * * */ 134 135 3 1 /* START OF: kermit_info.incl.pl1 * * * * * */ 3 2 3 3 3 4 3 5 3 6 /****^ HISTORY COMMENTS: 3 7* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 3 8* install(88-07-05,MR12.2-1054): 3 9* Fix kermit 15, 16, 17, and 18. 3 10* END HISTORY COMMENTS */ 3 11 3 12 3 13 /********************************************************************/ 3 14 /* */ 3 15 /*n kermit_constants */ 3 16 /* */ 3 17 /*d This structure contains the constant definitions of CR, */ 3 18 /*d and NL characters which are coded as bit strings with */ 3 19 /*d overlays. */ 3 20 /* */ 3 21 /*l Written: 87-06-19 by Don Kozlowski */ 3 22 /*l Modified: 87-06-19 by Don Kozlowski - CR and NL are coded */ 3 23 /*l as bit strings with overlays (kermit 15)*/ 3 24 /* */ 3 25 /********************************************************************/ 3 26 3 27 dcl 01 kermit_bit_constants internal static options (constant), 3 28 02 CR_bit bit (9) unaligned init ("015"b3), 3 29 02 NL_bit bit (9) unaligned init ("012"b3); 3 30 3 31 dcl 01 kermit_char_constants based (addr (kermit_bit_constants)), 3 32 02 CR char (1) unaligned, 3 33 02 NL char (1) unaligned; 3 34 3 35 dcl 01 kermit_fixed_constants based (addr (kermit_bit_constants)), 3 36 02 CR_fixed fixed bin (9) unsigned unaligned, 3 37 02 NL_fixed fixed bin (9) unsigned unaligned; 3 38 3 39 3 40 /********************************************************************/ 3 41 /* */ 3 42 /*n kermit_info */ 3 43 /* */ 3 44 /*d This data structure is the subsystem info structure used */ 3 45 /*d when creating a kermit invocation. It is used to find the */ 3 46 /*d three kermit databases. */ 3 47 /* */ 3 48 /*l Written: 84-10-11 by Dean Elhard */ 3 49 /* */ 3 50 /********************************************************************/ 3 51 3 52 dcl 01 kermit_info aligned based (kermit_infop), 3 53 02 version char (8), 3 54 02 sci_ptr ptr, /* ssu_ sci_ptr */ 3 55 02 perm_modesp ptr, /* ptr to permanent modes db */ 3 56 02 temp_modesp ptr, /* ptr to temporary modes db */ 3 57 02 log_infop ptr, /* ptr to log info db */ 3 58 02 comm_infop ptr; /* ptr to comm info db */ 3 59 3 60 dcl kermit_infop ptr; 3 61 dcl kermit_info_version char (8) static options (constant) 3 62 init ("ki 1.0"); 3 63 3 64 /********************************************************************/ 3 65 /* */ 3 66 /*n kermit_perm_modes */ 3 67 /* */ 3 68 /*d This data structure contains the array of 9-bit values that */ 3 69 /*d represent the permanent kermit modes. */ 3 70 /* */ 3 71 /*l Written: 84-10-11 by Dean Elhard */ 3 72 /*l Modified: 87-06-12 by Don Kozlowski - Increase mode_counts */ 3 73 /*l (kermit 16) */ 3 74 /* */ 3 75 /********************************************************************/ 3 76 3 77 dcl 01 kermit_perm_modes aligned based (kermit_perm_modesp), 3 78 02 version char (8), 3 79 02 mode (1:kermit_perm_mode_count) 3 80 bit (9) unaligned; 3 81 3 82 dcl kermit_perm_modesp ptr; 3 83 dcl kermit_perm_mode_count fixed bin static options (constant) init (20); 3 84 dcl kermit_perm_modes_version 3 85 char (8) static options (constant) 3 86 init ("kpm 1.1"); 3 87 3 88 /********************************************************************/ 3 89 /* */ 3 90 /*n kermit_temp_modes */ 3 91 /* */ 3 92 /*d This data structure contains the array of 9-bit values that */ 3 93 /*d represent the temporary kermit modes. */ 3 94 /* */ 3 95 /*l Written: 84-10-11 by Dean Elhard */ 3 96 /* */ 3 97 /********************************************************************/ 3 98 3 99 dcl 01 kermit_temp_modes aligned based (kermit_temp_modesp), 3 100 02 version char (8), 3 101 02 mode (1:kermit_temp_mode_count) 3 102 bit (9) unaligned; 3 103 3 104 dcl kermit_temp_modesp ptr; 3 105 dcl kermit_temp_mode_count fixed bin static options (constant) init (23); 3 106 dcl kermit_temp_modes_version 3 107 char (8) static options (constant) 3 108 init ("ktm 1.1"); 3 109 3 110 /********************************************************************/ 3 111 /* */ 3 112 /*n kermit_log_info */ 3 113 /* */ 3 114 /*d This data structure contains 2 types of logging info: */ 3 115 /*d - data concerning the logging state and log_file */ 3 116 /*d - statistics on the last completed file-transfer */ 3 117 /* */ 3 118 /*l Written: 84-10-11 by Dean Elhard */ 3 119 /* */ 3 120 /********************************************************************/ 3 121 3 122 dcl 01 kermit_log_info aligned based (kermit_log_infop), 3 123 02 version char (8), 3 124 02 log_file aligned, /* log_file info */ 3 125 03 iocbp ptr, /* iocb ptr */ 3 126 03 flags aligned, 3 127 04 enabled bit (1) unaligned, /* enabled flag */ 3 128 04 stats_valid bit (1) unaligned, /* stats are set */ 3 129 04 mbz bit (34) unaligned, 3 130 02 statistics aligned like kermit_stats_info; 3 131 3 132 dcl kermit_log_infop ptr; 3 133 dcl kermit_log_info_version char (8) static options (constant) 3 134 init ("kli 1.0"); 3 135 3 136 /********************************************************************/ 3 137 /* */ 3 138 /*n kermit_stats_info */ 3 139 /* */ 3 140 /*d This structure is the statistics information passed to the */ 3 141 /*d log manager and stored as the statistics. */ 3 142 /* */ 3 143 /*l Written: 84-10-25 by Dean Elhard */ 3 144 /* */ 3 145 /********************************************************************/ 3 146 3 147 dcl 01 kermit_stats_info aligned based (kermit_stats_infop), 3 148 02 caller char (32), /* send or receive */ 3 149 02 status fixed bin (35), /* status of F-T */ 3 150 02 filename char (194) unal, /* name of file */ 3 151 02 file_len fixed bin (21), /* len in chars */ 3 152 02 char_count fixed bin (21), /* number sent */ 3 153 02 packet_chars fixed bin (21), /* after encoding */ 3 154 02 packet_count fixed bin (21), /* num of packets */ 3 155 02 packet_retries fixed bin (21), /* retries done */ 3 156 02 start_time fixed bin (71), /* time F-T started */ 3 157 02 end_time fixed bin (71), /* time F-T done */ 3 158 02 error_message char (94); /* rcvd error msg */ 3 159 3 160 dcl kermit_stats_infop ptr; 3 161 3 162 /********************************************************************/ 3 163 /* */ 3 164 /*n kermit_comm_info */ 3 165 /* */ 3 166 /*d This data structure contains information regarding the */ 3 167 /*d communications channel over which the file transfer takes */ 3 168 /*d place. */ 3 169 /* */ 3 170 /*l Written: 84-10-12 by Dean Elhard */ 3 171 /*l Modified: 86-10-09 by Don Kozlowski Add transfer_modes_set */ 3 172 /*l and server indicators. (kermit 13) */ 3 173 /* */ 3 174 /********************************************************************/ 3 175 3 176 dcl 01 kermit_comm_info aligned based (kermit_comm_infop), 3 177 02 version char (8), 3 178 02 ft_iocbp ptr, /* transfer iocbp */ 3 179 02 debug_segp ptr, /* debug segment */ 3 180 02 debug_segl fixed bin (21), 3 181 02 input_buffer aligned, /* input buffer */ 3 182 03 bufferp ptr, 3 183 03 bufferl fixed bin (21), 3 184 02 old_modes char (512) unal, /* ft switch modes */ 3 185 02 old_framing_chars aligned, /* saved frm chars */ 3 186 03 start_char char (1) unaligned, 3 187 03 end_char char (1) unaligned, 3 188 03 server bit (1) unaligned, /* In server mode */ 3 189 03 transfer_modes_set bit (1) unaligned, 3 190 03 pad bit (16) unaligned, 3 191 02 old_wake_table aligned, /* saved wake table */ 3 192 03 breaks (0:127) bit (1) unaligned, 3 193 03 mbz bit (16) unaligned, 3 194 02 old_delays aligned, /* saved delay info */ 3 195 03 version fixed bin, 3 196 03 default fixed bin, 3 197 03 delay, 3 198 04 vert_nl fixed bin, 3 199 04 horz_nl fixed bin, 3 200 04 const_tab float bin, 3 201 04 var_tab fixed bin, 3 202 04 backspace fixed bin, 3 203 04 vt_ff fixed bin; 3 204 3 205 dcl kermit_comm_infop ptr; 3 206 dcl kermit_comm_info_version 3 207 char (8) static options (constant) 3 208 init ("kci 1.0"); 3 209 3 210 /* END OF: kermit_info.incl.pl1 * * * * * */ 136 137 4 1 /* START OF: kermit_mode_info.incl.pl1 * * * * * */ 4 2 4 3 4 4 4 5 4 6 /****^ HISTORY COMMENTS: 4 7* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 4 8* install(88-07-05,MR12.2-1054): 4 9* Fix kermit 15, 16, 17, and 18. 4 10* END HISTORY COMMENTS */ 4 11 4 12 4 13 /************************************************************************/ 4 14 /* */ 4 15 /*l Modified: 87-06-19 by S. Huen - Add fields for capabilities, */ 4 16 /*l window_size, max_len_ext_1 and max_len_ext_2 based */ 4 17 /*l on D. Kozlowski's version. (kermit 16) */ 4 18 /* */ 4 19 /************************************************************************/ 4 20 4 21 dcl Permanent fixed bin static options (constant) init (1); 4 22 dcl Temporary fixed bin static options (constant) init (2); 4 23 4 24 dcl Store_all (1:1) fixed bin static options (constant) init (0); 4 25 dcl Retrieve_all (1:1) fixed bin static options (constant) init (0); 4 26 4 27 dcl Maxl fixed bin static options (constant) init (1); 4 28 dcl Timeout fixed bin static options (constant) init (2); 4 29 dcl N_pads fixed bin static options (constant) init (3); 4 30 dcl Pad_char fixed bin static options (constant) init (4); 4 31 dcl Eol_char fixed bin static options (constant) init (5); 4 32 dcl Quote_char fixed bin static options (constant) init (6); 4 33 dcl Eight_bit_char fixed bin static options (constant) init (7); 4 34 dcl Repeat_char fixed bin static options (constant) init (8); 4 35 dcl Start_char fixed bin static options (constant) init (9); 4 36 dcl Check_type fixed bin static options (constant) init (10); 4 37 dcl Parity fixed bin static options (constant) init (11); 4 38 dcl Incomplete fixed bin static options (constant) init (12); 4 39 dcl File_warning fixed bin static options (constant) init (13); 4 40 dcl File_type fixed bin static options (constant) init (14); 4 41 dcl Retry_threshold fixed bin static options (constant) init (15); 4 42 dcl Line_byte_size fixed bin static options (constant) init (16); 4 43 dcl Window_size fixed bin static options (constant) init (17); 4 44 dcl Max_len_ext_1 fixed bin static options (constant) init (18); 4 45 dcl Max_len_ext_2 fixed bin static options (constant) init (19); 4 46 dcl Capabilities fixed bin static options (constant) init (20); 4 47 4 48 dcl 01 Perm_defaults aligned static options (constant), 4 49 02 maxl fixed bin (8) unal init (80), 4 50 02 time fixed bin (8) unal init (15), 4 51 02 npad fixed bin (8) unal init (0), 4 52 02 padc char (1) unal init (""), 4 53 02 eol char (1) unal init (" "), 4 54 02 qctl char (1) unal init ("#"), 4 55 02 qbin char (1) unal init ("&"), 4 56 02 rept char (1) unal init ("~"), 4 57 02 start char (1) unal init (""), 4 58 02 chkt fixed bin (8) unal init (1), 4 59 02 parity char (1) unal init ("N"), 4 60 02 incomplete char (1) unal init ("K"), 4 61 02 file_warning char (1) unal init ("Y"), 4 62 02 file_type char (1) unal init ("A"), 4 63 02 retry_threshold fixed bin (8) unal init (5), 4 64 02 line_type fixed bin (8) unal init (7), 4 65 02 window_size fixed bin (8) unal init (0), 4 66 02 max_len_ext_1 fixed bin (8) unal init (5), 4 67 02 max_len_ext_2 fixed bin (8) unal init (25), 4 68 02 capabilities fixed bin (8) unal init (2); 4 69 4 70 4 71 dcl I_maxl fixed bin static options (constant) init (1); 4 72 dcl I_timeout fixed bin static options (constant) init (2); 4 73 dcl I_n_pads fixed bin static options (constant) init (3); 4 74 dcl I_pad_char fixed bin static options (constant) init (4); 4 75 dcl I_eol_char fixed bin static options (constant) init (5); 4 76 dcl I_quote_char fixed bin static options (constant) init (6); 4 77 dcl O_maxl fixed bin static options (constant) init (7); 4 78 dcl O_timeout fixed bin static options (constant) init (8); 4 79 dcl O_n_pads fixed bin static options (constant) init (9); 4 80 dcl O_pad_char fixed bin static options (constant) init (10); 4 81 dcl O_eol_char fixed bin static options (constant) init (11); 4 82 dcl O_quote_char fixed bin static options (constant) init (12); 4 83 dcl G_eight_bit_char fixed bin static options (constant) init (13); 4 84 dcl G_repeat_char fixed bin static options (constant) init (14); 4 85 dcl G_start_char fixed bin static options (constant) init (15); 4 86 dcl G_check_type fixed bin static options (constant) init (16); 4 87 dcl G_parity fixed bin static options (constant) init (17); 4 88 dcl G_window fixed bin static options (constant) init (18); 4 89 dcl I_max_lenx1 fixed bin static options (constant) init (19); 4 90 dcl I_max_lenx2 fixed bin static options (constant) init (20); 4 91 dcl O_max_lenx1 fixed bin static options (constant) init (21); 4 92 dcl O_max_lenx2 fixed bin static options (constant) init (22); 4 93 dcl G_capabilities fixed bin static options (constant) init (23); 4 94 4 95 dcl 01 Temp_defaults aligned static options (constant), 4 96 02 i_maxl fixed bin (8) unal init (80), 4 97 02 i_time fixed bin (8) unal init (15), 4 98 02 i_npad fixed bin (8) unal init (0), 4 99 02 i_padc char (1) unal init (""), 4 100 02 i_eol char (1) unal init (" "), 4 101 02 i_qctl char (1) unal init ("#"), 4 102 02 o_maxl fixed bin (8) unal init (80), 4 103 02 o_time fixed bin (8) unal init (15), 4 104 02 o_npad fixed bin (8) unal init (0), 4 105 02 o_padc char (1) unal init (""), 4 106 02 o_eol char (1) unal init (" "), 4 107 02 o_qctl char (1) unal init ("#"), 4 108 02 qbin char (1) unal init ("N"), 4 109 02 rept char (1) unal init (" "), 4 110 02 start char (1) unal init (""), 4 111 02 chkt fixed bin (8) unal init (1), 4 112 02 parity char (1) unal init ("N"), 4 113 02 window fixed bin (8) unal init (0), 4 114 02 i_maxlx1 fixed bin (8) unal init (5), 4 115 02 i_maxlx2 fixed bin (8) unal init (25), 4 116 02 o_maxlx1 fixed bin (8) unal init (5), 4 117 02 o_maxlx2 fixed bin (8) unal init (25), 4 118 02 capabilities fixed bin (8) unal init (2); 4 119 4 120 dcl Ext_Headers bit (9) static options (constant) init ("002"b3); 4 121 4 122 4 123 /* END OF: kermit_mode_info.incl.pl1 * * * * * */ 138 139 5 1 /* START OF: kermit_transfer_info.incl.pl1 * * * * * */ 5 2 5 3 5 4 5 5 /****^ HISTORY COMMENTS: 5 6* 1) change(88-05-16,Huen), approve(88-05-16,MCR7841), audit(88-05-25,RWaters), 5 7* install(88-07-05,MR12.2-1054): 5 8* Fix kermit 15, 16, 17, and 18. 5 9* END HISTORY COMMENTS */ 5 10 5 11 5 12 /********************************************************************/ 5 13 /* */ 5 14 /*n kermit_transfer_info */ 5 15 /* */ 5 16 /*d This data structure is the info structure used */ 5 17 /*d during file transfer. */ 5 18 /* */ 5 19 /*l Written: 84-10-11 by Maureen Mallmes */ 5 20 /*l Modified: 87-06-19 by Don Kozlowski - Add flags in kti */ 5 21 /*l structure. (kermit 15) */ 5 22 /*l Modified: 87-07-22 by Don Kozlowski - Add msf flag in */ 5 23 /*l kti structure. (kermit 17) */ 5 24 /* */ 5 25 /********************************************************************/ 5 26 5 27 dcl 01 kermit_transfer_info aligned based (transfer_infop), 5 28 02 retry_count fixed bin (21), /* for current packet */ 5 29 02 retry_threshold fixed bin (8) unal, /* maximum retries */ 5 30 02 sequence_n fixed bin, /* sequence number */ 5 31 02 filenamesp ptr, /* ptr to filenames */ 5 32 02 filenames_idx fixed bin, /* current filename */ 5 33 02 filep ptr, /* start of file ptr */ 5 34 02 buffp ptr, /* file data ptr */ 5 35 02 msf_count fixed bin (21), /* msf segments to send */ 5 36 02 msf_current fixed bin (21), /* current msf module */ 5 37 02 file_count fixed bin, /* per transaction */ 5 38 02 statisticsp ptr, /* statistics info ptr */ 5 39 02 flags, 5 40 03 msf bit (1), /* Is this an MSF */ 5 41 03 owe_a_cr bit (1), /* Holding back a CR */ 5 42 03 pad bit (34), 5 43 02 iocb_ptr ptr; /* for vfile_ */ 5 44 5 45 5 46 5 47 dcl transfer_infop ptr; 5 48 dcl kermit_transfer_info_version 5 49 char (9) static options (constant) 5 50 init ("kti 1.1"); 5 51 5 52 5 53 5 54 5 55 /********************************************************************/ 5 56 /* */ 5 57 /*n kermit_filenames */ 5 58 /* */ 5 59 /*d This data structure defines the overlay for the filenames. */ 5 60 /* */ 5 61 /*l Written: 84-10-11 by Maureen Mallmes */ 5 62 /*l Modified: 84-11-05 by Dean Elhard to add archive support */ 5 63 /* */ 5 64 /********************************************************************/ 5 65 5 66 dcl 01 kermit_filenames aligned based (kermit_transfer_info.filenamesp), 5 67 02 n_paths fixed bin, 5 68 02 pathname (0 refer (kermit_filenames.n_paths)) aligned, 5 69 03 directory char (168) unal, 5 70 03 entry_name char (32) unal, 5 71 03 component char (32) unal; 5 72 5 73 5 74 /********************************************************************/ 5 75 /* */ 5 76 /*n kermit_packets */ 5 77 /* */ 5 78 /*d This data defines the packet types. */ 5 79 /* */ 5 80 /*l Written: 84-10-11 by Maureen Mallmes */ 5 81 /* */ 5 82 /********************************************************************/ 5 83 5 84 5 85 dcl Data_packet char (1) internal static options (constant) init ("D"); 5 86 dcl Ack_packet char (1) internal static options (constant) init ("Y"); 5 87 dcl Nak_packet char (1) internal static options (constant) init ("N"); 5 88 dcl Send_init_packet char (1) internal static options (constant) init ("S"); 5 89 dcl Eot_packet char (1) internal static options (constant) init ("B"); 5 90 dcl File_header_packet char (1) internal static options (constant) init ("F"); 5 91 dcl Eof_packet char (1) internal static options (constant) init ("Z"); 5 92 dcl Error_packet char (1) internal static options (constant) init ("E"); 5 93 dcl Reserved_packet char (1) internal static options (constant) init ("T"); 5 94 5 95 5 96 /********************************************************************/ 5 97 /* */ 5 98 /*n kermit_states */ 5 99 /* */ 5 100 /*d This data defines the transfer states. */ 5 101 /* */ 5 102 /*l Written: 84-10-11 by Maureen Mallmes */ 5 103 /* */ 5 104 /********************************************************************/ 5 105 5 106 dcl Rec_init fixed bin internal static options (constant) init (0); 5 107 dcl Rec_file_header fixed bin internal static options (constant) init (1); 5 108 dcl Rec_data fixed bin internal static options (constant) init (2); 5 109 dcl Rec_file_abort fixed bin internal static options (constant) init (3); 5 110 dcl Rec_abort fixed bin internal static options (constant) init (4); 5 111 dcl Rec_complete fixed bin internal static options (constant) init (5); 5 112 5 113 dcl Send_init fixed bin internal static options (constant) init (0); 5 114 dcl Send_file_header fixed bin internal static options (constant) init (1); 5 115 dcl Send_data fixed bin internal static options (constant) init (2); 5 116 dcl Send_eof fixed bin internal static options (constant) init (3); 5 117 dcl Send_break fixed bin internal static options (constant) init (4); 5 118 dcl Send_abort fixed bin internal static options (constant) init (5); 5 119 dcl Send_complete fixed bin internal static options (constant) init (6); 5 120 5 121 5 122 /* END OF: kermit_transfer_info.incl.pl1 * * * * * */ 140 141 6 1 /* Begin include file ..... iox_modes.incl.pl1 */ 6 2 6 3 /* Written by C. D. Tavares, 03/17/75 */ 6 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 6 5 6 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 6 7 ("stream_input", "stream_output", "stream_input_output", 6 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 6 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 6 10 "direct_input", "direct_output", "direct_update"); 6 11 6 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 6 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 6 14 6 15 dcl (Stream_input initial (1), 6 16 Stream_output initial (2), 6 17 Stream_input_output initial (3), 6 18 Sequential_input initial (4), 6 19 Sequential_output initial (5), 6 20 Sequential_input_output initial (6), 6 21 Sequential_update initial (7), 6 22 Keyed_sequential_input initial (8), 6 23 Keyed_sequential_output initial (9), 6 24 Keyed_sequential_update initial (10), 6 25 Direct_input initial (11), 6 26 Direct_output initial (12), 6 27 Direct_update initial (13)) fixed bin int static options (constant); 6 28 6 29 /* End include file ..... iox_modes.incl.pl1 */ 142 143 144 145 receive_from_remote: 146 entry (infop, initial_state, initial_seq_n, first_filename, file_sw, files_received, ec); 147 148 /**********************************************************************/ 149 /* */ 150 /*n Name: kermit_receive_$receive_from_remote external */ 151 /*i Input: infop, initial_state, first_filename, */ 152 /*i file_sw */ 153 /*f Function: Receives a file or file group from the */ 154 /*f remote. Provides a state-switching mechanism */ 155 /*f and data interface via calls to receive_init */ 156 /*f receive_filename, receive_data, abort_receive */ 157 /*f and complete. Updates the log */ 158 /*o Output: files_received, ec */ 159 /* */ 160 /**********************************************************************/ 161 162 163 /* initialize file transfer data */ 164 165 ktip = addr (kti); 166 kti.statisticsp = addr (kermit_stats); 167 168 /* In case we can't get past the Send-Init */ 169 path.dir_name = " "; 170 if file_sw then 171 path.entry_name = first_filename; 172 else path.entry_name = "????"; 173 174 kti.filenamesp = addr (path); 175 kti.retry_count = 0; 176 kti.sequence_n = initial_seq_n; 177 kti.filenames_idx = 0; 178 kti.filep = null (); 179 kti.buffp = null (); 180 kti.iocb_ptr = null (); 181 kti.msf = False; 182 kti.file_count = 0; 183 kti.statisticsp = addr (kermit_stats); 184 185 kermit_stats.caller = Whoami; 186 call init_file_stats (ktip); 187 188 receive_file_select (1) = Retry_threshold; 189 receive_file_select (2) = File_warning; 190 receive_file_select (3) = Incomplete; 191 192 call kermit_mode_mgr_$retrieve (infop, Permanent, receive_file_select, addr (receive_file_modes), ec); 193 194 kti.retry_threshold = receive_file_modes (1); 195 fw_sw = (byte (receive_file_modes (2)) = Yes); 196 discard_sw = (byte (receive_file_modes (3)) = Discard); 197 198 199 200 /* Handlers */ 201 on cleanup begin; 202 abnormal_termination = True; 203 call terminate_file (ktip, discard_sw, abnormal_termination); 204 end; 205 206 on record_quota_overflow 207 begin; 208 abnormal_termination = True; 209 call terminate_file (ktip, discard_sw, abnormal_termination); 210 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 211 ec = error_table_$rqover; 212 goto Rec_Complete; 213 end; 214 215 abort_sent = False; 216 files_received = 0; 217 state = initial_state; 218 219 /* State switcher */ 220 221 do while ("1"b); 222 223 goto receive_state (state); 224 225 Rec_Init: 226 call receive_init (infop, ktip, state); 227 goto exit_state; 228 229 Rec_File: 230 call receive_filename (infop, ktip, first_filename, file_sw, fw_sw, state); 231 goto exit_state; 232 Rec_Data: 233 call receive_data (infop, ktip, discard_sw, abort_sent, state); 234 goto exit_state; 235 236 Rec_File_Abort: 237 call receive_file_abort (infop, ktip, discard_sw, abort_sent, state); 238 goto exit_state; 239 240 Rec_Abort: /* Are we here because we couldn't abort a single file? */ 241 if abort_sent then 242 ec = kermit_et_$no_file_abort; /* yes */ 243 else ec = kermit_stats.status; /* no */ 244 call update_log (infop, ktip, discard_sw); 245 246 Rec_Complete: 247 files_received = kti.file_count; 248 return; 249 250 exit_state: 251 end; 252 253 return; 254 255 256 257 receive_data: 258 proc (infop, ktip, discard_sw, abort_sent, state); 259 260 261 /**********************************************************************/ 262 /* */ 263 /*n Name: kermit_receive_$receive_data internal */ 264 /*i Input: infop, ktip, discard_sw */ 265 /*f Function: Waits for File-Data Packet. */ 266 /*f If data cannot be stored (segment too big), then */ 267 /*f an attempt is made to abort the receipt of the */ 268 /*f single file by placing an "X" in the data portion */ 269 /*f of the Ack packet. */ 270 /*o Output: state, abort_sent */ 271 /* */ 272 /**********************************************************************/ 273 274 /* parameters */ 275 276 dcl abort_sent bit (1); 277 dcl discard_sw bit (1); 278 dcl infop ptr; 279 dcl ktip ptr; 280 dcl state fixed bin; 281 282 /* automatic */ 283 284 dcl abort_char char (1); 285 dcl abort_char_lth fixed bin (21); 286 dcl chars_received fixed bin (21); 287 dcl chars_sent fixed bin (21); 288 dcl ec fixed bin (35); 289 dcl eol_split bit (1); 290 dcl idx fixed bin; 291 dcl packet_n fixed bin; 292 dcl packet_size fixed bin (21); 293 dcl packet_type char (1); 294 dcl r_packet_size fixed bin (21); 295 dcl remote_data char (Max_remote_packet_size); 296 dcl remote_datap ptr; 297 298 299 /* based */ 300 301 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 302 dcl 01 kti like kermit_transfer_info based (ktip); 303 304 /* labels */ 305 306 dcl packet (0:4) label init (Other, File_header, Data, Eof, Error); 307 308 /* constants */ 309 dcl False bit (1) internal static options (constant) init ("0"b); 310 dcl True bit (1) internal static options (constant) init ("1"b); 311 dcl Discard_char char (1) internal static options (constant) init ("X"); 312 dcl Packet_string char (4) internal static options (constant) init ("FDZE"); 313 dcl Remote_discard char (1) internal static options (constant) init ("D"); 314 315 316 ec = 0; 317 abort_sent = False; 318 abort_char_lth = 0; 319 remote_datap = addr (remote_data); 320 kti.retry_count = kti.retry_count + 1; 321 322 /* Should we give up?? */ 323 if kti.retry_count > kti.retry_threshold then do; 324 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 325 kermit_stats.status = kermit_et_$too_many_retries; 326 state = Rec_abort; 327 return; 328 end; 329 330 /* Get a packet */ 331 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 332 r_packet_size, eol_split, ec); 333 334 if ec ^= 0 then goto Retry_packet; 335 336 /* Respond to remote packet */ 337 idx = index (Packet_string, packet_type); 338 goto packet (idx); 339 340 341 Data: /* Received remote DATA packet */ 342 if kti.sequence_n ^= packet_n then do; /* Remote lost a previous ack? */ 343 call check_lost_packet (infop, ktip, packet_n); 344 return; 345 end; 346 347 if chars_received ^= 0 then call store_data (ktip, eol_split, remote_data, chars_received, r_packet_size, ec); 348 if ec ^= 0 then do; /* Have to abort receipt of this file */ 349 kermit_stats.status = ec; 350 abort_char = Discard_char; 351 abort_char_lth = 1; 352 abort_sent = True; /* Record the attempted abort */ 353 end; 354 355 call kermit_pad_$send (infop, Ack_packet, addr (abort_char), abort_char_lth, kti.sequence_n, chars_sent, packet_size, ec); 356 357 kti.retry_count = 0; 358 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 359 if abort_sent then state = Rec_file_abort; 360 return; 361 362 363 364 File_header: /* Received FILE-HEADER packet */ 365 /* Remote may have lost our previous ACK */ 366 call check_lost_packet (infop, ktip, packet_n); 367 return; 368 369 370 371 Eof: /* Received EOF packet */ 372 if kti.sequence_n ^= packet_n then goto Retry_packet; 373 374 /* Otherwise, we have a valid eof packet. Check to see if the remote 375* wants to abort it or terminate it normally */ 376 if chars_received ^= 0 then do; 377 if substr (remote_data, 1, chars_received) = Remote_discard then 378 kermit_stats.status = kermit_et_$remote_file_abort; 379 end; 380 381 382 call kermit_pad_$send (infop, Ack_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 383 kermit_stats.end_time = clock_ (); 384 call update_log (infop, ktip, discard_sw); 385 kti.retry_count = 0; 386 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 387 state = Rec_file_header; 388 return; 389 390 391 392 Error: /* Received ERROR packet */ 393 kermit_stats.status = kermit_et_$fatal_error; 394 kermit_stats.error_message = substr (remote_data, 1, chars_received); 395 state = Rec_abort; 396 return; 397 398 Other: /* Received unexpected packet */ 399 Retry_packet: 400 call kermit_pad_$send (infop, Nak_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 401 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 402 return; 403 404 end receive_data; 405 406 receive_filename: 407 proc (infop, ktip, user_filename, user_file_sw, file_warning_sw, state); 408 409 410 /**********************************************************************/ 411 /* */ 412 /*n Name: kermit_receive_$receive_filename internal */ 413 /*i Input: infop, ktip, user_filename, user_file_sw */ 414 /*i file_warning_sw */ 415 /*f Function: Waits for File-Header Packet. */ 416 /*f If there is data in the data portion of the */ 417 /*f packet, i.e. remote has supplied a filename, an */ 418 /*f Ack packet is sent to the remote. */ 419 /*f Verification of the filename now occurs: */ 420 /*f If the data can be stored under the supplied */ 421 /*f filename, all is okay. If the data cannot be */ 422 /*f stored under the given filename, an attempt will */ 423 /*f later be made to abort receipt of the file, (next */ 424 /*f state = receive_file_abort). */ 425 /*o Output: state */ 426 /* */ 427 /**********************************************************************/ 428 429 /* parameters */ 430 431 dcl infop ptr; 432 dcl file_warning_sw bit (1); 433 dcl ktip ptr; 434 dcl state fixed bin; 435 dcl user_file_sw bit (1); 436 dcl user_filename char (*); 437 438 /* automatic */ 439 440 dcl ack_init_data char (Max_packet_size); 441 dcl ack_init_data_lth fixed bin (21); 442 dcl ack_init_datap ptr; 443 dcl ack_init_packet char (Max_packet_size); 444 dcl ack_init_packet_lth fixed bin (21); 445 dcl ack_init_packetp ptr; 446 dcl chars_received fixed bin (21); 447 dcl chars_sent fixed bin (21); 448 dcl ec fixed bin (35); 449 dcl eol_split bit (1); 450 dcl idx fixed bin; 451 dcl file_ptr ptr; 452 dcl packet_n fixed bin; 453 dcl packet_size fixed bin (21); 454 dcl packet_type char (1); 455 dcl rec_filename char (168); 456 dcl remote_data char (Max_remote_packet_size); 457 dcl remote_datap ptr; 458 dcl source_dir char (168); 459 dcl source_ename char (32); 460 461 462 /* based */ 463 464 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 465 dcl 01 kti like kermit_transfer_info based (ktip); 466 dcl 01 path aligned based (kti.filenamesp), 467 02 dir_name char (168) unal, 468 02 entry_name char (32) unal; 469 470 /* labels */ 471 472 dcl packet (0:5) label init (Other, File_header, Send_init, Eof, Break, Error); 473 474 /* constants */ 475 476 dcl False bit (1) internal static options (constant) init ("0"b); 477 dcl Packet_string char (5) internal static options (constant) init ("FSZBE"); 478 479 ec = 0; 480 remote_datap = addr (remote_data); 481 kti.retry_count = kti.retry_count + 1; 482 483 /* Should we give up?? */ 484 if kti.retry_count > kti.retry_threshold then do; 485 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 486 kermit_stats.status = kermit_et_$too_many_retries; 487 state = Rec_abort; 488 return; 489 end; 490 491 /* Get the remote's packet */ 492 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 493 packet_size, eol_split, ec); 494 495 if ec ^= 0 then goto Retry_packet; 496 497 /* Respond to the remote's packet */ 498 idx = index (Packet_string, packet_type); 499 goto packet (idx); 500 501 502 File_header: /* Received FILE-HEADER packet */ 503 if kti.sequence_n ^= packet_n then goto Retry_packet; 504 505 /* make sure there's something that can be used as a filename */ 506 if chars_received = 0 then goto Retry_packet; 507 508 /* Acknowledge receipt of filename */ 509 call kermit_pad_$send (infop, Ack_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 510 511 kti.retry_count = 0; 512 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 513 514 /* Have we already set up the file */ 515 if kti.iocb_ptr = null then do; /* no */ 516 kermit_stats.status = 0; /* Are we using the user-supplied filename? */ 517 if user_file_sw then do; 518 rec_filename = user_filename; 519 user_file_sw = False; 520 end; 521 522 else do; 523 rec_filename = substr (remote_data, 1, chars_received); 524 /* delete all trailing '.' on the remote-supplied filename */ 525 rec_filename = rtrim (rtrim (rec_filename), "."); 526 end; 527 528 call find_file (rec_filename, file_warning_sw, source_dir, source_ename, file_ptr, ec); 529 530 kti.iocb_ptr = file_ptr; 531 path.dir_name = source_dir; 532 path.entry_name = source_ename; 533 kermit_stats.start_time = clock_ (); 534 535 if ec ^= 0 then do; /* can't receive this file */ 536 kermit_stats.status = ec; 537 kermit_stats.end_time = kermit_stats.start_time; 538 state = Rec_file_abort; /* where we'll tell the remote we can't receive it */ 539 return; 540 end; 541 542 /* otherwise, we have sucessfully initiated the file for receiving */ 543 544 end; 545 546 state = Rec_data; 547 return; 548 549 550 Send_init: /* Receive SEND-INIT packet */ 551 /* The remote may have lost our ACK to his send_init so send the parameters 552* again. */ 553 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 554 if mod (packet_n + 1, 64) = kti.sequence_n then do; 555 ack_init_datap = addr (ack_init_data); 556 ack_init_packetp = addr (ack_init_packet); 557 call kermit_xfer_modes_$get_local_params (infop, ack_init_datap, ack_init_data_lth, ack_init_packetp, 558 ack_init_packet_lth, ec); 559 560 /* this should never happen */ 561 if ec ^= 0 then goto Retry_packet; 562 call kermit_pad_$send (infop, Ack_packet, ack_init_packetp, ack_init_packet_lth, packet_n, chars_sent, packet_size, ec); 563 end; 564 565 else goto Retry_packet; 566 return; 567 568 569 Eof: /* Received EOF packet */ 570 /* Remote may have lost our previous ACK */ 571 call check_lost_packet (infop, ktip, packet_n); 572 return; 573 574 Break: /* Received a BREAK packet */ 575 if kti.sequence_n ^= packet_n then goto Retry_packet; 576 577 call kermit_pad_$send (infop, Ack_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 578 579 call verify_receipt (infop, ktip); 580 state = Rec_complete; /* change state */ 581 return; 582 583 Error: /* Received ERROR packet */ 584 kermit_stats.status = kermit_et_$fatal_error; 585 kermit_stats.error_message = substr (remote_data, 1, chars_received); 586 state = Rec_abort; 587 return; 588 589 Other: /* Received unexpected packet */ 590 Retry_packet: 591 call kermit_pad_$send (infop, Nak_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 592 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 593 return; 594 end receive_filename; 595 596 597 receive_init: 598 proc (infop, ktip, state); 599 600 601 /**********************************************************************/ 602 /* */ 603 /*n Name: kermit_receive_$receive_init internal */ 604 /*i Input: infop, ktip */ 605 /*f Function: Performs the initialization of the required modes */ 606 /*f for communicating with the remote system. */ 607 /*f Waits for a Send-Initiate (S) packet specifying */ 608 /*f the remote's parameters. */ 609 /*f Responds with its own parameters via an ACK */ 610 /*f (Y) packet. The results of this negotiation are */ 611 /*f recorded in New-Modes. */ 612 /*o Output: state */ 613 /* */ 614 /**********************************************************************/ 615 616 /* parameters */ 617 618 dcl infop ptr; 619 dcl ktip ptr; 620 dcl state fixed bin; 621 622 /* automatic */ 623 624 dcl chars_received fixed bin (21); 625 dcl chars_sent fixed bin (21); 626 dcl ec fixed bin (35); 627 dcl eol_split bit (1); 628 dcl idx fixed bin; 629 dcl packet_n fixed bin; 630 dcl packet_size fixed bin (21); 631 dcl packet_type char (1); 632 dcl remote_data char (Max_remote_packet_size); 633 dcl remote_datap ptr; 634 dcl ack_init_data char (Max_packet_size); 635 dcl ack_init_datap ptr; 636 dcl ack_init_data_lth fixed bin (21); 637 dcl ack_init_packet char (Max_packet_size); 638 dcl ack_init_packet_lth fixed bin (21); 639 dcl ack_init_packetp ptr; 640 641 /* based */ 642 643 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 644 dcl 01 kti like kermit_transfer_info based (ktip); 645 646 /* labels */ 647 648 dcl packet (0:2) label init (Other, Send_init, Error); 649 650 /* constants */ 651 652 dcl Packet_string char (2) internal static options (constant) init ("SE"); 653 654 ec = 0; 655 ack_init_datap = addr (ack_init_data); 656 ack_init_packetp = addr (ack_init_packet); 657 remote_datap = addr (remote_data); 658 kti.retry_count = kti.retry_count + 1; 659 660 /* Should we give up? */ 661 if kti.retry_count > kti.retry_threshold then do; 662 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 663 kermit_stats.status = kermit_et_$no_initialization; 664 state = Rec_abort; 665 return; 666 end; 667 668 /* Get remote send-init data */ 669 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 670 packet_size, eol_split, ec); 671 if ec ^= 0 then goto Retry_packet; 672 673 idx = index (Packet_string, packet_type); 674 goto packet (idx); 675 676 677 678 Send_init: /* Received SEND-INIT packet */ 679 if packet_n ^= kti.sequence_n then goto Retry_packet; 680 681 /* Have the remote init data, so set the modes database */ 682 call kermit_xfer_modes_$get_local_params (infop, ack_init_datap, ack_init_data_lth, ack_init_packetp, ack_init_packet_lth, ec); 683 if ec ^= 0 then goto Retry_packet; 684 685 call kermit_xfer_modes_$check_params (infop, remote_datap, chars_received, ack_init_datap, ec); 686 if ec ^= 0 then 687 goto Retry_packet; 688 689 /* else all is fine, so give the remote kermit the local modes */ 690 call kermit_pad_$send (infop, Ack_packet, ack_init_packetp, ack_init_packet_lth, kti.sequence_n, chars_sent, 691 packet_size, ec); 692 if ec ^= 0 then 693 goto Retry_packet; 694 695 696 /* All okay, so set the tty_ line to the new modes */ 697 call kermit_xfer_modes_$process_params (infop, remote_datap, chars_received, ack_init_datap, ec); 698 if ec ^= 0 then 699 goto Retry_packet; 700 701 call kermit_comm_mgr_$reset_line_modes (infop, ec); 702 call kermit_comm_mgr_$set_line_modes (infop, ec); 703 704 kti.retry_count = 0; 705 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 706 state = Rec_file_header; 707 return; 708 709 Error: /* Received ERROR packet */ 710 kermit_stats.status = kermit_et_$fatal_error; 711 kermit_stats.error_message = substr (remote_data, 1, chars_received); 712 state = Rec_abort; 713 return; 714 715 Other: /* Received unexpected packet */ 716 Retry_packet: 717 call kermit_pad_$send (infop, Nak_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 718 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 719 return; 720 end receive_init; 721 722 723 receive_file_abort: 724 proc (infop, ktip, discard_sw, abort_sent, state); 725 726 727 /**********************************************************************/ 728 /* */ 729 /*n Name: kermit_receive_$receive_file_abort internal */ 730 /*i Input: infop, ktip, discard_sw, abort_sent */ 731 /*f Function: Responsible for handling the abort of a single */ 732 /*f file initiated by the local kermit. */ 733 /*f To abort a single file, put an "X" in the data */ 734 /*f portion of the Ack to a DATA packet. If the */ 735 /*f remote understands 'single file aborts', it will */ 736 /*f respond with a "D" in the data field of an EOF */ 737 /*f packet. */ 738 /*f Kermits that do not understand a single file */ 739 /*f abort will continue sending Data packets. If this */ 740 /*f occurs, the local kermit must abort the whole */ 741 /*f transaction. */ 742 /*f If abort_sent = True then an abortive Ack packet */ 743 /*f has already been sent. Receiving a data packet */ 744 /*f then means that the remote does not understand. */ 745 /*f If abort_sent = False then we have yet to send */ 746 /*f out the abortive Ack. As soon as we get a Data */ 747 /*f packet, send out the abortive Ack, and return to */ 748 /*f this state. */ 749 /*o Output: abort_sent, state */ 750 /* */ 751 /**********************************************************************/ 752 753 /* parameters */ 754 755 dcl infop ptr; 756 dcl ktip ptr; 757 dcl abort_sent bit (1); 758 dcl discard_sw bit (1); 759 dcl state fixed bin; 760 761 /* automatic */ 762 763 dcl abort_char char (1); 764 dcl abort_charp ptr; 765 dcl chars_received fixed bin (21); 766 dcl chars_sent fixed bin (21); 767 dcl ec fixed bin (35); 768 dcl eol_split bit (1); 769 dcl idx fixed bin; 770 dcl packet_n fixed bin; 771 dcl packet_size fixed bin (21); 772 dcl packet_type char (1); 773 dcl r_packet_size fixed bin (21); 774 dcl remote_data char (Max_remote_packet_size); 775 dcl remote_datap ptr; 776 777 778 /* based */ 779 780 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 781 dcl 01 kti like kermit_transfer_info based (ktip); 782 783 /* labels */ 784 785 dcl packet (0:4) label init (Other, File_header, Data, Eof, Error); 786 787 /* constants */ 788 789 dcl Discard_char char (1) internal static options (constant) init ("X"); 790 dcl False bit (1) internal static options (constant) init ("0"b); 791 dcl Packet_string char (4) internal static options (constant) init ("FDZE"); 792 dcl True bit (1) internal static options (constant) init ("1"b); 793 794 ec = 0; 795 abort_char = Discard_char; 796 abort_charp = addr (abort_char); 797 remote_datap = addr (remote_data); 798 799 kti.retry_count = kti.retry_count + 1; 800 801 /* Should we give up?? */ 802 if kti.retry_count > kti.retry_threshold then do; 803 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 804 kermit_stats.status = kermit_et_$too_many_retries; 805 state = Rec_abort; 806 return; 807 end; 808 809 /* Get the remote's packet */ 810 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 811 r_packet_size, eol_split, ec); 812 813 if ec ^= 0 then goto Retry_packet; 814 815 /* Respond to remote's packet */ 816 idx = index (Packet_string, packet_type); 817 goto packet (idx); 818 819 820 821 Data: /* Received remote DATA packet */ 822 if kti.sequence_n ^= packet_n then do; /* Remote lost a previous ack? */ 823 /* yes */ 824 if mod (packet_n + 1, 64) = kti.sequence_n then do; 825 call kermit_pad_$send (infop, Ack_packet, abort_charp, 1, packet_n, chars_sent, packet_size, ec); 826 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 827 abort_sent = "1"b; 828 return; 829 end; 830 else goto Retry_packet; /* No */ 831 end; 832 833 /* We are trying to abort a single file */ 834 /* If we haven't signalled the abort yet, do so now */ 835 if ^abort_sent then do; 836 call kermit_pad_$send (infop, Ack_packet, abort_charp, 1, kti.sequence_n, chars_sent, packet_size, ec); 837 kti.retry_count = 0; 838 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 839 abort_sent = True; 840 return; 841 end; /* We already sent the abort, but remote obviously doesn't understand, so 842* kill the transaction */ 843 else if abort_sent then do; 844 call kermit_pad_$send (infop, Error_packet, null (), 0, kti.sequence_n, 0, 0, ec); 845 846 state = Rec_abort; 847 return; 848 end; 849 850 File_header: /* Received FILE-HEADER packet */ 851 /* Remote may have lost our previous ACK */ 852 call check_lost_packet (infop, ktip, packet_n); 853 return; 854 855 856 Eof: /* Received EOF packet */ 857 if kti.sequence_n ^= packet_n then goto Retry_packet; 858 859 860 /* Well, we got an eof. Doesn't matter whether the remote 861* understood the file abort or not, because it's finished sending. */ 862 call kermit_pad_$send (infop, Ack_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 863 abort_sent = False; 864 kermit_stats.end_time = clock_ (); 865 call update_log (infop, ktip, discard_sw); 866 kti.retry_count = 0; 867 kti.sequence_n = mod (kti.sequence_n + 1, Mod_64); 868 state = Rec_file_header; 869 return; 870 871 872 873 Error: /* Received ERROR packet */ 874 kermit_stats.status = kermit_et_$fatal_error; 875 kermit_stats.error_message = substr (remote_data, 1, chars_received); 876 state = Rec_abort; 877 return; 878 879 Other: /* Received unexpected packet */ 880 Retry_packet: 881 call kermit_pad_$send (infop, Nak_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 882 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 883 return; 884 885 end receive_file_abort; 886 887 update_log: 888 proc (infop, ktip, discard_sw); 889 890 /**********************************************************************/ 891 /* */ 892 /*n Name: kermit_receive_$update_log internal */ 893 /*i Input: infop, ktip, discard_sw */ 894 /*f Function: Calls the log_mgr_ to updates the log-file and */ 895 /*f statistics database. Re-initializes all file */ 896 /*f associated variables. */ 897 /*o Output: none */ 898 /* */ 899 /**********************************************************************/ 900 901 /* parameters */ 902 903 dcl discard_sw bit (1); 904 dcl infop ptr; 905 dcl ktip ptr; 906 907 /* automatic */ 908 909 dcl abnormal_termination bit (1); 910 911 /* based */ 912 913 dcl 01 path aligned based (kti.filenamesp), 914 02 dir_name char (168) unal, 915 02 entry_name char (32) unal; 916 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 917 dcl 01 kti like kermit_transfer_info based (ktip); 918 919 920 kermit_stats.file_len = kermit_stats.char_count; 921 kermit_stats.filename = pathname_ (rtrim (path.dir_name), rtrim (path.entry_name)); 922 call kermit_log_mgr_$log_message (infop, kti.statisticsp); 923 924 if kermit_stats.status = 0 then kti.file_count = kti.file_count + 1; 925 abnormal_termination = (kermit_stats.status ^= 0); 926 call terminate_file (ktip, discard_sw, abnormal_termination); 927 928 kti.buffp = null (); 929 930 path.dir_name, path.entry_name = " "; 931 932 call init_file_stats (ktip); 933 934 return; 935 end update_log; 936 937 find_file: 938 proc (filename, file_warning_sw, source_dir, source_ename, file_ptr, ec); 939 940 /**********************************************************************/ 941 /* */ 942 /*n Name: kermit_receive_$find_file internal */ 943 /*i Input: filename, file_warning_sw */ 944 /*f Function: Gets a pointer to the file to be received, */ 945 /*f renaming if necessary. */ 946 /*o Output: source_dir, source_ename, file_ptr, ec */ 947 /*l Modified: 89-01-02 by S Huen - Handle links to multisegment */ 948 /*l files correctly. (pc_24) */ 949 /* */ 950 /**********************************************************************/ 951 952 /* parameters */ 953 dcl ec fixed bin (35); 954 dcl file_ptr ptr; 955 dcl file_warning_sw bit (1); 956 dcl filename char (*); 957 dcl source_dir char (168); 958 dcl source_ename char (32); 959 960 /* automatic */ 961 962 dcl abs_max_suffix fixed bin; 963 dcl bit_count fixed bin (24); 964 dcl file_suffix fixed bin; 965 dcl max_suffix_lth fixed bin; 966 dcl max_suffix fixed bin; 967 dcl name_dup bit (1); 968 dcl suffixed_filename char (32); 969 970 /* Constants */ 971 972 dcl Max_entry_lth fixed bin internal static options (constant) init (32); 973 dcl True bit (1) internal static options (constant) init ("1"b); 974 975 ec = 0; 976 source_dir = " "; 977 source_ename = " "; 978 file_ptr = null (); 979 name_dup = True; 980 981 call expand_pathname_ (filename, source_dir, source_ename, ec); 982 if ec ^= 0 then return; 983 984 suffixed_filename = source_ename; 985 986 /* Calculate the maximum suffix, where suffix = "1" to "9..." */ 987 988 abs_max_suffix = 2 ** 17; 989 max_suffix_lth = (Max_entry_lth - length (rtrim (suffixed_filename))) - 1; 990 /* allow for '.' */ 991 max_suffix = min (10 ** max_suffix_lth - 1, abs_max_suffix); 992 993 do file_suffix = 1 to max_suffix while (name_dup); 994 995 call hcs_$status_minf (rtrim (source_dir), rtrim (suffixed_filename), (1), (0), bit_count, ec); 996 if ec = 0 997 then do; /* The file is already there, so either... */ 998 if ^file_warning_sw then /* delete it (file warning is off) */ 999 call delete_$path ( 1000 rtrim (source_dir), rtrim (suffixed_filename), 1001 "000111"b, "kermit", ec); 1002 else do; /* find a new name for the segment */ 1003 call suffixed_name_$make (source_ename, ltrim (char (file_suffix)), suffixed_filename, ec); 1004 if ec ^= 0 then do; 1005 ec = kermit_et_$no_rename; 1006 return; 1007 end; 1008 end; 1009 end; 1010 else name_dup = False; /* Successfully created new file */ 1011 1012 1013 end; /* while */ 1014 1015 if name_dup then do; 1016 ec = kermit_et_$no_rename; 1017 return; 1018 end; 1019 1020 1021 /* If we get this far we have a file for receiving */ 1022 1023 source_ename = suffixed_filename; 1024 call iox_$attach_name ("kermit." || unique_chars_ (False), 1025 file_ptr, "vfile_ " || pathname_ (source_dir, source_ename), 1026 null(), ec); 1027 call iox_$open (file_ptr, Stream_output, "0"b, ec); 1028 1029 return; 1030 end find_file; 1031 1032 terminate_file: 1033 proc (ktip, discard_sw, abnormal_termination); 1034 1035 /**********************************************************************/ 1036 /* */ 1037 /*n Name: kermit_receive_$terminate_file internal */ 1038 /*i Input: ktip, discard_sw, abnormal_termination */ 1039 /*f Function: Terminates a file, deleting if discard_sw is true */ 1040 /*f and the file could not be received normally. */ 1041 /*o Output: none */ 1042 /* */ 1043 /**********************************************************************/ 1044 1045 /* parameters */ 1046 1047 dcl abnormal_termination bit (1); 1048 dcl discard_sw bit (1); 1049 dcl ktip ptr; 1050 1051 dcl 01 kti like kermit_transfer_info based (ktip); 1052 /* automatic */ 1053 1054 if kti.iocb_ptr ^= null () then do; 1055 call iox_$close (kti.iocb_ptr, ec); 1056 call iox_$detach_iocb (kti.iocb_ptr, ec); 1057 if discard_sw & abnormal_termination then 1058 call delete_$path ( 1059 kti.filenamesp -> kermit_filenames(kti.filenames_idx).directory, 1060 kti.filenamesp -> kermit_filenames(kti.filenames_idx).entry_name, 1061 "000111"b, "kermit", ec); 1062 kti.iocb_ptr = null (); 1063 end; 1064 return; 1065 end terminate_file; 1066 1067 check_lost_packet: 1068 proc (infop, ktip, packet_n); 1069 1070 /**********************************************************************/ 1071 /* */ 1072 /*n Name: kermit_receive_$check_lost_packet internal */ 1073 /*i Input: infop, ktip, packet_n */ 1074 /*f Function: If we have a previous packet (previous ack was */ 1075 /*f lost), retransmits the lost ack. Otherwise naks */ 1076 /*f the packet. */ 1077 /*o Output: none */ 1078 /* */ 1079 /**********************************************************************/ 1080 1081 /* parameters */ 1082 1083 dcl infop ptr; 1084 dcl ktip ptr; 1085 dcl packet_n fixed bin; 1086 /* static */ 1087 1088 dcl last_lost_packet fixed bin static internal init (-1); 1089 /* based */ 1090 1091 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 1092 dcl 01 kti like kermit_transfer_info based (ktip); 1093 1094 1095 if mod (packet_n + 1, 64) = kti.sequence_n then do; 1096 if mod (last_lost_packet + 1, 64) ^= packet_n then 1097 call kermit_pad_$send (infop, Ack_packet, null (), 0, packet_n, 0, 0, ec); 1098 last_lost_packet = packet_n; 1099 end; /* No */ 1100 else do; 1101 call kermit_pad_$send (infop, Nak_packet, null (), 0, kti.sequence_n, 0, 0, ec); 1102 last_lost_packet = -1; 1103 end; 1104 kermit_stats.packet_retries = kermit_stats.packet_retries + 1; 1105 return; 1106 end check_lost_packet; 1107 1108 store_data: proc (ktip, eol_split, data, data_lth, packet_size, ec); 1109 1110 /**********************************************************************/ 1111 /* */ 1112 /*n Name: kermit_receive_$store_data internal */ 1113 /*i Input: ktip, eol_split, data, data_lth, packet_size */ 1114 /*f Function: Writes the data to the file. */ 1115 /*o Output: ec */ 1116 /* */ 1117 /**********************************************************************/ 1118 1119 /* parameters */ 1120 1121 dcl data char (*); 1122 dcl data_lth fixed bin (21); 1123 dcl eol_split bit (1); 1124 dcl ec fixed bin (35); 1125 dcl ktip ptr; 1126 dcl packet_size fixed bin (21); 1127 1128 1129 /* based */ 1130 1131 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 1132 dcl 01 kti like kermit_transfer_info based (ktip); 1133 1134 ec = 0; 1135 1136 /* Account for CR-LF being split across two packets */ 1137 if eol_split & kti.owe_a_cr then 1138 kti.owe_a_cr = False; 1139 1140 /* All okay, so write it out */ 1141 1142 if kti.owe_a_cr 1143 then do; 1144 call iox_$put_chars (kti.iocb_ptr, addr (CR), 1, ec); 1145 kermit_stats.char_count = kermit_stats.char_count + 1; 1146 kti.owe_a_cr = False; 1147 end; 1148 1149 if substr (data, data_lth, 1) = CR 1150 then do; 1151 kti.owe_a_cr = True; 1152 data_lth = data_lth - 1; 1153 end; 1154 call iox_$put_chars (kti.iocb_ptr, addr (data), data_lth, ec); 1155 kermit_stats.char_count = kermit_stats.char_count + data_lth; 1156 kermit_stats.packet_count = kermit_stats.packet_count + 1; 1157 kermit_stats.packet_chars = kermit_stats.packet_chars + packet_size; 1158 return; 1159 end store_data; 1160 1161 init_file_stats: 1162 proc (ktip); 1163 1164 /**********************************************************************/ 1165 /* */ 1166 /*n Name: kermit_receive_$init_file_stats internal */ 1167 /*i Input: ktip */ 1168 /*f Function: Initializes file statistics. */ 1169 /*o Output: none */ 1170 /* */ 1171 /**********************************************************************/ 1172 1173 /* parameters */ 1174 1175 dcl ktip ptr; 1176 1177 /* based */ 1178 1179 dcl 01 kermit_stats aligned like kermit_stats_info based (kti.statisticsp); 1180 dcl 01 kti like kermit_transfer_info based (ktip); 1181 1182 1183 1184 kermit_stats.filename = " "; 1185 kermit_stats.file_len = 0; 1186 kermit_stats.char_count = 0; 1187 kermit_stats.packet_chars = 0; 1188 kermit_stats.packet_count = 0; 1189 kermit_stats.packet_retries = 0; 1190 kermit_stats.start_time = 0; 1191 kermit_stats.end_time = 0; 1192 kermit_stats.error_message = " "; 1193 1194 return; 1195 end init_file_stats; 1196 1197 verify_receipt: 1198 proc (infop, ktip); 1199 1200 /**********************************************************************/ 1201 /* */ 1202 /*n Name: kermit_receive_$verify_receipt internal */ 1203 /*i Input: infop, ktip */ 1204 /*f Function: This routine tries to ensure that the remote */ 1205 /*f system received the ack to its EOT packet. */ 1206 /*o Output: none */ 1207 /* */ 1208 /**********************************************************************/ 1209 1210 /* parameters */ 1211 1212 dcl ktip ptr; 1213 dcl infop ptr; 1214 1215 /* automatic */ 1216 1217 dcl chars_received fixed bin (21); 1218 dcl chars_sent fixed bin (21); 1219 dcl ec fixed bin (35); 1220 dcl eol_split bit (1); 1221 dcl packet_n fixed bin; 1222 dcl packet_size fixed bin (21); 1223 dcl packet_type char (1); 1224 dcl packet_timeout fixed bin (8) unal; 1225 dcl r_packet_size fixed bin (21); 1226 dcl remote_data char (Max_remote_packet_size); 1227 dcl remote_datap ptr; 1228 dcl timeout_select (1) fixed bin; 1229 1230 /* based */ 1231 1232 dcl 01 kti like kermit_transfer_info based (ktip); 1233 1234 /* constants */ 1235 1236 dcl Five_seconds fixed bin (8) unal internal static options (constant) init (5); 1237 1238 1239 /* Make sure the remote got the ack, because if it didn't it will hang */ 1240 1241 /* Make the timeout interval reasonable for this state */ 1242 timeout_select (1) = I_timeout; 1243 packet_timeout = Five_seconds; 1244 1245 call kermit_mode_mgr_$store (infop, Temporary, timeout_select, addr (packet_timeout), ec); 1246 1247 packet_type = ""; 1248 remote_datap = addr (remote_data); 1249 1250 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 1251 r_packet_size, eol_split, ec); 1252 1253 do while (packet_type = Eot_packet); 1254 call kermit_pad_$send (infop, Ack_packet, null (), 0, kti.sequence_n, chars_sent, packet_size, ec); 1255 packet_type = ""; 1256 call kermit_pad_$receive (infop, packet_type, remote_datap, Max_remote_packet_size, packet_n, chars_received, 1257 packet_size, eol_split, ec); 1258 end; 1259 return; 1260 end verify_receipt; 1261 1262 end kermit_receive_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/01/89 1434.1 kermit_receive_.pl1 >spec>install>1020>kermit_receive_.pl1 132 1 04/11/85 1452.6 access_mode_values.incl.pl1 >ldd>include>access_mode_values.incl.pl1 134 2 11/20/84 1351.4 kermit_dcls.incl.pl1 >ldd>include>kermit_dcls.incl.pl1 136 3 07/07/88 2041.4 kermit_info.incl.pl1 >ldd>include>kermit_info.incl.pl1 138 4 07/07/88 2041.4 kermit_mode_info.incl.pl1 >ldd>include>kermit_mode_info.incl.pl1 140 5 07/07/88 2041.4 kermit_transfer_info.incl.pl1 >ldd>include>kermit_transfer_info.incl.pl1 142 6 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.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 000007 constant char(1) initial packed unaligned dcl 5-86 set ref 355* 382* 509* 562* 577* 690* 825* 836* 862* 1096* 1254* CR based char(1) level 2 packed packed unaligned dcl 3-31 set ref 1144 1144 1149 Discard 005374 constant char(1) initial packed unaligned dcl 86 ref 196 Discard_char constant char(1) initial packed unaligned dcl 789 in procedure "receive_file_abort" ref 795 Discard_char constant char(1) initial packed unaligned dcl 311 in procedure "receive_data" ref 350 Eot_packet constant char(1) initial packed unaligned dcl 5-89 ref 1253 Error_packet 000005 constant char(1) initial packed unaligned dcl 5-92 set ref 210* 324* 485* 662* 803* 844* False constant bit(1) initial packed unaligned dcl 476 in procedure "receive_filename" ref 519 False 000033 constant bit(1) initial packed unaligned dcl 87 in procedure "kermit_receive_" set ref 181 215 1010 1024* 1137 1146 False constant bit(1) initial packed unaligned dcl 309 in procedure "receive_data" ref 317 False constant bit(1) initial packed unaligned dcl 790 in procedure "receive_file_abort" ref 863 File_warning constant fixed bin(17,0) initial dcl 4-39 ref 189 Five_seconds constant fixed bin(8,0) initial packed unaligned dcl 1236 ref 1243 I_timeout constant fixed bin(17,0) initial dcl 4-72 ref 1242 Incomplete constant fixed bin(17,0) initial dcl 4-38 ref 190 Max_entry_lth constant fixed bin(17,0) initial dcl 972 ref 989 Max_packet_size internal static fixed bin(21,0) initial dcl 88 ref 440 443 634 637 Max_remote_packet_size 000012 constant fixed bin(21,0) initial dcl 89 set ref 295 331* 456 492* 632 669* 774 810* 1226 1250* 1256* Mod_64 005375 constant fixed bin(17,0) initial dcl 91 ref 358 386 512 705 838 867 Nak_packet 000006 constant char(1) initial packed unaligned dcl 5-87 set ref 398* 589* 715* 879* 1101* Packet_string 005373 constant char(2) initial packed unaligned dcl 652 in procedure "receive_init" ref 673 Packet_string 000002 constant char(5) initial packed unaligned dcl 477 in procedure "receive_filename" ref 498 Packet_string 000004 constant char(4) initial packed unaligned dcl 312 in procedure "receive_data" ref 337 Packet_string 000004 constant char(4) initial packed unaligned dcl 791 in procedure "receive_file_abort" ref 816 Permanent 000035 constant fixed bin(17,0) initial dcl 4-21 set ref 192* Rec_abort constant fixed bin(17,0) initial dcl 5-110 ref 326 395 487 586 664 712 805 846 876 Rec_complete constant fixed bin(17,0) initial dcl 5-111 ref 580 Rec_data constant fixed bin(17,0) initial dcl 5-108 ref 546 Rec_file_abort constant fixed bin(17,0) initial dcl 5-109 ref 359 538 Rec_file_header constant fixed bin(17,0) initial dcl 5-107 ref 387 706 868 Remote_discard 005374 constant char(1) initial packed unaligned dcl 313 ref 377 Retry_threshold constant fixed bin(17,0) initial dcl 4-41 ref 188 Stream_output 000034 constant fixed bin(17,0) initial dcl 6-15 set ref 1027* Temporary 000034 constant fixed bin(17,0) initial dcl 4-22 set ref 1245* True constant bit(1) initial packed unaligned dcl 92 in procedure "kermit_receive_" ref 202 208 1151 True constant bit(1) initial packed unaligned dcl 792 in procedure "receive_file_abort" ref 839 True constant bit(1) initial packed unaligned dcl 973 in procedure "find_file" ref 979 True constant bit(1) initial packed unaligned dcl 310 in procedure "receive_data" ref 352 Whoami 000010 constant char(7) initial packed unaligned dcl 93 ref 185 Yes 000007 constant char(1) initial packed unaligned dcl 94 ref 195 abnormal_termination 000100 automatic bit(1) packed unaligned dcl 63 in procedure "kermit_receive_" set ref 202* 203* 208* 209* abnormal_termination parameter bit(1) packed unaligned dcl 1047 in procedure "terminate_file" ref 1032 1057 abnormal_termination 024630 automatic bit(1) packed unaligned dcl 909 in procedure "update_log" set ref 925* 926* abort_char 000434 automatic char(1) packed unaligned dcl 284 in procedure "receive_data" set ref 350* 355 355 abort_char 017650 automatic char(1) packed unaligned dcl 763 in procedure "receive_file_abort" set ref 795* 796 abort_char_lth 000435 automatic fixed bin(21,0) dcl 285 set ref 318* 351* 355* abort_charp 017652 automatic pointer dcl 764 set ref 796* 825* 836* abort_sent parameter bit(1) packed unaligned dcl 757 in procedure "receive_file_abort" set ref 723 827* 835 839* 843 863* abort_sent 000101 automatic bit(1) packed unaligned dcl 64 in procedure "kermit_receive_" set ref 215* 232* 236* 240 abort_sent parameter bit(1) packed unaligned dcl 276 in procedure "receive_data" set ref 257 317* 352* 359 abs_max_suffix 024640 automatic fixed bin(17,0) dcl 962 set ref 988* 991 ack_init_data 017536 automatic char(94) packed unaligned dcl 634 in procedure "receive_init" set ref 655 ack_init_data 005412 automatic char(94) packed unaligned dcl 440 in procedure "receive_filename" set ref 555 ack_init_data_lth 017570 automatic fixed bin(21,0) dcl 636 in procedure "receive_init" set ref 682* ack_init_data_lth 005442 automatic fixed bin(21,0) dcl 441 in procedure "receive_filename" set ref 557* ack_init_datap 017566 automatic pointer dcl 635 in procedure "receive_init" set ref 655* 682* 685* 697* ack_init_datap 005444 automatic pointer dcl 442 in procedure "receive_filename" set ref 555* 557* ack_init_packet 017571 automatic char(94) packed unaligned dcl 637 in procedure "receive_init" set ref 656 ack_init_packet 005446 automatic char(94) packed unaligned dcl 443 in procedure "receive_filename" set ref 556 ack_init_packet_lth 017621 automatic fixed bin(21,0) dcl 638 in procedure "receive_init" set ref 682* 690* ack_init_packet_lth 005476 automatic fixed bin(21,0) dcl 444 in procedure "receive_filename" set ref 557* 562* ack_init_packetp 005500 automatic pointer dcl 445 in procedure "receive_filename" set ref 556* 557* 562* ack_init_packetp 017622 automatic pointer dcl 639 in procedure "receive_init" set ref 656* 682* 690* addr builtin function dcl 98 ref 165 166 174 183 192 192 319 355 355 480 555 556 655 656 657 796 797 1144 1144 1144 1144 1149 1154 1154 1245 1245 1248 bit_count 024641 automatic fixed bin(24,0) dcl 963 set ref 995* buffp 12 based pointer level 2 in structure "kti" dcl 917 in procedure "update_log" set ref 928* buffp 12 000332 automatic pointer level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 179* byte builtin function dcl 98 ref 195 196 caller 000176 automatic char(32) level 2 dcl 77 set ref 185* char builtin function dcl 98 ref 1003 1003 char_count 73 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 916 in procedure "update_log" ref 920 char_count 73 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1131 in procedure "store_data" set ref 1145* 1145 1155* 1155 char_count 73 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1186* chars_received 005502 automatic fixed bin(21,0) dcl 446 in procedure "receive_filename" set ref 492* 506 523 585 chars_received 017654 automatic fixed bin(21,0) dcl 765 in procedure "receive_file_abort" set ref 810* 875 chars_received 012620 automatic fixed bin(21,0) dcl 624 in procedure "receive_init" set ref 669* 685* 697* 711 chars_received 000436 automatic fixed bin(21,0) dcl 286 in procedure "receive_data" set ref 331* 347 347* 376 377 394 chars_received 024710 automatic fixed bin(21,0) dcl 1217 in procedure "verify_receipt" set ref 1250* 1256* chars_sent 017655 automatic fixed bin(21,0) dcl 766 in procedure "receive_file_abort" set ref 825* 836* 862* 879* chars_sent 012621 automatic fixed bin(21,0) dcl 625 in procedure "receive_init" set ref 690* 715* chars_sent 005503 automatic fixed bin(21,0) dcl 447 in procedure "receive_filename" set ref 509* 562* 577* 589* chars_sent 000437 automatic fixed bin(21,0) dcl 287 in procedure "receive_data" set ref 355* 382* 398* chars_sent 024711 automatic fixed bin(21,0) dcl 1218 in procedure "verify_receipt" set ref 1254* cleanup 000410 stack reference condition dcl 102 ref 201 clock_ 000032 constant entry external dcl 116 ref 383 533 864 data parameter char packed unaligned dcl 1121 set ref 1108 1149 1154 1154 data_lth parameter fixed bin(21,0) dcl 1122 set ref 1108 1149 1152* 1152 1154* 1155 delete_$path 000034 constant entry external dcl 117 ref 998 1057 dir_name 000106 automatic char(168) level 2 in structure "path" packed packed unaligned dcl 68 in procedure "kermit_receive_" set ref 169* dir_name based char(168) level 2 in structure "path" packed packed unaligned dcl 466 in procedure "receive_filename" set ref 531* dir_name based char(168) level 2 in structure "path" packed packed unaligned dcl 913 in procedure "update_log" set ref 921 921 930* directory 1 based char(168) array level 3 packed packed unaligned dcl 5-66 set ref 1057* discard_sw parameter bit(1) packed unaligned dcl 277 in procedure "receive_data" set ref 257 384* discard_sw parameter bit(1) packed unaligned dcl 1048 in procedure "terminate_file" ref 1032 1057 discard_sw 000102 automatic bit(1) packed unaligned dcl 65 in procedure "kermit_receive_" set ref 196* 203* 209* 232* 236* 244* discard_sw parameter bit(1) packed unaligned dcl 758 in procedure "receive_file_abort" set ref 723 865* discard_sw parameter bit(1) packed unaligned dcl 903 in procedure "update_log" set ref 887 926* ec 024712 automatic fixed bin(35,0) dcl 1219 in procedure "verify_receipt" set ref 1245* 1250* 1254* 1256* ec parameter fixed bin(35,0) dcl 953 in procedure "find_file" set ref 937 975* 981* 982 995* 996 998* 1003* 1004 1005* 1016* 1024* 1027* ec 012622 automatic fixed bin(35,0) dcl 626 in procedure "receive_init" set ref 654* 662* 669* 671 682* 683 685* 686 690* 692 697* 698 701* 702* 715* ec parameter fixed bin(35,0) dcl 1124 in procedure "store_data" set ref 1108 1134* 1144* 1154* ec 017656 automatic fixed bin(35,0) dcl 767 in procedure "receive_file_abort" set ref 794* 803* 810* 813 825* 836* 844* 862* 879* ec 000440 automatic fixed bin(35,0) dcl 288 in procedure "receive_data" set ref 316* 324* 331* 334 347* 348 349 355* 382* 398* ec parameter fixed bin(35,0) dcl 53 in procedure "kermit_receive_" set ref 145 192* 210* 211* 240* 243* 1055* 1056* 1057* 1096* 1101* ec 005504 automatic fixed bin(35,0) dcl 448 in procedure "receive_filename" set ref 479* 485* 492* 495 509* 528* 535 536 557* 561 562* 577* 589* end_time 102 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1191* end_time 102 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 464 in procedure "receive_filename" set ref 537* end_time 102 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 301 in procedure "receive_data" set ref 383* end_time 102 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 780 in procedure "receive_file_abort" set ref 864* entry_name 52 based char(32) level 2 in structure "path" packed packed unaligned dcl 466 in procedure "receive_filename" set ref 532* entry_name 52 000106 automatic char(32) level 2 in structure "path" packed packed unaligned dcl 68 in procedure "kermit_receive_" set ref 170* 172* entry_name 53 based char(32) array level 3 in structure "kermit_filenames" packed packed unaligned dcl 5-66 in procedure "kermit_receive_" set ref 1057* entry_name 52 based char(32) level 2 in structure "path" packed packed unaligned dcl 913 in procedure "update_log" set ref 921 921 930* eol_split 000441 automatic bit(1) packed unaligned dcl 289 in procedure "receive_data" set ref 331* 347* eol_split 005505 automatic bit(1) packed unaligned dcl 449 in procedure "receive_filename" set ref 492* eol_split 024713 automatic bit(1) packed unaligned dcl 1220 in procedure "verify_receipt" set ref 1250* 1256* eol_split 017657 automatic bit(1) packed unaligned dcl 768 in procedure "receive_file_abort" set ref 810* eol_split 012623 automatic bit(1) packed unaligned dcl 627 in procedure "receive_init" set ref 669* eol_split parameter bit(1) packed unaligned dcl 1123 in procedure "store_data" ref 1108 1137 error_message 104 based char(94) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1192* error_message 104 based char(94) level 2 in structure "kermit_stats" dcl 464 in procedure "receive_filename" set ref 585* error_message 104 based char(94) level 2 in structure "kermit_stats" dcl 301 in procedure "receive_data" set ref 394* error_message 104 based char(94) level 2 in structure "kermit_stats" dcl 643 in procedure "receive_init" set ref 711* error_message 104 based char(94) level 2 in structure "kermit_stats" dcl 780 in procedure "receive_file_abort" set ref 875* error_table_$rqover 000014 external static fixed bin(35,0) dcl 106 ref 211 expand_pathname_ 000036 constant entry external dcl 118 ref 981 file_count 16 000332 automatic fixed bin(17,0) level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 182* 246 file_count 16 based fixed bin(17,0) level 2 in structure "kti" dcl 917 in procedure "update_log" set ref 924* 924 file_len 72 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1185* file_len 72 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 916 in procedure "update_log" set ref 920* file_ptr 005510 automatic pointer dcl 451 in procedure "receive_filename" set ref 528* 530 file_ptr parameter pointer dcl 954 in procedure "find_file" set ref 937 978* 1024* 1027* file_suffix 024642 automatic fixed bin(17,0) dcl 964 set ref 993* 1003 1003* file_sw parameter bit(1) packed unaligned dcl 54 set ref 145 170 229* file_warning_sw parameter bit(1) packed unaligned dcl 432 in procedure "receive_filename" set ref 406 528* file_warning_sw parameter bit(1) packed unaligned dcl 955 in procedure "find_file" ref 937 998 filename 11 based char(194) level 2 in structure "kermit_stats" packed packed unaligned dcl 916 in procedure "update_log" set ref 921* filename 11 based char(194) level 2 in structure "kermit_stats" packed packed unaligned dcl 1179 in procedure "init_file_stats" set ref 1184* filename parameter char packed unaligned dcl 956 in procedure "find_file" set ref 937 981* filenames_idx 6 based fixed bin(17,0) level 2 in structure "kti" dcl 1051 in procedure "terminate_file" ref 1057 1057 filenames_idx 6 000332 automatic fixed bin(17,0) level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 177* filenamesp 4 based pointer level 2 in structure "kti" dcl 1051 in procedure "terminate_file" ref 1057 1057 filenamesp 4 000332 automatic pointer level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 174* filenamesp 4 based pointer level 2 in structure "kti" dcl 917 in procedure "update_log" ref 921 921 921 921 930 930 filenamesp 4 based pointer level 2 in structure "kti" dcl 465 in procedure "receive_filename" ref 531 532 filep 10 000332 automatic pointer level 2 dcl 78 set ref 178* files_received parameter fixed bin(17,0) dcl 55 set ref 145 216* 246* first_filename parameter char packed unaligned dcl 56 set ref 145 170 229* flags 22 000332 automatic structure level 2 in structure "kti" packed packed unaligned dcl 78 in procedure "kermit_receive_" flags 22 based structure level 2 in structure "kti" packed packed unaligned dcl 1132 in procedure "store_data" fw_sw 000103 automatic bit(1) packed unaligned dcl 66 set ref 195* 229* hcs_$status_minf 000040 constant entry external dcl 119 ref 995 idx 012624 automatic fixed bin(17,0) dcl 628 in procedure "receive_init" set ref 673* 674 idx 005506 automatic fixed bin(17,0) dcl 450 in procedure "receive_filename" set ref 498* 499 idx 017660 automatic fixed bin(17,0) dcl 769 in procedure "receive_file_abort" set ref 816* 817 idx 000442 automatic fixed bin(17,0) dcl 290 in procedure "receive_data" set ref 337* 338 index builtin function dcl 98 ref 337 498 673 816 infop parameter pointer dcl 278 in procedure "receive_data" set ref 257 324* 331* 343* 355* 364* 382* 384* 398* infop parameter pointer dcl 431 in procedure "receive_filename" set ref 406 485* 492* 509* 557* 562* 569* 577* 579* 589* infop parameter pointer dcl 1213 in procedure "verify_receipt" set ref 1197 1245* 1250* 1254* 1256* infop parameter pointer dcl 904 in procedure "update_log" set ref 887 922* infop parameter pointer dcl 618 in procedure "receive_init" set ref 597 662* 669* 682* 685* 690* 697* 701* 702* 715* infop parameter pointer dcl 57 in procedure "kermit_receive_" set ref 145 192* 210* 225* 229* 232* 236* 244* infop parameter pointer dcl 755 in procedure "receive_file_abort" set ref 723 803* 810* 825* 836* 844* 850* 862* 865* 879* infop parameter pointer dcl 1083 in procedure "check_lost_packet" set ref 1067 1096* 1101* initial_seq_n parameter fixed bin(17,0) dcl 58 ref 145 176 initial_state parameter fixed bin(17,0) dcl 59 ref 145 217 iocb_ptr 24 based pointer level 2 in structure "kti" dcl 1051 in procedure "terminate_file" set ref 1054 1055* 1056* 1062* iocb_ptr 24 based pointer level 2 in structure "kti" dcl 1132 in procedure "store_data" set ref 1144* 1154* iocb_ptr 24 000332 automatic pointer level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 180* iocb_ptr 24 based pointer level 2 in structure "kti" dcl 465 in procedure "receive_filename" set ref 515 530* iox_$attach_name 000042 constant entry external dcl 120 ref 1024 iox_$close 000044 constant entry external dcl 121 ref 1055 iox_$detach_iocb 000046 constant entry external dcl 122 ref 1056 iox_$open 000050 constant entry external dcl 123 ref 1027 iox_$put_chars 000052 constant entry external dcl 124 ref 1144 1154 kermit_bit_constants 000000 constant structure level 1 packed packed unaligned dcl 3-27 set ref 1144 1144 1149 kermit_char_constants based structure level 1 packed packed unaligned dcl 3-31 kermit_comm_mgr_$reset_line_modes 000062 constant entry external dcl 2-20 ref 701 kermit_comm_mgr_$set_line_modes 000064 constant entry external dcl 2-25 ref 702 kermit_et_$fatal_error 000016 external static fixed bin(35,0) dcl 107 ref 392 583 709 873 kermit_et_$no_file_abort 000020 external static fixed bin(35,0) dcl 108 ref 240 kermit_et_$no_initialization 000022 external static fixed bin(35,0) dcl 109 ref 663 kermit_et_$no_rename 000024 external static fixed bin(35,0) dcl 110 ref 1005 1016 kermit_et_$remote_file_abort 000026 external static fixed bin(35,0) dcl 111 ref 377 kermit_et_$too_many_retries 000030 external static fixed bin(35,0) dcl 112 ref 325 486 804 kermit_filenames based structure level 1 dcl 5-66 kermit_log_mgr_$log_message 000066 constant entry external dcl 2-55 ref 922 kermit_mode_mgr_$retrieve 000070 constant entry external dcl 2-78 ref 192 kermit_mode_mgr_$store 000072 constant entry external dcl 2-90 ref 1245 kermit_pad_$receive 000074 constant entry external dcl 2-97 ref 331 492 669 810 1250 1256 kermit_pad_$send 000076 constant entry external dcl 2-108 ref 210 324 355 382 398 485 509 562 577 589 662 690 715 803 825 836 844 862 879 1096 1101 1254 kermit_stats based structure level 1 dcl 1179 in procedure "init_file_stats" kermit_stats based structure level 1 dcl 780 in procedure "receive_file_abort" kermit_stats based structure level 1 dcl 301 in procedure "receive_data" kermit_stats based structure level 1 dcl 1091 in procedure "check_lost_packet" kermit_stats based structure level 1 dcl 1131 in procedure "store_data" kermit_stats based structure level 1 dcl 464 in procedure "receive_filename" kermit_stats based structure level 1 dcl 916 in procedure "update_log" kermit_stats 000176 automatic structure level 1 dcl 77 in procedure "kermit_receive_" set ref 166 183 kermit_stats based structure level 1 dcl 643 in procedure "receive_init" kermit_stats_info based structure level 1 dcl 3-147 kermit_transfer_info based structure level 1 dcl 5-27 kermit_xfer_modes_$check_params 000100 constant entry external dcl 2-144 ref 685 kermit_xfer_modes_$get_local_params 000102 constant entry external dcl 2-157 ref 557 682 kermit_xfer_modes_$process_params 000104 constant entry external dcl 2-166 ref 697 kti based structure level 1 unaligned dcl 465 in procedure "receive_filename" kti based structure level 1 unaligned dcl 644 in procedure "receive_init" kti based structure level 1 unaligned dcl 1051 in procedure "terminate_file" kti based structure level 1 unaligned dcl 1180 in procedure "init_file_stats" kti based structure level 1 unaligned dcl 781 in procedure "receive_file_abort" kti based structure level 1 unaligned dcl 1092 in procedure "check_lost_packet" kti based structure level 1 unaligned dcl 1132 in procedure "store_data" kti based structure level 1 unaligned dcl 1232 in procedure "verify_receipt" kti based structure level 1 unaligned dcl 302 in procedure "receive_data" kti based structure level 1 unaligned dcl 917 in procedure "update_log" kti 000332 automatic structure level 1 unaligned dcl 78 in procedure "kermit_receive_" set ref 165 ktip parameter pointer dcl 1125 in procedure "store_data" ref 1108 1137 1137 1142 1144 1145 1145 1146 1151 1154 1155 1155 1156 1156 1157 1157 ktip parameter pointer dcl 619 in procedure "receive_init" ref 597 658 658 661 661 662 663 678 690 704 705 705 709 711 715 718 718 ktip parameter pointer dcl 433 in procedure "receive_filename" set ref 406 481 481 484 484 485 486 502 509 511 512 512 515 516 530 531 532 533 536 537 537 550 550 554 569* 574 577 579* 583 585 589 592 592 ktip parameter pointer dcl 1212 in procedure "verify_receipt" ref 1197 1254 ktip parameter pointer dcl 756 in procedure "receive_file_abort" set ref 723 799 799 802 802 803 804 821 824 826 826 836 837 838 838 844 850* 856 862 864 865* 866 867 867 873 875 879 882 882 ktip parameter pointer dcl 1175 in procedure "init_file_stats" ref 1161 1184 1185 1186 1187 1188 1189 1190 1191 1192 ktip parameter pointer dcl 279 in procedure "receive_data" set ref 257 320 320 323 323 324 325 341 343* 347* 349 355 357 358 358 364* 371 377 382 383 384* 385 386 386 392 394 398 401 401 ktip parameter pointer dcl 1084 in procedure "check_lost_packet" ref 1067 1095 1101 1104 1104 ktip parameter pointer dcl 905 in procedure "update_log" set ref 887 920 920 921 921 921 921 921 922 924 924 924 925 926* 928 930 930 932* ktip 000104 automatic pointer dcl 67 in procedure "kermit_receive_" set ref 165* 186* 203* 209* 225* 229* 232* 236* 244* ktip parameter pointer dcl 1049 in procedure "terminate_file" ref 1032 1054 1055 1056 1057 1057 1057 1057 1062 last_lost_packet 000010 internal static fixed bin(17,0) initial dcl 1088 set ref 1096 1098* 1102* length builtin function dcl 98 ref 989 ltrim builtin function dcl 98 ref 1003 1003 max_suffix 024644 automatic fixed bin(17,0) dcl 966 set ref 991* 993 max_suffix_lth 024643 automatic fixed bin(17,0) dcl 965 set ref 989* 991 min builtin function dcl 98 ref 991 mod builtin function dcl 98 ref 358 386 512 554 705 824 838 867 1095 1096 msf 22 000332 automatic bit(1) level 3 packed packed unaligned dcl 78 set ref 181* name_dup 024645 automatic bit(1) packed unaligned dcl 967 set ref 979* 993 1010* 1015 null builtin function dcl 98 ref 178 179 180 210 210 324 324 382 382 398 398 485 485 509 509 515 577 577 589 589 662 662 715 715 803 803 844 844 862 862 879 879 928 978 1024 1024 1054 1062 1096 1096 1101 1101 1254 1254 owe_a_cr 22(01) based bit(1) level 3 packed packed unaligned dcl 1132 set ref 1137 1137* 1142 1146* 1151* packet 005356 automatic label variable initial array dcl 306 in procedure "receive_data" set ref 306* 306* 306* 306* 306* 338 packet 012560 automatic label variable initial array dcl 472 in procedure "receive_filename" set ref 472* 472* 472* 472* 472* 472* 499 packet 024574 automatic label variable initial array dcl 785 in procedure "receive_file_abort" set ref 785* 785* 785* 785* 785* 817 packet 017624 automatic label variable initial array dcl 648 in procedure "receive_init" set ref 648* 648* 648* 674 packet_chars 74 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1131 in procedure "store_data" set ref 1157* 1157 packet_chars 74 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1187* packet_count 75 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1188* packet_count 75 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1131 in procedure "store_data" set ref 1156* 1156 packet_n 024714 automatic fixed bin(17,0) dcl 1221 in procedure "verify_receipt" set ref 1250* 1256* packet_n 012625 automatic fixed bin(17,0) dcl 629 in procedure "receive_init" set ref 669* 678 packet_n 000443 automatic fixed bin(17,0) dcl 291 in procedure "receive_data" set ref 331* 341 343* 364* 371 packet_n 005512 automatic fixed bin(17,0) dcl 452 in procedure "receive_filename" set ref 492* 502 554 562* 569* 574 packet_n parameter fixed bin(17,0) dcl 1085 in procedure "check_lost_packet" set ref 1067 1095 1096 1096* 1098 packet_n 017661 automatic fixed bin(17,0) dcl 770 in procedure "receive_file_abort" set ref 810* 821 824 825* 850* 856 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 780 in procedure "receive_file_abort" set ref 826* 826 882* 882 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 643 in procedure "receive_init" set ref 718* 718 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 301 in procedure "receive_data" set ref 401* 401 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 464 in procedure "receive_filename" set ref 550* 550 592* 592 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1091 in procedure "check_lost_packet" set ref 1104* 1104 packet_retries 76 based fixed bin(21,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1189* packet_size 024715 automatic fixed bin(21,0) dcl 1222 in procedure "verify_receipt" set ref 1254* 1256* packet_size 005513 automatic fixed bin(21,0) dcl 453 in procedure "receive_filename" set ref 492* 509* 562* 577* 589* packet_size parameter fixed bin(21,0) dcl 1126 in procedure "store_data" ref 1108 1157 packet_size 000444 automatic fixed bin(21,0) dcl 292 in procedure "receive_data" set ref 355* 382* 398* packet_size 012626 automatic fixed bin(21,0) dcl 630 in procedure "receive_init" set ref 669* 690* 715* packet_size 017662 automatic fixed bin(21,0) dcl 771 in procedure "receive_file_abort" set ref 825* 836* 862* 879* packet_timeout 024717 automatic fixed bin(8,0) packed unaligned dcl 1224 set ref 1243* 1245 1245 packet_type 017663 automatic char(1) packed unaligned dcl 772 in procedure "receive_file_abort" set ref 810* 816 packet_type 000445 automatic char(1) packed unaligned dcl 293 in procedure "receive_data" set ref 331* 337 packet_type 005514 automatic char(1) packed unaligned dcl 454 in procedure "receive_filename" set ref 492* 498 packet_type 024716 automatic char(1) packed unaligned dcl 1223 in procedure "verify_receipt" set ref 1247* 1250* 1253 1255* 1256* packet_type 012627 automatic char(1) packed unaligned dcl 631 in procedure "receive_init" set ref 669* 673 path based structure level 1 dcl 913 in procedure "update_log" path based structure level 1 dcl 466 in procedure "receive_filename" path 000106 automatic structure level 1 dcl 68 in procedure "kermit_receive_" set ref 174 pathname 1 based structure array level 2 dcl 5-66 pathname_ 000054 constant entry external dcl 125 ref 921 1024 r_packet_size 017664 automatic fixed bin(21,0) dcl 773 in procedure "receive_file_abort" set ref 810* r_packet_size 000446 automatic fixed bin(21,0) dcl 294 in procedure "receive_data" set ref 331* 347* r_packet_size 024720 automatic fixed bin(21,0) dcl 1225 in procedure "verify_receipt" set ref 1250* rec_filename 005515 automatic char(168) packed unaligned dcl 455 set ref 518* 523* 525* 525 528* receive_file_modes 000170 automatic fixed bin(8,0) array packed unaligned dcl 71 set ref 192 192 194 195 196 receive_file_select 000171 automatic fixed bin(17,0) array dcl 72 set ref 188* 189* 190* 192* receive_state 000360 automatic label variable initial array dcl 82 set ref 82* 82* 82* 82* 82* 82* 223 record_quota_overflow 000416 stack reference condition dcl 102 ref 206 remote_data 017665 automatic char(10000) packed unaligned dcl 774 in procedure "receive_file_abort" set ref 797 875 remote_data 012630 automatic char(10000) packed unaligned dcl 632 in procedure "receive_init" set ref 657 711 remote_data 024721 automatic char(10000) packed unaligned dcl 1226 in procedure "verify_receipt" set ref 1248 remote_data 005567 automatic char(10000) packed unaligned dcl 456 in procedure "receive_filename" set ref 480 523 585 remote_data 000447 automatic char(10000) packed unaligned dcl 295 in procedure "receive_data" set ref 319 347* 377 394 remote_datap 024572 automatic pointer dcl 775 in procedure "receive_file_abort" set ref 797* 810* remote_datap 012474 automatic pointer dcl 457 in procedure "receive_filename" set ref 480* 492* remote_datap 005354 automatic pointer dcl 296 in procedure "receive_data" set ref 319* 331* remote_datap 017534 automatic pointer dcl 633 in procedure "receive_init" set ref 657* 669* 685* 697* remote_datap 031626 automatic pointer dcl 1227 in procedure "verify_receipt" set ref 1248* 1250* 1256* retry_count based fixed bin(21,0) level 2 in structure "kti" dcl 465 in procedure "receive_filename" set ref 481* 481 484 511* retry_count 000332 automatic fixed bin(21,0) level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 175* retry_count based fixed bin(21,0) level 2 in structure "kti" dcl 644 in procedure "receive_init" set ref 658* 658 661 704* retry_count based fixed bin(21,0) level 2 in structure "kti" dcl 781 in procedure "receive_file_abort" set ref 799* 799 802 837* 866* retry_count based fixed bin(21,0) level 2 in structure "kti" dcl 302 in procedure "receive_data" set ref 320* 320 323 357* 385* retry_threshold 1 based fixed bin(8,0) level 2 in structure "kti" packed packed unaligned dcl 781 in procedure "receive_file_abort" ref 802 retry_threshold 1 based fixed bin(8,0) level 2 in structure "kti" packed packed unaligned dcl 644 in procedure "receive_init" ref 661 retry_threshold 1 based fixed bin(8,0) level 2 in structure "kti" packed packed unaligned dcl 302 in procedure "receive_data" ref 323 retry_threshold 1 based fixed bin(8,0) level 2 in structure "kti" packed packed unaligned dcl 465 in procedure "receive_filename" ref 484 retry_threshold 1 000332 automatic fixed bin(8,0) level 2 in structure "kti" packed packed unaligned dcl 78 in procedure "kermit_receive_" set ref 194* rtrim builtin function dcl 98 ref 525 525 921 921 921 921 989 995 995 995 995 998 998 998 998 sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 1092 in procedure "check_lost_packet" set ref 1095 1101* sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 465 in procedure "receive_filename" set ref 485* 502 509* 512* 512 554 574 577* 589* sequence_n 2 000332 automatic fixed bin(17,0) level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 176* 210* sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 781 in procedure "receive_file_abort" set ref 803* 821 824 836* 838* 838 844* 856 862* 867* 867 879* sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 302 in procedure "receive_data" set ref 324* 341 355* 358* 358 371 382* 386* 386 398* sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 1232 in procedure "verify_receipt" set ref 1254* sequence_n 2 based fixed bin(17,0) level 2 in structure "kti" dcl 644 in procedure "receive_init" set ref 662* 678 690* 705* 705 715* source_dir 012476 automatic char(168) packed unaligned dcl 458 in procedure "receive_filename" set ref 528* 531 source_dir parameter char(168) packed unaligned dcl 957 in procedure "find_file" set ref 937 976* 981* 995 995 998 998 1024* source_ename 012550 automatic char(32) packed unaligned dcl 459 in procedure "receive_filename" set ref 528* 532 source_ename parameter char(32) packed unaligned dcl 958 in procedure "find_file" set ref 937 977* 981* 984 1003* 1023* 1024* start_time 100 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 1179 in procedure "init_file_stats" set ref 1190* start_time 100 based fixed bin(71,0) level 2 in structure "kermit_stats" dcl 464 in procedure "receive_filename" set ref 533* 537 state parameter fixed bin(17,0) dcl 759 in procedure "receive_file_abort" set ref 723 805* 846* 868* 876* state 000174 automatic fixed bin(17,0) dcl 73 in procedure "kermit_receive_" set ref 217* 223 225* 229* 232* 236* state parameter fixed bin(17,0) dcl 434 in procedure "receive_filename" set ref 406 487* 538* 546* 580* 586* state parameter fixed bin(17,0) dcl 620 in procedure "receive_init" set ref 597 664* 706* 712* state parameter fixed bin(17,0) dcl 280 in procedure "receive_data" set ref 257 326* 359* 387* 395* statisticsp 20 based pointer level 2 in structure "kti" dcl 1180 in procedure "init_file_stats" ref 1184 1185 1186 1187 1188 1189 1190 1191 1192 statisticsp 20 based pointer level 2 in structure "kti" dcl 644 in procedure "receive_init" ref 663 709 711 718 718 statisticsp 20 based pointer level 2 in structure "kti" dcl 917 in procedure "update_log" set ref 920 920 921 922* 924 925 statisticsp 20 based pointer level 2 in structure "kti" dcl 302 in procedure "receive_data" ref 325 349 377 383 392 394 401 401 statisticsp 20 000332 automatic pointer level 2 in structure "kti" dcl 78 in procedure "kermit_receive_" set ref 166* 183* statisticsp 20 based pointer level 2 in structure "kti" dcl 781 in procedure "receive_file_abort" ref 804 826 826 864 873 875 882 882 statisticsp 20 based pointer level 2 in structure "kti" dcl 465 in procedure "receive_filename" ref 486 516 533 536 537 537 550 550 583 585 592 592 statisticsp 20 based pointer level 2 in structure "kti" dcl 1092 in procedure "check_lost_packet" ref 1104 1104 statisticsp 20 based pointer level 2 in structure "kti" dcl 1132 in procedure "store_data" ref 1145 1145 1155 1155 1156 1156 1157 1157 status 10 based fixed bin(35,0) level 2 in structure "kermit_stats" dcl 780 in procedure "receive_file_abort" set ref 804* 873* status 10 based fixed bin(35,0) level 2 in structure "kermit_stats" dcl 464 in procedure "receive_filename" set ref 486* 516* 536* 583* status 10 based fixed bin(35,0) level 2 in structure "kermit_stats" dcl 916 in procedure "update_log" ref 924 925 status 10 based fixed bin(35,0) level 2 in structure "kermit_stats" dcl 301 in procedure "receive_data" set ref 325* 349* 377* 392* status 10 000176 automatic fixed bin(35,0) level 2 in structure "kermit_stats" dcl 77 in procedure "kermit_receive_" set ref 243 status 10 based fixed bin(35,0) level 2 in structure "kermit_stats" dcl 643 in procedure "receive_init" set ref 663* 709* substr builtin function dcl 98 ref 377 394 523 585 711 875 1149 suffixed_filename 024646 automatic char(32) packed unaligned dcl 968 set ref 984* 989 995 995 998 998 1003* 1023 suffixed_name_$make 000056 constant entry external dcl 126 ref 1003 timeout_select 031630 automatic fixed bin(17,0) array dcl 1228 set ref 1242* 1245* unique_chars_ 000060 constant entry external dcl 128 ref 1024 user_file_sw parameter bit(1) packed unaligned dcl 435 set ref 406 517 519* user_filename parameter char packed unaligned dcl 436 ref 406 518 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Capabilities internal static fixed bin(17,0) initial dcl 4-46 Check_type internal static fixed bin(17,0) initial dcl 4-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array packed unaligned dcl 1-33 Data_packet internal static char(1) initial packed unaligned dcl 5-85 Direct_input internal static fixed bin(17,0) initial dcl 6-15 Direct_output internal static fixed bin(17,0) initial dcl 6-15 Direct_update internal static fixed bin(17,0) initial dcl 6-15 E_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Eight_bit_char internal static fixed bin(17,0) initial dcl 4-33 Eof_packet internal static char(1) initial packed unaligned dcl 5-91 Eol_char internal static fixed bin(17,0) initial dcl 4-31 Ext_Headers internal static bit(9) initial packed unaligned dcl 4-120 File_header_packet internal static char(1) initial packed unaligned dcl 5-90 File_type internal static fixed bin(17,0) initial dcl 4-40 G_capabilities internal static fixed bin(17,0) initial dcl 4-93 G_check_type internal static fixed bin(17,0) initial dcl 4-86 G_eight_bit_char internal static fixed bin(17,0) initial dcl 4-83 G_parity internal static fixed bin(17,0) initial dcl 4-87 G_repeat_char internal static fixed bin(17,0) initial dcl 4-84 G_start_char internal static fixed bin(17,0) initial dcl 4-85 G_window internal static fixed bin(17,0) initial dcl 4-88 I_eol_char internal static fixed bin(17,0) initial dcl 4-75 I_max_lenx1 internal static fixed bin(17,0) initial dcl 4-89 I_max_lenx2 internal static fixed bin(17,0) initial dcl 4-90 I_maxl internal static fixed bin(17,0) initial dcl 4-71 I_n_pads internal static fixed bin(17,0) initial dcl 4-73 I_pad_char internal static fixed bin(17,0) initial dcl 4-74 I_quote_char internal static fixed bin(17,0) initial dcl 4-76 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 6-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 6-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 6-15 Line_byte_size internal static fixed bin(17,0) initial dcl 4-42 M_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Max_len_ext_1 internal static fixed bin(17,0) initial dcl 4-44 Max_len_ext_2 internal static fixed bin(17,0) initial dcl 4-45 Maxl internal static fixed bin(17,0) initial dcl 4-27 N_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 N_pads internal static fixed bin(17,0) initial dcl 4-29 O_eol_char internal static fixed bin(17,0) initial dcl 4-81 O_max_lenx1 internal static fixed bin(17,0) initial dcl 4-91 O_max_lenx2 internal static fixed bin(17,0) initial dcl 4-92 O_maxl internal static fixed bin(17,0) initial dcl 4-77 O_n_pads internal static fixed bin(17,0) initial dcl 4-79 O_pad_char internal static fixed bin(17,0) initial dcl 4-80 O_quote_char internal static fixed bin(17,0) initial dcl 4-82 O_timeout internal static fixed bin(17,0) initial dcl 4-78 Pad_char internal static fixed bin(17,0) initial dcl 4-30 Parity internal static fixed bin(17,0) initial dcl 4-37 Perm_defaults internal static structure level 1 dcl 4-48 Quote_char internal static fixed bin(17,0) initial dcl 4-32 REW_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 RE_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 RW_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 R_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Rec_init internal static fixed bin(17,0) initial dcl 5-106 Repeat_char internal static fixed bin(17,0) initial dcl 4-34 Reserved_packet internal static char(1) initial packed unaligned dcl 5-93 Retrieve_all internal static fixed bin(17,0) initial array dcl 4-25 SA_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array packed unaligned dcl 1-30 SMA_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 SM_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 S_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Send_abort internal static fixed bin(17,0) initial dcl 5-118 Send_break internal static fixed bin(17,0) initial dcl 5-117 Send_complete internal static fixed bin(17,0) initial dcl 5-119 Send_data internal static fixed bin(17,0) initial dcl 5-115 Send_eof internal static fixed bin(17,0) initial dcl 5-116 Send_file_header internal static fixed bin(17,0) initial dcl 5-114 Send_init internal static fixed bin(17,0) initial dcl 5-113 Send_init_packet internal static char(1) initial packed unaligned dcl 5-88 Sequential_input internal static fixed bin(17,0) initial dcl 6-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 6-15 Sequential_output internal static fixed bin(17,0) initial dcl 6-15 Sequential_update internal static fixed bin(17,0) initial dcl 6-15 Start_char internal static fixed bin(17,0) initial dcl 4-35 Store_all internal static fixed bin(17,0) initial array dcl 4-24 Stream_input internal static fixed bin(17,0) initial dcl 6-15 Stream_input_output internal static fixed bin(17,0) initial dcl 6-15 Temp_defaults internal static structure level 1 dcl 4-95 Timeout internal static fixed bin(17,0) initial dcl 4-28 W_ACCESS internal static bit(3) initial packed unaligned dcl 1-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 Window_size internal static fixed bin(17,0) initial dcl 4-43 iox_modes internal static char(24) initial array dcl 6-6 kermit_comm_info based structure level 1 dcl 3-176 kermit_comm_info_version internal static char(8) initial packed unaligned dcl 3-206 kermit_comm_infop automatic pointer dcl 3-205 kermit_comm_mgr_$flush_input 000000 constant entry external dcl 2-15 kermit_fixed_constants based structure level 1 packed packed unaligned dcl 3-35 kermit_get_filenames_ 000000 constant entry external dcl 2-30 kermit_info based structure level 1 dcl 3-52 kermit_info_version internal static char(8) initial packed unaligned dcl 3-61 kermit_infop automatic pointer dcl 3-60 kermit_log_info based structure level 1 dcl 3-122 kermit_log_info_version internal static char(8) initial packed unaligned dcl 3-133 kermit_log_infop automatic pointer dcl 3-132 kermit_log_mgr_$close_log 000000 constant entry external dcl 2-37 kermit_log_mgr_$disable 000000 constant entry external dcl 2-42 kermit_log_mgr_$display_stats 000000 constant entry external dcl 2-46 kermit_log_mgr_$enable 000000 constant entry external dcl 2-51 kermit_log_mgr_$open_log 000000 constant entry external dcl 2-60 kermit_log_mgr_$start 000000 constant entry external dcl 2-66 kermit_log_mgr_$stop 000000 constant entry external dcl 2-70 kermit_mode_mgr_$get 000000 constant entry external dcl 2-74 kermit_mode_mgr_$set 000000 constant entry external dcl 2-86 kermit_perm_mode_count internal static fixed bin(17,0) initial dcl 3-83 kermit_perm_modes based structure level 1 dcl 3-77 kermit_perm_modes_version internal static char(8) initial packed unaligned dcl 3-84 kermit_perm_modesp automatic pointer dcl 3-82 kermit_receive_$receive_from_remote 000000 constant entry external dcl 2-118 kermit_send_$send_to_remote 000000 constant entry external dcl 2-128 kermit_server_ 000000 constant entry external dcl 2-138 kermit_stats_infop automatic pointer dcl 3-160 kermit_temp_mode_count internal static fixed bin(17,0) initial dcl 3-105 kermit_temp_modes based structure level 1 dcl 3-99 kermit_temp_modes_version internal static char(8) initial packed unaligned dcl 3-106 kermit_temp_modesp automatic pointer dcl 3-104 kermit_transfer_info_version internal static char(9) initial packed unaligned dcl 5-48 kermit_xfer_modes_$init 000000 constant entry external dcl 2-152 short_iox_modes internal static char(4) initial array dcl 6-12 terminate_file_ 000000 constant entry external dcl 127 transfer_infop automatic pointer dcl 5-47 NAMES DECLARED BY EXPLICIT CONTEXT. Break 002153 constant label dcl 574 ref 472 Data 001036 constant label dcl 341 in procedure "receive_data" ref 306 Data 003123 constant label dcl 821 in procedure "receive_file_abort" ref 785 Eof 002137 constant label dcl 569 in procedure "receive_filename" ref 472 Eof 001222 constant label dcl 371 in procedure "receive_data" ref 306 Eof 003326 constant label dcl 856 in procedure "receive_file_abort" ref 785 Error 003432 constant label dcl 873 in procedure "receive_file_abort" ref 785 Error 001334 constant label dcl 392 in procedure "receive_data" ref 306 Error 002226 constant label dcl 583 in procedure "receive_filename" ref 472 Error 002652 constant label dcl 709 in procedure "receive_init" ref 648 File_header 003312 constant label dcl 850 in procedure "receive_file_abort" ref 785 File_header 001616 constant label dcl 502 in procedure "receive_filename" ref 472 File_header 001206 constant label dcl 364 in procedure "receive_data" ref 306 Other 003450 constant label dcl 879 in procedure "receive_file_abort" ref 785 Other 001352 constant label dcl 398 in procedure "receive_data" ref 306 Other 002244 constant label dcl 589 in procedure "receive_filename" ref 472 Other 002670 constant label dcl 715 in procedure "receive_init" ref 648 Rec_Abort 000611 constant label dcl 240 ref 82 Rec_Complete 000636 constant label dcl 246 ref 82 212 Rec_Data 000551 constant label dcl 232 ref 82 Rec_File 000514 constant label dcl 229 ref 82 Rec_File_Abort 000571 constant label dcl 236 ref 82 Rec_Init 000500 constant label dcl 225 ref 82 Retry_packet 002670 constant label dcl 715 in procedure "receive_init" ref 671 678 683 686 692 698 Retry_packet 001352 constant label dcl 398 in procedure "receive_data" set ref 334 371 Retry_packet 002244 constant label dcl 589 in procedure "receive_filename" ref 495 502 506 554 561 574 Retry_packet 003450 constant label dcl 879 in procedure "receive_file_abort" ref 813 824 856 Send_init 002046 constant label dcl 550 in procedure "receive_filename" ref 472 Send_init 002463 constant label dcl 678 in procedure "receive_init" ref 648 check_lost_packet 004670 constant entry internal dcl 1067 ref 343 364 569 850 exit_state 000642 constant label dcl 250 ref 227 231 234 238 find_file 003674 constant entry internal dcl 937 ref 528 init_file_stats 005147 constant entry internal dcl 1161 ref 186 932 kermit_receive_ 000150 constant entry external dcl 22 receive_data 000643 constant entry internal dcl 257 ref 232 receive_file_abort 002731 constant entry internal dcl 723 ref 236 receive_filename 001413 constant entry internal dcl 406 ref 229 receive_from_remote 000165 constant entry external dcl 145 receive_init 002305 constant entry internal dcl 597 ref 225 store_data 005014 constant entry internal dcl 1108 ref 347 terminate_file 004532 constant entry internal dcl 1032 ref 203 209 926 update_log 003511 constant entry internal dcl 887 ref 244 384 865 verify_receipt 005173 constant entry internal dcl 1197 ref 579 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 6030 6136 5401 6040 Length 6536 5401 106 363 427 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME kermit_receive_ 13793 external procedure is an external procedure. on unit on line 201 74 on unit on unit on line 206 98 on unit receive_data internal procedure shares stack frame of external procedure kermit_receive_. receive_filename internal procedure shares stack frame of external procedure kermit_receive_. receive_init internal procedure shares stack frame of external procedure kermit_receive_. receive_file_abort internal procedure shares stack frame of external procedure kermit_receive_. update_log internal procedure shares stack frame of external procedure kermit_receive_. find_file internal procedure shares stack frame of external procedure kermit_receive_. terminate_file 98 internal procedure is called by several nonquick procedures. check_lost_packet internal procedure shares stack frame of external procedure kermit_receive_. store_data internal procedure shares stack frame of external procedure kermit_receive_. init_file_stats internal procedure shares stack frame of external procedure kermit_receive_. verify_receipt internal procedure shares stack frame of external procedure kermit_receive_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 last_lost_packet check_lost_packet STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME kermit_receive_ 000100 abnormal_termination kermit_receive_ 000101 abort_sent kermit_receive_ 000102 discard_sw kermit_receive_ 000103 fw_sw kermit_receive_ 000104 ktip kermit_receive_ 000106 path kermit_receive_ 000170 receive_file_modes kermit_receive_ 000171 receive_file_select kermit_receive_ 000174 state kermit_receive_ 000176 kermit_stats kermit_receive_ 000332 kti kermit_receive_ 000360 receive_state kermit_receive_ 000434 abort_char receive_data 000435 abort_char_lth receive_data 000436 chars_received receive_data 000437 chars_sent receive_data 000440 ec receive_data 000441 eol_split receive_data 000442 idx receive_data 000443 packet_n receive_data 000444 packet_size receive_data 000445 packet_type receive_data 000446 r_packet_size receive_data 000447 remote_data receive_data 005354 remote_datap receive_data 005356 packet receive_data 005412 ack_init_data receive_filename 005442 ack_init_data_lth receive_filename 005444 ack_init_datap receive_filename 005446 ack_init_packet receive_filename 005476 ack_init_packet_lth receive_filename 005500 ack_init_packetp receive_filename 005502 chars_received receive_filename 005503 chars_sent receive_filename 005504 ec receive_filename 005505 eol_split receive_filename 005506 idx receive_filename 005510 file_ptr receive_filename 005512 packet_n receive_filename 005513 packet_size receive_filename 005514 packet_type receive_filename 005515 rec_filename receive_filename 005567 remote_data receive_filename 012474 remote_datap receive_filename 012476 source_dir receive_filename 012550 source_ename receive_filename 012560 packet receive_filename 012620 chars_received receive_init 012621 chars_sent receive_init 012622 ec receive_init 012623 eol_split receive_init 012624 idx receive_init 012625 packet_n receive_init 012626 packet_size receive_init 012627 packet_type receive_init 012630 remote_data receive_init 017534 remote_datap receive_init 017536 ack_init_data receive_init 017566 ack_init_datap receive_init 017570 ack_init_data_lth receive_init 017571 ack_init_packet receive_init 017621 ack_init_packet_lth receive_init 017622 ack_init_packetp receive_init 017624 packet receive_init 017650 abort_char receive_file_abort 017652 abort_charp receive_file_abort 017654 chars_received receive_file_abort 017655 chars_sent receive_file_abort 017656 ec receive_file_abort 017657 eol_split receive_file_abort 017660 idx receive_file_abort 017661 packet_n receive_file_abort 017662 packet_size receive_file_abort 017663 packet_type receive_file_abort 017664 r_packet_size receive_file_abort 017665 remote_data receive_file_abort 024572 remote_datap receive_file_abort 024574 packet receive_file_abort 024630 abnormal_termination update_log 024640 abs_max_suffix find_file 024641 bit_count find_file 024642 file_suffix find_file 024643 max_suffix_lth find_file 024644 max_suffix find_file 024645 name_dup find_file 024646 suffixed_filename find_file 024710 chars_received verify_receipt 024711 chars_sent verify_receipt 024712 ec verify_receipt 024713 eol_split verify_receipt 024714 packet_n verify_receipt 024715 packet_size verify_receipt 024716 packet_type verify_receipt 024717 packet_timeout verify_receipt 024720 r_packet_size verify_receipt 024721 remote_data verify_receipt 031626 remote_datap verify_receipt 031630 timeout_select verify_receipt THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. fx1_to_fl2 r_e_as r_ne_as alloc_char_temp call_ext_out_desc call_ext_out call_int_this call_int_other return_mac fl2_to_fx1 tra_ext_1 tra_ext_2 mdfx1 enable_op shorten_stack ext_entry ext_entry_desc int_entry real_to_real_round_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ decimal_exp_ delete_$path expand_pathname_ hcs_$status_minf iox_$attach_name iox_$close iox_$detach_iocb iox_$open iox_$put_chars kermit_comm_mgr_$reset_line_modes kermit_comm_mgr_$set_line_modes kermit_log_mgr_$log_message kermit_mode_mgr_$retrieve kermit_mode_mgr_$store kermit_pad_$receive kermit_pad_$send kermit_xfer_modes_$check_params kermit_xfer_modes_$get_local_params kermit_xfer_modes_$process_params pathname_ suffixed_name_$make unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$rqover kermit_et_$fatal_error kermit_et_$no_file_abort kermit_et_$no_initialization kermit_et_$no_rename kermit_et_$remote_file_abort kermit_et_$too_many_retries LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 82 000077 22 000147 47 000156 145 000157 165 000201 166 000203 169 000205 170 000210 172 000224 174 000227 175 000231 176 000232 177 000234 178 000235 179 000237 180 000240 181 000241 182 000243 183 000244 185 000246 186 000251 188 000253 189 000255 190 000257 192 000261 194 000314 195 000317 196 000326 201 000335 202 000351 203 000354 204 000367 206 000370 208 000404 209 000407 210 000422 211 000456 212 000463 215 000466 216 000467 217 000471 221 000473 223 000474 225 000500 227 000513 229 000514 231 000550 232 000551 234 000570 236 000571 238 000610 240 000611 243 000621 244 000624 246 000636 248 000641 253 000642 257 000643 306 000645 316 000705 317 000706 318 000713 319 000714 320 000716 323 000720 324 000725 325 000757 326 000766 327 000770 331 000771 334 001020 337 001022 338 001033 341 001036 343 001044 344 001056 347 001057 348 001114 349 001116 350 001123 351 001125 352 001127 355 001133 357 001165 358 001170 359 001176 360 001205 364 001206 367 001221 371 001222 376 001230 377 001232 382 001242 383 001272 384 001305 385 001320 386 001323 387 001331 388 001333 392 001334 394 001343 395 001347 396 001351 398 001352 401 001405 402 001412 406 001413 472 001424 479 001472 480 001473 481 001475 484 001500 485 001505 486 001537 487 001546 488 001550 492 001551 495 001600 498 001602 499 001613 502 001616 506 001624 509 001626 511 001656 512 001661 515 001667 516 001673 517 001675 518 001702 519 001707 520 001712 523 001713 525 001717 528 001745 530 002000 531 002005 532 002013 533 002016 535 002026 536 002030 537 002035 538 002037 539 002041 546 002042 547 002045 550 002046 554 002053 555 002061 556 002063 557 002065 561 002106 562 002110 566 002136 569 002137 572 002152 574 002153 577 002161 579 002211 580 002222 581 002225 583 002226 585 002235 586 002241 587 002243 589 002244 592 002277 593 002304 597 002305 648 002307 654 002333 655 002334 656 002336 657 002340 658 002342 661 002345 662 002352 663 002404 664 002413 665 002415 669 002416 671 002445 673 002447 674 002460 678 002463 682 002471 683 002512 685 002514 686 002534 690 002536 692 002566 697 002570 698 002610 701 002612 702 002624 704 002636 705 002641 706 002647 707 002651 709 002652 711 002661 712 002665 713 002667 715 002670 718 002723 719 002730 723 002731 785 002733 794 002773 795 002774 796 002776 797 003000 799 003002 802 003005 803 003012 804 003044 805 003053 806 003055 810 003056 813 003105 816 003107 817 003120 821 003123 824 003131 825 003137 826 003166 827 003173 828 003177 835 003200 836 003206 837 003235 838 003240 839 003246 840 003252 843 003253 844 003254 846 003306 847 003311 850 003312 853 003325 856 003326 862 003334 863 003364 864 003371 865 003403 866 003416 867 003421 868 003427 869 003431 873 003432 875 003441 876 003445 877 003447 879 003450 882 003503 883 003510 887 003511 920 003513 921 003520 922 003611 924 003623 925 003632 926 003635 928 003647 930 003654 932 003665 934 003673 937 003674 975 003705 976 003707 977 003713 978 003717 979 003721 981 003723 982 003751 984 003755 988 003761 989 004005 991 004023 993 004064 995 004075 996 004177 998 004203 1002 004276 1003 004277 1004 004353 1005 004357 1006 004362 1009 004363 1010 004364 1013 004365 1015 004367 1016 004371 1017 004375 1023 004376 1024 004403 1027 004510 1029 004530 1032 004531 1054 004537 1055 004546 1056 004560 1057 004576 1062 004662 1064 004667 1067 004670 1095 004672 1096 004703 1098 004743 1099 004747 1101 004750 1102 005003 1104 005006 1105 005013 1108 005014 1134 005025 1137 005027 1142 005043 1144 005050 1145 005071 1146 005076 1149 005100 1151 005106 1152 005112 1154 005114 1155 005135 1156 005143 1157 005144 1158 005146 1161 005147 1184 005151 1185 005157 1186 005160 1187 005161 1188 005162 1189 005163 1190 005164 1191 005166 1192 005167 1194 005172 1197 005173 1242 005175 1243 005177 1245 005201 1247 005233 1248 005235 1250 005237 1253 005267 1254 005274 1255 005327 1256 005331 1258 005361 1259 005362 ----------------------------------------------------------- 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