As per Relevance of the word information, we have this rfc below:
Network Working Group D.
Request for Comments: 2204
Category: Informational September 1997
ODETTE File Transfer
Status of this
This memo provides information for the Internet community. It
not specify an Internet standard of any kind. Distribution of
memo is unlimited
This memo describes a file transfer protocol to facilitate
data interchange between trading partners
The protocol, denoted the ODETTE File Transfer Protocol,
both direct communication between installations and
communication via a third party clearing centre. It was developed
the Organisation for Data Exchange by Tele Transmission in Europe
facilitate communication within the European motor industry and
presented here to allow for wider use within the Internet community
Table of
1. Introduction 3
1.1 - Background 3
1.2 - Relationship to the original ODETTE Standard 3
1.3 - General Principles 3
1.4 - Structure 4
1.5 - Virtual Files 4
1.6 - Service Description 7
2. Network Service (TCP Transport Service) 7
2.1 - Introduction 7
2.2 - Service Primitives 7
2.3 - Port Assignment 9
3. File Transfer Service 9
3.1 - Model 10
3.2 - Session Setup 11
3.3 - File Transfer 13
3.4 - Session Take Down 16
3.5 - Service State Automata 19
Nash Informational [Page 1]
RFC 2204 ODETTE File Transfer Protocol September 1997
4. Protocol Specification 22
4.1 - Overview 22
4.2 - Start Session Phase 22
4.3 - Start File Phase 23
4.4 - Data Transfer Phase 26
4.5 - End File Phase 27
4.6 - End Session Phase 27
4.7 - Problem Handling 28
5. Commands and Formats 28
5.1 - Conventions 28
5.2 - Commands 29
5.3 - Command Formats 29
5.4 - Identification Code 45
6. ODETTE-FTP Data Exchange Buffer 46
6.1 - Overview 46
6.2 - Data Exchange Buffer Format 46
6.3 - Buffer Filling Rules 47
7. Stream Transmission Buffer (TCP only) 47
7.1 - Introduction 47
7.2 - Stream Transmission Header Format 49
8. Protocol State Machine 50
8.1 - ODETTE-FTP State Machine 50
8.2 - Error Handling 50
8.3 - States 51
8.4 - Input Events 53
8.5 - Output Events 54
8.6 - Local Variables 55
8.7 - Local Constants 55
8.8 - Session Connection State Table 56
8.9 - Error and Abort State Table 58
8.10 - Speaker State Table 1 59
8.11 - Speaker State Table 2 63
8.12 - Listener State Table 65
8.13 - Example 68
9. Security Considerations 68
Appendix A Virtual File Mapping Example 69
Appendix B ISO 646 Character Subset 72
Acknowledgements 73
References 73
ODETTE Address 74
Author's Address 74
Nash Informational [Page 2]
RFC 2204 ODETTE File Transfer Protocol September 1997
1.
1.1
The ODETTE File Transfer Protocol (ODETTE-FTP) was defined in 1986
working group four of the Organisation for Data Exchange by
Transmission in Europe (ODETTE) to address the electronic
interchange (EDI) requirements of the European automotive industry
It was designed in the spirit of the Open System
(OSI) model utilising the Network Service provided by the CCITT X25
recommendation
Over the last ten years ODETTE-FTP has been widely deployed
systems of all sizes from personal computers to large mainframes.
a result of the wide scale deployment of internet technology and
trend towards global business practices, ODETTE has decided to
the scope of it's file transfer protocol to allow the use of TCP/
and to make the protocol available to the Internet community
This memo describes the ODETTE-FTP protocol using the
Control Protocol for it's network service
1.2 Relationship to the original ODETTE
This memo is an interpretation of version 1.3 of the ODETTE
Transfer Protocol [OFTP]. In the event of any ambiguity between
document and the original ODETTE-FTP, the original shall
precedence
For ODETTE-FTP on TCP/IP the following sections have been added
respect to the original document
Section 2 - Network
Section 7 - Stream Transmission
Appendix A - Virtual File mapping
1.3 General
The aim of the ODETTE-FTP is to facilitate the transmission of a
between one or more locations in a way that is independent of
data communication network, system hardware and software environment
In designing and specifying the protocol, the following factors
considered
1. The possible differences of size and sophistication (file storage
small and large systems).
Nash Informational [Page 3]
RFC 2204 ODETTE File Transfer Protocol September 1997
2. The necessity to work with existing systems (reduce changes
existing products and allow easy implementation).
3. Systems of different ages
4. Systems of different manufactures
5. The potential for growth in sophistication (limit impact and
changes at other locations).
1.4
ODETTE-FTP is modelled on the OSI reference model. It is designed
use the Network Service provided by level 3 of the model and
a File Service to the users. Thus the protocol spans levels 4 to 7
of model
The description of the ODETTE-FTP contained in this memo is
related to the original 'X.25' specification of the protocol and
the spirit of the OSI model describes
1. A File Service provided to a user monitor
2. A protocol for the exchange of information between
ODETTE-FTP entities
A major consideration in adapting the protocol to use
Transmission Control Protocol (TCP) was the desire to make no
to the existing protocol by adding the functionality required
allow implementors to support internet communication with only
changes to existing ODETTE-FTP engines. To this end an
header has been added to the start of each exchange buffer to
the TCP byte stream to be broken up into the discrete
buffers expected by the ODETTE-FTP protocol
1.5 Virtual
Information is always exchanged between ODETTE-FTP entities in
standard representation called a Virtual File. This allows
transfer without regard for the nature of the communicating systems
The mapping of a file between a local and virtual representation
vary from system to system and is not defined here
Nash Informational [Page 4]
RFC 2204 ODETTE File Transfer Protocol September 1997
o---------
Site | Local |
A | File A |
o---------
|
o----------------------- Mapping A ------------------------
| | |
| o---------o |
| | Virtual | |
| | File | |
| o---------o |
| o------------------------------------------------o |
| | | |
| | ODETTE-FTP | |
| | | |
| o------------------------------------------------o |
| o---------o o---------o |
| | Virtual | | Virtual | |
| | File | | File | |
| o---------o o----+----o |
| | | |
o------ Mapping B ------------------------ Mapping C ------
| |
o---------o o----+----
| Local | Site Site | Local |
| File B | B C | File C |
o---------o o---------
A Virtual File is described by a set of attributes identifying
defining the data to be transferred. The main attributes are
1.5.1 Organisation
Logical records are presented one after another. The ODETTE-
must be aware of the record boundaries
1.5.2
Dataset
Dataset name of the Virtual File being transfered, assigned
bilateral agreement
Nash Informational [Page 5]
RFC 2204 ODETTE File Transfer Protocol September 1997
Time stamp (HHMMSS
A file qualifier indicating the time the Virtual File was
available for transmission
Date stamp (YYMMDD
A file qualifier indicating the date the Virtual File was
available for transmission
The Dataset Name, Date and Time attributes are assigned by a
File's Originator and are used to uniquely identify the file.
must not be changed by intermediate locations
The Date attribute represents the decade and year in a two
field. Since the ODETTE-FTP only uses this information to identify
particular Virtual File it will continue to operate correctly in
year 2000 and beyond
The User Monitor may use the Virtual File Date attribute in
processes involving date comparisons and calculations. Any such
falls outside the scope of this protocol and year 2000 handling is
local implementation issue
1.5.3 Record
Four record formats are defined
Fixed (F
Each record in the file has the same length
Variable (V
The records in the file can have different lengths
Unstructured (U
The file contains a stream of data. No structure is defined
Text File (T
A Text File is defined as a sequence of ASCII characters
containing no control characters except CR/LF which
lines. A line will not have more than 2048 characters
Nash Informational [Page 6]
RFC 2204 ODETTE File Transfer Protocol September 1997
1.5.4
ODETTE-FTP can negotiate the restart of an interrupted Virtual
transmission. Fixed and Variable format files are restarted
record boundaries. For Unstructured and Text files the
position is expressed as a file offset in 1K (1024 octet) blocks
The restart position is always calculated relative to the
File
1.6 Service
ODETTE-FTP provides a file transfer service to a user monitor and
turn uses the Internet transport layer stream service to
between peers
These services are specified in this memo using service
grouped into four classes as follows
Request (RQ) An entity asks the service to do some work
Indication (IND) A service informs an entity of an event
Response (RS) An entity responds to an event
Confirm (CF) A service informs an entity of the response
Services may be confirmed, using the request, indication,
and confirm primitives, or unconfirmed using just the request
indication primitives
2. Network Service (TCP Transport Service
2.1
ODETTE-FTP peer entities communicate with each other via the
Network Service or the Transmission Control Protocol
Service [TCP]. This is described by service primitives
request, indication, response and confirmation actions
For the internet environment, the service primitives mentioned
for the Network Service have to be mapped to the respective
Service primitives. This section describes the network
primitives used by ODETTE-FTP and their relationship to the
interface. In practice the local transport service
programming interface will be used to access the TCP service
2.2 Service
All Network primitives can be directly mapped to the
Transport primitives when using TCP
Nash Informational [Page 7]
RFC 2204 ODETTE File Transfer Protocol September 1997
2.2.1 Network
N_CON_RQ ------> N_CON_
N_CON_CF <------ N_CON_
This describes the setup of a connection. The requesting ODETTE-
peer uses the N_CON_RQ primitive to request an active OPEN of
connection to a peer ODETTE-FTP, the Responder, which has
requested a passive OPEN. The Responder is notified of the
connection via N_CON_IND and accepts it with N_CON_RS. The
is notified of the completion of it's OPEN request upon receipt
_CON_CF
Request Indication Response
---------------------------------------------------------------------
Dest addr ------> same same
2.2.2 Network
N_DATA_RQ ------> N_DATA_
Data exchange is an unconfirmed service. The Requester passes
for transmission to the network service via the N_DATA_RQ primitive
The Responder is notified of the availability of data via N_DATA_IND
In practice the notification and receipt of data may be combined
such as by the return from a blocking read from the network socket
Request
---------------------------------------------------------------------
Data ------------------>
2.2.3 Network
N_DISC_RQ ------> N_DISC_
An ODETTE-FTP requests the termination of a connection with
N_DISC_RQ service primitive. It's peer is notified of the CLOSE by
N_DISC_IND event. It is recognised that each peer must issue
N_DISC_RQ primitive to complete the TCP symmetric close procedure
Nash Informational [Page 8]
RFC 2204 ODETTE File Transfer Protocol September 1997
2.2.4 Network
------> N_RST_
An ODETTE-FTP entity is notified of a network error by a N_RST_
event. It should be noted that N_RST_IND would also be generated
a peer RESETTING the connection, but this is ignored here as N_RST_
is never sent to the Network Service by ODETTE-FTP
2.3 Port
A ODETTE-FTP requester will select a suitable local port
The responding ODETTE-FTP will listen for connections on
Port 3305, the service name is 'odette-ftp'.
3. File Transfer
The File Transfer Service describes the services offered by
ODETTE-FTP Entity to it's User Monitor. The implementation of
service primitives is a local matter
Nash Informational [Page 9]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.1
o-------------------o o-------------------
| | | |
| USER MONITOR | | USER MONITOR |
| | | |
o-------------------o o-------------------
| A |
...............|...|... FILE TRANSFER SERVICE ...|...|...............
| | | |
F_XXX_RQ/RS | | F_XXX_IND/CF F_XXX_RQ/RS | | F_XXX_IND/
V | V |
o-------------------o o-------------------
| |- - - - - - >| |
| ODETTE-FTP Entity | E-Buffer | ODETTE-FTP Entity |
| |< - - - - - -| |
o-------------------o o-------------------
| A |
N_XXX_RQ/RS | | N_XXX_IND/CF N_XXX_RQ/RS | | N_XXX_IND/
| | | |
...............|...|...... NETWORK SERVICE ......|...|...............
V | V |
o---------------------------------------------------------
| |
| N E T W O R K |
| |
o---------------------------------------------------------
Key: E-Buffer - Exchange
F_ - File Transfer Service
N_ - Network Service
Nash Informational [Page 10]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.2 Session
3.2.1 Session Connection
| |
F_CONNECT_RQ ---->|------------|----> F_CONNECT_
| |
F_CONNECT_CF <----|------------|<---- F_CONNECT_
| |
Request Indication Response
---------------------------------------------------------------------
called-address -> same --- ----
calling-address-> same --- ----
ID1 ------------> same ID2 ------------>
PSW1------------> same PSW2 ----------->
mode1 ----------> mode2 ----------> mode3 ---------->
restart1 -------> same -----------> restart2 ------->
---------------------------------------------------------------------
Specifies the file transfer capabilities of the entity sending
receiving a F_CONNECT primitive for the duration of the session
Value
Sender-Only The entity can only send files
Receiver-Only The entity can only receive files
Both The entity can both send and receive files
Negotiation
Sender-Only Not negotiable
Receiver-Only Not negotiable
Both Can be negotiated down to Sender-Only
Receiver-Only by the User Monitor or
ODETTE-FTP entity
Nash Informational [Page 11]
RFC 2204 ODETTE File Transfer Protocol September 1997
Request Indication Response
---------------------------------------------------------------------
Sender-only ----> Receiver-only --> Receiver-only --> Sender-
Receiver-only --> Sender-only ----> Sender-only ----> Receiver-
Both -----+-----> Both ----+------> Both ----------->
| or +------> Receiver-only --> Sender-
| or +------> Sender-only ----> Receiver-
|
or +-----> Receiver-only --> Receiver-only --> Sender-
or +-----> Sender-only ----> Sender-only ----> Receiver-
---------------------------------------------------------------------
Specifies the file transfer restart capabilities of the
Monitor
Value
Negotiation
Request Indication Response
---------------------------------------------------------------------
restart = Y ----> restart = Y --+-> restart = Y ----> restart =
or +-> restart = N ----> restart =
restart = N ----> restart = N ----> restart = N ----> restart =
---------------------------------------------------------------------
Nash Informational [Page 12]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.3 File
3.3.1 File
| |
F_START_FILE_RQ ---->|------------|----> F_START_FILE_
| |
F_START_FILE_CF(+|-) <----|------------|<---- F_START_FILE_RS(+|-)
| |
Parameters
Request Ind. RS(+) CF(+) RS(-) CF(-)
--------------------------------------------------------------------
file-name ----> same ---- ---- ---- ----
date-time ----> same ---- ---- ---- ----
destination---> same ---- ---- ---- ----
originator----> same ---- ---- ---- ----
rec-format----> same ---- ---- ---- ----
rec-size -----> same ---- ---- ---- ----
file-size-----> same ---- ---- ---- ----
restart-pos1--> same-> restart-pos2-> same ---- ----
---- ---- ---- ---- cause ------>
---- ---- ---- ---- retry-later->
--------------------------------------------------------------------
Notes
1. Retry-later has values "Y" or "N". 2. Cause is the reason
refusing the transfer (1,..,13,99). 3. Restart-pos1 not equal 0
only valid if restart has been
during initial negotiation
4. Restart-pos2 is less than or equal to restart-pos1.
3.3.2 Data
| |
F_DATA_RQ ---->|------------|----> F_DATA_
| |
Notes
1. The data format within a F_DATA primitive is locally defined
2. The File Transfer service may have to provide a flow
mechanism to regulate the flow of F_DATA primitives
Nash Informational [Page 13]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.3.3 File
| |
F_CLOSE_FILE_RQ --->|------------|----> F_CLOSE_FILE_
| |
F_CLOSE_FILE_CF(+|-) <---|------------|<---- F_CLOSE_FILE_RS(+|-)
| |
Request Ind RS(+) CF(+) RS(-) CF(-)
---------------------------------------------------------------------
rec-count ---> same ---- ---- ---- ----
unit-count --> same ---- ---- ---- ----
---- ---- Speaker=Y ---> Speaker=N ---- ----
---- ---- Speaker=N ---> Speaker=Y ---- ----
---- ---- ---- ---- cause --->
---------------------------------------------------------------------
In a positive Close File response (F_CLOSE_FILE_RS(+)) the
Speaker may either
1. Set Speaker to "Yes" and become the Speaker. 2. Set
to "No" and remain the Listener
The File Transfer service will ensure that the setting of the
parameter is consistent with the capabilities of the peer user
The turn is never exchanged in the case of a negative response
confirmation
Only the Speaker is allowed to issue F_XXX_FILE_RQ primitives
3.3.4 Exchanging the
3.3.4.1 Initial Turn (First Speaker
The Initiator becomes the first Speaker at the end of the
Setup (F_CONNECT_CF received by Initiator and F_CONNECT_RS sent
Responder).
3.3.4.2 Following
Rules
1. At each unsuccessful End of File the turn is not exchanged
2. At each successful End of File the turn is exchanged if
by the Listener
Nash Informational [Page 14]
RFC 2204 ODETTE File Transfer Protocol September 1997
- The current Listener receives F_CLOSE_FILE_
(Speaker = choice).
- If the Listener answers F_CLOSE_FILE_RS(Speaker = YES),
becomes Speaker, the Speaker receives F_CLOSE_FILE_CF (Speaker =
NO) and becomes Listener
- If the Listener answers F_CLOSE_FILE_RS(Speaker = NO),
remains Listener, and the Speaker receives F_CLOSE_FILE_
(Speaker = YES) and remains Speaker
3. The Speaker can issue a Change Direction request (F_CD_RQ)
become the Listener. The Listener receives a Change
indication (F_CD_IND) and becomes the Speaker
4. In order to prevent loops of F_CD_RQ/IND, it is an error to
F_CD_RQ immediately after having received a F_CD_IND
3.3.5 End to End
This service is initiated by the current Speaker (if there is no
transfer in progress) to send an End-to-End response from the
destination to the originator of a file
| |
F_EERP_RQ ---->|------------|----> F_EERP_
| |
Request
------------------------------------
filename ------->
date ----------->
time ----------->
destination ---->
originator ----->
------------------------------------
Relationship with Turn
- Only the Speaker may send an End to End Response request
- Invoking the EERP service does not change the turn
- If a F_CD_IND has been received just before F_EERP_RQ is issued
this results in leaving the special condition created by
reception of F_CD_IND; i.e. while it was possible to
F_RELEASE_RQ and not possible to issue F_CD_RQ just after
Nash Informational [Page 15]
RFC 2204 ODETTE File Transfer Protocol September 1997
reception of F_CD_IND, after having issued F_EERP_RQ the
Speaker status is entered again (F_CD_RQ valid, but F_RELEASE_
not valid).
3.4 Session Take
3.4.1 Normal
| |
F_RELEASE_RQ ---->|------------|----> F_RELEASE_
| |
Request
---------------------------------------------------------------------
reason = normal -------> ----
---------------------------------------------------------------------
The Release service can only be initiated by the Speaker
The Speaker can only issue a Release request (F_RELEASE_RQ)
after receiving an unsolicited Change Direction
(F_CD_IND). This ensures that the other partner doesn't want to
any more files in this session
Peer ODETTE-FTP entities action a normal session release
specifying Reason = Normal in an End Session (ESID) command
3.4.2 Abnormal
| |
F_RELEASE_RQ ---->|------------|----> F_ABORT_
| |
Request
---------------------------------------------------------------------
reason = error value --> same (or equivalent
AO (Abort Origin) = (L)ocal or (D)
---------------------------------------------------------------------
Abnormal session release can be initiated by either the Speaker
the Listener and also by the user or provider
Abnormal session release can occur at any time within the session
Nash Informational [Page 16]
RFC 2204 ODETTE File Transfer Protocol September 1997
Peer ODETTE-FTP entities action an abnormal session release
specifying Reason = Error-value in an End Session (ESID) command
The abnormal session release deals with the following types of error
1. The service provider will initiate an abnormal release in
following cases
1. Protocol error, 2. Failure of the Start Session (SSID
negotiation, 3. Command not recognised, 4. Exchange buffer
error, 5. Resources not available, 6. Other unspecified abort
(with "REASON" = unspecified).
2. The User Monitor will initiate an abnormal release in
following cases
1. Local site emergency close down, 2. Resources not available, 3.
Other unspecified abort code (with "REASON" = unspecified).
Other error types may be handled by an abort of the connection
3.4.3
| |
F_ABORT_RQ ---->|------------|----> F_ABORT_
| |
User Initiated
| |
F_ABORT_IND <----|------------|----> F_ABORT_
| |
Provider Initiated
Request
---------------------------------------------------------------------
-- R (Reason): specified or
-- AO (Abort Origin): (L)ocal or (D)
---------------------------------------------------------------------
The Abort service may be invoked by either entity at any time
The service provider may initiate an abort in case of
detection
Nash Informational [Page 17]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.4.4 Explanation of Session Take Down
User | OFTP | Network | OFTP |
---------------|------|----------------------|------|---------------
| | | |
1. Normal
F_RELEASE_RQ | | ESID(R=normal) | | F_RELEASE_
*--------------|-> ==|======================|=> --|-------------->
(R=normal) | | | |
2. User Initiated Abnormal
F_RELEASE_RQ | | ESID(R=error) | | F_ABORT_
*--------------|-> ==|======================|=> -|-------------->
(R=error value)| | | | (R=error,AO=D
User | OFTP | Network | OFTP |
---------------|------|----------------------|------|---------------
| | | |
3. Provider Initiated Abnormal
F_ABORT_IND | | ESID(R=error) | | F_ABORT_
<--------------|-* *=|======================|=> --|-------------->
| | | |
4. User Initiated Connection
F_ABORT_RQ | | N_DISC_RQ | | F_ABORT_
*--------------|-> --|--------->..----------|-> --|-------------->
| | N_DISC_IND | | (R=unsp.,AO=D
5. Provider Initiated Connection
F_ABORT_IND | | N_DISC_RQ | | F_ABORT_
<--------------|-* *-|--------->..----------|-> --|-------------->
(R=error,AO=L) | | N_DISC_IND | | (R=unsp.,AO=D
Key: * Origin of command
F_ ---> File Transfer Service
N_ ---> Network Service
===> ODETTE-FTP (OFTP) protocol
Nash Informational [Page 18]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.5 Service State
This state automata defines the service as viewed by the
Monitor. Events causing a state transition are shown in lower
and the resulting action in upper case where appropriate
3.5.1 Idle State
o------------
decision | | f_connect_
+-----------------| IDLE |-----------------+
| F_CONNECT_RQ | (0) | F_CONNECT_RS |
| o------------o |
V |
o-----------------o |
| | |
| I_WF_FCONNECTCF | |
| | |
o--------+--------o |
| |
| F_CONNECT_CF |
V
o-----------------o o-----------------
| | | |
| IDLE SPEAKER | | IDLE LISTENER |
| (1) | | (2) |
| See Speaker | | See Listener |
| State Diagram | | State Diagram |
| | | |
o-----------------o o-----------------
Nash Informational [Page 19]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.5.2 Speaker State
o-----------------o o-----------------
| IDLE LISTENER | | IDLE |
| CD_RQ just sent | | see (0) |
| see (3), Listen | | Idle |
| State Diagram | | State Diagram |
o-----------------o o-----------------
A
| |
decision decision
F_CD_RQ +----------------+ F_RELEASE_
| | F_EERP_RQ | |
o=================o | o-----------------
| |<-------------+ | IDLE SPEAKER |
| IDLE SPEAKER | | (4) |
| (1) | decision | CD_IND |
| |<-----------------------------| just received |
o=================o F_EERP_RQ o-----------------
A A | |
| | | decision and P1 decision and P1 |
| | +-----------------+ +---------------------+
| | F_START_FILE_RQ | | F_START_FILE_
| | V
| | o---------------
| | f_file_start_cf(-) | |
| +----------------------| OPENING |
| | |
| o---------------
| |
f_file_close_cf(-) f_start_file_cf(+)
and not P2 |
|
o---------------o o---------------
| | | |------------------+
| CLOSING | | DATA TRANSFER | record to send |
| | | |<-----------------+
o---------------o o---------------o F_DATA_
| A |
| | end of file |
| +-------------------+
| F_CLOSE_FILE_
| o-----------------
| f_close_file(+) and P2 | IDLE LISTENER |
+--------------------------------------------->| see (2), Listen |
| State Diagram |
Predicates: o-----------------
P1: Mode = Both or (Mode = Sender-Only
P2: Negative confirmation or (positive confirmation, Speaker = YES
Nash Informational [Page 20]
RFC 2204 ODETTE File Transfer Protocol September 1997
3.5.3 Listener State
o-----------------o o-----------------
| IDLE SPEAKER | | IDLE |
| CD_IND just | | |
| received see(4) | | see (0) |
| Speaker State | | Idle |
| Diagram | | State Diagram |
o-----------------o o-----------------
A
| |
decision f_eerp_ind
F_CD_IND +--------------+ F_RELEASE_
| | | |
o=================o | o-----------------
| |<-----------+ f_eerp_ind | |
| |<-----------------------------| IDLE LISTENER |
| IDLE LISTENER | | (3) |
| | f_start_file_ind | CD_RQ |
| (2) | and not p2 | just sent |
| |---------------------+ | |
o=================o F_START_FILE_RS(-) | o-----------------
A | A A | | |
| | | +-----------------------+ | |
| | | | |
| | | f_start_file_ind and not p2 | |
| | +--------------------------------------+ |
| | F_START_FILE_RS(-) |
| | |
| | f_start_file_ind f_start_file_ind |
| | and p2 and p2 |
| +-------------------------------+ +------------------+
| F_START_FILE_RS(+) | | F_START_FILE_RS(+)
| V
| o---------------
| f_close_file_ind and not p1 | DATA |-------------+
+------------------------------| TRANSFER | |
F_CLOSE_FILE_RS(-) | |<------------+
o---------------o F_DATA_
o---------------o |
| IDLE SPEAKER | f_close_file_ind and p1 |
| see (1), Spkr |<--------------------------+
| State Diagram | F_CLOSE_FILE_RS(+)
o---------------
Predicates
P1: (decision to send F_CLOSE_FILE_RS(+))
(decision to set Speaker = yes in F_CLOSE_FILE_RS(+))
P2: (decision to send F_START_FILE_RS(+))
Nash Informational [Page 21]
RFC 2204 ODETTE File Transfer Protocol September 1997
4. Protocol
4.1
The ODETTE-FTP protocol is divided into five operating phases
Start
Start
Data
End
End
After the End File phase an ODETTE-FTP entity may enter a new
File phase or terminate the session via the End Session phase
ODETTE-FTP peers communicate by sending and receiving messages
Exchange Buffers via the Network Service. Each Exchange
contains one of the following commands
SSRM Start Session Ready
SSID Start
SFID Start
SFPA Start File Positive
SFNA Start File Negative
DATA
CDT Set
EFID End
EFPA End File Positive
EFNA End File Negative
ESID End
CD Change
EERP End to End
RTR Ready To
The remainder of this section describes the protocol flows.
five details the command formats
4.2 Start Session
The Start Session phase is entered immediately after the
connection has been established
4.2.1 Entity
The ODETTE-FTP entity that took the initiative to establish
network connection becomes the Initiator. It's peer becomes
Responder
Nash Informational [Page 22]
RFC 2204 ODETTE File Transfer Protocol September 1997
4.2.2 Protocol
The first message must be sent by the Responder
1. Initiator <-------------SSRM -- Responder Ready
-- SSID ------------>
<------------ SSID --
4.3 Start File
4.3.1 Entity
The Initiator from the Start Session phase is designated the
while the Responder becomes the Listener. The roles are reversed
the Speaker sending a Change Direction command to the Listener
4.3.2 Protocol
1. Speaker -- SFID ------------> Listener Start
<------------ SFPA -- Answer
2. Speaker -- SFID ------------> Listener Start
<------------ SFNA -- Answer
Go To 1
Note: The User Monitor should take steps to prevent a
situation occurring
2. Speaker -- CD --------------> Listener Change
Listener <------------ EERP -- Speaker End to End
-- RTR -------------> Ready to
<------------ SFID -- Start
4.3.3 Restart
The Start File command includes a count allowing the restart of
interrupted transmission to be negotiated. If restart facilities
not available the restart count must be set to zero. The sender
start with the lowest record count + 1.
4.3.4 Broadcast
The destination in a Start File command can be specified as follows
1. An explicitly defined destination
Nash Informational [Page 23]
RFC 2204 ODETTE File Transfer Protocol September 1997
2. A group destination that allows an intermediate location
broadcast the Virtual File to multiple destinations
The Listener will send a negative answer to the Speaker when
destination is not known
4.3.5
The prioritisation of files for transmission is left to the
implementation. To allow some flexibility, a change
mechanism is available in the End File phase
4.3.6 End To End Response (EERP
The End to End Response (EERP) command notifies the originator of
Virtual File that it has been successfully delivered to it's
destination. This allows the originator to perform house
tasks such as deleting copies of the delivered data
A Response Command must be sent from the location performing
final processing or distribution of the data to the originator.
Response is mandatory and may be sent in the same or in
subsequent session
When an intermediate location broadcasts or distributes a
File it must receive a Response command from all the locations
which it forwarded the data before sending it's own Response.
ensures that the Response received by the Virtual File's
accounts for all the destination locations. An intermediate
therefore needs to track the status of files it processes over time
Example: Point to
Location A sends file Ba to Location B which will send an EERP
location A after it successfully receives the file
o----------o o-----------
| Loc. A |----------- S1 ---------->| Loc. B |
| | | |
| [Ba] |<---------- R2 -----------| [Ba] |
+----------o o-----------
Key
S - File Transfer R - Response EERP [Ba] - File for B from
Nash Informational [Page 24]
RFC 2204 ODETTE File Transfer Protocol September 1997
Example: Data
Location A sends a Virtual File containing data for distribution
locations B and C via clearing centres E1 and E2. Clearing centre E
must wait for a response from E2 (for file Ba) and location C
it sends it's response, R8, to location A. Clearing centre E2
only send response R7 to E1 when location B acknowledges file Ba
response R6.
o---------o o---------o o---------o o---------
| Loc. A |-- S1 ->| Loc. E1 |-- S2 ->| Loc. E2 |-- S5 ->| Loc. B |
| | | | | | | |
| [Ba,Ca] |<- R8 --| [Ba,Ca] |<- R7 --| [Ba] |<- R6 --| [Ba] |
o---------o o---------o o---------o o---------
A |
| | o---------
| +----- S3 ->| Loc. C |
| | |
+--------- R4 --| [Ca] |
o---------
Example: Data
Locations A and B send files Ca and Cb to clearing centre E1
forwards both files to location C in a single Virtual File. When
receives response R4 from C, clearing centre E1 sends response R5
location A and R6 to location B
o---------o o---------o o---------
| Loc. A |-- S1 ->| Loc. E1 |-- S3 ->| Loc. C |
| | | | | |
| [Ca] |<- R5 --| [Ca,Cb] |<- R4 --| [Ca,Cb] |
o---------o o---------o o---------
A |
o---------o | |
| Loc. B |-- S2 -----+ |
| | |
| [Cb] |<- R6 ---------+
o---------
4.3.7 Ready To Receive Command (RTR
In order to avoid congestion between two adjacent nodes caused by
continuous flow of EERP's, a Ready To Receive (RTR) command
provided. The RTR acts as an EERP acknowledgement for flow
but has no end-to-end significance
Nash Informational [Page 25]
RFC 2204 ODETTE File Transfer Protocol September 1997
Speaker -- EERP ------------> Listener End to End
<------------- RTR -- Ready to
-- EERP ------------> End to End
<------------- RTR -- Ready to
-- SFID ------------> Start
-- CD --------------> Exchange the
After sending an EERP, the Speaker must wait for an RTR
sending any other commands
4.4 Data Transfer
Virtual File data flows from the Speaker to the Listener during
Data Transfer phase which is entered after the Start File phase
4.4.1 Protocol
To avoid congestion at the protocol level a flow control mechanism
provided via the Credit (CDT) command
A Credit limit is negotiated in the Start Session phase,
represents the number of Data Exchange Buffers that the Speaker
send before it is obliged to wait for a Credit command from
Listener
The available credit is initially set to the negotiated value by
Start File positive answer, which acts as an implicit Credit command
The Speaker decreases the available credit count by one for each
buffer sent to the Listener
When the available credit is exhausted, the Speaker must wait for
Credit command from the Listener otherwise a protocol error
occur and the session will be aborted
The Listener should endeavour to send the Credit command
delay to prevent the Speaker blocking
1. Speaker -- SFID ------------> Listener Start
<------------ SFPA -- Answer
Nash Informational [Page 26]
RFC 2204 ODETTE File Transfer Protocol September 1997
2. If the Credit Value is set to 2
Speaker -- Data ------------> Listener Start
-- Data ------------>
<------------- CDT -- Set
-- Data ------------>
-- EFID ------------> End
4.5 End File
4.5.1 Protocol
The Speaker notifies the Listener that it has finished sending
Virtual File by sending an End File (EFID) command. The
replies with a positive or negative End File command and has
option to request a Change Direction command from the Speaker
1. Speaker -- EFID ------------> Listener End
<------------ EFPA -- Answer
2. Speaker -- EFID ------------> Listener End
<------------ EFPA -- Answer YES +
-- CD --------------> Change
Listener <------------ EERP -- Speaker End to End
-------------- RTR -> Ready to
Go to Start File
3. Speaker -- EFID ------------> Listener End
<------------ EFNA -- Answer
4.6 End Session
4.6.1 Protocol
The Speaker terminates the session by sending an End Session (ESID
command
1. Speaker -- EFID ------------> Listener End
<------------ EFPA -- Answer
-- CD --------------> Change
Listener <------------ ESID -- Speaker End
Nash Informational [Page 27]
RFC 2204 ODETTE File Transfer Protocol September 1997
4.7 Problem
Error detection and handling should be done as close as possible
the problem. This aids problem determination and correction.
layer of the reference model is responsible for it's own
handling
ODETTE-FTP can detect protocol errors through the construction
it's state machine, and uses activity timers to detect session
conditions. These mechanisms are separate from the End to
controls
4.7.1 Protocol
If a protocol error occurs the session will be terminated
application activity aborted. Both locations enter the IDLE state
4.7.2
To protect against application and network hang conditions ODETTE-
uses activity timers for all situations where a response is required
The timers and actions to be taken if they expire are described
section 8, the Protocol State Machine
4.7.3 Clearing
The use of clearing centres introduces the possibility of
occurring as a result of data processing activities within
centre. Such errors are not directly related to ODETTE-FTP or
communication network and are therefore outside the scope of
specification
5. Commands and
ODETTE-FTP entities communicate via Exchange Buffers. The
Exchange Buffers are described below. Virtual File data is
in Data Exchange Buffers which are described in Section 6.
5.1
5.1.1 Representation unit
The basic unit of information is an octet, containing eight bits
5.1.2 Values and Characters
The ISO 646 IRV 7-bit coded character set [ISO-646] is used to
constants and strings within command exchange buffers
Nash Informational [Page 28]
RFC 2204 ODETTE File Transfer Protocol September 1997
5.2
A Command Exchange Buffer contains a single command starting at
beginning of the buffer. Commands and data are never mixed within
Exchange Buffer. Each command has a fixed length and can not
compressed
Components
1. Command identifier
The first octet of an Exchange Buffer is the Command
and defines the format of the buffer
2. Parameter(s):
Command parameters are stored in fixed fields within a
Exchange Buffer. All values are required
5.3 Command
The ODETTE-FTP commands are described below using the
definitions
Position (Pos.)
Field offset within the command exchange buffer, relative to
zero origin
The name of the field
A description of the field
F - A field containing fixed values. All allowable values
the field are enumerated in the command definition
V - A field with variable values within a defined range.
example the SFIDFSIZ field may contain any integer
between 0000000 and 9999999.
X(n) - An alphanumeric field of length n octets
Nash Informational [Page 29]
RFC 2204 ODETTE File Transfer Protocol September 1997
9(n) - A numeric field of length n octets
All attributes are in character format
A String contains alphanumeric characters from the following set
The numerals: 0 to 9
The upper case letters: A to
The following special set: / - . & ( ) space
Space is not allowed as an embedded character
Numeric fields are always right justified and left padding
zeros must be done when needed
5.3.1 SSRM - Start Session Ready
o-------------------------------------------------------------------
| SSRM Start Session Ready Message |
| |
| Start Session Phase Initiator <---- Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SSRMCMD | SSRM Command, 'I' | F X(1) |
| 1 | SSRMMSG | Ready Message, 'ODETTE FTP READY ' | F X(17) |
| 18 | SSRMCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------
SSRMCMD Command Code
Value: 'I' SSRM Command identifier
SSRMMSG Ready Message String(17)
Value: 'ODETTE FTP READY '
SSRMCR Carriage Return
Value: Character with hex value '0D' or '8D'.
Nash Informational [Page 30]
RFC 2204 ODETTE File Transfer Protocol September 1997
5.3.2 SSID - Start
o-------------------------------------------------------------------
| SSID Start Session |
| |
| Start Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SSIDCMD | SSID Command 'X' | F X(1) |
| 1 | SSIDLEV | Protocol Release Level | F 9(1) |
| 2 | SSIDCODE | Initiator's Identification Code | V X(25) |
| 27 | SSIDPSWD | Initiator's Password | V X(8) |
| 35 | SSIDSDEB | Exchange Buffer Size | V 9(5) |
| 40 | SSIDSR | Send / Receive Capabilities (S/R/B) | F X(1) |
| 41 | SSIDCMPR | Compression Indicator (Y/N) | F X(1) |
| 42 | SSIDREST | Restart Indicator (Y/N) | F X(1) |
| 43 | SSIDSPEC | Special Logic Indicator (N) | F X(1) |
| 44 | SSIDCRED | Credit | V 9(3) |
| 47 | SSIDRSV1 | Reserved | F X(5) |
| 52 | SSIDUSER | User Data | V X(8) |
| 60 | SSIDCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------
SSIDCMD Command Code
Value: 'X' SSID Command identifier
SSIDLEV Protocol Release Level Numeric(1)
Value: '1' ODETTE-FTP protocol release level 1.
Future release levels will have higher numbers.
protocol release level is negotiable, with the lowest
being selected
SSIDCODE Initiator's Identification Code String(25)
Format: See Identification Code (Section 5.4)
Uniquely identifies the Initiator (sender)
in the ODETTE-FTP session
SSIDPSWD Password String(8)
Key to authenticate the sender. Assigned by
agreement
Nash Informational [Page 31]
RFC 2204 ODETTE File Transfer Protocol September 1997
SSIDSDEB Exchange Buffer Size Numeric(5)
Minimum: 128
Maximum: 99999
The length, in octets, of the largest Exchange Buffer
can be accepted by the location. The length includes
command octet but does not include the Stream
Header
After negotiation the smallest size will be selected
SSIDSR Send / Receive Capabilities
Value: 'S' Location can only send files
'R' Location can only receive files
'B' Location can both send and receive files
Sending and receiving will be serialised during
session, so parallel sessions will not take place
An error occurs if adjacent locations both specify the
or receive capability
SSIDCMPR Compression Indication
Value: 'Y' The location can handle compressed data
'N' The location can not handle compressed data
Compression is only used if supported by both locations
The compression mechanism is described in Section 6.2
SSIDREST Restart Indication
Value: 'Y' The location can handle the restart of a
transmitted file
'N' The location can not restart a file
SSIDSPEC Special Logic Indication
Value: 'N' Only valid value for TCP
The Special Logic extensions are only useful in an X.25
environment and are not supported for TCP/IP
Nash Informational [Page 32]
RFC 2204 ODETTE File Transfer Protocol September 1997
SSIDCRED Credit Numeric(3)
Maximum: 999
The number of consecutive Data Exchange Buffers sent by
Speaker before it must wait for a Credit (CDT) command
the Listener
The credit value is only applied to Data flow in the
Transfer phase
The Speaker's available credit is initialised to
when it receives a Start File Positive Answer (SFPA
command from the Listener. It is zeroed by the End
(EFID) command
After negotiation, the smallest size must be selected
the answer of the Responder, otherwise a protocol
will abort the session
Negotiation of the "credit-window-size" parameter
Window Size m -- SSID ------------>
<------------ SSID -- Window Size
(n less or equal m
Note: negotiated value will be "n".
SSIDRSV1 Reserved String(5)
This field is reserved for future use
SSIDUSER User Data String(8)
May be used by the ODETTE-FTP in any way. If unused
should be initialised to spaces. It is expected that
bilateral agreement exists as to the meaning of the data
SSIDCR Carriage Return
Value: Character with hex value '0D' or '8D'.
Nash Informational [Page 33]
RFC 2204 ODETTE File Transfer Protocol September 1997
5.3.3 SFID - Start
o-------------------------------------------------------------------
| SFID Start File |
| |
| Start File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFIDCMD | SFID Command, 'H' | F X(1) |
| 1 | SFIDDSN | Virtual File Dataset Name | V X(26) |
| 27 | SFIDRSV1 | Reserved | F X(9) |
| 36 | SFIDDATE | Virtual File Date stamp, (YYMMDD) | V X(6) |
| 42 | SFIDTIME | Virtual File Time stamp, (HHMMSS) | V X(6) |
| 48 | SFIDUSER | User Data | V X(8) |
| 56 | SFIDDEST | Destination | V X(25) |
| 81 | SFIDORIG | Originator | V X(25) |
| 106 | SFIDFMT | File Format, (F/V/U/T) | F X(1) |
| 107 | SFIDLRECL | Maximum Record Size | V 9(5) |
| 112 | SFIDFSIZ | File Size, 1K blocks | V 9(7) |
| 119 | SFIDREST | Restart Position | V 9(9) |
o-------------------------------------------------------------------
SFIDCMD Command Code
Value: 'H' SFID Command identifier
SFIDDSN Virtual File Dataset Name String(26)
Dataset name of the Virtual File being transferred
assigned by bilateral agreement
No general structure is defined for this attribute
See Virtual Files - Identification (Section 1.5.2)
SFIDRSV1 Reserved String(9)
This field is reserved for future use
SFIDDATE Virtual File Date stamp String(6)
Format: 'YYMMDD' 6 decimal digits representing the year,
and day respectively [ISO-8601].
Date stamp assigned by the Virtual File's
indicating when the file was made available
transmission
See Virtual Files - Identification (Section 1.5.2)
Nash Informational [Page 34]
RFC 2204 ODETTE File Transfer Protocol September 1997
SFIDTIME Virtual File Time stamp String(6)
Format: 'HHMMSS' 6 decimal digits representing hours,
and seconds respectively [ISO-8601].
Time stamp assigned by the Virtual File's
indicating when the file was made available
transmission
See Virtual Files - Identification (Section 1.5.2)
SFIDUSER User Data String(8)
May be used by the ODETTE-FTP in any way. If unused
should be initialised to spaces. It is expected that
bilateral agreement exists as to the meaning of the data
SFIDDEST Destination String(25)
Format: See Identification Code (Section 5.4)
The Final Recipient of the Virtual File
This is the location that will look into the Virtual
content and perform mapping functions. It is also
location that creates the End to End Response (EERP
command for the received file
SFIDORIG Originator String(25)
Format: See Identification Code (Section 5.4)
Originator of the Virtual File
It is the location that created (mapped) the data
transmission
SFIDFMT File Format
Value: 'F' Fixed format binary file
'V' Variable format binary file
'U' Unstructured binary file
'T'
Virtual File format. Used to calculate the
position. (Section 1.5.3)
Nash Informational [Page 35]
RFC 2204 ODETTE File Transfer Protocol September 1997
SFIDLRECL Maximum Record Size Numeric(5)
Maximum: 99999
Length in octets of the longest logical record which may
transferred to a location. Only user data is included
If SFIDFMT is 'T' or 'U' then this attribute must be set
'00000'.
SFIDFSIZ File Size Numeric(7)
Maximum: 9999999
Space in 1K (1024 octet) blocks required at the
location to store the Virtual File
This parameter is intended to provide only a good
of the Virtual File size
SFIDREST Restart Position Numeric(9)
Maximum: 999999999
Virtual File restart position
The count represents the
- Record Number if SSIDFMT is 'F' or 'V'.
- File offset in 1K (1024 octet) blocks if SSIDFMT
'U' or 'T'.
The count will express the transmitted user data (i.e
before compression, header not included).
After negotiation between adjacent locations
retransmission will start at the lowest value
5.3.4 SFPA - Start File Positive
o-------------------------------------------------------------------
| SFPA Start File Positive Answer |
| |
| Start File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFPACMD | SFPA Command, '2' | F X(1) |
| 1 | SFPAACNT | Answer Count | V 9(9) |
o-------------------------------------------------------------------
Nash Informational [Page 36]
RFC 2204 ODETTE File Transfer Protocol September 1997
SFPACMD Command Code
Value: '2' SFPA Command identifier
SFPAACNT Answer Count Numeric(9)
The Listener must enter a count lower or equal to
restart count specified by the Speaker in the Start
(SFID) command. The count expresses the received
data. If restart facilities are not available, a count
zero must be specified
5.3.5 SFNA - Start File Negative
o-------------------------------------------------------------------
| SFNA Start File Negative Answer |
| |
| Start File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFNACMD | SFNA Command, '3' | F X(1) |
| 1 | SFNAREAS | Answer Reason | F 9(2) |
| 3 | SFNARRTR | Retry Indicator, (Y/N) | F X(1) |
o-------------------------------------------------------------------
SFNACMD Command Code
Value: '3' SFNA Command identifier
SFNAREAS Answer Reason Numeric(2)
Value: '01' Invalid filename
'02' Invalid destination
'03' Invalid origin
'04' Storage record format not supported
'05' Maximum record length not supported
'06' File size is too big
'10' Invalid record count
'11' Invalid byte count
'12' Access method failure
'13' Duplicate file
'99' Unspecified reason
Reason why transmission can not proceed
Nash Informational [Page 37]
RFC 2204 ODETTE File Transfer Protocol September 1997
SFNARRTR Retry Indicator
Value: 'N' Transmission should not be retried
'Y' The transmission may be retried latter
This parameter is used to advise the Speaker if it
retry at a latter point in time due to a
condition at the Listener site, such as a lack of
space. It should be used in conjunction with the
Reason code (SFNAREAS).
An invalid file name error code may be the consequence of
problem in the mapping of the Virtual File on to a
file. Such problems cannot always be resolved immediately
It it therefore recommended that when a SFNA with Retry =
is received the User Monitor attempts to retransmit
relevant file in a subsequent session
5.3.6 DATA - Data Exchange
o-------------------------------------------------------------------
| DATA Data Exchange Buffer |
| |
| Data Transfer Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | DATACMD | DATA Command, 'D' | F X(1) |
| 1 | DATABUF | Data Exchange Buffer payload | V X(n) |
o-------------------------------------------------------------------
DATACMD Command Code
Value: 'D' DATA Command identifier
DATABUF Data Exchange Buffer payload String(n
Variable length buffer