home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / protocol / remote-set.txt < prev    next >
Internet Message Format  |  2020-01-01  |  11KB

  1. Date: Mon, 11 Dec 89 19:15:07 EST
  2. >From: Christine M Gianone <cmg@watsun.cc.columbia.edu>
  3. Subject: Proposal for REMOTE SET Extension to the Kermit Protocol
  4. Keywords: Kermit Protocol, REMOTE SET Command
  5.  
  6. PROBLEM:
  7.  
  8. Certain Kermit programs (including MS-Kermit 3.0, C-Kermit 4F) include
  9. information about whether a file is text or binary in the File Attribute
  10. packet, so the receiver can put itself into the right mode automatically.  But
  11. when talking to a server there is no way for the client program, before
  12. issuing a GET command, to tell the server whether to send the file in text or
  13. binary mode.  This problem extends to various other protocol and file-related
  14. parameters.
  15.  
  16. NOTE:
  17.  
  18. The Kermit protocol definition includes a REMOTE KERMIT command, and the
  19. associated packet format and protocol.  It lets the user of the client program
  20. issue a command to the server in its own interactive-mode command language.
  21. But this is not a totally satisfactory answer because the syntax of Kermit
  22. programs can and does vary and, perhaps more to the point, some Kermit
  23. programs do not have an interactive command mode at all (Macintosh Kermit is
  24. one example).  What is needed is a standard mechanism and syntax that can
  25. apply to all Kermit programs uniformly.
  26.  
  27. SOLUTION:
  28.  
  29. A new addition to the Kermit protocol: REMOTE SET.
  30.  
  31. REMOTE SET would be a Generic Kermit Server command.  A generic command looks
  32.  
  33. INFO-KERMIT DIGEST V11 #1                                                Page 5
  34.  
  35. like this:
  36.  
  37.     +-----+---------------------------------+
  38.     |  G  | x <len1> <op1> <len2> <op2> ... |
  39.     +-----+---------------------------------+
  40.      Type   Data
  41.  
  42. where "x" is the generic command, a single letter.  The letter S is not yet in
  43. use, so let's define S to mean SET.  The S is followed by a single operand,
  44. which includes a single-character length field, similar to other generic
  45. command packets.
  46.  
  47. The parameters which may be SET remotely are the ones having to do with file
  48. transfer and Kermit protocol in general, not system-dependent or
  49. communications-dependent parameters, since these must already have been set
  50. prior to making the initial connection, and must be set correctly in any event
  51. BEFORE you can successfully send a REMOTE SET (or any other) packet to the
  52. server.
  53.  
  54. The most needed REMOTE SET command is REMOTE SET FILE TYPE {TEXT,BINARY}, but
  55. the others should be specified in the protocol too.  Numeric codes are
  56. assigned to the parameters and values, so that the mechanism for conveying
  57. this information is system- and language-independent and reasonably compact.
  58. The REMOTE SET command does exactly what the corresponding SET command would
  59. do if it had been given to the remote server as an interactive command before
  60. it entered server mode.
  61.  
  62.   Command                                Code   Values
  63.  
  64.   REMOTE SET ATTRIBUTES IN ALL            132   0 = OFF, 1 = ON
  65.   REMOTE SET ATTRIBUTES IN LENGTH         133   0 = OFF, 1 = ON
  66.   REMOTE SET ATTRIBUTES IN TYPE           134   0 = OFF, 1 = ON
  67.   REMOTE SET ATTRIBUTES IN DATE           135   0 = OFF, 1 = ON
  68.   REMOTE SET ATTRIBUTES IN CREATOR        136   0 = OFF, 1 = ON
  69.   REMOTE SET ATTRIBUTES IN ACCOUNT        137   0 = OFF, 1 = ON
  70.   REMOTE SET ATTRIBUTES IN AREA           138   0 = OFF, 1 = ON
  71.   REMOTE SET ATTRIBUTES IN BLOCK-SIZE     139   0 = OFF, 1 = ON
  72.   REMOTE SET ATTRIBUTES IN ACCESS         140   0 = OFF, 1 = ON
  73.   REMOTE SET ATTRIBUTES IN ENCODING       141   0 = OFF, 1 = ON
  74.   REMOTE SET ATTRIBUTES IN DISPOSITION    142   0 = OFF, 1 = ON
  75.   REMOTE SET ATTRIBUTES IN PROTECTION     143   0 = OFF, 1 = ON
  76.   REMOTE SET ATTRIBUTES IN GPROTECTION    144   0 = OFF, 1 = ON
  77.   REMOTE SET ATTRIBUTES IN SYSTEM-ID      145   0 = OFF, 1 = ON
  78.   REMOTE SET ATTRIBUTES IN FORMAT         146   0 = OFF, 1 = ON
  79.   REMOTE SET ATTRIBUTES IN SYS-INFO       147   0 = OFF, 1 = ON
  80.   REMOTE SET ATTRIBUTES IN BYTE-COUNT     148   0 = OFF, 1 = ON
  81.  
  82.   REMOTE SET ATTRIBUTES OUT ALL           232   0 = OFF, 1 = ON
  83.   REMOTE SET ATTRIBUTES OUT LENGTH        233   0 = OFF, 1 = ON
  84.   REMOTE SET ATTRIBUTES OUT TYPE          234   0 = OFF, 1 = ON
  85.   REMOTE SET ATTRIBUTES OUT DATE          235   0 = OFF, 1 = ON
  86.   REMOTE SET ATTRIBUTES OUT CREATOR       236   0 = OFF, 1 = ON
  87.   REMOTE SET ATTRIBUTES OUT ACCOUNT       237   0 = OFF, 1 = ON
  88.   REMOTE SET ATTRIBUTES OUT AREA          238   0 = OFF, 1 = ON
  89.   REMOTE SET ATTRIBUTES OUT BLOCK-SIZE    239   0 = OFF, 1 = ON
  90.   REMOTE SET ATTRIBUTES OUT ACCESS        240   0 = OFF, 1 = ON
  91.  
  92. Page 6                                                INFO-KERMIT DIGEST V11 #1
  93.  
  94.   REMOTE SET ATTRIBUTES OUT ENCODING      241   0 = OFF, 1 = ON
  95.   REMOTE SET ATTRIBUTES OUT DISPOSITION   242   0 = OFF, 1 = ON
  96.   REMOTE SET ATTRIBUTES OUT PROTECTION    243   0 = OFF, 1 = ON
  97.   REMOTE SET ATTRIBUTES OUT GPROTECTION   244   0 = OFF, 1 = ON
  98.   REMOTE SET ATTRIBUTES OUT SYSTEM-ID     245   0 = OFF, 1 = ON
  99.   REMOTE SET ATTRIBUTES OUT FORMAT        246   0 = OFF, 1 = ON
  100.   REMOTE SET ATTRIBUTES OUT SYS-INFO      247   0 = OFF, 1 = ON
  101.   REMOTE SET ATTRIBUTES OUT BYTE-COUNT    248   0 = OFF, 1 = ON
  102.  
  103.   REMOTE SET FILE TYPE                    300   0 = TEXT, 1 = BINARY
  104.   REMOTE SET FILE NAMES                   301   0 = CONVERTED, 1 = LITERAL
  105.   REMOTE SET FILE COLLISION               302   0 = RENAME,  1 = REPLACE,
  106.                                                 2 = BACKUP,  3 = APPEND,
  107.                                                 4 = DISCARD, 4 = ASK
  108.   REMOTE SET FILE REPLACE                 303   0 = PRESERVE, 1 = DEFAULT
  109.   REMOTE SET FILE INCOMPLETE              310   0 = DISCARD, 1 = KEEP
  110.   REMOTE SET INCOMPLETE (same as above)
  111.  
  112.   REMOTE SET BLOCK-CHECK                  400   number (1, 2, or 3)
  113.   REMOTE SET RECEIVE PACKET-LENGTH        401   number (10-9024)
  114.   REMOTE SET RECEIVE TIMEOUT              402   number (any, 0 = no timeout)
  115.   REMOTE SET RETRY                        403   number (any, 0 = no limit)
  116.   REMOTE SET SERVER TIMEOUT               404   number (any, 0 = no timeout)
  117.   REMOTE SET TRANSFER CHARACTER-SET       405   Character Set Designator
  118.   REMOTE SET WINDOW-SLOTS                 406   number (1-31)
  119.  
  120. One Kermit program should not have knowledge of another Kermit program's local
  121. character sets, therefore REMOTE SET FILE CHARACTER-SET is not included.  The
  122. Transfer Character Set Designator is the one described in the "ISO/Kermit"
  123. proposal.  For example "I2/100" (ISO Latin Alphabet 1), "I2/144" (ISO
  124. Latin/Cyrillic), or "I14/13" (Japanese Roman/Katakana).  The command would
  125. use the name (for example REMOTE SET TRANSFER CHARACTER-SET LATIN1) and the
  126. generic server command packet would use the corresponding designator.
  127.  
  128. REMOTE SET LANGUAGE is omitted for the present, but can be added later.  The
  129. problem here is assigning a unique code to each of the world's languages.
  130.  
  131. The numbers shown for the codes and values are expressed as character
  132. strings composed of ASCII digits, 0-9.  Here are examples, showing the TYPE
  133. and DATA fields of the Kermit packet:
  134.  
  135.   GS#101!0      = REMOTE SET ATTRIBUTE LENGTH OFF
  136.   GS#202!0      = REMOTE SET ATTRIBUTE TYPE OFF
  137.   GS#300!1      = REMOTE SET FILE TYPE BINARY
  138.   GS#400!2      = REMOTE SET BLOCK CHECK 2
  139.   GS#401$1000   = REMOTE SET RECEIVE PACKET-LENGTH 1000
  140.   GS#405&I2/100 = REMOTE SET TRANSFER CHARACTER-SET LATIN-1
  141.  
  142. ORGANIZATION AND EXPANSION:
  143.  
  144. The codes are numeric strings, with the hundred's place assigned roughly
  145. according to "topic": 100's for Incoming Attributes, 200's for Outbound
  146. Attributes, 300's for file-related items, and 400's for packet-related items.
  147. Note that the SET ATTRIBUTE codes are equal to 100 or 200 plus the value of
  148. the corresponding attribute designator.  There is plenty of room for expansion
  149. within each category, and new categories can be added as required.
  150.  
  151. INFO-KERMIT DIGEST V11 #1                                                Page 7
  152.  
  153.  
  154. PROTOCOL:
  155.  
  156. The person using the client Kermit program issues a REMOTE SET command for
  157. a single parameter, such as REMOTE SET FILE TYPE BINARY.  The program forms
  158. the corresponding G packet and sends it to the server.
  159.  
  160. The server program can respond in any of the following ways, and the client
  161. program should be prepared for each kind of response:
  162.  
  163.   E-packet:  An Error packet.  The server does not understand REMOTE SET
  164.              packets, or it is not able to perform the specific SET that was
  165.              requested.  Therefore the client must not assume that the SET has
  166.              been done, and if it is in local mode, it must give a message to
  167.              the user, as described below.
  168.  
  169.   Y-packet:  An Acknowledgement.  The server accepted the command, and
  170.              performed the requested SET.  The data field of the Y-packet can
  171.              be empty, to indicate that the requested value was accepted.  Or
  172.              it can contain the value which the server actually set.  For
  173.              example, the user types REMOTE SET RECEIVE PACKET-LENGTH 5000 but
  174.              the server only supports lengths up to 1000:
  175.  
  176.         To server -->  GS#400$5000
  177.                    Y1000        <-- To client
  178.  
  179. CLIENT IMPLEMENTATION:
  180.  
  181. A client can include support for any number of the REMOTE SET commands, or
  182. none at all.  A minimal implementation might include only REMOTE SET FILE
  183. TYPE.  This would include addition of the command to the program's command
  184. tables, code to send the generic packet, and code to interpret the response
  185. and issue any appropriate messages to the user, like the contents of the
  186. error packet data field, or any altered value that the server sent back in
  187. the data field of an acknowledgement.  Examples:
  188.  
  189.     REMOTE SET command succeeded
  190.     REMOTE SET value changed to 1000
  191.     REMOTE SET command failed: <reason from data field of E-packet>
  192.  
  193. SERVER IMPLEMENTATION:
  194.  
  195. A server can also include support for any number of the REMOTE SET commands,
  196. or none at all.  If it supports none at all, then it will automatically
  197. respond to a REMOTE SET packet with an error packet containing a message
  198. like "Unimplemented REMOTE command".
  199.  
  200. If the server receives a REMOTE SET packet for a parameter it does not support
  201. the REMOTE SETting of, then it should respond with an error packet containing
  202. the message "Unknown REMOTE SET parameter".
  203.  
  204. If the server gets a REMOTE SET packet for a parameter which is known to it,
  205. then it should:
  206.  
  207. (a) Set the parameter to the requested value and respond with an empty Y
  208.     packet, or:
  209.  
  210. Page 8                                                INFO-KERMIT DIGEST V11 #1
  211.  
  212.  
  213. (b) If the requested value exceeds the server's maximum value for the
  214.     parameter, set it to its own maximum value and respond with a Y packet
  215.     containing the new value in its data field, as in the packet-length
  216.     example above.
  217.  
  218. If the server is a "permanent" Kermit server which cannot be terminated using
  219. BYE or FINISH, then when the user disengages from it using BYE, FINISH, or
  220. LOGOUT, then when the server receives a BYE, FINISH, or LOGOUT command, it
  221. should revert any parameters that were changed by REMOTE SET back to the
  222. values that were in use when server mode was entered.
  223.  
  224. Thanks to Joe Doupnik and John Chandler for their assistance in the design
  225. of this protocol extension.
  226.