home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / protocol / message-packets.txt < prev    next >
Text File  |  2020-01-01  |  7KB  |  123 lines

  1. 12-Sep-88 16:02:20-GMT,6920;000000000001
  2. Received: by cunixc.cc.columbia.edu (5.54/5.10) id AA28860; Mon, 12 Sep 88 12:02:16 EDT
  3. Date: Mon, 12 Sep 1988 12:02:15 EDT
  4. From: Christine M Gianone <cmg@cunixc.cc.columbia.edu>
  5. To: Frank da Cruz <fdc@cunixc.cc.columbia.edu>
  6. Subject: [Frank da Cruz <fdc@cunixc.cc.columbia.edu> : Messages in ACKs, etc.
  7.         ]
  8. Message-Id: <CMM.0.88.590083335.cmg@cunixc.cc.columbia.edu>
  9.  
  10. ...
  11.                 ---------------
  12.  
  13. Received: by cunixc.cc.columbia.edu (5.54/5.10) id AA02888; Thu, 8 Sep 88 21:56:36 EDT
  14. Date: Thu, 8 Sep 1988 21:56:34 EDT
  15. From: Frank da Cruz <fdc@cunixc.cc.columbia.edu>
  16. To: Joe Doupnik <jrd@usu.bitnet>
  17. Cc: Christine M Gianone <cmg@cunixc.cc.columbia.edu>, RAF@NIHCU.BITNET,
  18.         TUB@NIHCU.BITNET, WJS@NIHCU.BITNET
  19. Subject: Messages in ACKs, etc. 
  20. Message-Id: <CMM.0.88.589773394.fdc@cunixc.cc.columbia.edu>
  21.  
  22. Just got back from vacation a couple days ago, and have been looking at
  23. your messages about putting text in ACK data fields.  I think this could be
  24. added to the Kermit protocol pretty easily.
  25.  
  26. This discussion can only apply to ACKs in reply to Data packets.  ACKs to S,
  27. I, or A packets have special data, and ACKs to F or X packets may contain
  28. free-form text, normally a filename or heading.  ACKs to Data packets may
  29. contain an X or a Z to request the sender to quit sending the current file, or
  30. the entire group.  Currently, any data other than X or Z as the first
  31. character in the ACK to a Data packet is ignored.  Therefore, as you've
  32. pointed out, adding a new protocol character in this position would not affect
  33. existing Kermits.
  34.  
  35. So let's make the character M for Message, and any following text may be
  36. displayed, or stored in a message box for later perusal, or put into the
  37. transaction log, or any combination of these.  As Joe points out, the text
  38. should be encoded -- that's the rule for all packets except S, I, and A
  39. packets and the ACKs to these packets.
  40.  
  41. About the message length...  The file sender tells the receiver the maximum
  42. length packet it's prepared to receive, so that should also be the limit
  43. (allowing for control fields) on the length of the ACK message.  The same deal
  44. as for E packets, which can also go from receiver to sender.  Joe thinks
  45. messages shouldn't be longer than 40 characters, but that's due to a
  46. peculiarity in MS-DOS Kermit's file transfer screen display, and we shouldn't
  47. hold the world to that.  A good project for somebody (other than Joe, who has
  48. more important things to worry about!) would be to reorganize this display
  49. into separate windows, scrolling regions for debug display, messages,
  50. warnings, etc.  Of course the problem here is that you lose portability to
  51. non-IBM-compatible machines.
  52.  
  53. E packets are always guaranteed to contain a "complete" message, in the
  54. sense that it's the last packet you'll ever get.  Therefore, the data field
  55. contains only the text of the error message.  But now we're allowing for the
  56. possibility of longer, "continued" messages, so should these contain
  57. formatting characters, like CR and LF?  This would allow multiline messages,
  58. even paragraphs to be sent down the "reverse channel".  If so, then a short
  59. one-liner should be terminated with CRLF, which seems wasteful and is
  60. inconsistent with E-packet format.  We could also stipulate that CRLF should
  61. separate lines, but need not terminate the last one...
  62.  
  63. If we carry this idea one step further, we could even have bidirectional
  64. file transfer.  A fairly useless feature, but one which certain commercial
  65. packages love to brag about.  Actually it's useful in certain situations, like
  66. in UUCP or FIDO networks, where computers call each other up late at night and
  67. exchange a day's worth of queued up mail.  
  68.  
  69. This is a really silly idea, but it's worth thinking about for a minute...
  70. If we somehow specify that we're transferring files in both directions at
  71. once, how could this work?  Well, the Send-Init exchange is symmetrical and
  72. does all we want -- both sides tell each other their parameters and features.
  73. With the F-packet and its ACK, each side tells the other the name of the file
  74. that is coming (this is obviously different from the current meaning of a
  75. filename in the F-packet ACK).  And during the data transfer phase, the file
  76. receiver sends its file back in ACK packets with, say, a "D" as the first
  77. character.  The ACKs to the Z and B packets would act just like the Z and B
  78. packets themselves.
  79.  
  80. Pretty screwy, huh?  What about problems?  How would the "sender" be able to
  81. "NAK" bad data from the "receiver"?  No problem, the same way as now.  Just
  82. resend its previous packet.  The only real headache comes from the fact that
  83. the files will not be the same size, and therefore one side finishes sending
  84. before the other.  What if the sender has the bigger file?  Then the receiver
  85. runs out of data to send in its ACKs.  So big deal, it just sends empty ACKs,
  86. and no harm is done.  But what if the receiver has the bigger file?  When the
  87. sender has sent its final data packet, it checks whether the acknowledgment
  88. has any data in it.  If so, it keeps sending empty data packets until it gets
  89. an empty ACK (by empty I mean a non-D ACK), bumping the packet number each
  90. time to indicate acknowledgement, or failing to bump it if bad data arrived.
  91. Upon receiving the empty ACK, the sender would send its Z packet.
  92.  
  93. If the sender had more files to send than the receiver, again, no problem.  If
  94. the receiver has more files than the sender...  too bad, maybe it should have
  95. been the sender after all.  Other problems include Attribute packets (the
  96. exchange is not symmetrical), how to handle file cancellation, etc...
  97.  
  98. I don't know how I got off on this tangent...  Joe, this sounds like a good
  99. project for one of your students!  Now back to reality.  Are we agreed on the
  100. ACK message business?  I like "M" rather than blank for the message indicator,
  101. because it looks more like a real protocol item, and allows for other
  102. extensions, like the aforementioned "D".  Also, maybe it should be stated
  103. formally somewhere (like in the next edition of the book?) that the ACK to the
  104. F packet may be used to return the name under which the file will be stored.
  105. And shall we allow for imbedded CRLFs in ACK-messages, but not require a CRLF
  106. at the end?
  107.  
  108. By the way, another reason for using "M" is that someone in the UK (Chris
  109. Kennington) once inveigled me into agreeing that there should also be
  110. allowance for messages in the SAME direction as the data (we also agreed that
  111. ACKs could be used in the reverse direction).  After some discussion, we
  112. concluded that a separate packet type was necessary, and called it "M".
  113. M-packets can be interleaved with data packets.  But, of course, since this is
  114. a new packet type, its use must be negotiated, and capability bit #6 (which
  115. overflows into the second capability byte) was assigned for this.  Another
  116. item for the second edition...
  117.  
  118. This was fun, haven't invented new Kermit stuff for a long time!
  119.  
  120. - Frank
  121.  
  122.  
  123.