4.3BSD/usr/contrib/kermit/ckuker.bwr

C-Kermit Version 4C(057):
Status, Bugs, and Problems
As of: 2 Aug 85

Note: Version numbering system changed from decimal notation (like 4.2)
to number-letter notation (like 4C) to avoid confusion with Berkeley Unix
version numbers.

See ckuker.upd for list of bugs already fixed.

-- SUPPORT FOR DIFFERENT SYSTEMS: --

4.2BSD: "make bsd" works.  Should work on VAX, SUN, Pyramid, & others.

4.1BSD: "make bsd" should work for this too (did not in C-Kermit v4.2).

4.3BSD: unknown, but "make bsd" should(!) work.

2.9BSD: Support in but untested: "make bsd29".  Should be the same for 2.8.

Version 7: works ok on the systems tested so far using "make v7", but some
 fiddling with the make file is necessary for proc table definitions; see
 the makefile and also ckuv7.hlp for details.

PC/IX: should work ok with "make pcix".

ATT 3Bx systems: should work ok with "make att3bx".

Most other System V or System III based systems can build a working Kermit with
"make sys3"

PDP-11's running a System III or V based Unix and which have no I & D space
should use "make sys3nid".

DEC Pro-350 or -380 with Pro/Venix V2 (not V1) -- uses the regular "make sys3"
or "make sys3nid", but the file ckcfio.c might have to be edited first to
reduce the value of MAXWLD and/or SSPACE.  See below under HINTS for details.

For other Unix systems, see the makefile.

VAX/VMS: support added by Stew Rubenstein at Harvard and Martin Minow at DEC.
  Has to be built with CKV*.COM, needs development to handle all the VMS/RMS
  features and to improve performance.  Has its own build procedure.  See
  CKV*.*.  VMS-specific bugs in CKVKER.BWR.

Macintosh: Support added at Columbia, has own makefile, etc.  See CKM*.*.


-- HINTS --

- If the program dies with a message like "malloc fails in splitpath()"
  whenever it tries to parse a filename (as in the "send" command), then
  the amount of space allocated for filename expansion in the module
  ckufio.c must be reduced.  This can be done by changing the #defines
  for MAXWLD (the maximum number of filenames) and SSPACE (the size of
  static string space) to make the numbers smaller.

- When modifying or writing KERMIT code, do NOT pass to a function
  (e.g., "signal") the address of a static function.  Doing so may
  break VENIX code mapping.  If you must pass the address of the
  function, make it global and pick a "non-generic" name for it that
  will hopefully be unique and yet informative.


-- BUG LIST --

First, a disclaimer must be made.  C-Kermit attempts to support all post-V6
Unix variations on all machines.  This is a tall order, and requires careful
attention to certain details.  As changes are made (and C-Kermit is still in
stage of fairly rapid development), there is always the chance that a change
-- made to introduce a new feature or fix a bug -- will not work as intended
on some systems, even though it was tested successfully on others.  The main
area to watch out for is not system differences (which are handled fairly well
in the system-dependent ck?[ft]io modules), but in compiler differences,
especially int/char confusion.  Characters should be stored in variables of
type char, not int, and char/int conversion should be avoided because of
problems introduced by sign extension.  And i/o should not be used to read
characters into int variables, because the way in which the system stores the
character in an int varies from system to system (e.g.  68000s put them on the
left, the VAX on the right).

If you have received a C-Kermit release that does not work correctly (except
for the bugs & restrictions noted below), it is not because the release was
not thoroughly test -- it was -- but because it was not tested on your system
since the last time changes were made, because of a lack of such a system to
test it on.  If this happens to you, please try to track down the problem and
report as specifically as possible back to us.


General problems:

- The program is too big, with too many features; source is too large to fit on
  some disks.  Needs to be reorganized so that a minimal Kermit can be built
  for any system, and then frills can be added on if desired -- interactive
  command parser, help strings, dial command, script command, etc.

- There's not a full enough set of features available from command line
  invocation.  Commands like "bye" are missing.  This is mainly to keep the
  "kermit -h" help message small enough to fit on one screen.

- Conditionalizations are not done clearly.  In some cases it might be
  better to have compile-time flags for features, rather than systems, or
  generic system names, rather than specific vendor/machine names, to
  avoid excessive nesting or repitition of compile-time variables.
  Constructions like "#ifdef FOO | BAR" are avoided because many compilers
  don't understand them; the alternative is to repeat code under different
  conditionals (to accomplish an OR) or to include it within nested
  conditionals (AND), sometimes applying De Morgan's law to achieve the
  desired result... 

- Program's return code might be wrong in some cases (in 4.0, it was always
  zero; in 4C some attempt is made to return correct codes for failure and
  success).

