Difference between revisions of "RFC1415"

From RFC-Wiki
imported>Admin
(Created page with " Network Working Group J. Mindel Request for Comments: 1415 R. Slaski ...")
 
Line 1: Line 1:
 
 
 
 
 
 
 
Network Working Group                                          J. Mindel
 
Network Working Group                                          J. Mindel
 
Request for Comments: 1415                                    R. Slaski
 
Request for Comments: 1415                                    R. Slaski
 
                                                   Open Networks, Inc.
 
                                                   Open Networks, Inc.
 
                                                         January 1993
 
                                                         January 1993
 
  
 
                   FTP-FTAM Gateway Specification
 
                   FTP-FTAM Gateway Specification
Line 52: Line 45:
 
Len Tabacchi, George Bradshaw, Tom Clarke, and Betsy Turner.
 
Len Tabacchi, George Bradshaw, Tom Clarke, and Betsy Turner.
  
 +
Table of Contents
  
 
+
1.  Introduction..................................................2
 
+
1.1.  Relationship to Other Work ................................3
 
+
1.2.  Overview of Gateway Operation .............................4
 
+
2.  Gateway Architecture..........................................6
 +
3.  Network Naming and Addressing.................................8
 +
4.  Use of the Gateway Services...................................9
 +
4.1.  FTP-Initiated Gateway Service .............................9
 +
4.2.  FTAM-Initiated Gateway Service ...........................11
 +
4.3.  Summary of Usage .........................................12
 +
5.  Gateway State Variables and Transitions......................13
 +
5.1.  FTP-Initiated Gateway Service ............................14
 +
5.2.  FTAM-Initiated Gateway Service ...........................16
 +
6.  Document Type Support........................................18
 +
6.1.  Notes on NBS-9 ...........................................18
 +
7.  Functional Comparison of FTP and FTAM........................19
 +
7.1.  Loss of Functionality ....................................20
 +
8. Mapping of Protocol Functions and Representations.............20
 +
8.1.  FTP-Initiated Gateway Service .............................22
 +
8.2.  FTAM-Initiated Gateway Service ............................38
 +
9. Mapping between FTP Reply Codes and FTAM Parameters...........47
 +
9.1.  FTP Reply Codes to FTAM Parameters ........................48
 +
9.2.  FTAM Parameters to FTP Reply Codes ........................50
 +
9.3.  Future Mapping Problem ....................................54
 +
9.4.  Error Handling ............................................54
 +
10. Implementation and Configuration Guidelines..................54
 +
10.1.  Robustness ...............................................54
 +
10.2.  Well-Known TCP/IP Port ...................................55
 +
10.3.  Gateway Listener Processes ...............................55
 +
10.4.  Implementation Testing ...................................55
 +
10.5.  POSIX File Naming and Organization .......................55
 +
11. Security Considerations......................................55
 +
12. References...................................................56
 +
13. Authors' Addresses...........................................58
  
 
== Introduction ==
 
== Introduction ==
Line 70: Line 93:
 
proposed application layer gateway is based on a bi-directional set
 
proposed application layer gateway is based on a bi-directional set
 
of mappings between the FTP and FTAM protocols.  Since the protocols
 
of mappings between the FTP and FTAM protocols.  Since the protocols
 
 
 
 
  
 
have quite different command structures, the mappings between them
 
have quite different command structures, the mappings between them
Line 122: Line 141:
 
       for implementors to use in building additional FTP-FTAM
 
       for implementors to use in building additional FTP-FTAM
 
       gateways.
 
       gateways.
 
 
 
 
 
  
 
   *  Provide a formal specification for organizations wishing to
 
   *  Provide a formal specification for organizations wishing to
Line 175: Line 189:
 
the FTP-Initiated service.  Figure 2 illustrates that of the FTAM-
 
the FTP-Initiated service.  Figure 2 illustrates that of the FTAM-
 
Initiated service.
 
Initiated service.
 
 
 
 
 
  
 
       TCP Host                                  OSI Host
 
       TCP Host                                  OSI Host
Line 202: Line 211:
  
 
               +--------------------------------+
 
               +--------------------------------+
 
  
 
           Figure 1  -  FTP-Initiated Gateway Service
 
           Figure 1  -  FTP-Initiated Gateway Service
  
 +
      TCP Host                                  OSI Host
  
 +
  +--------------+                        +------------------+
  
 +
  |  FTP Server  |                        |  FTAM Initiator  |
  
 +
  +--------------+                        +------------------+
  
 +
          |                                          |
  
 +
          |                                          |
  
 +
          |                                          |
  
 +
          |                                          |
  
 +
          |            FTP-FTAM Gateway              |
  
 +
          |    +--------------------------------+    |
  
 +
          +--  |  FTP Client    FTAM Responder  |  --+
  
 +
              +--------------------------------+
  
 +
          Figure 2  -  FTAM-Initiated Gateway Service
  
 +
== Gateway Architecture ==
  
 +
The gateway architecture, termed a protocol translator [NIST86], is
 +
depicted in Figure 3.  It implements TCP/IP and OSI protocol stacks
 +
with an application level process providing the link between the two.
 +
The link between FTP and FTAM is defined by two sets of protocol
 +
mappings, one each for the FTP-Initiated and FTAM-Initiated service
 +
sets.
  
 +
  +------------+                              +-------------+
  
 +
  |  FTP Host  |                              |  FTAM Host  |
  
 +
  +------------+                              +-------------+
  
 +
          |                                            |
  
 +
          |                                            |
  
 +
          |                                            |
  
 +
          |                                            |
  
 +
          |    +---------------------------------+    |
  
 +
          |    |          FTP  -  FTAM          |    |
  
 +
          |    |      Gateway Application      |    |
  
 +
          |    |---------------------------------|    |
  
 +
          |    |      FTP      |      FTAM      |    |
  
 +
          |    |----------------+----------------|    |
  
      TCP Host                                  OSI Host
+
          |    |    TCP/IP      |    TP4/et al  |    |
  
   +--------------+                        +------------------+
+
          |   +---------------------------------+     |
  
  | FTP Server  |                       | FTAM Initiator  |
+
          |           /|\              /|\            |
  
  +--------------+                        +------------------+
+
          |            |                |            |
  
           |                                          |
+
           +------------+                +-------------+
  
          |                                          |
+
              Figure 3  -  Gateway Protocol Stack
  
          |                                          |
+
A fundamental aspect of this gateway architecture is that data is
 +
mapped and transmitted immediately; i.e., no transferred file need
 +
ever reside on the gateway file system.  In the context of this
 +
document, the term "filesystem" refers to the file access and
 +
maintenance mechanisms provided by the operating system.  This lack
 +
of gateway filesystem interaction helps speed up the end-to-end data
 +
transfer.  Another speed-enhancing feature of this architecture is
 +
that both the FTP and FTAM network connections can operate
  
          |                                          |
+
simultaneously.  Additional advantages include:
  
          |            FTP-FTAM Gateway              |
+
    1. FTP and FTAM hosts require no modification to utilize gateway
 +
        services.
  
          |    +--------------------------------+    |
+
    2. Users require no knowledge of the other protocol.
  
          +--  |  FTP Client    FTAM Responder  |  --+
+
    3. Gateway access control is not impaired (since users cannot
 +
        directly access the gateway filesystem).
  
              +--------------------------------+
+
    4. No additional filesystem space is required on the gateway.
  
          Figure 2  -  FTAM-Initiated Gateway Service
+
    5. Interactive nature of protocols is preserved.
  
== Gateway Architecture ==
+
    6. Users become aware of fatal errors immediately.
 
 
The gateway architecture, termed a protocol translator [NIST86], is
 
depicted in Figure 3. It implements TCP/IP and OSI protocol stacks
 
with an application level process providing the link between the two.
 
The link between FTP and FTAM is defined by two sets of protocol
 
mappings, one each for the FTP-Initiated and FTAM-Initiated service
 
sets.
 
  
 +
Disadvantages of this design include the initial coding effort
 +
required to develop the gateway and the subsequent re-coding efforts
 +
required to keep it current.
  
 +
== Network Naming and Addressing ==
  
 +
The network naming and addressing schemes used by FTP (Domain Names
 +
(DN), IP Addresses) and FTAM (Distinguished Names, Presentation
 +
Addresses) are quite different.  This issue is quite apparent when a
 +
user of one protocol needs to identify a destination host of the
 +
other protocol.
  
 +
In the TCP/IP naming and addressing scheme, the identity of the FTP
 +
Server is its DN and its IP address [RFC1101].  To initiate a
 +
connection to an FTP Server, the FTP Client looks up a DN in either
 +
the Domain Name System (DNS) or static host table and obtains an IP
 +
address.
  
 +
In the OSI naming and addressing scheme, the identity of the FTAM
 +
Responder service is its Distinguished Name in the OSI Directory
 +
(X.500 or static table) and its Presentation address.  The
 +
Distinguished Name is an authoritative description of the service.  A
 +
Presentation address consists of a Presentation selector, a session
 +
selector, a transport selector, and a network address.  To initiate a
 +
connection to an FTAM Responder, the FTAM Initiator contacts the OSI
 +
Directory, presents the Distinguished Name of the desired FTAM
 +
Responder and asks for the Presentation address attribute associated
 +
with that name.
  
 +
An alternative to the direct use of Distinguished Names is to use
 +
"User Friendly Naming", as defined in [Kille92].  Gateway support for
 +
"User Friendly Naming" is recommended, but not required.
  
 +
== Use of the Gateway Services ==
  
 +
=== FTP-Initiated Gateway Service ===
  
 +
The FTP Client uses the FTP-Initiated gateway service to utilize the
 +
resources of an FTAM Responder.
  
 +
To initiate a file transfer from an FTP Client, the Client connects
 +
to the FTP-Initiated gateway service via TCP/IP.  The gateway then
 +
establishes a connection, via OSI, to the FTAM Responder.  At this
 +
point, the user can initiate file transfer operations.
  
 +
The FTP Client is responsible for providing the gateway with an
 +
authoritative Distinguished Name, or a User Friendly Name, of the
 +
desired OSI filestore.  It is the responsibility of the gateway to
 +
resolve this Distinguished Name, or User Friendly Name, to its
 +
corresponding Presentation address.
  
 +
The logon sequence taken by an FTP Client when initiating a file
 +
transfer with an FTAM Responder is given below:
  
 +
          % ftp gateway
 +
          ftp> site Distinguished-Name-of-FTAM Responder
 +
          ftp> user username
 +
          ftp> pass password
  
 +
The "ftp gateway" command initiates the connection between the FTP
 +
Client and the gateway.  Once connected to the gateway, the FTP
 +
Client should identify the desired FTAM Responder service via the
 +
Responder's Distinguished Name, or User Friendly Name, which is
 +
resolved by an algorithm running on the Directory Services provider.
 +
This information is sent via a "site Distinguished-Name-of-FTAM
 +
Responder" or "site UFN-of-FTAM Responder" command.
  
 +
Upon receipt of a Distinguished Name or a User Friendly Name, it is
 +
the gateway's responsibility to resolve it to the Presentation
 +
Address associated with that name.  This resolution is done by
 +
contacting the OSI Directory (X.500 or local static table) and
 +
presenting the Distinguished Name or User Friendly Name.  Once the
 +
Presentation address is obtained, the gateway can attempt a
 +
connection with the ultimate destination file transfer service
 +
represented by this Presentation address.
  
 +
The userid is passed via the "user username" command, and the
 +
password is passed via the "pass password".  If the FTAM Responder
 +
requires a password, a password prompt should appear after issuing
 +
the "user username" command.  It is anticipated that stronger
 +
authentication mechanisms will be required for DoD gateways in the
  
 +
future.
  
 +
Using a specific example, suppose an FTAM Responder has the following
 +
Distinguished Name:
  
  +------------+                              +-------------+
+
        CountryName          =        "US"
 +
        Organization        =        "Open Networks"
 +
        OrganizationalUnit  =        "Network Services"
 +
        CommonName          =        "netwrx1"
 +
        CommonName          =        "FTAM service"
  
  |  FTP Host  |                              |  FTAM Host  |
+
and the FTP-FTAM gateway is available at "washdc1-osigw.navy.mil".
  
  +------------+                              +-------------+
+
The FTP user action will appear as:
  
          |                                            |
+
        % ftp washdc1-osigw.navy.mil
 +
        ftp> site "c=US@o=Open Networks@ou=Network Services@cn=netwrx1
 +
            @cn=FTAM service"
 +
        ftp> user mindel
 +
        ftp> pass ***********
  
          |                                            |
+
The "ftp washdc1-osigw.navy.mil" command initiates the connection
 +
between the FTP Client and the FTP-FTAM gateway at the Washington
 +
Navy Yard, Washington D.C.  Once connected, the OSI filestore at Open
 +
Networks is identified via its Distinguished Name, "@c=US@o=Open
 +
Networks@ou=Network Services@cn=netwrx1@cn=FTAM service".
 +
Alternatively, a User Friendly Name, such as:
  
          |                                            |
+
        "netwrx1, Open Networks, us"
  
          |                                            |
+
can be specified, enabling the following FTP user action:
  
          |    +---------------------------------+    |
+
        % ftp washdc1-osigw.navy.mil
 +
        ftp> site "netwrx1, Open Networks, us"
 +
        ftp> user mindel
 +
        ftp> pass ***********
  
          |    |          FTP  - FTAM           |    |
+
As this example indicates, use of an intermediate gateway is not
 +
transparent. To partially alleviate this awkwardness, the gateway
 +
can be made more transparent through the registration of the FTAM
 +
host in the DNS using the address of the gateway [RFC1279].
  
          |    |      Gateway Application      |    |
+
An example will clarify this point.  Suppose that the "netwrx1, Open
 +
Networks, us" FTAM host is registered in the TCP/IP DNS with the DN
 +
of "ftam-service.netwrx1.com" and the IP address of the "washdc1-
 +
osigw.navy.mil" gateway.  In this example, the following set of user
 +
actions is required:
  
          |    |---------------------------------|    |
+
        % ftp ftam-service.netwrx1.com
 +
        ftp> user mindel
 +
        ftp> pass ***********
  
          |    |      FTP       |      FTAM     |    |
+
Since the "ftam-service.netwrx1.com" really points to the gateway
 +
address, the first command will connect the FTP Client to the
 +
gateway.  The gateway will then use the name (using [RFC1279]) to
 +
determine where the actual FTAM host is resident.  Gateway support
 +
for RFC1279 is recommended, but not required.
  
          |    |----------------+----------------|    |
+
=== FTAM-Initiated Gateway Service ===
  
          |    |    TCP/IP      |    TP4/et al  |    |
+
The FTAM Initiator uses the FTAM-Initiated gateway service to utilize
 +
the resources of an FTP Server.
  
          |    +---------------------------------+    |
+
To initiate a file transfer from an FTAM Initiator, the Initiator
 +
connects to the FTAM-Initiated gateway service via OSI.  The gateway
 +
then establishes a connection, via TCP/IP, to the FTP Server.  At
 +
this point, the user can initiate file transfer operations.
  
          |          /|\              /|\            |
+
The FTAM Initiator is responsible for providing the gateway with an
 +
authoritative DN of the desired TCP/IP filestore.  It is the
 +
responsibility of the gateway to resolve this DN to its corresponding
 +
IP address.
  
          |            |                |            |
+
The logon sequence taken by an FTAM Initiator when initiating a file
 +
transfer with an FTP Server is given below:
  
          +------------+                +-------------+
+
        % ftam gateway
 +
        ftam> user username@DNS-string
 +
        ftam> pass password
  
 +
The "ftam gateway" command initiates the connection between the FTAM
 +
Initiator and the gateway.  Once connected, userid and TCP/IP
 +
filestore are identified in the "username@DNS-string" argument to the
 +
user command.  If the FTP Server requires a password, a password
 +
prompt should appear after issuing the user command.
  
 +
The gateway should incorporate the BIND Resolver functionality so
 +
that upon receipt of a Domain Name, the Gateway FTP Client can
 +
resolve it via the distributed Domain Name System.
  
              Figure 3 - Gateway Protocol Stack
+
Using a specific example, suppose that a FTP Server has the following
 +
Domain Name: "ftp-service.netwrx1.com" and an FTP-FTAM gateway is
 +
available at:
  
A fundamental aspect of this gateway architecture is that data is
+
        CountryName          =        "US"
mapped and transmitted immediately; i.e., no transferred file need
+
        Organization        =        "GOV"
ever reside on the gateway file system.  In the context of this
+
        OrganizationalUnit  =        "DOD"
document, the term "filesystem" refers to the file access and
+
        OrganizationalUnit  =        "DISA"
maintenance mechanisms provided by the operating system.  This lack
+
        Locality            =        "Washington Navy Yard"
of gateway filesystem interaction helps speed up the end-to-end data
+
        CommonName          =        "wnyosi7"
transfer.  Another speed-enhancing feature of this architecture is
 
that both the FTP and FTAM network connections can operate
 
  
 +
The FTAM user action will appear as:
  
 +
        % ftam @c=US@o=GOV@ou=DOD@ou=DISA@l=Washington Navy Yard
 +
              @cn=wnyosi7
 +
        ftam> user [email protected]
 +
        ftam> pass ***********
  
 +
Alternatively, a User Friendly Name could be used rather than the
 +
Distinguished Name.
  
 +
As mentioned in the previous section, "Use of the FTP-Initiated
 +
Gateway Service", use of an intermediate gateway is not transparent.
 +
The gateway can be made more transparent through the registration of
 +
the FTP host in the X.500 OSI Directory.  By querying the X.500 OSI
 +
Directory, the gateway can identify where the actual host is
 +
resident.
  
simultaneously. Additional advantages include:
+
For example, suppose that the FTP Server in the previous example
 +
("ftp-service.netwrx1.com") is registered in the X.500 Directory with
 +
the following Distinguished Name:
  
    1. FTP and FTAM hosts require no modification to utilize gateway
+
        CountryName          =        "US"
         services.
+
        Organization        =        "Open Networks"
 +
        OrganizationalUnit  =        "Network Services"
 +
        CommonName          =        "netwrx1"
 +
         CommonName          =        "FTP service"
  
    2. Users require no knowledge of the other protocol.
+
and the Presentation Address of the FTP-FTAM gateway. This approach,
 +
described in [RFC1279], would permit the following user interactions:
  
    3. Gateway access control is not impaired (since users cannot
+
        % ftam @c=US@o=Open Networks@ou=Network Services
         directly access the gateway filesystem).
+
              @cn=netwrx1@cn=FTP Service"
 +
        ftam> user mindel
 +
         ftam> pass ***********
  
    4. No additional filesystem space is required on the gateway.
+
=== Summary of Usage ===
  
    5. Interactive nature of protocols is preserved.
+
As shown in the discussions of the FTP-Initiated and FTAM-Initiated
 +
Gateway Services, the gateway user does not have access to the
 +
gateway filesystem; he merely makes use of the gateway logon
 +
procedure to specify the ultimate destination userid and password.
  
    6. Users become aware of fatal errors immediately.
+
Two methods of interaction with the gateway were described. In the
 +
former, the user must:
  
Disadvantages of this design include the initial coding effort
+
    1. Be aware that a gateway is required to reach the
required to develop the gateway and the subsequent re-coding efforts
+
      destination FTP or FTAM host.
required to keep it current.
+
 
 +
    2. Determine which gateway is most appropriate for their
 +
      respective source-destination pair.
  
== Network Naming and Addressing ==
+
    3. Explicitly connect to the gateway host prior to connecting
 +
      to the destination host.
  
The network naming and addressing schemes used by FTP (Domain Names
+
Needless to say, the exchange of files between FTP and FTAM hosts
(DN), IP Addresses) and FTAM (Distinguished Names, Presentation
+
requires more effort than that required for the exchange of files
Addresses) are quite different.  This issue is quite apparent when a
+
between a pair of hosts utilizing the same file transfer protocol.
user of one protocol needs to identify a destination host of the
 
other protocol.
 
  
In the TCP/IP naming and addressing scheme, the identity of the FTP
+
The latter, more transparent method does not necessarily require that
Server is its DN and its IP address [RFC1101]To initiate a
+
the user determine which gateway is most appropriate for their
connection to an FTP Server, the FTP Client looks up a DN in either
+
respective source-destination pairIn fact, filestore service
the Domain Name System (DNS) or static host table and obtains an IP
+
providers are registered using the address of a predetermined
address.
+
gateway.  With this approach, the user:
  
In the OSI naming and addressing scheme, the identity of the FTAM
+
    1. Must be aware that a gateway is required to reach the
Responder service is its Distinguished Name in the OSI Directory
+
      destination FTP or FTAM host.
(X.500 or static table) and its Presentation address.  The
 
Distinguished Name is an authoritative description of the service.  A
 
Presentation address consists of a Presentation selector, a session
 
selector, a transport selector, and a network address.  To initiate a
 
connection to an FTAM Responder, the FTAM Initiator contacts the OSI
 
Directory, presents the Distinguished Name of the desired FTAM
 
Responder and asks for the Presentation address attribute associated
 
with that name.
 
  
An alternative to the direct use of Distinguished Names is to use
+
    2. Need not determine which gateway is most appropriate to
"User Friendly Naming", as defined in [Kille92].  Gateway support for
+
      access their ultimate destination host.
"User Friendly Naming" is recommended, but not required.
 
  
 +
    3. Need not explicitly connect to the gateway prior to
 +
      connecting to the destination FTP or FTAM host.
  
 +
== 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".
  
== Use of the Gateway Services ==
+
Concerning error conditions, if a connection is dropped when the
 +
gateway is in any state other than FTP-I:Initial-State or FTAM-
 +
I: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 <Diagnostic> value with identifier 1011
 +
(Lower layer failure), as well as any known <Further Details>.
 +
 
 +
Other error conditions are not addressed in this discussion.
  
 
=== FTP-Initiated Gateway Service ===
 
=== FTP-Initiated Gateway Service ===
  
The FTP Client uses the FTP-Initiated gateway service to utilize the
+
The set of state variables for the FTP-Initiated Gateway service
resources of an FTAM Responder.
+
follow:
  
To initiate a file transfer from an FTP Client, the Client connects
+
  State Variable                State Definition
to the FTP-Initiated gateway service via TCP/IP.  The gateway then
+
  ----------------------------------------------------------------
establishes a connection, via OSI, to the FTAM Responder.  At this
 
point, the user can initiate file transfer operations.
 
  
The FTP Client is responsible for providing the gateway with an
+
  FTP-I:Initial-State          Initial state of FTP-Initiated Gateway
authoritative Distinguished Name, or a User Friendly Name, of the
+
                            service.
desired OSI filestore.  It is the responsibility of the gateway to
 
resolve this Distinguished Name, or User Friendly Name, to its
 
corresponding Presentation address.
 
  
The logon sequence taken by an FTP Client when initiating a file
+
                            Gateway is waiting for an FTP Client to
transfer with an FTAM Responder is given below:
+
                            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 gateway
+
  FTP-I:Wait-for-PASS          Gateway has already received USER
          ftp> site Distinguished-Name-of-FTAM Responder
+
                            command from FTP Client, as well as
          ftp> user username
+
                            userid and destination host DN.
          ftp> pass password
+
                            Gateway is waiting for the FTAM
 +
                            Responder logon password.
  
The "ftp gateway" command initiates the connection between the FTP
+
  FTP-I:Wait-for-PAddress      Gateway has already received PASS
Client and the gatewayOnce connected to the gateway, the FTP
+
                            command from FTP Client.  Gateway is
Client should identify the desired FTAM Responder service via the
+
                            resolving the provided FTAM Responder's
Responder's Distinguished Name, or User Friendly Name, which is
+
                            address to a Presentation Address.  The
resolved by an algorithm running on the Directory Services provider.
+
                            provided address may be a Distinguished
This information is sent via a "site Distinguished-Name-of-FTAM
+
                            Name, User Friendly Name, or Domain
Responder" or "site UFN-of-FTAM Responder" command.
+
                            Name. Resolution will typically be
 +
                            done using X.500 directory services.
  
Upon receipt of a Distinguished Name or a User Friendly Name, it is
+
  FTP-I:Wait-for-Connection    Gateway has initiated a connection to
the gateway's responsibility to resolve it to the Presentation
+
                            the FTAM Responder and is waiting for
Address associated with that name.  This resolution is done by
+
                            notification as to whether or not the
contacting the OSI Directory (X.500 or local static table) and
+
                            logon is successful.
presenting the Distinguished Name or User Friendly Name.  Once the
 
Presentation address is obtained, the gateway can attempt a
 
connection with the ultimate destination file transfer service
 
represented by this Presentation address.
 
  
The userid is passed via the "user username" command, and the
+
  FTP-I:Wait-for-ClientCmd      Connection exists between FTP Client
password is passed via the "pass password".  If the FTAM Responder
+
                            and FTAM Responder.  Gateway is waiting
requires a password, a password prompt should appear after issuing
+
                            for next command or response from FTP
the "user username" commandIt is anticipated that stronger
 
authentication mechanisms will be required for DoD gateways in the
 
  
 +
                            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.
  
 +
==== FTP-I:Initial-State  -->  FTP-I:Initial-State ====
  
future.
+
    1. Gateway receives SITE or ACCT command from FTP Client.
 +
        SITE argument includes Distinguish Name of FTAM Responder.
  
Using a specific example, suppose an FTAM Responder has the following
+
==== FTP-I:Initial-State  -->  FTP-I:Wait-for-PASS ====
Distinguished Name:
 
  
        CountryName          =        "US"
+
    1. Gateway receives USER command from FTP Client.  Arguments
         Organization        =        "Open Networks"
+
         include Distinguished Name of FTAM Responder and userid on
        OrganizationalUnit  =        "Network Services"
+
         FTAM responder.
        CommonName          =        "netwrx1"
 
         CommonName          =        "FTAM service"
 
  
and the FTP-FTAM gateway is available at "washdc1-osigw.navy.mil".
+
==== FTP-I:Wait-for-PASS  -->  FTP-I:Wait-for-PAddress ====
  
The FTP user action will appear as:
+
    1. Gateway receives PASS command from FTP Client.
  
        % ftp washdc1-osigw.navy.mil
+
==== FTP-I:Wait-for-PAddress  -->   FTP-I:Wait-for-Connection ====
        ftp> site "c=US@o=Open Networks@ou=Network Services@cn=netwrx1
 
            @cn=FTAM service"
 
        ftp> user mindel
 
        ftp> pass ***********
 
  
The "ftp washdc1-osigw.navy.mil" command initiates the connection
+
    1. Gateway resolves received Distinguished Name, User Friendly
between the FTP Client and the FTP-FTAM gateway at the Washington
+
        Name, or Domain Name of FTAM Responder to OSI Presentation
Navy Yard, Washington D.C.  Once connected, the OSI filestore at Open
+
        address.
Networks is identified via its Distinguished Name, "@c=US@o=Open
+
    2. Gateway sends F-INITIALIZE to FTAM Responder with
Networks@ou=Network Services@cn=netwrx1@cn=FTAM service".
+
        Presentation Address in <Called Presentation Address>,
Alternatively, a User Friendly Name, such as:
+
        userid in <Initiator Identity>, and password in <Filestore
 +
        Password>.
 +
 
 +
==== FTP-I:Wait-for-Connection  -->  FTP-I:Wait-for-NextMapping ====
  
        "netwrx1, Open Networks, us"
+
    1. Gateway receives <State Result> of "Success" .
 +
    2. Gateway sends 230 reply code (User Logged In) to FTP
 +
        Client.
  
can be specified, enabling the following FTP user action:
+
==== FTP-I:Wait-for-ClientCmd  -->  FTP-I:Wait-for-RespondrCmd ====
  
        % ftp washdc1-osigw.navy.mil
+
    1. Gateway receives command or response from FTP Client and
         ftp> site "netwrx1, Open Networks, us"
+
         maps it to FTAM protocol, as defined in section 8.1.
        ftp> user mindel
 
        ftp> pass ***********
 
  
As this example indicates, use of an intermediate gateway is not
+
==== FTP-I:Wait-for-RespondrCmd  -->  FTP-I:Wait-for-ClientCmd ====
transparent.  To partially alleviate this awkwardness, the gateway
 
can be made more transparent through the registration of the FTAM
 
host in the DNS using the address of the gateway [RFC1279].
 
  
An example will clarify this point. Suppose that the "netwrx1, Open
+
    1. Gateway receives command or response from FTAM Responder
Networks, us" FTAM host is registered in the TCP/IP DNS with the DN
+
        and maps it to FTP protocol, as defined in section 8.1.
of "ftam-service.netwrx1.com" and the IP address of the "washdc1-
 
osigw.navy.mil" gateway. In this example, the following set of user
 
actions is required:
 
  
 +
==== 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.
  
 +
=== FTAM-Initiated Gateway Service ===
  
 +
The set of state variables for the FTAM-Initiated Gateway service
 +
follow:
  
 +
  State Variable                State Definition
 +
  ----------------------------------------------------------------
  
        % ftp ftam-service.netwrx1.com
+
  FTAM-I:Initial-State          Initial state of FTAM-Initiated Gateway
        ftp> user mindel
+
                            Service.
        ftp> pass ***********
 
  
Since the "ftam-service.netwrx1.com" really points to the gateway
+
                            Gateway is waiting for an FTAM
address, the first command will connect the FTP Client to the
+
                            Initiator to issue an F-INITIALIZE
gateway.  The gateway will then use the name (using [RFC1279]) to
+
                            command in order to proceed with
determine where the actual FTAM host is resident.  Gateway support
+
                            connection establishment with remote
for RFC1279 is recommended, but not required.
+
                            FTP Server.
  
=== FTAM-Initiated Gateway Service ===
+
  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.
  
The FTAM Initiator uses the FTAM-Initiated gateway service to utilize
+
  FTAM-I:Wait-for-Connection    Gateway has initiated a connection to
the resources of an FTP Server.
+
                            the FTP Server and is waiting for
 +
                            notification as to whether or not the
 +
                            logon is successful.
  
To initiate a file transfer from an FTAM Initiator, the Initiator
+
  FTAM-I:Wait-for-InitiatrCmd  Connection exists between FTAM
connects to the FTAM-Initiated gateway service via OSIThe gateway
+
                            Initiator and FTP Server.  Gateway is
then establishes a connection, via TCP/IP, to the FTP Server.  At
+
                            waiting for next command or response
this point, the user can initiate file transfer operations.
+
                            from FTAM InitiatorCommands and
 +
                            responses are mapped as they are
 +
                            received.
  
The FTAM Initiator is responsible for providing the gateway with an
+
  FTP-I:Wait-for-ServerCmd      Connection exists between FTAM
authoritative DN of the desired TCP/IP filestoreIt is the
+
                            Initiator and FTP Server.  Gateway is
responsibility of the gateway to resolve this DN to its corresponding
+
                            waiting for next command or response
IP address.
+
                            from FTP ServerCommands and
 +
                            responses are mapped as they are
 +
                            received.
  
The logon sequence taken by an FTAM Initiator when initiating a file
+
Each of the possible state transitions is provided in the remainder
transfer with an FTP Server is given below:
+
of Section 5.2.  For each state transition, the actions causing the
 +
transition are listed.
  
        % ftam gateway
+
==== FTAM-I:Initial-State  -->   FTAM-I:Wait-for-IPAddress ====
        ftam> user username@DNS-string
 
        ftam> pass password
 
  
The "ftam gateway" command initiates the connection between the FTAM
+
    1. Gateway receives F-INITIALIZE from FTAM Initiator.  Domain
Initiator and the gatewayOnce connected, userid and TCP/IP
+
        Name of FTP Server is either in <Responding Presentation
filestore are identified in the "username@DNS-string" argument to the
+
        Address> or in the "@host" portion of the <Initiator
user commandIf the FTP Server requires a password, a password
+
        Identity> parameterThe userid is in <Initiator
prompt should appear after issuing the user command.
+
        Identity>, and password is in <Filestore Password>
 +
        parameter.
  
