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 RFC959 (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.
8.2. 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.
8.2.1. F-BEGIN-GROUP REQ
1. Send F-BEGIN-GROUP RESP PDU to FTAM Initiator signifying
that processes are available to handle concatenated
requests.
8.2.2. 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.
8.2.3. 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.
8.2.4. F-CHECK REQ
1. Send an F-CHECK RESP PDU to the FTAM Initiator.
8.2.5. 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.
8.2.6. 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.
8.2.7. 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.
8.2.8. 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.
8.2.9. 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.
8.3. 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.
9. 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.
9.1. 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
9.2. 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
9.3. 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.
9.4. 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