跳到主要内容

VII. 输出流格式

SMFS 将通过在输出流中放置一条命令响应来应答它从输入流中取出的每条命令——FNO 和 NOP 除外。命令响应具有如下通用格式:

      8                8       32
_________//___________________________//____
| OP | | CMPL | | |
|CODE | FILENAME | CODE |BIT COUNT| DATA |
|_____|___//_____|______|_________|____//____|

其中定长字段的长度以比特标注。'FILENAME'(文件名)字段又进一步划分为如下子字段:

        8         8*LENGTH
_______________//______
| | |
| LENGTH | FILENAME |
|________|______//______|

其中 'LENGTH'(长度)子字段包含 'FILENAME' 子字段的长度(以 8 位字符计)。

这是 SMFS 命令响应的通用格式。对于对特定命令的响应,并非所有字段都会出现。每种命令响应类型都定义了这些字段的一个特定子集;不会出现其他字段。每种命令响应类型定义的字段见图 5。

'OP CODE'(操作码)和 'FILENAME'(文件名)字段是 SMFS 从输入流中提取的操作码和文件名,由 SMFS 在输出流中回显。文件名总是被显式回显,即使它在输入流中是隐式出现的。当相应命令的 'FLAGS' 字段的第 4 位被置为 0 时,'OP CODE' 和 'FILENAME' 被抑制,因而不会出现在命令响应中。

'CMPL CODE'(完成码)包含操作结果的指示。如果操作成功完成,'CMPL CODE' 的值等于所执行命令的操作码。因此,如果 'OP CODE' 和 'FILENAME' 的回显未被抑制,则当且仅当 'OP CODE' 与 'CMPL CODE' 相同时操作才成功。如果操作不成功,'CMPL CODE' 包含 SMFS 在处理命令时遇到错误的指示。完成码汇总于图 6。

                              C
O
M
P
L
E
F T B
I I I
O L O T
C N C O D
O A O U A
D M D N T
E E E T A
_____________________________________________________

NOP
_____________________________________________________

FNO
_____________________________________________________

ALF X X X
_____________________________________________________

UDF X X X
_____________________________________________________

RPF X X X
_____________________________________________________

RTF X X X X X
_____________________________________________________

SPF X X X X
_____________________________________________________

DLF X X X
_____________________________________________________

RNF X X X
_____________________________________________________

图 5

定义的命令响应字段 (Defined Command Response Fields)

注:标有 'X' 的命令响应字段为已定义字段。

输入流中出现无效操作码构成一类特殊错误。SMFS 的响应如下:构造一个特殊的命令响应,它由一个八位字段中的值 X'FF' 和其后同样位于八位字段中的错误操作码组成。该命令响应被放入输出流,随后关闭与用户的连接。

      2  ALLOCATION SUCCESSFUL   The file was successfully allocated.

      3  UPDATE SUCCESSFUL       The file was successfully updated.

      4  REPLACE SUCCESSFUL      The file was successfully replaced.

      5  RETRIEVE SUCCESSFUL     The file segment was successfully
                                 retrieved.

      6  SPACE SUCCESSFUL        The file segment was successfully
                                 flushed.

      7  DELETION SUCCESSFUL     The file was successfully deleted.

      8  RENAME SUCCESSFUL       The file was successfully renamed.

     20  NO DEFAULT FILENAME     The user attempted to default the
                                 filename (or new filename), and the
                                 filename accumulator was empty.

     21  ZERO-LENGTH FILENAME    The length of the filename (or new
                                 filename) was specified as zero.

     22  FILENAME TOO LONG       The length of the filename (or new
                                 filename) exceeded 36 characters.

     23  INVALID FILENAME        The filename (or new filename)
                                 contained character(s) that do not
                                 appear in the character set.

     24  NO DEFAULT PASSWORD     The user attempted to default either
                                 the access or modification password,
                                 and the password accumulator was empty.

     25  ZERO-LENGTH PASSWORD    The length of either the access of
                                 modification password was specified as
                                 zero.

                                图 6

                        完成码 (Completion Codes)

     26  PASSWORD TOO LONG       The length of either the access or
                                 modification password exceeded 36
                                 characters.

     27  NO DEFAULT BIT COUNT    The user attempted to default the bit
                                 count, and the bit-count accumulator
                                 was empty.

     28  INVALID PASSWORD        Either the access or modification
                                 password contained character(s) that do
                                 not appear in the character set.

     29  DUPLICATE FILENAME      Either the filename (in an ALF
                                 operation) or new filename (in a RNF
                                 operation) is already assigned to
                                 another file.

     30  INSUFFICIENT SPACE      (In an ALF operation) The requested
                                 amount of secondary storage is
                                 unavailable.

     31  ALLOCATION I/O ERROR    (In an ALF operation) An irrecoverable
                                 I/O error was encountered by SMFS while
                                 attempting to allocate the file.

     32  FILE NOT FOUND          The referenced file does not exist.

     33  SEARCH I/O ERROR        An irrecoverable I/O error was
                                 encountered by SMFS while attempting to
                                 locate the referenced file.

     34  FILE FULL               (In a UDF/RPF operation) The secondary
                                 storage allocated to the file has been
                                 exhausted.

     35  INCORRECT PASSWORD      The access or modification password
                                 supplied by the user does not match
                                 that declared when the file was
                                 allocated.

     36  FILE SIZE TOO SMALL     (In an ALF operation) The bit count
                                 specified is less than the minimum file
                                 size accepted by SMFS.

                          图 6(续)

                        完成码 (Completion Codes)

     37  FILE SIZE TOO BIG       (In an ALF operation) The bit count
                                 specified exceeded the maximum file
                                 size accepted by SMFS.

     38  WRITE I/O ERROR         An irrecoverable I/O error as
                                 encountered by SMFS. (In an ALF
                                 operation) SMFS was attempting to
                                 record password information, or (in a
                                 UDF/RPF operation) SMFS as attempting
                                 to add data to the file.

     39  READ I/O ERROR          An irrecoverable I/O error was
                                 encountered by SMFS attempting to
                                 retrieve either password information or
                                 data.

     40  RENAME I/O ERROR        An irrecoverable I/O error was
                                 encountered by SMFS while attempting to
                                 rename the file.

     41  DELETE I/O ERROR        (In a DLF operation) An irrecoverable
                                 I/O error was encountered by SMFS while
                                 attempting to delete the file.

     42  END-OF-DATA             (In a RTF/SPR operation) The end of the
                                 file was reached before the requested
                                 segment had been transmitted/flushed.

                           图 6(续)

                        完成码 (Completion Codes)

         [ This RFC was put into machine readable form for entry ]
          [ into the online RFC archives by Gottfried Janik 2/98 ]