The gateway should incorporate the BIND Resolver functionality so
+
==== FTAM-I:Wait-for-IPAddress  -->  FTAM-I:Wait-for-Connection ====
that upon receipt of a Domain Name, the Gateway FTP Client can
 
resolve it via the distributed Domain Name System.
 
  
Using a specific example, suppose that a FTP Server has the following
+
    1. Gateway resolves received Domain Name, Distinguished Name,
Domain Name:  "ftp-service.netwrx1.com" and an FTP-FTAM gateway is
+
        or User Friendly Name of FTP Server to IP address.
available at:
+
    2. Gateway sends USER to FTP Server.
 +
    3. Gateway sends PASS to FTP Server.
  
 +
==== 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.
  
 +
====  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.
  
 +
==== 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.
  
 +
==== FTAM-I:Wait-for-InitiatrCmd  -->  FTAM-I:Wait-for-INITIALIZE ====
  
        CountryName          =        "US"
+
    1. Gateway receives F-CLOSE primitive from FTAM Initiator;
        Organization        =        "GOV"
+
         maps F-CLOSE as per Section 8.2.
        OrganizationalUnit  =        "DOD"
 
        OrganizationalUnit  =        "DISA"
 
        Locality            =        "Washington Navy Yard"
 
         CommonName          =        "wnyosi7"
 
  
The FTAM user action will appear as:
+
== Document Type Support ==
  
        % ftam @c=US@o=GOV@ou=DOD@ou=DISA@l=Washington Navy Yard
+
The set of FTAM document types supported by the FTP-FTAM gateway is a
              @cn=wnyosi7
+
subset of the document types identified in the Stable Implementation
        ftam> user mindel@ftp-service.netwrx1.com
+
Agreements for Open Systems Interconnection Protocols:  Part 9 - FTAM
        ftam> pass ***********
+
Phase 2, produced by the March 1992 Open Systems Environment
 +
Implementors' Workshop [NIST92]. This subset was chosen for its
 +
equivalence to those document types supported by FTP. The set
 +
includes:
  
Alternatively, a User Friendly Name could be used rather than the
+
            FTAM-1    "ISO FTAM Unstructured text file
Distinguished Name.
 
  
As mentioned in the previous section, "Use of the FTP-Initiated
+
            FTAM-3    "ISO FTAM Unstructured binary file
Gateway Service", use of an intermediate gateway is not transparent.
 
The gateway can be made more transparent through the registration of
 
the FTP host in the X.500 OSI Directory.  By querying the X.500 OSI
 
Directory, the gateway can identify where the actual host is
 
resident.
 
  
For example, suppose that the FTP Server in the previous example
+
            NBS-9    "NBS-9 FTAM File directory file"
("ftp-service.netwrx1.com") is registered in the X.500 Directory with
 
the following Distinguished Name:
 
  
        CountryName          =        "US"
+
  FTAM document types map to FTP document types as follows:
        Organization        =        "Open Networks"
 
        OrganizationalUnit  =        "Network Services"
 
        CommonName          =        "netwrx1"
 
        CommonName          =        "FTP service"
 
  
and the Presentation Address of the FTP-FTAM gateway.  This approach,
+
            FTAM      <->      FTP
described in [RFC1279], would permit the following user interactions:
+
            ----------------------------------
  
        % ftam @c=US@o=Open Networks@ou=Network Services
+
            FTAM-1    <->       ASCII
              @cn=netwrx1@cn=FTP Service"
 
        ftam> user mindel
 
        ftam> pass ***********
 
  
=== Summary of Usage ===
+
            FTAM-3    <->      8 bit binary
  
As shown in the discussions of the FTP-Initiated and FTAM-Initiated
+
            NBS-9    <->      Directory
Gateway Services, the gateway user does not have access to the
 
gateway filesystem; he merely makes use of the gateway logon
 
procedure to specify the ultimate destination userid and password.
 
  
 +
Gateway support for FTAM-1 and FTAM-2 is required, whereas support
 +
for NBS-9 is recommended.
  
 +
=== Notes on NBS-9 ===
  
 +
NBS-9 is optional in GOSIP versions 1 and 2 [NIST91].  NBS-9 will be
 +
superseded by its replacement when ISO/IEC ISP 10607-2 and ISO/IEC
 +
ISP 10607-2/Amendment 1 are published [NIST92].
  
 +
For conformance to NBS-9, an FTAM Responder is only required to
 +
return the <Filename> file attribute, subject to local security and
 +
access control.  All other requested attributes need not be returned.
  
Two methods of interaction with the gateway were describedIn the
+
Systems supporting the NBS-9 document type shall make available an
former, the user must:
+
NBS-9 document called 'DIRLIS'This document can be used to obtain
 +
a listing of files and their associated attributes from a remote
 +
Filestore.
  
    1. Be aware that a gateway is required to reach the
+
== Functional Comparison of FTP and FTAM ==
      destination FTP or FTAM host.
 
  
    2. Determine which gateway is most appropriate for their
+
A comprehensive comparison of the services offered by FTP and FTAM is
      respective source-destination pair.
+
beyond the scope of this specification. What follows is an analysis
 +
of several key points.  Refer to [NIST 86a] and [ROSE90] for a more
 +
complete discourse on this topic.
  
    3. Explicitly connect to the gateway host prior to connecting
+
FTAM is not a superset of FTP; each protocol has functions that only
      to the destination host.
+
it performs. The set of FTAM functions is, however, larger than the
 +
set of FTP functions.
  
Needless to say, the exchange of files between FTP and FTAM hosts
+
FTP combines file management and file transfer into one protocol
requires more effort than that required for the exchange of files
+
engine, whereas FTAM separates management and transfer as they relate
between a pair of hosts utilizing the same file transfer protocol.
+
to files.
  
The latter, more transparent method does not necessarily require that
+
The file transfer services of both FTP and FTAM expect a reliable
the user determine which gateway is most appropriate for their
+
underlying end-to-end serviceAt a minimum, this service includes
respective source-destination pairIn fact, filestore service
+
the capability to transfer entire files between remote hosts and to
providers are registered using the address of a predetermined
+
display remote filenames.
gateway. With this approach, the user:
 
  
    1. Must be aware that a gateway is required to reach the
+
In addition to this basic file transfer service, FTAM supports the
      destination FTP or FTAM host.
+
capability to:  access a few records from a file server, create a
 
+
network file system (similar to Sun's Network File System), handle
    2. Need not determine which gateway is most appropriate to
+
printing and spooling, and access remote database records.  FTP does
      access their ultimate destination host.
+
not support these additional capabilities.
 +
 
 +
FTP uses TELNET services to set up a connection between the FTP
 +
Client and FTP Server. A three-digit reply code followed by
 +
explanatory text indicates the status of the preceding request and
 +
provides diagnostic information explaining each transaction.
  
    3. Need not explicitly connect to the gateway prior to
+
FTAM relies on the Association Control Service Element (ACSE) to
      connecting to the destination FTP or FTAM host.
+
start and stop the network for network file interaction. Generally,
 +
the ASCE establishes the application association and related
 +
application context needed to support the FTAM protocol.
  
== Gateway State Variables and Transitions ==
+
The FTAM protocol is modularized so as to keep the allowable number
 +
of actions in any particular state relatively small.  There are many
 +
more possible sequences of FTP operations than possible sequences of
 +
FTAM operations [NIST86].
  
As described, the FTP-FTAM gateway provides two sets of services:
+
Because FTAM is more robust than FTP, FTAM allows greater flexibility
FTP-Initiated and FTAM-InitiatedEach service has its own mutually
+
for conveying information about filesFTAM deals only with aspects
exclusive set of state variables and transitions that
+
of application processes, and leaves data representation and data
deterministically define the actions of the gateway.  Gateway support
+
management facilities to other OSI service elements.
for these state variables and transitions is required.
 
  
For conciseness in this discussion, FTP-Initiated will be abbreviated
+
In contrast to the Client/Server model present in the FTP scheme,
with "FTP-I", and FTAM-Initiated will be abbreviated with "FTAM-I".
+
FTAM is based on the Initiator/Responder model. The key distinction
  
Concerning error conditions, if a connection is dropped when the
+
is that once the FTAM Initiator has established a connection with a
gateway is in any state other than FTP-I:Initial-State or FTAM-
+
remote host, either the Initiator or Responder can request services
I:Initial-State, then the gateway will issue a fatal error message to
+
of the otherIn the FTP realm, the Client both initiates a
the host with the remaining connection, and then drop that
+
connection and requests all services.
connectionIf the remaining host is an FTP Client, then the gateway
 
will send an ABOR, QUIT, and 426 reply code (Connection closed,
 
  
 +
The FTP Client knows the real properties of the remote host
 +
filesystem.  FTAM, in contrast, embraces a conceptual model of a
 +
filesystem, labeled a virtual filestore model.  The virtual filestore
 +
is a collection of files, each of which has a name that uniquely
 +
identifies it.  Each file has a set of attributes, such as ownership
 +
information and contents, which is the data associated with the file.
 +
One file attribute is the <Contents Type> of the file, typically of
 +
value "FTAM-1", "FTAM-3", or "NBS-9".  The FTAM Initiator only knows
 +
the properties of the corresponding Responder and virtual filestore,
 +
not the real properties of the filesystem on the remote host.
  
 +
=== Loss of Functionality ===
  
 +
As happens whenever two dissimilar protocols, or languages for that
 +
matter, are translated, some loss of functionality is inevitable.
 +
With reference to the FTP-FTAM gateway, several of the most blatant
 +
losses of functionality are:
  
 +
    1. Diagnostics passed between protocols may not be precisely
 +
        translated.
  
transfer aborted). If it is an FTAM Initiator, then the gateway will
+
    2. The FTAM partial file (record) transfer may not be
send an F-P-ABORT with a <Diagnostic> value with identifier 1011
+
        supported.
(Lower layer failure), as well as any known <Further Details>.
 
  
Other error conditions are not addressed in this discussion.
+
    3. Some FTAM attributes are not supported by FTP.
  
=== FTP-Initiated Gateway Service ===
+
The primary goal of the gateway protocol mappings are to minimize
 +
this loss of functionality. As this gateway specification and
 +
subsequent implementations evolve, means to partially overcome loss
 +
of functionality may become more obvious.  For example, the gateway
 +
may be able to emulate file record transfers between FTAM Initiators
 +
and FTP Servers.
  
The set of state variables for the FTP-Initiated Gateway service
+
== Mapping of Protocol Functions and Representations ==
follow:
 
  
  State Variable                State Definition
+
The mappings presented are based upon the FTAM protocol
  ----------------------------------------------------------------
+
implementation as defined in Stable Implementation Agreements for
 +
Open Systems Interconnection Protocols:  Part 9 - FTAM Phase 2,
 +
produced by the March 1992 Open Systems Environment Implementors'
 +
Workshop [NIST92], and in [ISO8571-1], [ISO8571-2],[ISO8571-
 +
3],[ISO8571-4], and [ISO8571-5].  The FTP protocol as defined in
 +
Request for Comments [RFC959].  The mappings are strongly influenced
 +
by the work of M. A. Wallace et. al. at NIST [NIST86] and John Scott
  
  FTP-I:Initial-State          Initial state of FTP-Initiated Gateway
+
at MITRE [MITRE87].
                            service.
 
  
                            Gateway is waiting for an FTP Client to
+
A key goal of the mappings presented in this document is to minimize
                            issue a USER command in order to
+
the loss of functionality between the two protocols.  The specific
                            proceed with connection establishment
+
approach taken to implement the mappings is left to the discretion of
                            with remote FTAM ResponderIf SITE or
+
the gateway implementor.  The focus of the protocol function and
                            ACCT commands are sent while waiting
+
representation mappings is on non-error encumbered processingThe
                            for USER command, save arguments for
+
mapping of diagnostic and error messages is treated separately in
                            subsequent use.
+
section 9.
  
  FTP-I:Wait-for-PASS          Gateway has already received USER
+
At a minimum, the FTAM implementation in the FTP-FTAM gateway support
                            command from FTP Client, as well as
+
for Implementation Profiles T1 (Simple File Transfer) and M1
                            userid and destination host DN.
+
(Management), as defined in [NIST92], is required.  These
                            Gateway is waiting for the FTAM
+
Implementation Profiles correspond to the A/111 and A/13 Profiles of
                            Responder logon password.
+
Standards Promotion and Application Group in Europe, respectively
 +
[NIST92].
  
  FTP-I:Wait-for-PAddress      Gateway has already received PASS
+
At a minimum, the gateway support for the following is required:
                            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
+
  ASCII and 8 bit binary file types.  It should also support FTP
                            the FTAM Responder and is waiting for
+
  File Stream Mode.
                            notification as to whether or not the
 
                            logon is successful.
 
  
  FTP-I:Wait-for-ClientCmd      Connection exists between FTP Client
+
  The following FTAM document types: FTAM-1 (unstructured text
                            and FTAM Responder. Gateway is waiting
+
  file), FTAM-3 (unstructured binary file), and NBS-9 (set of
                            for next command or response from FTP
+
  directory entries).
  
 +
POSIX file naming and organization conventions are assumed in these
 +
mappings; i.e., files in the systems are assumed to be organized in a
 +
hierarchical structure in which all of the non-terminal nodes are
 +
directories and all of the terminal nodes are any other type of file.
  
 +
The following terminology is used in the mapping specifications:
  
 +
  argument .......FTP Service Command argument, as used in [RFC959].
  
 +
  parameter ......FTAM Service Primitive parameters and attributes,
 +
                  as enumerated in Tables 6, 50, and 51 of [ISO8571-
 +
                  3].
  
                            Client.  Commands and responses are
+
The following notation is used in the mapping specifications:
                            mapped as they are received.
 
  
  FTP-I:Wait-for-RespondrCmd   Connection exists between FTP Client
+
   Arguments and parameters are enclosed in angle brackets; e.g.,
                            and FTAM Responder. Gateway is waiting
+
  <Action Result>
                            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
+
  Values of arguments and parameters are enclosed in quotation
of Section 5.1. For each state transition, the actions causing the
+
  marks; e.g., "Success"
transition are listed.
 
  
==== FTP-I:Initial-State  -->  FTP-I:Initial-State ====
+
  FTP Service Commands and FTAM Primitives are in uppercase; e.g., F-
 +
  INITIALIZE
  
    1. Gateway receives SITE or ACCT command from FTP Client.
+
===  FTP-Initiated Gateway Service ===
        SITE argument includes Distinguish Name of FTAM Responder.
 
  
==== FTP-I:Initial-State  -->  FTP-I:Wait-for-PASS ====
+
The protocol mapping between FTP and FTAM may be one-to-zero (i.e.,
 +
not mappable), one-to-one, or one-to-many.
  
    1. Gateway receives USER command from FTP Client.  Arguments
+
The general steps taken by the FTP-FTAM gateway to provide the FTP-
        include Distinguished Name of FTAM Responder and userid on
+
Initiated service are:
        FTAM responder.
 
  
==== FTP-I:Wait-for-PASS  -->  FTP-I:Wait-for-PAddress ====
+
    1. Accept an FTP Client request at the FTP Server side of the
 +
        gateway service.
  
     1. Gateway receives PASS command from FTP Client.
+
     2. Map the request to the (set of) corresponding FTAM
 +
        Initiator function(s).
  
==== FTP-I:Wait-for-PAddress  -->  FTP-I:Wait-for-Connection ====
+
    3. Acting as an FTAM Initiator, send the FTAM Initiator
 +
        function(s) to the FTAM Responder.
  
     1. Gateway resolves received Distinguished Name, User Friendly
+
     4. Accept information returned to the FTAM Initiator side of
        Name, or Domain Name of FTAM Responder to OSI Presentation
+
         the gateway. This information originated at the FTAM
         address.
+
         Responder.
    2. Gateway sends F-INITIALIZE to FTAM Responder with
 
         Presentation Address in <Called Presentation Address>,
 
        userid in <Initiator Identity>, and password in <Filestore
 
        Password>.
 
  
==== FTP-I:Wait-for-Connection  -->  FTP-I:Wait-for-NextMapping ====
+
    5. Map this returned information to the protocol form
 +
        understood by the FTP Server side of the gateway.
  
     1. Gateway receives <State Result> of "Success" .
+
     6. Send this returned information from the FTP Server side of
    2. Gateway sends 230 reply code (User Logged In) to FTP
+
        the gateway to the FTP Client.
        Client.
 
  
==== FTP-I:Wait-for-ClientCmd  -->  FTP-I:Wait-for-RespondrCmd ====
+
For each FTP protocol function, the FTAM protocol functions required
 +
to map it are identified:
  
    1. Gateway receives command or response from FTP Client and
+
FTP       FTAM
        maps it to FTAM protocol, as defined in section 8.1.
 
  
 +
------------------------------------------------------------------
  
 +
ABOR      F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP
  
 +
ACCT      F-INITIALIZE,
  
 +
ALLO      none
  
==== FTP-I:Wait-for-RespondrCmd  -->  FTP-I:Wait-for-ClientCmd ====
+
APPE      F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
 +
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
 +
          F-TRANSFER-END, F-WRITE
 +
 
 +
CDUP      F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT
  
    1. Gateway receives command or response from FTAM Responder
+
CWD      F-BEGIN-GROUP, F-END-GROUP, F-DESELECT, F-SELECT
        and maps it to FTP protocol, as defined in section 8.1.
 
  
==== FTP-I:Wait-for-ClientCmd  -->  FTP-I:Wait-for-USER ====
+
DELE      F-BEGIN-GROUP, F-DELETE, F-END-GROUP, F-SELECT
  
     1. Gateway receives QUIT command from FTP Client; maps QUIT as
+
HELP     none
        per Section 8.1.
 
  
=== FTAM-Initiated Gateway Service ===
+
LIST      F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
 +
          END-GROUP, F-OPEN, F-READ, F-READ-ATTRIBUTES, F-SELECT, F-
 +
          TRANSFER-END
  
The set of state variables for the FTAM-Initiated Gateway service
+
MKD      none
follow:
 
  
  State Variable                State Definition
+
MODE      none
  ----------------------------------------------------------------
 
  
  FTAM-I:Initial-State          Initial state of FTAM-Initiated Gateway
+
NLST      F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
                            Service.
+
          END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END
  
                            Gateway is waiting for an FTAM
+
NOOP      none
                            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-
+
PASS      F-INITIALIZE
                            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
+
PASV      none
                            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
+
PORT      none
                            Initiator and FTP Server.  Gateway is
 
                            waiting for next command or response
 
                            from FTAM Initiator.  Commands and
 
                            responses are mapped as they are
 
                            received.
 
  
 +
PWD      F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-READ-ATTRIBUTES,
 +
          F-SELECT
  
 +
QUIT      F-P-ABORT or F-U-ABORT, F-TERMINATE
  
 +
REIN      F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP
  
 +
REST      F-CHECK, F-RESTART
  
 +
RETR      F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
 +
          END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END
  
 +
RMD      none
  
  FTP-I:Wait-for-ServerCmd      Connection exists between FTAM
+
RNFR      F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT
                            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
+
RNTO      F-BEGIN-GROUP, F-CHANGE-ATTRIBUTES, F-DESELECT, F-END-
of Section 5.2.  For each state transition, the actions causing the
+
          GROUP, F-SELECT
transition are listed.
 
  
==== FTAM-I:Initial-State  -->  FTAM-I:Wait-for-IPAddress ====
+
SITE      F-INITIALIZE
  
     1. Gateway receives F-INITIALIZE from FTAM Initiator.  Domain
+
SMNT     none
        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.
 
  
==== FTAM-I:Wait-for-IPAddress  -->  FTAM-I:Wait-for-Connection ====
+
STAT      none
  
     1. Gateway resolves received Domain Name, Distinguished Name,
+
STOR     F-BEGIN-GROUP,F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
        or User Friendly Name of FTP Server to IP address.
+
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
    2. Gateway sends USER to FTP Server.
+
          F-TRANSFER-END, F-WRITE
    3. Gateway sends PASS to FTP Server.
 
  
==== FTAM-I:Wait-for-Connection  -->  FTAM-I:Wait-for-NextMapping ====
+
STOU      F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
 +
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
 +
          F-TRANSFER-END, F-WRITE
  
     1. Gateway receives 230 reply code (User Logged In) from FTP
+
STRU     none
        Server.
 
    2. Gateway sends <State Result> of "Success" to FTAM
 
        Initiator.
 
  
5.2.4  FTAM-I:Wait-for-InitiatrCmd  -->  FTAM-I:Wait-for-ServerCmd
+
TYPE      none
  
     1. Gateway receives command or response from FTAM Initiator
+
USER     F-INITIALIZE
        and maps it to FTP protocol, as defined in section 8.2.
 
  
==== FTAM-I:Wait-for-ServerCmd  -->  FTAM-I:Wait-for-InitiatrCmd ====
+
The remainder of this section presents detailed mapping procedures
 +
for each of the FTP protocol functions.  Gateway support for these
 +
mappings is required.
  
    1. Gateway receives command or response from FTP Server and
+
==== ABOR ====
        maps it to FTAM protocol, as defined in section 8.2.
 
  
==== FTAM-I:Wait-for-InitiatrCmd  --> FTAM-I:Wait-for-INITIALIZE ====
+
    1. Send F-CANCEL to FTAM Responder.
 +
    2. Send the following grouped request to the FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        codes to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
    1. Gateway receives F-CLOSE primitive from FTAM Initiator;
+
==== ACCT ====
        maps F-CLOSE as per Section 8.2.
 
  
 +
    1. Set <Account> parameter value for issuing F-INITIALIZE to
 +
        FTAM Responder.
 +
    2. If <Called Presentation Address>, <Initiator Identity>, and
 +
        <Filestore Password> parameters are available, attempt
 +
        connection with FTAM Responder;
 +
        Otherwise wait for additional ACCT commands.
 +
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        codes to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
  
 +
        FTAM Responder.
  
 +
    Note:
 +
    a. The ACCT command will be effective with the next PASS
 +
        command.
  
 +
==== ALLO ====
  
== Document Type Support ==
+
    1. Return a 200 reply code to FTP Client.
  
The set of FTAM document types supported by the FTP-FTAM gateway is a
+
==== APPE ====
subset of the document types identified in the Stable Implementation
 
Agreements for Open Systems Interconnection Protocols:  Part 9 - FTAM
 
Phase 2, produced by the March 1992 Open Systems Environment
 
Implementors' Workshop [NIST92].  This subset was chosen for its
 
equivalence to those document types supported by FTP.  The set
 
includes:
 
  
            FTAM-1    "ISO FTAM Unstructured text file
+
    1. Save current pathname by appending saved CWD string with
 
+
        <pathname> argument.  If no saved CWD string, proceed to
             FTAM-3   "ISO FTAM Unstructured binary file
+
        step 12.
 
+
    2. Send the following grouped request to FTAM Responder.
            NBS-9    "NBS-9 FTAM File directory file"
+
        F-BEGIN-GROUP
 
+
        F-SELECT
  FTAM document types map to FTP document types as follows:
+
        F-READ-ATTRIBUTES
 
+
             Save <Contents Type> parameter value
             FTAM      <->      FTP
+
        F-DESELECT
             ----------------------------------
+
        F-END-GROUP
 +
    3. If the <Contents Type> parameter value returned with the
 +
        F-READ-ATTRIBUTES has a value of "NBS-9", proceed to step
 +
        12.
 +
    4. Send the following grouped request to the FTAM responder.
 +
        F-BEGIN-GROUP
 +
        F-CREATE
 +
             Set the <Override> parameter in the F-CREATE to
 +
             "Select Old File".
 +
        F-OPEN
 +
        F-END-GROUP
 +
    5. If the file existed, set the <Contents Type> parameter in
 +
        the F-CREATE to match that returned by the
 +
        F-READ-ATTRIBUTES.
 +
    6. If the file did not exist and no previous FTP TYPE "Image"
 +
        command was issued, then set the <Contents Type> parameter
 +
        to "FTAM-1";
 +
        Otherwise, set the <Contents Type> parameter to "FTAM-3".
 +
    7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
 +
        Operation> parameter set to "File Extend", to FTAM
 +
        Responder.
 +
    8. Loop reading data from FTP data connection, sending the
 +
        data in F-DATA PDUs until end-of-file on the FTP
 +
        connection.
 +
    9. Send F-DATA-END to FTAM Responder.
 +
    10. Send F-TRANSFER-END to FTAM Responder.
 +
    11. Send the following grouped request to the FTAM Responder.
  
            FTAM-1    <->      ASCII
+
        F-BEGIN-GROUP
 
+
        F-CLOSE
            FTAM-3    <->       8 bit binary
+
        F-DESELECT
 
+
        F-END-GROUP
            NBS-9    <->       Directory
+
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    13. Translate FTP Client reply codes to equivalent FTAM
 +
        <Action Result> and <Diagnostic> parameters and send
 +
        parameters to FTAM Responder.
  
Gateway support for FTAM-1 and FTAM-2 is required, whereas support
+
    Note:
for NBS-9 is recommended.
+
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. CWD of the FTAM system must be defined prior to issuance of
 +
        APPE.
  
=== Notes on NBS-9 ===
+
==== CDUP ====
  
NBS-9 is optional in GOSIP versions 1 and 2 [NIST91]. NBS-9 will be
+
    1. Determine parent directory from saved CWD string.  If no
superseded by its replacement when ISO/IEC ISP 10607-2 and ISO/IEC
+
        saved CWD string, proceed to step 4.
ISP 10607-2/Amendment 1 are published [NIST92].
+
    2. Set <Contents Type> parameter to "NBS-9".
 +
    3. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    5. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
For conformance to NBS-9, an FTAM Responder is only required to
+
    Note:
return the <Filename> file attribute, subject to local security and
+
    a. A POSIX file organization is assumed; i.e., files in the
access control. All other requested attributes need not be returned.
+
        systems are organized in a hierarchical structure in which
 +
        all of the non-terminal nodes are directories and all of
 +
        the terminal nodes are any other type of file.
 +
    b. If the parent directory does not exist, the current working
 +
        directory remains unchanged.
 +
    c. CWD of the FTAM system must be defined prior to issuance of
 +
        CDUP.
  
Systems supporting the NBS-9 document type shall make available an
+
==== CWD ====
NBS-9 document called 'DIRLIS'.  This document can be used to obtain
 
a listing of files and their associated attributes from a remote
 
Filestore.
 
  
 +
    1. Save <pathname> argument as CWD string.
 +
    2. Set <Contents Type> parameter to "NBS-9".
  
 +
    3. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    5. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
 +
    Note:
 +
    a. The <pathname> argument is assumed to be an absolute
 +
        directory specification.
 +
    b. If the specified directory does not exist, the current
 +
        working directory remains unchanged.
 +
    c. Saved CWD string is used in other FTP-to-FTAM mappings,
 +
        such as APPE.
  
 +
==== DELE ====
  
 +
    1. Save current pathname by appending saved CWD string with
 +
        <pathname> argument.  If no saved CWD string, proceed to
 +
        step 3.
 +
    2. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-DELETE
 +
        F-END-GROUP
 +
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM
 +
        parameters and send parameters to FTAM Responder.
  
 +
    Note:
 +
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. CWD of the FTAM system must be defined prior to issuance of
 +
        DELE.
  
 +
==== HELP ====
  
 +
    1. If no <string> argument is provided, send helpful
 +
        information about the implementation of the gateway to the
 +
        FTP Client.  If an argument is provided, send more specific
 +
        information.
  
== Functional Comparison of FTP and FTAM ==
+
    2. Return the FTP reply code 214 to the FTP Client.
  
A comprehensive comparison of the services offered by FTP and FTAM is
+
==== LIST ====
beyond the scope of this specification.  What follows is an analysis
 
of several key points.  Refer to [NIST 86a] and [ROSE90] for a more
 
complete discourse on this topic.
 
  
FTAM is not a superset of FTP; each protocol has functions that only
+
    1. If <pathname> argument is provided, proceed to step 3.
it performs. The set of FTAM functions is, however, larger than the
+
    2. Save current pathname by appending saved CWD string with
set of FTP functions.
+
        <pathname> argument; If no saved CWD string, proceed to
 
+
        step 11.
FTP combines file management and file transfer into one protocol
+
    3. Send the following grouped request to the FTAM Responder.
engine, whereas FTAM separates management and transfer as they relate
+
        F-BEGIN-GROUP
to files.
+
        F-SELECT
 
+
        F-READ-ATTRIBUTES
The file transfer services of both FTP and FTAM expect a reliable
+
            Save <Filename>, <Contents Type>, <Data/Time of Last
underlying end-to-end serviceAt a minimum, this service includes
+
        Modification>, and <Filesize> parameters
the capability to transfer entire files between remote hosts and to
+
        F-DESELECT
display remote filenames.
+
        F-END-GROUP
 
+
    4. If the <Contents Type> parameter of the F-READ-ATTRIBUTES
In addition to this basic file transfer service, FTAM supports the
+
        is not "NBS-9", then return the <Filename>, <Contents
capability to:  access a few records from a file server, create a
+
        Type>, <Date/Time of Last Modification>, and <Filesize>
network file system (similar to Sun's Network File System), handle
+
        parameter values, obtained with the previous
printing and spooling, and access remote database records. FTP does
+
        F-READ-ATTRIBUTES, to the FTP data connection;
not support these additional capabilities.
+
        and proceed to step 8.
 
+
    5. Send the following grouped request to the FTAM Responder.
FTP uses TELNET services to set up a connection between the FTP
+
        F-BEGIN-GROUP
Client and FTP Server.  A three-digit reply code followed by
+
        F-SELECT
explanatory text indicates the status of the preceding request and
+
        F-OPEN
provides diagnostic information explaining each transaction.
+
        F-END-GROUP
 +
    6. Send F-READ to FTAM Responder.
 +
    7. Loop reading F-DATA until F-DATA-ENDAs data is received,
 +
        write the <Filename>, <Permitted Actions>, <Contents Type>,
 +
        and <Date/Time of Last Modification> parameter values from
 +
        the PDU to the FTP data connection.
 +
    8. Send F-TRANSFER-END to FTAM Responder.
 +
    9. Send the following grouped request to the FTAM responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    10. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    11. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
FTAM relies on the Association Control Service Element (ACSE) to
+
    Note:
start and stop the network for network file interaction. Generally,
+
    a. Assume the <pathname> argument is relative to the saved
the ASCE establishes the application association and related
+
        CWD, whether filename or directory specification.
application context needed to support the FTAM protocol.
 
  
The FTAM protocol is modularized so as to keep the allowable number
+
    b. CWD of the FTAM system must be defined prior to issuance of
of actions in any particular state relatively small. There are many
+
        LIST.
more possible sequences of FTP operations than possible sequences of
+
    c. Transfers over data connection should be in ASCII.
FTAM operations [NIST86].
+
    e. If list of files with full directory/file specification is
 +
        received from FTAM Responder, then gateway should parse
 +
        list to strip off directory portion.
  
Because FTAM is more robust than FTP, FTAM allows greater flexibility
+
8.1.10. MKD
for conveying information about files. FTAM deals only with aspects
 
of application processes, and leaves data representation and data
 
management facilities to other OSI service elements.
 
  
In contrast to the Client/Server model present in the FTP scheme,
+
    1. Return a 502 reply code (Command not implemented) to the
FTAM is based on the Initiator/Responder model. The key distinction
+
        FTP Client.
  
 +
    Note:
 +
    a. As indicated in the NIST Stable Implementation Agreements
 +
        for FTAM [NIST92], creation or deletion of NBS-9 files is
 +
        outside the scope of the agreements.
  
 +
8.1.11. MODE
  
 +
    1. If <argument> is "Stream", return 200 reply code to FTP
 +
        Client; Otherwise return a 504 reply code (Command not
 +
        implemented for that parameter).
  
 +
8.1.12. NLST
  
is that once the FTAM Initiator has established a connection with a
+
    1. If <pathname> argument is provided, use <pathname> argument
remote host, either the Initiator or Responder can request services
+
        as <Filename> parameter value in F-SELECT issued in step 3.
of the other. In the FTP realm, the Client both initiates a
+
    2. If no argument is provided, use saved CWD value as
connection and requests all services.
+
        <Filename> parameter value in F-SELECT issued in step 3; If
 
+
        no CWD string is saved and no argument is provided, proceed
The FTP Client knows the real properties of the remote host
+
        to step 9.
filesystem. FTAM, in contrast, embraces a conceptual model of a
+
    3. Set <Contents Type> parameter to "NBS-9".
filesystem, labeled a virtual filestore modelThe virtual filestore
+
    4. Send the following grouped request to the FTAM Responder.
is a collection of files, each of which has a name that uniquely
+
        F-BEGIN-GROUP
identifies it.  Each file has a set of attributes, such as ownership
+
        F-SELECT
information and contents, which is the data associated with the file.
+
        F-OPEN
One file attribute is the <Contents Type> of the file, typically of
+
        F-END-GROUP
value "FTAM-1", "FTAM-3", or "NBS-9". The FTAM Initiator only knows
+
    5. Send F-READ to FTAM Responder.
the properties of the corresponding Responder and virtual filestore,
+
    6. Loop reading F-DATA until F-DATA-ENDAs data is received,
not the real properties of the filesystem on the remote host.
+
        write the filenames and other useful information from the
 +
        PDU to the FTP data connection.
 +
    7. Send F-TRANSFER-END to FTAM Responder.
 +
    8. Send the following grouped request to the FTAM responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    9. Translate FTAM Responder <Action Result> and <Diagnostic>
  
=== Loss of Functionality ===
+
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    10. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
As happens whenever two dissimilar protocols, or languages for that
+
    Note:
matter, are translated, some loss of functionality is inevitable.
+
    a. As per RFC 959 (FTP), the NLST <pathname> argument is a
With reference to the FTP-FTAM gateway, several of the most blatant
+
        directory.
losses of functionality are:
+
    b. Assume the argument is relative to the saved CWD, whether
 +
        filename or directory specification.
 +
    c. CWD of the FTAM system must be defined prior to issuance of
 +
        NLST.
 +
    d. Transfers over data connection should be in ASCII.
 +
    e. Gateway should parse full directory/file specifications
 +
        received from FTAM Responder to strip off directory
 +
        portion.  This is required to support the "FTP multiple
 +
        get" function that pipes NLST output to the STOR command.
  
    1. Diagnostics passed between protocols may not be precisely
+
8.1.13. NOOP
        translated.
 
  
     2. The FTAM partial file (record) transfer may not be
+
     1. Return a 200 reply code to FTP Client.
        supported.
 
  
    3. Some FTAM attributes are not supported by FTP.
+
8.1.14. PASS
  
The primary goal of the gateway protocol mappings are to minimize
+
    1. Set <Filestore Password> parameter for F-INITIALIZE.
this loss of functionality. As this gateway specification and
+
    2. If <Called Presentation Address>, <User Identity>, and
subsequent implementations evolve, means to partially overcome loss
+
        <Filestore Password> are available, issue F- INITIALIZE to
of functionality may become more obvious. For example, the gateway
+
        FTAM Responder.
may be able to emulate file record transfers between FTAM Initiators
+
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
and FTP Servers.
+
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
== Mapping of Protocol Functions and Representations ==
+
8.1.15. PASV
  
The mappings presented are based upon the FTAM protocol
+
    1. Wait for data transfer on default data port or data port
implementation as defined in Stable Implementation Agreements for
+
        specified by PORT command.
Open Systems Interconnection Protocols:  Part 9 - FTAM Phase 2,
+
    2. Return a 200 reply code to FTP Client.
produced by the March 1992 Open Systems Environment Implementors'
 
Workshop [NIST92], and in [ISO8571-1], [ISO8571-2],[ISO8571-
 
3],[ISO8571-4], and [ISO8571-5]. The FTP protocol as defined in
 
Request for Comments [RFC959].  The mappings are strongly influenced
 
by the work of M. A. Wallace et. al. at NIST [NIST86] and John Scott
 
  
 +
8.1.16. PORT
  
 +
    1. Return a 200 reply code to FTP Client.
  
 +
8.1.17. PWD
  
 +
    1. If there is a saved CWD string, return it to the FTP client
 +
        and proceed to step 4.
 +
    2. Set <Contents Type> attribute to "NBS-9".
 +
    3. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-READ-ATTRIBUTES
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    4. Return the current directory name to the FTP client.
 +
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    6. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
at MITRE [MITRE87].
+
8.1.18. QUIT
  
A key goal of the mappings presented in this document is to minimize
+
    1. If user is not logged in, proceed to step 5.
the loss of functionality between the two protocols. The specific
+
    2. If file transfer is in progress, send F-P-ABORT or
approach taken to implement the mappings is left to the discretion of
+
        F-U-ABORT to FTAM Responder.
the gateway implementor. The focus of the protocol function and
+
    3. If file transfer is not in progress, send and F-TERMINATE
representation mappings is on non-error encumbered processing. The
+
        to FTAM Responder.
mapping of diagnostic and error messages is treated separately in
+
    4. Return charge information to FTP Client.
section 9.
+
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    6. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
At a minimum, the FTAM implementation in the FTP-FTAM gateway support
+
8.1.19. REIN
for Implementation Profiles T1 (Simple File Transfer) and M1
 
(Management), as defined in [NIST92], is required. These
 
Implementation Profiles correspond to the A/111 and A/13 Profiles of
 
Standards Promotion and Application Group in Europe, respectively
 
[NIST92].
 
  
At a minimum, the gateway support for the following is required:
+
    1. Flush all I/O and account information.
 +
    2. Allow all transfers in progress to be completed.
 +
    3. Set all parameters to default values.
 +
    4. Send F-CANCEL to FTAM Responder.
 +
    5. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    6. Leave the control connection open.
 +
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
  
  ASCII and 8 bit binary file types. It should also support FTP
+
        code(s) to FTP Client.
  File Stream Mode.
+
    8. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
  The following FTAM document types: FTAM-1 (unstructured text
+
    Note:
  file), FTAM-3 (unstructured binary file), and NBS-9 (set of
+
    a. Typically followed by a USER command.
  directory entries).
 
  
POSIX file naming and organization conventions are assumed in these
+
8.1.20. REST
mappings; i.e., files in the systems are assumed to be organized in a
 
hierarchical structure in which all of the non-terminal nodes are
 
directories and all of the terminal nodes are any other type of file.
 
  
The following terminology is used in the mapping specifications:
+
    1. Send F-CHECK to FTAM Responder.
 +
    2. Send F-RESTART to FTAM Responder.
 +
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
  argument .......FTP Service Command argument, as used in [RFC959].
+
    Notes:
 +
    a. Will only have affect on FTAM Responder if the restart
 +
        functional unit is negotiated on F-INITIALIZE.
 +
    b. Refer to ISO 8571-3 for additional subtleties of FTAM
 +
        checkpoint and restart.
  
  parameter ......FTAM Service Primitive parameters and attributes,
+
8.1.21. RETR
                  as enumerated in Tables 6, 50, and 51 of [ISO8571-
 
                  3].
 
  
The following notation is used in the mapping specifications:
+
    1. Save current pathname by appending saved CWD string with
 
+
        <pathname> argument.  If no saved CWD string, proceed to
  Arguments and parameters are enclosed in angle brackets; e.g.,
+
        step 9.
  <Action Result>
+
    2. Set <Contents Type> parameter to appropriate type of file.
 +
    3. Send the following grouped request to the FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-OPEN
 +
        F-END-GROUP
 +
    4. If file does not exist, proceed to step 9.
 +
    5. Send F-READ to FTAM Responder.
 +
    6. Loop reading F-DATA until F-DATA-END.  As data is received,
 +
        write it to the FTP data connection.
 +
    7. Send F-TRANSFER-END to FTAM Responder.
 +
    8. Send the following grouped request to the FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    9. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
  
  Values of arguments and parameters are enclosed in quotation
+
        code(s) to FTP Client.
  marks; e.g., "Success"
+
    10. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
 +
    Note:
 +
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. CWD of the FTAM system must be defined prior to issuance of
 +
        RETR.
  
 +
8.1.22. RMD
  
 +
    1. Return a 502 reply code (Command not implemented) to the
 +
        FTP Client.
  
 +
    Note:
 +
    a. As indicated in the NIST Stable Implementation Agreements
 +
        for FTAM [NIST92], creation or deletion of NBS-9 files is
 +
        outside the scope of the agreements.
  
 +
8.1.23. RNFR
  
 +
    1. Save current pathname by appending saved CWD string with
 +
        <pathname> argument.  If no saved CWD string, proceed to
 +
        step 3.
 +
    2. Send the following grouped request to the FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
            Get <Filename> parameter value from RNFR <pathname>
 +
        argument.
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
  FTP Service Commands and FTAM Primitives are in uppercase; e.g., F-
+
    Note:
  INITIALIZE
+
    a. <pathname> argument is assumed to be a filename, relative
 
+
        to the currently saved CWD.
=== FTP-Initiated Gateway Service ===
+
    b. Together with RNTO, this command causes a file to be
 +
        renamed.
 +
    c. CWD of the FTAM system must be defined prior to issuance of
 +
        RNFR.
  
The protocol mapping between FTP and FTAM may be one-to-zero (i.e.,
+
8.1.24. RNTO
not mappable), one-to-one, or one-to-many.
 
  
The general steps taken by the FTP-FTAM gateway to provide the FTP-
+
    1. Save current pathname by appending saved CWD string with
Initiated service are:
+
        <pathname> argument.  If no saved CWD string, proceed to
 
+
        step 3.
     1. Accept an FTP Client request at the FTP Server side of the
+
    2. Send the following grouped request to the FTAM Responder.
         gateway service.
+
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-CHANGE-ATTRIBUTES
 +
            Get <Filename> parameter from arguments provided by
 +
            RNTO and previous RNFR.
 +
        F-DESELECT
 +
        F-END-GROUP
 +
     3. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
         FTAM Responder.
  
     2. Map the request to the (set of) corresponding FTAM
+
     Note:
         Initiator function(s).
+
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. Together with RNFR, this command causes a file to be
 +
        renamed.
 +
    c. CWD of the FTAM system must be defined prior to issuance of
 +
         RNTO.
  
    3. Acting as an FTAM Initiator, send the FTAM Initiator
+
8.1.25. SITE
        function(s) to the FTAM Responder.
 
  
     4. Accept information returned to the FTAM Initiator side of
+
     1. Save the specified destination address information.
         the gateway.  This information originated at the FTAM
+
    2. Set the <Called Presentation Address> parameter value equal
         Responder.
+
         to the <string> argument.  This parameter will be used when
 
+
        the F-INITIALIZE is sent to the FTAM Responder.
     5. Map this returned information to the protocol form
+
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
         understood by the FTP Server side of the gateway.
+
        parameters to equivalent FTP reply code(s) and send reply
 +
         code(s) to FTP Client.
 +
     4. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
         FTAM Responder.
  
     6. Send this returned information from the FTP Server side of
+
     Note:
         the gateway to the FTP Client.
+
    a. The <string> argument to the SITE command may include a
 +
         Distinguished Name or a User Friendly Name.
  
For each FTP protocol function, the FTAM protocol functions required
+
8.1.26. SMNT
to map it are identified:
 
  
FTP       FTAM
+
    1. Return a 502 reply code to FTP Client.
  
------------------------------------------------------------------
+
    Note:
 +
    a. Argument is ignored.
  
ABOR      F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP
+
8.1.27. STAT
  
ACCT     F-INITIALIZE,
+
     1. Provide the gateway session status to the FTP Client.
 +
    2. Return a 211 reply code to FTP Client.
  
ALLO     none
+
     Note:
 
+
     a. Argument is ignored.
APPE      F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
 
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
 
          F-TRANSFER-END, F-WRITE
 
 
 
CDUP     F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT
 
  
 +
8.1.28. STOR
  
 +
    1. Save current pathname by appending saved CWD string with
 +
        <pathname> argument.  If no saved CWD string, proceed to
 +
        step 11.
 +
    2. Send the following grouped request to FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-SELECT
 +
        F-READ-ATTRIBUTES
 +
            Save <Contents Type> parameter value
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    3. If the <Contents Type> parameter returned with the F-READ-
 +
        ATTRIBUTES indicates a directory,  proceed to step 11.
 +
    4. Send the following grouped request to the FTAM responder.
 +
        F-BEGIN-GROUP
 +
        F-CREATE
 +
            Set the <Override> parameter in the F-CREATE to
 +
            "Delete and create with new attributes.".
 +
        F-OPEN
 +
        F-END-GROUP
 +
    5. If the file existed, set the <Contents Type> parameter in
 +
        the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
 +
        did not exist, set the <Contents Type> parameter to
 +
        "FTAM-1".  If TYPE "Image" was previously requested, set
 +
        the <Contents Type> parameter to "FTAM-3".
 +
    6. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
 +
        Operation> parameter set to "File Extend", to FTAM Responder.
 +
    7. Loop reading data from FTP data connection, sending the
 +
        data in F-DATA PDUs until end-of-file on the FTP
 +
        connection.
 +
    8. Send F-DATA-END to FTAM Responder.
 +
    9. Send F-TRANSFER-END to FTAM Responder.
  
 +
    10. Send the following grouped request to the FTAM Responder.
 +
        F-BEGIN-GROUP
 +
        F-CLOSE
 +
        F-DESELECT
 +
        F-END-GROUP
 +
    11. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    12. Translate FTP Client reply codes to equivalent FTAM
 +
        <Action Result> and <Diagnostic> parameters and send
 +
        parameters to FTAM Responder.
  
 +
    Note:
 +
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. CWD of the FTAM system must be defined prior to issuance of
 +
        STOR.
  
CWD      F-BEGIN-GROUP, F-END-GROUP, F-DESELECT, F-SELECT
+
8.1.29. STOU
 
 
DELE      F-BEGIN-GROUP, F-DELETE, F-END-GROUP, F-SELECT
 
 
 
HELP      none
 
 
 
LIST      F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
 
          END-GROUP, F-OPEN, F-READ, F-READ-ATTRIBUTES, F-SELECT, F-
 
          TRANSFER-END
 
  
MKD      none
+
    1. Save current pathname by appending saved CWD string with
 
+
        <pathname> argument.  If no saved CWD string, proceed to
MODE     none
+
        step 11.
 
+
     2. Send the following grouped request to FTAM Responder.
NLST      F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
+
        F-BEGIN-GROUP
          END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END
+
        F-SELECT
 
+
        F-READ-ATTRIBUTES
NOOP      none
+
            Save <Contents Type> parameter value
 
+
        F-DESELECT
PASS     F-INITIALIZE
+
        F-END-GROUP
 +
    3. If the file already exists, proceed to step 12.
 +
    4. If the <Contents Type> parameter returned with the F-READ-
 +
        ATTRIBUTES indicates a directory, proceed to step 11.
 +
    5. Send the following grouped request to the FTAM responder.
 +
        F-BEGIN-GROUP
 +
        F-CREATE
 +
            Set the <Override> parameter in the F-CREATE to
 +
            "Delete and create with new attributes.".
 +
        F-OPEN
 +
        F-END-GROUP
 +
    6. If the file existed, set the <Contents Type> parameter in
 +
        the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
 +
        did not exist, set the <Contents Type> parameter to
 +
        "FTAM-1".  If TYPE "Image" was previously requested, set
 +
        the <Contents Type> parameter to "FTAM-3".
 +
     7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
 +
        Operation> parameter set to "File Extend", to FTAM Responder.
 +
    8. Loop reading data from FTP data connection, sending the
  
PASV     none
+
        data in F-DATA PDUs until end-of-file on the FTP
 
+
        connection.
PORT     none
+
     9. Send F-DATA-END to FTAM Responder.
 
+
    10. Send F-TRANSFER-END to FTAM Responder.
PWD      F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-READ-ATTRIBUTES,
+
     11. Send the following grouped request to the FTAM Responder.
          F-SELECT
+
        F-BEGIN-GROUP
 
+
        F-CLOSE
QUIT     F-P-ABORT or F-U-ABORT, F-TERMINATE
+
        F-DESELECT
 +
        F-END-GROUP
 +
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
     13. Translate FTP Client reply codes to equivalent FTAM
 +
        <Action Result> and <Diagnostic> parameters and send
 +
        parameters to FTAM Responder.
  
REIN     F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP
+
     Note:
 +
    a. <pathname> argument is assumed to be a filename, relative
 +
        to the currently saved CWD.
 +
    b. Same as STOR, except the name of the created file must be
 +
        unique in that directory.
 +
    c. CWD of the FTAM system must be defined prior to issuance of
 +
        STOU.
  
REST      F-CHECK, F-RESTART
+
8.1.30. STRU
  
RETR     F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-
+
     1. If <structure code> argument is not "File", return 504
          END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END
+
        reply code to FTP Client; Otherwise return 200 reply code
 +
        to FTP Client.
  
RMD      none
+
8.1.31. SYST
  
RNFR     F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT
+
     1. Return 502 reply code to FTP client.
  
RNTO      F-BEGIN-GROUP, F-CHANGE-ATTRIBUTES, F-DESELECT, F-END-
+
8.1.32. TYPE
          GROUP, F-SELECT
 
 
 
SITE      F-INITIALIZE
 
 
 
SMNT      none
 
  
 +
    1. If no <type code> argument is provided, set <Contents Type>
 +
        parameter equal to "FTAM-1".
 +
    2. If argument is provided, and equal to "ASCII", set <Contents
 +
        Type> parameter to "FTAM-1".
 +
    3. If argument is provided, and equal to "Image", set <Contents
 +
        Type> parameter to "FTAM-3".
 +
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    5. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
 +
    Note:
 +
    a. Default to ASCII if no <type code> argument is provided.
  
 +
8.1.33. USER
  
 +
    1. Set <Initiator Identity> parameter for issuing F-INITIALIZE
 +
        to FTAM Responder.
 +
    2. If the destination address was specified in the Domain Name
 +
        used to attach to the gateway, use it to set the value of
 +
        the <Called Presentation Address> parameter of the
 +
        to-be-issued F-INITIALIZE command.
 +
    3. If the destination address is not known, check if it was
 +
        specified in a previously issued SITE command.  If
 +
        available, set <Called Presentation Address> parameter for
 +
        issuing F-INITIALIZE to FTAM Responder.
 +
    4. If the destination address is still not available, check if
 +
        it is encoded in the user identity (e.g., user@host). If
 +
        encoded, set <Called Presentation Address> parameter for
 +
        issuing F-INITIALIZE to FTAM Responder using the "host"
 +
        portion.
 +
    5. If no destination address is available, proceed to step 7.
 +
    6. Prompt user for password.
 +
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply code(s) and send reply
 +
        code(s) to FTP Client.
 +
    8. Translate FTP Client reply codes to equivalent FTAM <Action
 +
        Result> and <Diagnostic> parameters and send parameters to
 +
        FTAM Responder.
  
 +
    Note:
 +
    a. A USER command should be acceptable in any state.
 +
    b. Multiple mechanisms are available for specifying the
 +
        destination address: 1) Domain Name used in connecting to
 +
        gateway (see section 4, Use of Gateway Services); 2) SITE
 +
        command argument; and 3) user@host format.
 +
 +
