Passa al contenuto principale

9. Mapping tra i codici di risposta FTP e i parametri FTAM

I mapping delle funzioni di protocollo e delle rappresentazioni, presentati nelle sezioni precedenti, si concentrano sull'elaborazione non gravata da errori. Sebbene in molti casi siano designate risposte appropriate, si prevede che nelle implementazioni del gateway sarà incorporato un uso più completo delle risposte.

Lo scopo di questa sezione è fornire un insieme di mapping tra le risposte FTAM ( e ) e le risposte FTP (codici di risposta).

Il parametro delle primitive dell'FTAM File Service veicola informazioni che riassumono quelle disponibili nel parametro . Il valore non è mai inferiore al valore diagnostico più grave. I valori validi di questo parametro sono "Success", "Transient Error" e "Permanent Error". Il testo della risposta FTP dovrebbe essere fornito nel campo della sequenza nei messaggi FTAM di risposta e di interruzione.

Un FTAM con valore "Success" può essere accompagnato da un con valore "Informative Error Type". Questi messaggi diagnostici "Success" sono associati al tipo di errore 0 nella tabella seguente (e in [ISO8571-3]). Il tipo di errore 1 indica un errore temporaneo, mentre il tipo 2 indica un errore permanente.

Una risposta FTP è composta da un numero di tre cifre seguito da un testo. Il numero è definito come un codice di 3 cifre, ciascuna delle quali ha un significato particolare. La prima cifra veicola approssimativamente le stesse informazioni del parametro FTAM ; vale a dire positivo, negativo temporaneo o negativo permanente.

Il documento di specifica FTP [RFC959] afferma esplicitamente che l'elenco dei codici di risposta non dovrebbe essere ampliato oltre quello presentato in [RFC959]. Questo requisito è rispettato nei mapping presentati in questo documento.

9.1. Dai codici di risposta FTP ai parametri FTAM​

Questa sezione presenta l'insieme dei mapping tra i codici di risposta FTP e i parametri FTAM equivalenti di azione e diagnostica. Il supporto di questi mapping da parte del gateway è raccomandato, ma non obbligatorio. Per i valori del parametro di azione FTAM si utilizzano le seguenti abbreviazioni: 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. Dai parametri FTAM ai codici di risposta FTP​

Questa sezione presenta l'insieme dei mapping tra i parametri diagnostici FTAM e i codici di risposta FTP equivalenti. Il supporto di questi mapping da parte del gateway è raccomandato, ma non obbligatorio. Come indicato in precedenza, il tipo 0 è un tipo di errore informativo che può essere restituito con un risultato di azione "Success", il tipo 1 è un tipo di errore temporaneo e il tipo 2 è un tipo di errore permanente.

      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. Problema futuro di mapping​

In futuro, il parametro FTAM potrebbe essere utilizzato per scopi diversi dall'uso attuale di trasmettere l'indirizzo di destinazione finale nel servizio di gateway avviato da FTAM [NIST86]. Se ciò accadrà, l'indirizzo di destinazione dovrà essere trasmesso in un'altra posizione, ad esempio nella porzione "@host" di . Attualmente, la specifica del gateway FTP-FTAM consente entrambi i meccanismi per la memorizzazione dell'indirizzo di destinazione finale.

9.4. Gestione degli errori​

La soluzione minima accettabile per gli errori del servizio avviato da FTAM consiste nel convertire gli errori FTP in "Unrecoverable error" di FTAM e restituire la stringa diagnostica FTP nel campo FTAM . Analogamente, per gli errori del servizio avviato da FTP, la soluzione minima accettabile consiste nel restituire il codice di risposta 221, "Service closing control connection, Logged out if appropriate". Sebbene questa soluzione minima sia accettabile, l'approccio raccomandato per gli sviluppatori di gateway è implementare i mapping presentati nella Sezione 9.1, FTP Reply Codes to FTAM Parameters, e nella Sezione 9.2, FTAM Parameters to FTP Reply Codes.