Date: Thu, 19 Jul 90 21:02:06 -0400 From: wbader@scarecrow.csee.lehigh.edu (William Bader) To: fdc@watsun.cc.columbia.edu Subject: Re: C-Kermit Here are my notes and some diff listings for building ckermit 5A under VMS. Unfortunately, I can't spend much more time on it other than just this afternoon. When a new version of kermit is ready, would it be possible to post 'patch' format diff listings from some base version (like the one I spent all last night downloading at 1200 baud)??? I would like to keep current, but I will get too many people mad at me if I download the entire kermit source on a regular basis. William Bader ---------------------------------------------------------------------- Difference listing for building ckermit 5a under VAX/VMS (Tested under VMS 4.5/VAXC 2.4 and VMS 4.1/VAXC 2.1) Notes (everything refers to VMS unless otherwise noted): "set file collision overwrite" should probably be the default for VMS. The variable bigsbsiz that "show parameters" shows as "send buffer size" gets corrupted, whick can make kermit crash in makebuf() in ckcfn3.c. Setting multiple windows sometimes makes this happen. Connecting seems to work. Sending to MSKermit 3.0 works for small packets with 1 window. Large packets or multiple windows crashes ckermit (probably due to a bad bigsbsiz) or gets a "resend error number 52". [Sending from Xenix ckermit 5A to MSKermit with multiple windows gets a "resend error number 19", so this is not entirely something VMS specific.] Sending from MSKermit 3.0 sometimes crashes ckermit with a data overrun error. ckermit should probably ignore this particular error and treat it as a bad packet. At a 1200 baud, I could send files, but sometimes the last line would be missing. (This happened consistently with ckvker.com.) I tried turning on logging and comparing the logs with Xenix ckermit, but the logs where different, even for successful transfers, and I couldn't figure out why. ------------------------------ diff -h ../ckuus5.c ckuus5.c 683a684,685 > if (exitstat == 0 || exitstat == 0x2C /* || other values ??? */) > exitstat |= 0x10000000; /* avoid displaying error message */ ------------------------------ diff -h ../ckvfio.c ckvfio.c 11a12,27 > #ifdef VMS_V40 > #define OLD_VMS > #endif > #ifdef VMS_V42 > #define OLD_VMS > #endif > #ifdef VMS_V44 > #define OLD_VMS > #endif > #ifdef VAXC023 > #define OLD_VMS > #endif > #ifdef VAXC024 > #define OLD_VMS > #endif > 864c880,885 < #ifdef VMS_V40 | VMS_V42 | VMS_V44 --- > #ifdef OLD_VMS /* was VMS_V40 | VMS_V42 | VMS_V44 */ > > /* **** NOTE **** my old version of VAXC treated this as "#ifdef VMS_V40" > **** and silently ignored the "| VMS_V42 | VMS_V44" > **** */ > 897c918 < &buflen,/* length addr */ --- > &buf_len,/* length addr */ 1073c1094 < #ifdef VAXC023 --- > #ifdef OLD_VMS /* was VAXC023 */ 1307c1328,1331 < zkermini(char *s, int s_len, char *def) --- > zkermini(s, s_len, def) /* This declaration used ANSI syntax */ > char *s; > int s_len; > char *def; 1536c1560,1564 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1541c1569,1573 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1546c1578,1582 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1551c1587,1591 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1556c1596,1600 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1561c1605,1609 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1566c1614,1618 < &((char *)0), --- > #ifdef OLD_VMS > &((long)0), > #else > &((char *)0), > #endif 1998a2051,$ > /* Zstrip copied from ckufio.c, added tests for : and ] */ > > /* Z S T R I P -- Strip device & directory name from file specification */ > > /* Strip pathname from filename "name", return pointer to result in name2 */ > > char work[100]; /* buffer for use by zstrip and zltor */ > > zstrip(name,name2) char *name, **name2; { > char *cp, *pp; > debug(F110,"zstrip before",name,0); > pp = work; > #ifdef DTILDE > if (*name == '~') name++; > #endif > for (cp = name; *cp != '\0'; cp++) { > if (*cp == '/' || *cp == ':' || *cp == ']') > pp = work; > else > *pp++ = *cp; > } > *pp = '\0'; /* Terminate the string */ > *name2 = work; > debug(F110,"zstrip after",*name2,0); > } > > > #ifdef OLD_VMS > > static descname(desc, name) > struct dsc$descriptor_s *desc; > char *name; { > desc->dsc$w_length = strlen(name); /* length of name (w/o null) */ > desc->dsc$a_pointer = name; /* address */ > desc->dsc$b_class = DSC$K_CLASS_S; /* string descriptor class */ > desc->dsc$b_dtype = DSC$K_DTYPE_T; /* ascii string data type */ > } > > /* VMS version of rename */ > > rename(oldname, newname) > char oldname[], newname[]; { > struct dsc$descriptor_s old_desc, new_desc; > int lib$rename_file(); > > /* build string descriptors */ > > descname(&old_desc, oldname); > descname(&new_desc, newname); > > /* call lib$rename_file routine */ > > return(lib$rename_file(&old_desc, &new_desc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); > } > > #endif > ------------------------------ diff -h ../ckvtio.c ckvtio.c 10a11,26 > #ifdef VMS_V40 > #define OLD_VMS > #endif > #ifdef VMS_V42 > #define OLD_VMS > #endif > #ifdef VMS_V44 > #define OLD_VMS > #endif > #ifdef VAXC023 > #define OLD_VMS > #endif > #ifdef VAXC024 > #define OLD_VMS > #endif > 133,134c149,155 < #include < #include --- > #ifndef VMS_V40 > #include > #define void int > #endif > #ifndef OLD_VMS > #include > #endif 141,142c162,163 < void dcl_exit_h(unsigned long int *); /* Exit handler */ < unsigned long int vms_assign_channel(char *); --- > void dcl_exit_h(); /* Exit handler */ > unsigned long int vms_assign_channel(); 162a184,186 > #ifndef TT$C_BAUD_38400 > #define TT$C_BAUD_38400 0x11 > #endif 252a277,284 > #ifndef DVI$_FULLDEVNAM > #define DVI$_FULLDEVNAM 232 > #endif > > #ifndef DVI$_STS > #define DVI$_STS 226 > #endif > 303c335,336 < void dcl_exit_h(unsigned long int *sts) --- > void dcl_exit_h(sts) > long int *sts; 568a602,604 > /* It looks like the cps argument is bps, not cps like .line, so ... */ > if (!ttspeeds[s].line) > for (s = 0; ttspeeds[s].line && (ttspeeds[s].line*10 != cps); s++) ; 677a714,717 > #ifndef IO$M_BREAKTHRU > #define IO$M_BREAKTHRU 0x0200 > #endif > 1296a1337,1340 > #ifndef SYI$_MAXBUF > #define SYI$_MAXBUF 4175 > #endif > ------------------------------ diff -h ../ckvker.com ckvker.com 5a6 > $ define = "define" 9c10 < $ def/nolog 'ckv_proc_loc' 'f$parse(tmp,,,"DEVICE")' + - --- > $ define/nolog 'ckv_proc_loc' 'f$parse(tmp,,,"DEVICE")' + - 77c78 < "/DEFINE=(""DEBUG"",""TLOG"",""''VAXC_VERSION'""""''VMS_VERSION'"")" --- > "/DEFINE=(""DEBUG"",""TLOG"",""''VAXC_VERSION'"",""''VMS_VERSION'"")" ------------------------------ Date: Fri, 20 Jul 90 14:14:29 EDT From: Frank da Cruz To: Mark Buda , William Bader Subject: C-Kermit/VMS results Here's a section on C-Kermit/VMS from the forthcoming edition of ckuker.upd. VAX/VMS Thanks to some changes sent in by William Bader, I was able (after adding zsyscmd() to ckvfio.c, exactly the same as zshcmd() for VMS) to successfully compile C-Kermit 5A for the first time on my MicroVAX with VMS 5.0 and VAX C 2.something (even though I still get linker errors about "system" and "rename" multiply defined). As Mark Buda pointed out when he sent in his last batch of changes on June 6th, the VMS support is far from ready, the CONNECT code needs to be worked over, and the RMS file support is not done. When edit 150 is executed on my VMS 5.0 system, many parts of it actually work: - Transfer of text files works in both directions with 1 window slot, using either short or long packets (I tested up to 1K packets), except that the last record of received files is not saved in the file (and if you send another file, then the last record of the previous file becomes the first record of the next file, and so on). - Character set translation works fine (e.g. sending CP850 German text from a PC to a Latin-1 file on the VAX). - Basic server mode works: GET, SEND, FINISH, BYE. - !, PUSH, and RUN seem to work OK (spawning DCL fork). - TAKE, DEFINE, macros, scripts, arithmetic, etc, all work. - OPEN WRITE, WRITE, CLOSE WRITE work. But, as you might expect, there are some rough spots: - If you send a file to VMS Kermit that has the same name as an existing file, VMS Kermit refuses to accept it: "Can't transform filename". This happens with the default SET FILE COLLISION BACKUP. SET FILE COLLISION OVERWRITE works just fine, and creates a new generation. I changed ckcmai.c to make this the default for VMS. - Sliding windows doesn't work when receiving files, VMS gets data overruns ("ttinl: sys$qiow(iosb) %SYSTEM-W-DATAOVERUN"). Sliding windows works fine for sending files. - The file size attribute is not sent. - The server crashes if you send it any REMOTE command that requires spawning a fork, like REMOTE DIRECTORY, REMOTE SPACE, etc. - Incompletely received files are kept, rather than deleted. - REMOTE commands sent to the VMS server seem to crash the program. - DIRECTORY doesn't work at all. - CD doesn't work at all, even though PWD works ok. - The TYPE command does not send CRLFs, only linefeeds, so text file lines come out in stairstep form. - Speed is reported in cps rather than bps, and percent efficiency calculations (STATUS command) are wrong by a factor of 10. - Filename completion works, but the display is wrong. For example, if you have a file OOFA.TXT and you type OOF, Kermit will fill in SK1:[DIRECTORYNAME]OOFA.TXT;1 after the "OOF". But it still finds the file and uses it correctly. - OPEN READ, READ, CLOSE READ don't work. - Exiting from the program always gives an error message %SYSTEM-F-ABORT. I didn't test any local-mode operations (SET LINE, DIAL, HANGUP, etc) -- I don't have an outgoing line from the VAX. - Frank ------------------------------ Date: Mon, 23 Jul 90 22:31:14 -0400 From: wbader@scarecrow.csee.lehigh.edu (William Bader) To: fdc@watsun.cc.columbia.edu Subject: Re: C-Kermit/VMS results The VMS terminal driver has a buffer with a size set according to the system parameter TTY_TYPAHDSZ. VMS CKermit uses the alternate buffer (set to TTY_ALTYPAHD), which is usually bigger. In any case, VMS will lose characters as the kermit packet size approaches the driver buffer size when flow control is turned off. It is possible to rebuild VMS with larger values for these parameters. I would recommend setting TT$M_NOBRDCST on the data line. Otherwise, broadcast messages (like when you get mail) could get mixed in with kermit data packets. (You can test this by putting kermit in server mode and sending yourself mail from another terminal.) I also noticed that some error messages (like the ones CHECK_ERR produces) that get sent to the terminal get sent to the other kermit when in server mode. There should probably be some test to do something different if the console line is the same as the data line. I added the IO$M_NOFILTR modifier to places where kermit reads from the data line. It disables ^R and a few other control codes, although setting TT2$M_PASTHRU might already have disables this feature. William Bader ckvtio.c -------- 533d532 < ttraw.basic |= TT$M_NOBRDCST; 776c775 < func = IO$_READVBLK | IO$M_NOFILTR; --- > func = IO$_READVBLK; 844c843 < func = IO$_READVBLK | IO$M_NOFILTR; --- > func = IO$_READVBLK; 1225c1224 < func = IO$_READVBLK | IO$M_NOFILTR; --- > func = IO$_READVBLK; ------------------------------ Date: Fri, 27 Jul 90 11:37 EDT From: KERMIT@res2.rd.ray.com Subject: First experiences with 5A(150) To: ckermit@watsun.cc.columbia.edu Frank: Some quick feedback on Ckermit 5A(150). I have done two builds: one on a plain-vanilla 4.3BSD Microvax II system, and the other on a VMS 5.2 Microvax 3600. The 4.3BSD build was done with "make bsd43", and was uneventful. No warnings or complaints whatsoever. This version has been tested only in the remote mode -- I used it to deliver the entire 5A(150) distribution to the local host here in Lexington. No problems noted. The wermit file is around 288 K with the stock compiler flags, vs. about 136 for 4F(095) optimized but without debugging. I'll try to run it against Kermit-MS for a check of sliding windows. We may also be able to contribute reports of the building process for Apollo systems, both Domain IX and SR-10. The VMS build was done with Version 3.0 VMS C running under VMS 5.2. Stock command file and compiler switches were used. Several information messages appeared: 1) The "OLD" C run-time library was selected 2) CKUUSR.C, line 2048, routine docmd, compiled without optimization 3) CKUUS3.C, line 1889, routine doprm, compiled without optimization Apparently, this compiler recognizes some kinds of potential problems for the optimizer, and will switch it off if necessary -- nice feature. Local mode for 5A(150) is definitely broken -- see transcripts below. We have one public outbound modem line [logical DIAL_LINE] which can be used by unprivileged users. Version 4F(095) seems to handle it properly, but 5A(150) provokes the 'ACCESS VIOLATION' message and a stack dump. Roger Wallace Raytheon Co. Research Div. Lexington, MA First transcipt: CKermit 5A(150)/VMS 5.2 Local-mode operation (Extra line- feeds added for readablility) The players: SYSTEM: VAX 8200 USER: KERMIT (My account as Kermit librarian) PROMPT: VX8200-KERMLIB-> LOCAL NET: 9600 BPS Serial Lines through MICOM Port Selector (LEXPS:) .............................................................................. VX8200-KERMLIB->ALLOCATE DIAL_LINE %DCL-I-ALLOC, _TXB15: allocated VX8200-KERMLIB->SET TERMINAL DIAL_LINE /SPEED=9600 VX8200-KERMLIB->RUN WERMIT C-Kermit S/W, 5A(150) 22 July 1990, VAX/VMS Type ? or 'help' for help * 8200 C-Kermit>SET LINE DIAL_LINE * 8200 C-Kermit>SET SPEED 9600 _TXB15:, 9600 bps * 8200 C-Kermit>CONNECT Connecting thru _TXB15:, speed 9600. The escape character is CTRL-\ (28). Type the escape character followed by C to get back, or followed by ? to see other options. %SYSTEM-F-ACCVIO, access violation, reason mask=01, virtual address=000F134A, PC=00039415, PSL=03C00000 %TRACE-F-TRACEBACK, symbolic stack dump follows module name routine name line rel PC abs PC CKVTIO ttvt 8006 00000035 00039415 CKVCON conect 2043 0000015B 0003624F CKUUS4 doconect 3572 00000013 0004089F CKUUSR docmd 2974 0000045D 00032015 CKUUS5 parser 2651 000009E6 0003B86E CKCMAI main 1939 00000135 00 VX8200-KERMLIB-> [Crashes back to VMS system prompt] .............................................................................. Second transcript: Ckermit 4F(095)/VMS 5.2 Local-mode operation Successful connection to a TSX+ PDP-11 system on line L113 .............................................................................. VX8200-KERMLIB->CKERMIT Extended-length packets requested Extended-length packets requested C-Kermit, 4F(095) 31 Aug 89, VAX/VMS Type ? for help * 8200 C-Kermit>SET LINE DIAL_LINE * 8200 C-Kermit>CONNECT Connecting thru _TXB15:, speed 9600. The escape character is CTRL-\ (28). Type the escape character followed by C to get back, or followed by ? to see other options. LEXPS: L113 CONNECTED * TSX-Plus Version 6.40 * License # = 999-T1S-07453 26-Jul-90 21:58:36 Line # 3 .!************* HARD-DISK BA-23:11/73 TSX SYSTEM -- LINE 3 *************!. Logon please:ROGER Password: Welcome to the system R11/73>BYE Job started on line # 6 Connect=00:01:00 CPU=00:00:03 * 8200 C-Kermit - contti: ttiosb.status: %SYSTEM-F-HANGUP, data set hang-up * 8200 C-Kermit - contti: ttiosb.status: %SYSTEM-F-HANGUP, data set hang-up * 8200 C-Kermit - contti: ttiosb.status: %SYSTEM-F-HANGUP, data set hang-up LEXPS: DISCONNECTED C-Kermit Disconnected * 8200 C-Kermit>EXIT VX8200-KERMLIB->EOJ KERMIT logged out at 26-JUL-1990 23:00:51.45 Note: The TSX+ system sends three "breaks" to terminate the port selector connection. C-Kermit saw and reported each one separately.