=== FTAM-Initiated Gateway Service ===
  
STAT      none
+
The protocol mapping between FTP and FTAM may be one-to-zero (i.e.,
 
+
not mappable), one-to-one, or one-to-many.
STOR      F-BEGIN-GROUP,F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
 
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
 
          F-TRANSFER-END, F-WRITE
 
  
STOU      F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-
+
The general steps taken by the FTP-FTAM gateway to provide the FTAM-
          DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
+
Initiated service are:
          F-TRANSFER-END, F-WRITE
 
  
STRU     none
+
     1. Accept an FTAM Initiator request at the FTAM Responder side
 +
        of the gateway.
  
TYPE     none
+
     2. Map the request to the (set of) corresponding FTP Client
  
USER      F-INITIALIZE
+
        function(s).
  
The remainder of this section presents detailed mapping procedures
+
    3. Acting as an FTP Client, send the FTP Client function(s) to
for each of the FTP protocol functions.  Gateway support for these
+
        the FTP Server.
mappings is required.
 
  
==== ABOR ====
+
    4. Accept information returned to the FTP Client side of the
 +
        gateway.  This information originated at the FTP Server.
  
     1. Send F-CANCEL to FTAM Responder.
+
     5. Map this returned information to a form understood by the
    2. Send the following grouped request to the FTAM Responder.
+
         FTAM Responder side of the gateway.
        F-BEGIN-GROUP
 
        F-CLOSE
 
        F-DESELECT
 
        F-END-GROUP
 
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        codes to FTP Client.
 
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
         FTAM Responder.
 
  
==== ACCT ====
+
    6. Send this returned information from the FTAM Responder side
 +
        of the gateway to the FTAM Initiator.
  
    1. Set <Account> parameter value for issuing F-INITIALIZE to
+
For each FTAM protocol function, the FTP protocol functions required
        FTAM Responder.
+
to map it are identified:
    2. If <Called Presentation Address>, <Initiator Identity>, and
 
        <Filestore Password> parameters are available, attempt
 
        connection with FTAM Responder;
 
        Otherwise wait for additional ACCT commands.
 
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        codes to FTP Client.
 
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
  
 +
  FTAM                FTP
  
 +
  -----------------------------------------------------------------
  
 +
  F-BEGIN-GROUP      none
  
 +
  F-CANCEL            ABOR
  
        FTAM Responder.
+
  F-CHANGE-ATTRIBUTE  RNFR, RNTO
  
    Note:
+
  F-CHECK            none
    a. The ACCT command will be effective with the next PASS
+
 
        command.
+
  F-CLOSE            none
 +
 
 +
  F-CREATE            STOR
 +
 
 +
  F-DATA              ALLO, STOR or RETR or APPE
 +
 
 +
  F-DATA-END          none
 +
 
 +
  F-DELETE            DELE
 +
 
 +
  F-DESELECT          none
  
==== ALLO ====
+
  F-END-GROUP        STAT
  
    1. Return a 200 reply code to FTP Client.
+
  F-ERASE            DELE
  
==== APPE ====
+
  F-INITIALIZE        ACCT, PASS, USER
  
    1. Save current pathname by appending saved CWD string with
+
  F-LOCATE            none
        <pathname> argument.  If no saved CWD string, proceed to
+
 
        step 12.
+
  F-OPEN             MODE, STRU, TYPE
    2. Send the following grouped request to FTAM Responder.
+
 
        F-BEGIN-GROUP
+
  F-READ             MODE, NLST, RETR, TYPE
        F-SELECT
 
        F-READ-ATTRIBUTES
 
             Save <Contents Type> parameter value
 
        F-DESELECT
 
        F-END-GROUP
 
    3. If the <Contents Type> parameter value returned with the
 
        F-READ-ATTRIBUTES has a value of "NBS-9", proceed to step
 
        12.
 
    4. Send the following grouped request to the FTAM responder.
 
        F-BEGIN-GROUP
 
        F-CREATE
 
            Set the <Override> parameter in the F-CREATE to
 
            "Select Old File".
 
        F-OPEN
 
        F-END-GROUP
 
    5. If the file existed, set the <Contents Type> parameter in
 
        the F-CREATE to match that returned by the
 
        F-READ-ATTRIBUTES.
 
    6. If the file did not exist and no previous FTP TYPE "Image"
 
        command was issued, then set the <Contents Type> parameter
 
        to "FTAM-1";
 
        Otherwise, set the <Contents Type> parameter to "FTAM-3".
 
    7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
 
        Operation> parameter set to "File Extend", to FTAM
 
        Responder.
 
    8. Loop reading data from FTP data connection, sending the
 
        data in F-DATA PDUs until end-of-file on the FTP
 
        connection.
 
    9. Send F-DATA-END to FTAM Responder.
 
    10. Send F-TRANSFER-END to FTAM Responder.
 
    11. Send the following grouped request to the FTAM Responder.
 
  
 +
  F-READ-ATTRIBUTE    LIST
  
 +
  F-RECOVER          REST
  
 +
  F-RESTART          ABOR, REST
  
 +
  F-SELECT            LIST
  
        F-BEGIN-GROUP
+
  F-TERMINATE        QUIT
        F-CLOSE
+
 
        F-DESELECT
+
  F-TRANSFER         none
        F-END-GROUP
 
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    13. Translate FTP Client reply codes to equivalent FTAM
 
        <Action Result> and <Diagnostic> parameters and send
 
         parameters to FTAM Responder.
 
  
    Note:
+
  F-P-ABORT          QUIT
    a. <pathname> argument is assumed to be a filename, relative
 
        to the currently saved CWD.
 
    b. CWD of the FTAM system must be defined prior to issuance of
 
        APPE.
 
  
==== CDUP ====
+
  F-U-ABORT          QUIT
  
    1. Determine parent directory from saved CWD string.  If no
+
  F-WRITE            APPE or STOR, NOOP
        saved CWD string, proceed to step 4.
 
    2. Set <Contents Type> parameter to "NBS-9".
 
    3. Send the following grouped request to FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-SELECT
 
        F-DESELECT
 
        F-END-GROUP
 
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    5. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
  
    Note:
+
The remainder of this section presents detailed mapping procedures
    a. A POSIX file organization is assumed; i.e., files in the
+
for each of the FTAM protocol functions. Where appropriate, each
        systems are organized in a hierarchical structure in which
+
FTAM service primitive is followed by those parameters that are
        all of the non-terminal nodes are directories and all of
+
relevant to the mapping. Gateway support for these mappings is
        the terminal nodes are any other type of file.
+
required.
    b. If the parent directory does not exist, the current working
+
 
        directory remains unchanged.
+
==== F-BEGIN-GROUP REQ ====
    c. CWD of the FTAM system must be defined prior to issuance of
 
        CDUP.
 
  
==== CWD ====
+
    1. Send F-BEGIN-GROUP RESP PDU to FTAM Initiator signifying
 +
        that processes are available to handle concatenated
 +
        requests.
  
    1. Save <pathname> argument as CWD string.
+
==== F-CANCEL REQ ====
    2. Set <Contents Type> parameter to "NBS-9".
 
  
 +
    1. Close FTP data connection.
 +
    2. Send ABOR to FTP Server.
 +
    3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder action and diagnostic parameters and send
 +
        parameters to FTAM Initiator via F-CANCEL RESP PDU.
 +
    4. Translate FTAM Initiator action and diagnostic parameters
 +
        to equivalent FTP reply codes and send reply codes to FTP
 +
        Server.
  
 +
    Note:
 +
    a. F-U-ABORT REQ is a viable alternative to F-CANCEL REQ.
 +
    b. Note that since ABOR is not implemented by all FTP Servers,
  
 +
        the remote file may be corrupted, though accessible.
  
 +
==== F-CHANGE-ATTRIBUTE REQ ====
  
     3. Send the following grouped request to FTAM Responder.
+
     1. Get original filename from <Filename> parameter and send it
        F-BEGIN-GROUP
+
        with an RNFR to the FTP Server.
        F-SELECT
+
     2. Get new filename from <Filename> parameter and send it with
        F-DESELECT
+
         an RNTO to the FTP Server.
        F-END-GROUP
+
     3. Translate FTP Server reply code to equivalent FTAM
     4. Translate FTAM Responder <Action Result> and <Diagnostic>
+
         Responder action and diagnostic parameters and send
        parameters to equivalent FTP reply code(s) and send reply
+
        parameters to FTAM Initiator via F-CHANGE-ATTRIBUTE RESP
         code(s) to FTP Client.
+
         PDU.
     5. Translate FTP Client reply codes to equivalent FTAM <Action
+
    4. Translate FTAM Initiator action and diagnostic parameters
         Result> and <Diagnostic> parameters and send parameters to
+
        to equivalent FTP reply codes and send reply codes to FTP
         FTAM Responder.
+
        Server.
  
 
     Note:
 
     Note:
     a. The <pathname> argument is assumed to be an absolute
+
     a. Allow for processing an arbitrary number attributes at one
         directory specification.
+
         time.
     b. If the specified directory does not exist, the current
+
     b. Allow for responses of "Attribute currently unavailable for
         working directory remains unchanged.
+
         change" and "Attribute not currently supported".
     c. Saved CWD string is used in other FTP-to-FTAM mappings,
+
     c. At a minimum, support the <Filename>, <Permitted Actions>,
         such as APPE.
+
         and <Contents Type> parameters.
  
==== DELE ====
+
==== F-CHECK REQ ====
  
     1. Save current pathname by appending saved CWD string with
+
     1. Send an F-CHECK RESP PDU to the FTAM Initiator.
        <pathname> argument.  If no saved CWD string, proceed to
 
        step 3.
 
    2. Send the following grouped request to FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-SELECT
 
        F-DELETE
 
        F-END-GROUP
 
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    4. Translate FTP Client reply codes to equivalent FTAM
 
        parameters and send parameters to FTAM Responder.
 
  
    Note:
+
==== F-CLOSE REQ ====
    a. <pathname> argument is assumed to be a filename, relative
 
        to the currently saved CWD.
 
    b. CWD of the FTAM system must be defined prior to issuance of
 
        DELE.
 
 
 
==== HELP ====
 
 
 
    1. If no <string> argument is provided, send helpful
 
        information about the implementation of the gateway to the
 
        FTP Client.  If an argument is provided, send more specific
 
        information.
 
  
 +
    1. Send F-CLOSE RESP PDU , with <Action Result> parameter
 +
        value of "Success", to FTAM Initiator.
  
 +
    Note:
 +
    a. If an error had occurred during transfer, it would have
 +
        been noted before the F-CLOSE REQ.
  
 +
==== F-CREATE REQ ====
  
 +
    1. Send STOR and zero data bytes to FTP Server.
 +
    2. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator.
 +
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
 +
 +
==== F-DATA PDU ====
 +
 +
    1. If necessary, send ALLO command to FTP Server.
 +
    2. Depending on whether reading or writing, send STOR, RETR,
 +
        or APPE command to FTP Server.
 +
    3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
     2. Return the FTP reply code 214 to the FTP Client.
+
     Note:
 +
    a. The use of an FTP command may be unnecessary.  Sending the
 +
        data on the data connection may be adequate.
  
==== LIST ====
+
==== F-DATA-END REQ ====
  
     1. If <pathname> argument is provided, proceed to step 3.
+
     1. Close the data connection.
     2. Save current pathname by appending saved CWD string with
+
     2. Save mandatory Diagnostic parameter for later use.
        <pathname> argument; If no saved CWD string, proceed to
+
     3. Translate FTP Server reply code to equivalent FTAM
        step 11.
+
        Responder <Action Result> and <Diagnostic> parameters and
     3. Send the following grouped request to the FTAM Responder.
+
         send parameters to FTAM Initiator.
        F-BEGIN-GROUP
+
     4. Translate FTAM Initiator <Action Result> and <Diagnostic>
        F-SELECT
+
         parameters to equivalent FTP reply codes and send reply
        F-READ-ATTRIBUTES
+
         codes to FTP Server.
            Save <Filename>, <Contents Type>, <Data/Time of Last
 
        Modification>, and <Filesize> parameters
 
        F-DESELECT
 
        F-END-GROUP
 
    4. If the <Contents Type> parameter of the F-READ-ATTRIBUTES
 
        is not "NBS-9", then return the <Filename>, <Contents
 
        Type>, <Date/Time of Last Modification>, and <Filesize>
 
         parameter values, obtained with the previous
 
        F-READ-ATTRIBUTES, to the FTP data connection;
 
        and proceed to step 8.
 
    5. Send the following grouped request to the FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-SELECT
 
        F-OPEN
 
        F-END-GROUP
 
     6. Send F-READ to FTAM Responder.
 
    7. Loop reading F-DATA until F-DATA-END.  As data is received,
 
        write the <Filename>, <Permitted Actions>, <Contents Type>,
 
        and <Date/Time of Last Modification> parameter values from
 
        the PDU to the FTP data connection.
 
    8. Send F-TRANSFER-END to FTAM Responder.
 
    9. Send the following grouped request to the FTAM responder.
 
        F-BEGIN-GROUP
 
        F-CLOSE
 
        F-DESELECT
 
        F-END-GROUP
 
    10. Translate FTAM Responder <Action Result> and <Diagnostic>
 
         parameters to equivalent FTP reply code(s) and send reply
 
         code(s) to FTP Client.
 
    11. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
  
    Note:
+
==== F-DELETE REQ ====
    a. Assume the <pathname> argument is relative to the saved
 
        CWD, whether filename or directory specification.
 
  
 +
    1. Send DELE to FTP server.
 +
    2. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator via F-DELETE RESP PDU.
 +
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 +
8.2.10. F-DESELECT REQ
  
 +
    1. Return F-DESELECT RESP PDU, with <Action Result> parameter
 +
        value of "Success", to FTAM Initiator.
  
 +
8.2.11. F-END-GROUP REQ
  
     b. CWD of the FTAM system must be defined prior to issuance of
+
     1. Send STAT command sequence to FTP Server.
        LIST.
+
     2. Translate FTP Server reply code to equivalent FTAM
     c. Transfers over data connection should be in ASCII.
+
         Responder <Action Result> and <Diagnostic>
    e. If list of files with full directory/file specification is
+
         parameters and send parameters to FTAM Initiator via F-END
         received from FTAM Responder, then gateway should parse
 
         list to strip off directory portion.
 
  
==== MKD ====
+
        GROUP RESP.
 +
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
    1. Return a 502 reply code (Command not implemented) to the
+
8.2.12. F-ERASE REQ
        FTP Client.
 
  
     Note:
+
     1. Send DELE to FTP Server.
     a. As indicated in the NIST Stable Implementation Agreements
+
     2. Translate FTP Server reply code to equivalent FTAM
         for FTAM [NIST92], creation or deletion of NBS-9 files is
+
        Responder <Action Result> and <Diagnostic> parameters and
         outside the scope of the agreements.
+
         send parameters to FTAM Initiator via F-ERASE RESP PDU.
 +
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
         codes to FTP Server.
  
==== MODE ====
+
8.2.13. F-INITIALIZE REQ
  
     1. If <argument> is "Stream", return 200 reply code to FTP
+
     1. Establish initial area for activity attributes.
         Client; Otherwise return a 504 reply code (Command not
+
    2. Save <Responding Presentation Address>, <Initiator
         implemented for that parameter).
+
         Identity>, and <Filestore Password> parameter values
 
+
         received from FTAM Initiator.
==== NLST ====
+
    3. If the destination address was specified in the
 
+
        Distinguished Name (or User Friendly Name) used to attach
     1. If <pathname> argument is provided, use <pathname> argument
+
        to the gateway, save it as the ultimate destination
         as <Filename> parameter value in F-SELECT issued in step 3.
+
        address.
     2. If no argument is provided, use saved CWD value as
+
     4. If the ultimate destination address is not yet known, look
         <Filename> parameter value in F-SELECT issued in step 3; If
+
        at the "@host" portion of the <Initiator Identity>
        no CWD string is saved and no argument is provided, proceed
+
         parameter for the ultimate destination parameter.
         to step 9.
+
     5. If the ultimate destination address is still not known,
     3. Set <Contents Type> parameter to "NBS-9".
+
         check if it is available in the <Responding Presentation
    4. Send the following grouped request to the FTAM Responder.
+
        Address> parameter.
        F-BEGIN-GROUP
+
    6. Get userid from <Initiator Identity> and send it with USER
        F-SELECT
+
         command to FTP Server.
        F-OPEN
+
     7. Get password from <Filestore Password> and send it with
        F-END-GROUP
+
        PASS command to FTP Server.
     5. Send F-READ to FTAM Responder.
+
     8. If necessary, send ACCT command to FTP Server.
     6. Loop reading F-DATA until F-DATA-END. As data is received,
+
     9. Negotiate acceptance of mandatory functional units, service
         write the filenames and other useful information from the
+
         classes, service types, presentation contexts, and
         PDU to the FTP data connection.
+
         attribute groups.
     7. Send F-TRANSFER-END to FTAM Responder.
+
     10. Accept context management functional unit passed by
     8. Send the following grouped request to the FTAM responder.
+
        Presentation service provider.
         F-BEGIN-GROUP
+
     11. Translate FTP Server reply code to equivalent FTAM
         F-CLOSE
+
         Responder <Action Result> and <Diagnostic> parameters and
        F-DESELECT
+
         send parameters to FTAM Initiator via F-INIT RESP PDU.
        F-END-GROUP
+
     12. Translate FTAM Initiator <Action Result> and <Diagnostic>
     9. Translate FTAM Responder <Action Result> and <Diagnostic>
+
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 +
    Note:
 +
    a. Multiple mechanisms are available for specifying the
 +
        destination address: 1) Distinguished Name, or User
 +
        Friendly Name, used in connecting to the gateway (see
 +
        section 4, Use of Gateway Services); 2) user@host format;
 +
        and 3) Inclusion as <Responding Presentation Address>
 +
        parameter value.
  
 +
8.2.14. F-LOCATE REQ
  
 +
    Note:
 +
    a. Not supported since FTAM-1 and FTAM-3 don't support this
 +
        primitive.
  
 +
8.2.15. F-OPEN REQ
  
         parameters to equivalent FTP reply code(s) and send reply
+
    1. Get <Contents Type> and <Processing Mode> parameter values
        code(s) to FTP Client.
+
         from FTAM Initiator.
     10. Translate FTP Client reply codes to equivalent FTAM <Action
+
    2. Send TYPE command to FTP Server.
        Result> and <Diagnostic> parameters and send parameters to
+
    3. Send MODE command to FTP Server.
         FTAM Responder.
+
    4. Send STRU command to FTP Server.
 +
     5. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic>
 +
        parameters and send parameters to FTAM Initiator via F-OPEN
 +
         RESP PDU.
 +
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 
     Note:
 
     Note:
     a. As per [[RFC959|RFC 959]] (FTP), the NLST <pathname> argument is a
+
     a. Establishes definite value for presentation context name
         directory.
+
         parameter for this data transfer.
     b. Assume the argument is relative to the saved CWD, whether
+
     b. Assumes that the <Requested Access> parameter is permitted.
        filename or directory specification.
 
    c. CWD of the FTAM system must be defined prior to issuance of
 
        NLST.
 
    d. Transfers over data connection should be in ASCII.
 
    e. Gateway should parse full directory/file specifications
 
        received from FTAM Responder to strip off directory
 
        portion.  This is required to support the "FTP multiple
 
        get" function that pipes NLST output to the STOR command.
 
  
==== NOOP ====
+
8.2.16. F-READ REQ
  
     1. Return a 200 reply code to FTP Client.
+
     1. If requested file type and file mode are different than
 +
        current settings, send TYPE and MODE to FTP Server.
 +
    2. If <Contents Type> is FTAM-1 or FTAM-3, then send RETR to
 +
        FTP Server.
 +
    3. If <Contents Type> is "NBS-9", then send NLST to FTP
 +
        Server.
 +
    4. If reply code from FTP Server is 1xx, open FTP data
 +
        connection and loop until End-of-File is read on FTP data
 +
        connection.  Inside loop, read block from FTP data
 +
        connection, format FTAM DATA PDU, and send FTAM PDU to FTAM
 +
        Initiator.  At End-of-File on FTP data connection, send
 +
        F-DATA-END and return.
  
==== PASS ====
+
    5. If reply code from FTP Server is not 1xx, send F-CANCEL REQ
 +
        to FTAM Initiator.
 +
    6. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator via F-READ RESP PDU.
 +
    7. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
     1. Set <Filestore Password> parameter for F-INITIALIZE.
+
     Note:
     2. If <Called Presentation Address>, <User Identity>, and
+
     a. To send NLST response, TYPE must be ASCII.
        <Filestore Password> are available, issue F- INITIALIZE to
 
        FTAM Responder.
 
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
  
==== PASV ====
+
8.2.17. F-READ-ATTRIBUTE REQ
  
     1. Wait for data transfer on default data port or data port
+
     1. Send LIST to FTP Server.
         specified by PORT command.
+
    2. Translate returned information into the <Filename>,
     2. Return a 200 reply code to FTP Client.
+
        <Contents Type>, and <Permitted Actions> parameter values
 +
         and return them to the FTAM Initiator.
 +
     3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator via F-READ-ATTRIBUTE RESP
 +
        PDU.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
==== PORT ====
+
8.2.18. F-RECOVER REQ
 
 
    1. Return a 200 reply code to FTP Client.
 
  
 +
    1. Send REST command to FTP Server.
 +
    2. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator.
 +
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 +
    Note:
 +
    a. Regime recovery is only possible if the <Recovery
 +
        Functional Unit> parameter was negotiated previously by an
 +
        F-INITIALIZE.
  
 +
8.2.19. F-RESTART REQ
  
 +
    1. To interrupt any bulk data transfer in progress, send ABOR
 +
        to FTP Server.
 +
    2. To negotiate the point at which data transfer is to be
 +
        restarted, get <Checkpoint Identifier> parameter from FTAM
 +
        Initiator and send it with REST to FTP Server.
  
 +
    3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator via F-RESTART RESP PDU.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 +
8.2.20. F-SELECT REQ
  
 +
    1. Get <Filename> parameter and send with LIST command to FTP
 +
        Server to determine whether  or not the file exists.
 +
    2. If file exists, compare the POSIX file access rights with
 +
        the <Requested Access> parameter sent by the FTAM
 +
        Initiator.  If the access rights match, return <Action
 +
        Result> parameter value of "Success", otherwise return
 +
        <Action Result> parameter value of "Failure".
 +
    3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator via F-SELECT RESP PDU.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
==== PWD ====
+
    Note:
 +
    a. The specified file is binary/text file if one record is
 +
        received or is a directory file if multiple records are
 +
        received.
  
    1. If there is a saved CWD string, return it to the FTP client
+
8.2.21. F-TERMINATE REQ
        and proceed to step 4.
 
    2. Set <Contents Type> attribute to "NBS-9".
 
    3. Send the following grouped request to FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-SELECT
 
        F-READ-ATTRIBUTES
 
        F-DESELECT
 
        F-END-GROUP
 
    4. Return the current directory name to the FTP client.
 
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    6. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
  
==== QUIT ====
+
     1. Send QUIT to FTP Server.
 
+
     2. Translate FTP Server reply code to equivalent FTAM
     1. If user is not logged in, proceed to step 5.
+
         Responder <Action Result> and <Diagnostic> parameters and
     2. If file transfer is in progress, send F-P-ABORT or
+
         send parameters to FTAM Initiator via F-TERMINATE RESP PDU.
        F-U-ABORT to FTAM Responder.
+
     3. Translate FTAM Initiator <Action Result> and <Diagnostic>
    3. If file transfer is not in progress, send and F-TERMINATE
+
        parameters to equivalent FTP reply codes and send reply
         to FTAM Responder.
+
         codes to FTP Server.
    4. Return charge information to FTP Client.
 
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
         code(s) to FTP Client.
 
     6. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
         FTAM Responder.
 
  
==== REIN ====
+
8.2.22. F-TRANSFER-END
  
     1. Flush all I/O and account information.
+
     1. Get <Action Result> parameter value from last F-DATA-END
    2. Allow all transfers in progress to be completed.
+
        and return it to FTAM Initiator as <Action Result>
    3. Set all parameters to default values.
+
         parameter of this F-TRANSFER-END.
    4. Send F-CANCEL to FTAM Responder.
 
    5. Send the following grouped request to FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-CLOSE
 
        F-DESELECT
 
        F-END-GROUP
 
    6. Leave the control connection open.
 
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
 
         parameters to equivalent FTP reply code(s) and send reply
 
  
 +
8.2.23. F-P-ABORT REQ
  
 +
    1. Send QUIT to FTP Server.
 +
    2. Return <Action Result> parameter value of "Permanent Error"
  
 +
        to FTAM Initiator.
 +
    3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
        send parameters to FTAM Initiator.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
 +
8.2.24. F-U-ABORT REQ
  
         code(s) to FTP Client.
+
    1. Send QUIT to FTP Server.
     8. Translate FTP Client reply codes to equivalent FTAM <Action
+
    2. Return <Action Result> parameter value of "Permanent Error"
         Result> and <Diagnostic> parameters and send parameters to
+
         to FTAM Initiator.
         FTAM Responder.
+
     3. Translate FTP Server reply code to equivalent FTAM
 +
        Responder <Action Result> and <Diagnostic> parameters and
 +
         send parameters to FTAM Initiator.
 +
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
         codes to FTP Server.
  
    Note:
+
=== F-WRITE REQ ===
    a. Typically followed by a USER command.
 
  
==== REST ====
+
    1. Save bulk transfer specification parameter from PDU.
 +
    2. Send NOOP to FTP Server to receive status information.
 +
    3. If the <Bulk Data Transfer Specification, FADU Operation>
 +
        parameter has a value of "File Extend", then send an APPE
 +
        to the FTP Server, otherwise send a STOR to the FTP Server.
 +
    4. If reply code from FTP Server is 200, then accept FTP data
 +
        connection; otherwise send F-CANCEL REQ to FTAM Initiator.
 +
    5. Translate FTP Server reply code to equivalent FTAM Responder
 +
        <Action Result> and <Diagnostic> parameters and send
 +
        parameters to FTAM Initiator.
 +
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
 +
        parameters to equivalent FTP reply codes and send reply
 +
        codes to FTP Server.
  
    1. Send F-CHECK to FTAM Responder.
+
==  Mapping between FTP Reply Codes and FTAM Parameters ==
    2. Send F-RESTART to FTAM Responder.
 
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    4. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
  
    Notes:
+
The focus of the protocol function and representation mappings,
    a. Will only have affect on FTAM Responder if the restart
+
presented in the previous sections, is on non-error encumbered
        functional unit is negotiated on F-INITIALIZE.
+
processing. Though appropriate responses are designated in many
    b. Refer to ISO 8571-3 for additional subtleties of FTAM
+
cases, it is intended that a more thorough use of responses will be
        checkpoint and restart.
+
incorporated into gateway implementations.
  
==== RETR ====
+
The purpose of this section is to provide a set of mappings between
 +
FTAM responses (<Action Result> and <Diagnostic>) and FTP responses
 +
(reply codes).
  
    1. Save current pathname by appending saved CWD string with
+
The <Action Result> parameter of the FTAM File Service primitives
        <pathname> argument.  If no saved CWD string, proceed to
+
conveys information which summarizes that available in the
        step 9.
+
<Diagnostic> parameter. The value is never less than the most severe
    2. Set <Contents Type> parameter to appropriate type of file.
+
diagnostic value. The valid values of this parameter are "Success",
    3. Send the following grouped request to the FTAM Responder.
+
"Transient Error", and "Permanent Error"The FTP response text
        F-BEGIN-GROUP
+
should be supplied in the <Further Details> field of the
        F-SELECT
+
<Diagnostics> sequence in the FTAM response and abort messages.
        F-OPEN
 
        F-END-GROUP
 
    4. If file does not exist, proceed to step 9.
 
    5. Send F-READ to FTAM Responder.
 
    6. Loop reading F-DATA until F-DATA-ENDAs data is received,
 
        write it to the FTP data connection.
 
    7. Send F-TRANSFER-END to FTAM Responder.
 
    8. Send the following grouped request to the FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-CLOSE
 
        F-DESELECT
 
        F-END-GROUP
 
    9. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
  
 +
An FTAM <Action Result> "Success" may be accompanied by a
 +
<Diagnostic> with value of "Informative Error Type".  These "Success"
 +
diagnostic messages are associated with error type 0 in the table
 +
below (and in [ISO8571-3]).  Error type 1 indicates a transient
 +
error, while type 2 indicates a permanent error.
  
 +
An FTP reply consists of a three digit number followed by some text.
 +
The number is defined as a 3-digit code, each digit of which has a
 +
special significance.  The first digit conveys approximately the same
 +
information as the FTAM <Action Result> parameter; i.e., positive,
 +
transient negative, or permanent negative.
  
 +
The FTP specification document [RFC959] explicitly states that the
 +
list of reply codes should not be expanded beyond that which is
 +
presented in [RFC959].  This requirement is adhered to in the
 +
mappings presented in this document.
  
 +
===  FTP Reply Codes to FTAM Parameters ===
  
        code(s) to FTP Client.
+
This section presents the set of mappings between FTP reply codes and
    10. Translate FTP Client reply codes to equivalent FTAM <Action
+
their equivalent FTAM action and diagnostic parameters.  Gateway
        Result> and <Diagnostic> parameters and send parameters to
+
support for these mappings is recommended, but not required.  The
        FTAM Responder.
+
following abbreviations are used for FTAM action parameter values:
  
     Note:
+
     trans  =    transient error
     a. <pathname> argument is assumed to be a filename, relative
+
     perman  =    permanent error
        to the currently saved CWD.
 
    b. CWD of the FTAM system must be defined prior to issuance of
 
        RETR.
 
  
==== RMD ====
+
  FTP Reply                                    |FTAM Diagnostic
 +
                                                |
 +
                                                |
 +
  Code      Text                              |Result  Type Id
 +
  ---------------------------------------------+------------------
 +
  110      Restart marker reply              |success  0    0
 +
  120      Service ready in nnn minutes      |success  0    0
 +
  125      Data connection open, transfer    |
 +
            starting                          |success  0    0
 +
  150      File status okay; about to open    |
 +
            data connection                    |success  0    0
 +
  200      Command okay                      |success  0    0
 +
  202      Command not implemented;          |
  
     1. Return a 502 reply code (Command not implemented) to the
+
            superfluous                        |success  0    0
         FTP Client.
+
  211      System status, or system help     |
 
+
            reply                             |success  0    0
    Note:
+
  212      Directory status                  |success  0    0
    a. As indicated in the NIST Stable Implementation Agreements
+
  213      File status                        |success  0    0
        for FTAM [NIST92], creation or deletion of NBS-9 files is
+
  214      Help message                      |success  0    0
        outside the scope of the agreements.
+
  215      NAME system type                  |success  0    0
 
+
  220      Service ready for new user         |success  0    0
==== RNFR ====
+
  221      Service closing control connection |success  0    0
 
+
  225      Data connection; no transfer in    |
     1. Save current pathname by appending saved CWD string with
+
            progress                          |success  0    0
        <pathname> argument. If no saved CWD string, proceed to
+
  226      Closing data connection            |success  0    0
         step 3.
+
  227      Entering passive mode (h1,h2,..)  |success  0    0
    2. Send the following grouped request to the FTAM Responder.
+
  230      User logged in, proceed            |success  0    0
         F-BEGIN-GROUP
+
  250      Requested file action okay,       |
        F-SELECT
+
            completed                          |success  0    0
             Get <Filename> parameter value from RNFR <pathname>
+
  257      "PATHNAME" created                |success  0    0
         argument.
+
  331      User name okay, need password      |success  0    0
        F-DESELECT
+
  332      Need account for logon            |success  0    0
        F-END-GROUP
+
  350      Requested file action pending     |
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
+
            further information                |success 0    0
        parameters to equivalent FTP reply code(s) and send reply
+
  421      Service not available, closing    |
        code(s) to FTP Client.
+
            control connection                |trans    1    1
    4. Translate FTP Client reply codes to equivalent FTAM <Action
+
  425      Can't open data connection         |trans    1    3
        Result> and <Diagnostic> parameters and send parameters to
+
  426      Connection closed, transfer        |
        FTAM Responder.
+
            aborted                            |trans    1    1014
 
+
  450      Requested file action not taken,  |
    Note:
+
            file unavailable (e.g., file busy) |trans    1    5041
    a. <pathname> argument is assumed to be a filename, relative
+
  451      Requested file action aborted,    |
        to the currently saved CWD.
+
            local error in processing         |trans    1    5028
    b. Together with RNTO, this command causes a file to be
+
  452      Requested action not taken,        |
        renamed.
+
             insufficient storage space         |trans    1    9
    c. CWD of the FTAM system must be defined prior to issuance of
+
  500      Syntax error, command unrecognized |perman  2    5015
        RNFR.
+
  501      Syntax error in parameters or      |
 +
            arguments                          |perman  2    4004
 +
  502      Command not implemented            |perman  2    5016
 +
  503      Bad sequence of commands          |perman  2    1015
 +
  504      Command not implemented for that  |
 +
            parameter                          |perman  2    4003
 +
  530      Not logged in                      |perman  2    2020
 +
  532      Need account for storing files    |perman  2    2008
 +
  550      Requested action not taken; file  |
 +
            unavailable (e.g., file not found, |
 +
            no access)                        |perman  2    3013
 +
  551      Requested action aborted, page    |
 +
            type                              |perman  2    5002
 +
  552      Requested file action aborted,    |
 +
            exceeded storage allocation        |perman  2    9
  
 +
  553      Requested file action not taken,  |
 +
            file name not allowed              |perman  2    3024
  
 +
===  FTAM Parameters to FTP Reply Codes ===
  
 +
This section presents the set of mappings between FTAM diagnostic
 +
parameters and their equivalent FTP reply codes.  Gateway support for
 +
these mappings is recommended, but not required.  As previously
 +
mentioned, type 0 is an informative error type that may be returned
 +
with a "Success" action result, type 1 is a transient error type, and
 +
type 2 is a permanent error type.
  
 +
  FTAM Diagnostic                                  |FTP Reply Code
 +
                                                    |
 +
  Type      Id  Reason                            |
 +
  --------------------------------------------------+--------
 +
                                                    |
 +
  1,2      0    No reason                          |    421
 +
  0        1    Responder error                    |    211
 +
  1,2      1    Responder error                    |    421
 +
  1,2      2    System shutdown                    |    421
 +
  0        3    FTAM mgmt problem, unspecific      |    211
 +
  1,2      3    FTAM mgmt problem, unspecific      |    425
 +
  0        4    FTAM mgmt, bad account            |    221
 +
  2        4    FTAM mgmt, bad account            |    532
 +
  0        5    FTAM mgmt, security not passed    |    211
 +
  2        5    FTAM mgmt, security not passed    |    530
 +
  0        6    Delay may be encountered          |    211
 +
  0        7    Initiator error, unspecific        |    211
 +
  1,2      7    Initiator error, unspecific        |    421
 +
  0        8    Subsequent error                  |    211
 +
  1,2      8    Subsequent error                  |    421
 +
  0        9    Temporal insufficiency of resources|    211
 +
  1,2      9    Temporal insufficiency of resources|    452
 +
  1,2      10  Access req. violates VFS security  |    550
 +
  1,2      11  Access req. violates local security|    550
 +
  2        1000 Conflicting parameter values      |    504
 +
  2        1001 Unsupported parameter values      |    504
 +
  2        1002 Mandatory parameter not set        |    504
 +
  2        1003 Unsupported parameter              |    504
 +
  2        1004 Duplicated parameter              |    504
 +
  2        1005 Illegal parameter type            |    504
 +
  2        1006 Unsupported parameter types        |    504
 +
  2        1007 FTAM protocol err., unspecific    |    426
 +
  2        1008 FTAM protocol err., procedure err  |    426
 +
  2        1009 FTAM protocol err., funct. unit err|    426
 +
  2        1010 FTAM protocol err., corruption err.|    426
  
 +
  2        1011 Lower layer failure                |    426
 +
  1,2      1012 Lower layer addressing error      |    426
 +
  1,2      1013 Timeout                            |    426
 +
  1,2      1014 System shutdown                    |    426
 +
  2        1015 Illegal grouping sequence          |    503
 +
  2        1016 Grouping threshold violation      |    503
 +
  2        1017 Inconsistent PDU request          |    503
 +
  2        2000 Association with user not allowed  |    532
 +
  2        2002 Unsupported service class          |    504
 +
  0        2003 Unsupported functional unit        |    211
 +
  2        2003 Unsupported functional unit        |    502
 +
  0        2004 Attribute group error, unspecific  |    211
 +
  1,2      2004 Attribute group error, unspecific  |    504
 +
  2        2005 Attribute group not supported      |    504
 +
  0        2006 Attribute group not allowed        |    211
 +
  2        2006 Attribute group not allowed        |    504
 +
  0        2007 Bad account                        |    211
 +
  2        2007 Bad account                        |    532
 +
  0        2008 Association management, unspecific |    211
 +
  1,2      2008 Association management, unspecific |    532
 +
  2        2009 Association management, bad address|    532
 +
  1,2      2010 Association management, bad account|    532
 +
  0        2011 Checkpoint window error, too large |    211
 +
  2        2011 Checkpoint window error, too large |    426
 +
  0        2012 Checkpoint window error, too small |    211
 +
  2        2012 Checkpoint window error, too small |    426
 +
  0        2013 Checkpoint window error, unsupp.  |    211
 +
  2        2013 Checkpoint window error, unsupp.  |    504
 +
  0        2014 Communications QoS not supported  |    211
 +
  1,2      2014 Communications QoS not supported  |    504
 +
  2        2015 Initiator identity unacceptable    |    532
 +
  0        2016 Context management refused        |    211
 +
  0        2017 Rollback not available            |    211
 +
  0        2018 Contents type list cut by          |
 +
                  responder                          |    211
 +
  0        2019 Contents type list by              |
 +
                  Presentation Service              |    211
 +
  2        2020 Invalid filestore password        |    530
 +
  2        2021 Incompatible service classes      |    530
 +
  1,2      3000 Filename not found                |    550
 +
  1,2      3001 Selection attributes not matched  |    550
 +
  2        3002 Initial attributes not possible    |    550
 +
  2        3003 Bad attribute name                |    550
 +
  1,2      3004 Non-existent file                  |    550
 +
  1,2      3005 File already exists                |    553
 +
  1,2      3006 File cannot be created            |    553
 +
  1,2      3007 File cannot be deleted            |    553
 +
  0        3008 Concurrency control not available  |    211
  
==== RNTO ====
+
  2        3008 Concurrency control not available  |    503
 
+
  0        3009 Concurrency control not supported  |    211
    1. Save current pathname by appending saved CWD string with
+
  2         3009 Concurrency control not supported |    502
         <pathname> argument. If no saved CWD string, proceed to
+
  0         3010 Concurrency control not possible  |    211
         step 3.
+
  2         3010 Concurrency control not possible  |    503
    2. Send the following grouped request to the FTAM Responder.
+
  0        3011 More restrictive lock              |    211
        F-BEGIN-GROUP
+
  1        3011 More restrictive lock             |    450
        F-SELECT
+
  1,2      3012 File busy                          |    450
        F-CHANGE-ATTRIBUTES
+
  1,2      3013 File not available                |    450
             Get <Filename> parameter from arguments provided by
+
  0        3014 Access control not available      |    211
            RNTO and previous RNFR.
+
  1,2      3014 Access control not available      |    503
        F-DESELECT
+
  0         3015 Access control not supported      |    211
        F-END-GROUP
+
  1,2      3015 Access control not supported      |    502
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
+
  0         3016 Access control inconsistent        |    211
         parameters to equivalent FTP reply code(s) and send reply
+
  1,2      3016 Access control inconsistent        |    503
         code(s) to FTP Client.
+
  0         3017 Filename truncated                |    211
    4. Translate FTP Client reply codes to equivalent FTAM <Action
+
  0         3018 Initial attributes altered        |    211
         Result> and <Diagnostic> parameters and send parameters to
+
  1,2      3019 Bad account                        |    532
         FTAM Responder.
+
  0         3020 Override selected existing file   |    211
 
+
  0         3021 Override deleted and recreated    |    211
    Note:
+
  0         3022 Create override deleted and        |
    a. <pathname> argument is assumed to be a filename, relative
+
                  recreate file with new attributes  |    211
         to the currently saved CWD.
+
  1,2      3023 Create override, not possible      |    553
    b. Together with RNFR, this command causes a file to be
+
  1,2      3024 Ambiguous file specification      |    553
         renamed.
+
  2        3025 Invalid create password            |    550
    c. CWD of the FTAM system must be defined prior to issuance of
+
  2         3026 Invalid delete password on override|    550
         RNTO.
+
  2         3027 Bad attribute value                |    550
 
+
  2         3028 Requested access violation         |    550
==== SITE ====
+
  2         3029 Functional unit not available for  |    550
 
+
                  requested access                  |
    1. Save the specified destination address information.
+
  0        3030 File created but not selected     |    211
    2. Set the <Called Presentation Address> parameter value equal
+
  1        3030 Invalid create password            |    550
         to the <string> argument.  This parameter will be used when
+
  0         4000 Attribute non-existent            |    211
         the F-INITIALIZE is sent to the FTAM Responder.
+
  1,2      4000 Attribute non-existent            |    501
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
+
  1,2      4001 Attribute cannot be read          |    504
         parameters to equivalent FTP reply code(s) and send reply
+
  1,2      4002 Attribute cannot be changed        |    504
         code(s) to FTP Client.
+
  1,2      4003 Attribute not supported            |    504
    4. Translate FTP Client reply codes to equivalent FTAM <Action
+
  2        4004 Bad attribute name                |    501
         Result> and <Diagnostic> parameters and send parameters to
+
  2        4005 Bad attribute value                |    501
         FTAM Responder.
+
  0        4006 Attribute partially supported     |    211
 
+
  0        4007 Additional set attribute value    |
     Note:
+
                  not distinct                      |    211
    a. The <string> argument to the SITE command may include a
+
  1,2      5000 Bad FADU, unspecific              |    550
         Distinguished Name or a User Friendly Name.
+
  2         5001 Bad FADU, size error              |    501
 
+
  2        5002 Bad FADU, type error              |    551
 
+
  2        5003 Bad FADU, poorly specified        |    501
 
+
  2        5004 Bad FADU, bad location            |    550
 
+
  0        5005 FADU does not exist                |    550
 
 
 
 
 
 
 
 
 
 
==== SMNT ====
 
 
 
    1. Return a 502 reply code to FTP Client.
 
 
 
    Note:
 
     a. Argument is ignored.
 
 
 
==== STAT ====
 
 
 
    1. Provide the gateway session status to the FTP Client.
 
    2. Return a 211 reply code to FTP Client.
 
 
 
    Note:
 
    a. Argument is ignored.
 
 
 
==== STOR ====
 
  
    1. Save current pathname by appending saved CWD string with
+
  1         5005 FADU does not exist                |    550
         <pathname> argument.  If no saved CWD string, proceed to
+
  0         5006 FADU not available, unspecific    |    550
        step 11.
+
  1,2      5006 FADU not available, unspecific    |    550
    2. Send the following grouped request to FTAM Responder.
+
  1,2      5007 FADU not available for reading    |    550
        F-BEGIN-GROUP
+
  1,2      5008 FADU not available for writing    |    550
        F-SELECT
+
  1,2      5009 FADU not available for location    |    550
        F-READ-ATTRIBUTES
+
  1,2      5010 FADU not available for erasure    |    550
             Save <Contents Type> parameter value
+
  1,2       5011 FADU cannot be inserted            |    550
        F-DESELECT
+
  1,2      5012 FADU cannot be replaced            |    550
        F-END-GROUP
+
  0        5013 FADU cannot be located            |    550
    3. If the <Contents Type> parameter returned with the F-READ-
+
  1,2      5013 FADU cannot be located            |    550
         ATTRIBUTES indicates a directoryproceed to step 11.
+
  2        5014 Bad data element type             |    550
     4. Send the following grouped request to the FTAM responder.
+
  1,2      5015 Operation not available            |    500
        F-BEGIN-GROUP
+
  1,2      5016 Operation not supported            |    502
        F-CREATE
+
  0        5017 Operation inconsistent            |    211
            Set the <Override> parameter in the F-CREATE to
+
  2        5017 Operation inconsistent            |    503
            "Delete and create with new attributes.".
+
  0         5018 Concurrency control not available  |    211
        F-OPEN
+
  1,2      5018 Concurrency control not available  |    503
        F-END-GROUP
+
  0        5019 Concurrency control not supported  |    211
    5. If the file existed, set the <Contents Type> parameter in
+
  2        5019 Concurrency control not supported |    502
         the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
+
  0        5020 Concurrency control inconsistent  |    211
         did not exist, set the <Contents Type> parameter to
+
  2        5020 Concurrency control inconsistent  |    503
         "FTAM-1".  If TYPE "Image" was previously requested, set
+
  0        5021 Processing mode not available     |    211
         the <Contents Type> parameter to "FTAM-3".
+
  1,2      5021 Processing mode not available      |    503
    6. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
+
  0        5022 Processing mode not supported      |    211
         Operation> parameter set to "File Extend", to FTAM Responder.
+
  2        5022 Processing mode not supported      |    504
     7. Loop reading data from FTP data connection, sending the
+
  0        5023 Processing mode inconsistent      |    211
         data in F-DATA PDUs until end-of-file on the FTP
+
  2        5023 Processing mode inconsistent      |    503
         connection.
+
  0        5024 Access context not available      |    211
    8. Send F-DATA-END to FTAM Responder.
+
  2        5024 Access context not available      |    503
    9. Send F-TRANSFER-END to FTAM Responder.
+
  0         5025 Access context not supported      |    211
 +
  2         5025 Access context not supported      |    504
 +
  1,2      5026 Bad write, unspecific              |    550
 +
  1,2      5027 Bad read, unspecific              |    550
 +
  0         5028 Local failure, unspecific          |    211
 +
  1,2      5028 Local failure, unspecific          |    451
 +
  0         5029 Local failure, filespace exhausted |    211
 +
  1,2      5029 Local failure, filespace exhausted |    552
 +
  0         5030 Local failure, data corrupted      |    211
 +
  1,2      5030 Local failure, data corrupted     |    451
 +
  0        5031 Local failure, data corrupted      |    211
 +
  1,2      5031 Local failure, data corrupted      |    451
 +
  2        5032 Future file size exceeded          |    451
 +
  0         5034 Future file size increased        |    211
 +
  0        5035 Functional unit invalid in         |
 +
                  processing mode                    |    211
 +
  2        5035 Functional unit invalid in        |
 +
                  processing mode                    |    503
  
 +
  0        5036 Contents type inconsistent        |    211
 +
  2        5036 Contents type inconsistent        |    503
 +
  0        5037 Contents type simplified          |    211
 +
  0        5038 Duplicate FADU name                |    211
 +
  1,2      5039 Damage to select/open regime      |    553
 +
  1,2      5040 FADU locking not available on file |    450
 +
  1,2      5041 FADU locked by another user        |    450
  
 +
===  Future Mapping Problem ===
  
 +
At some point in the future, the FTAM <Responding Presentation
 +
Address> parameter may be used for purposes other than the current
 +
use of passing the final destination address in the FTAM-Initiated
 +
gateway service [NIST86].  If this happens, the destination address
 +
will have to be passed in another location, such as in the "@host"
 +
portion of the <Initiator Identity>.  Currently, the FTP-FTAM gateway
 +
specification permits either mechanism for storage of the ultimate
 +
destination address.
  
 +
===  Error Handling ===
  
    10. Send the following grouped request to the FTAM Responder.
+
The minimal acceptable solution for FTAM-Initiated service errors is
        F-BEGIN-GROUP
+
to map FTP failures to FTAM "Unrecoverable error" and return the FTP
        F-CLOSE
+
diagnostic string in the FTAM <Further Details> field.  Similarly for
        F-DESELECT
+
FTP-Initiated service errors, the minimal acceptable solution is to
        F-END-GROUP
+
return reply code 221, "Service closing control connection, Logged
    11. Translate FTAM Responder <Action Result> and <Diagnostic>
+
out if appropriate".  While this minimal solution is acceptable, the
        parameters to equivalent FTP reply code(s) and send reply
+
recommended approach for Gateway developers is to implement the
        code(s) to FTP Client.
+
mappings presented in Section 9.1, FTP Reply Codes to FTAM
    12. Translate FTP Client reply codes to equivalent FTAM
+
Parameters, and Section 9.2, FTAM Parameters to FTP Reply Codes.
        <Action Result> and <Diagnostic> parameters and send
+
 
        parameters to FTAM Responder.
+
10. Implementation and Configuration Guidelines
  
    Note:
+
The intent of this specification is to specify the required
    a. <pathname> argument is assumed to be a filename, relative
+
characteristics and functions of an FTP-FTAM gateway. The specific
        to the currently saved CWD.
+
approach taken to realize these specifications in an operational
    b. CWD of the FTAM system must be defined prior to issuance of
+
gateway are left to the discretion of the implementor. We do take
        STOR.
+
the liberty, however, of suggesting several ideas concerning the
 +
configuration and implementation of such gateways.
 +
 
 +
10.1.  Robustness
 +
 
 +
The gateway should be robust enough to handle situations where a
 +
subset of the FTP and/or FTAM protocols are implemented on a host.
 +
 
 +
The gateway should support multiple concurrent FTP and FTAM
 +
connections.
 +
 
 +
These are requirements for gateway implementations.
  
==== STOU ====
+
10.2.  Well-Known TCP/IP Port
  
    1. Save current pathname by appending saved CWD string with
+
It is recommended that the FTP-Initiated gateway process listen on
        <pathname> argumentIf no saved CWD string, proceed to
+
TCP/IP port 21, the well-known port for FTP listener processesAs
        step 11.
+
the gateway computer is primarily intended to provide gateway
    2. Send the following grouped request to FTAM Responder.
+
services, use of this port will alleviate the need for gateway users
        F-BEGIN-GROUP
+
to specify the desired port when they connect to the gateway. The
        F-SELECT
+
standard FTP server listener process can then be moved to another
        F-READ-ATTRIBUTES
+
port that is known to those users (e.g., System Administrators)
            Save <Contents Type> parameter value
+
requiring FTP-to-FTP access to the gateway computer.
        F-DESELECT
+
 
        F-END-GROUP
+
10.3. Gateway Listener Processes
    3. If the file already exists, proceed to step 12.
 
    4. If the <Contents Type> parameter returned with the F-READ-
 
        ATTRIBUTES indicates a directory, proceed to step 11.
 
    5. Send the following grouped request to the FTAM responder.
 
        F-BEGIN-GROUP
 
        F-CREATE
 
            Set the <Override> parameter in the F-CREATE to
 
            "Delete and create with new attributes.".
 
        F-OPEN
 
        F-END-GROUP
 
    6. If the file existed, set the <Contents Type> parameter in
 
        the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
 
        did not exist, set the <Contents Type> parameter to
 
        "FTAM-1".  If TYPE "Image" was previously requested, set
 
        the <Contents Type> parameter to "FTAM-3".
 
    7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
 
        Operation> parameter set to "File Extend", to FTAM Responder.
 
    8. Loop reading data from FTP data connection, sending the
 
  
 +
To simplify the administrative overhead on the gateway computer
 +
system, it is recommended that the FTP-Initiated service and FTAM-
 +
Initiated gateway listener processes be merged into a single
 +
executable module.  This single daemon will act as the one and only
 +
gateway listener processes.  As connections were established with
 +
hosts, other processes would be created.
  
 +
10.4.  Implementation Testing
  
 +
To assist in the development and evaluation of FTP-FTAM gateway
 +
prototypes, NIST has developed a test system to evaluate a gateway's
 +
conformance to the protocol standards [NIST88].
  
 +
10.5.  POSIX File Naming and Organization
  
        data in F-DATA PDUs until end-of-file on the FTP
+
The OSI profiles do not define a standard manner for an FTAM
        connection.
+
Responder to return file names.
    9. Send F-DATA-END to FTAM Responder.
 
    10. Send F-TRANSFER-END to FTAM Responder.
 
    11. Send the following grouped request to the FTAM Responder.
 
        F-BEGIN-GROUP
 
        F-CLOSE
 
        F-DESELECT
 
        F-END-GROUP
 
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    13. Translate FTP Client reply codes to equivalent FTAM
 
        <Action Result> and <Diagnostic> parameters and send
 
        parameters to FTAM Responder.
 
  
    Note:
+
To avoid unnecessary complexity, proprietary file systems are not
    a. <pathname> argument is assumed to be a filename, relative
+
addressed in these mappings. Gateway support for POSIX file naming
        to the currently saved CWD.
+
and organization conventions is required; i.e., files are assumed to
    b. Same as STOR, except the name of the created file must be
+
be organized in a hierarchical structure in which all of the non-
        unique in that directory.
+
terminal nodes are directories and all of the terminal nodes are any
    c. CWD of the FTAM system must be defined prior to issuance of
+
other type of file.
        STOU.
 
  
==== STRU ====
+
11.  Security Considerations
  
    1. If <structure code> argument is not "File", return 504
+
The gateway system may place the burden of authentication on the
        reply code to FTP Client; Otherwise return 200 reply code
+
destination system. However, the gateway must accommodate the
        to FTP Client.
+
passing through of all authentication parameters.  The authentication
 +
parameters of each protocol are applied at the destination and no
 +
additional parameters are needed for authentication at the gateway.
 +
As such, no gateway password file is required to support gateway
  
==== SYST ====
+
functions.
  
    1. Return 502 reply code to FTP client.
+
It is anticipated that the requirement for a strong authentication
 
+
mechanism will soon replace the most currently used, userid and
==== TYPE ====
+
password mechanism.  The U.S. National Security Agency (NSA) has
 
+
already prototyped and has plans field a Message Secure Protocol
    1. If no <type code> argument is provided, set <Contents Type>
+
(MSP) as part of the Defense Message System (DMS) Program which will
        parameter equal to "FTAM-1".
+
soon become the Department of Defense (DoD) mandatory messaging
    2. If argument is provided, and equal to "ASCII", set <Contents
+
systemMSP utilizes a public key encryption-like mechanism which
        Type> parameter to "FTAM-1".
+
will be used to authenticate users and allow signed operationsThe
    3. If argument is provided, and equal to "Image", set <Contents
+
current philosophy is to use this same mechanism for all
        Type> parameter to "FTAM-3".
+
authentication and access control situations, such as logging onto
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
+
remote hosts or gatewaysDetailed specifications for Pre-MSP, used
        parameters to equivalent FTP reply code(s) and send reply
+
in the unclassified though sensitive arena, are scheduled to be
        code(s) to FTP Client.
+
published in the first quarter of 1993.  The requirement for gateways
    5. Translate FTP Client reply codes to equivalent FTAM <Action
+
to process PMSP and MSP strong authentication mechanisms will be part
        Result> and <Diagnostic> parameters and send parameters to
+
of all future DoD procurements.
        FTAM Responder.
 
 
 
 
 
 
 
 
 
 
 
    Note:
 
    a. Default to ASCII if no <type code> argument is provided.
 
 
 
==== USER ====
 
 
 
    1. Set <Initiator Identity> parameter for issuing F-INITIALIZE
 
        to FTAM Responder.
 
    2. If the destination address was specified in the Domain Name
 
        used to attach to the gateway, use it to set the value of
 
        the <Called Presentation Address> parameter of the
 
        to-be-issued F-INITIALIZE command.
 
    3. If the destination address is not known, check if it was
 
        specified in a previously issued SITE command.  If
 
        available, set <Called Presentation Address> parameter for
 
        issuing F-INITIALIZE to FTAM Responder.
 
    4. If the destination address is still not available, check if
 
        it is encoded in the user identity (e.g., user@host). If
 
        encoded, set <Called Presentation Address> parameter for
 
        issuing F-INITIALIZE to FTAM Responder using the "host"
 
        portion.
 
    5. If no destination address is available, proceed to step 7.
 
    6. Prompt user for password.
 
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply code(s) and send reply
 
        code(s) to FTP Client.
 
    8. Translate FTP Client reply codes to equivalent FTAM <Action
 
        Result> and <Diagnostic> parameters and send parameters to
 
        FTAM Responder.
 
 
 
    Note:
 
    a. A USER command should be acceptable in any state.
 
    b. Multiple mechanisms are available for specifying the
 
        destination address: 1) Domain Name used in connecting to
 
        gateway (see section 4, Use of Gateway Services); 2) SITE
 
        command argument; and 3) user@host format.
 
 
 
=== FTAM-Initiated Gateway Service ===
 
 
 
The protocol mapping between FTP and FTAM may be one-to-zero (i.e.,
 
not mappable), one-to-one, or one-to-many.
 
 
 
The general steps taken by the FTP-FTAM gateway to provide the FTAM-
 
Initiated service are:
 
 
 
    1. Accept an FTAM Initiator request at the FTAM Responder side
 
        of the gateway.
 
 
 
    2. Map the request to the (set of) corresponding FTP Client
 
 
 
 
 
 
 
 
 
 
 
        function(s).
 
 
 
    3. Acting as an FTP Client, send the FTP Client function(s) to
 
        the FTP Server.
 
 
 
    4. Accept information returned to the FTP Client side of the
 
        gateway.  This information originated at the FTP Server.
 
 
 
    5. Map this returned information to a form understood by the
 
        FTAM Responder side of the gateway.
 
 
 
    6. Send this returned information from the FTAM Responder side
 
        of the gateway to the FTAM Initiator.
 
 
 
For each FTAM protocol function, the FTP protocol functions required
 
to map it are identified:
 
 
 
  FTAM                FTP
 
 
 
  -----------------------------------------------------------------
 
 
 
  F-BEGIN-GROUP      none
 
 
 
  F-CANCEL            ABOR
 
 
 
  F-CHANGE-ATTRIBUTE RNFR, RNTO
 
 
 
  F-CHECK            none
 
 
 
  F-CLOSE            none
 
 
 
  F-CREATE            STOR
 
 
 
  F-DATA              ALLO, STOR or RETR or APPE
 
 
 
  F-DATA-END          none
 
 
 
  F-DELETE            DELE
 
 
 
  F-DESELECT          none
 
 
 
  F-END-GROUP        STAT
 
 
 
  F-ERASE            DELE
 
 
 
  F-INITIALIZE        ACCT, PASS, USER
 
 
 
  F-LOCATE            none
 
 
 
 
 
 
 
 
 
 
 
  F-OPEN              MODE, STRU, TYPE
 
 
 
  F-READ              MODE, NLST, RETR, TYPE
 
 
 
  F-READ-ATTRIBUTE    LIST
 
 
 
  F-RECOVER          REST
 
 
 
  F-RESTART          ABOR, REST
 
 
 
  F-SELECT            LIST
 
 
 
  F-TERMINATE        QUIT
 
 
 
  F-TRANSFER          none
 
 
 
  F-P-ABORT          QUIT
 
 
 
  F-U-ABORT          QUIT
 
 
 
  F-WRITE            APPE or STOR, NOOP
 
 
 
The remainder of this section presents detailed mapping procedures
 
for each of the FTAM protocol functions.  Where appropriate, each
 
FTAM service primitive is followed by those parameters that are
 
relevant to the mapping.  Gateway support for these mappings is
 
required.
 
 
 
==== F-BEGIN-GROUP REQ ====
 
 
 
    1. Send F-BEGIN-GROUP RESP PDU to FTAM Initiator signifying
 
        that processes are available to handle concatenated
 
        requests.
 
 
 
==== F-CANCEL REQ ====
 
 
 
    1. Close FTP data connection.
 
    2. Send ABOR to FTP Server.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder action and diagnostic parameters and send
 
        parameters to FTAM Initiator via F-CANCEL RESP PDU.
 
    4. Translate FTAM Initiator action and diagnostic parameters
 
        to equivalent FTP reply codes and send reply codes to FTP
 
        Server.
 
 
 
    Note:
 
    a. F-U-ABORT REQ is a viable alternative to F-CANCEL REQ.
 
    b. Note that since ABOR is not implemented by all FTP Servers,
 
 
 
 
 
 
 
 
 
 
 
        the remote file may be corrupted, though accessible.
 
 
 
==== F-CHANGE-ATTRIBUTE REQ ====
 
 
 
    1. Get original filename from <Filename> parameter and send it
 
        with an RNFR to the FTP Server.
 
    2. Get new filename from <Filename> parameter and send it with
 
        an RNTO to the FTP Server.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder action and diagnostic parameters and send
 
        parameters to FTAM Initiator via F-CHANGE-ATTRIBUTE RESP
 
        PDU.
 
    4. Translate FTAM Initiator action and diagnostic parameters
 
        to equivalent FTP reply codes and send reply codes to FTP
 
        Server.
 
 
 
    Note:
 
    a. Allow for processing an arbitrary number attributes at one
 
        time.
 
    b. Allow for responses of "Attribute currently unavailable for
 
        change" and "Attribute not currently supported".
 
    c. At a minimum, support the <Filename>, <Permitted Actions>,
 
        and <Contents Type> parameters.
 
 
 
==== F-CHECK REQ ====
 
 
 
    1. Send an F-CHECK RESP PDU to the FTAM Initiator.
 
 
 
==== F-CLOSE REQ ====
 
 
 
    1. Send F-CLOSE RESP PDU , with <Action Result> parameter
 
        value of "Success", to FTAM Initiator.
 
 
 
    Note:
 
    a. If an error had occurred during transfer, it would have
 
        been noted before the F-CLOSE REQ.
 
 
 
==== F-CREATE REQ ====
 
 
 
    1. Send STOR and zero data bytes to FTP Server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
==== F-DATA PDU ====
 
 
 
    1. If necessary, send ALLO command to FTP Server.
 
    2. Depending on whether reading or writing, send STOR, RETR,
 
        or APPE command to FTP Server.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
    Note:
 
    a. The use of an FTP command may be unnecessary.  Sending the
 
        data on the data connection may be adequate.
 
 
 
==== F-DATA-END REQ ====
 
 
 
    1. Close the data connection.
 
    2. Save mandatory Diagnostic parameter for later use.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-DELETE REQ ====
 
 
 
    1. Send DELE to FTP server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-DELETE RESP PDU.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-DESELECT REQ ====
 
 
 
    1. Return F-DESELECT RESP PDU, with <Action Result> parameter
 
        value of "Success", to FTAM Initiator.
 
 
 
==== F-END-GROUP REQ ====
 
 
 
    1. Send STAT command sequence to FTP Server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic>
 
        parameters and send parameters to FTAM Initiator via F-END
 
 
 
 
 
 
 
 
 
 
 
        GROUP RESP.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-ERASE REQ ====
 
 
 
    1. Send DELE to FTP Server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-ERASE RESP PDU.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-INITIALIZE REQ ====
 
 
 
    1. Establish initial area for activity attributes.
 
    2. Save <Responding Presentation Address>, <Initiator
 
        Identity>, and <Filestore Password> parameter values
 
        received from FTAM Initiator.
 
    3. If the destination address was specified in the
 
        Distinguished Name (or User Friendly Name) used to attach
 
        to the gateway, save it as the ultimate destination
 
        address.
 
    4. If the ultimate destination address is not yet known, look
 
        at the "@host" portion of the <Initiator Identity>
 
        parameter for the ultimate destination parameter.
 
    5. If the ultimate destination address is still not known,
 
        check if it is available in the <Responding Presentation
 
        Address> parameter.
 
    6. Get userid from <Initiator Identity> and send it with USER
 
        command to FTP Server.
 
    7. Get password from <Filestore Password> and send it with
 
        PASS command to FTP Server.
 
    8. If necessary, send ACCT command to FTP Server.
 
    9. Negotiate acceptance of mandatory functional units, service
 
        classes, service types, presentation contexts, and
 
        attribute groups.
 
    10. Accept context management functional unit passed by
 
        Presentation service provider.
 
    11. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-INIT RESP PDU.
 
    12. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
 
 
 
 
 
 
 
 
 
 
    Note:
 
    a. Multiple mechanisms are available for specifying the
 
        destination address: 1) Distinguished Name, or User
 
        Friendly Name, used in connecting to the gateway (see
 
        section 4, Use of Gateway Services); 2) user@host format;
 
        and 3) Inclusion as <Responding Presentation Address>
 
        parameter value.
 
 
 
==== F-LOCATE REQ ====
 
 
 
    Note:
 
    a. Not supported since FTAM-1 and FTAM-3 don't support this
 
        primitive.
 
 
 
==== F-OPEN REQ ====
 
 
 
    1. Get <Contents Type> and <Processing Mode> parameter values
 
        from FTAM Initiator.
 
    2. Send TYPE command to FTP Server.
 
    3. Send MODE command to FTP Server.
 
    4. Send STRU command to FTP Server.
 
    5. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic>
 
        parameters and send parameters to FTAM Initiator via F-OPEN
 
        RESP PDU.
 
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
    Note:
 
    a. Establishes definite value for presentation context name
 
        parameter for this data transfer.
 
    b. Assumes that the <Requested Access> parameter is permitted.
 
 
 
==== F-READ REQ ====
 
 
 
    1. If requested file type and file mode are different than
 
        current settings, send TYPE and MODE to FTP Server.
 
    2. If <Contents Type> is FTAM-1 or FTAM-3, then send RETR to
 
        FTP Server.
 
    3. If <Contents Type> is "NBS-9", then send NLST to FTP
 
        Server.
 
    4. If reply code from FTP Server is 1xx, open FTP data
 
        connection and loop until End-of-File is read on FTP data
 
        connection.  Inside loop, read block from FTP data
 
        connection, format FTAM DATA PDU, and send FTAM PDU to FTAM
 
        Initiator.  At End-of-File on FTP data connection, send
 
        F-DATA-END and return.
 
 
 
 
 
 
 
 
 
 
 
    5. If reply code from FTP Server is not 1xx, send F-CANCEL REQ
 
        to FTAM Initiator.
 
    6. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-READ RESP PDU.
 
    7. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
    Note:
 
    a. To send NLST response, TYPE must be ASCII.
 
 
 
==== F-READ-ATTRIBUTE REQ ====
 
 
 
    1. Send LIST to FTP Server.
 
    2. Translate returned information into the <Filename>,
 
        <Contents Type>, and <Permitted Actions> parameter values
 
        and return them to the FTAM Initiator.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-READ-ATTRIBUTE RESP
 
        PDU.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-RECOVER REQ ====
 
 
 
    1. Send REST command to FTP Server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
    Note:
 
    a. Regime recovery is only possible if the <Recovery
 
        Functional Unit> parameter was negotiated previously by an
 
        F-INITIALIZE.
 
 
 
==== F-RESTART REQ ====
 
 
 
    1. To interrupt any bulk data transfer in progress, send ABOR
 
        to FTP Server.
 
    2. To negotiate the point at which data transfer is to be
 
        restarted, get <Checkpoint Identifier> parameter from FTAM
 
        Initiator and send it with REST to FTP Server.
 
 
 
 
 
 
 
 
 
 
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-RESTART RESP PDU.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-SELECT REQ ====
 
 
 
    1. Get <Filename> parameter and send with LIST command to FTP
 
        Server to determine whether  or not the file exists.
 
    2. If file exists, compare the POSIX file access rights with
 
        the <Requested Access> parameter sent by the FTAM
 
        Initiator.  If the access rights match, return <Action
 
        Result> parameter value of "Success", otherwise return
 
        <Action Result> parameter value of "Failure".
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-SELECT RESP PDU.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
    Note:
 
    a. The specified file is binary/text file if one record is
 
        received or is a directory file if multiple records are
 
        received.
 
 
 
==== F-TERMINATE REQ ====
 
 
 
    1. Send QUIT to FTP Server.
 
    2. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator via F-TERMINATE RESP PDU.
 
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-TRANSFER-END ====
 
 
 
    1. Get <Action Result> parameter value from last F-DATA-END
 
        and return it to FTAM Initiator as <Action Result>
 
        parameter of this F-TRANSFER-END.
 
 
 
==== F-P-ABORT REQ ====
 
 
 
    1. Send QUIT to FTP Server.
 
    2. Return <Action Result> parameter value of "Permanent Error"
 
 
 
 
 
 
 
 
 
 
 
        to FTAM Initiator.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
==== F-U-ABORT REQ ====
 
 
 
    1. Send QUIT to FTP Server.
 
    2. Return <Action Result> parameter value of "Permanent Error"
 
        to FTAM Initiator.
 
    3. Translate FTP Server reply code to equivalent FTAM
 
        Responder <Action Result> and <Diagnostic> parameters and
 
        send parameters to FTAM Initiator.
 
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
=== F-WRITE REQ ===
 
 
 
    1. Save bulk transfer specification parameter from PDU.
 
    2. Send NOOP to FTP Server to receive status information.
 
    3. If the <Bulk Data Transfer Specification, FADU Operation>
 
        parameter has a value of "File Extend", then send an APPE
 
        to the FTP Server, otherwise send a STOR to the FTP Server.
 
    4. If reply code from FTP Server is 200, then accept FTP data
 
        connection; otherwise send F-CANCEL REQ to FTAM Initiator.
 
    5. Translate FTP Server reply code to equivalent FTAM Responder
 
        <Action Result> and <Diagnostic> parameters and send
 
        parameters to FTAM Initiator.
 
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
 
        parameters to equivalent FTP reply codes and send reply
 
        codes to FTP Server.
 
 
 
== Mapping between FTP Reply Codes and FTAM Parameters ==
 
 
 
The focus of the protocol function and representation mappings,
 
presented in the previous sections, is on non-error encumbered
 
processing.  Though appropriate responses are designated in many
 
cases, it is intended that a more thorough use of responses will be
 
incorporated into gateway implementations.
 
 
 
The purpose of this section is to provide a set of mappings between
 
FTAM responses (<Action Result> and <Diagnostic>) and FTP responses
 
(reply codes).
 
 
 
 
 
 
 
 
 
 
 
 
 
The <Action Result> parameter of the FTAM File Service primitives
 
conveys information which summarizes that available in the
 
<Diagnostic> parameter.  The value is never less than the most severe
 
diagnostic value.  The valid values of this parameter are "Success",
 
"Transient Error", and "Permanent Error".  The FTP response text
 
should be supplied in the <Further Details> field of the
 
<Diagnostics> sequence in the FTAM response and abort messages.
 
 
 
An FTAM <Action Result> "Success" may be accompanied by a
 
<Diagnostic> with value of "Informative Error Type".  These "Success"
 
diagnostic messages are associated with error type 0 in the table
 
below (and in [ISO8571-3]).  Error type 1 indicates a transient
 
error, while type 2 indicates a permanent error.
 
 
 
An FTP reply consists of a three digit number followed by some text.
 
The number is defined as a 3-digit code, each digit of which has a
 
special significance.  The first digit conveys approximately the same
 
information as the FTAM <Action Result> parameter; i.e., positive,
 
transient negative, or permanent negative.
 
 
 
The FTP specification document [RFC959] explicitly states that the
 
list of reply codes should not be expanded beyond that which is
 
presented in [RFC959].  This requirement is adhered to in the
 
mappings presented in this document.
 
 
 
=== FTP Reply Codes to FTAM Parameters ===
 
 
 
This section presents the set of mappings between FTP reply codes and
 
their equivalent FTAM action and diagnostic parametersGateway
 
support for these mappings is recommended, but not required.  The
 
following abbreviations are used for FTAM action parameter values:
 
 
 
    trans  =    transient error
 
    perman  =    permanent error
 
 
 
  FTP Reply                                    |FTAM Diagnostic
 
                                                |
 
                                                |
 
  Code      Text                              |Result  Type Id
 
  ---------------------------------------------+------------------
 
  110      Restart marker reply              |success  0    0
 
  120      Service ready in nnn minutes      |success  0    0
 
  125      Data connection open, transfer    |
 
            starting                          |success  0    0
 
  150      File status okay; about to open    |
 
            data connection                    |success  0    0
 
  200      Command okay                      |success  0    0
 
  202      Command not implemented;          |
 
 
 
 
 
 
 
 
 
 
 
            superfluous                        |success  0    0
 
  211      System status, or system help      |
 
            reply                              |success  0    0
 
  212      Directory status                  |success  0    0
 
  213      File status                        |success  0    0
 
  214      Help message                      |success  0    0
 
  215      NAME system type                  |success  0    0
 
  220      Service ready for new user        |success  0    0
 
  221      Service closing control connection |success  0    0
 
  225      Data connection; no transfer in    |
 
            progress                          |success  0    0
 
  226      Closing data connection            |success  0    0
 
  227      Entering passive mode (h1,h2,..)  |success  0    0
 
  230      User logged in, proceed            |success  0    0
 
  250      Requested file action okay,        |
 
            completed                          |success  0    0
 
  257      "PATHNAME" created                |success  0    0
 
  331      User name okay, need password      |success  0    0
 
  332      Need account for logon            |success  0    0
 
  350      Requested file action pending      |
 
            further information                |success  0    0
 
  421      Service not available, closing    |
 
            control connection                |trans    1    1
 
  425      Can't open data connection        |trans    1    3
 
  426      Connection closed, transfer        |
 
            aborted                            |trans    1    1014
 
  450      Requested file action not taken,  |
 
            file unavailable (e.g., file busy) |trans    1    5041
 
  451      Requested file action aborted,    |
 
            local error in processing          |trans    1    5028
 
  452      Requested action not taken,        |
 
            insufficient storage space        |trans    1    9
 
  500      Syntax error, command unrecognized |perman  2    5015
 
  501      Syntax error in parameters or     |
 
            arguments                          |perman  2    4004
 
  502      Command not implemented            |perman  2    5016
 
  503      Bad sequence of commands          |perman  2    1015
 
  504      Command not implemented for that  |
 
            parameter                          |perman  2    4003
 
  530      Not logged in                      |perman  2    2020
 
  532      Need account for storing files    |perman  2    2008
 
  550      Requested action not taken; file  |
 
            unavailable (e.g., file not found, |
 
            no access)                        |perman  2    3013
 
  551      Requested action aborted, page    |
 
            type                              |perman  2    5002
 
  552      Requested file action aborted,    |
 
            exceeded storage allocation        |perman  2    9
 
 
 
 
 
 
 
 
 
 
 
  553      Requested file action not taken,  |
 
            file name not allowed              |perman  2    3024
 
 
 
=== FTAM Parameters to FTP Reply Codes ===
 
 
 
This section presents the set of mappings between FTAM diagnostic
 
parameters and their equivalent FTP reply codesGateway support for
 
these mappings is recommended, but not required.  As previously
 
mentioned, type 0 is an informative error type that may be returned
 
with a "Success" action result, type 1 is a transient error type, and
 
type 2 is a permanent error type.
 
 
 
 
 
  FTAM Diagnostic                                  |FTP Reply Code
 
                                                    |
 
  Type      Id  Reason                            |
 
  --------------------------------------------------+--------
 
                                                    |
 
  1,2      0    No reason                          |    421
 
  0        1    Responder error                    |    211
 
  1,2      1    Responder error                    |    421
 
  1,2      2    System shutdown                    |    421
 
  0        3    FTAM mgmt problem, unspecific      |    211
 
  1,2      3    FTAM mgmt problem, unspecific      |    425
 
  0        4    FTAM mgmt, bad account            |    221
 
  2        4    FTAM mgmt, bad account            |    532
 
  0        5    FTAM mgmt, security not passed    |    211
 
  2        5    FTAM mgmt, security not passed    |    530
 
  0        6    Delay may be encountered          |    211
 
  0        7    Initiator error, unspecific        |    211
 
  1,2      7    Initiator error, unspecific        |    421
 
  0        8    Subsequent error                  |    211
 
  1,2      8    Subsequent error                  |    421
 
  0        9    Temporal insufficiency of resources|    211
 
  1,2      9    Temporal insufficiency of resources|    452
 
  1,2      10  Access req. violates VFS security  |    550
 
  1,2      11  Access req. violates local security|    550
 
  2        1000 Conflicting parameter values      |    504
 
  2        1001 Unsupported parameter values      |    504
 
  2        1002 Mandatory parameter not set        |    504
 
  2        1003 Unsupported parameter              |    504
 
  2        1004 Duplicated parameter              |    504
 
  2        1005 Illegal parameter type            |    504
 
  2        1006 Unsupported parameter types        |    504
 
  2        1007 FTAM protocol err., unspecific    |    426
 
  2        1008 FTAM protocol err., procedure err  |    426
 
  2        1009 FTAM protocol err., funct. unit err|    426
 
  2        1010 FTAM protocol err., corruption err.|    426
 
 
 
 
 
 
 
 
 
 
 
  2        1011 Lower layer failure                |    426
 
  1,2      1012 Lower layer addressing error      |    426
 
  1,2      1013 Timeout                            |    426
 
  1,2      1014 System shutdown                    |    426
 
  2        1015 Illegal grouping sequence          |    503
 
  2        1016 Grouping threshold violation      |    503
 
  2        1017 Inconsistent PDU request          |    503
 
  2        2000 Association with user not allowed  |    532
 
  2        2002 Unsupported service class          |    504
 
  0        2003 Unsupported functional unit        |    211
 
  2        2003 Unsupported functional unit        |    502
 
  0        2004 Attribute group error, unspecific  |    211
 
  1,2      2004 Attribute group error, unspecific  |    504
 
  2        2005 Attribute group not supported      |    504
 
  0        2006 Attribute group not allowed        |    211
 
  2        2006 Attribute group not allowed        |    504
 
  0        2007 Bad account                        |    211
 
  2        2007 Bad account                        |    532
 
  0        2008 Association management, unspecific |    211
 
  1,2      2008 Association management, unspecific |    532
 
  2        2009 Association management, bad address|    532
 
  1,2      2010 Association management, bad account|    532
 
  0        2011 Checkpoint window error, too large |    211
 
  2        2011 Checkpoint window error, too large |    426
 
  0        2012 Checkpoint window error, too small |    211
 
  2        2012 Checkpoint window error, too small |    426
 
  0        2013 Checkpoint window error, unsupp.  |    211
 
  2        2013 Checkpoint window error, unsupp.  |    504
 
  0        2014 Communications QoS not supported  |    211
 
  1,2      2014 Communications QoS not supported  |    504
 
  2        2015 Initiator identity unacceptable    |    532
 
  0        2016 Context management refused        |    211
 
  0        2017 Rollback not available            |    211
 
  0        2018 Contents type list cut by          |
 
                  responder                          |    211
 
  0        2019 Contents type list by              |
 
                  Presentation Service              |    211
 
  2        2020 Invalid filestore password        |    530
 
  2        2021 Incompatible service classes      |    530
 
  1,2      3000 Filename not found                |    550
 
  1,2      3001 Selection attributes not matched  |    550
 
  2        3002 Initial attributes not possible    |    550
 
  2        3003 Bad attribute name                |    550
 
  1,2      3004 Non-existent file                  |    550
 
  1,2      3005 File already exists                |    553
 
  1,2      3006 File cannot be created            |    553
 
  1,2      3007 File cannot be deleted            |    553
 
  0        3008 Concurrency control not available  |    211
 
 
 
 
 
 
 
 
 
 
 
  2        3008 Concurrency control not available  |    503
 
  0        3009 Concurrency control not supported  |    211
 
  2        3009 Concurrency control not supported  |    502
 
  0        3010 Concurrency control not possible  |    211
 
  2        3010 Concurrency control not possible  |    503
 
  0        3011 More restrictive lock              |    211
 
  1        3011 More restrictive lock              |    450
 
  1,2      3012 File busy                          |    450
 
  1,2      3013 File not available                |    450
 
  0        3014 Access control not available      |    211
 
  1,2      3014 Access control not available      |    503
 
  0        3015 Access control not supported      |    211
 
  1,2      3015 Access control not supported      |    502
 
  0        3016 Access control inconsistent        |    211
 
  1,2      3016 Access control inconsistent        |    503
 
  0        3017 Filename truncated                |    211
 
  0        3018 Initial attributes altered        |    211
 
  1,2      3019 Bad account                        |    532
 
  0        3020 Override selected existing file    |    211
 
  0        3021 Override deleted and recreated    |    211
 
  0        3022 Create override deleted and        |
 
                  recreate file with new attributes  |    211
 
  1,2      3023 Create override, not possible      |    553
 
  1,2      3024 Ambiguous file specification      |    553
 
  2        3025 Invalid create password            |    550
 
  2        3026 Invalid delete password on override|    550
 
  2        3027 Bad attribute value                |    550
 
  2        3028 Requested access violation        |    550
 
  2        3029 Functional unit not available for  |    550
 
                  requested access                  |
 
  0        3030 File created but not selected      |    211
 
  1        3030 Invalid create password            |    550
 
  0        4000 Attribute non-existent            |    211
 
  1,2      4000 Attribute non-existent            |    501
 
  1,2      4001 Attribute cannot be read          |    504
 
  1,2      4002 Attribute cannot be changed        |    504
 
  1,2      4003 Attribute not supported            |    504
 
  2        4004 Bad attribute name                |    501
 
  2        4005 Bad attribute value                |    501
 
  0        4006 Attribute partially supported      |    211
 
  0        4007 Additional set attribute value    |
 
                  not distinct                      |    211
 
  1,2      5000 Bad FADU, unspecific              |    550
 
  2        5001 Bad FADU, size error              |    501
 
  2        5002 Bad FADU, type error              |    551
 
  2        5003 Bad FADU, poorly specified        |    501
 
  2        5004 Bad FADU, bad location            |    550
 
  0        5005 FADU does not exist                |    550
 
 
 
 
 
 
 
 
 
 
 
  1        5005 FADU does not exist                |    550
 
  0        5006 FADU not available, unspecific    |    550
 
  1,2      5006 FADU not available, unspecific    |    550
 
  1,2      5007 FADU not available for reading    |    550
 
  1,2      5008 FADU not available for writing    |    550
 
  1,2      5009 FADU not available for location    |    550
 
  1,2      5010 FADU not available for erasure    |    550
 
  1,2      5011 FADU cannot be inserted            |    550
 
  1,2      5012 FADU cannot be replaced            |    550
 
  0        5013 FADU cannot be located            |    550
 
  1,2      5013 FADU cannot be located            |    550
 
  2        5014 Bad data element type              |    550
 
  1,2      5015 Operation not available            |    500
 
  1,2      5016 Operation not supported            |    502
 
  0        5017 Operation inconsistent            |    211
 
  2        5017 Operation inconsistent            |    503
 
  0        5018 Concurrency control not available  |    211
 
  1,2      5018 Concurrency control not available  |    503
 
  0        5019 Concurrency control not supported  |    211
 
  2        5019 Concurrency control not supported  |    502
 
  0        5020 Concurrency control inconsistent  |    211
 
  2        5020 Concurrency control inconsistent  |    503
 
  0        5021 Processing mode not available      |    211
 
  1,2      5021 Processing mode not available      |    503
 
  0        5022 Processing mode not supported      |    211
 
  2        5022 Processing mode not supported      |    504
 
  0        5023 Processing mode inconsistent      |    211
 
  2        5023 Processing mode inconsistent      |    503
 
  0        5024 Access context not available      |    211
 
  2        5024 Access context not available      |    503
 
  0        5025 Access context not supported      |    211
 
  2        5025 Access context not supported      |    504
 
  1,2      5026 Bad write, unspecific              |    550
 
  1,2      5027 Bad read, unspecific              |    550
 
  0        5028 Local failure, unspecific          |    211
 
  1,2      5028 Local failure, unspecific          |    451
 
  0        5029 Local failure, filespace exhausted |    211
 
  1,2      5029 Local failure, filespace exhausted |    552
 
  0        5030 Local failure, data corrupted      |    211
 
  1,2      5030 Local failure, data corrupted      |    451
 
  0        5031 Local failure, data corrupted      |    211
 
  1,2      5031 Local failure, data corrupted      |    451
 
  2        5032 Future file size exceeded          |    451
 
  0        5034 Future file size increased        |    211
 
  0        5035 Functional unit invalid in        |
 
                  processing mode                    |    211
 
  2        5035 Functional unit invalid in        |
 
                  processing mode                    |    503
 
 
 
 
 
 
 
 
 
 
 
  0        5036 Contents type inconsistent        |    211
 
  2        5036 Contents type inconsistent        |    503
 
  0        5037 Contents type simplified          |    211
 
  0        5038 Duplicate FADU name                |    211
 
  1,2      5039 Damage to select/open regime      |    553
 
  1,2      5040 FADU locking not available on file |    450
 
  1,2      5041 FADU locked by another user        |    450
 
 
 
=== Future Mapping Problem ===
 
 
 
At some point in the future, the FTAM <Responding Presentation
 
Address> parameter may be used for purposes other than the current
 
use of passing the final destination address in the FTAM-Initiated
 
gateway service [NIST86].  If this happens, the destination address
 
will have to be passed in another location, such as in the "@host"
 
portion of the <Initiator Identity>Currently, the FTP-FTAM gateway
 
specification permits either mechanism for storage of the ultimate
 
destination address.
 
 
 
=== Error Handling ===
 
 
 
The minimal acceptable solution for FTAM-Initiated service errors is
 
to map FTP failures to FTAM "Unrecoverable error" and return the FTP
 
diagnostic string in the FTAM <Further Details> field.  Similarly for
 
FTP-Initiated service errors, the minimal acceptable solution is to
 
return reply code 221, "Service closing control connection, Logged
 
out if appropriate".  While this minimal solution is acceptable, the
 
recommended approach for Gateway developers is to implement the
 
mappings presented in Section 9.1, FTP Reply Codes to FTAM
 
Parameters, and Section 9.2, FTAM Parameters to FTP Reply Codes.
 
 
 
== Implementation and Configuration Guidelines ==
 
 
 
The intent of this specification is to specify the required
 
characteristics and functions of an FTP-FTAM gateway.  The specific
 
approach taken to realize these specifications in an operational
 
gateway are left to the discretion of the implementor.  We do take
 
the liberty, however, of suggesting several ideas concerning the
 
configuration and implementation of such gateways.
 
 
 
=== Robustness ===
 
 
 
The gateway should be robust enough to handle situations where a
 
subset of the FTP and/or FTAM protocols are implemented on a host.
 
 
 
The gateway should support multiple concurrent FTP and FTAM
 
connections.
 
 
 
 
 
 
 
 
 
 
 
 
 
These are requirements for gateway implementations.
 
 
 
=== Well-Known TCP/IP Port ===
 
 
 
It is recommended that the FTP-Initiated gateway process listen on
 
TCP/IP port 21, the well-known port for FTP listener processes.  As
 
the gateway computer is primarily intended to provide gateway
 
services,  use of this port will alleviate the need for gateway users
 
to specify the desired port when they connect to the gateway.  The
 
standard FTP server listener process can then be moved to another
 
port that is known to those users (e.g., System Administrators)
 
requiring FTP-to-FTP access to the gateway computer.
 
 
 
=== Gateway Listener Processes ===
 
 
 
To simplify the administrative overhead on the gateway computer
 
system, it is recommended that the FTP-Initiated service and FTAM-
 
Initiated gateway listener processes be merged into a single
 
executable module.  This single daemon will act as the one and only
 
gateway listener processes.  As connections were established with
 
hosts, other processes would be created.
 
 
 
=== Implementation Testing ===
 
 
 
To assist in the development and evaluation of FTP-FTAM gateway
 
prototypes, NIST has developed a test system to evaluate a gateway's
 
conformance to the protocol standards [NIST88].
 
 
 
=== POSIX File Naming and Organization ===
 
 
 
The OSI profiles do not define a standard manner for an FTAM
 
Responder to return file names.
 
  
To avoid unnecessary complexity, proprietary file systems are not
+
12References
addressed in these mappingsGateway support for POSIX file naming
 
and organization conventions is required; i.e., files are assumed to
 
be organized in a hierarchical structure in which all of the non-
 
terminal nodes are directories and all of the terminal nodes are any
 
other type of file.
 
  
== Security Considerations ==
+
[ISO8571-1]  Information processing systems - Open Systems
 +
            Interconnection - File Transfer, Access and
 +
            Management, Part 1: General Introduction, International
 +
            Standards Organization for Standards, First Edition,
 +
            October 1988.
  
The gateway system may place the burden of authentication on the
+
[ISO8571-2]  Information processing systems - Open Systems
destination system.  However, the gateway must accommodate the
+
            Interconnection - File Transfer, Access and Management,
passing through of all authentication parameters.  The authentication
+
            Part 2: Virtual Filestore Definition, International
parameters of each protocol are applied at the destination and no
+
            Standards Organization for Standards, First Edition,
additional parameters are needed for authentication at the gateway.
+
            October 1988.
As such, no gateway password file is required to support gateway
 
  
 +
[ISO8571-3]  Information processing systems - Open Systems
 +
            Interconnection - File Transfer, Access and Management,
 +
            Part 3: File Service Definition, International Standards
 +
            Organization for Standards, First Edition, October 1988.
  
 +
[ISO8571-4]  Information processing systems - Open Systems
 +
            Interconnection - File Transfer, Access and Management,
 +
            Part 4: File Protocol Specification, International
 +
            Standards Organization for Standards, First Edition,
 +
            October 1988.
  
 +
[ISO8571-5]  Information processing systems - Open Systems
 +
            Interconnection - File Transfer, Access and Management,
 +
            Part 5: Protocol Implementation Conformance Statement,
 +
            International Standards Organization for Standards,
 +
            First Edition.
  
 +
[KILLE92]  Hardcastle-Kille, S., "Using the OSI Directory to achieve
 +
          User Friendly Naming", OSI-DS 24 (v1.1), October 1992.
  
functions.
+
[MITRE87]  Scott, J., "An FTP/FTAM Application Bridge, An FTAM/FTAM
 +
          (MTR-87W00186)", The MITRE Corporation, July 1987.
  
It is anticipated that the requirement for a strong authentication
+
[NETWRX90a]  Mindel, J., "Gateway Technical Specification" Open
mechanism will soon replace the most currently used, userid and
+
            Networks, Inc. (formerly NetWorks One), 28 February 1990.
password mechanism.  The U.S. National Security Agency (NSA) has
 
already prototyped and has plans field a Message Secure Protocol
 
(MSP) as part of the Defense Message System (DMS) Program which will
 
soon become the Department of Defense (DoD) mandatory messaging
 
system.  MSP utilizes a public key encryption-like mechanism which
 
will be used to authenticate users and allow signed operations.  The
 
current philosophy is to use this same mechanism for all
 
authentication and access control situations, such as logging onto
 
remote hosts or gateways.  Detailed specifications for Pre-MSP, used
 
in the unclassified though sensitive arena, are scheduled to be
 
published in the first quarter of 1993.  The requirement for gateways
 
to process PMSP and MSP strong authentication mechanisms will be part
 
of all future DoD procurements.
 
 
 
== References ==
 
 
 
[ISO8571-1]  Information processing systems - Open Systems            Interconnection - File Transfer, Access and            Management, Part 1: General Introduction, International            Standards Organization for Standards, First Edition,            October 1988.
 
[ISO8571-2]  Information processing systems - Open Systems            Interconnection - File Transfer, Access and Management,            Part 2: Virtual Filestore Definition, International            Standards Organization for Standards, First Edition,            October 1988.
 
[ISO8571-3]  Information processing systems - Open Systems            Interconnection - File Transfer, Access and Management,            Part 3: File Service Definition, International Standards            Organization for Standards, First Edition, October 1988.
 
[ISO8571-4]  Information processing systems - Open Systems            Interconnection - File Transfer, Access and Management,            Part 4: File Protocol Specification, International            Standards Organization for Standards, First Edition,            October 1988.
 
[ISO8571-5]  Information processing systems - Open Systems            Interconnection - File Transfer, Access and Management,            Part 5: Protocol Implementation Conformance Statement,            International Standards Organization for Standards,            First Edition.
 
 
 
 
 
 
 
 
 
[KILLE92]  Hardcastle-Kille, S., "Using the OSI Directory to achieve          User Friendly Naming", OSI-DS 24 (v1.1), October 1992.
 
[MITRE87]  Scott, J., "An FTP/FTAM Application Bridge, An FTAM/FTAM          (MTR-87W00186)", The MITRE Corporation, July 1987.
 
[NETWRX90a]  Mindel, J., "Gateway Technical Specification" Open             Networks, Inc. (formerly NetWorks One), 28 February 1990.
 
[NETWRX90b]  Mindel, J., "FTP Gateway User's Guide", Open            Networks, Inc. (formerly NetWorks One), 28 February 1990.
 
[NIST86]  Wallace, M, et. al., "A Gateway Architecture Between FTP          and FTAM (ICST/SNA86-6)", National Institute of Standards          and Technology, U.S. Department of Commerce, July 1986.
 
[NIST88]  A Test System for Implementations of FTAM/FTP Gateways:          Final Report Part 1, National Institute of Standards and          Technology, U.S. Chamber of Commerce, October 1988.
 
[NIST91]  CSL Bulletin: File Transfer, Access, and Management,          National Institute of Standards and Technology, U.S.          Chamber of Commerce, July 1991.
 
[NIST92]  Stable Implementation Agreements for Open Systems          Interconnection Protocols: Part 9 - FTAM Phase 2, Output          from the March 1992 Open Systems Environment Implementors'          Workshop (OIW), March 1992.
 
[RFC959]  Postel, J., and J. Reynolds, "File Transfer  Protocol          (FTP), STD 9, [[RFC959|RFC 959]], USC/Information Sciences Institute,          October 1985.
 
[RFC1101] Mockapetris, P., "DNS Encoding of Network Names and other          Types",  [[RFC1101|RFC 1101]], USC/Information Sciences Institute,          April 1989.
 
[RFC1279] Hardcastle-Kille, S., "X.500 and Domain", [[RFC1279|RFC 1279]],          University College London, November 1991.
 
[ROSE90]  Rose, M., "The Open Book: A Practical Perspective on OSI",          Prentice-Hall Inc., 1990.
 
  
 +
[NETWRX90b]  Mindel, J., "FTP Gateway User's Guide", Open
 +
            Networks, Inc. (formerly NetWorks One), 28 February 1990.
  
 +
[NIST86]  Wallace, M, et. al., "A Gateway Architecture Between FTP
 +
          and FTAM (ICST/SNA86-6)", National Institute of Standards
 +
          and Technology, U.S. Department of Commerce, July 1986.
  
 +
[NIST88]  A Test System for Implementations of FTAM/FTP Gateways:
 +
          Final Report Part 1, National Institute of Standards and
 +
          Technology, U.S. Chamber of Commerce, October 1988.
  
 +
[NIST91]  CSL Bulletin: File Transfer, Access, and Management,
 +
          National Institute of Standards and Technology, U.S.
 +
          Chamber of Commerce, July 1991.
  
 +
[NIST92]  Stable Implementation Agreements for Open Systems
 +
          Interconnection Protocols: Part 9 - FTAM Phase 2, Output
 +
          from the March 1992 Open Systems Environment Implementors'
 +
          Workshop (OIW), March 1992.
  
 +
[RFC959]  Postel, J., and J. Reynolds, "File Transfer  Protocol
 +
          (FTP), STD 9, RFC 959, USC/Information Sciences Institute,
 +
          October 1985.
  
 +
[RFC1101] Mockapetris, P., "DNS Encoding of Network Names and other
 +
          Types",  RFC 1101, USC/Information Sciences Institute,
 +
          April 1989.
  
 +
[RFC1279] Hardcastle-Kille, S., "X.500 and Domain", RFC 1279,
 +
          University College London, November 1991.
  
 +
[ROSE90]  Rose, M., "The Open Book: A Practical Perspective on OSI",
 +
          Prentice-Hall Inc., 1990.
  
== Authors' Addresses ==
+
13.  Authors' Addresses
  
 
Joshua L. Mindel
 
Joshua L. Mindel
Line 2,944: Line 2,722:
 
Phone:  (703) 648-0013
 
Phone:  (703) 648-0013
  
 
  
 
Robert L. Slaski
 
Robert L. Slaski

Revision as of 07:21, 23 September 2020

Network Working Group J. Mindel Request for Comments: 1415 R. Slaski

                                                 Open Networks, Inc.
                                                        January 1993
                 FTP-FTAM Gateway Specification

Status of the Memo

This RFC specifies an IAB standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "IAB Official Protocol Standards" for the standardization state and status of this protocol. Distribution of this memo is unlimited.

Abstract

This memo describes a dual protocol stack application layer gateway that performs protocol translation, in an interactive environment, between the FTP and FTAM file transfer protocols.

Two key assumptions are made: 1) POSIX file naming conventions and hierarchical organization, rather than proprietary conventions are in use; and 2) X.500 Directory Services are available.

Acknowledgments

The authors of this RFC would like to express their appreciation to the individuals and organizations that participated in the implementation of the FTP-FTAM Application Layer Gateway and its fielding on the MILNET. Implementation credits go to Mr. John Scott, formerly of the MITRE Corporation, while fielding credits are extended to James Graham and R. Greg Lavender of Open Networks, Inc. (formerly NetWorks One) and Robert Cooney of the Naval Computer and Telecommunications Station (NCTS) Washington. Dr. Marshall Rose is to be commended for recognizing the importance of the FTP-FTAM gateway and promulgating it as a part of the ISO Development Environment (ISODE). The following individuals have provided valuable editorial comments: Larry Friedman, Donna Vincent and Michael Resnick of Digital Equipment Corporation; Robert Cooney of NCTS; and S.E. Hardcastle-Kille of University College London. Funding of the FTP-FTAM Gateway Request for Comments effort was provided by Open Networks Inc. and the Defense Information Systems Agency (DISA), formerly the Defense Communications Agency. DISA sponsors include Len Tabacchi, George Bradshaw, Tom Clarke, and Betsy Turner.

Table of Contents

1. Introduction..................................................2 1.1. Relationship to Other Work ................................3 1.2. Overview of Gateway Operation .............................4 2. Gateway Architecture..........................................6 3. Network Naming and Addressing.................................8 4. Use of the Gateway Services...................................9 4.1. FTP-Initiated Gateway Service .............................9 4.2. FTAM-Initiated Gateway Service ...........................11 4.3. Summary of Usage .........................................12 5. Gateway State Variables and Transitions......................13 5.1. FTP-Initiated Gateway Service ............................14 5.2. FTAM-Initiated Gateway Service ...........................16 6. Document Type Support........................................18 6.1. Notes on NBS-9 ...........................................18 7. Functional Comparison of FTP and FTAM........................19 7.1. Loss of Functionality ....................................20 8. Mapping of Protocol Functions and Representations.............20 8.1. FTP-Initiated Gateway Service .............................22 8.2. FTAM-Initiated Gateway Service ............................38 9. Mapping between FTP Reply Codes and FTAM Parameters...........47 9.1. FTP Reply Codes to FTAM Parameters ........................48 9.2. FTAM Parameters to FTP Reply Codes ........................50 9.3. Future Mapping Problem ....................................54 9.4. Error Handling ............................................54 10. Implementation and Configuration Guidelines..................54 10.1. Robustness ...............................................54 10.2. Well-Known TCP/IP Port ...................................55 10.3. Gateway Listener Processes ...............................55 10.4. Implementation Testing ...................................55 10.5. POSIX File Naming and Organization .......................55 11. Security Considerations......................................55 12. References...................................................56 13. Authors' Addresses...........................................58

Contents

Introduction

The TCP/IP and OSI protocol suites will coexist in the Internet community for several years to come. As more and more OSI hosts are fielded on the Internet, the requirement for gateways between the two protocol suites becomes more pressing.

This specification describes an application layer gateway providing interoperability between the TCP/IP File Transfer Protocol (FTP) and the OSI File Transfer, Access, and Management (FTAM) protocol. The proposed application layer gateway is based on a bi-directional set of mappings between the FTP and FTAM protocols. Since the protocols

have quite different command structures, the mappings between them are not one-to-one. This paper assumes knowledge of the File Transfer Protocol (FTP) [RFC959] and the File Transfer, Access, and Management Protocol (FTAM) [ISO8571-1,2,3,4,5].

Two important goals of the mappings are to:

  Provide FTP users with as much emulated FTP capability on an
  FTAM Responder as possible, and
  Provide FTAM users with as much emulated FTAM capability on an
  FTP Server as possible.

Though it is anticipated that the application layer gateway will be implemented on full protocol suites of both TCP/IP and OSI, at least one implementation of such a gateway (included in the ISO Development Environment) can be configured to operate FTAM over either OSI or TCP/IP lower-layer services.

Relationship to Other Work

Ideas presented in this specification are based on lessons learned in fielding the gateway on the MILNET, operational at NCTS Washington D.C. since 1989, and on the efforts of M. A. Wallace et al. of the National Institute of Standards and Technology (NIST) [NIST86]. In 1986, NIST published a design document for an FTP-FTAM gateway. Since that time, at least one implementation (for a subset of the FTP and FTAM protocols) of the gateway has been developed [MITRE87] and is included with the ISODE. This implementation is based on the NIST protocol translator gateway design [NIST86].

This document's contribution to the advancement of the FTP-FTAM gateway concept is to:

  *  Enhance the user interaction capability provided by the ISODE
     implementation of the FTP-FTAM application layer gateway.
  *  Clarify and enhance the mappings (FTP to FTAM, FTAM to FTP)
     documented by NIST.
  *  Provide guidelines for fielding the FTP-FTAM application layer
     gateway on the Internet so that it is useful as an Internet
     resource.
  *  Produce a formal specification for the FTP-FTAM gateway suitable
     for implementors to use in building additional FTP-FTAM
     gateways.
  *  Provide a formal specification for organizations wishing to
     procure FTP-FTAM gateways.

Overview of Gateway Operation

The gateway provides a virtual end-to-end application file transfer service. As data is sent via FTP, the gateway immediately maps the requested function to FTAM and passes it to the FTAM host. In a similar fashion, but using a different set of mappings, an FTAM request is sent to the gateway, immediately mapped to an FTP function, and passed along to the FTP host.

In FTP, the two parties involved in a file transfer are the Client and Server. The Client is responsible for initiating a connection to the Server. Once the connection is established, all service requests originate from the Client. The FTP-FTAM gateway does not support the FTP three node model.

In FTAM, the two parties involved in a file transfer are the Initiator and Responder. The Initiator is responsible for initiating a connection to the Responder. Once the connection is established, either the Initiator or Responder may issue service requests to the other.

The FTP-FTAM gateway provides two sets of services:

    1. FTP-Initiated Gateway Services
       Utilized when an FTP Client contacts the FTP-FTAM gateway to
       instigate a file transfer with an FTAM Responder.
    2. FTAM-Initiated Gateway Services
       Utilized when an FTAM Initiator contacts the FTP-FTAM
       gateway to instigate a file transfer with an FTP Server.

The gateway services' names were selected to identify the roles that the FTP-FTAM gateway plays when performing file transfers. For example, when a file transfer is instigated by an FTP Client, it contacts the FTP Server portion of the gateway, which maps protocol information to the FTAM Initiator portion of the gateway, which in turn contacts the remote FTAM Responder. This example scenario uses the FTP-Initiated Gateway Services.

Figure 1 illustrates the perspective of the application process in the FTP-Initiated service. Figure 2 illustrates that of the FTAM- Initiated service.

      TCP Host                                  OSI Host
  +--------------+                        +------------------+
  |  FTP Client  |                        |  FTAM Responder  |
  +--------------+                        +------------------+
         |                                          |
         |                                          |
         |                                          |
         |            FTP-FTAM Gateway              |
         |    +--------------------------------+    |
         +--  |  FTP Server    FTAM Initiator  |  --+
              +--------------------------------+
         Figure 1  -  FTP-Initiated Gateway Service
      TCP Host                                  OSI Host
  +--------------+                        +------------------+
  |  FTP Server  |                        |  FTAM Initiator  |
  +--------------+                        +------------------+
         |                                          |
         |                                          |
         |                                          |
         |                                          |
         |            FTP-FTAM Gateway              |
         |    +--------------------------------+    |
         +--  |  FTP Client    FTAM Responder  |  --+
              +--------------------------------+
         Figure 2  -  FTAM-Initiated Gateway Service

Gateway Architecture

The gateway architecture, termed a protocol translator [NIST86], is depicted in Figure 3. It implements TCP/IP and OSI protocol stacks with an application level process providing the link between the two. The link between FTP and FTAM is defined by two sets of protocol mappings, one each for the FTP-Initiated and FTAM-Initiated service sets.

  +------------+                               +-------------+
  |  FTP Host  |                               |  FTAM Host  |
  +------------+                               +-------------+
         |                                            |
         |                                            |
         |                                            |
         |                                            |
         |    +---------------------------------+     |
         |    |          FTP  -  FTAM           |     |
         |    |       Gateway Application       |     |
         |    |---------------------------------|     |
         |    |      FTP       |      FTAM      |     |
         |    |----------------+----------------|     |
         |    |    TCP/IP      |    TP4/et al   |     |
         |    +---------------------------------+     |
         |           /|\               /|\            |
         |            |                 |             |
         +------------+                 +-------------+
              Figure 3  -  Gateway Protocol Stack

A fundamental aspect of this gateway architecture is that data is mapped and transmitted immediately; i.e., no transferred file need ever reside on the gateway file system. In the context of this document, the term "filesystem" refers to the file access and maintenance mechanisms provided by the operating system. This lack of gateway filesystem interaction helps speed up the end-to-end data transfer. Another speed-enhancing feature of this architecture is that both the FTP and FTAM network connections can operate

simultaneously. Additional advantages include:

    1. FTP and FTAM hosts require no modification to utilize gateway
       services.
    2. Users require no knowledge of the other protocol.
    3. Gateway access control is not impaired (since users cannot
       directly access the gateway filesystem).
    4. No additional filesystem space is required on the gateway.
    5. Interactive nature of protocols is preserved.
    6. Users become aware of fatal errors immediately.

Disadvantages of this design include the initial coding effort required to develop the gateway and the subsequent re-coding efforts required to keep it current.

Network Naming and Addressing

The network naming and addressing schemes used by FTP (Domain Names (DN), IP Addresses) and FTAM (Distinguished Names, Presentation Addresses) are quite different. This issue is quite apparent when a user of one protocol needs to identify a destination host of the other protocol.

In the TCP/IP naming and addressing scheme, the identity of the FTP Server is its DN and its IP address [RFC1101]. To initiate a connection to an FTP Server, the FTP Client looks up a DN in either the Domain Name System (DNS) or static host table and obtains an IP address.

In the OSI naming and addressing scheme, the identity of the FTAM Responder service is its Distinguished Name in the OSI Directory (X.500 or static table) and its Presentation address. The Distinguished Name is an authoritative description of the service. A Presentation address consists of a Presentation selector, a session selector, a transport selector, and a network address. To initiate a connection to an FTAM Responder, the FTAM Initiator contacts the OSI Directory, presents the Distinguished Name of the desired FTAM Responder and asks for the Presentation address attribute associated with that name.

An alternative to the direct use of Distinguished Names is to use "User Friendly Naming", as defined in [Kille92]. Gateway support for "User Friendly Naming" is recommended, but not required.

Use of the Gateway Services

FTP-Initiated Gateway Service

The FTP Client uses the FTP-Initiated gateway service to utilize the resources of an FTAM Responder.

To initiate a file transfer from an FTP Client, the Client connects to the FTP-Initiated gateway service via TCP/IP. The gateway then establishes a connection, via OSI, to the FTAM Responder. At this point, the user can initiate file transfer operations.

The FTP Client is responsible for providing the gateway with an authoritative Distinguished Name, or a User Friendly Name, of the desired OSI filestore. It is the responsibility of the gateway to resolve this Distinguished Name, or User Friendly Name, to its corresponding Presentation address.

The logon sequence taken by an FTP Client when initiating a file transfer with an FTAM Responder is given below:

         % ftp gateway
         ftp> site Distinguished-Name-of-FTAM Responder
         ftp> user username
         ftp> pass password

