⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc122.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 4 页
字号:
   Each of the fields 'FILENAME','ACCESS PASSWORD', 'MODIFICATION   PASSWORD', and 'NEW FILENAME' is further divided into the following   subfields:      8         8*LENGTH   ________________________//___  |        |                    |  | LENGTH | FILENAME/PASSWORD  |  |________|_______________//___|   where the 'LENGTH' subfield contains the length in 8-bit characters   of the 'FILENAME/PASSWORD' subfield.   This is the _general_ format for all SMFS commands.  No one command   type requires all of the fields specified above.  A particular subset   of these fields is defined for each type of command, and only those   fields should appear.  The defined fields for each command type are   indicated in Figure 3.   Furthermore, not all of the fields which are defined for a particular   command type need always appear _explicitly_.  The user should   envision that SMFS maintains filename, password, and bit-count   accumulators.  Every time a filename (or new filename),J. White                                                       [Page 11]RFC 122                Simple-Minded file System              April 1971   access/modification password, or bit count appears explicitly in the   input stream, it is saved in the appropriate accumulator (a null   password -- designated by setting Bits 0,3 or Bits 8,11 to zero   (Figure 4) -- should be thought of as appearing explicitly).  The   user may cause a defined field to _default_ to the current contents   of the appropriate accumulator by turning on the appropriate bin in   the flags field (see Figure 4).  When a field defaults in this   manner, that field is said to appear _implicitly_ in the command.         NOP                        0                 No operation.         FNO                        1                 File no operation.         ALF                        2                 Allocate file.         UDF                        3                 Update File.         RPF                        4                 Replace File.         RTF                        5                 Retrieve File.         SPF                        6                 Space File.         DLF                        7                 Delete File.         RNF                        8                 Rename File.                                Figure 2                             Command Op codes   The three accumulators are initially empty and hence an attempt to   default a field in the first command in the input stream illicits an   error indication.  A field of the appropriate type must appear once   explicitly in the input stream before the corresponding accumulator   is considered defined.  Furthermore, whenever SMFS detects an invalid   filename or password (i.e., improper length or deviation from the   character set) in the input stream, the appropriate accumulator is   left empty again.   SMFS allows operations on several files to be interleaved in the   input stream by including in its command formats provision for   explicitly specifying filename and password information in each   command.  When many operations involving the same file appear   sequentially in the input stream, the user need only let the   appropriate fields default in all but the first command, avoiding   re-transmission of what would otherwise be redundant parameters.J. White                                                       [Page 12]RFC 122                Simple-Minded file System              April 1971                                          M                                          O                                          D                                          I                                          F                                          I                                  A       C                                  C       A                                  C       T                                  E       I      N                                  S       O      E                                  S       N      W                                                       B                            F     P       P      F     I            O               I     A       A      I     T            P               L     S       S      L                    F       E     S       S      E     C            C       L       N     W       W      N     O     D            O       A       A     O       O      A     U     A            D       G       M     R       R      M     N     T            E       S       E     D       D      E     T     A   _____________________________________________________________   ALF      X       X       X     X       X            X   _____________________________________________________________   UDF      X       X       X             X            X     X   _____________________________________________________________   RPF      X       X       X             X            X     X   _____________________________________________________________   RTF      X       X       X     X                    X   _____________________________________________________________   SPF      X       X       X     X                    X   _____________________________________________________________   DLF      X       X       X             X   _____________________________________________________________   RNF      X       X       X             X      X   _____________________________________________________________   FNO      X   _____________________________________________________________   NOP      X   _____________________________________________________________                               Figure 3                         Defined Command Fields        Note: Command fields marked with an 'X' are defined.J. White                                                       [Page 13]RFC 122                Simple-Minded file System              April 1971   0   ACCESS PASSWORD        The access password for this       DEFAULTS               operation defaults to the access                              or modification password which                              appeared explicitly most                              recently in the input stream;                              hence, it does not appear                              explicitly in the current                              command.   1   BIT COUNT DEFAULTS     The bit count for this operation                              defaults to that which appeared                              explicitly most recently in the                              input stream; hence it does not                              appear explicitly in the current                              command.   2   FILENAME DEFAULTS      The filename for this operation                              defaults to the filename or new                              filename which appeared explicitly                              most recently in the input stream;                              hence it does not appear                              explicitly in the current command.   3   ACCESS PASSWORD        The access password for this       APPEARS EXPLICITLY     operation appears explicitly in                              the current command. (Bits 0,                              3 = 0 indicates that no access                              password was/is-to-be defined                              for the file.)   4   ECHO OP CODE           SMFS shall echo the op code and       AND FILENAME           filename (whether it appears                              explicitly or not) by copying                              them into the output stream                              ahead of any other response to                              the current command.   5-7 undefined              Not examined; should be zeros.   8   MODIFICATION           Same as Bit 0, but applied to       PASSWORD DEFAULTS      the modification password, rather                              than the access password.                         Figure 4              Definition of Command FLAGS BitsJ. White                                                       [Page 14]RFC 122                Simple-Minded file System              April 1971   9   FILE FORMATTED         FOR UDF/RTF: this segment is part                              of a formatted file; hence SMFS                              should record the bit count. For                              RTF/SPF: the referenced file is                              formatted; hence the bit count                              does not appear explicitly in the                              current command   10   NEW FILENAME          same as Bit 2, but applied        DEFAULTS              to the new filename, rather                              than the filename.   11   MODIFICATION PASSWORD Same as Bit 3, but applied to        APPEARS EXPLICITLY    the modification password,                              rather than the access                              password.   12-15 undefined            Not examined; should be zeros.                      Figure 4(continued)                 Definition of Command FLAGS Bits      Note: The sixteen bits of FLAGS are numbered 0-15 from         left to right.   When a series of RTF/SPF operations referencing the same file are   juxtaposed in the input stream (as discussed in Section V.D.), they   cause successive segments of the file to be transmitted _only_ if   both filename and access password default (Bits 0,2 = 1) (a null   password is also acceptable) in those operations following the first   in the series.  If the user specifies either parameter explicitly in   a command in the series -- even if the explicitly stated value is the   same as what would have been the default value -- SMFS considers the   series terminated, as if a FNO had been encountered, and hence the   command in question returns, or flushes, the first segment of the   file.  Allowing both filename and password to default has the added   effect, in both RTF/SPF and UDF series, of decreasing the processing   time required by SMFS to execute the operations which comprise the   series.  Under such circumstances, SMFS executes such initial   functions as file location and password verification only once at the   beginning of the series, rather than for each operation.  Hence, a   potential for increased transmission rates exists.  Furthermore, in   such a series of UDF/RPF operations, SMFS is able to conserve   secondary storage by concatenating file segments before they are   written out.J. White                                                       [Page 15]RFC 122                Simple-Minded file System              April 1971   Whenever SMFS aborts the processing of a command in the input stream   (e.g., the filename is invalid, an incorrect password is supplied,   etc), SMFS flushes the entire command.  Suppose, for example, that   the file specified in a UDF operation does not exist (i.e., has not   been allocated).  If the data field for the operation is very long,   SMFS may well detect the non-existence of the file before the data   field has been transmitted by the user.  In such cases, SMFS will   accept and flush whatever remains of the aborted command (in this   case, including the very long data field) until it reaches the point   in the input stream at which it expects to find the next command,   which it will process normally.  SMFS will, however, notify the user   that the command was aborted by placing an appropriate indicator in   the output stream, and it will do this as soon as it detects the   error (and hence, in this case, before the erroneous command has been   flushed from the input stream).  Hence, the user has the option of   aborting the process by closing the connection.   SMFS considers a command with an invalid op code as an especially   severe error, since it has no way of locating the start of the next   command.  Accordingly, it places a special character (X'FF') in the   output stream, follows it with the invalid op code, and then closes   its connections to the user.VII.  Output Stream Format   SMFS will respond to each command it extracts from the input stream   -- every command except FNO and NOP -- by placing a command response   in the output stream.  Command responses have the following general   format:       8                8       32     _________//___________________________//____    | OP  |          | CMPL |         |          |    |CODE | FILENAME | CODE |BIT COUNT|  DATA    |    |_____|___//_____|______|_________|____//____|   where the lengths of fixed-length fields have been indicated in bits.   The field 'FILENAME' is further divided into the following subfields:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -