home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pub / wkermit / pckermitdoc.txt < prev    next >
Text File  |  2020-01-01  |  39KB  |  938 lines

  1. PCKERMIT.DOC                                            12/10/85
  2.  
  3.  
  4. PC-DOS Kermit with Sliding Windows                      Rev 1.18
  5. ----------------------------------                      12/10/85
  6.  
  7.  
  8. 1. Source Code Implementation Documentation
  9. ===========================================
  10.  
  11. By Larry Jordan and Jan van der Eijk
  12.    Revised by John Mulligan
  13.  
  14. The Kermit software modules contained in this package are
  15. modified versions of the C-KERMIT 4C modules distributed by
  16. Columbia University in June, 1985.  The modules were modified to
  17. work with the Lattice C compiler and The Greenleaf Functions to
  18. produce Kermit software compatible with PC-DOS and MS-DOS.  They
  19. were also modified to add two new features to the software--file
  20. attributes and sliding windows.  File attributes have been in the
  21. official Kermit Protocol specification for some time, but the
  22. sliding windows concept has just been approved.
  23.  
  24.  
  25. The 4C version of Kermit was chosen because it was written
  26. for maximum portability to different operating systems, and it
  27. was the most robust version available.  The 4C version was
  28. written for Unix and Xenix operating systems, but the
  29. similarities with PC-DOS made it relatively easy to port to that
  30. system.  The 4C version contained all defined Kermit capabilities
  31. except file attributes.  None of these capabilities were removed
  32. during our port of 4C to PC-DOS.  Some functions had to be
  33. rewritten for PC-DOS compatibility such as filename conventions
  34. and wildcard filename expansion.  Server support and non-protocol
  35. related code, such as terminal emulation, was removed from 4C
  36. during the port to reduce the size and complexity of the PC-DOS
  37. Kermit module.
  38.  
  39. The Lattice C compiler was chosen because of its
  40. compatibility with Unix C and because of the quality of code it
  41. produces.  The Microsoft C Version 3.0 would be a better choice
  42. now because of its superior error-checking and Unix
  43. compatibility;  it was not available when we started the 4C port.
  44. The function calls are compatible with Lattice C Version 2.15.
  45. The modules could be compiled under Microsoft C 3.0 with few
  46. changes.  Microsoft provides the Lattice-to-Microsoft transition
  47. header files.
  48.  
  49. [NOTE:  Their is a reported bug in the Microsoft C Compiler which causes an
  50.  error in the Kermit Type 3 (CRC-16) Checksum algorithm.  Beware!]
  51.  
  52. [NOTE:  Lattice C allows nested comments, which are not allowed by Microsoft
  53.  C compiler.  Their may be some instances of nested comments.  LCKFNS3
  54.  has at least one area that was commented out that results in a nested
  55.  comment.]
  56.  
  57. The Greenleaf Functions General and COMM Libraries were
  58. chosen for file and communications I/O because the functions
  59. provide all the necessary capabilities.  The functions are
  60. modestly priced and include source code.  All uses of these
  61. functions are noted in comments in the source code.  A software
  62. vendor can substitute another vendor's functions in place of The
  63. Greenleaf Functions or use functions generated inhouse.
  64.  
  65. Unlike most communications software software and protocols,
  66. Kermit does check parity if parity is enabled, and the protocol
  67. will not function properly unless the selected parity matches on
  68. both ends of the communications link.
  69.  
  70. Implementation of PCKermit
  71. ---------------------------
  72.  
  73. The PC-DOS Kermit provided in this package can be
  74. implemented in one of two ways.  A stand-alone version of the
  75. software can be executed from the DOS command line or through a
  76. software SYSTEM, FORK or SHELL call.  A linkable version of the
  77. software can be linked to smart terminal object modules and the
  78. protocol executed from within the smart terminal program.  The
  79. linkable version can also be added to host or bulletin board
  80. software.  The software for both options is provided in the
  81. package.
  82.  
  83.  
  84. Stand-Alone Kermit
  85. ------------------
  86.  
  87. A stand-alone version of the PC-DOS Kermit is included in
  88. this package.  The file is called PCKERMIT.EXE.  This file was
  89. created by linking the LCKMAIN.OBJ module to the other Kermit
  90. modules.  Execution of the stand-alone Kermit program requires
  91. the same command parameters and carrier conditions regardless of
  92. the execution method.  The module runs as a "one-shot" execution
  93. then returns to the caller.  A single file or multiple files
  94. (wildcard filename) are transferred until execution is completed
  95. or the transfer is abnormally aborted.  If execution is performed
  96. by the user from the DOS command line, termination of PCKERMIT
  97. returns control to PC-DOS.  If execution is performed from within
  98. a software package using a SYSTEM, FORK or SHELL call,
  99. termination of PCKERMIT returns control to the next executable
  100. statement after the calling statement.
  101.  
  102. The command syntax of the stand-alone Kermit program is
  103. shown in Figure 1.  An example of execution from the DOS command
  104. line is as follows:
  105.  
  106. PCKERMIT -l COM1 -b 1200 -p n -m 8 -w -r
  107.  
  108. This same Kermit execution can be started from within a
  109. Lattice C program with the following function call:
  110.  
  111. system(" PCKERMIT -l COM1 -b 1200 -p n -m 8 -w -r");
  112.  
  113. Both methods allow you to receive a file through serial port
  114. COM1 at 1200 bps using no parity.  They also request an 8 packet
  115. sliding window from the sender and allow overwriting of
  116. existing files.  CRC-16 error-checking is automatically requested.
  117. If sliding windows are not supported by the sending computer,
  118. PCKERMIT reverts to "classic" half-duplex Kermit operation.  If
  119. the sender cannot support CRC-16 the next best common error-check
  120. technique is negotiated.
  121.  
  122.  
  123. ----------------------------------------------------------------
  124.  
  125. Options:
  126.  
  127.   PCKERMIT version 1.17, December 6, 1985
  128.   Usage: PCKERMIT [-x arg [-x arg]...[-yyy]..]]
  129.   x is an option that requires an argument, y an option with no argument:
  130.      -s file(s)   send
  131.      -r           receive
  132.      -a name      alternate name, used with -s, -r
  133.      -h           help - print this message
  134.   settings --                                                        default
  135.      -l line      communication line device ( COM1, COM2 )            [COM1]
  136.      -b baud      line speed, e.g. 1200                               [1200]
  137.      -p x         parity, x is one of e,o,m,s,n                        [N]
  138.      -m size      maximum window size to use ( <= 31 )                 [31]
  139.      -n           non binary file transfer, affect CR/LF
  140.      -t           line turnaround handshake = xon, half duplex
  141.      -w           write over preexisting files
  142.      -q           be quiet during file transfer
  143.      -c           carrier detect signal required to be present
  144.                                                                               Fi
  145.  
  146. Note 1:  Use -d (debug) only if compiled with debug statements left in
  147.          place. (hidden option)
  148.  
  149. Note 2:  If -t is used, -m should not be used.
  150.  
  151. Note 3:  The usage of -w is reversed from standard Columbia CKERMIT.
  152.  
  153. Figure 1. PCKERMIT command syntax.
  154.  
  155. ----------------------------------------------------------------
  156.  
  157. Regardless of the technique used to initiate operation of
  158. the stand-alone Kermit program, the software requires the same
  159. serial port and modem conditions.  The Kermit module sets up its
  160. own send and receive interupt buffers, but it does not establish a
  161. carrier with a remote system.  The user must initialize a
  162. selected serial port with bit rate, parity, and stop bits then
  163. establish a carrier with a remote host based on these parameters.
  164. After the carrier is established and the remote Kermit is
  165. started, the user can start the local stand-alone Kermit.
  166.  
  167.  
  168. Linkable PC-DOS Kermit
  169. ----------------------
  170.  
  171. The PC-DOS Kermit modules can be easily linked to existing
  172. smart terminal or host software written in the C language.
  173. Linking the modules to Pascal, compiled BASIC or assembly
  174. language requires a thorough knowledge of both C and the terminal
  175. or host program language.  Before the linking is performed some
  176. software changes have to be made.
  177.  
  178. The special link module is the LCKLINK.C file.  This module
  179. contains several local and global variables that must be
  180. initialized.  The variables can be initialized by reference to
  181. parameters selected or established in the smart terminal program
  182. or they can be hard coded for specific applications.  All
  183. variables that must be initialized are shown equal to question
  184. marks.  For example, the parity variable is shown as parity=????.
  185. It should be noted that the LCKCLINK.C module replaces the
  186. LCKMAIN.C module used to create the stand-alone PCKERMIT.
  187.  
  188. Another required change to facilitate direct link of Kermit
  189. to other software is in the module LCKUSER.C.  The function
  190. "doexit()" must be modified to return to the smart terminal
  191. program rather than exit to DOS.  Specifically, the "exit();"
  192. statement must be changed to a "return;" statement.
  193.  
  194. An existing smart terminal program should already contain
  195. functions or procedures to set up communication buffers and to
  196. initialize communication ports.  A new software product may not
  197. have these functions established.  In any event, the LCKTIO.C
  198. module must be modified to match the existing smart terminal
  199. communication functions.  The "ttopen()", "ttclose()" and
  200. "ttvt()" functions should be studied, and the noted Greenleaf
  201. communication functions modified as necessary.  Existing
  202. functions may be used to replace these functions.  Code comments
  203. and Greenleaf documentation should be studied before these
  204. routines are modified--the sequence of the function calls in
  205. these functions are sometimes critical to interupt buffer setup
  206. and operation.  A change in the sequence can either cause buffer
  207. setup problems or cause the interupt sending or receiving of
  208. characters to malfunction.
  209.  
  210. Finally, screen I/O performed by PC-DOS Kermit is done in
  211. the LCKUSER.C module.  A smart terminal vendor will probably want
  212. to change the TTY style output to a special file transfer screen
  213. format.  All screen I/O are contained in the screen function.
  214. The vendor can use display functions from a third party (i.e.,
  215. Greenleaf or Blaise) or use functions written by the vendor to
  216. perform fast, full screen color output.  DOS or BIOS calls can be
  217. used without slowing down the protocol as long as the calls do
  218. not have to scroll the screen or produce elaborate I/O.
  219.  
  220. All PCKERMIT object files contained in this package were
  221. compiled using the Lattice C small model.  This model uses NEAR
  222. calls in its code segment.  If the PCKERMIT files are to be
  223. linked to software compiled under other Lattice models, the C
  224. source code must be recompiled using the selected model.
  225.  
  226.  
  227. Files for PCKERMIT
  228. ------------------
  229. [The LCK*.C naming convention stands for "Lattice C Kermit" files]
  230.  
  231. Filename                                  |    Description
  232. ------------------------------------------------------------------------------
  233. LCKFIO   C                                /*  File I/O module */
  234. LCKFNS1  C                                /*  Protocol specific module 1 */
  235. LCKFNS2  C                                /*  Protocol specific module 2 */
  236. LCKFNS3  C                                /*  Windowing specific module  */
  237. LCKLINK  C                                /*  Module for linkable Kermit */
  238. LCKMAIN  C                                /*  Main program for PCKERMIT */
  239. LCKPROT  W                                /*  Protocol state table in Wart */
  240. LCKPROT  C                                /*  Protocol state table in C */
  241. LCKTIO   C                                /*  RS232 I/O and time module */
  242. LCKUSER  C                                /*  User interface module */
  243. LCKCMD   H                                /*  Command interface header */
  244. LCKDEB   H                                /*  Debug header file */
  245. LCKERM   H                                /*  PCKERMIT main header file */
  246. LCKUSR   H                                /*  User interface header file */
  247. STDIOS   H                                /*  Lattice and Greenleaf stdio.h */
  248. PCKERMIT ARF                              /*  PCKERMIT  link file */
  249. PCKERMIT EXE                              /*  EXE file */
  250. PCKERMIT MAP                              /*  Map file */
  251. LCKWART  C                                /*  Wart source code */
  252. LCKWART  EXE                              /*  Wart EXE file */
  253. LCKWART  DOC                              /*  Wart documentation */
  254.  
  255.  
  256. Referenced Products
  257. -------------------
  258.  
  259. The Greenleaf Functions
  260.  
  261. Greenleaf Software Inc.
  262. 2101 Hickory Drive
  263. Carrollton, TX 75006
  264. (214) 446-8641
  265.  
  266. Lattice C. Compiler
  267.  
  268. Lattice
  269. P.O. Box 3148
  270. Glen Ellyn, IL 60138
  271. (312) 858-7950
  272.  
  273. Microsoft C. Compiler
  274.  
  275. Microsoft
  276. 10700 Northup Way
  277. Bellevue, WA 98004
  278.  
  279. Asynch Manager
  280.  
  281. Blaise Computing Inc.
  282. 2034 Blake Street
  283. Berkley, CA 94704
  284. (415) 540-5441
  285.  
  286.  
  287. 2. PCKERMIT.EXE USER GUIDE
  288. ==========================
  289.  
  290. The following material supplements the section "Stand-Alone Kermit" (above):
  291.  
  292. CHARACTERS DISPLAYED DURING TRANSFER
  293. ------------------------------------
  294.  
  295. During operation of the standalone PCKERMIT it
  296. may display the following:
  297.  
  298.     %   Resend of last packet
  299.     .   Is printed every FOURTH data packet
  300.     A   Attributes packet (file length and creation date)
  301.     B   End of transmission packet
  302.     F   File Header
  303.     N   NAK packet
  304.     Q   Bad checksum or other packet error
  305.     S   Send-Init packet
  306.     T   Timeout
  307.     Z   End of file packet
  308.  
  309.  
  310. KEYBOARD INTERRUPTS
  311. -------------------
  312.  
  313. During a file transfer PCKERMIT responds (sometimes slowly) to
  314. the following keystrokes:
  315.  
  316. CTRL-F to cancel File,  CTRL-R to Resend current packet .
  317. CTRL-B to cancel Batch, CTRL-K to abort Kermit and exit
  318. CTRL-A for status report:
  319.  
  320. These functions are available even at the start of PCKERMIT before it
  321. tells you they are available.  In particular, Control-K can be used if
  322. the "Send-Init" exchange does not seem to be working.
  323.  
  324. Please note that PCKERMIT checks the keyboard infrequently under some
  325. conditions.  WAIT at least 20 - 30 seconds before repeating a keystroke
  326. in order to avoid stacking up repeated commands.  This is particularly true
  327. of CTRL-F (cancel file) where you might cancel more than one file.
  328.  
  329. Also, the Control-F and Control-B (cancel file and cancel batch) functions
  330. sometimes require a NAK and a resend or a timeout before they actually
  331. work.  This is not a protocol problem, but is due to the way PCKERMIT
  332. flushes it buffer before sending the abort packet.  In some cases, the
  333. flushing of the buffer truncates a packet and the following abort packet is
  334. not seen as a separate packet.
  335.  
  336. Here is a more detailed explanation of the functions:
  337.  
  338.   CTRL-F will cancel an individual file in a wildcard transaction,
  339.   but then continue with the next file in the batch.
  340.  
  341.   CTRL-B will cancel the entire batch of files, according to
  342.   protocol, and then return you to the DOS prompt.
  343.  
  344.   CTRL-K will abort the file transfer and return you to the DOS
  345.   prompt.  PCKERMIT sends an Error packet indicating it is
  346.   aborting, but otherwise does not worry about protocol.
  347.  
  348.   CTRL-R will resend the current packet; this can be used as a
  349.   manual timeout.  With windowing is in effect, this feature should be
  350.   tried only as a last resort as it has not been fully tested.
  351.  
  352.   CTRL-A will give you a status report on the screen.  The items
  353.   covere are:
  354.  
  355. CONTROL-A STATUS REPORT
  356. -----------------------
  357.                                COMMENTS
  358. ^A  Status report:
  359.  file type: binary             ;Details unknown
  360.  
  361.  file number: 1                ;Indicates which file of a multiple file
  362.                                 wildcard batch transfer
  363.  
  364.  characters : 1291             ;On SEND: indicates number of characters
  365.                                 output to the buffer, but not necessarily
  366.                                 yet sent out the modem.
  367.  
  368.                                 On RECEIVE: indicates characters actually
  369.                                 written to disk so far; others may already
  370.                                 have been received to memory.
  371.  
  372.  window size: 31               ;The window size agreed upon after negotiation
  373.                                 with the other Kermit.  By definition, 0 means
  374.                                 Classic (non-windowing) Kermit.  Otherwise,
  375.                                 the size may vary from 1 to 31.
  376.  
  377.  block check: 1                ;The block check type agreed upon after
  378.                                 negotiation with the other Kermit.
  379.                                   Type 1 = 1 byte checksum
  380.                                   Type 2 = 2 byte checksum
  381.                                   Type 3 = 3 byte CRC-16 checksum
  382.  
  383.  compression: 0                ;Is data compression (repeat count prefixing)
  384.                                 in effect?
  385.                                   0 = No compression
  386.                                   1 = Compression
  387.  
  388.  8th-bit prefixing: 1          ;Is 8th bit prefixing being used?
  389.                                   0 = No
  390.                                   1 = Yes
  391.  
  392.  
  393.  
  394. FUNCTIONS SUPPORTED BY PCKERMIT (Subject to agreement by the other Kermit)
  395. -------------------------------
  396.  
  397.    Windowing (full-duplex chanell required)
  398.    Data Compression
  399.    8-bit quoting (whenever parity is not "none")
  400.    File Attributes:
  401.      File Length
  402.        On Receive: accepts either
  403.           the attribute ! (Ascii 33) - Approximate File Length in K bytes
  404.           the attribute 1 (Ascii 49) - Exact file length
  405.  
  406.        On Send:
  407.           sends the attribute 1 (Ascii 49) - Exact File Length
  408.  
  409.      Time and Date:
  410.        Both Receive and Send
  411.           the attribute # (Ascii 35)  - Creation date
  412.  
  413.        NOTE: when PCKERMIT receives the creation date file attribute, it
  414.        automatically writes the received file with that date, rather than
  415.        the current date.
  416.  
  417.  
  418. PCKERMIT AT A GLANCE
  419. --------------------
  420.  
  421.   Local operation:                   Yes
  422.   Remote operation:                  ???
  423.   Transfers text files:              Yes
  424.   Transfers binary files:            Yes
  425.   Wildcard send:                     Yes
  426.   ^X/^Y interruption:                Yes  (Different keystrokes, though)
  427.   Filename collision avoidance:      Yes
  428.   Can time out:                      Yes
  429.   8th-bit prefixing:                 Yes
  430.   Repeat count prefixing:            Yes
  431.   Alternate block checks:            Yes
  432.   Terminal emulation:                No
  433.   Communication settings:            Yes
  434.   Transmit BREAK:                    No
  435.   IBM mainframe communication:       ???
  436.   Transaction logging:               No
  437.   Session logging:                   No
  438.   Raw transmit:                      No
  439.   Act as server:                     No
  440.   Talk to server:                    No
  441.   Advanced server functions:         No
  442.   Advanced commands for servers:     NO
  443.   Local file management:             ???
  444.   Handle file attributes:            Yes
  445.   Command/init files:                No
  446.   Command macros:                    No
  447.  
  448.  
  449.  
  450. 3. ADDENDUM TO KERMIT PROTOCOL MANUAL, FIFTH EDITION
  451. ====================================================
  452.   The exact file size attribute is not covered in the Fifth
  453.   Edition of the KERMIT PROTOCOL MANUAL.  This is an addendum to
  454.   that manual from Frank da Cruz, who maintains the Kermit
  455.   protocol:
  456.  
  457. "Date: Fri 2 Aug 85
  458.  From: Frank da Cruz
  459.  Subject: attribute packets
  460.  
  461. I was just looking at the protocol manual and realized that the current edition
  462. does not contain something which might be useful to you, namely two new
  463. attribute fields:  "1" specifies the exact byte count of the file, and "2"
  464. specifies the byte size (e.g. "7" or "8").  This will be in the next edition.
  465. Many people have asked for a somewhat finer-grained way to report the file
  466. size than the number of K (e.g. some systems need to preallocate space, but in
  467. some unit other than K).  - Frank"
  468.  
  469.  
  470. 4. ADDITIONAL PCKERMIT DEVELOPMENT NOTES
  471. ========================================
  472.  
  473. The following information supplements the "1. Source Code Implmentation
  474. Documentation" section above:
  475.  
  476. NOTES ON THE WART PROGRAM
  477. -------------------------
  478.  
  479. The module LCKPROT.C is produced by putting LCKPROT.W through the
  480. LCKWART.EXE pre-preprocessor.
  481.  
  482. The utility LCKWART.EXE was produced by compiling LCKWART.C, using the
  483. for Lattice C) Link automatic response file LCKWART.ARF.
  484.  
  485. The documentatiion for WART is LCKWART.DOC.
  486.  
  487. To summarize:
  488. LCKPROT.W         Input file to LCKWART.EXE
  489. LCKPROT.C         What we needed; WART was required only to
  490.                   produce this file.
  491.  
  492.  
  493. COMPILE.BAT FOR LATTICE C
  494. -------------------------
  495.  
  496. This is a small batch file that will compile a .C module into a .OBJ module.
  497. Messages/Errors are sent to a .ERR file.
  498.  
  499. The LC1 and LC2 are the compiler modules supplied by LATTICE C.
  500.  
  501. Here is the batch file, with comments to the right:
  502.  
  503.  
  504. lc1 >%1.err %1 -mS  -b       ;LC1 is the first phase of the Lattice C Compiler
  505.                              ;>%1 Messages/Errors are logged to filename.ERR
  506.                              ;%1 is the file being compiled
  507.                              ;-mS indicates the Small memory model
  508.                              ;-b  indicates "force byte alignment"
  509.  
  510. type %1.err                  ;type out the .ERR file
  511. lc2 %1                       ;LC2 is the second phase of the Lattice C Compiler
  512.                              ;It's input is the .Q file produced by LC1
  513.                              ;It's output is a .OBJ file to later be linked.
  514.  
  515.  
  516. Note that the small memory model (-mS) is being used; therfore, when linking
  517. later on use the CS.OBJ module and the LCMS.LIB and LCS.LIB library modules,
  518. which are the corresponding Small modules.
  519.  
  520.  
  521.  
  522. PCKERMIT.ARF
  523. ------------
  524.  
  525. The following is the contents of the PCKERMIT.ARF file, which is an
  526. automatic response file for the LINK procedure.  (This is for the LINKer
  527. supplied with MS-DOS 3.0)  I have annotated on the right what each
  528. line/module does:
  529.  
  530.  
  531. cs+                           -LATTICE C OBJECT MODULE (Supplied by Lattice)
  532. lckmain+                      -MAIN PROGRAM
  533. lckprot+                      -PROTOCOL STATE TABLE
  534. lckfns1+                      -PROTOCOL FUNCTIONS 1
  535. lckfns2+                      -PROTOCOL FUNCTIONS 2
  536. lckfns3+                      -PROTOCOL FUNCTIONS 3 (Windowing specific)
  537. lckuser+                      -USER MODULE; CONTAINS SCREEN I/O
  538. lckfio+                       -FILE I/O
  539. lcktio                        -TERMINAL I/O
  540. pckermit                      -.EXE file
  541. pckermit                      -.MAP file
  542. gfts+gfs+gfcs+                -GREENLEAF LIBRARIES (Supplied by Greenleaf)
  543. lcms+lcs                      -LATTICE C LIBRARIES (Supplied by Lattice)
  544.  
  545.  
  546.  
  547. NOTE: The Greenleaf functions are available from:
  548.  
  549. Greenleaf Software Inc.
  550. 2101 Hickory Drive
  551. Carrollton, TX 75006
  552. (214) 446-8641
  553.  
  554.  
  555. NOTE:  Lattice C is available from:
  556.  
  557. Lattice, Inc.     OR from   Lifeboat Assoc.
  558. P.O. Box 3148               1651 Third Avenue
  559. Glen Ellyn, IL 60138        New York, N.Y. 10028
  560. (312) 858-7950              (212) 860-0300
  561.  
  562.  
  563. THE DEVELOPMENT ENVIRONMENT
  564. ---------------------------
  565.  
  566. The development of this software was done using the following:
  567.  
  568. Lattice C (ver. 2.15)
  569. Greenleaf Functions General Library Rev. L2-2.10
  570. Greenleaf Functions Communications Library Rev. L3-1.2
  571. MS-DOS 3.0 on an IBM/PC AT
  572. The Microsoft Linker supplied with MS-DOS 3.0
  573.  
  574.  
  575.  
  576. DIRECTORY OF FILES USED
  577. -----------------------
  578.  
  579. Here is a sample directory of files for version 1.17 of PCKERMIT.EXE:
  580.  
  581. LCKWART  ARF       43   8-14-85   3:11p
  582. PCKERMIT ARF      133  11-26-85   3:24p
  583. COMPILE  BAT       46   7-27-85   3:41p
  584. PCKCOMP  BAT      513   8-26-85   4:32p
  585. PCKLINK  BAT       21  11-26-85   3:30p
  586. LCKFIO   C      16159  12-06-85  12:01p
  587. LCKFNS1  C      28939  12-03-85   6:37p
  588. LCKFNS2  C      12347   8-06-85  10:04p
  589. LCKFNS3  C      11025  11-13-85   6:07p
  590. LCKLINK  C       9806  11-16-85  12:21p
  591. LCKMAIN  C       8064  10-31-85   4:35p
  592. LCKPROT  C      14153  11-09-85   7:50p
  593. LCKTIO   C      15302  11-06-85   9:45p
  594. LCKUSER  C      22935  12-06-85  12:05p
  595. LCKWART  C      13151   7-30-85  11:11a
  596. KWCHANGE DOC     4190  12-05-85   1:43p
  597. KWINDOW5 DOC    28020  12-05-85   1:20p
  598. LCKWART  DOC     4119   6-05-85   5:06p
  599. PCKERMIT DOC    37691  12-06-85   2:30p
  600. LCKFIO   ERR       70  12-06-85   3:17p
  601. LCKFNS1  ERR      128  12-06-85   3:14p
  602. LCKFNS2  ERR      128  12-06-85   3:15p
  603. LCKFNS3  ERR       70  12-06-85   3:15p
  604. LCKMAIN  ERR      283  12-06-85   3:13p
  605. LCKPROT  ERR       70  12-06-85   3:13p
  606. LCKTIO   ERR       70  12-06-85   3:18p
  607. LCKUSER  ERR       70  12-06-85   3:16p
  608. LC1      EXE    68736   5-02-85   4:49p
  609. LC2      EXE    70592   5-02-85   4:49p
  610. LCKWART  EXE    31996   8-14-85   3:11p
  611. PCKERMIT EXE    70236  12-06-85   3:19p
  612. ASIC     H       9012  10-16-85   9:59p
  613. ASIPORTS H      12017  10-16-85   9:03p
  614. CDISK    H       4112  11-10-84  12:00p
  615. CSTDIO   H       2139   7-27-85   3:44p
  616. CTYPE    H       2198   5-02-85   4:49p
  617. FCNTL    H        896   5-02-85   4:49p
  618. LCKCMD   H       1625   7-29-85   4:17p
  619. LCKDEB   H       2643   7-30-85  11:00a
  620. LCKERM   H       3610  10-26-85   3:39p
  621. LCKUSR   H       4460   7-30-85  11:00a
  622. STDIOS   H       2031   7-27-85   3:38p
  623. TIMEDATE H        553   8-17-84  12:00a
  624. GFCS     LIB    21504   4-26-85   4:54p
  625. GFS      LIB    60416  11-10-84  12:00p
  626. GFTS     LIB     9216  11-10-84  12:00p
  627. LCMS     LIB    68096   5-02-85   4:50p
  628. LCS      LIB    78848   5-02-85   4:50p
  629. PCKERMIT MAP    25696  12-06-85   3:19p
  630. CS       OBJ     1675   5-02-85   4:50p
  631. LCKFIO   OBJ     6605  12-06-85   3:17p
  632. LCKFNS1  OBJ    12381  12-06-85   3:15p
  633. LCKFNS2  OBJ     5598  12-06-85   3:15p
  634. LCKFNS3  OBJ     5046  12-06-85   3:16p
  635. LCKMAIN  OBJ     3035  12-06-85   3:13p
  636. LCKPROT  OBJ     7611  12-06-85   3:13p
  637. LCKTIO   OBJ     6472  12-06-85   3:18p
  638. LCKUSER  OBJ    11453  12-06-85   3:16p
  639. PCKERMIT UPD      584  12-06-85  12:14p
  640. LCKPROT  W       6962  11-06-85   8:24p
  641.  
  642.  
  643. DESCRIPTION OF FILES USED
  644. -------------------------
  645.  
  646. LCKWART  ARF       LINK Automatic Response File to create LCKWART pre-processor
  647. PCKERMIT ARF       LINK Automatic Response File to create PCKERMIT.EXE
  648. COMPILE  BAT       COMPILE batch file for Lattice C and LCK?????.C modules
  649. PCKCOMP  BAT       PCKermit COMPile all modules batch file
  650. PCKLINK  BAT       PCKermit LINK batch file used with PCKERMIT.ARF
  651. LCKFIO   C         File I/O module
  652. LCKFNS1  C         Kermit Protocol Specific Module #1
  653. LCKFNS2  C         Kermit Protocol Specific Module #2
  654. LCKFNS3  C         Kermit Windowing Specific Module
  655. LCKLINK  C         Module for linkable Kermit used in place of LCKMAIN.C
  656. LCKMAIN  C         Main program for PCKERMIT
  657. LCKPROT  C         Protocol State table in C (derived from LCKPROT.W)
  658. LCKTIO   C         RS232 I/O and time module
  659. LCKUSER  C         User interface module
  660. LCKWART  C         Source code for LCKWART.EXE preprocessor used on *.W files
  661. KWCHANGE DOC       Kermit Windowing - Changes to definition draft to draft
  662. KWINDOW5 DOC       Kermit WINDOWing Definition - Add to Protocol Manual
  663. LCKWART  DOC       LCKWART (WART preproccesor for *.W files) documenation
  664. PCKERMIT DOC       PCKERMIT Sliding Window Kermit Documentation
  665. LC1      EXE       Lattice C 1st phase
  666. LC2      EXE       Lattice C 2nd phase
  667. LCKWART  EXE       WART pre-processor: *.W files input   *.C files output
  668. PCKERMIT EXE       PCKERMIT Sliding Window Executable code
  669. ASIC     H         "include for things that use asi buffer structure"
  670. ASIPORTS H         Greenleaf Comm Library Header for Asynch I/O ports
  671. CDISK    H         Greenleaf Header
  672. CSTDIO   H         "I/O for Lattice and Microsoft C and The Greenleaf Functions"
  673. CTYPE    H         "defines various ASCII character manipulation macros"
  674. FCNTL    H         "symbols used for "open, "creat", and "fcntl" functions"
  675. LCKCMD   H         Command interface header
  676. LCKDEB   H         Debug header file
  677. LCKERM   H         PCKERMIT main header file
  678. LCKUSR   H         User interface header file
  679. STDIOS   H         Combination of Lattice C and Greenleaf Headers
  680. TIMEDATE H         Greenleaf Header
  681. GFCS     LIB       Greenleaf Library
  682. GFS      LIB       Greenleaf Library
  683. GFTS     LIB       Greenleaf Library
  684. LCMS     LIB       Lattice C v. 2.15 Library
  685. LCS      LIB       Lattice C Library
  686. PCKERMIT MAP
  687. CS       OBJ       CS.OBJ file supplied with Lattice C - Small model
  688. LCKFIO   OBJ
  689. LCKFNS1  OBJ
  690. LCKFNS2  OBJ
  691. LCKFNS3  OBJ
  692. LCKMAIN  OBJ
  693. LCKPROT  OBJ
  694. LCKTIO   OBJ
  695. LCKUSER  OBJ
  696. PCKERMIT UPD       PCKERMIT UPDate list of changes version to version
  697. LCKPROT  W         PROTOCOL State Table in WART pre-proccesor form.
  698.  
  699.  
  700. COLUMBIA UNIVERSITY
  701. -------------------
  702.  
  703. Columbia University maintains the Kermit protocol.  The
  704. following is taken from their file COMMER.DOC, which describes
  705. Columbia University's policy regarding commerical use of Kermit:
  706.  
  707. "              POLICY ON COMMERCIAL USE AND DISTRIBUTION OF KERMIT
  708.  
  709.                                  Frank da Cruz
  710.  
  711.               Columbia University Center for Computing Activities
  712.  
  713.                                    June 1984
  714.  
  715.  
  716. The KERMIT file transfer protocol has always been open, available, and free to
  717. all.  The protocol was developed at the Columbia University Center for
  718. Computing Activities, as were the first several KERMIT programs.  Columbia has
  719. shared these programs freely with the worldwide computing community since 1981,
  720. and as a result many individuals and institutions have contributed their own
  721. improvements or new implementations in the same spirit.  In this manner, the
  722. number of different systems supporting KERMIT implementations has grown from
  723. three to about sixty in less than three years.  If Columbia had elected to keep
  724. the protocol secret, to restrict access to source code, or to license the
  725. software, the protocol would never have spread to cover so many systems, nor
  726. would the programs be in use at so many sites, nor would the quality of many of
  727. the implemementations be so high.
  728.  
  729. Although KERMIT is free and available to anyone who requests it, it is not in
  730. the "public domain".  The protocol, the manuals, the Columbia implementations,
  731. and many of the contributed implementations bear copyright notices dated 1981
  732. or later, and include a legend like
  733.  
  734.   Permission is granted to any individual or institution to copy or use
  735.   this document and the programs described in it, except for explicitly
  736.   commercial purposes.
  737.  
  738. This copyright notice is to protect KERMIT, Columbia University, and the
  739. various contributors from having their work usurped by others and sold as a
  740. product.  In addition, the covering letter which we include with a KERMIT tape
  741. states that KERMIT can be passed along to others; "we ask only that profit not
  742. be your goal, credit be given where it is due, and that new material be sent
  743. back to us so that we can maintain a definitive and comprehensive set of KERMIT
  744. implementations".
  745.  
  746. Within this framework, it is acceptable to charge a reproduction fee when
  747. supplying KERMIT to others.  The reproduction fee may be designed to recover
  748. costs of media, packaging, printing, shipping, order processing, or any
  749. computer use required for reproduction.  The fee should not reflect any program
  750. or documentation development effort, and it should be be independent of how
  751. many implementations of KERMIT appear on the medium or where they came from.
  752. It should not be viewed as a license fee.  For instance, when Columbia ships a
  753. KERMIT tape, there is a $100.00 reproduction fee which includes a 2400' reel of
  754. magnetic tape, two printed manuals, various flyers, a box, and postage; there
  755. is an additional $100.00 order processing charge if an invoice must be sent.
  756. The tape includes all known versions of KERMIT, including sources and
  757. documentation.
  758.  
  759. Commercial institutions may make unlimited internal use of KERMIT.  However,
  760. a question raised with increasing frequency is whether a company may
  761. incorporate KERMIT into its products.  A hardware vendor may wish to include
  762. KERMIT with its standard software.  A software house may wish to incorporate
  763. KERMIT protocol into its communications package, or to distribute it along with
  764. some other product.  A timesharing vendor or dialup database may wish to
  765. provide KERMIT for downloading.  All these uses of KERMIT are permissible, with
  766. the following provisos:
  767.  
  768. . A KERMIT program may not be sold as a product in and of itself.  In addition
  769.   to violating the prevailing spirit of sharing and cooperation, commercial
  770.   sale of a product called "KERMIT" would violate the trade mark which is held
  771.   on that name by Henson Associates, Inc., creators of The Muppet Show.
  772.  
  773. . Existing KERMIT programs and documentation may be included with hardware or
  774.   other software as part of a standard package, provided the price of the
  775.   hardware or software product is not raised significantly beyond costs of
  776.   reproduction of the KERMIT component.
  777.  
  778. . KERMIT protocol may be included in a multi-protocol communication package as
  779.   one of the communication options, or as a communication feature of some
  780.   other kind of software package, in order to enhance the attractiveness of the
  781.   package.  KERMIT protocol file transfer and management should not be the
  782.   primary purpose of the package.  The price of the package should not be
  783.   raised significantly because KERMIT was included, and the vendor's literature
  784.   should make a statement to this effect.
  785.  
  786. . Credit for development of the KERMIT protocol should be given to the Columbia
  787.   University Center for Computing Activities, and customers should be advised
  788.   that KERMIT is available for many systems for only a nominal fee from
  789.   Columbia and from various user group organizations, such as DECUS and SHARE.
  790.  
  791. Columbia University holds the copyright on the KERMIT protocol, and may grant
  792. permission to any person or institution to develop a KERMIT program for any
  793. particular system.  A commercial institution that intends to distribute KERMIT
  794. under the conditions listed above should be aware that other implementations of
  795. KERMIT for the same system may appear in the standard KERMIT distribution at
  796. any time.  Columbia University encourages all developers of KERMIT software and
  797. documentation to contribute their work back to Columbia for further
  798. distribution.
  799.  
  800. Finally, Columbia University does not warrant in any way the KERMIT software
  801. nor the accuracy of any related documentation, and neither the authors of any
  802. KERMIT programs or documentation nor Columbia University acknowledge any
  803. liability resulting from program or documentation errors.
  804.  
  805. These are general guidelines, not a legal document to be searched for
  806. loopholes.  To date, KERMIT has been freely shared by all who have taken the
  807. time to do work on it, and no formal legalities have proven necessary.  The
  808. guidelines are designed to allow commercial enterprises to participate in the
  809. promulgation of KERMIT without seriously violating the KERMIT user community's
  810. trust that KERMIT will continue to spread and improve at no significant cost to
  811. themeselves.  The guidelines are subject to change at any time, should more
  812. formal detail prove necessary.
  813.  
  814. Commercial organizations wishing to provide KERMIT to their customers should
  815. write a letter stating their plans and their agreement to comply with the
  816. guidelines listed above.  The letter should be addressed to:
  817.  
  818.  
  819.         KERMIT Distribution
  820.         Columbia University Center for Computing Activities
  821.         612 West 115th Street
  822.         New York, NY  10025"
  823.  
  824.  
  825. PCKERMIT KNOWN PROBLEMS (BEWARE FILE)
  826. -------------------------------------
  827. 12/10/85
  828. PCKERMIT V1.18:
  829.  
  830. MAXIMUM PACKET SIZE LIMITED TO 90
  831.  
  832. The maximum packet send packet size is limited to 90.  This was done
  833. as a work-around to an undetermined problem in the code from Columbia
  834. which caused errors on some packets when a maximum packet size of
  835. 94 was requested by the receiver.  Even if the receiver allows a max
  836. packet size of 94 in the Send-Init exchange, PCKERMIT limits the actual
  837. size of packets it sends out to 90.  I believe this is done in one of the
  838. .H header files.
  839.  
  840.  
  841. TIMEOUT AVOIDANCE HEURISTIC
  842.  
  843. An additional heuristic is being added to the Kermit Sliding Window Definition
  844. to avoid unnecessary timeouts due to lost ACKs or NAKs.  This additional
  845. heuristic has not been implemented in V1.16 of PCKERMIT.EXE.
  846. The substance of the additional heuristic will be:
  847.  
  848. "An additional heuristic will prevent most timeouts due to lost ACKs
  849. or NAKs.  The sender re-sends the earliest packet (the packet blocking the
  850. window) if the following conditions are true:
  851.  
  852.    1. The Sender's window is blocked.
  853.    2. The Retry Count for the earliest packet is zero.
  854.    3. An ACK (or optionally also NAK) for any later packet has been received."
  855.  
  856.  
  857. This heuristic takes advantage of the fact that ACKs and NAKs should
  858. normally be received in order.  Receipt of a later ACK implies that the
  859. earliest ACK was lost.  Therefore, we can anticipate that a timeout is
  860. likely to occur and avoid it by resending (once) the packet blocking the
  861. window.  The packet is only sent once (i.e. if the retry count is
  862. zero) to avoid complicating error recovery.
  863.  
  864.  
  865. SOURCE CODE COMPATIBILITY WITH OTHER COMPILERS
  866.  
  867.  1. There is a reportedly a bug in the Microsoft C Compiler which causes an
  868.     error in the Kermit Type 3 (CRC-16) Checksum algorithm.  Beware!
  869.  
  870.  2. Lattice C allows nested comments, which are not allowed by the Microsoft
  871.     C compiler.  Their may be some instances of nested comments.  LCKFNS3
  872.     has at least one area that was commented out that results in a nested
  873.     comment.
  874.  
  875. FILE RENAMING WHEN DUPLICATE FILE NAME IS RECEIVED
  876.  
  877. Long filenames can duplicate existing filenames because they are not
  878. evaluated by PCKERMIT.  The long filename is sent to DOS, which truncates
  879. it to the first FILENAME.EXT characters.
  880.  
  881. In general, renaming works for most standard MS-DOS files.  However, there
  882. are some remaining bugs which reflect the UNIX origins of this code.
  883. Developers may wish to take a close look at this area.
  884.  
  885. The addition of ~1, etc, after the filename is not ideal in the MS-DOS
  886. environment because the extension is completely lost.  Often files are being
  887. received with same root but different extensions. If they are updates, it
  888. may take a while to sort things out.
  889.  
  890. This logic is implemented in LCKFIO.C in the routine ZNEWN.
  891.  
  892. SLIDING WINDOW DEFINITION
  893. -------------------------
  894.  
  895. The Kermit sliding window extension is defined in the file KWINDOW5.DOC.
  896. If the definition is unclear or ambiguous to you in any respect, please
  897. contact Columbia University or Source Telecomputing at the address below.
  898.  
  899.  
  900. SLIDING WINDOW KERMIT STANDARDIZATION
  901. -------------------------------------
  902.  
  903. The Kermit Sliding Window Definition is still labeled experimental by
  904. Columbia University in order to help iron out all problems before the
  905. final definition is published and to aid in coordinating efforts on
  906. sliding window Kermits.
  907.  
  908. For the time being, we suggest developers can help the standardization
  909. process by testing their implementations with the following Kermits:
  910.  
  911.    PCKERMIT.EXE                                   (Sliding window Kermit)
  912.    The Source                                     (Sliding window Kermit)
  913.    MSKERMIT version 2.28 from Columbia University (Classic Kermit)
  914.  
  915.  
  916.  
  917. TCOMM BBS
  918. ---------
  919.  
  920.    A bulletin board at 301-428-7931 (data only 300/1200/2400) is
  921.    providing informal support for sliding window Kermit.
  922.    This is a Maryland number.
  923.  
  924.  
  925. CORRECTIONS, QUESTIONS, COMMENTS
  926. --------------------------------
  927.  
  928. Please send all corrections, questions and comments to:
  929.  
  930.     John Mulligan
  931.     Source Telecomputing Corporation
  932.     1616 Anderson Road
  933.     McLean, VA 22102
  934.     703-734-7500
  935.     SourceMail: STC356
  936.  
  937.     Columbia University System Mail: We are OC.SOURCE on system CU20B.
  938.