The "ftp gateway" command initiates the connection between the FTP Client and the gateway. Once connected to the gateway, the FTP Client should identify the desired FTAM Responder service via the Responder's Distinguished Name, or User Friendly Name, which is resolved by an algorithm running on the Directory Services provider. This information is sent via a "site Distinguished-Name-of-FTAM Responder" or "site UFN-of-FTAM Responder" command.

Upon receipt of a Distinguished Name or a User Friendly Name, it is the gateway's responsibility to resolve it to the Presentation Address associated with that name. This resolution is done by contacting the OSI Directory (X.500 or local static table) and presenting the Distinguished Name or User Friendly Name. Once the Presentation address is obtained, the gateway can attempt a connection with the ultimate destination file transfer service represented by this Presentation address.

The userid is passed via the "user username" command, and the password is passed via the "pass password". If the FTAM Responder requires a password, a password prompt should appear after issuing the "user username" command. It is anticipated that stronger authentication mechanisms will be required for DoD gateways in the

future.

Using a specific example, suppose an FTAM Responder has the following Distinguished Name:

       CountryName          =         "US"
       Organization         =         "Open Networks"
       OrganizationalUnit   =         "Network Services"
       CommonName           =         "netwrx1"
       CommonName           =         "FTAM service"

and the FTP-FTAM gateway is available at "washdc1-osigw.navy.mil".

The FTP user action will appear as:

       % ftp washdc1-osigw.navy.mil
       ftp> site "c=US@o=Open Networks@ou=Network Services@cn=netwrx1
            @cn=FTAM service"
       ftp> user mindel
       ftp> pass ***********

The "ftp washdc1-osigw.navy.mil" command initiates the connection between the FTP Client and the FTP-FTAM gateway at the Washington Navy Yard, Washington D.C. Once connected, the OSI filestore at Open Networks is identified via its Distinguished Name, "@c=US@o=Open Networks@ou=Network Services@cn=netwrx1@cn=FTAM service". Alternatively, a User Friendly Name, such as:

       "netwrx1, Open Networks, us"

can be specified, enabling the following FTP user action:

       % ftp washdc1-osigw.navy.mil
       ftp> site "netwrx1, Open Networks, us"
       ftp> user mindel
       ftp> pass ***********

As this example indicates, use of an intermediate gateway is not transparent. To partially alleviate this awkwardness, the gateway can be made more transparent through the registration of the FTAM host in the DNS using the address of the gateway [RFC1279].

An example will clarify this point. Suppose that the "netwrx1, Open Networks, us" FTAM host is registered in the TCP/IP DNS with the DN of "ftam-service.netwrx1.com" and the IP address of the "washdc1- osigw.navy.mil" gateway. In this example, the following set of user actions is required:

       % ftp ftam-service.netwrx1.com
       ftp> user mindel
       ftp> pass ***********

Since the "ftam-service.netwrx1.com" really points to the gateway address, the first command will connect the FTP Client to the gateway. The gateway will then use the name (using [RFC1279]) to determine where the actual FTAM host is resident. Gateway support for RFC1279 is recommended, but not required.

FTAM-Initiated Gateway Service

The FTAM Initiator uses the FTAM-Initiated gateway service to utilize the resources of an FTP Server.

To initiate a file transfer from an FTAM Initiator, the Initiator connects to the FTAM-Initiated gateway service via OSI. The gateway then establishes a connection, via TCP/IP, to the FTP Server. At this point, the user can initiate file transfer operations.

The FTAM Initiator is responsible for providing the gateway with an authoritative DN of the desired TCP/IP filestore. It is the responsibility of the gateway to resolve this DN to its corresponding IP address.

The logon sequence taken by an FTAM Initiator when initiating a file transfer with an FTP Server is given below:

       % ftam gateway
       ftam> user username@DNS-string
       ftam> pass password

The "ftam gateway" command initiates the connection between the FTAM Initiator and the gateway. Once connected, userid and TCP/IP filestore are identified in the "username@DNS-string" argument to the user command. If the FTP Server requires a password, a password prompt should appear after issuing the user command.

The gateway should incorporate the BIND Resolver functionality so that upon receipt of a Domain Name, the Gateway FTP Client can resolve it via the distributed Domain Name System.

Using a specific example, suppose that a FTP Server has the following Domain Name: "ftp-service.netwrx1.com" and an FTP-FTAM gateway is available at:

       CountryName          =         "US"
       Organization         =         "GOV"
       OrganizationalUnit   =         "DOD"
       OrganizationalUnit   =         "DISA"
       Locality             =         "Washington Navy Yard"
       CommonName           =         "wnyosi7"

The FTAM user action will appear as:

       % ftam @c=US@o=GOV@ou=DOD@ou=DISA@l=Washington Navy Yard
              @cn=wnyosi7
       ftam> user [email protected]
       ftam> pass ***********

Alternatively, a User Friendly Name could be used rather than the Distinguished Name.

As mentioned in the previous section, "Use of the FTP-Initiated Gateway Service", use of an intermediate gateway is not transparent. The gateway can be made more transparent through the registration of the FTP host in the X.500 OSI Directory. By querying the X.500 OSI Directory, the gateway can identify where the actual host is resident.

For example, suppose that the FTP Server in the previous example ("ftp-service.netwrx1.com") is registered in the X.500 Directory with the following Distinguished Name:

       CountryName          =         "US"
       Organization         =         "Open Networks"
       OrganizationalUnit   =         "Network Services"
       CommonName           =         "netwrx1"
       CommonName           =         "FTP service"

and the Presentation Address of the FTP-FTAM gateway. This approach, described in [RFC1279], would permit the following user interactions:

       % ftam @c=US@o=Open Networks@ou=Network Services
              @cn=netwrx1@cn=FTP Service"
       ftam> user mindel
       ftam> pass ***********

Summary of Usage

As shown in the discussions of the FTP-Initiated and FTAM-Initiated Gateway Services, the gateway user does not have access to the gateway filesystem; he merely makes use of the gateway logon procedure to specify the ultimate destination userid and password.

Two methods of interaction with the gateway were described. In the former, the user must:

   1. Be aware that a gateway is required to reach the
      destination FTP or FTAM host.
   2. Determine which gateway is most appropriate for their
      respective source-destination pair.
   3. Explicitly connect to the gateway host prior to connecting
      to the destination host.

Needless to say, the exchange of files between FTP and FTAM hosts requires more effort than that required for the exchange of files between a pair of hosts utilizing the same file transfer protocol.

The latter, more transparent method does not necessarily require that the user determine which gateway is most appropriate for their respective source-destination pair. In fact, filestore service providers are registered using the address of a predetermined gateway. With this approach, the user:

   1. Must be aware that a gateway is required to reach the
      destination FTP or FTAM host.
   2. Need not determine which gateway is most appropriate to
      access their ultimate destination host.
   3. Need not explicitly connect to the gateway prior to
      connecting to the destination FTP or FTAM host.

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 FTAM- I: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 <Diagnostic> value with identifier 1011 (Lower layer failure), as well as any known <Further Details>.

Other error conditions are not addressed in this discussion.

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.

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.

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.

FTP-I:Wait-for-PASS --> FTP-I:Wait-for-PAddress

    1. Gateway receives PASS command from FTP Client.

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>.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Document Type Support

The set of FTAM document types supported by the FTP-FTAM gateway is a subset of the document types identified in the Stable Implementation Agreements for Open Systems Interconnection Protocols: Part 9 - FTAM Phase 2, produced by the March 1992 Open Systems Environment Implementors' Workshop [NIST92]. This subset was chosen for its equivalence to those document types supported by FTP. The set includes:

            FTAM-1    "ISO FTAM Unstructured text file
            FTAM-3    "ISO FTAM Unstructured binary file
            NBS-9     "NBS-9 FTAM File directory file"
  FTAM document types map to FTP document types as follows:
            FTAM      <->       FTP
            ----------------------------------
            FTAM-1    <->       ASCII
            FTAM-3    <->       8 bit binary
            NBS-9     <->       Directory

Gateway support for FTAM-1 and FTAM-2 is required, whereas support for NBS-9 is recommended.

Notes on NBS-9

NBS-9 is optional in GOSIP versions 1 and 2 [NIST91]. NBS-9 will be superseded by its replacement when ISO/IEC ISP 10607-2 and ISO/IEC ISP 10607-2/Amendment 1 are published [NIST92].

For conformance to NBS-9, an FTAM Responder is only required to return the <Filename> file attribute, subject to local security and access control. All other requested attributes need not be returned.

Systems supporting the NBS-9 document type shall make available an NBS-9 document called 'DIRLIS'. This document can be used to obtain a listing of files and their associated attributes from a remote Filestore.

Functional Comparison of FTP and FTAM

A comprehensive comparison of the services offered by FTP and FTAM is beyond the scope of this specification. What follows is an analysis of several key points. Refer to [NIST 86a] and [ROSE90] for a more complete discourse on this topic.

FTAM is not a superset of FTP; each protocol has functions that only it performs. The set of FTAM functions is, however, larger than the set of FTP functions.

FTP combines file management and file transfer into one protocol engine, whereas FTAM separates management and transfer as they relate to files.

The file transfer services of both FTP and FTAM expect a reliable underlying end-to-end service. At a minimum, this service includes the capability to transfer entire files between remote hosts and to display remote filenames.

In addition to this basic file transfer service, FTAM supports the capability to: access a few records from a file server, create a network file system (similar to Sun's Network File System), handle printing and spooling, and access remote database records. FTP does not support these additional capabilities.

FTP uses TELNET services to set up a connection between the FTP Client and FTP Server. A three-digit reply code followed by explanatory text indicates the status of the preceding request and provides diagnostic information explaining each transaction.

FTAM relies on the Association Control Service Element (ACSE) to start and stop the network for network file interaction. Generally, the ASCE establishes the application association and related application context needed to support the FTAM protocol.

The FTAM protocol is modularized so as to keep the allowable number of actions in any particular state relatively small. There are many more possible sequences of FTP operations than possible sequences of FTAM operations [NIST86].

Because FTAM is more robust than FTP, FTAM allows greater flexibility for conveying information about files. FTAM deals only with aspects of application processes, and leaves data representation and data management facilities to other OSI service elements.

In contrast to the Client/Server model present in the FTP scheme, FTAM is based on the Initiator/Responder model. The key distinction

is that once the FTAM Initiator has established a connection with a remote host, either the Initiator or Responder can request services of the other. In the FTP realm, the Client both initiates a connection and requests all services.

The FTP Client knows the real properties of the remote host filesystem. FTAM, in contrast, embraces a conceptual model of a filesystem, labeled a virtual filestore model. The virtual filestore is a collection of files, each of which has a name that uniquely identifies it. Each file has a set of attributes, such as ownership information and contents, which is the data associated with the file. One file attribute is the <Contents Type> of the file, typically of value "FTAM-1", "FTAM-3", or "NBS-9". The FTAM Initiator only knows the properties of the corresponding Responder and virtual filestore, not the real properties of the filesystem on the remote host.

Loss of Functionality

As happens whenever two dissimilar protocols, or languages for that matter, are translated, some loss of functionality is inevitable. With reference to the FTP-FTAM gateway, several of the most blatant losses of functionality are:

    1. Diagnostics passed between protocols may not be precisely
       translated.
    2. The FTAM partial file (record) transfer may not be
       supported.
    3. Some FTAM attributes are not supported by FTP.

The primary goal of the gateway protocol mappings are to minimize this loss of functionality. As this gateway specification and subsequent implementations evolve, means to partially overcome loss of functionality may become more obvious. For example, the gateway may be able to emulate file record transfers between FTAM Initiators and FTP Servers.

Mapping of Protocol Functions and Representations

The mappings presented are based upon the FTAM protocol implementation as defined in Stable Implementation Agreements for Open Systems Interconnection Protocols: Part 9 - FTAM Phase 2, produced by the March 1992 Open Systems Environment Implementors' Workshop [NIST92], and in [ISO8571-1], [ISO8571-2],[ISO8571- 3],[ISO8571-4], and [ISO8571-5]. The FTP protocol as defined in Request for Comments [RFC959]. The mappings are strongly influenced by the work of M. A. Wallace et. al. at NIST [NIST86] and John Scott

at MITRE [MITRE87].

A key goal of the mappings presented in this document is to minimize the loss of functionality between the two protocols. The specific approach taken to implement the mappings is left to the discretion of the gateway implementor. The focus of the protocol function and representation mappings is on non-error encumbered processing. The mapping of diagnostic and error messages is treated separately in section 9.

At a minimum, the FTAM implementation in the FTP-FTAM gateway support for Implementation Profiles T1 (Simple File Transfer) and M1 (Management), as defined in [NIST92], is required. These Implementation Profiles correspond to the A/111 and A/13 Profiles of Standards Promotion and Application Group in Europe, respectively [NIST92].

At a minimum, the gateway support for the following is required:

  ASCII and 8 bit binary file types.  It should also support FTP
  File Stream Mode.
  The following FTAM document types: FTAM-1 (unstructured text
  file), FTAM-3 (unstructured binary file), and NBS-9 (set of
  directory entries).

POSIX file naming and organization conventions are assumed in these mappings; i.e., files in the systems are assumed to be organized in a hierarchical structure in which all of the non-terminal nodes are directories and all of the terminal nodes are any other type of file.

The following terminology is used in the mapping specifications:

  argument .......FTP Service Command argument, as used in [RFC959].
  parameter ......FTAM Service Primitive parameters and attributes,
                  as enumerated in Tables 6, 50, and 51 of [ISO8571-
                  3].

The following notation is used in the mapping specifications:

  Arguments and parameters are enclosed in angle brackets; e.g.,
  <Action Result>
  Values of arguments and parameters are enclosed in quotation
  marks; e.g., "Success"
  FTP Service Commands and FTAM Primitives are in uppercase; e.g., F-
  INITIALIZE

FTP-Initiated Gateway Service

The protocol mapping between FTP and FTAM may be one-to-zero (i.e., not mappable), one-to-one, or one-to-many.

The general steps taken by the FTP-FTAM gateway to provide the FTP- Initiated service are:

    1. Accept an FTP Client request at the FTP Server side of the
       gateway service.
    2. Map the request to the (set of) corresponding FTAM
       Initiator function(s).
    3. Acting as an FTAM Initiator, send the FTAM Initiator
       function(s) to the FTAM Responder.
    4. Accept information returned to the FTAM Initiator side of
       the gateway.  This information originated at the FTAM
       Responder.
    5. Map this returned information to the protocol form
       understood by the FTP Server side of the gateway.
    6. Send this returned information from the FTP Server side of
       the gateway to the FTP Client.

For each FTP protocol function, the FTAM protocol functions required to map it are identified:

FTP FTAM


ABOR F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP

ACCT F-INITIALIZE,

ALLO none

APPE F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-

         DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
         F-TRANSFER-END, F-WRITE

CDUP F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT

CWD F-BEGIN-GROUP, F-END-GROUP, F-DESELECT, F-SELECT

DELE F-BEGIN-GROUP, F-DELETE, F-END-GROUP, F-SELECT

HELP none

LIST F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-

         END-GROUP, F-OPEN, F-READ, F-READ-ATTRIBUTES, F-SELECT, F-
         TRANSFER-END

MKD none

MODE none

NLST F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-

         END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END

NOOP none

PASS F-INITIALIZE

PASV none

PORT none

PWD F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-READ-ATTRIBUTES,

         F-SELECT

QUIT F-P-ABORT or F-U-ABORT, F-TERMINATE

REIN F-BEGIN-GROUP, F-CANCEL, F-CLOSE, F-DESELECT, F-END-GROUP

REST F-CHECK, F-RESTART

RETR F-BEGIN-GROUP, F-CLOSE, F-DATA, F-DATA-END, F-DESELECT, F-

         END-GROUP, F-OPEN, F-READ, F-SELECT, F-TRANSFER-END

RMD none

RNFR F-BEGIN-GROUP, F-DESELECT, F-END-GROUP, F-SELECT

RNTO F-BEGIN-GROUP, F-CHANGE-ATTRIBUTES, F-DESELECT, F-END-

         GROUP, F-SELECT

SITE F-INITIALIZE

SMNT none

STAT none

STOR F-BEGIN-GROUP,F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-

         DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
         F-TRANSFER-END, F-WRITE

STOU F-BEGIN-GROUP, F-CLOSE, F-CREATE, F-DATA, F-DATA-END, F-

         DESELECT, F-END-GROUP, F-OPEN, F-READ-ATTRIBUTES, F-SELECT,
         F-TRANSFER-END, F-WRITE

STRU none

TYPE none

USER F-INITIALIZE

The remainder of this section presents detailed mapping procedures for each of the FTP protocol functions. Gateway support for these mappings is required.

ABOR

    1. Send F-CANCEL to FTAM Responder.
    2. Send the following grouped request to the FTAM Responder.
       F-BEGIN-GROUP
       F-CLOSE
       F-DESELECT
       F-END-GROUP
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       codes to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.

ACCT

    1. Set <Account> parameter value for issuing F-INITIALIZE to
       FTAM Responder.
    2. If <Called Presentation Address>, <Initiator Identity>, and
       <Filestore Password> parameters are available, attempt
       connection with FTAM Responder;
       Otherwise wait for additional ACCT commands.
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       codes to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. The ACCT command will be effective with the next PASS
       command.

ALLO

    1. Return a 200 reply code to FTP Client.

APPE

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 12.
    2. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-READ-ATTRIBUTES
            Save <Contents Type> parameter value
        F-DESELECT
        F-END-GROUP
    3. If the <Contents Type> parameter value returned with the
       F-READ-ATTRIBUTES has a value of "NBS-9", proceed to step
       12.
    4. Send the following grouped request to the FTAM responder.
        F-BEGIN-GROUP
        F-CREATE
            Set the <Override> parameter in the F-CREATE to
            "Select Old File".
        F-OPEN
        F-END-GROUP
    5. If the file existed, set the <Contents Type> parameter in
       the F-CREATE to match that returned by the
       F-READ-ATTRIBUTES.
    6. If the file did not exist and no previous FTP TYPE "Image"
       command was issued, then set the <Contents Type> parameter
       to "FTAM-1";
       Otherwise, set the <Contents Type> parameter to "FTAM-3".
    7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
       Operation> parameter set to "File Extend", to FTAM
       Responder.
    8. Loop reading data from FTP data connection, sending the
       data in F-DATA PDUs until end-of-file on the FTP
       connection.
    9. Send F-DATA-END to FTAM Responder.
    10. Send F-TRANSFER-END to FTAM Responder.
    11. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
        parameters to equivalent FTP reply code(s) and send reply
        code(s) to FTP Client.
    13. Translate FTP Client reply codes to equivalent FTAM
        <Action Result> and <Diagnostic> parameters and send
        parameters to FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. CWD of the FTAM system must be defined prior to issuance of
       APPE.

CDUP

    1. Determine parent directory from saved CWD string.  If no
       saved CWD string, proceed to step 4.
    2. Set <Contents Type> parameter to "NBS-9".
    3. Send the following grouped request to FTAM Responder.
       F-BEGIN-GROUP
       F-SELECT
       F-DESELECT
       F-END-GROUP
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    5. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. A POSIX file organization is assumed; i.e., files in the
       systems are organized in a hierarchical structure in which
       all of the non-terminal nodes are directories and all of
       the terminal nodes are any other type of file.
    b. If the parent directory does not exist, the current working
       directory remains unchanged.
    c. CWD of the FTAM system must be defined prior to issuance of
       CDUP.

CWD

    1. Save <pathname> argument as CWD string.
    2. Set <Contents Type> parameter to "NBS-9".
    3. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-DESELECT
        F-END-GROUP
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    5. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. The <pathname> argument is assumed to be an absolute
       directory specification.
    b. If the specified directory does not exist, the current
       working directory remains unchanged.
    c. Saved CWD string is used in other FTP-to-FTAM mappings,
       such as APPE.

DELE

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 3.
    2. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-DELETE
        F-END-GROUP
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM
       parameters and send parameters to FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. CWD of the FTAM system must be defined prior to issuance of
       DELE.

HELP

    1. If no <string> argument is provided, send helpful
       information about the implementation of the gateway to the
       FTP Client.  If an argument is provided, send more specific
       information.
    2. Return the FTP reply code 214 to the FTP Client.

LIST

    1. If <pathname> argument is provided, proceed to step 3.
    2. Save current pathname by appending saved CWD string with
       <pathname> argument; If no saved CWD string, proceed to
       step 11.
    3. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-READ-ATTRIBUTES
            Save <Filename>, <Contents Type>, , and <Filesize> parameters
        F-DESELECT
        F-END-GROUP
    4. If the <Contents Type> parameter of the F-READ-ATTRIBUTES
       is not "NBS-9", then return the <Filename>, <Contents
       Type>, <Date/Time of Last Modification>, and <Filesize>
       parameter values, obtained with the previous
       F-READ-ATTRIBUTES, to the FTP data connection;
       and proceed to step 8.
    5. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-OPEN
        F-END-GROUP
    6. Send F-READ to FTAM Responder.
    7. Loop reading F-DATA until F-DATA-END.  As data is received,
       write the <Filename>, <Permitted Actions>, <Contents Type>,
       and <Date/Time of Last Modification> parameter values from
       the PDU to the FTP data connection.
    8. Send F-TRANSFER-END to FTAM Responder.
    9. Send the following grouped request to the FTAM responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    10. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    11. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. Assume the <pathname> argument is relative to the saved
       CWD, whether filename or directory specification.
    b. CWD of the FTAM system must be defined prior to issuance of
       LIST.
    c. Transfers over data connection should be in ASCII.
    e. If list of files with full directory/file specification is
       received from FTAM Responder, then gateway should parse
       list to strip off directory portion.

8.1.10. MKD

    1. Return a 502 reply code (Command not implemented) to the
       FTP Client.
    Note:
    a. As indicated in the NIST Stable Implementation Agreements
       for FTAM [NIST92], creation or deletion of NBS-9 files is
       outside the scope of the agreements.

8.1.11. MODE

    1. If <argument> is "Stream", return 200 reply code to FTP
       Client; Otherwise return a 504 reply code (Command not
       implemented for that parameter).

8.1.12. NLST

    1. If <pathname> argument is provided, use <pathname> argument
       as <Filename> parameter value in F-SELECT issued in step 3.
    2. If no argument is provided, use saved CWD value as
       <Filename> parameter value in F-SELECT issued in step 3; If
       no CWD string is saved and no argument is provided, proceed
       to step 9.
    3. Set <Contents Type> parameter to "NBS-9".
    4. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-OPEN
        F-END-GROUP
    5. Send F-READ to FTAM Responder.
    6. Loop reading F-DATA until F-DATA-END.  As data is received,
       write the filenames and other useful information from the
       PDU to the FTP data connection.
    7. Send F-TRANSFER-END to FTAM Responder.
    8. Send the following grouped request to the FTAM responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    9. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    10. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. As per RFC 959 (FTP), the NLST <pathname> argument is a
       directory.
    b. Assume the argument is relative to the saved CWD, whether
       filename or directory specification.
    c. CWD of the FTAM system must be defined prior to issuance of
       NLST.
    d. Transfers over data connection should be in ASCII.
    e. Gateway should parse full directory/file specifications
       received from FTAM Responder to strip off directory
       portion.  This is required to support the "FTP multiple
       get" function that pipes NLST output to the STOR command.

8.1.13. NOOP

    1. Return a 200 reply code to FTP Client.

8.1.14. PASS

    1. Set <Filestore Password> parameter for F-INITIALIZE.
    2. If <Called Presentation Address>, <User Identity>, and
       <Filestore Password> are available, issue F- INITIALIZE to
       FTAM Responder.
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.

8.1.15. PASV

    1. Wait for data transfer on default data port or data port
       specified by PORT command.
    2. Return a 200 reply code to FTP Client.

8.1.16. PORT

    1. Return a 200 reply code to FTP Client.

8.1.17. PWD

    1. If there is a saved CWD string, return it to the FTP client
       and proceed to step 4.
    2. Set <Contents Type> attribute to "NBS-9".
    3. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-READ-ATTRIBUTES
        F-DESELECT
        F-END-GROUP
    4. Return the current directory name to the FTP client.
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    6. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.

8.1.18. QUIT

    1. If user is not logged in, proceed to step 5.
    2. If file transfer is in progress, send F-P-ABORT or
       F-U-ABORT to FTAM Responder.
    3. If file transfer is not in progress, send and F-TERMINATE
       to FTAM Responder.
    4. Return charge information to FTP Client.
    5. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    6. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.

8.1.19. REIN

    1. Flush all I/O and account information.
    2. Allow all transfers in progress to be completed.
    3. Set all parameters to default values.
    4. Send F-CANCEL to FTAM Responder.
    5. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    6. Leave the control connection open.
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    8. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. Typically followed by a USER command.

8.1.20. REST

    1. Send F-CHECK to FTAM Responder.
    2. Send F-RESTART to FTAM Responder.
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Notes:
    a. Will only have affect on FTAM Responder if the restart
       functional unit is negotiated on F-INITIALIZE.
    b. Refer to ISO 8571-3 for additional subtleties of FTAM
       checkpoint and restart.

8.1.21. RETR

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 9.
    2. Set <Contents Type> parameter to appropriate type of file.
    3. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-OPEN
        F-END-GROUP
    4. If file does not exist, proceed to step 9.
    5. Send F-READ to FTAM Responder.
    6. Loop reading F-DATA until F-DATA-END.  As data is received,
       write it to the FTP data connection.
    7. Send F-TRANSFER-END to FTAM Responder.
    8. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    9. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    10. Translate FTP Client reply codes to equivalent FTAM <Action
        Result> and <Diagnostic> parameters and send parameters to
        FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. CWD of the FTAM system must be defined prior to issuance of
       RETR.

8.1.22. RMD

    1. Return a 502 reply code (Command not implemented) to the
       FTP Client.
    Note:
    a. As indicated in the NIST Stable Implementation Agreements
       for FTAM [NIST92], creation or deletion of NBS-9 files is
       outside the scope of the agreements.

8.1.23. RNFR

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 3.
    2. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
            Get <Filename> parameter value from RNFR <pathname>
       argument.
        F-DESELECT
        F-END-GROUP
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. Together with RNTO, this command causes a file to be
       renamed.
    c. CWD of the FTAM system must be defined prior to issuance of
       RNFR.

8.1.24. RNTO

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 3.
    2. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-CHANGE-ATTRIBUTES
            Get <Filename> parameter from arguments provided by
            RNTO and previous RNFR.
        F-DESELECT
        F-END-GROUP
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. Together with RNFR, this command causes a file to be
       renamed.
    c. CWD of the FTAM system must be defined prior to issuance of
       RNTO.

8.1.25. SITE

    1. Save the specified destination address information.
    2. Set the <Called Presentation Address> parameter value equal
       to the <string> argument.  This parameter will be used when
       the F-INITIALIZE is sent to the FTAM Responder.
    3. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    4. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. The <string> argument to the SITE command may include a
       Distinguished Name or a User Friendly Name.

8.1.26. SMNT

    1. Return a 502 reply code to FTP Client.
    Note:
    a. Argument is ignored.

8.1.27. STAT

    1. Provide the gateway session status to the FTP Client.
    2. Return a 211 reply code to FTP Client.
    Note:
    a. Argument is ignored.

8.1.28. STOR

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 11.
    2. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-READ-ATTRIBUTES
            Save <Contents Type> parameter value
        F-DESELECT
        F-END-GROUP
    3. If the <Contents Type> parameter returned with the F-READ-
       ATTRIBUTES indicates a directory,  proceed to step 11.
    4. Send the following grouped request to the FTAM responder.
        F-BEGIN-GROUP
        F-CREATE
            Set the <Override> parameter in the F-CREATE to
            "Delete and create with new attributes.".
        F-OPEN
        F-END-GROUP
    5. If the file existed, set the <Contents Type> parameter in
       the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
       did not exist, set the <Contents Type> parameter to
       "FTAM-1".  If TYPE "Image" was previously requested, set
       the <Contents Type> parameter to "FTAM-3".
    6. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
       Operation> parameter set to "File Extend", to FTAM Responder.
    7. Loop reading data from FTP data connection, sending the
       data in F-DATA PDUs until end-of-file on the FTP
       connection.
    8. Send F-DATA-END to FTAM Responder.
    9. Send F-TRANSFER-END to FTAM Responder.
    10. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    11. Translate FTAM Responder <Action Result> and <Diagnostic>
        parameters to equivalent FTP reply code(s) and send reply
        code(s) to FTP Client.
    12. Translate FTP Client reply codes to equivalent FTAM
        <Action Result> and <Diagnostic> parameters and send
        parameters to FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. CWD of the FTAM system must be defined prior to issuance of
       STOR.

8.1.29. STOU

    1. Save current pathname by appending saved CWD string with
       <pathname> argument.  If no saved CWD string, proceed to
       step 11.
    2. Send the following grouped request to FTAM Responder.
        F-BEGIN-GROUP
        F-SELECT
        F-READ-ATTRIBUTES
            Save <Contents Type> parameter value
        F-DESELECT
        F-END-GROUP
    3. If the file already exists, proceed to step 12.
    4. If the <Contents Type> parameter returned with the F-READ-
       ATTRIBUTES indicates a directory, proceed to step 11.
    5. Send the following grouped request to the FTAM responder.
        F-BEGIN-GROUP
        F-CREATE
            Set the <Override> parameter in the F-CREATE to
            "Delete and create with new attributes.".
        F-OPEN
        F-END-GROUP
    6. If the file existed, set the <Contents Type> parameter in
       the F-CREATE to match the F-READ-ATTRIBUTES.  If the file
       did not exist, set the <Contents Type> parameter to
       "FTAM-1".  If TYPE "Image" was previously requested, set
       the <Contents Type> parameter to "FTAM-3".
    7. Send F-WRITE, with <Bulk Data Transfer Specification, FADU
       Operation> parameter set to "File Extend", to FTAM Responder.
    8. Loop reading data from FTP data connection, sending the
       data in F-DATA PDUs until end-of-file on the FTP
       connection.
    9. Send F-DATA-END to FTAM Responder.
    10. Send F-TRANSFER-END to FTAM Responder.
    11. Send the following grouped request to the FTAM Responder.
        F-BEGIN-GROUP
        F-CLOSE
        F-DESELECT
        F-END-GROUP
    12. Translate FTAM Responder <Action Result> and <Diagnostic>
        parameters to equivalent FTP reply code(s) and send reply
        code(s) to FTP Client.
    13. Translate FTP Client reply codes to equivalent FTAM
        <Action Result> and <Diagnostic> parameters and send
        parameters to FTAM Responder.
    Note:
    a. <pathname> argument is assumed to be a filename, relative
       to the currently saved CWD.
    b. Same as STOR, except the name of the created file must be
       unique in that directory.
    c. CWD of the FTAM system must be defined prior to issuance of
       STOU.

8.1.30. STRU

    1. If <structure code> argument is not "File", return 504
       reply code to FTP Client; Otherwise return 200 reply code
       to FTP Client.

8.1.31. SYST

    1. Return 502 reply code to FTP client.

8.1.32. TYPE

    1. If no <type code> argument is provided, set <Contents Type>
       parameter equal to "FTAM-1".
    2. If argument is provided, and equal to "ASCII", set <Contents
       Type> parameter to "FTAM-1".
    3. If argument is provided, and equal to "Image", set <Contents
       Type> parameter to "FTAM-3".
    4. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    5. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. Default to ASCII if no <type code> argument is provided.

8.1.33. USER

    1. Set <Initiator Identity> parameter for issuing F-INITIALIZE
       to FTAM Responder.
    2. If the destination address was specified in the Domain Name
       used to attach to the gateway, use it to set the value of
       the <Called Presentation Address> parameter of the
       to-be-issued F-INITIALIZE command.
    3. If the destination address is not known, check if it was
       specified in a previously issued SITE command.  If
       available, set <Called Presentation Address> parameter for
       issuing F-INITIALIZE to FTAM Responder.
    4. If the destination address is still not available, check if
       it is encoded in the user identity (e.g., user@host). If
       encoded, set <Called Presentation Address> parameter for
       issuing F-INITIALIZE to FTAM Responder using the "host"
       portion.
    5. If no destination address is available, proceed to step 7.
    6. Prompt user for password.
    7. Translate FTAM Responder <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply code(s) and send reply
       code(s) to FTP Client.
    8. Translate FTP Client reply codes to equivalent FTAM <Action
       Result> and <Diagnostic> parameters and send parameters to
       FTAM Responder.
    Note:
    a. A USER command should be acceptable in any state.
    b. Multiple mechanisms are available for specifying the
       destination address: 1) Domain Name used in connecting to
       gateway (see section 4, Use of Gateway Services); 2) SITE
       command argument; and 3) user@host format.

