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 の応答は次のとおりです。特殊なコマンドレスポンスが構成されます。それは 8 ビットフィールド内の値 X'FF' と、その後に続く同じく 8 ビットフィールド内の誤ったオペコードからなります。このコマンドレスポンスは出力ストリームに置かれ、ユーザーとの接続は閉じられます。
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 ]