5. ゲートウェイの状態変数と状態遷移
これまでに説明したように、FTP-FTAM ゲートウェイは FTP-Initiated と FTAM-Initiated の 2 組のサービスを提供する。各サービスには、ゲートウェイの動作を決定論的に定義する、互いに排他的な状態変数と状態遷移の集合がある。ゲートウェイには、これらの状態変数と状態遷移のサポートが必須である。
以下の説明を簡潔にするため、FTP-Initiated を "FTP-I" と略記し、FTAM-Initiated を "FTAM-I" と略記する。
エラー条件について、ゲートウェイが FTP-I:Initial-State または FTAMI:Initial-State 以外のいずれかの状態にあるときに接続が切断された場合、ゲートウェイは残っている接続を持つホストに致命的エラーメッセージを発行し、その後その接続を切断する。残っているホストが FTP Client であれば、ゲートウェイは ABOR、QUIT、および 426 reply code (Connection closed, transfer aborted) を送信する。FTAM Initiator であれば、ゲートウェイは識別子 1011 (Lower layer failure) の
その他のエラー条件は、この説明では扱わない。
5.1. FTP 開始のゲートウェイサービス (FTP-Initiated Gateway Service)
FTP-Initiated Gateway service の状態変数の集合を以下に示す。
State Variable State Definition
----------------------------------------------------------------
FTP-I:Initial-State FTP-Initiated Gateway service の初期状態。
Gateway is waiting for an FTP Client to
issue a USER command in order to
proceed with connection establishment
with remote FTAM Responder. If SITE or
ACCT commands are sent while waiting
for USER command, save arguments for
subsequent use.
FTP-I:Wait-for-PASS Gateway has already received USER
command from FTP Client, as well as
userid and destination host DN.
Gateway is waiting for the FTAM
Responder logon password.
FTP-I:Wait-for-PAddress ゲートウェイは FTP Client から PASS コマンドをすでに受信している。ゲートウェイは、提供された FTAM Responder のアドレスを Presentation Address に解決しているところである。提供されるアドレスは、Distinguished Name、User Friendly Name、または Domain Name のいずれかであり得る。解決は通常、X.500 directory services を用いて行われる。
FTP-I:Wait-for-Connection ゲートウェイは FTAM Responder への接続を開始しており、ログオンが成功したかどうかの通知を待っている。
FTP-I:Wait-for-ClientCmd FTP Client と FTAM Responder の間に接続が存在する。ゲートウェイは FTP Client からの次のコマンドまたは応答を待っている。
Client. Commands and responses are
mapped as they are received.
FTP-I:Wait-for-RespondrCmd FTP Client と FTAM Responder の間に接続が存在する。ゲートウェイは FTAM Responder からの次のコマンドまたは応答を待っている。コマンドと応答は、受信されるたびに対応付けられる。
可能な状態遷移は、それぞれ Section 5.1 の残りの部分に示されている。状態遷移ごとに、その遷移を引き起こす動作が列挙されている。
5.1.1. FTP-I:Initial-State --> FTP-I:Initial-State
1. Gateway receives SITE or ACCT command from FTP Client.
SITE argument includes Distinguish Name of FTAM Responder.
5.1.2. FTP-I:Initial-State --> FTP-I:Wait-for-PASS
1. Gateway receives USER command from FTP Client. Arguments
include Distinguished Name of FTAM Responder and userid on
FTAM responder.
5.1.3. FTP-I:Wait-for-PASS --> FTP-I:Wait-for-PAddress
1. Gateway receives PASS command from FTP Client.
5.1.4. FTP-I:Wait-for-PAddress --> FTP-I:Wait-for-Connection
1. Gateway resolves received Distinguished Name, User Friendly
Name, or Domain Name of FTAM Responder to OSI Presentation
address.
2. Gateway sends F-INITIALIZE to FTAM Responder with
Presentation Address in <Called Presentation Address>,
userid in <Initiator Identity>, and password in <Filestore
Password>.
5.1.5. FTP-I:Wait-for-Connection --> FTP-I:Wait-for-NextMapping
1. Gateway receives <State Result> of "Success" .
2. Gateway sends 230 reply code (User Logged In) to FTP
Client.
5.1.6. FTP-I:Wait-for-ClientCmd --> FTP-I:Wait-for-RespondrCmd
1. Gateway receives command or response from FTP Client and
maps it to FTAM protocol, as defined in section 8.1.
5.1.7. FTP-I:Wait-for-RespondrCmd --> FTP-I:Wait-for-ClientCmd
1. Gateway receives command or response from FTAM Responder
and maps it to FTP protocol, as defined in section 8.1.
5.1.8. FTP-I:Wait-for-ClientCmd --> FTP-I:Wait-for-USER
1. Gateway receives QUIT command from FTP Client; maps QUIT as
per Section 8.1.
5.2. FTAM 開始のゲートウェイサービス (FTAM-Initiated Gateway Service)
FTAM-Initiated Gateway service の状態変数の集合を以下に示す。
State Variable State Definition
----------------------------------------------------------------
FTAM-I:Initial-State FTAM-Initiated Gateway Service の初期状態。
Gateway is waiting for an FTAM
Initiator to issue an F-INITIALIZE
command in order to proceed with
connection establishment with remote
FTP Server.
FTAM-I:Wait-for-IPAddress Gateway has already received F-
INITIALIZE from FTAM Initiator.
Gateway is resolving the provided FTP
Server's address to an IP address. The
provided address may be a Domain Name,
Distinguished Name, or User Friendly
Name.
FTAM-I:Wait-for-Connection ゲートウェイは FTP Server への接続を開始しており、ログオンが成功したかどうかの通知を待っている。
FTAM-I:Wait-for-InitiatrCmd FTAM Initiator と FTP Server の間に接続が存在する。ゲートウェイは FTAM Initiator からの次のコマンドまたは応答を待っている。コマンドと応答は、受信されるたびに対応付けられる。
FTP-I:Wait-for-ServerCmd FTAM Initiator と FTP Server の間に接続が存在する。ゲートウェイは FTP Server からの次のコマンドまたは応答を待っている。コマンドと応答は、受信されるたびに対応付けられる。
可能な状態遷移は、それぞれ Section 5.2 の残りの部分に示されている。状態遷移ごとに、その遷移を引き起こす動作が列挙されている。
5.2.1. FTAM-I:Initial-State --> FTAM-I:Wait-for-IPAddress
1. Gateway receives F-INITIALIZE from FTAM Initiator. Domain
Name of FTP Server is either in <Responding Presentation
Address> or in the "@host" portion of the <Initiator
Identity> parameter. The userid is in <Initiator
Identity>, and password is in <Filestore Password>
parameter.
5.2.2. FTAM-I:Wait-for-IPAddress --> FTAM-I:Wait-for-Connection
1. Gateway resolves received Domain Name, Distinguished Name,
or User Friendly Name of FTP Server to IP address.
2. Gateway sends USER to FTP Server.
3. Gateway sends PASS to FTP Server.
5.2.3. FTAM-I:Wait-for-Connection --> FTAM-I:Wait-for-NextMapping
1. Gateway receives 230 reply code (User Logged In) from FTP
Server.
2. Gateway sends <State Result> of "Success" to FTAM
Initiator.
5.2.4. FTAM-I:Wait-for-InitiatrCmd --> FTAM-I:Wait-for-ServerCmd
1. Gateway receives command or response from FTAM Initiator
and maps it to FTP protocol, as defined in section 8.2.
5.2.5. FTAM-I:Wait-for-ServerCmd --> FTAM-I:Wait-for-InitiatrCmd
1. Gateway receives command or response from FTP Server and
maps it to FTAM protocol, as defined in section 8.2.
5.2.6. FTAM-I:Wait-for-InitiatrCmd --> FTAM-I:Wait-for-INITIALIZE
1. Gateway receives F-CLOSE primitive from FTAM Initiator;
maps F-CLOSE as per Section 8.2.