FTAM-Initiated Gateway Service

The protocol mapping between FTP and FTAM may be one-to-zero (i.e., not mappable), one-to-one, or one-to-many.

The general steps taken by the FTP-FTAM gateway to provide the FTAM- Initiated service are:

    1. Accept an FTAM Initiator request at the FTAM Responder side
       of the gateway.
    2. Map the request to the (set of) corresponding FTP Client
       function(s).
    3. Acting as an FTP Client, send the FTP Client function(s) to
       the FTP Server.
    4. Accept information returned to the FTP Client side of the
       gateway.  This information originated at the FTP Server.
    5. Map this returned information to a form understood by the
       FTAM Responder side of the gateway.
    6. Send this returned information from the FTAM Responder side
       of the gateway to the FTAM Initiator.

For each FTAM protocol function, the FTP protocol functions required to map it are identified:

  FTAM                FTP
  -----------------------------------------------------------------
  F-BEGIN-GROUP       none
  F-CANCEL            ABOR
  F-CHANGE-ATTRIBUTE  RNFR, RNTO
  F-CHECK             none
  F-CLOSE             none
  F-CREATE            STOR
  F-DATA              ALLO, STOR or RETR or APPE
  F-DATA-END          none
  F-DELETE            DELE
  F-DESELECT          none
  F-END-GROUP         STAT
  F-ERASE             DELE
  F-INITIALIZE        ACCT, PASS, USER
  F-LOCATE            none
  F-OPEN              MODE, STRU, TYPE
  F-READ              MODE, NLST, RETR, TYPE
  F-READ-ATTRIBUTE    LIST
  F-RECOVER           REST
  F-RESTART           ABOR, REST
  F-SELECT            LIST
  F-TERMINATE         QUIT
  F-TRANSFER          none
  F-P-ABORT           QUIT
  F-U-ABORT           QUIT
  F-WRITE             APPE or STOR, NOOP

The remainder of this section presents detailed mapping procedures for each of the FTAM protocol functions. Where appropriate, each FTAM service primitive is followed by those parameters that are relevant to the mapping. Gateway support for these mappings is required.

F-BEGIN-GROUP REQ

    1. Send F-BEGIN-GROUP RESP PDU to FTAM Initiator signifying
       that processes are available to handle concatenated
       requests.

F-CANCEL REQ

    1. Close FTP data connection.
    2. Send ABOR to FTP Server.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder action and diagnostic parameters and send
       parameters to FTAM Initiator via F-CANCEL RESP PDU.
    4. Translate FTAM Initiator action and diagnostic parameters
       to equivalent FTP reply codes and send reply codes to FTP
       Server.
    Note:
    a. F-U-ABORT REQ is a viable alternative to F-CANCEL REQ.
    b. Note that since ABOR is not implemented by all FTP Servers,
       the remote file may be corrupted, though accessible.

F-CHANGE-ATTRIBUTE REQ

    1. Get original filename from <Filename> parameter and send it
       with an RNFR to the FTP Server.
    2. Get new filename from <Filename> parameter and send it with
       an RNTO to the FTP Server.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder action and diagnostic parameters and send
       parameters to FTAM Initiator via F-CHANGE-ATTRIBUTE RESP
       PDU.
    4. Translate FTAM Initiator action and diagnostic parameters
       to equivalent FTP reply codes and send reply codes to FTP
       Server.
    Note:
    a. Allow for processing an arbitrary number attributes at one
       time.
    b. Allow for responses of "Attribute currently unavailable for
       change" and "Attribute not currently supported".
    c. At a minimum, support the <Filename>, <Permitted Actions>,
       and <Contents Type> parameters.

F-CHECK REQ

    1. Send an F-CHECK RESP PDU to the FTAM Initiator.

F-CLOSE REQ

    1. Send F-CLOSE RESP PDU , with <Action Result> parameter
       value of "Success", to FTAM Initiator.
    Note:
    a. If an error had occurred during transfer, it would have
       been noted before the F-CLOSE REQ.

F-CREATE REQ

    1. Send STOR and zero data bytes to FTP Server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

F-DATA PDU

    1. If necessary, send ALLO command to FTP Server.
    2. Depending on whether reading or writing, send STOR, RETR,
       or APPE command to FTP Server.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.
    Note:
    a. The use of an FTP command may be unnecessary.  Sending the
       data on the data connection may be adequate.

F-DATA-END REQ

    1. Close the data connection.
    2. Save mandatory Diagnostic parameter for later use.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

F-DELETE REQ

    1. Send DELE to FTP server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-DELETE RESP PDU.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.10. F-DESELECT REQ

    1. Return F-DESELECT RESP PDU, with <Action Result> parameter
       value of "Success", to FTAM Initiator.

8.2.11. F-END-GROUP REQ

    1. Send STAT command sequence to FTP Server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic>
       parameters and send parameters to FTAM Initiator via F-END
       GROUP RESP.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.12. F-ERASE REQ

    1. Send DELE to FTP Server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-ERASE RESP PDU.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.13. F-INITIALIZE REQ

    1. Establish initial area for activity attributes.
    2. Save <Responding Presentation Address>, <Initiator
       Identity>, and <Filestore Password> parameter values
       received from FTAM Initiator.
    3. If the destination address was specified in the
       Distinguished Name (or User Friendly Name) used to attach
       to the gateway, save it as the ultimate destination
       address.
    4. If the ultimate destination address is not yet known, look
       at the "@host" portion of the <Initiator Identity>
       parameter for the ultimate destination parameter.
    5. If the ultimate destination address is still not known,
       check if it is available in the <Responding Presentation
       Address> parameter.
    6. Get userid from <Initiator Identity> and send it with USER
       command to FTP Server.
    7. Get password from <Filestore Password> and send it with
       PASS command to FTP Server.
    8. If necessary, send ACCT command to FTP Server.
    9. Negotiate acceptance of mandatory functional units, service
       classes, service types, presentation contexts, and
       attribute groups.
    10. Accept context management functional unit passed by
        Presentation service provider.
    11. Translate FTP Server reply code to equivalent FTAM
        Responder <Action Result> and <Diagnostic> parameters and
        send parameters to FTAM Initiator via F-INIT RESP PDU.
    12. Translate FTAM Initiator <Action Result> and <Diagnostic>
        parameters to equivalent FTP reply codes and send reply
        codes to FTP Server.
    Note:
    a. Multiple mechanisms are available for specifying the
       destination address: 1) Distinguished Name, or User
       Friendly Name, used in connecting to the gateway (see
       section 4, Use of Gateway Services); 2) user@host format;
       and 3) Inclusion as <Responding Presentation Address>
       parameter value.

8.2.14. F-LOCATE REQ

    Note:
    a. Not supported since FTAM-1 and FTAM-3 don't support this
       primitive.

8.2.15. F-OPEN REQ

    1. Get <Contents Type> and <Processing Mode> parameter values
       from FTAM Initiator.
    2. Send TYPE command to FTP Server.
    3. Send MODE command to FTP Server.
    4. Send STRU command to FTP Server.
    5. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic>
       parameters and send parameters to FTAM Initiator via F-OPEN
       RESP PDU.
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.
    Note:
    a. Establishes definite value for presentation context name
       parameter for this data transfer.
    b. Assumes that the <Requested Access> parameter is permitted.

8.2.16. F-READ REQ

    1. If requested file type and file mode are different than
       current settings, send TYPE and MODE to FTP Server.
    2. If <Contents Type> is FTAM-1 or FTAM-3, then send RETR to
       FTP Server.
    3. If <Contents Type> is "NBS-9", then send NLST to FTP
       Server.
    4. If reply code from FTP Server is 1xx, open FTP data
       connection and loop until End-of-File is read on FTP data
       connection.  Inside loop, read block from FTP data
       connection, format FTAM DATA PDU, and send FTAM PDU to FTAM
       Initiator.  At End-of-File on FTP data connection, send
       F-DATA-END and return.
    5. If reply code from FTP Server is not 1xx, send F-CANCEL REQ
       to FTAM Initiator.
    6. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-READ RESP PDU.
    7. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.
    Note:
    a. To send NLST response, TYPE must be ASCII.

8.2.17. F-READ-ATTRIBUTE REQ

    1. Send LIST to FTP Server.
    2. Translate returned information into the <Filename>,
       <Contents Type>, and <Permitted Actions> parameter values
       and return them to the FTAM Initiator.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-READ-ATTRIBUTE RESP
       PDU.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.18. F-RECOVER REQ

    1. Send REST command to FTP Server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.
    Note:
    a. Regime recovery is only possible if the <Recovery
       Functional Unit> parameter was negotiated previously by an
       F-INITIALIZE.

8.2.19. F-RESTART REQ

    1. To interrupt any bulk data transfer in progress, send ABOR
       to FTP Server.
    2. To negotiate the point at which data transfer is to be
       restarted, get <Checkpoint Identifier> parameter from FTAM
       Initiator and send it with REST to FTP Server.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-RESTART RESP PDU.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.20. F-SELECT REQ

    1. Get <Filename> parameter and send with LIST command to FTP
       Server to determine whether  or not the file exists.
    2. If file exists, compare the POSIX file access rights with
       the <Requested Access> parameter sent by the FTAM
       Initiator.  If the access rights match, return <Action
       Result> parameter value of "Success", otherwise return
       <Action Result> parameter value of "Failure".
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-SELECT RESP PDU.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.
    Note:
    a. The specified file is binary/text file if one record is
       received or is a directory file if multiple records are
       received.

8.2.21. F-TERMINATE REQ

    1. Send QUIT to FTP Server.
    2. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator via F-TERMINATE RESP PDU.
    3. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.22. F-TRANSFER-END

    1. Get <Action Result> parameter value from last F-DATA-END
       and return it to FTAM Initiator as <Action Result>
       parameter of this F-TRANSFER-END.

8.2.23. F-P-ABORT REQ

    1. Send QUIT to FTP Server.
    2. Return <Action Result> parameter value of "Permanent Error"
       to FTAM Initiator.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

8.2.24. F-U-ABORT REQ

    1. Send QUIT to FTP Server.
    2. Return <Action Result> parameter value of "Permanent Error"
       to FTAM Initiator.
    3. Translate FTP Server reply code to equivalent FTAM
       Responder <Action Result> and <Diagnostic> parameters and
       send parameters to FTAM Initiator.
    4. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

F-WRITE REQ

    1. Save bulk transfer specification parameter from PDU.
    2. Send NOOP to FTP Server to receive status information.
    3. If the <Bulk Data Transfer Specification, FADU Operation>
       parameter has a value of "File Extend", then send an APPE
       to the FTP Server, otherwise send a STOR to the FTP Server.
    4. If reply code from FTP Server is 200, then accept FTP data
       connection; otherwise send F-CANCEL REQ to FTAM Initiator.
    5. Translate FTP Server reply code to equivalent FTAM Responder
       <Action Result> and <Diagnostic> parameters and send
       parameters to FTAM Initiator.
    6. Translate FTAM Initiator <Action Result> and <Diagnostic>
       parameters to equivalent FTP reply codes and send reply
       codes to FTP Server.

Mapping between FTP Reply Codes and FTAM Parameters

The focus of the protocol function and representation mappings, presented in the previous sections, is on non-error encumbered processing. Though appropriate responses are designated in many cases, it is intended that a more thorough use of responses will be incorporated into gateway implementations.

The purpose of this section is to provide a set of mappings between FTAM responses (<Action Result> and <Diagnostic>) and FTP responses (reply codes).

The <Action Result> parameter of the FTAM File Service primitives conveys information which summarizes that available in the <Diagnostic> parameter. The value is never less than the most severe diagnostic value. The valid values of this parameter are "Success", "Transient Error", and "Permanent Error". The FTP response text should be supplied in the <Further Details> field of the <Diagnostics> sequence in the FTAM response and abort messages.

An FTAM <Action Result> "Success" may be accompanied by a <Diagnostic> with value of "Informative Error Type". These "Success" diagnostic messages are associated with error type 0 in the table below (and in [ISO8571-3]). Error type 1 indicates a transient error, while type 2 indicates a permanent error.

An FTP reply consists of a three digit number followed by some text. The number is defined as a 3-digit code, each digit of which has a special significance. The first digit conveys approximately the same information as the FTAM <Action Result> parameter; i.e., positive, transient negative, or permanent negative.

The FTP specification document [RFC959] explicitly states that the list of reply codes should not be expanded beyond that which is presented in [RFC959]. This requirement is adhered to in the mappings presented in this document.

FTP Reply Codes to FTAM Parameters

This section presents the set of mappings between FTP reply codes and their equivalent FTAM action and diagnostic parameters. Gateway support for these mappings is recommended, but not required. The following abbreviations are used for FTAM action parameter values:

    trans   =    transient error
    perman  =    permanent error
  FTP Reply                                    |FTAM Diagnostic
                                               |
                                               |
  Code      Text                               |Result   Type Id
  ---------------------------------------------+------------------
  110       Restart marker reply               |success  0    0
  120       Service ready in nnn minutes       |success  0    0
  125       Data connection open, transfer     |
            starting                           |success  0    0
  150       File status okay; about to open    |
            data connection                    |success  0    0
  200       Command okay                       |success  0    0
  202       Command not implemented;           |
            superfluous                        |success  0    0
  211       System status, or system help      |
            reply                              |success  0    0
  212       Directory status                   |success  0    0
  213       File status                        |success  0    0
  214       Help message                       |success  0    0
  215       NAME system type                   |success  0    0
  220       Service ready for new user         |success  0    0
  221       Service closing control connection |success  0    0
  225       Data connection; no transfer in    |
            progress                           |success  0    0
  226       Closing data connection            |success  0    0
  227       Entering passive mode (h1,h2,..)   |success  0    0
  230       User logged in, proceed            |success  0    0
  250       Requested file action okay,        |
            completed                          |success  0    0
  257       "PATHNAME" created                 |success  0    0
  331       User name okay, need password      |success  0    0
  332       Need account for logon             |success  0    0
  350       Requested file action pending      |
            further information                |success  0    0
  421       Service not available, closing     |
            control connection                 |trans    1    1
  425       Can't open data connection         |trans    1    3
  426       Connection closed, transfer        |
            aborted                            |trans    1    1014
  450       Requested file action not taken,   |
            file unavailable (e.g., file busy) |trans    1    5041
  451       Requested file action aborted,     |
            local error in processing          |trans    1    5028
  452       Requested action not taken,        |
            insufficient storage space         |trans    1    9
  500       Syntax error, command unrecognized |perman   2    5015
  501       Syntax error in parameters or      |
            arguments                          |perman   2    4004
  502       Command not implemented            |perman   2    5016
  503       Bad sequence of commands           |perman   2    1015
  504       Command not implemented for that   |
            parameter                          |perman   2    4003
  530       Not logged in                      |perman   2    2020
  532       Need account for storing files     |perman   2    2008
  550       Requested action not taken; file   |
            unavailable (e.g., file not found, |
            no access)                         |perman   2    3013
  551       Requested action aborted, page     |
            type                               |perman   2    5002
  552       Requested file action aborted,     |
            exceeded storage allocation        |perman   2    9
  553       Requested file action not taken,   |
            file name not allowed              |perman   2    3024

FTAM Parameters to FTP Reply Codes

This section presents the set of mappings between FTAM diagnostic parameters and their equivalent FTP reply codes. Gateway support for these mappings is recommended, but not required. As previously mentioned, type 0 is an informative error type that may be returned with a "Success" action result, type 1 is a transient error type, and type 2 is a permanent error type.

  FTAM Diagnostic                                   |FTP Reply Code
                                                    |
  Type      Id   Reason                             |
  --------------------------------------------------+--------
                                                    |
  1,2       0    No reason                          |    421
  0         1    Responder error                    |    211
  1,2       1    Responder error                    |    421
  1,2       2    System shutdown                    |    421
  0         3    FTAM mgmt problem, unspecific      |    211
  1,2       3    FTAM mgmt problem, unspecific      |    425
  0         4    FTAM mgmt, bad account             |    221
  2         4    FTAM mgmt, bad account             |    532
  0         5    FTAM mgmt, security not passed     |    211
  2         5    FTAM mgmt, security not passed     |    530
  0         6    Delay may be encountered           |    211
  0         7    Initiator error, unspecific        |    211
  1,2       7    Initiator error, unspecific        |    421
  0         8    Subsequent error                   |    211
  1,2       8    Subsequent error                   |    421
  0         9    Temporal insufficiency of resources|    211
  1,2       9    Temporal insufficiency of resources|    452
  1,2       10   Access req. violates VFS security  |    550
  1,2       11   Access req. violates local security|    550
  2         1000 Conflicting parameter values       |    504
  2         1001 Unsupported parameter values       |    504
  2         1002 Mandatory parameter not set        |    504
  2         1003 Unsupported parameter              |    504
  2         1004 Duplicated parameter               |    504
  2         1005 Illegal parameter type             |    504
  2         1006 Unsupported parameter types        |    504
  2         1007 FTAM protocol err., unspecific     |    426
  2         1008 FTAM protocol err., procedure err  |    426
  2         1009 FTAM protocol err., funct. unit err|    426
  2         1010 FTAM protocol err., corruption err.|    426
  2         1011 Lower layer failure                |    426
  1,2       1012 Lower layer addressing error       |    426
  1,2       1013 Timeout                            |    426
  1,2       1014 System shutdown                    |    426
  2         1015 Illegal grouping sequence          |    503
  2         1016 Grouping threshold violation       |    503
  2         1017 Inconsistent PDU request           |    503
  2         2000 Association with user not allowed  |    532
  2         2002 Unsupported service class          |    504
  0         2003 Unsupported functional unit        |    211
  2         2003 Unsupported functional unit        |    502
  0         2004 Attribute group error, unspecific  |    211
  1,2       2004 Attribute group error, unspecific  |    504
  2         2005 Attribute group not supported      |    504
  0         2006 Attribute group not allowed        |    211
  2         2006 Attribute group not allowed        |    504
  0         2007 Bad account                        |    211
  2         2007 Bad account                        |    532
  0         2008 Association management, unspecific |    211
  1,2       2008 Association management, unspecific |    532
  2         2009 Association management, bad address|    532
  1,2       2010 Association management, bad account|    532
  0         2011 Checkpoint window error, too large |    211
  2         2011 Checkpoint window error, too large |    426
  0         2012 Checkpoint window error, too small |    211
  2         2012 Checkpoint window error, too small |    426
  0         2013 Checkpoint window error, unsupp.   |    211
  2         2013 Checkpoint window error, unsupp.   |    504
  0         2014 Communications QoS not supported   |    211
  1,2       2014 Communications QoS not supported   |    504
  2         2015 Initiator identity unacceptable    |    532
  0         2016 Context management refused         |    211
  0         2017 Rollback not available             |    211
  0         2018 Contents type list cut by          |
                 responder                          |    211
  0         2019 Contents type list by              |
                 Presentation Service               |    211
  2         2020 Invalid filestore password         |    530
  2         2021 Incompatible service classes       |    530
  1,2       3000 Filename not found                 |    550
  1,2       3001 Selection attributes not matched   |    550
  2         3002 Initial attributes not possible    |    550
  2         3003 Bad attribute name                 |    550
  1,2       3004 Non-existent file                  |    550
  1,2       3005 File already exists                |    553
  1,2       3006 File cannot be created             |    553
  1,2       3007 File cannot be deleted             |    553
  0         3008 Concurrency control not available  |    211
  2         3008 Concurrency control not available  |    503
  0         3009 Concurrency control not supported  |    211
  2         3009 Concurrency control not supported  |    502
  0         3010 Concurrency control not possible   |    211
  2         3010 Concurrency control not possible   |    503
  0         3011 More restrictive lock              |    211
  1         3011 More restrictive lock              |    450
  1,2       3012 File busy                          |    450
  1,2       3013 File not available                 |    450
  0         3014 Access control not available       |    211
  1,2       3014 Access control not available       |    503
  0         3015 Access control not supported       |    211
  1,2       3015 Access control not supported       |    502
  0         3016 Access control inconsistent        |    211
  1,2       3016 Access control inconsistent        |    503
  0         3017 Filename truncated                 |    211
  0         3018 Initial attributes altered         |    211
  1,2       3019 Bad account                        |    532
  0         3020 Override selected existing file    |    211
  0         3021 Override deleted and recreated     |    211
  0         3022 Create override deleted and        |
                 recreate file with new attributes  |    211
  1,2       3023 Create override, not possible      |    553
  1,2       3024 Ambiguous file specification       |    553
  2         3025 Invalid create password            |    550
  2         3026 Invalid delete password on override|    550
  2         3027 Bad attribute value                |    550
  2         3028 Requested access violation         |    550
  2         3029 Functional unit not available for  |    550
                 requested access                   |
  0         3030 File created but not selected      |    211
  1         3030 Invalid create password            |    550
  0         4000 Attribute non-existent             |    211
  1,2       4000 Attribute non-existent             |    501
  1,2       4001 Attribute cannot be read           |    504
  1,2       4002 Attribute cannot be changed        |    504
  1,2       4003 Attribute not supported            |    504
  2         4004 Bad attribute name                 |    501
  2         4005 Bad attribute value                |    501
  0         4006 Attribute partially supported      |    211
  0         4007 Additional set attribute value     |
                 not distinct                       |    211
  1,2       5000 Bad FADU, unspecific               |    550
  2         5001 Bad FADU, size error               |    501
  2         5002 Bad FADU, type error               |    551
  2         5003 Bad FADU, poorly specified         |    501
  2         5004 Bad FADU, bad location             |    550
  0         5005 FADU does not exist                |    550
  1         5005 FADU does not exist                |    550
  0         5006 FADU not available, unspecific     |    550
  1,2       5006 FADU not available, unspecific     |    550
  1,2       5007 FADU not available for reading     |    550
  1,2       5008 FADU not available for writing     |    550
  1,2       5009 FADU not available for location    |    550
  1,2       5010 FADU not available for erasure     |    550
  1,2       5011 FADU cannot be inserted            |    550
  1,2       5012 FADU cannot be replaced            |    550
  0         5013 FADU cannot be located             |    550
  1,2       5013 FADU cannot be located             |    550
  2         5014 Bad data element type              |    550
  1,2       5015 Operation not available            |    500
  1,2       5016 Operation not supported            |    502
  0         5017 Operation inconsistent             |    211
  2         5017 Operation inconsistent             |    503
  0         5018 Concurrency control not available  |    211
  1,2       5018 Concurrency control not available  |    503
  0         5019 Concurrency control not supported  |    211
  2         5019 Concurrency control not supported  |    502
  0         5020 Concurrency control inconsistent   |    211
  2         5020 Concurrency control inconsistent   |    503
  0         5021 Processing mode not available      |    211
  1,2       5021 Processing mode not available      |    503
  0         5022 Processing mode not supported      |    211
  2         5022 Processing mode not supported      |    504
  0         5023 Processing mode inconsistent       |    211
  2         5023 Processing mode inconsistent       |    503
  0         5024 Access context not available       |    211
  2         5024 Access context not available       |    503
  0         5025 Access context not supported       |    211
  2         5025 Access context not supported       |    504
  1,2       5026 Bad write, unspecific              |    550
  1,2       5027 Bad read, unspecific               |    550
  0         5028 Local failure, unspecific          |    211
  1,2       5028 Local failure, unspecific          |    451
  0         5029 Local failure, filespace exhausted |    211
  1,2       5029 Local failure, filespace exhausted |    552
  0         5030 Local failure, data corrupted      |    211
  1,2       5030 Local failure, data corrupted      |    451
  0         5031 Local failure, data corrupted      |    211
  1,2       5031 Local failure, data corrupted      |    451
  2         5032 Future file size exceeded          |    451
  0         5034 Future file size increased         |    211
  0         5035 Functional unit invalid in         |
                 processing mode                    |    211
  2         5035 Functional unit invalid in         |
                 processing mode                    |    503
  0         5036 Contents type inconsistent         |    211
  2         5036 Contents type inconsistent         |    503
  0         5037 Contents type simplified           |    211
  0         5038 Duplicate FADU name                |    211
  1,2       5039 Damage to select/open regime       |    553
  1,2       5040 FADU locking not available on file |    450
  1,2       5041 FADU locked by another user        |    450

Future Mapping Problem

At some point in the future, the FTAM <Responding Presentation Address> parameter may be used for purposes other than the current use of passing the final destination address in the FTAM-Initiated gateway service [NIST86]. If this happens, the destination address will have to be passed in another location, such as in the "@host" portion of the <Initiator Identity>. Currently, the FTP-FTAM gateway specification permits either mechanism for storage of the ultimate destination address.

Error Handling

The minimal acceptable solution for FTAM-Initiated service errors is to map FTP failures to FTAM "Unrecoverable error" and return the FTP diagnostic string in the FTAM <Further Details> field. Similarly for FTP-Initiated service errors, the minimal acceptable solution is to return reply code 221, "Service closing control connection, Logged out if appropriate". While this minimal solution is acceptable, the recommended approach for Gateway developers is to implement the mappings presented in Section 9.1, FTP Reply Codes to FTAM Parameters, and Section 9.2, FTAM Parameters to FTP Reply Codes.

10. Implementation and Configuration Guidelines

The intent of this specification is to specify the required characteristics and functions of an FTP-FTAM gateway. The specific approach taken to realize these specifications in an operational gateway are left to the discretion of the implementor. We do take the liberty, however, of suggesting several ideas concerning the configuration and implementation of such gateways.

10.1. Robustness

The gateway should be robust enough to handle situations where a subset of the FTP and/or FTAM protocols are implemented on a host.

The gateway should support multiple concurrent FTP and FTAM connections.

These are requirements for gateway implementations.

10.2. Well-Known TCP/IP Port

It is recommended that the FTP-Initiated gateway process listen on TCP/IP port 21, the well-known port for FTP listener processes. As the gateway computer is primarily intended to provide gateway services, use of this port will alleviate the need for gateway users to specify the desired port when they connect to the gateway. The standard FTP server listener process can then be moved to another port that is known to those users (e.g., System Administrators) requiring FTP-to-FTP access to the gateway computer.

10.3. Gateway Listener Processes

To simplify the administrative overhead on the gateway computer system, it is recommended that the FTP-Initiated service and FTAM- Initiated gateway listener processes be merged into a single executable module. This single daemon will act as the one and only gateway listener processes. As connections were established with hosts, other processes would be created.

10.4. Implementation Testing

To assist in the development and evaluation of FTP-FTAM gateway prototypes, NIST has developed a test system to evaluate a gateway's conformance to the protocol standards [NIST88].

10.5. POSIX File Naming and Organization

The OSI profiles do not define a standard manner for an FTAM Responder to return file names.

To avoid unnecessary complexity, proprietary file systems are not addressed in these mappings. Gateway support for POSIX file naming and organization conventions is required; i.e., files are assumed to be organized in a hierarchical structure in which all of the non- terminal nodes are directories and all of the terminal nodes are any other type of file.

11. Security Considerations

The gateway system may place the burden of authentication on the destination system. However, the gateway must accommodate the passing through of all authentication parameters. The authentication parameters of each protocol are applied at the destination and no additional parameters are needed for authentication at the gateway. As such, no gateway password file is required to support gateway

functions.

It is anticipated that the requirement for a strong authentication mechanism will soon replace the most currently used, userid and password mechanism. The U.S. National Security Agency (NSA) has already prototyped and has plans field a Message Secure Protocol (MSP) as part of the Defense Message System (DMS) Program which will soon become the Department of Defense (DoD) mandatory messaging system. MSP utilizes a public key encryption-like mechanism which will be used to authenticate users and allow signed operations. The current philosophy is to use this same mechanism for all authentication and access control situations, such as logging onto remote hosts or gateways. Detailed specifications for Pre-MSP, used in the unclassified though sensitive arena, are scheduled to be published in the first quarter of 1993. The requirement for gateways to process PMSP and MSP strong authentication mechanisms will be part of all future DoD procurements.

12. References

[ISO8571-1] Information processing systems - Open Systems

            Interconnection - File Transfer, Access and
            Management, Part 1: General Introduction, International
            Standards Organization for Standards, First Edition,
            October 1988.

[ISO8571-2] Information processing systems - Open Systems

            Interconnection - File Transfer, Access and Management,
            Part 2: Virtual Filestore Definition, International
            Standards Organization for Standards, First Edition,
            October 1988.

[ISO8571-3] Information processing systems - Open Systems

            Interconnection - File Transfer, Access and Management,
            Part 3: File Service Definition, International Standards
            Organization for Standards, First Edition, October 1988.

[ISO8571-4] Information processing systems - Open Systems

            Interconnection - File Transfer, Access and Management,
            Part 4: File Protocol Specification, International
            Standards Organization for Standards, First Edition,
            October 1988.

[ISO8571-5] Information processing systems - Open Systems

            Interconnection - File Transfer, Access and Management,
            Part 5: Protocol Implementation Conformance Statement,
            International Standards Organization for Standards,
            First Edition.

[KILLE92] Hardcastle-Kille, S., "Using the OSI Directory to achieve

          User Friendly Naming", OSI-DS 24 (v1.1), October 1992.

[MITRE87] Scott, J., "An FTP/FTAM Application Bridge, An FTAM/FTAM

          (MTR-87W00186)", The MITRE Corporation, July 1987.

[NETWRX90a] Mindel, J., "Gateway Technical Specification" Open

            Networks, Inc. (formerly NetWorks One), 28 February 1990.

[NETWRX90b] Mindel, J., "FTP Gateway User's Guide", Open

            Networks, Inc. (formerly NetWorks One), 28 February 1990.

[NIST86] Wallace, M, et. al., "A Gateway Architecture Between FTP

         and FTAM (ICST/SNA86-6)", National Institute of Standards
         and Technology, U.S. Department of Commerce, July 1986.

[NIST88] A Test System for Implementations of FTAM/FTP Gateways:

         Final Report Part 1, National Institute of Standards and
         Technology, U.S. Chamber of Commerce, October 1988.

[NIST91] CSL Bulletin: File Transfer, Access, and Management,

         National Institute of Standards and Technology, U.S.
         Chamber of Commerce, July 1991.

[NIST92] Stable Implementation Agreements for Open Systems

         Interconnection Protocols: Part 9 - FTAM Phase 2, Output
         from the March 1992 Open Systems Environment Implementors'
         Workshop (OIW), March 1992.

[RFC959] Postel, J., and J. Reynolds, "File Transfer Protocol

         (FTP), STD 9, RFC 959, USC/Information Sciences Institute,
         October 1985.

[RFC1101] Mockapetris, P., "DNS Encoding of Network Names and other

         Types",  RFC 1101, USC/Information Sciences Institute,
         April 1989.

[RFC1279] Hardcastle-Kille, S., "X.500 and Domain", RFC 1279,

         University College London, November 1991.

[ROSE90] Rose, M., "The Open Book: A Practical Perspective on OSI",

         Prentice-Hall Inc., 1990.

13. Authors' Addresses

Joshua L. Mindel Open Networks, Inc. 11490 Commerce Park Dr., Suite 205 Reston, Virginia 22091 USA

Phone: (703) 648-0013 Email: [email protected]

Robert L. Slaski Open Networks, Inc. 11490 Commerce Park Dr., Suite 205 Reston, Virginia 22091 USA

Phone: (703) 648-0013 Email: [email protected]