Skip to main content

5. Gateway State Variables and Transitions

As described, the FTP-FTAM gateway provides two sets of services: FTP-Initiated and FTAM-Initiated. Each service has its own mutually exclusive set of state variables and transitions that deterministically define the actions of the gateway. Gateway support for these state variables and transitions is required.

For conciseness in this discussion, FTP-Initiated will be abbreviated with "FTP-I", and FTAM-Initiated will be abbreviated with "FTAM-I".

Concerning error conditions, if a connection is dropped when the gateway is in any state other than FTP-I:Initial-State or FTAMI:Initial-State, then the gateway will issue a fatal error message to the host with the remaining connection, and then drop that connection. If the remaining host is an FTP Client, then the gateway will send an ABOR, QUIT, and 426 reply code (Connection closed, transfer aborted). If it is an FTAM Initiator, then the gateway will send an F-P-ABORT with a value with identifier 1011 (Lower layer failure), as well as any known .

Other error conditions are not addressed in this discussion.

5.1. FTP-Initiated Gateway Service​

The set of state variables for the FTP-Initiated Gateway service follow:

  State Variable                State Definition
----------------------------------------------------------------

FTP-I:Initial-State Initial state of 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 Gateway has already received PASS command from FTP Client. Gateway is resolving the provided FTAM Responder's address to a Presentation Address. The provided address may be a Distinguished Name, User Friendly Name, or Domain Name. Resolution will typically be done using X.500 directory services.

FTP-I:Wait-for-Connection Gateway has initiated a connection to the FTAM Responder and is waiting for notification as to whether or not the logon is successful.

FTP-I:Wait-for-ClientCmd Connection exists between FTP Client and FTAM Responder. Gateway is waiting for next command or response from FTP

                                Client.  Commands and responses are
mapped as they are received.

FTP-I:Wait-for-RespondrCmd Connection exists between FTP Client and FTAM Responder. Gateway is waiting for next command or response from FTAM Responder. Commands and responses are mapped as they are received.

Each of the possible state transitions is provided in the remainder of Section 5.1. For each state transition, the actions causing the transition are listed.

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-Initiated Gateway Service​

The set of state variables for the FTAM-Initiated Gateway service follow:

  State Variable                State Definition
----------------------------------------------------------------

FTAM-I:Initial-State Initial state of 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 Gateway has initiated a connection to the FTP Server and is waiting for notification as to whether or not the logon is successful.

FTAM-I:Wait-for-InitiatrCmd Connection exists between FTAM Initiator and FTP Server. Gateway is waiting for next command or response from FTAM Initiator. Commands and responses are mapped as they are received.

FTP-I:Wait-for-ServerCmd Connection exists between FTAM Initiator and FTP Server. Gateway is waiting for next command or response from FTP Server. Commands and responses are mapped as they are received.

Each of the possible state transitions is provided in the remainder of Section 5.2. For each state transition, the actions causing the transition are listed.

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.