transmission.
See Virtual Files - Identification (Section 1.5.2)
SFIDTIME Virtual File Time stamp String(6)
Format: 'HHMMSS' 6 decimal digits representing hours, minutes
and seconds respectively [ISO-8601].
Time stamp assigned by the Virtual File's Originator
indicating when the file was made available for
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 it
should be initialised to spaces. It is expected that a
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 File
content and perform mapping functions. It is also the
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 for
transmission.
SFIDFMT File Format Character
Value: 'F' Fixed format binary file.
'V' Variable format binary file.
'U' Unstructured binary file.
'T' Text
Virtual File format. Used to calculate the restart
position. (Section 1.5.3)
SFIDLRECL Maximum Record Size Numeric(5)
Maximum: 99999
Length in octets of the longest logical record which may be
transferred to a location. Only user data is included.
If SFIDFMT is 'T' or 'U' then this attribute must be set to
'00000'.
SFIDFSIZ File Size Numeric(7)
Maximum: 9999999
Space in 1K (1024 octet) blocks required at the Originator
location to store the Virtual File.
This parameter is intended to provide only a good estimate
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 is
'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 Answer
o-------------------------------------------------------------------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-------------------------------------------------------------------o
SFPACMD Command Code Character
Value: '2' SFPA Command identifier.
SFPAACNT Answer Count Numeric(9)
The Listener must enter a count lower or equal to the
restart count specified by the Speaker in the Start File
(SFID) command. The count expresses the received user
data. If restart facilities are not available, a count of
zero must be specified.
5.3.5 SFNA - Start File Negative Answer
o-------------------------------------------------------------------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-------------------------------------------------------------------o
SFNACMD Command Code Character
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.
SFNARRTR Retry Indicator Character
Value: 'N' Transmission should not be retried.
'Y' The transmission may be retried latter.
This parameter is used to advise the Speaker if it should
retry at a latter point in time due to a temporary
condition at the Listener site, such as a lack of storage
space. It should be used in conjunction with the Answer
Reason code (SFNAREAS).
An invalid file name error code may be the consequence of a
problem in the mapping of the Virtual File on to a real
file. Such problems cannot always be resolved immediately.
It it therefore recommended that when a SFNA with Retry = Y
is received the User Monitor attempts to retransmit the
relevant file in a subsequent session.
5.3.6 DATA - Data Exchange Buffer
o-------------------------------------------------------------------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-------------------------------------------------------------------o
DATACMD Command Code Character
Value: 'D' DATA Command identifier.
DATABUF Data Exchange Buffer payload String(n)
Variable length buffer containing the data payload. The
Data Exchange Buffer is described in Section 6.
5.3.7 CDT - Set Credit
o-------------------------------------------------------------------o
| CDT Set Credit |
| |
| Data Transfer Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | CDTCMD | CDT Command, 'C' | F X(1) |
| 1 | CDTRSV1 | Reserved | F X(2) |
o-------------------------------------------------------------------o
CDTCMD Command Code Character
Value: 'C' CDT Command identifier.
CDTRSV1 Reserved String(2)
This field is reserved for future use.
5.3.8 EFID - End File
o-------------------------------------------------------------------o
| EFID End File |
| |
| End File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFIDCMD | EFID Command, 'T' | F X(1) |
| 1 | EFIDRCNT | Record Count | V 9(9) |
| 10 | EFIDUCNT | Unit Count | V 9(12) |
o-------------------------------------------------------------------o
EFIDCMD Command Code Character
Value: 'T' EFID Command identifier.
EFIDRCNT Record Count Numeric(9)
Maximum: 999999999
For SSIDFMT 'F' or 'V' the exact record count.
For SSIDFMT 'U' or 'T' zeros.
The count will express the real size of the file (before
compression, header not included). The total count is
always used, even during restart processing.
EFIDUCNT Unit Count Numeric(12)
Maximum: 999999999999
Exact number of units (octets) transmitted.
The count will express the real size of the file. The
total count is always used, even during restart processing.
5.3.9 EFPA - End File Positive Answer
o-------------------------------------------------------------------o
| EFPA End File Positive Answer |
| |
| End File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFPACMD | EFPA Command, '4' | F X(1) |
| 1 | EFPACD | Change Direction Indicator, (Y/N) | F X(1) |
o-------------------------------------------------------------------o
EFPACMD Command Code Character
Value: '4' EFPA Command identifier.
EFPACD Change Direction Indicator Character
Value: 'N' Change direction not requested.
'Y' Change direction requested.
This parameter allows the Listener to request a Change
Direction (CD) command from the Speaker.
5.3.10 EFNA - End File Negative Answer
o-------------------------------------------------------------------o
| EFNA End File Negative Answer |
| |
| End File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFNACMD | EFNA Command, '5' | F X(1) |
| 1 | EFNAREAS | Answer Reason | F 9(2) |
o-------------------------------------------------------------------o
EFNACMD Command Code Character
Value: '5' EFNA Command identifier.
EFNAREAS 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.
5.3.11 ESID - End Session
o-------------------------------------------------------------------o
| ESID End Session |
| |
| End Session Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | ESIDCMD | ESID Command, 'F' | F X(1) |
| 1 | ESIDREAS | Reason Code | F 9(2) |
| 3 | ESIDCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------o
ESIDCMD Command Code Character
Value: 'F' ESID Command identifier.
ESIDREAS Reason Code Numeric(2)
Value '00' Normal session termination
'01' Command not recognised
An Exchange Buffer contains an invalid command code
(1st octet of the buffer).
'02' Protocol violation
An Exchange Buffer contains an invalid command for
the current state of the receiver.
'03' User code not known
A Start Session (SSID) command contains an unknown or
invalid Identification Code.
'04' Invalid password
A Start Session (SSID) command contained an invalid
password.
'05' Local site emergency close down
The local site has entered an emergency close down
mode. Communications are being forcibly terminated.
'06' Command contained invalid data
A field within a Command Exchange buffer contains
invalid data.
'07' Exchange Buffer size error
The length of the Exchange Buffer as determined by
the Stream Transmission Header is different to the
length implied by the Command Code.
'08' Resources not available
The request for connection has been denied due to a
resource shortage. The connection attempt should be
retried later.
'09' Time out
'10' Mode or capabilities incompatible
'99' Unspecified Abort code
An error was detected for which no specific code is
defined.
ESIDCR Carriage Return Character
Value: Character with hex value '0D' or '8D'.
5.3.12 CD - Change Direction
o-------------------------------------------------------------------o
| CD Change Direction |
| |
| Start File Phase Speaker ----> Listener |
| End File Phase Speaker ----> Listener |
| End Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | CDCMD | CD Command, 'R' | F X(1) |
o-------------------------------------------------------------------o
CDCMD Command Code Character
Value: 'R' CD Command identifier.
5.3.13 EERP - End to End Response
o-------------------------------------------------------------------o
| EERP End to End Response |
| |
| Start File Phase Speaker ----> Listener |
| End File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EERPCMD | EERP Command, 'E' | F X(1) |
| 1 | EERPDSN | Virtual File Dataset Name | V X(26) |
| 27 | EERPRSV1 | Reserved | F X(9) |
| 36 | EERPDATE | Virtual File Date stamp, (YYMMDD) | V X(6) |
| 42 | EERPTIME | Virtual File Time stamp, (HHMMSS) | V X(6) |
| 48 | EERPUSER | User Data | V X(8) |
| 56 | EERPDEST | Destination | V X(25) |
| 81 | EERPORIG | Originator | V X(25) |
o-------------------------------------------------------------------o
EERPCMD Command Code Character
Value: 'E' EERP Command identifier.
EERPDSN 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)
EERPRSV1 Reserved String(9)
This field is reserved for future use.
EERPDATE Virtual File Date stamp String(6)
Format: 'YYMMDD' 6 decimal digits representing the year, month
and day respectively [ISO-8601].
Date stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (Section 1.5.2)
EERPTIME Virtual File Time stamp String(6)
Format: 'HHMMSS' 6 decimal digits representing hours, minutes
and seconds respectively [ISO-8601].
Time stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (Section 1.5.2)
EERPUSER User Data String(8)
May be used by the ODETTE-FTP in any way. If unused it
should be initialised to spaces. It is expected that a
bilateral agreement exists as to the meaning of the data.
EERPDEST Destination String(25)
Format: See Identification Code (Section 5.4)
Originator of the Virtual File.
This is the location that created (mapped) the data for
transmission.
EERPORIG Originator String(25)
Format: See Identification Code (Section 5.4)
Final Recipient of the Virtual File.
This is the location that will look into the Virtual File
content and perform mapping functions. It is also the
location that creates the EERP for the received file.
5.3.14 RTR - Ready To Receive
o-------------------------------------------------------------------o
| RTR Ready To Receive |
| |
| Start File Phase Initiator <---- Responder |
| End File Phase Initiator <---- Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | RTRCMD | RTR Command, 'P' | F X(1) |
o-------------------------------------------------------------------o
RTRCMD Command Code Character
Value: 'P' RTR Command identifier.
5.4 Identification Code
The Initiator (sender) and Responder (receiver) participating in an
ODETTE-FTP session are uniquely identified by an Identification Code
based on [ISO 6523], Structure for the Identification of
Organisations (SIO). The locations are considered to be adjacent for
the duration of the transmission.
The SIO has the following format.
o-------------------------------------------------------------------o
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SIOOID | ODETTE Identifier | F X(1) |
| 1 | SIOICD | International Code Designator | V 9(4) |
| 5 | SIOORG | Organisation Code | V X(14) |
| 19 | SIOCSA | Computer Sub-Address | V X(6) |
o-------------------------------------------------------------------o
SIOOID ODETTE Identifier Character
Value: 'O' Indicates ODETTE assigned Organisation Identifier.
Other values may be used for non-ODETTE codes.
SIOICD International Code Designator String(4)
A code forming part of the Organisation Identifier.
SIOORG Organisation Code String(14)
A code forming part of the Organisation Identifier. This
field may contain the letters A to Z, the digits 0 to 9,
apace and hyphen characters.
SIOCSA Computer Sub-Address String(6)
A locally assigned address which uniquely identifies a
system within an organisation (defined by an Organisation
Identifier).
6. ODETTE-FTP Data Exchange Buffer
6.1 Overview
Virtual Files are transmitted by mapping the Virtual File records
into Data Exchange Buffers, the maximum length of which was
negotiated between the ODETTE-FTP entities via the Start Session
(SSID) commands exchanged during the Start Session Phase of the
protocol. The format is based on the Network Independent File
Transfer Protocol [NIFTP].
Virtual File records may be of arbitrary length. A simple
compression scheme is defined for strings of repeated characters.
An example of the use of the Data Exchange Buffer can be found in
Appendix A.
6.2 Data Exchange Buffer Format
For transmission of Virtual File records, data is divided into
Subrecords, each of which is preceded by a one octet Subrecord
Header.
The Data Exchange Buffer is made up of the initial Command character,
o--------------------------------------------------------
| C | H | | H | | H | | /
| M | D | SUBRECORD | D | SUBRECORD | D | SUBRECORD | /_
| D | R | | R | | R | | /
o-------------------------------------------------------
CMD
The Data Exchange Buffer Command Character, 'D'.
HDR
A one octet Subrecord Header defined as follows:
0 1 2 3 4 5 6 7
o-------------------------------o
| E | C | |
| o | F | C O U N T |
| R | | |
o-------------------------------o
Bits
0 End of Record Flag
Set to indicate that the next subrecord is the last
subrecord of the current record.
Unstructured files are transmitted as a single record, in
this case the flag acts as an end of file marker.
1 Compression Flag
Set to indicate that the next subrecord is compressed.
2-7 Subrecord Count
The number of octets in the Virtual File represented by the
next subrecord expressed as a binary value.
For uncompressed data this is simply the length of the
subrecord.
For compressed data this is the number of times that the
single octet in the following subrecord must be inserted in
the Virtual File.
As six bits are available, the next subrecord may
represent between 0 and 63 octets of the Virtual File.
6.3 Buffer Filling Rules
An Exchange Buffer may be any length up to the value negotiated in
the Start Session exchange.
Virtual File records may be concatenated within one Exchange Buffer
or split across a number of buffers.
A subrecord is never split between two Exchange Buffers. If the
remaining space in the current Exchange Buffer is insufficient to
contain the next 'complete' subrecord one of the following strategies
should be used:
1. Truncate the Exchange Buffer, and put the complete
subrecord (preceded by its header octet) in a new Exchange Buffer.
2. Split the subrecord into two, filling the remainder of the
Exchange Buffer with the first new subrecord and starting a new
Exchange Buffer with the second.
A record of length zero may appear anywhere in the Exchange Buffer.
A subrecord of length zero may appear anywhere in the record and/or
the Exchange Buffer.
7. Stream Transmission Buffer (TCP only)
7.1 Introduction
The ODETTE-FTP was originally designed to utilise the ISO Network
Service, specifically the X.25 specification. It relies on the fact
that the network service will preserve the sequence and boundaries of
data units transmitted through the network and that the network
service will pass the length of the data unit to the receiving
ODETTE-FTP. The TCP offers a stream based connection which does not
provide these functions.
In order to utilise the TCP stream without disruption to the existing
ODETTE-FTP a Stream Transmission Buffer (STB) is created by adding a
Stream Transmission Header (STH) to the start of all Command and Data
Exchange Buffers before they are passed to the TCP transport service.
This allows the receiving ODETTE-FTP to recover the original Exchange
Buffers.
STH - Stream Transmission Header
OEB - ODETTE-FTP Exchange Buffer
The Stream Transmission Buffer comprises of a STH and OEB.
o-----+-----------------+-----+--------------------+-----+------
| STH | OEB | STH | OEB | STH | OEB/
o-----+-----------------+-----+--------------------+-----+----
7.2 Stream Transmission Header Format
The Stream Transmission Header is shown below. The fields are
transmitted from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Flags | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version
Value: 0001 (binary)
Stream Transmission Header version number.
Flags
Value: 0000 (binary)
Reserved for future use.
Length
Range: 5 - 100003 (decimal)
The length of the Stream Transmission Buffer (STH+OEB).
The smallest STB is 5 octets consisting of a 4 octet header
followed by a 1 octet Exchange Buffer such as a Change Direction
(CD) command.
The maximum Exchange Buffer length that can be negotiated is 99999
octets (Section 5.3.2) giving a STB length of 100003.
The length is expressed as a binary number with the most
significant bit on the left.
It is expected that implementations of this protocol will follow the
Internet robustness principle of being conservative in what is sent
and liberal in what is accepted.
8. Protocol State Machine
8.1 ODETTE-FTP State Machine
The operation of an ODETTE-FTP entity is formally defined by the
State Machine presented below. There are five State and Transition
tables and for each table additional information is given in the
associated Predicate and Action lists.
The response of an ODETTE-FTP entity to the receipt of an event is
defined by a Transition table entry indexed by the Event/State
intersection within the appropriate State table.
Each Transition table entry defines the actions taken, events
generated and new state entered. Predicates may be used within a
table entry to select the correct response on the basis of local
information held by the entity.
A transition table contains the following fields:
Index(I) State transition index.
Predicate A list of predicates used to select between different
possible transitions. The predicates are defined in the
Predicate and Action list.
Actions A list of actions taken by the entity. The actions are
defined in the Predicate and Action list.
Events Output events generated by the entity
Next State The new state of the entity.
8.2 Error Handling
The receipt of an event in a given state may be invalid for three
reasons.
1. The case is impossible by construction of the state automata,
denoted 'X' in the State tables. For example a timer which has
not been set cannot run out.
2. The event is the result of an error in the Network Service
implementation, also denoted 'X' in the state tables. The
Network Service implementation is considered to be correct.
3. For all other cases the event is considered to be a User Error,
denoted "U" in the state tables.
The State tables define the conditions under which a User event is
valid, thus preventing the generation of a protocol error by the
ODETTE-FTP entity as a result of a User Monitor error. The reaction
of the entity to such errors is undefined and regarded as a local
implementation issue.
The State tables also allow protocol errors due to the receipt of
invalid Exchange Buffers, to be detected. In such cases the reaction
of the entity to the error is defined.
8.3 States
The Command Mode is strictly a Half Duplex Flip-Flop Mode.
A_NC_ONLY Responder, Network Connection opened
The Responder has sent it's Ready Message (SSRM) and is
waiting for Start Session (SSID) from the Initiator.
A_WF_CONRS Responder Waiting for F_CONNECT_RS
The Responder has received the Initiator's Start Session
(SSID) and is waiting for a response (F_CONNECT_RS) from
it's User Monitor.
CDSTWFCD CD_RQ stored in WF_CD state
Since the User Monitor doesn't see the WF_CD state it may
send a Change Direction request (F_CD_RQ) before the
ODETTE-FTP receives a Change Direction (CD) command.
CLIP Close Input Pending
The Listener has received an End File (EFID) command and
is waiting for the Close File response (F_CLOSE_FILE_RS)
from it's User Monitor.
CLOP Close Out Pending
The Speaker has sent an End File (EFID) command and is
waiting for an End File Answer (EFPA or EFNA).
ERSTWFCD End to End Response stored in WF_CD state
Since the User Monitor doesn't see the WF_CD state it may
send F_EERP_RQ, before the ODETTE-FTP receives a Change
Direction (CD) command.
IDLE Connection IDLE
IDLELI Idle Listener
IDLELICD Idle Listener, F_CD_RQ Received
The ODETTE-FTP entity has become the Listener after
receiving a Change Direction request (F_CD_RQ) from the
User Monitor. The receipt of an End Session (ESID) is
valid in this state.
IDLESP Idle Speaker
IDLESPCD Idle Speaker, F_CD_IND Sent
The ODETTE-FTP entity has sent a Change Direction
indication (F_CD_IND) to the User Monitor. A Change
Direction request (F_CD_RQ) is invalid in this state.
I_WF_NC Initiator Waiting for Network Connection
The Initiator has requested a new network connection and
is waiting for a Connection confirmation (N_CON_CF) from
the Network Service.
I_WF_RM Initiator Waiting for Ready Message
Before sending Start Session (SSID), the Initiator must
wait for a Ready Message (SSRM) from the Responder.
I_WF_SSID Initiator Waiting for SSID
The Initiator has sent a Start Session (SSID) command and
is waiting for Start Session from the Responder.
OPI Open Input (Data Transfer Phase)
The Listener is waiting for the Speaker to send a Data
Exchange buffer.
OPIP Open Input Pending
The Listener has received a Start File (SFID) command and
is waiting for the Start File response (F_START_FILE_RS)
from it's User Monitor.
OPO Open Out (Data Transfer Phase)
The Speaker has received a Start File Positive Answer
(SFPA) and is waiting for a Data (F_DATA_RQ) or Close
File (F_CLOSE_FILE) request from it's User Monitor.
OPOP Open Out Pending
The Speaker has sent a Start File (SFID) command and is
waiting for a Start File Answer (SFPA or SFNA).
OPOWFC Open Out Wait for Credit
The Speaker is waiting for a Set Credit (CDT) command
before sending further Data Exchange buffers.
SFSTWFCD Start File Request stored in WF_CD state.
Since the User Monitor doesn't see the WF_CD state it may
send a Start File request (F_START_FILE_RQ) before the
ODETTE-FTP receives a Change Direction (CD) command.
WF_CD Wait for Change Direction
The Listener wishes to become the Speaker and is waiting
for a Change Direction (CD) command after sending an End
File Positive Answer (EFPA) requesting change direction.
WF_RTR Wait for Ready To Receive
The Initiator has sent an End to End Response (EERP)
command and must wait for Ready To Receive (RTR) from the
Responder.
WF_NDISC Wait for N_DISC_IND
ODETTE-FTP has sent an End Session (ESID) command and is
waiting for a Disconnection indication (N_DISC_IND) from
the Network Service.
8.4 Input Events
User Monitor Input Events (Section 3)
F_DATA_RQ F_CONNECT_RQ F_START_FILE_RQ F_CLOSE_FILE_RQ
F_EERP_RQ F_CONNECT_RS F_START_FILE_RS(+) F_CLOSE_FILE_RS(+)
F_CD_RQ F_ABORT_RQ F_START_FILE_RS(-) F_CLOSE_FILE_RS(-)
F_RELEASE_RQ
Network Input Events (Section 2.2)
N_CON_IND N_CON_CF N_DATA_IND N_DISC_IND N_RST_IND
Peer ODETTE-FTP Input Events (Section 4)
SSID SFID SFPA SFNA EFID EFPA EFNA
DATA ESID EERP RTR CD CDT SSRM
Internal Input Events
TIME-OUT - Internal ODETTE-FTP timer expires.
Input event parameters are denoted I.Event-name.Parameter-name within
the state table action and predicate lists. Their value can be
examined but not changed by the ODETTE-FTP entity.
8.5 Output Events
User Monitor Output Events (Section 3)
F_DATA_IND F_CONNECT_IND F_START_FILE_IND F_CLOSE_FILE_IND
F_EERP_IND F_CONNECT_CF F_START_FILE_CF(+) F_CLOSE_FILE_CF(+)
F_CD_IND F_ABORT_IND F_START_FILE_CF(-) F_CLOSE_FILE_CF(-)
F_RELEASE_IND
Network Output Events (Section 2.2)
N_CON_RQ N_CON_RS N_DATA_RQ N_DISC_RQ
Peer ODETTE-FTP Output Events (Section 4)
SSID SFID SFPA SFNA EFID EFPA EFNA
DATA ESID EERP RTR CD CDT SSRM
Output event parameters are denoted O.Event-name.Parameter-name
within the state table action and predicate lists. Their values can
be examined and changed by the ODETTE-FTP entity.
8.6 Local Variables
The following variables are maintained by the ODETTE-FTP entity to
assist the operation of the protocol. They are denoted V.Variable-
name within the state table action and predicate lists. Their value
can be examined and changed by the ODETTE-FTP entity. The initial
value of each variable is undefined.
Variable Type Comments
---------------------------------------------------------------------
Buf-size Integer Negotiated Exchange Buffer size.
Called-addr Address Used to build O.F_CONNECT_IND.Called-addr
Calling-addr Address To build O.F_CONNECT_IND.Calling-addr
Compression Yes/No Compression in used as agreed.
Credit_L Integer Listeners credit counter.
Credit_S Integer Speaker's credit counter.
Id String Used to build O.SSID.Id
Mode Sender-only, Receiver-only, Both.
Pswd String Password, used to build O.SSID.Pswd
Req-buf Primitive Input event (F_XXX_RQ) stored in WF_CD state.
Restart Yes/No Restart in used as agreed.
Restart-pos Integer Used only during file opening.
Window Integer The Credit value negotiated for the session.
---------------------------------------------------------------------
8.7 Local Constants
The following constants define the capabilities of a given ODETTE-FTP
entity. They are denoted C.Constant-name within the state table
action and predicate lists. Their value can be examined but not
changed by the ODETTE-FTP entity.
Constant Value Comments
---------------------------------------------------------------------
Cap-compression Yes/No Compression supported?
Cap-init Initiator Must be Initiator.
Responder Must be Responder.
Both Can be Initiator or Responder.
Cap-mode Sender-only Must be sender.
Receiver-only Must be receiver.
Both Can be sender or receiver.
Max-buf-size 127 < Int < 100000 Maximum buffer size supported.
Max-window Int < 1000 Local maximum credit value.
---------------------------------------------------------------------
8.8 Session Connection State Table
8.8.1 State Table
o----------------------------------------------o
| | Other States |
| |--------------------------------------o |
| S | A_WF_CONRS | |
| |----------------------------------o | |
| T | A_NC_ONLY | | |
| |------------------------------o | | |
| A | I_WF_SSID | | | |
| |--------------------------o | | | |
| T | I_WF_RM | | | | |
| |----------------------o | | | | |
| E | I_WF_NC | | | | | |
| |------------------o | | | | | |
| | IDLE | | | | | | |
|==================o---+---+---+---+---+---+---|
| | F_CONNECT_RQ | A | X | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---|
| E | N_CON_CF | X | C | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---|
| V | SSRM | X | X | H | X | X | X | X |
| |--------------+---+---+---+---+---+---+---|
| E | SSID | X | X | X | D | E | F | F |
| |--------------+---+---+---+---+---+---+---|
| N | N_CON_IND | B | X | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---|
| T | F_CONNECT_RS | X | U | U | U | U | G | U |
| |--------------+---+---+---+---+---+---+---|
| | ESID(R=10) | X | X | X | F | X | X | X |
o----------------------------------------------o
8.8.2 Transition Table
I | Predicate Actions Output Events Next State
===o=================================================================
A | P1: F_ABORT_IND IDLE
| not P1: 1 N_CON_RQ I_WF_NC
---+-----------------------------------------------------------------
B | P3: N_DISC_RQ IDLE
| not P3: N_CON_RS
| SSRM A_NC_ONLY
---+-----------------------------------------------------------------
C | 2 I_WF_RM
---+-----------------------------------------------------------------
D | P2: 4,2,5 F_CONNECT_CF IDLESP
| not P2: 4,2 ESID(R=10)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
E | P4: 4 N_DISC_RQ IDLE
| not P4: F_CONNECT_IND A_WF_CONRS
---+-----------------------------------------------------------------
F | F_ABORT_IND
| N_DISC_RQ IDLE
---+-----------------------------------------------------------------
G | P2: 4,2,5 SSID IDLELI
| not P2: 4,2 ESID(R=10)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
H | 4,2,3 SSID I_WF_SSID
---------------------------------------------------------------------
8.8.3 Predicates and Actions.
Predicate P1: (No resources available) OR
(C.Cap-init = Responder) OR
(C.Cap-mode = Sender-only AND
I.F_CONNECT_RQ.Mode = Receiver-only) OR
(C.Cap-mode = Receiver-only AND
I.F_CONNECT_RQ.Mode = Sender-only)
Predicate P2: Negotiation of (Buf-size, Restart, Compression,
Mode, Credit) is OK.
Predicate P3: C.Cap-init = Initiator
Predicate P4: Mode in SSID incompatible with C.Cap-mode
Action 1: Set V.Mode from (C.Cap-mode, I.F_CONNECT_RQ.Mode)
Set V.Pswd, V.Id, V.Restart from I.F_CONNECT_RQ
Set V.Buf-size = C.Max-buf-size
Set V.Compression = C.Cap-compression
Build O.N_CON_RQ
Action 2: Start inactivity timer
Action 3: Set parameters in O.SSID = from local variables
Action 4: Stop timer
Action 5: Set V.Mode, V.Restart, V.Compression, V.Buf-size,
V.Window = from SSID
8.9 Error and Abort State Table
8.9.1 State Table
o--------------------------------------o
| | Other States |
| S |------------------------------o |
| T | WF_NDISC | |
| A |--------------------------o | |
| T | I_WF_NC | | |
| E |----------------------o | | |
| | IDLE | | | |
|======================o---+---+---+---|
| | TIME-OUT | X | X | A | B |
| |------------------+---+---+---+---|
| E | F_ABORT_RQ | X | A | X | C |
| V |------------------+---+---+---+---|
| E | N_RST_IND | X | X | A | D |
| N |------------------+---+---+---+---|
| T | N_DISC_IND | X | E | F | G |
| |------------------+---+---+---+---|
| | Invalid Buffer | X | X | H | I |
o--------------------------------------o
8.9.2 Transition Table
I | Predicate Actions Output Events Next State
===o=================================================================
A | N_DISC_RQ IDLE
---+-----------------------------------------------------------------
B | F_ABORT_IND
| N_DISC_RQ IDLE
---+-----------------------------------------------------------------
C | 1 N_DISC_RQ IDLE
---+-----------------------------------------------------------------
D | 1 N_DISC_RQ
| F_ABORT_IND IDLE
---+-----------------------------------------------------------------
E | F_ABORT_IND IDLE
---+-----------------------------------------------------------------
F | 1 IDLE
---+-----------------------------------------------------------------
G | 1 F_ABORT_IND IDLE
---+-----------------------------------------------------------------
H | WF_NDISC
---+-----------------------------------------------------------------
I | 1,2 ESID(R=01)
| F_ABORT_IND(R,AO=L) WF_NDISC
---------------------------------------------------------------------
8.9.3 Predicates and Actions.
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
8.10 Speaker State Table 1
8.10.1 State Table
The following abbreviations are used in the Speaker State table.
F_REL_RQ(Ok) - F_RELEASE_RQ Reason = Normal
F_REL_RQ(Err) - F_RELEASE_RQ Reason = Error
o------------------------------------------------------------------o
| | Other State |
| |----------------------------------------------------------o |
| | WF_NDISC | |
| |------------------------------------------------------o | |
| | OPOWFC | | |
| |--------------------------------------------------o | | |
| | OPO | | | |
| S |----------------------------------------------o | | | |
| | OPOP | | | | |
| T |------------------------------------------o | | | | |
| | CDSTWFCD | | | | | |
| A |--------------------------------------o | | | | | |
| | SFSTWFCD | | | | | | |
| T |----------------------------------o | | | | | | |
| | ERSTWFCD | | | | | | | |
| E |------------------------------o | | | | | | | |
| | WF_CD | | | | | | | | |
| |--------------------------o | | | | | | | | |
| | WF_RTR | | | | | | | | | |
| |----------------------o | | | | | | | | | |
| | IDLESPCD | | | | | | | | | | |
| |------------------o | | | | | | | | | | |
| | IDLESP | | | | | | | | | | | |
|===+==============o---+---+---+---+---+---+---+---+---+---+---+---|
| | F_EERP_RQ | A | A | W | F | W | U | U | U | U | U | U | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_START_ | B | B | W | G | W | U | U | U | U | U | X | U |
| | FILE_RQ | | | | | | | | | | | | |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| | SFPA | C | C | C | C | C | C | C | K | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| E | SFNA | C | C | C | C | C | C | C | L | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| V | CD | C | C | C | H | R | I | J | C | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| E | F_DATA_RQ | U | U | U | U | U | U | U | U | M | V | S | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| N | CDT | C | C | C | C | C | C | C | C | P | O | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| T | F_CD_RQ | D | U | W | T | W | U | U | U | U | U | X | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_REL_RQ(Ok) | U | E | U | U | U | U | U | U | U | U | X | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_REL_RQ(Err)| Q | Q | Q | Q | Q | Q | Q | Q | Q | Q | S | Q |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---|
| | RTR | C | C | N | C | C | C | C | C | C | C | S | C |
o------------------------------------------------------------------o
8.10.2 Transition Table
I | Predicate Actions Output Events Next State
===o=================================================================
A | 1,2,3 EERP WF_RTR
---+-----------------------------------------------------------------
B | P1: UE
| not P1: 1,2,5 SFID OPOP
---+-----------------------------------------------------------------
C | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
D | 1,2 CD IDLELICD
---+-----------------------------------------------------------------
E | 1,2 ESID(R=00) WF_NDISC
---+-----------------------------------------------------------------
F | 4 ERSTWFCD
---+-----------------------------------------------------------------
G | P1: UE
| not P1: 6 SFSTWFCD
---+-----------------------------------------------------------------
H | 1,2 IDLESP
---+-----------------------------------------------------------------
I | 1,2,10 SFID OPOP
---+-----------------------------------------------------------------
J | 1,2 CD IDLELICD
---+-----------------------------------------------------------------
K | P2: 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
| not P2: 1,2,7,12 F_START_FILE_CF(+) OPO
---+-----------------------------------------------------------------
L | 1,2,8 F_START_FILE_CF(-) IDLESP
---+-----------------------------------------------------------------
M | P3: 1,2,11,13 DATA OPOWFC
| not P3: 1,2,11,13 DATA OPO
---+-----------------------------------------------------------------
N | Note 3 IDLESP
---+-----------------------------------------------------------------
O | 12 OPO
| See Note 1
---+-----------------------------------------------------------------
P | Protocol 1,2 ESID(R=02)
| Error F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
Q | 1,2 ESID(R) WF_NDISC
---+-----------------------------------------------------------------
Continued -->
I | Predicate Actions Output Events Next State
===o=================================================================
R | 1,2,9 EERP WF_RTR
---+-----------------------------------------------------------------
S | WF_NDISC
---+-----------------------------------------------------------------
T | CDSTWFCD
---+-----------------------------------------------------------------
U | User Error UE
---+-----------------------------------------------------------------
V | User Error - Note 1 UE
---+-----------------------------------------------------------------
W | User Error - Note 2 UE
---+-----------------------------------------------------------------
X | Error
---------------------------------------------------------------------
8.10.3 Predicates and Actions.
Predicate P1: (I.F_START_FILE_RQ.Restart-pos > 0) AND
((V.Restart = No) OR (V.Mode = Receiver-only))
Note: Restart requested and not supported for this session.
Predicate P2: (I.SFPA.Restart-pos > V.Restart-pos)
Note: Protocol error due to the restart position in the
SFPA acknowledgement being greater than the position
requested in the SFID request.
Predicate P3: V.Credit_S - 1 = 0
Note: Speaker's Credit is exhausted.
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
Action 3: Build an EERP from F_EERP_RQ
Action 4: Store F_EERP_RQ in V.Req-buf
Action 5: Build SFID from F_START_FILE_RQ
V.Restart-pos = I.F_START_FILE_RQ.Restart-pos
Action 6: Store F_START_FILE_RQ in V.Req-buf
Action 7: Build F_START_FILE_CF(+) from I.SFPA
Action 8: Build F_START_FILE_CF(-) from I.SFNA
Action 9: Build EERP from F_EERP_RQ stored in V.Req-buf
Action 10: Build SFID from F_START_FILE_RQ stored in V.Req-buf
Set V.Restart-pos
Action 11: Build Exchange Buffer
Action 12: V.Credit_S = V.Window
Action 13: V.Credit_S = V.Credit_S - 1
Note 1: The OPOWFC state prevents the Speaker from sending
data buffers because it is waiting for credit. The
ODETTE-FTP entity may need to control the flow of Data
requests (F_DATA_RQ) from it's User Monitor to protect
it's own buffers. Any such mechanism and the
behaviour of the entity should a User Error occur are
regarded as local implementation issues.
Note 2: The choice to accept this "Request/Event" while in
this state is a matter of local implementation. The
ODETTE state tables are based on the assumption that
this event cannot occur in this state and is
considered to be a user error (UE).
Note 3: It is a local matter to make the User Monitor aware
that since the RTR is received, the protocol machine
is now ready to accept the next request.
8.11 Speaker State Table 2
8.11.1 State Table
o---------------------------------o
| S | CLOP |
| T |-------------------------o |
| A | OPOWFC | |
| T |---------------------o | |
| E | OPO | | |
|=====================o---+---+---|
| E | F_CLOSE_FILE_RQ | A | E | U |
| V |-----------------+---+---+---|
| E | EFPA | B | B | C |
| N |-----------------+---+---+---|
| T | EFNA | B | B | D |
o---------------------------------o
8.11.2 Transition Table
I | Predicate Actions Output Events Next State
===o=================================================================
A | 1,2,5,7 EFID CLOP
---+-----------------------------------------------------------------
B | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
C | P1: 1,2,3 F_CLOSE_FILE_CF(+,SP=No)
| CD IDLELI
| not P1: 1,2,4 F_CLOSE_FILE_CF(+,SP=Yes) IDLESP
---+-----------------------------------------------------------------
D | 1,2,6 F_CLOSE_FILE_CF(-) IDLESP
---+-----------------------------------------------------------------
E | See Note 1
---+-----------------------------------------------------------------
U | User Error UE
---------------------------------------------------------------------
8.11.3 Predicates and Actions.
Predicate P1: (I.EFPA.CD-Request = Yes) AND (V.Mode = Both)
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
Action 3: O.F_CLOSE_FILE_CF(+).Speaker = No
Action 4: O.F_CLOSE_FILE_CF(+).Speaker = Yes
Action 5: Build EFID from F_CLOSE_FILE_RQ
Action 6: Build F_CLOSE_FILE_CF(-) from EFNA
Action 7: Set V.Credit_S = 0
Note 1: In order to respect the "half duplex" property of
ODETTE-FTP it is forbidden to send EFID while in the
OPOWFC state. EFID can be sent only in the OPO state.
The ODETTE-FTP implementation must avoid sending EFID
(or receiving F_CLOSE_FILE_RQ) while in the OPOWFC
state.
8.12 Listener State Table
8.12.1 State Table
o-----------------------------------------o
| | CLIP |
| |---------------------------------o |
| | OPI | |
| S |-----------------------------o | |
| T | OPIP | | |
| A |-------------------------o | | |
| T | IDLELICD | | | |
| E |---------------------o | | | |
| | IDLELI | | | | |
|=====================o---+---+---+---+---|
| | SFID | A | A | B | B | B |
| |-----------------+---+---+---+---+---|
| E | DATA | B | B | B | I | B |
| V |-----------------+---+---+---+---+---|
| E | EFID | B | B | B | J | B |
| N |-----------------+---+---+---+---+---|
| T | F_START_FILE_RS | U | U | H | U | U |
| |-----------------+---+---+---+---+---|
| | F_CLOSE_FILE_RS | U | U | U | U | K |
| |-----------------+---+---+---+---+---|
| | CD | C | B | B | B | B |
| |-----------------+---+---+---+---+---|
| | ESID R=Normal | D | F | D | D | D |
| |-----------------+---+---+---+---+---|
| | ESID R=Error | D | D | D | D | D |
| |-----------------+---+---+---+---+---|
| | EERP | E | G | B | B | B |
o-----------------------------------------o
8.12.2 Transition Table
I | Predicate Actions Output Events Next State
===o=================================================================
A | P1: 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
| not P1: 1,2,3 F_START_FILE_IND OPIP
---+-----------------------------------------------------------------
B | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
C | 1,2 F_CD_IND IDLESPCD
---+-----------------------------------------------------------------