- On some systems (e.g. TRS-80 Model 16 with Xenix V7, or HP-9000 HP-UX)
  C-Kermit reportedly runs VERY SLOWLY.  The program could certainly do with
  some tuning -- but not at the expense of modularity and transportability! --
  but in the meantime, it can probably be sped up a lot by removing the
  -DDEBUG from the makefile, eliminating hundreds of function calls, many of
  them in critical code.  Another speedup could come from allowing more
  systems to take advantage of "myread()" -- the nonblocking version of
  read(); see below.

- Micros like the DEC Pro-350, when in "IBM mode" (set flow none, set
  handshake xon), might not be able to keep up with incoming packets, even
  at relatively low baud rates.  The Pro-350 OS relies heavily on
  XON/XOFF to avoid losing characters at the port, but XON/XOFF must be
  disabled for communicating with IBM mainframes.  The only solution is
  to lower the packet size to 20 or 30 to reduce the probability that
  data is lost in any particular packet, and maybe also reduce the baud rate.

- Need 'set' command for retry-threshhold.

- The program could be a little bit less cavalier in its treatment of files.
  For instance, when receiving a file (with "warning" turned off) it will
  overwrite any existing file of the same name.  That's ok, but what if the
  user types ^F or ^B to interrupt the transfer?  This does not save the
  existing file -- it's already been destroyed by the open() of the new copy,
  which in turn is discarded as a result of the interruption.  Maybe Kermit
  should always make a temporary, unique name for incoming files, and then
  rename them to their real names only after the transfer is complete.  But
  that's no good on systems (like the Macintosh) that don't have disk space
  to burn.

- Local versus remote mode is not, and probably can not, be determined
  automatically upon startup.  For instance, if you build Kermit with
  "make sys3" on a 3B20 and a 3B2, the program has no way of knowing whether
  it's running on a timesharing system (the 3B20, where it should be remote
  by default) or a workstation (the 3B2, where it should be local by default).
  If you find that Kermit comes up on your system in the wrong mode, you can
  put the appropriate "set line" command in your .kermrc file -- "set line
  /dev/tty" will always put you in remote mode.

- Local mode file transfer display could be improved.  On tty-style displays,
  the "percent done" could be shown by doing something like
  "0...1...2...3...4...5...6...7...8...9...".

- If the program crashes or is halted (killed) from outside while it has the
  terminal in a not-normal mode during command parsing or file transfer, the
  terminal mode is not restored, and lock files are not cleaned up.  There can
  be no fix for this within C-Kermit itself.

- The shell's interrupt, delete, and kill characters may interfere or
  conflict with those used by the Kermit command parser.  In any case, there
  is no way to change Kermit's editing characters to conform to user's taste.

- Status info should be updated only for real file transfers, not transactions
  like "finish".

- "!" command requires a space after, contrary to the Unix user's normal
  expectation.

- Many people have asked for a system-wide startup file similar to
  the user's .kermrc file, perhaps with a conditional way to escape from
  it if the user has her own .kermrc file.  This notion might be extended
  to include the entire hierarchy system -- home -- current directory.

- A deeper problem with the initialization files is that the file is only
  taken when the program enters interactive command dialog.  To be consistent,
  it should also be taken when the program is run via command line arguments.

- Some users report that it would be more desirable to have an error during
  execution of a take file return directly to command level, rather than
  pop to the invoking take file (why?).

- Some users report that the program should make no internal distinction
  between running in foreground or background (why?).

- Since kermit opens and closes the communication line with each command line
  invocation, it is not convenient to use it in scripts in which it is
  repeatedly invoked (e.g. a print spooler).

- Variable names are sometimes confusing, especially the send/receive parameter
  pairs (spsiz/rpsize, mystch/stchr, npad/mypadn, rtimo/timint, etc).  This
  is mostly history... they tend to agree with the names used in other Kermit
  programs.  Still, they should probably be changed.  Ditto for some of the
  procedure names.

- Some C compilers do not support variable names longer than 6, nor function
  names longer than 5, and some are not case sensitive (the DEC-20 C compiler
  has all these restrictions, and the V6 Unix C compiler has some of them).
  To ensure the widest possible portability, all identifiers should comply
  with these restrictions -- currently many do not.

- When the C-Kermit server is given a host command (or even some generic
  commands like 'space'), it might have to think for a long time before
  returning output.  In this case, it should set a timer while waiting for
  input from the fork and whenever the timer goes off, it should send a null
  data packet to prevent the other Kermit from timing out.

- When connecting back to C-Kermit after a transaction, or after finishing
  the server, it may be necessary to type a ^Q to clear up an XOFF deadlock.
  There's not much the Kermit program can do about this...

- When interrupting a send with ^F or ^B, an appropriate message does not
  seem to make it into the transaction log.

ckufio.c:

- ckufio currently goes to a lot of trouble to traverse the directory in
  order to expand "*" and "?" in wildcards.  Maybe it should just fork the
  user's customary shell and have it do the expansion.  This would allow
  fancier filespecs to be given, like "~/ck*.[cwh]".  But it would slow down
  features like filename completion and menus in the interactive command
  parser.  (Find out how Unix FTP does it...)

ckutio.c:

- Myread() should be expanded to include systems that can't do nonblocking
  reads, but can find out how many characters are in the input buffer -- this
  would eliminate calling read() in a loop for each character during packet
  transmission (e.g. Pro/Venix V1 could use "ioctl(x,TIOCQCNT,&y)", V7 could
  use its buffer-queue-peeking trick, etc).

- There should be a timed option for ttoc() for use during connect so you
  can escape from XOFF'd or other stuck conditions.

- There's no good way to select baud rates higher than 9600.  Most Unix systems
  don't supply symbols for them (unless you use EXTA, EXTB), and even when they
  do, the program has no way of knowing whether a specific port serial
  controller supports those rates.

- Use of RAW|TANDEM in 4.1 BSD gives only unidirectional, not bidirectional,
  flow control -- xoff's from the terminal are treated as data rather than
  control signals.  Symptom: possible loss of characters during CONNECT.

- On some systems, there is an undesired interaction between the various
  open() modes, fnctl(), and ioctl() invocations when modem-control lines
  are involved.  Some of this due to bugs in some Unix implementations or to
  inconsistencies between them (e.g. as to the behavior of TIOCEXCL, etc).

ckudia.c:

- Some systems do not allow users to manipulate dialers directly.
- Should support a "phone book" (this would actually go in ckuus*.c).
- Pro/Venix V2 (and some other Sys V-based systems) are having DTR-dropping
  problems when dialing.  With Pro/Venix V2, a workaround is to get the system
  to ignore the modem control signals and treat the line as a direct line by
  issuing a "setline -d xxx" command, where "xxx" is the device node (e.g.
  com1), rather than "setline -m xxx".
- Hayes modem dial string should be ATD, not ATDT, so that dialing will occur
  in the mode that the modem is set up for (does everyone agree?).

ckuus*.c:

- The send command should have the same syntax as the get command to allow
  multiple filenames to be given on a single line:

	send foo bar baz  <-- send all these files
  or:
	send
	 Local file(s) to send: foo bar baz
         Name(s) to send it/them under: x y z

  The latter form could be risky, of course, when mixed with wildcards,
  and in any case would require major rewriting of many parts of the program
  (which probably will never be done).

- Baud rate selection currently requires user to type a number, which is
  then verified against a system-dependent table.  Better to have a baud rate
  keyword (cmkey) table defined in the system-dependent module, so user
  can abbreviate (e.g. '9' for '9600').

- No way to put trailing comments on commands.

- ckuus2.c makes the C optimizer run out of space under PC/IX and some other
  systems.

Protocol (ckcpro.w, ckcfn*.c):

- No way to interrupt a protocol transaction until after it starts
  successfully.  For instance, no way to interrupt the timeouts and
  retransmissions of the initial packet when the other side is not
  responding, except for killing the whole program.  Cure: check for
  keyboard "interrupts" during the send-init process, set c[xz]seen.
  But doing this will make the state table a lot more complicated...
  Maybe change ^C trap to get back to command mode rather than exit
  the program.

- When parity is in use and the other Kermit cannot do 8th bit prefixing,
  the user is not warned that binary files will not be transferred correctly.
  This can be easily remedied by calling screen(SCR_WM,...) after the
  send-init exchange has occurred, but this would make a dialog box pop
  up during protocol on the Macintosh...

ckucon.c:

- Doesn't do any particular kind of terminal emulation.  It wasn't meant to.
  Filters can be used for this.  Or a replacement module can be written
  (as has been done for the Macintosh).

- When sending BREAK, should clear output buffer first (this is done in BSD,
  should be added for other systems to ttsndb() in ckutio.c).

- Performance is poor on systems that can't check the input buffer or
  do nonblocking read() calls.  See the horrendous code that was added for V7
  to get around this (peeking into tty buffers in kernel memory).

- As structured, connect mode can't include commands to toggle logging on
  and off or to change settings, because the fork that reads keyboard input
  doesn't share variables with the fork that does port i/o.

- The program may become stuck if the two sides get into an XOFF deadlock.
  There should probably be a timer around (or in) the ttoc() call.

- Reportedly, a control-S typed at the keyboard doesn't always seem to "take"
  when doing terminal emulation under Pro/Venix V2 (DEC micros, terminals,
  devices, systems are notorious for their insistence on doing XON/XOFF and
  attendant problems.  Remember the VT180?)