idnits 2.17.1 draft-friend-oftp2-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 14. -- Found old boilerplate from RFC 3978, Section 5.5 on line 5917. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 5888. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 5895. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 5901. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 5943 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 4 instances of too long lines in the document, the longest one being 1 character in excess of 72. -- The draft header indicates that this document obsoletes RFC2204, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- The document has an RFC 3978 Section 5.2(a) Derivative Works Limitation clause. == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 1041 has weird spacing: '...ecision o----...' == Line 1070 has weird spacing: '...to send o---...' == Line 5860 has weird spacing: '... EMail info@...' == Line 5861 has weird spacing: '... Web www....' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 2006) is 6433 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'TCP' is mentioned on line 430, but not defined == Missing Reference: 'Ba' is mentioned on line 1362, but not defined == Missing Reference: 'Ca' is mentioned on line 1381, but not defined == Missing Reference: 'Cb' is mentioned on line 1387, but not defined == Unused Reference: 'RFC-739' is defined on line 5808, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 793 (ref. 'RFC-739') (Obsoleted by RFC 9293) -- Obsolete informational reference (is this intentional?): RFC 3850 (Obsoleted by RFC 5750) ** Obsolete normative reference: RFC 3852 (ref. 'CMS') (Obsoleted by RFC 5652) ** Obsolete normative reference: RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) Summary: 7 errors (**), 0 flaws (~~), 11 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Ieuan Friend 2 Internet-Draft ODETTE 3 Obsoletes: 2204 September 2006 4 Category: Informational 6 ODETTE File Transfer Protocol 2.0 7 draft-friend-oftp2-03 9 Status of this Memo 11 By submitting this Internet-Draft, each author represents that any 12 applicable patent or other IPR claims of which he or she is aware 13 have been or will be disclosed, and any of which he or she becomes 14 aware will be disclosed, in accordance with Section 6 of BCP 79. 16 This document may not be modified, and derivative works of it may 17 not be created, except to publish it as an RFC and to translate it 18 into languages other than English. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF), its areas, and its working groups. Note that 22 other groups may also distribute working documents as 23 Internet-Drafts. 25 Internet-Drafts are draft documents valid for a maximum of six 26 months and may be updated, replaced, or obsoleted by other documents 27 at any time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 The list of current Internet-Drafts can be accessed at 31 http://www.ietf.org/1id-abstracts.html 33 The list of Internet-Draft Shadow Directories can be accessed at 34 http://www.ietf.org/shadow.html 36 Copyright Notice 38 Copyright (C) The Internet Society (2006). 40 Abstract 42 This memo updates the ODETTE File Transfer Protocol, an established 43 file transfer protocol facilitating electronic data interchange 44 of business data between trading partners, to version 2.0. 46 The protocol now supports secure and authenticated communication 47 over the Internet using Transport Layer Security, provides file 48 encryption, signing and compression using Cryptographic Message 49 Syntax and provides signed receipts for the acknowledgement of 50 received files. 52 The protocol supports both direct peer to peer communication and 53 indirect communication via a Value Added Network and may be used 54 with TCP/IP, X.25 and ISDN based networks. 56 Table of Contents 58 1. Introduction 59 1.1 - Background 60 1.2 - Summary Of Features 61 1.3 - General Principles 62 1.4 - Structure 63 1.5 - Virtual Files 64 1.6 - Service Description 65 1.7 - Security 67 2. Network Service 68 2.1 - Introduction 69 2.2 - Service Primitives 70 2.3 - Secure ODETTE-FTP Session 71 2.4 - Port Assignment 73 3. File Transfer Service 74 3.1 - Model 75 3.2 - Session Setup 76 3.3 - File Transfer 77 3.4 - Session Take Down 78 3.5 - Service State Automata 80 4. Protocol Specification 81 4.1 - Overview 82 4.2 - Start Session Phase 83 4.3 - Start File Phase 84 4.4 - Data Transfer Phase 85 4.5 - End File Phase 86 4.6 - End Session Phase 87 4.7 - Problem Handling 89 5. Commands and Formats 90 5.1 - Conventions 91 5.2 - Commands 92 5.3 - Command Formats 93 5.4 - Identification Code 95 6. File Services 96 6.1 - Overview 97 6.2 - File Signing 98 6.3 - File Encryption 99 6.4 - File Compression 100 6.5 - V Format Files - Record Lengths 102 7. ODETTE-FTP Data Exchange Buffer 103 7.1 - Overview 104 7.2 - Data Exchange Buffer Format 105 7.3 - Buffer Filling Rules 107 8. Stream Transmission Buffer 108 8.1 - Introduction 109 8.2 - Stream Transmission Header Format 111 9. Protocol State Machine 112 9.1 - ODETTE-FTP State Machine 113 9.2 - Error Handling 114 9.3 - States 115 9.4 - Input Events 116 9.5 - Output Events 117 9.7 - Local Variables 118 9.8 - Local Constants 119 9.9 - Session Connection State Table 120 9.10 - Error and Abort State Table 121 9.11 - Speaker State Table 1 122 9.12 - Speaker State Table 2 123 9.13 - Listener State Table 124 9.14 - Example 126 10. Miscellaneous 127 10.1 - Algorithm Choice 128 10.2 - Cryptographic Algorithms 129 10.3 - Protocol Extensions 130 10.4 - Security Considerations 132 Appendix A Virtual File Mapping Example 133 Appendix B ISO 646 Character Subset 134 Appendix C X.25 Specific Information 135 Appendix D OFTP X.25 Over ISDN Recommendation 137 IANA Considerations 138 Acknowledgements 139 Informative References 140 Normative References 141 ODETTE Address 142 Author's Address 143 Copyright 145 1. Introduction 147 1.1 Background 149 The ODETTE File Transfer Protocol (ODETTE-FTP) was defined in 1986 by 150 working group four of the Organisation for Data Exchange by Tele 151 Transmission in Europe (ODETTE) to address the electronic data 152 interchange (EDI) requirements of the European automotive industry. 154 Over the last ten years ODETTE-FTP has been widely deployed on 155 systems of all sizes from personal computers to large mainframes 156 while the Internet has emerged as the dominant international network, 157 providing high speed communication at low cost. To match the demand 158 for EDI over the Internet, ODETTE has decided to extend the scope of 159 its file transfer protocol to incorporate security functions and 160 advanced compression techniques to ensure that it remains at the 161 forefront of information exchange technology. 163 The protocol now supports secure and authenticated communication 164 over the Internet using Transport Layer Security, provides file 165 encryption, signing and compression using Cryptographic Message 166 Syntax and provides signed receipts for the acknowledgement of 167 received files. 169 The protocol supports both direct peer to peer communication and 170 indirect communication via a Value Added Network and may be used 171 with TCP/IP, X.25 and ISDN based networks. 173 1.2 Summary Of Features 175 This memo is a development of version 1.4 of the ODETTE File Transfer 176 Protocol [OFTP] with these changes/additions - 178 Session level encryption 179 File level encryption 180 Secure authentication 181 File compression 182 Signed EERP 183 Signed NERP 184 Maximum permitted file size increased to 9PB (petabytes) 185 Virtual file description added 186 Extended error codes 188 Version 1.4 of ODETTE File Transfer Protocol included these changes 189 and additions to version 1.3. 191 Negative End Response (NERP) 192 Extended Date and Timestamp 193 New reason code 14 (File direction refused) 195 1.3 General Principles 197 The aim of the ODETTE-FTP is to facilitate the transmission of a file 198 between one or more locations in a way that is independent of the 199 data communication network, system hardware and software environment. 201 In designing and specifying the protocol, the following factors were 202 considered. 204 1. The possible differences of size and sophistication of file storage 205 and small and large systems. 207 2. The necessity to work with existing systems (reduce changes to 208 existing products and allow easy implementation). 210 3. Systems of different ages. 212 4. Systems of different manufactures. 214 5. The potential for growth in sophistication (limit impact and avoid 215 changes at other locations). 217 1.4 Structure 219 ODETTE-FTP is modelled on the OSI reference model. It is designed to 220 use the Network Service provided by level 3 of the model and provide 221 a File Service to the users. Thus the protocol spans levels 4 to 7 222 of the model. 224 The description of the ODETTE-FTP contained in this memo is closely 225 related to the original 'X.25' specification of the protocol and in 226 the spirit of the OSI model describes: 228 1. A File Service provided to a user monitor. 230 2. A protocol for the exchange of information between peer 231 ODETTE-FTP entities. 233 1.5 Virtual Files 235 Information is always exchanged between ODETTE-FTP entities in a 236 standard representation called a Virtual File. This allows data 237 transfer without regard for the nature of the communicating systems. 239 The mapping of a file between a local and virtual representation will 240 vary from system to system and is not defined here. 242 o---------o 243 Site | Local | 244 A | File A | 245 o---------o 246 | 247 o----------------------- Mapping A ------------------------o 248 | | | 249 | o---------o | 250 | | Virtual | | 251 | | File | | 252 | o---------o | 253 | o------------------------------------------------o | 254 | | | | 255 | | ODETTE-FTP | | 256 | | | | 257 | o------------------------------------------------o | 258 | o---------o o---------o | 259 | | Virtual | | Virtual | | 260 | | File | | File | | 261 | o---------o o----+----o | 262 | | | | 263 o------ Mapping B ------------------------ Mapping C ------o 264 | | 265 o---------o o----+----o 266 | Local | Site Site | Local | 267 | File B | B C | File C | 268 o---------o o---------o 270 A Virtual File is described by a set of attributes identifying and 271 defining the data to be transferred. The main attributes are: 273 1.5.1 Organisation: 275 Sequential 277 Logical records are presented one after another. The ODETTE-FTP 278 must be aware of the record boundaries. 280 1.5.2 Identification 282 Dataset Name 284 Dataset name of the Virtual File being transferred, assigned by 285 bilateral agreement. 287 Time stamp (HHMMSScccc) 289 A file qualifier indicating the time the Virtual File was made 290 available for transmission. The counter (cccc=0001-9999) gives 291 higher resolution. 293 Date stamp (CCYYMMDD) 295 A file qualifier indicating the date the Virtual File was made 296 available for transmission. 298 The Dataset Name, Date and Time attributes are assigned by the Virtual 299 File's originator and are used to uniquely identify a file. They 300 are all mandatory and must not be changed by intermediate locations. 302 The User Monitor may use the Virtual File Date and Time attributes 303 in local processes involving date comparisons and calculations. Any 304 such use falls outside the scope of this protocol. 306 1.5.3 Record Format 308 Four record formats are defined - 310 Fixed (F) 312 Each record in the file has the same length. 314 Variable (V) 316 The records in the file can have different lengths. 318 Unstructured (U) 320 The file contains a stream of data. No structure is defined. 322 Text File (T) 324 A Text File is defined as a sequence of ASCII characters, 325 containing no control characters except CR-LF which delimit 326 lines. A line will not have more than 2048 characters. 328 1.5.4 Restart 330 ODETTE-FTP can negotiate the restart of an interrupted Virtual File 331 transmission. Fixed and Variable format files are restarted on 332 record boundaries. For Unstructured and Text files the restart 333 position is expressed as a file offset in 1K (1024 octet) blocks. 334 The restart position is always calculated relative to the start of 335 the Virtual File. 337 1.6 Service Description 339 ODETTE-FTP provides a file transfer service to a user monitor and in 340 turn uses the Internet transport layer stream service to communicate 341 between peers. 343 These services are specified in this memo using service primitives 344 grouped into four classes as follows: 346 Request (RQ) An entity asks the service to do some work. 347 Indication (IND) A service informs an entity of an event. 348 Response (RS) An entity responds to an event. 349 Confirm (CF) A service informs an entity of the response. 351 Services may be confirmed, using the request, indication, response 352 and confirm primitives, or unconfirmed using just the request and 353 indication primitives. 355 1.7 Security 357 ODETTE-FTP provides a number of security services to protect a 358 Virtual File transmission across a hostile network. 360 These security services are as follows: 362 Confidentiality 363 Integrity 364 Non-repudiation of receipt 365 Non-repudiation of origin 366 Secure authentication 368 Security services in this specification are implemented as follows: 370 Session level encryption 371 File level encryption 372 Signed files 373 Signed receipts 374 Session level authentication 375 ODETTE-FTP Authentication 377 Session level encryption provides data confidentiality by encryption 378 of all the protocol commands and data exchanged between two parties, 379 preventing a third party from extracting any useful information from 380 the transmission. 382 This session level encryption is achieved by layering ODETTE-FTP 383 over [TLS], Transport Layer Security, distinguishing between secure 384 and unsecure TCP/IP traffic using different port numbers. 386 File encryption provides complementary data confidentiality by 387 encryption of the files in their entirety. Generally this 388 encryption occurs prior to transmission, but it is also possible to 389 encrypt and send files while in session. File encryption has the 390 additional benefit of allowing a file to remain encrypted outside of 391 the communications session in which it was sent. The file can be 392 received and forwarded by multiple intermediaries, yet only the 393 final destination will be able to decrypt the file. File encryption 394 does not encrypt the actual protocol commands, so trading partner 395 EDI codes and Virtual File Names are still viewable. 397 Secure authentication is implemented through the session level 398 authentication features available in [TLS] and proves the identity of 399 the parties wishing to communicate. 401 ODETTE-FTP Authentication also provides an authentication mechanism, 402 but one that is integral to ODETTE-FTP and is available on all 403 network infrastructures over which ODETTE-FTP is operated (this is in 404 contrast to [TLS] which is generally only available over TCP/IP based 405 networks). Both trading partners are required to possess certificates 406 when ODETTE-FTP Authentication is used. 408 The security features in ODETTE-FTP 2.0 are centred around the use of 409 [X.509] certificates. To take advantage of the complete range of 410 security services offered in both directions, each party is required 411 to possess an [X.509] certificate. If the confidentiality of data 412 between two parties is the only concern, then [TLS] alone can be used 413 which allows the trading partner accepting an incoming connection 414 (the Responder) to be the only partner required to possess a 415 certificate. This means that session level encryption between a hub 416 and its trading partners can be achieved without requiring all the 417 trading partners to obtain a certificate, assuming that trading 418 partners always connect to the hub. 420 With the exception of [TLS], all the security services work with X.25 421 and ISDN as transport media. Although nothing technically precludes 422 [TLS] from working with X.25 or ISDN, implementations are rare. 424 2. Network Service 426 2.1 Introduction 428 ODETTE-FTP peer entities communicate with each other via the OSI 429 Network Service or the Transmission Control Protocol Transport 430 Service [TCP]. This is described by service primitives representing 431 request, indication, response and confirmation actions. 433 For the Internet environment, the service primitives mentioned below 434 for the Network Service have to be mapped to the respective Transport 435 Service primitives. This section describes the network service 436 primitives used by ODETTE-FTP and their relationship to the TCP 437 interface. In practice the local transport service application 438 programming interface will be used to access the TCP service. 440 2.2 Service Primitives 442 All Network primitives can be directly mapped to the respective 443 Transport primitives when using TCP. 445 2.2.1 Network Connection 447 N_CON_RQ ------> N_CON_IND 448 N_CON_CF <------ N_CON_RS 450 This describes the setup of a connection. The requesting ODETTE-FTP 451 peer uses the N_CON_RQ primitive to request an active OPEN of a 452 connection to a peer ODETTE-FTP, the Responder, which has previously 453 requested a passive OPEN. The Responder is notified of the incoming 454 connection via N_CON_IND and accepts it with N_CON_RS. The requester 455 is notified of the completion of its OPEN request upon receipt of 456 N_CON_CF. 458 Parameters 460 Request Indication Response Confirmation 461 --------------------------------------------------------------------- 462 Dest addr ------> same same same 464 2.2.2 Network Data 466 N_DATA_RQ ------> N_DATA_IND 468 Data exchange is an unconfirmed service. The Requester passes data 469 for transmission to the network service via the N_DATA_RQ primitive. 470 The Responder is notified of the availability of data via N_DATA_IND. 471 In practice the notification and receipt of data may be combined, 472 such as by the return from a blocking read from the network socket. 474 Parameters 476 Request Indication 477 --------------------------------------------------------------------- 478 Data ------------------> same 480 2.2.3 Network Disconnection 482 N_DISC_RQ ------> N_DISC_IND 484 An ODETTE-FTP requests the termination of a connection with the 485 N_DISC_RQ service primitive. Its peer is notified of the CLOSE by a 486 N_DISC_IND event. It is recognised that each peer must issue a 487 N_DISC_RQ primitive to complete the TCP symmetric close procedure. 489 2.2.4 Network Reset 491 ------> N_RST_IND 493 An ODETTE-FTP entity is notified of a network error by a N_RST_IND 494 event. It should be noted that N_RST_IND would also be generated by 495 a peer RESETTING the connection, but this is ignored here as N_RST_RQ 496 is never sent to the Network Service by ODETTE-FTP. 498 2.3 Secure ODETTE-FTP Session 500 [TLS] provides a mechanism for securing an ODETTE-FTP session over 501 the Internet or a TCP network. ODETTE-FTP is layered over [TLS], 502 distinguishing between secure and unsecure traffic by using different 503 server ports. 505 The implementation is very simple. Layer the ODETTE-FTP over [TLS] in 506 the same way as layering ODETTE-FTP over TCP/IP. [TLS] provides both 507 session encryption and authentication, both of which may be used by 508 the connecting parties. A party acts as a [TLS] server when receiving 509 calls and acts as a [TLS] client when making calls. When the [TLS] 510 handshake has completed, the responding ODETTE-FTP may start the 511 ODETTE-FTP session by sending the Ready Message. 513 2.4 Port Assignment 515 An ODETTE-FTP requester will select a suitable local port. 517 The responding ODETTE-FTP will listen for connections on Registered 518 Port 3305, the service name is 'odette-ftp'. 520 The responding ODETTE-FTP will listen for secure TLS connections 521 on Registered Port 6619, the service name is 'odette-ftps'. 523 3. File Transfer Service 525 The File Transfer Service describes the services offered by an 526 ODETTE-FTP Entity to its User Monitor. The implementation of the 527 service primitives is a local matter. 529 3.1 Model 531 o-------------------o o-------------------o 532 | | | | 533 | USER MONITOR | | USER MONITOR | 534 | | | | 535 o-------------------o o-------------------o 536 | A | A 537 ...............|...|... FILE TRANSFER SERVICE ...|...|............... 538 | | | | 539 F_XXX_RQ/RS | | F_XXX_IND/CF F_XXX_RQ/RS | | F_XXX_IND/CF 540 V | V | 541 o-------------------o o-------------------o 542 | |- - - - - - >| | 543 | ODETTE-FTP Entity | E-Buffer | ODETTE-FTP Entity | 544 | |< - - - - - -| | 545 o-------------------o o-------------------o 546 | A | A 547 N_XXX_RQ/RS | | N_XXX_IND/CF N_XXX_RQ/RS | | N_XXX_IND/CF 548 | | | | 549 ...............|...|...... NETWORK SERVICE ......|...|............... 550 V | V | 551 o---------------------------------------------------------o 552 | | 553 | N E T W O R K | 554 | | 555 o---------------------------------------------------------o 557 Key: E-Buffer - Exchange Buffer 558 F_ - File Transfer Service Primitive 559 N_ - Network Service Primitive 561 3.2 Session Setup 563 3.2.1 Session Connection Service 565 | | 566 F_CONNECT_RQ ---->|------------|----> F_CONNECT_IND 567 | | 568 F_CONNECT_CF <----|------------|<---- F_CONNECT_RS 569 | | 571 Parameters 573 Request Indication Response Confirm 574 --------------------------------------------------------------------- 575 called-address -> same --- ---- 576 calling-address-> same --- ---- 577 ID1 ------------> same ID2 ------------> same 578 PSW1------------> same PSW2 -----------> same 579 mode1 ----------> mode2 ----------> mode3 ----------> same 580 restart1 -------> same -----------> restart2 -------> same 581 authentication1-> same -----------> authentication2-> same 582 --------------------------------------------------------------------- 584 Mode 586 Specifies the file transfer capabilities of the entity sending or 587 receiving a F_CONNECT primitive for the duration of the session. 589 Value: 590 Sender-Only The entity can only send files. 591 Receiver-Only The entity can only receive files. 592 Both The entity can both send and receive files. 594 Negotiation: 595 Sender-Only Not negotiable. 596 Receiver-Only Not negotiable. 597 Both Can be negotiated down to Sender-Only or 598 Receiver-Only by the User Monitor or the 599 ODETTE-FTP entity. 601 Request Indication Response Confirm 602 --------------------------------------------------------------------- 603 Sender-only ----> Receiver-only --> Receiver-only --> Sender-only 605 Receiver-only --> Sender-only ----> Sender-only ----> Receiver-only 607 Both -----+-----> Both ----+------> Both -----------> Both 608 | or +------> Receiver-only --> Sender-only 609 | or +------> Sender-only ----> Receiver-only 610 | 611 or +-----> Receiver-only --> Receiver-only --> Sender-only 612 or +-----> Sender-only ----> Sender-only ----> Receiver-only 613 --------------------------------------------------------------------- 615 Restart 617 Specifies the file transfer restart capabilities of the User 618 Monitor. 620 Value: 622 Negotiation: 624 Request Indication Response Confirm 625 --------------------------------------------------------------------- 626 restart = Y ----> restart = Y --+-> restart = Y ----> restart = Y 627 or +-> restart = N ----> restart = N 629 restart = N ----> restart = N ----> restart = N ----> restart = N 630 --------------------------------------------------------------------- 632 Authentication 634 Specifies the authentication requirement of the User Monitor. 636 Value: 637 Y Authentication required. 638 N Authentication not required. 640 Negotiation: Not negotiable. 642 Request Indication Response Confirm 643 --------------------------------------------------------------------- 644 auth = Y ----> auth = Y ----> auth = Y ----> auth = Y 646 auth = N ----> auth = N ----> auth = N ----> auth = N 647 --------------------------------------------------------------------- 649 3.3 File Transfer 651 3.3.1 File Opening 653 | | 654 F_START_FILE_RQ ---->|------------|----> F_START_FILE_IND 655 | | 656 F_START_FILE_CF(+|-) <----|------------|<---- F_START_FILE_RS(+|-) 657 | | 659 Parameters: 661 Request Ind. RS(+) CF(+) RS(-) CF(-) 662 ------------------------------------------------------------------ 663 filename-------> same ---- ---- ---- ---- 664 date-time------> same ---- ---- ---- ---- 665 destination----> same ---- ---- ---- ---- 666 originator-----> same ---- ---- ---- ---- 667 rec-format-----> same ---- ---- ---- ---- 668 rec-size ------> same ---- ---- ---- ---- 669 file-size------> same ---- ---- ---- ---- 670 org-file-size--> same ---- ---- ---- ---- 671 signed-eerp----> same ---- ---- ---- ---- 672 cipher---------> same ---- ---- ---- ---- 673 sec-services---> same ---- ---- ---- ---- 674 compression----> same ---- ---- ---- ---- 675 envelope-format> same ---- ---- ---- ---- 676 description----> same ---- ---- ---- ---- 677 restart-pos1---> same-> restart-pos2-> same ---- ---- 678 ---- ---- ---- ---- cause ------> same 679 ---- ---- ---- ---- retry-later-> same 680 ------------------------------------------------------------------ 682 Notes: 684 1. Retry-later has values "Y" or "N". 685 2. Cause is the reason for refusing the transfer (1,..,13,99). 686 3. Restart-pos1 not equal 0 is only valid if restart has been 687 agreed during initial negotiation. 688 4. Restart-pos2 is less than or equal to restart-pos1. 690 3.3.2 Data Regime 692 | | 693 F_DATA_RQ ---->|------------|----> F_DATA_IND 694 | | 695 F_DATA_CF <----|(---CDT----)| 696 | | 698 Note: 700 Unlike other commands, where the F_XXX_CF signal is a result of 701 a corresponding F_XXX_RS command, in this case, the local entity 702 layer issues this signal when it is ready for the next data 703 request. This decision is based on the current credit count and 704 the reception of CDT from the receiver. 706 3.3.3 File Closing 708 | | 709 F_CLOSE_FILE_RQ --->|------------|----> F_CLOSE_FILE_IND 710 | | 711 F_CLOSE_FILE_CF(+|-) <---|------------|<---- F_CLOSE_FILE_RS(+|-) 712 | | 713 Parameters 715 Request Ind RS(+) CF(+) RS(-) CF(-) 716 --------------------------------------------------------------------- 717 rec-count ---> same ---- ---- ---- ---- 718 unit-count --> same ---- ---- ---- ---- 719 ---- ---- Speaker=Y ---> Speaker=N ---- ---- 720 ---- ---- Speaker=N ---> Speaker=Y ---- ---- 721 ---- ---- ---- ---- cause ---> same 722 --------------------------------------------------------------------- 724 In a positive Close File response (F_CLOSE_FILE_RS(+)) the current 725 Listener may either: 727 1. Set Speaker to "Yes" and become the Speaker. 2. Set Speaker 728 to "No" and remain the Listener. 730 The File Transfer service will ensure that the setting of the speaker 731 parameter is consistent with the capabilities of the peer user. 733 The turn is never exchanged in the case of a negative response or 734 confirmation. 736 Only the Speaker is allowed to issue F_XXX_FILE_RQ primitives. 738 3.3.4 Exchanging the Turn 740 3.3.4.1 Initial Turn (First Speaker) 742 The Initiator becomes the first Speaker at the end of the Session 743 Setup (F_CONNECT_CF received by Initiator and F_CONNECT_RS sent by 744 Responder). 746 3.3.4.2 Following Turns 748 Rules: 750 1. At each unsuccessful End of File the turn is not exchanged. 752 2. At each successful End of File the turn is exchanged if requested 753 by the Listener: 755 - The current Listener receives F_CLOSE_FILE_IND 756 (Speaker = choice). 758 - If the Listener answers F_CLOSE_FILE_RS(Speaker = YES), it 759 becomes Speaker, the Speaker receives F_CLOSE_FILE_CF (Speaker = 760 NO) and becomes Listener. 762 - If the Listener answers F_CLOSE_FILE_RS(Speaker = NO), it 763 remains Listener, and the Speaker receives F_CLOSE_FILE_CF 764 (Speaker = YES) and remains Speaker. 766 3. The Speaker can issue a Change Direction request (F_CD_RQ) to 767 become the Listener. The Listener receives a Change Direction 768 indication (F_CD_IND) and becomes the Speaker. 770 4. In order to prevent loops of F_CD_RQ/IND, the Speaker may not send 771 an F_CD_RQ after receiving an unsolicited F_CD_IND. If the 772 Listener receives a solicited F_CD_IND as a result of sending 773 EFPA(Speaker=Yes), it is acceptable to immediately relinquish the 774 right to speak by sending an F_CD_RQ. 776 3.3.5 End to End Response 778 This service is initiated by the current Speaker (if there is no file 779 transfer in progress) to send an End-to-End response from the final 780 destination to the originator of a file. 782 | | 783 F_EERP_RQ ---->|------------|----> F_EERP_IND 784 | | 785 F_RTR_CF <----|------------|<---- F_RTR_RS 786 | | 787 Parameters 789 Request Indication 790 ------------------------------------ 791 filename -----------> same 792 date ---------------> same 793 time ---------------> same 794 destination --------> same 795 originator ---------> same 796 hash ---------------> same 797 signature ----------> same 798 ------------------------------------ 800 Relationship with Turn: 802 - Only the Speaker may send an End to End Response request. 804 - Invoking the EERP service does not change the turn. 806 - If a F_CD_IND has been received just before F_EERP_RQ is issued, 807 this results in leaving the special condition created by the 808 reception of F_CD_IND; i.e. while it was possible to issue 809 F_RELEASE_RQ and not possible to issue F_CD_RQ just after the 810 reception of F_CD_IND, after having issued F_EERP_RQ the normal 811 Speaker status is entered again (F_CD_RQ valid, but F_RELEASE_RQ 812 not valid). 814 Notes: 816 1. The F_EERP_RQ (and also F_NERP_RQ) is confirmed with an F_RTR_CF 817 signal. The F_RTR_CF signal is common to both F_EERP_RQ and 818 F_NERP_RQ. There should be no ambiguity, since there can only be 819 one such request pending at any one time. 821 2. The signature is optional and is requested when sending the 822 F_START_FILE_RQ. 824 3.3.6 Negative End Response 826 This service is initiated by the current speaker (if there is no file 827 transfer in progress) to send a negative end response when a file 828 could not be transmitted to the next destination. It is sent only if 829 the problem is of a non-temporary kind. 831 This service may also be initiated by the final destination instead 832 of sending an End-to-End Response when a file could not be processed, 833 after having successfully received the file. 835 | | 836 F_NERP_RQ ---->|------------|----> F_NERP_IND 837 | | 838 F_RTR_CF <----|------------|----- F_RTR_RS 839 | | 840 Parameters 842 Request Indication 843 --------------------------------------------------- 844 filename ----------------------> same 845 date --------------------------> same 846 time --------------------------> same 847 destination -------------------> same 848 originator --------------------> same 849 creator of negative response --> same 850 reason ------------------------> same 851 reason text -------------------> same 852 hash --------------------------> same 853 signature ---------------------> same 854 --------------------------------------------------- 856 Relationship with Turn: 858 The same as for the End-To-End response (see 3.3.5). 860 3.4 Session Take Down 862 3.4.1 Normal Close 864 | | 865 F_RELEASE_RQ ---->|------------|----> F_RELEASE_IND 866 | | 868 Parameters 870 Request Indication 871 --------------------------------------------------------------------- 872 reason = normal -------> ---- 873 --------------------------------------------------------------------- 875 The Release service can only be initiated by the Speaker. 877 The Speaker can only issue a Release request (F_RELEASE_RQ) just 878 after receiving an unsolicited Change Direction indication 879 (F_CD_IND). This ensures that the other partner doesn't want to send 880 any more files in this session. 882 Peer ODETTE-FTP entities action a normal session release by 883 specifying Reason = Normal in an End Session (ESID) command. 885 3.4.2 Abnormal close 887 | | 888 F_RELEASE_RQ ---->|------------|----> F_ABORT_IND 889 | | 891 Parameters 893 Request Indication 894 --------------------------------------------------------------------- 895 reason = error value --> same (or equivalent) 896 AO (Abort Origin) = (L)ocal or (D)istant 897 --------------------------------------------------------------------- 899 Abnormal session release can be initiated by either the Speaker or 900 the Listener and also by the user or provider. 902 Abnormal session release can occur at any time within the session. 904 Peer ODETTE-FTP entities action an abnormal session release by 905 specifying Reason = Error-value in an End Session (ESID) command. 907 The abnormal session release deals with the following types of error: 909 1. The service provider will initiate an abnormal release in the 910 following cases: 912 1. Protocol error. 913 2. Failure of the Start Session (SSID) negotiation. 914 3. Command not recognised. 915 4. Data Exchange buffer size error. 916 5. Resources not available. 917 6. Other unspecified abort code (with "REASON" = unspecified). 919 2. The User Monitor will initiate an abnormal release in the 920 following cases: 922 1. Local site emergency close down. 923 2. Resources not available. 924 3. Other unspecified abort code (with "REASON" = unspecified). 926 Other error types may be handled by an abort of the connection. 928 3.4.3 Abort 930 | | 931 F_ABORT_RQ ---->|------------|----> F_ABORT_IND 932 | | 933 User Initiated Abort 935 | | 936 F_ABORT_IND <----|------------|----> F_ABORT_IND 937 | | 938 Provider Initiated Abort 940 Parameters 942 Request Indication 943 --------------------------------------------------------------------- 944 -- R (Reason): specified or unspecified 945 -- AO (Abort Origin): (L)ocal or (D)istant 946 --------------------------------------------------------------------- 948 The Abort service may be invoked by either entity at any time. 950 The service provider may initiate an abort in case of error 951 detection. 953 3.4.4 Explanation of Session Take Down Services 955 User | OFTP | Network | OFTP | User 956 ---------------|------|----------------------|------|--------------- 957 | | | | 959 1. Normal Release 961 F_RELEASE_RQ | | ESID(R=normal) | | F_RELEASE_IND 962 *--------------|-> ==|======================|=> --|--------------> 963 (R=normal) | | | | 965 2. User Initiated Abnormal Release 967 F_RELEASE_RQ | | ESID(R=error) | | F_ABORT_IND 968 *--------------|-> ==|======================|=> -|--------------> 969 (R=error value)| | | | (R=error,AO=D) 971 User | OFTP | Network | OFTP | User 972 ---------------|------|----------------------|------|--------------- 973 | | | | 975 3. Provider Initiated Abnormal Release 977 F_ABORT_IND | | ESID(R=error) | | F_ABORT_IND 978 <--------------|-* *=|======================|=> --|--------------> 979 | | | | 981 4. User Initiated Connection Abort 983 F_ABORT_RQ | | N_DISC_RQ | | F_ABORT_IND 984 *--------------|-> --|--------->..----------|-> --|--------------> 985 | | N_DISC_IND | | (R=unsp.,AO=D) 987 5. Provider Initiated Connection Abort 989 F_ABORT_IND | | N_DISC_RQ | | F_ABORT_IND 990 <--------------|-* *-|--------->..----------|-> --|--------------> 991 (R=error,AO=L) | | N_DISC_IND | | (R=unsp.,AO=D) 993 Key: * Origin of command flow 994 F_ ---> File Transfer Service primitive 995 N_ ---> Network Service primitive 996 ===> ODETTE-FTP (OFTP) protocol message 998 3.5 Service State Automata 1000 These state automata define the service as viewed by the User 1001 Monitor. Events causing a state transition are shown in lower case 1002 and the resulting action in upper case where appropriate. 1004 3.5.1 Idle State Diagram 1006 o------------o 1007 decision | | f_connect_ind 1008 +-----------------| IDLE |-----------------+ 1009 | F_CONNECT_RQ | (0) | F_CONNECT_RS | 1010 | o------------o | 1011 V | 1012 o-----------------o | 1013 | | | 1014 | I_WF_FCONNECTCF | | 1015 | | | 1016 o--------+--------o | 1017 | | 1018 | F_CONNECT_CF | 1019 V V 1020 o-----------------o o-----------------o 1021 | | | | 1022 | IDLE SPEAKER | | IDLE LISTENER | 1023 | (1) | | (2) | 1024 | See Speaker | | See Listener | 1025 | State Diagram | | State Diagram | 1026 | | | | 1027 o-----------------o o-----------------o 1029 3.5.2 Speaker State Diagram 1030 o-----------------o o-----------------o 1031 | IDLE LISTENER | | IDLE | 1032 | CD_RQ just sent | | see (0) | 1033 | see (3), Listen | | Idle | 1034 | State Diagram | | State Diagram | 1035 o-----------------o o-----------------o 1036 A A 1037 | | 1038 decision decision 1039 F_CD_RQ F_RELEASE_RQ 1040 | | 1041 o================o decision o----------o decision o---------------o 1042 | |---------->| WAIT FOR |<----------| | 1043 | | F_EERP_RQ | | F_EERP_RQ | | 1044 | IDLE | | EERP/ | | IDLE | 1045 | SPEAKER | decision | NERP | decision | SPEAKER | 1046 | (1) |---------->| CONFIRM. |<----------| (4) | 1047 | | F_NERP_RQ | | F_NERP_RQ | | 1048 | | | | | | 1049 | | | | | CD_IND | 1050 | | f_rtr_cf | | | just received | 1051 | |<----------| | | | 1052 | | o----------o | | 1053 | | | | 1054 | | | | 1055 o================o o---------------o 1056 A A | | 1057 | | | decision and P2 decision and P2 | 1058 | | +-----------------+ +---------------------+ 1059 | | F_START_FILE_RQ | | F_START_FILE_RQ 1060 | | V V 1061 | | o---------------o 1062 | | f_file_start_cf(-) | | 1063 | +----------------------| OPENING | 1064 | | | 1065 | o---------------o 1066 | | 1067 f_file_close_cf(-) or f_start_file_cf(+) 1068 f_file_close_cf(+) and not P1 | 1069 | V 1070 o---------------o o---------------o record to send o---------o 1071 | | | |------------------>| | 1072 | CLOSING | | DATA TRANSFER | F_DATA_RQ | NEXT | 1073 | | | | | RECORD | 1074 | | | | f_data_cf | | 1075 | | | |<------------------| | 1076 o---------------o o---------------o o---------o 1077 | A | 1078 | | end of file | 1079 | +-------------------+ 1080 | F_CLOSE_FILE_RQ 1081 | o-----------------o 1082 | f_file_close_cf(+) and P1 | IDLE LISTENER | 1083 +--------------------------------------------->| see (2), Listen | 1084 | State Diagram | 1085 Predicates: o-----------------o 1086 P1: Positive confirmation and Speaker = YES 1087 P2: Mode = Both or (Mode = Sender-Only) 1089 3.5.3 Listener State Diagram 1090 o-----------------o o-----------------o 1091 | IDLE SPEAKER | | IDLE | 1092 | CD_IND just | | | 1093 | received see(4) | | see (0) | 1094 | Speaker State | | Idle | 1095 | Diagram | | State Diagram | 1096 o-----------------o o-----------------o 1097 A A 1098 | | 1099 decision f_eerp_ind decision 1100 F_CD_IND +--------------+ F_RELEASE_IND 1101 | | F_RTR_RS | | 1102 o=================o | o-----------------o 1103 | |<-----------+ | | 1104 | | | | 1105 | | f_nerp_ind | | 1106 | |------------+ | | 1107 | | F_RTR_RS | | | 1108 | | | | | 1109 | |<-----------+ | | 1110 | IDLE LISTENER | f_eerp_ind | IDLE LISTENER | 1111 | (2) |<-----------------------------| (3) | 1112 | | F_RTR_RS | CD_RQ | 1113 | | | just sent | 1114 | | f_nerp_ind | | 1115 | |<-----------------------------| | 1116 | | F_RTR_RS | | 1117 | | | | 1118 | | f_start_file_ind | | 1119 | | and not P1 | | 1120 | |---------------------+ | | 1121 o=================o F_START_FILE_RS(-) | o-----------------o 1122 A A | A A | | | 1123 | | | | +-----------------------+ | | 1124 | | | | | | 1125 | | | | f_start_file_ind and not P1 | | 1126 | | | +--------------------------------------+ | 1127 | | | F_START_FILE_RS(-) | 1128 | | | | 1129 | | | f_start_file_ind f_start_file_ind | 1130 | | | and P1 and P1 | 1131 | | +----------------------------+ +------------------+ 1132 | | F_START_FILE_RS(+) | | F_START_FILE_RS(+) 1133 | | V V 1134 | | o---------------o 1135 | |f_close_file_ind and not P3 | | 1136 | +----------------------------| | 1137 | F_CLOSE_FILE_RS(+,N) | | 1138 | | DATA | 1139 | | TRANSFER | 1140 | f_close_file_ind and not P2 | |-------------+ 1141 +------------------------------| | | 1142 F_CLOSE_FILE_RS(-) | |<------------+ 1143 o---------------o F_DATA_IND 1144 o---------------o | 1145 | IDLE SPEAKER | f_close_file_ind and P3 | 1146 | see (1), Spkr |<--------------------------+ 1147 | State Diagram | F_CLOSE_FILE_RS(+,Y) 1148 o---------------o 1150 Predicates: 1151 P1: Decision to send F_START_FILE_RS(+) 1152 P2: Decision to send F_CLOSE_FILE_RS(+) 1153 P3: Decision to become Speaker 1155 4. Protocol Specification 1157 4.1 Overview 1159 The ODETTE-FTP protocol is divided into five operating phases. 1161 Start Session 1162 Start File 1163 Data Transfer 1164 End File 1165 End Session 1167 After the End File phase an ODETTE-FTP entity may enter a new Start 1168 File phase or terminate the session via the End Session phase. 1170 ODETTE-FTP peers communicate by sending and receiving messages in 1171 Exchange Buffers via the Network Service. Each Exchange Buffer 1172 contains one of the following commands. 1174 SSRM Start Session Ready Message 1175 SSID Start Session 1176 SECD Security Change Direction 1177 AUCH Authentication Challenge 1178 AURP Authentication Response 1179 SFID Start File 1180 SFPA Start File Positive Answer 1181 SFNA Start File Negative Answer 1182 DATA Data 1183 CDT Set Credit 1184 EFID End File 1185 EFPA End File Positive Answer 1186 EFNA End File Negative Answer 1187 ESID End Session 1188 CD Change Direction 1189 EERP End to End Response 1190 NERP Negative End Response 1191 RTR Ready To Receive 1193 The remainder of this section describes the protocol flows. Section 1194 five details the command formats. 1196 4.2 Start Session Phase 1198 The Start Session phase is entered immediately after the network 1199 connection has been established. 1201 4.2.1 Entity Definition 1203 The ODETTE-FTP entity that took the initiative to establish the 1204 network connection becomes the Initiator. Its peer becomes the 1205 Responder. 1207 4.2.2 Protocol Sequence 1209 The first message must be sent by the Responder. 1211 1. Initiator <-------------SSRM -- Responder Ready Message 1212 -- SSID ------------> Identification 1213 <------------ SSID -- Identification 1215 4.2.3 Secure Authentication 1217 Having exchanged SSIDs, the Initiator may optionally begin an 1218 authentication phase, in which each trading partner proves its 1219 identity to the other. 1221 4.2.4 Protocol Sequence 1223 The first authentication message must be sent by the Initiator. 1225 1. Initiator -- SECD ------------> Responder Change Direction 1226 <------------ AUCH -- Challenge 1227 -- AURP ------------> Response 1228 <------------ SECD -- Change Direction 1229 -- AUCH ------------> Challenge 1230 <------------ AURP -- Response 1232 The Initiator sends Security Change Direction (SECD) to which 1233 the Responder replies with an Authentication Challenge (AUCH). 1235 AUCH contains a random challenge that is unique to each 1236 session. The challenge is signed using the private key of the 1237 Initiator and turned into a [CMS] signature package. The 1238 public certificate of the Initiator may optionally be included 1239 in the [CMS] package. The signed challenge is sent back to the 1240 Responder in the Authentication Response (AURP). 1242 Using the Initiator's public key, the Responder verifies the 1243 authenticity of the [CMS] signature. If the signature is valid, 1244 the Responder checks the signing certificate against the 1245 certificate it is expecting from the Initiator. If the signing 1246 certificate is the expected certificate then the Initiator has 1247 authenticated successfully and the Responder replies with a 1248 Security Change Direction (SECD) beginning the complementary 1249 process of verifying the Responder to the Initiator. 1251 4.3 Start File Phase 1253 4.3.1 Entity Definition 1255 The Initiator from the Start Session phase is designated the Speaker 1256 while the Responder becomes the Listener. The roles are reversed by 1257 the Speaker sending a Change Direction command to the Listener. 1259 4.3.2 Protocol Sequence 1261 1. Speaker -- SFID ------------> Listener Start File 1262 <------------ SFPA -- Answer YES 1264 2. Speaker -- SFID ------------> Listener Start File 1265 <------------ SFNA -- Answer NO 1266 Go To 1 1268 Note: The User Monitor should take steps to prevent a loop 1269 situation occurring. 1271 2. Speaker -- CD --------------> Listener Change Direction 1272 Listener <------------ EERP -- Speaker End to End Response 1273 -- RTR -------------> Ready to Receive 1274 <------------ NERP -- Negative End Response 1275 -- RTR -------------> Ready to Receive 1276 <------------ SFID -- Start File 1278 4.3.3 Restart Facilities 1280 The Start File command includes a count allowing the restart of an 1281 interrupted transmission to be negotiated. If restart facilities are 1282 not available the restart count must be set to zero. The sender will 1283 start with the lowest record count + 1. 1285 4.3.4 Broadcast Facilities 1287 The destination in a Start File command can be specified as follows. 1289 1. An explicitly defined destination. 1291 2. A group destination that allows an intermediate location to 1292 broadcast the Virtual File to multiple destinations. 1294 The Listener will send a negative answer to the Speaker when the 1295 destination is not known. 1297 4.3.5 Priority 1299 The prioritisation of files for transmission is left to the local 1300 implementation. To allow some flexibility, a change direction 1301 mechanism is available in the End File phase. 1303 4.3.6 End To End Response (EERP) 1305 The End to End Response (EERP) command notifies the originator of a 1306 Virtual File that the Virtual File has been successfully delivered 1307 to its final destination. This allows the originator to perform 1308 house keeping tasks such as deleting copies of the delivered data. 1310 If the originator of the Virtual File requested a signed EERP in 1311 the SFID, the EERP must be signed. Signing allows the originator 1312 of the file to prove that the EERP was generated by the final 1313 destination. If the final destination is unable to sign the EERP 1314 they may send back an unsigned EERP. It is an implementation issue 1315 to allow the acceptance of an unsigned EERP if a signed EERP 1316 is requested. 1318 A Response Command must be sent from the location performing the 1319 final processing or distribution of the data to the originator. The 1320 Response is mandatory and may be sent in the same or in any 1321 subsequent session. 1323 When an intermediate location broadcasts or distributes a Virtual 1324 File it must receive a Response command from all the locations to 1325 which it forwarded the data before sending its own Response. This 1326 ensures that the Response received by the Virtual File's originator 1327 accounts for all the destination locations. An intermediate location 1328 therefore needs to track the status of files it processes over time. 1330 The requesting of a signed EERP is incompatible with the use of 1331 broadcast facilities because an EERP can be signed by only one 1332 destination. If this scenario occurs, the intermediate 1333 broadcast location may continue and ignore the request for a 1334 signed EERP or send back a NERP. 1336 Example: Point to Point 1338 Location A sends file Ba to Location B which will send an EERP to 1339 location A after it successfully receives the file. 1341 o----------o o-----------o 1342 | Loc. A |----------- S1 ---------->| Loc. B | 1343 | | | | 1344 | [Ba] |<---------- R2 -----------| [Ba] | 1345 +----------o o-----------o 1347 Key: 1348 S - File Transfer R - Response EERP [Ba] - File for B from A 1350 Example: Data distribution 1352 Location A sends a Virtual File containing data for distribution to 1353 locations B and C via clearing centres E1 and E2. Clearing centre E1 1354 must wait for a response from E2 (for file Ba) and location C before 1355 it sends its response, R8, to location A. Clearing centre E2 can 1356 only send response R7 to E1 when location B acknowledges file Ba with 1357 response R6. 1359 o---------o o---------o o---------o o---------o 1360 | Loc. A |-- S1 ->| Loc. E1 |-- S2 ->| Loc. E2 |-- S5 ->| Loc. B | 1361 | | | | | | | | 1362 | [Ba,Ca] |<- R8 --| [Ba,Ca] |<- R7 --| [Ba] |<- R6 --| [Ba] | 1363 o---------o o---------o o---------o o---------o 1364 A | 1365 | | o---------o 1366 | +----- S3 ->| Loc. C | 1367 | | | 1368 +--------- R4 --| [Ca] | 1369 o---------o 1371 Example: Data collection 1373 Locations A and B send files Ca and Cb to clearing centre E1 which 1374 forwards both files to location C in a single Virtual File. When it 1375 receives response R4 from C, clearing centre E1 sends response R5 to 1376 location A and R6 to location B. 1378 o---------o o---------o o---------o 1379 | Loc. A |-- S1 ->| Loc. E1 |-- S3 ->| Loc. C | 1380 | | | | | | 1381 | [Ca] |<- R5 --| [Ca,Cb] |<- R4 --| [Ca,Cb] | 1382 o---------o o---------o o---------o 1383 A | 1384 o---------o | | 1385 | Loc. B |-- S2 -----+ | 1386 | | | 1387 | [Cb] |<- R6 ---------+ 1388 o---------o 1390 4.3.7 Negative End Response (NERP) 1392 In addition to the EERP, which allows control over successful 1393 transmission of a file, a Negative End Response signals that a file 1394 could not be delivered to the final destination or that the final 1395 destination could not process the received file. 1397 It may be created by an intermediate node that could not transmit the 1398 file any further because the next node refuses to accept the file. 1399 The cause of the refusal has to be non-temporary, otherwise the 1400 intermediate node has to try the transmission again. 1402 It may also be created by the final node that is unable to process 1403 the file because of non-recoverable syntax or semantic errors in the 1404 file, or because of the failure of any other processing performed on 1405 the file. 1407 The NERP will be sent back to the originator of the file. 1409 The parameters are equal to the ones of the EERP, but with additional 1410 information about the creator of the NERP and the abort reason. Where 1411 the NERP is created due to a failure to transmit, the abort reason is 1412 taken from the refusal reason that was sent by the node refusing the 1413 file. Because of the NERP it is possible for the intermediate node to 1414 stop trying to send the non-deliverable file and to delete the file. 1416 The NERP allows the originator of the file to react to the 1417 unsuccessful transmission or processing, depending on the reason code 1418 and the creator of the NERP. 1420 If the originator of the Virtual File requested a signed EERP in 1421 the SFID, the NERP must be signed. Signing allows the originator 1422 of the file to prove by whom the NERP was generated. If the 1423 location generating the NERP is unable to sign the NERP they may send 1424 back an unsigned NERP. It is an implementation issue to allow the 1425 acceptance of an unsigned EERP if a signed NERP is requested. 1427 4.3.8 Ready To Receive Command (RTR) 1429 In order to avoid congestion between two adjacent nodes caused by a 1430 continuous flow of EERPs and NERPs, a Ready To Receive (RTR) 1431 command is provided. The RTR acts as an EERP/NERP acknowledgement 1432 for flow control but has no end-to-end significance. 1434 Speaker -- EERP ------------> Listener End to End Response 1435 <------------- RTR -- Ready to Receive 1436 -- EERP ------------> End to End Response 1437 <------------- RTR -- Ready to Receive 1438 -- NERP ------------> Negative End Response 1439 <------------- RTR -- Ready to Receive 1440 -- SFID ------------> Start File 1441 or 1442 -- CD --------------> Exchange the turn 1444 After sending an EERP or NERP, the Speaker must wait for an RTR 1445 before sending any other commands. The only acceptable commands 1446 to follow are : 1448 EERP 1449 NERP 1450 SFID or CD (if there are no more EERPs or NERPs to be sent) 1452 4.4 Data Transfer Phase 1454 Virtual File data flows from the Speaker to the Listener during the 1455 Data Transfer phase which is entered after the Start File phase. 1457 4.4.1 Protocol Sequence 1459 To avoid congestion at the protocol level a flow control mechanism is 1460 provided via the Credit (CDT) command. 1462 A Credit limit is negotiated in the Start Session phase, this 1463 represents the number of Data Exchange Buffers that the Speaker may 1464 send before it is obliged to wait for a Credit command from the 1465 Listener. 1467 The available credit is initially set to the negotiated value by the 1468 Start File positive answer, which acts as an implicit Credit command. 1469 The Speaker decreases the available credit count by one for each data 1470 buffer sent to the Listener. 1472 When the available credit is exhausted, the Speaker must wait for a 1473 Credit command from the Listener otherwise a protocol error will 1474 occur and the session will be aborted. 1476 The Listener should endeavour to send the Credit command without 1477 delay to prevent the Speaker blocking. 1479 1. Speaker -- SFID ------------> Listener Start File 1480 <------------ SFPA -- Answer YES 1482 2. If the Credit Value is set to 2 1484 Speaker -- Data ------------> Listener Start File 1485 -- Data ------------> 1486 <------------- CDT -- Set Credit 1487 -- Data ------------> 1488 -- EFID ------------> End File 1490 4.5 End File Phase 1492 4.5.1 Protocol Sequence 1494 The Speaker notifies the Listener that it has finished sending a 1495 Virtual File by sending an End File (EFID) command. The Listener 1496 replies with a positive or negative End File command and has the 1497 option to request a Change Direction command from the Speaker. 1499 1. Speaker -- EFID ------------> Listener End File 1500 <------------ EFPA -- Answer YES 1502 2. Speaker -- EFID ------------> Listener End File 1503 <------------ EFPA -- Answer YES + CD 1504 -- CD --------------> Change Direction 1505 Listener <------------ EERP -- Speaker End to End Response 1506 -------------- RTR -> Ready to Receive 1507 Listener <------------ NERP -- Speaker Negative End Response 1508 -------------- RTR -> Ready to Receive 1509 Go to Start File Phase 1511 3. Speaker -- EFID ------------> Listener End File 1512 <------------ EFNA -- Answer NO 1514 4.6 End Session Phase 1516 4.6.1 Protocol Sequence 1518 The Speaker terminates the session by sending an End Session (ESID) 1519 command. The Speaker may only do this if the Listener has just 1520 relinquished its role as speaker. 1522 1. Speaker -- EFID ------------> Listener End File 1523 <------------ EFPA -- Answer YES 1524 -- CD --------------> Change Direction 1525 Listener <------------ ESID -- Speaker End Session 1527 4.7 Problem Handling 1529 Error detection and handling should be done as close as possible to 1530 the problem. This aids problem determination and correction. Each 1531 layer of the reference model is responsible for its own error 1532 handling. 1534 ODETTE-FTP can detect protocol errors by virtue of its state 1535 machine and uses activity timers to detect session hang 1536 conditions. These mechanisms are separate from the End to End 1537 controls. 1539 4.7.1 Protocol Errors 1541 If a protocol error occurs the session will be terminated and 1542 application activity aborted. Both locations enter the IDLE state. 1544 4.7.2 Timers 1546 To protect against application and network hang conditions ODETTE-FTP 1547 uses activity timers for all situations where a response is required. 1548 The timers and actions to be taken if they expire are described in 1549 section 8, the Protocol State Machine. 1551 4.7.3 Clearing Centres 1553 The use of clearing centres introduces the possibility of errors 1554 occurring as a result of data processing activities within the 1555 centre. Such errors are not directly related to ODETTE-FTP or the 1556 communication network and are therefore outside the scope of this 1557 specification. 1559 5. Commands and Formats 1561 ODETTE-FTP entities communicate via Exchange Buffers. The Command 1562 Exchange Buffers are described below. Virtual File data is carried 1563 in Data Exchange Buffers which are described in Section 6. 1565 5.1 Conventions 1567 5.1.1 Representation unit: 1569 The basic unit of information is an octet, containing eight bits. 1571 5.1.2 Values and Characters: 1573 The ISO 646 IRV 7-bit coded character set [ISO-646], according to 1574 Appendix B, is used to encode constants and strings within command 1575 exchange buffers except where [UTF-8] is explicitly indicated against 1576 a field. 1578 5.2 Commands 1580 A Command Exchange Buffer contains a single command starting at the 1581 beginning of the buffer. Commands and data are never mixed within an 1582 Exchange Buffer. Commands can not be compressed. Variable length 1583 parameters may be omitted entirely if not required and the associated 1584 length indicator field set to zero. 1586 Components: 1588 1. Command identifier: 1590 The first octet of an Exchange Buffer is the Command Identifier 1591 and defines the format of the buffer. 1593 2. Parameter(s): 1595 Command parameters are stored in fields within a Command Exchange 1596 Buffer. Where variable length fields are used, they are preceded 1597 with a header field indicating the length. All values are 1598 required except where explicitly indicated. 1600 5.3 Command Formats 1602 The ODETTE-FTP commands are described below using the following 1603 definitions. 1605 Position (Pos.) 1607 Field offset within the Command Exchange Buffer, relative to a 1608 zero origin. 1610 Field 1612 The name of the field. 1614 Description 1616 A description of the field. 1618 Format 1620 F - A field containing fixed values. All allowable values for 1621 the field are enumerated in the command definition. 1623 V - A field with variable values within a defined range. For 1624 example the SFIDLRECL field may contain any integer value 1625 between 00000 and 99999. 1627 X(n) - An alphanumeric field of length n octets. 1629 A String contains alphanumeric characters from the following 1630 set: 1632 The numerals: 0 to 9 1633 The upper case letters: A to Z 1634 The following special set: / - . & ( ) space. 1636 Space is not allowed as an embedded character. 1638 9(n) - A numeric field of length n octets. 1640 U(n) - A binary field of length n octets. 1642 Numbers encoded as binary are always unsigned and in 1643 network byte order. 1645 T(n) - An field of length n octets, encoded using [UTF-8]. 1647 String and alphanumeric fields are always left justified and right 1648 padded with spaces where needed. 1650 Numeric fields are always right justified and left padded with 1651 zeros where needed. 1653 Reserved fields should be padded with spaces. 1655 5.3.1 SSRM - Start Session Ready Message 1657 o-------------------------------------------------------------------o 1658 | SSRM Start Session Ready Message | 1659 | | 1660 | Start Session Phase Initiator <---- Responder | 1661 |-------------------------------------------------------------------| 1662 | Pos | Field | Description | Format | 1663 |-----+-----------+---------------------------------------+---------| 1664 | 0 | SSRMCMD | SSRM Command, 'I' | F X(1) | 1665 | 1 | SSRMMSG | Ready Message, 'ODETTE FTP READY ' | F X(17) | 1666 | 18 | SSRMCR | Carriage Return | F X(1) | 1667 o-------------------------------------------------------------------o 1669 SSRMCMD Command Code Character 1671 Value: 'I' SSRM Command identifier. 1673 SSRMMSG Ready Message String(17) 1675 Value: 'ODETTE FTP READY ' 1677 SSRMCR Carriage Return Character 1679 Value: Character with hex value '0D' or '8D'. 1681 5.3.2 SSID - Start Session 1683 o-------------------------------------------------------------------o 1684 | SSID Start Session | 1685 | | 1686 | Start Session Phase Initiator <---> Responder | 1687 |-------------------------------------------------------------------| 1688 | Pos | Field | Description | Format | 1689 |-----+-----------+---------------------------------------+---------| 1690 | 0 | SSIDCMD | SSID Command 'X' | F X(1) | 1691 | 1 | SSIDLEV | Protocol Release Level | F 9(1) | 1692 | 2 | SSIDCODE | Initiator's Identification Code | V X(25) | 1693 | 27 | SSIDPSWD | Initiator's Password | V X(8) | 1694 | 35 | SSIDSDEB | Data Exchange Buffer Size | V 9(5) | 1695 | 40 | SSIDSR | Send / Receive Capabilities (S/R/B) | F X(1) | 1696 | 41 | SSIDCMPR | Buffer Compression Indicator (Y/N) | F X(1) | 1697 | 42 | SSIDREST | Restart Indicator (Y/N) | F X(1) | 1698 | 43 | SSIDSPEC | Special Logic Indicator (Y/N) | F X(1) | 1699 | 44 | SSIDCRED | Credit | V 9(3) | 1700 | 47 | SSIDAUTH | Secure Authentication (Y/N) | F X(1) | 1701 | 48 | SSIDRSV1 | Reserved | F X(4) | 1702 | 52 | SSIDUSER | User Data | V X(8) | 1703 | 60 | SSIDCR | Carriage Return | F X(1) | 1704 o-------------------------------------------------------------------o 1706 SSIDCMD Command Code Character 1708 Value: 'X' SSID Command identifier. 1710 SSIDLEV Protocol Release Level Numeric(1) 1712 Used to specify the level of the ODETTE-FTP protocol 1714 Value: '1' for Revision 1.2 1715 '2' for Revision 1.3 1716 '4' for Revision 1.4 1717 '5' for Revision 2.0 1719 Future release levels will have higher numbers. The 1720 protocol release level is negotiable, with the lowest level 1721 being selected. 1723 Note: ODETTE File Transfer Protocol 1.3 (RFC2204) specifies 1724 '1' for the release level, despite adhering to 1725 revision 1.3. 1727 SSIDCODE Initiator's Identification Code String(25) 1729 Format: See Identification Code (Section 5.4) 1731 Uniquely identifies the Initiator (sender) participating 1732 in the ODETTE-FTP session. 1734 SSIDPSWD Password String(8) 1736 Key to authenticate the sender. Assigned by bilateral 1737 agreement. 1739 SSIDSDEB Data Exchange Buffer Size Numeric(5) 1741 Minimum: 128 1742 Maximum: 99999 1744 The length, in octets, of the largest Data Exchange Buffer 1745 that can be accepted by the location. The length includes 1746 the command octet but does not include the Stream 1747 Transmission Header. 1749 After negotiation the smallest size will be selected. 1751 SSIDSR Send / Receive Capabilities Character 1753 Value: 'S' Location can only send files. 1754 'R' Location can only receive files. 1755 'B' Location can both send and receive files. 1757 Sending and receiving will be serialised during the 1758 session, so parallel transmissions will not take place in 1759 the same session. 1761 An error occurs if adjacent locations both specify the send 1762 or receive capability. 1764 SSIDCMPR Buffer Compression Indication Character 1766 Value: 'Y' The location can handle OFTP data buffer compression 1767 'N' The location can not handle OFTP buffer compression 1769 Compression is only used if supported by both locations. 1771 The compression mechanism referred to here applies to each 1772 individual OFTP data buffer. This is different from 1773 the file compression mechanism in OFTP which involves the 1774 compression of whole files. 1776 SSIDREST Restart Indication Character 1778 Value: 'Y' The location can handle the restart of a partially 1779 transmitted file. 1780 'N' The location can not restart a file. 1782 SSIDSPEC Special Logic Indication Character 1784 Value: 'Y' Location can handle Special Logic 1785 'N' Location can not handle Special Logic 1787 Special Logic is only used if supported by both locations. 1789 The Special Logic extensions are only useful to access an 1790 X.25 network via an asynchronous entry and are not 1791 supported for TCP/IP connections. 1793 SSIDCRED Credit Numeric(3) 1795 Maximum: 999 1797 The number of consecutive Data Exchange Buffers sent by the 1798 Speaker before it must wait for a Credit (CDT) command from 1799 the Listener. 1801 The credit value is only applied to Data flow in the Data 1802 Transfer phase. 1804 The Speaker's available credit is initialised to SSIDCRED 1805 when it receives a Start File Positive Answer (SFPA) 1806 command from the Listener. It is zeroed by the End File 1807 (EFID) command. 1809 After negotiation, the smallest size must be selected in 1810 the answer of the Responder, otherwise a protocol error 1811 will abort the session. 1813 Negotiation of the "credit-window-size" parameter. 1815 Window Size m -- SSID ------------> 1816 <------------ SSID -- Window Size n 1817 (n less or equal m) 1818 Note: negotiated value will be "n". 1820 SSIDAUTH Secure Authentication Character 1822 Value: 'Y' The location requires secure authentication. 1823 'N' The location does not require secure authentication. 1825 Secure authentication is only used if agreed by both 1826 locations. 1828 If the answer of the Responder does not match with the 1829 authentication requirements of the Initiator, then the 1830 Initiator must abort the session. 1832 No negotiation of authentication is allowed. 1834 authentication p -- SSID ------------> 1835 <------------ SSID -- authentication q 1837 p == q -> continue. 1838 p != q -> abort. 1840 SSIDRSV1 Reserved String(4) 1842 This field is reserved for future use. 1844 SSIDUSER User Data String(8) 1846 May be used by the ODETTE-FTP in any way. If unused it 1847 should be initialised to spaces. It is expected that a 1848 bilateral agreement exists as to the meaning of the data. 1850 SSIDCR Carriage Return Character 1852 Value: Character with hex value '0D' or '8D'. 1854 5.3.3 SFID - Start File 1856 o-------------------------------------------------------------------o 1857 | SFID Start File | 1858 | | 1859 | Start File Phase Speaker ----> Listener | 1860 |-------------------------------------------------------------------| 1861 | Pos | Field | Description | Format | 1862 |-----+-----------+---------------------------------------+---------| 1863 | 0 | SFIDCMD | SFID Command, 'H' | F X(1) | 1864 | 1 | SFIDDSN | Virtual File Dataset Name | V X(26) | 1865 | 27 | SFIDRSV1 | Reserved | F X(3) | 1866 | 30 | SFIDDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) | 1867 | 38 | SFIDTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) | 1868 | 48 | SFIDUSER | User Data | V X(8) | 1869 | 56 | SFIDDEST | Destination | V X(25) | 1870 | 81 | SFIDORIG | Originator | V X(25) | 1871 | 106 | SFIDFMT | File Format (F/V/U/T) | F X(1) | 1872 | 107 | SFIDLRECL | Maximum Record Size | V 9(5) | 1873 | 112 | SFIDFSIZ | File Size, 1K blocks | V 9(13) | 1874 | 125 | SFIDOSIZ | Original File Size, 1K blocks | V 9(13) | 1875 | 138 | SFIDREST | Restart Position | V 9(17) | 1876 | 155 | SFIDSEC | Security Level | F 9(2) | 1877 | 157 | SFIDCIPH | Cipher suite selection | F 9(2) | 1878 | 159 | SFIDCOMP | File compression algorithm | F 9(1) | 1879 | 160 | SFIDENV | File enveloping format | F 9(1) | 1880 | 161 | SFIDSIGN | Signed EERP request | F X(1) | 1881 | 162 | SFIDDESCL | Virtual File Description length | V 9(3) | 1882 | 165 | SFIDDESC | Virtual File Description | V T(n) | 1883 o-------------------------------------------------------------------o 1885 SFIDCMD Command Code Character 1887 Value: 'H' SFID Command identifier. 1889 SFIDDSN Virtual File Dataset Name String(26) 1891 Dataset name of the Virtual File being transferred, 1892 assigned by bilateral agreement. 1894 No general structure is defined for this attribute. 1896 See Virtual Files - Identification (Section 1.5.2) 1898 SFIDRSV1 Reserved String(3) 1900 This field is reserved for future use. 1902 SFIDDATE Virtual File Date stamp Numeric(8) 1904 Format: 'CCYYMMDD' 8 decimal digits representing the century, 1905 year, month and day. 1907 Date stamp assigned by the Virtual File's Originator 1908 indicating when the file was made available for 1909 transmission. 1911 See Virtual Files - Identification (Section 1.5.2) 1913 SFIDTIME Virtual File Time stamp Numeric(10) 1915 Format: 'HHMMSScccc' 10 decimal digits representing hours, 1916 minutes, seconds and a counter (0001-9999), which gives 1917 higher resolution 1919 Time stamp assigned by the Virtual File's Originator 1920 indicating when the file was made available for 1921 transmission. 1923 See Virtual Files - Identification (Section 1.5.2) 1925 SFIDUSER User Data String(8) 1927 May be used by the ODETTE-FTP in any way. If unused it 1928 should be initialised to spaces. It is expected that a 1929 bilateral agreement exists as to the meaning of the data. 1931 SFIDDEST Destination String(25) 1933 Format: See Identification Code (Section 5.4) 1935 The Final Recipient of the Virtual File. 1937 This is the location that will look into the Virtual File 1938 content and perform mapping functions. It is also the 1939 location that creates the End to End Response (EERP) 1940 command for the received file. 1942 SFIDORIG Originator String(25) 1944 Format: See Identification Code (Section 5.4) 1946 Originator of the Virtual File. 1947 It is the location that created (mapped) the data for 1948 transmission. 1950 SFIDFMT File Format Character 1952 Value: 'F' Fixed format binary file 1953 'V' Variable format binary file 1954 'U' Unstructured binary file 1955 'T' Text 1957 Virtual File format. Used to calculate the restart 1958 position. (Section 1.5.3) 1960 Once a file has been signed, compressed and/or encrypted, 1961 in file format terms it becomes unstructured, format U. 1962 The record boundaries are no longer discernable until the 1963 file is decrypted, decompressed and/or verified. SFID File 1964 Format Field in this scenario indicates the format of the 1965 original file and the transmitted file must be treated as 1966 U format. 1968 SFIDLRECL Maximum Record Size Numeric(5) 1970 Maximum: 99999 1972 Length in octets of the longest logical record which may be 1973 transferred to a location. Only user data is included. 1975 If SFIDFMT is 'T' or 'U' then this attribute must be set to 1976 '00000'. 1978 If SFIDFMT is 'V' and the file is compressed, encrypted or 1979 signed then the maximum value of SFIDRECL is '65536'. 1981 SFIDFSIZ Transmitted File Size Numeric(13) 1983 Maximum: 9999999999999 1985 Space in 1K (1024 octet) blocks required at the Originator 1986 location to store the actual Virtual File that is to be 1987 transmitted. 1989 e.g. if a file is compressed before sending, then this is 1990 the space required to store the compressed file. 1992 This parameter is intended to provide only a good estimate 1993 of the Virtual File size. 1995 13 digits allows for a maximum file size of approximately 1996 9.3PB (petabytes) to be transmitted. 1998 SFIDOSIZ Original File Size Numeric(13) 2000 Maximum: 9999999999999 2002 Space in 1K (1024 octet) blocks required at the Originator 2003 location to store the original before it was signed, 2004 compressed and/or encrypted. 2006 If no security or compression services have been used, 2007 SFIDOSIZ should contain the same value as SFIDFSIZ. 2009 If the original file size is not known, the value zero 2010 should be used. 2012 This parameter is intended to provide only a good estimate 2013 of the original file size. 2015 The sequence of events in file exchange are: 2017 (a) raw data file ready to be sent 2018 SFIDOSIZ = Original File Size 2020 (b) signing/compression/encryption 2022 (c) transmission 2023 SFIDFSIZ = Transmitted File Size 2025 (d) decryption/decompression/verification 2027 (e) received raw data file for in-house applications 2028 SFIDOSIZ = Original File Size 2030 The Transmitted File Size at (c) indicates to the receiver 2031 how much storage space is needed to receive the file. 2033 The Original File Size at (e) indicates to the in-house 2034 application how much storage space is needed to process the 2035 file. 2037 SFIDREST Restart Position Numeric(17) 2039 Maximum: 99999999999999999 2041 Virtual File restart position. 2043 The count represents the: 2044 - Record Number if SSIDFMT is 'F' or 'V'. 2045 - File offset in 1K (1024 octet) blocks if SFIDFMT is 2046 'U' or 'T'. 2048 The count will express the transmitted user data (i.e. 2049 before ODETTE-FTP buffer compression, header not included). 2051 After negotiation between adjacent locations, 2052 retransmission will start at the lowest value. 2054 Once a file has been signed, compressed and/or encrypted, 2055 in file format terms, it has become unstructured, like 2056 format U. The file should be treated as format U for the 2057 purposes of restart, regardless of the actual value in 2058 SFIDFMT. 2060 SFIDSEC Security Level Numeric(2) 2062 Value: '00' No security services 2063 '01' Encrypted 2064 '02' Signed 2065 '03' Encrypted and signed 2067 Indicates whether the file has been signed and/or encrypted 2068 before transmission. 2070 SFIDCIPH Cipher suite selection Numeric(2) 2072 Value: '00' No security services 2073 '01' See Section 10.2 2075 Indicates the cipher suite used to sign and/or encrypt 2076 the file and also to indicate the cipher suite that should 2077 be used when a signed EERP or NERP is requested. 2079 SFIDCOMP File compression algorithm Numeric(1) 2081 Value: '0' No compression 2082 '1' Compressed with [ZLIB] algorithm 2084 Indicates the algorithm used to compress the file. 2086 SFIDENV File enveloping format Numeric(1) 2088 Value: '0' No envelope 2089 '1' File is enveloped using [CMS] 2091 Indicates the enveloping format used in the file. 2093 If the file is encrypted/signed/compressed or is an 2094 enveloped file for the exchange and revocation of 2095 certificates, this field must be set accordingly. 2097 SFIDSIGN Signed EERP request Character 2099 Value: 'Y' The EERP returned in acknowledgement of the file 2100 must be signed 2101 'N' The EERP must not be signed 2103 Requests whether the EERP returned for the file must 2104 be signed. 2106 SFIDDESCL Virtual File Description length Numeric(3) 2108 Length in octets of the field SFIDDESC. 2110 A value of 0 indicates that no description is present. 2112 SFIDDESC Virtual File Description [UTF-8](n) 2114 May be used by the ODETTE-FTP in any way. If not used, 2115 SFIDDESCL should be set to zero. 2117 No general structure is defined for this attribute but it 2118 is expected that a bilateral agreement exists as to the 2119 meaning of the data. 2121 It is encoded using [UTF-8] to support a range of national 2122 languages. 2124 Maximum length of the encoded value is 999 octets. 2126 5.3.4 SFPA - Start File Positive Answer 2128 o-------------------------------------------------------------------o 2129 | SFPA Start File Positive Answer | 2130 | | 2131 | Start File Phase Speaker <---- Listener | 2132 |-------------------------------------------------------------------| 2133 | Pos | Field | Description | Format | 2134 |-----+-----------+---------------------------------------+---------| 2135 | 0 | SFPACMD | SFPA Command, '2' | F X(1) | 2136 | 1 | SFPAACNT | Answer Count | V 9(17) | 2137 o-------------------------------------------------------------------o 2139 SFPACMD Command Code Character 2141 Value: '2' SFPA Command identifier. 2143 SFPAACNT Answer Count Numeric(17) 2145 The Listener must enter a count lower or equal to the 2146 restart count specified by the Speaker in the Start File 2147 (SFID) command. The count expresses the received user 2148 data. If restart facilities are not available, a count of 2149 zero must be specified. 2151 5.3.5 SFNA - Start File Negative Answer 2153 o-------------------------------------------------------------------o 2154 | SFNA Start File Negative Answer | 2155 | | 2156 | Start File Phase Speaker <---- Listener | 2157 |-------------------------------------------------------------------| 2158 | Pos | Field | Description | Format | 2159 |-----+-----------+---------------------------------------+---------| 2160 | 0 | SFNACMD | SFNA Command, '3' | F X(1) | 2161 | 1 | SFNAREAS | Answer Reason | F 9(2) | 2162 | 3 | SFNARRTR | Retry Indicator, (Y/N) | F X(1) | 2163 | 4 | SFNAREASL | Answer Reason Text Length | V 9(3) | 2164 | 7 | SFNAREAST | Answer Reason Text | V T(n) | 2165 o-------------------------------------------------------------------o 2167 SFNACMD Command Code Character 2169 Value: '3' SFNA Command identifier. 2171 SFNAREAS Answer Reason Numeric(2) 2173 Value: '01' Invalid filename. 2174 '02' Invalid destination. 2175 '03' Invalid origin. 2176 '04' Storage record format not supported. 2177 '05' Maximum record length not supported. 2178 '06' File size is too big. 2179 '10' Invalid record count. 2180 '11' Invalid byte count. 2181 '12' Access method failure. 2182 '13' Duplicate file. 2183 '14' File direction refused. 2184 '15' Cipher suite not supported. 2185 '16' Encrypted file not allowed. 2186 '17' Unencrypted file not allowed. 2187 '18' Compression not allowed. 2188 '19' Signed file not allowed. 2189 '20' Unsigned file not allowed. 2190 '99' Unspecified reason. 2192 Reason why transmission can not proceed. 2194 SFNARRTR Retry Indicator Character 2196 Value: 'N' Transmission should not be retried. 2197 'Y' The transmission may be retried later. 2199 This parameter is used to advise the Speaker if it should 2200 retry at a later time due to a temporary condition at the 2201 Listener site, such as a lack of storage space. It 2202 should be used in conjunction with the Answer Reason code 2203 (SFNAREAS). 2205 An invalid file name error code may be the consequence of a 2206 problem in the mapping of the Virtual File on to a real 2207 file. Such problems cannot always be resolved immediately. 2208 It is therefore recommended that when a SFNA with Retry = Y 2209 is received the User Monitor attempts to retransmit the 2210 relevant file in a subsequent session. 2212 SFNAREASL Answer Reason Text Length Numeric(3) 2214 Length in octets of the field SFNAREAST. 2216 0 indicates that no SFNAREAST field follows. 2218 SFNAREAST Answer Reason Text [UTF-8](n) 2220 Reason why transmission can not proceed in plain text. 2222 It is encoded using [UTF-8]. 2224 Maximum length of the encoded reason is 999 octets. 2226 No general structure is defined for this attribute. 2228 5.3.6 DATA - Data Exchange Buffer 2230 o-------------------------------------------------------------------o 2231 | DATA Data Exchange Buffer | 2232 | | 2233 | Data Transfer Phase Speaker ----> Listener | 2234 |-------------------------------------------------------------------| 2235 | Pos | Field | Description | Format | 2236 |-----+-----------+---------------------------------------+---------| 2237 | 0 | DATACMD | DATA Command, 'D' | F X(1) | 2238 | 1 | DATABUF | Data Exchange Buffer payload | V U(n) | 2239 o-------------------------------------------------------------------o 2241 DATACMD Command Code Character 2243 Value: 'D' DATA Command identifier. 2245 DATABUF Data Exchange Buffer payload Binary(n) 2247 Variable length buffer containing the data payload. The 2248 Data Exchange Buffer is described in Section 6. 2250 5.3.7 CDT - Set Credit 2252 o-------------------------------------------------------------------o 2253 | CDT Set Credit | 2254 | | 2255 | Data Transfer Phase Speaker <---- Listener | 2256 |-------------------------------------------------------------------| 2257 | Pos | Field | Description | Format | 2258 |-----+-----------+---------------------------------------+---------| 2259 | 0 | CDTCMD | CDT Command, 'C' | F X(1) | 2260 | 1 | CDTRSV1 | Reserved | F X(2) | 2261 o-------------------------------------------------------------------o 2263 CDTCMD Command Code Character 2265 Value: 'C' CDT Command identifier. 2267 CDTRSV1 Reserved String(2) 2269 This field is reserved for future use. 2271 5.3.8 EFID - End File 2273 o-------------------------------------------------------------------o 2274 | EFID End File | 2275 | | 2276 | End File Phase Speaker ----> Listener | 2277 |-------------------------------------------------------------------| 2278 | Pos | Field | Description | Format | 2279 |-----+-----------+---------------------------------------+---------| 2280 | 0 | EFIDCMD | EFID Command, 'T' | F X(1) | 2281 | 1 | EFIDRCNT | Record Count | V 9(17) | 2282 | 18 | EFIDUCNT | Unit Count | V 9(17) | 2283 o-------------------------------------------------------------------o 2285 EFIDCMD Command Code Character 2287 Value: 'T' EFID Command identifier. 2289 EFIDRCNT Record Count Numeric(17) 2291 Maximum: 99999999999999999 2293 For SSIDFMT 'F' or 'V' the exact record count. 2294 For SSIDFMT 'U' or 'T' zeros. 2296 The count will express the real size of the file (before 2297 buffer compression, header not included). The total count 2298 is always used, even during restart processing. 2300 EFIDUCNT Unit Count Numeric(17) 2302 Maximum: 99999999999999999 2304 Exact number of units (octets) transmitted. 2306 The count will express the real size of the file. The 2307 total count is always used, even during restart processing. 2309 5.3.9 EFPA - End File Positive Answer 2311 o-------------------------------------------------------------------o 2312 | EFPA End File Positive Answer | 2313 | | 2314 | End File Phase Speaker <---- Listener | 2315 |-------------------------------------------------------------------| 2316 | Pos | Field | Description | Format | 2317 |-----+-----------+---------------------------------------+---------| 2318 | 0 | EFPACMD | EFPA Command, '4' | F X(1) | 2319 | 1 | EFPACD | Change Direction Indicator, (Y/N) | F X(1) | 2320 o-------------------------------------------------------------------o 2322 EFPACMD Command Code Character 2324 Value: '4' EFPA Command identifier. 2326 EFPACD Change Direction Indicator Character 2328 Value: 'N' Change direction not requested. 2329 'Y' Change direction requested. 2331 This parameter allows the Listener to request a Change 2332 Direction (CD) command from the Speaker. 2334 5.3.10 EFNA - End File Negative Answer 2336 o-------------------------------------------------------------------o 2337 | EFNA End File Negative Answer | 2338 | | 2339 | End File Phase Speaker <---- Listener | 2340 |-------------------------------------------------------------------| 2341 | Pos | Field | Description | Format | 2342 |-----+-----------+---------------------------------------+---------| 2343 | 0 | EFNACMD | EFNA Command, '5' | F X(1) | 2344 | 1 | EFNAREAS | Answer Reason | F 9(2) | 2345 | 3 | EFNAREASL | Answer Reason Text Length | V 9(3) | 2346 | 6 | EFNAREAST | Answer Reason Text | V T(n) | 2347 o-------------------------------------------------------------------o 2349 EFNACMD Command Code Character 2351 Value: '5' EFNA Command identifier. 2353 EFNAREAS Answer Reason Numeric(2) 2355 Value: '01' Invalid filename. 2356 '02' Invalid destination. 2357 '03' Invalid origin. 2358 '04' Storage record format not supported. 2359 '05' Maximum record length not supported. 2360 '06' File size is too big. 2361 '10' Invalid record count. 2362 '11' Invalid byte count. 2363 '12' Access method failure. 2364 '13' Duplicate file. 2365 '14' File direction refused. 2366 '15' Cipher suite not supported. 2367 '16' Encrypted file not allowed. 2368 '17' Unencrypted file not allowed. 2369 '18' Compression not allowed. 2370 '19' Signed file not allowed. 2371 '20' Unsigned file not allowed. 2372 '21' Invalid file signature. 2373 '22' File decryption failure. 2374 '23' File decompression failure. 2375 '99' Unspecified reason. 2377 Reason why transmission failed. 2379 EFNAREASL Answer Reason Text Length Numeric(3) 2381 Length in octets of the field EFNAREAST. 2383 0 indicates that no EFNAREAST field follows. 2385 EFNAREAST Answer Reason Text [UTF-8](n) 2387 Reason why transmission failed in plain text. 2389 It is encoded using [UTF-8]. 2391 Maximum length of the encoded reason is 999 octets. 2393 No general structure is defined for this attribute. 2395 5.3.11 ESID - End Session 2397 o-------------------------------------------------------------------o 2398 | ESID End Session | 2399 | | 2400 | End Session Phase Speaker ----> Listener | 2401 |-------------------------------------------------------------------| 2402 | Pos | Field | Description | Format | 2403 |-----+-----------+---------------------------------------+---------| 2404 | 0 | ESIDCMD | ESID Command, 'F' | F X(1) | 2405 | 1 | ESIDREAS | Reason Code | F 9(2) | 2406 | 3 | ESIDREASL | Reason Text Length | V 9(3) | 2407 | 6 | ESIDREAST | Reason Text | V T(n) | 2408 | | ESIDCR | Carriage Return | F X(1) | 2409 o-------------------------------------------------------------------o 2411 ESIDCMD Command Code Character 2413 Value: 'F' ESID Command identifier. 2415 ESIDREAS Reason Code Numeric(2) 2417 Value '00' Normal session termination 2419 '01' Command not recognised 2421 An Exchange Buffer contains an invalid command code 2422 (1st octet of the buffer). 2424 '02' Protocol violation 2426 An Exchange Buffer contains an invalid command for 2427 the current state of the receiver. 2429 '03' User code not known 2431 A Start Session (SSID) command contains an unknown or 2432 invalid Identification Code. 2434 '04' Invalid password 2436 A Start Session (SSID) command contained an invalid 2437 password. 2439 '05' Local site emergency close down 2441 The local site has entered an emergency close down 2442 mode. Communications are being forcibly terminated. 2444 '06' Command contained invalid data 2446 A field within a Command Exchange buffer contains 2447 invalid data. 2449 '07' Exchange Buffer size error 2451 The length of the Exchange Buffer as determined by 2452 the Stream Transmission Header differs from the 2453 length implied by the Command Code. 2455 '08' Resources not available 2457 The request for connection has been denied due to a 2458 resource shortage. The connection attempt should be 2459 retried later. 2461 '09' Time out 2463 '10' Mode or capabilities incompatible 2465 '11' Invalid challenge response 2467 '12' Secure authentication requirements incompatible 2469 '99' Unspecified Abort code 2471 An error was detected for which no specific code is 2472 defined. 2474 ESIDREASL Reason Text Length Numeric(3) 2476 Length in octets of the field ESIDREAST. 2478 0 indicates that no ESIDREAST field is present. 2480 ESIDREAST Reason Text [UTF-8](n) 2482 Reason why session ended in plain text. 2484 It is encoded using [UTF-8]. 2486 Maximum length of the encoded reason is 999 octets. 2488 No general structure is defined for this attribute. 2490 ESIDCR Carriage Return Character 2492 Value: Character with hex value '0D' or '8D'. 2494 5.3.12 CD - Change Direction 2496 o-------------------------------------------------------------------o 2497 | CD Change Direction | 2498 | | 2499 | Start File Phase Speaker ----> Listener | 2500 | End File Phase Speaker ----> Listener | 2501 | End Session Phase Initiator <---> Responder | 2502 |-------------------------------------------------------------------| 2503 | Pos | Field | Description | Format | 2504 |-----+-----------+---------------------------------------+---------| 2505 | 0 | CDCMD | CD Command, 'R' | F X(1) | 2506 o-------------------------------------------------------------------o 2508 CDCMD Command Code Character 2510 Value: 'R' CD Command identifier. 2512 5.3.13 EERP - End to End Response 2514 o-------------------------------------------------------------------o 2515 | EERP End to End Response | 2516 | | 2517 | Start File Phase Speaker ----> Listener | 2518 | End File Phase Speaker ----> Listener | 2519 |-------------------------------------------------------------------| 2520 | Pos | Field | Description | Format | 2521 |-----+-----------+---------------------------------------+---------| 2522 | 0 | EERPCMD | EERP Command, 'E' | F X(1) | 2523 | 1 | EERPDSN | Virtual File Dataset Name | V X(26) | 2524 | 27 | EERPRSV1 | Reserved | F X(3) | 2525 | 30 | EERPDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) | 2526 | 38 | EERPTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) | 2527 | 48 | EERPUSER | User Data | V X(8) | 2528 | 56 | EERPDEST | Destination | V X(25) | 2529 | 81 | EERPORIG | Originator | V X(25) | 2530 | 106 | EERPHSHL | Virtual File Hash length | V U(2) | 2531 | 108 | EERPHSH | Virtual File Hash | V U(n) | 2532 | | EERPSIGL | EERP signature length | V U(2) | 2533 | | EERPSIG | EERP signature | V U(n) | 2534 o-------------------------------------------------------------------o 2536 EERPCMD Command Code Character 2538 Value: 'E' EERP Command identifier. 2540 EERPDSN Virtual File Dataset Name String(26) 2542 Dataset name of the Virtual File being transferred, 2543 assigned by bilateral agreement. 2545 No general structure is defined for this attribute. 2547 See Virtual Files - Identification (Section 1.5.2) 2549 EERPRSV1 Reserved String(3) 2551 This field is reserved for future use. 2553 EERPDATE Virtual File Date stamp Numeric(8) 2555 Format: 'CCYYMMDD' 8 decimal digits representing the century, 2556 year, month and day respectively. 2558 Date stamp assigned by the Virtual File's Originator 2559 indicating when the file was made available for 2560 transmission. 2562 See Virtual Files - Identification (Section 1.5.2) 2564 EERPTIME Virtual File Time stamp Numeric(10) 2566 Format: 'HHMMSScccc' 10 decimal digits representing hours, 2567 minutes, seconds and a counter (0001-9999), which gives 2568 higher resolution 2570 Time stamp assigned by the Virtual File's Originator 2571 indicating when the file was made available for 2572 transmission. 2574 See Virtual Files - Identification (Section 1.5.2) 2576 EERPUSER User Data String(8) 2578 May be used by the ODETTE-FTP in any way. If unused it 2579 should be initialised to spaces. It is expected that a 2580 bilateral agreement exists as to the meaning of the data. 2582 EERPDEST Destination String(25) 2584 Format: See Identification Code (Section 5.4) 2586 Originator of the Virtual File. 2588 This is the location that created the data for 2589 transmission. 2591 EERPORIG Originator String(25) 2593 Format: See Identification Code (Section 5.4) 2595 Final Recipient of the Virtual File. 2597 This is the location that will look into the Virtual File 2598 content and process it accordingly. It is also the 2599 location that creates the EERP for the received file. 2601 EERPHSHL Virtual File hash length Binary(2) 2603 Length in octets of the field EERPHSH. 2605 A binary value of 0 indicates that no hash is present. 2606 This is always the case if the EERP is not signed. 2608 EERPHSH Virtual File hash Binary(n) 2610 Hash of the transmitted Virtual File. 2611 i.e. not the hash of the original file. 2613 The algorithm used is determined by the bilaterally agreed 2614 cipher suite specified in the SFIDCIPH. 2616 EERPSIGL EERP Signature length Binary(2) 2618 0 indicates that this EERP has not been signed. 2620 Any other value indicates the length of EERPSIG in octets 2621 and indicates that this EERP has been signed. 2623 EERPSIG EERP Signature Binary(n) 2625 Contains the [CMS] enveloped signature of the EERP. 2627 Signature = Sign{EERPDSN 2628 EERPDATE 2629 EERPTIME 2630 EERPDEST 2631 EERPORIG 2632 EERPHSH} 2634 Each field is taken in its entirety, including any 2635 padding. The envelope must contain the original data, 2636 not just the signature. 2638 5.3.14 NERP - Negative End Response 2640 o-------------------------------------------------------------------o 2641 | NERP Negative End Response | 2642 | | 2643 | Start File Phase Speaker ----> Listener | 2644 | End File Phase Speaker ----> Listener | 2645 |-------------------------------------------------------------------| 2646 | Pos | Field | Description | Format | 2647 |-----+-----------+---------------------------------------+---------| 2648 | 0 | NERPCMD | NERP Command, 'N' | F X(1) | 2649 | 1 | NERPDSN | Virtual File Dataset Name | V X(26) | 2650 | 27 | NERPRSV1 | Reserved | F X(6) | 2651 | 33 | NERPDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) | 2652 | 41 | NERPTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) | 2653 | 51 | NERPDEST | Destination | V X(25) | 2654 | 76 | NERPORIG | Originator | V X(25) | 2655 | 101 | NERPCREA | Creator of NERP | V X(25) | 2656 | 126 | NERPREAS | Reason code | F 9(2) | 2657 | 128 | NERPREASL | Reason text length | V 9(3) | 2658 | 131 | NERPREAST | Reason text | V T(n) | 2659 | | NERPHSHL | Virtual File hash length | V U(2) | 2660 | | NERPHSH | Virtual File hash | V U(n) | 2661 | | NERPSIGL | NERP signature length | V U(2) | 2662 | | NERPSIG | NERP signature | V U(n) | 2663 o-------------------------------------------------------------------o 2665 NERPCMD Command Code Character 2667 Value: 'N' NERP Command identifier. 2669 NERPDSN Virtual File Dataset Name String(26) 2671 Dataset name of the Virtual File being transferred, 2672 assigned by bilateral agreement. 2674 No general structure is defined for this attribute. 2676 See Virtual Files - Identification (Section 1.5.2) 2678 NERPRSV1 Reserved String(6) 2680 This field is reserved for future use. 2682 NERPDATE Virtual File Date stamp Numeric(8) 2684 Format: 'CCYYMMDD' 8 decimal digits representing the century, 2685 year, month and day respectively. 2687 Date stamp assigned by the Virtual File's Originator 2688 indicating when the file was made available for 2689 transmission. 2691 See Virtual Files - Identification (Section 1.5.2) 2693 NERPTIME Virtual File Time stamp Numeric(10) 2695 Format: 'HHMMSScccc' 10 decimal digits representing hours, 2696 minutes, seconds and a counter (0001-9999), which gives 2697 higher resolution 2699 Time stamp assigned by the Virtual File's Originator 2700 indicating when the file was made available for 2701 transmission. 2703 See Virtual Files - Identification (Section 1.5.2) 2705 NERPDEST Destination String(25) 2707 Format: See Identification Code (Section 5.4) 2709 Originator of the Virtual File. 2711 This is the location that created the data for 2712 transmission. 2714 NERPORIG Originator String(25) 2716 Format: See Identification Code (Section 5.4) 2718 The Final Recipient of the Virtual File. 2720 This is the location that will look into the Virtual File 2721 content and perform mapping functions. 2723 NERPCREA Creator of the NERP String(25) 2725 Format: See Identification Code (Section 5.4) 2727 It is the location that created the NERP. 2729 NERPREAS Reason code Numeric(2) 2731 This attribute will specify why transmission cannot 2732 proceed or why processing of the file failed. 2734 "SFNA(RETRY=N)" below should be interpreted as "EFNA or 2735 SFNA(RETRY=N)" where appropriate. 2737 Value '03' ESID received with reason code '03' 2738 ( user code not known ) 2739 '04' ESID received with reason code '04' 2740 ( invalid password ) 2741 '09' ESID received with reason code '99' 2742 ( unspecified reason ) 2743 '11' SFNA(RETRY=N) received with reason code '01' 2744 ( invalid file name ) 2745 '12' SFNA(RETRY=N) received with reason code '02' 2746 ( invalid destination ) 2747 '13' SFNA(RETRY=N) received with reason code '03' 2748 ( invalid origin ) 2749 '14' SFNA(RETRY=N) received with reason code '04' 2750 ( invalid storage record format ) 2751 '15' SFNA(RETRY=N) received with reason code '05' 2752 ( maximum record length not supported ) 2753 '16' SFNA(RETRY=N) received with reason code '06' 2754 ( file size too big ) 2755 '20' SFNA(RETRY=N) received with reason code '10' 2756 ( invalid record count ) 2757 '21' SFNA(RETRY=N) received with reason code '11' 2758 ( invalid byte count ) 2759 '22' SFNA(RETRY=N) received with reason code '12' 2760 ( access method failure ) 2761 '23' SFNA(RETRY=N) received with reason code '13' 2762 ( duplicate file ) 2763 '24' SFNA(RETRY=N) received with reason code '14' 2764 ( file direction refused ) 2765 '25' SFNA(RETRY=N) received with reason code '15' 2766 ( cipher suite not supported ) 2767 '26' SFNA(RETRY=N) received with reason code '16' 2768 ( encrypted file not allowed ) 2769 '27' SFNA(RETRY=N) received with reason code '17' 2770 ( unencrypted file not allowed ) 2771 '28' SFNA(RETRY=N) received with reason code '18' 2772 ( compression not allowed) 2773 '29' SFNA(RETRY=N) received with reason code '19' 2774 ( signed file not allowed) 2775 '30' SFNA(RETRY=N) received with reason code '20' 2776 (unsigned file not allowed) 2777 '31' File signature not valid. 2778 '32' File decompression failed. 2779 '33' File decryption failed. 2780 '34' File processing failed. 2781 '35' Not delivered to recipient. 2782 '36' Not acknowledged by recipient. 2783 '50' Transmission stopped by the operator. 2784 '90' File size incompatible with recipient's 2785 protocol version 2786 '99' Unspecified reason. 2788 NERPREASL Reason Text Length Numeric(3) 2790 Length in octets of the field NERPREAST. 2792 0 indicates that no NERPREAST field follows. 2794 NERPREAST Reason Text [UTF-8](n) 2796 Reason why transmission cannot proceed in plain text. 2798 It is encoded using [UTF-8]. 2800 Maximum length of the encoded reason is 999 octets. 2802 No general structure is defined for this attribute. 2804 NERPHSHL Virtual File hash length Binary(2) 2806 Length in octets of the field NERPHSH. 2808 A binary value of 0 indicates that no hash is present. 2809 This is always the case if the NERP is not signed. 2811 NERPHSH Virtual File hash Binary(n) 2813 Hash of the Virtual File being transmitted. 2815 The algorithm used is determined by the bilaterally agreed 2816 cipher suite specified in the SFIDCIPH. 2818 NERPSIGL NERP Signature length Binary(2) 2820 0 indicates that this NERP has not been signed. 2822 Any other value indicates the length of NERPSIG in octets 2823 and indicates that this NERP has been signed. 2825 NERPSIG NERP Signature Binary(n) 2827 Contains the [CMS] enveloped signature of the NERP. 2829 Signature = Sign{NERPDSN 2830 NERPDATE 2831 NERPTIME 2832 NERPDEST 2833 NERPORIG 2834 NERPCREA 2835 NERPHSH} 2837 Each field is taken in its entirety, including any 2838 padding. 2840 5.3.15 RTR - Ready To Receive 2842 o-------------------------------------------------------------------o 2843 | RTR Ready To Receive | 2844 | | 2845 | Start File Phase Initiator <---- Responder | 2846 | End File Phase Initiator <---- Responder | 2847 |-------------------------------------------------------------------| 2848 | Pos | Field | Description | Format | 2849 |-----+-----------+---------------------------------------+---------| 2850 | 0 | RTRCMD | RTR Command, 'P' | F X(1) | 2851 o-------------------------------------------------------------------o 2853 RTRCMD Command Code Character 2855 Value: 'P' RTR Command identifier. 2857 5.3.16 SECD - Security Change Direction 2859 o-------------------------------------------------------------------o 2860 | SECD Security Change Direction | 2861 | | 2862 | Start Session Phase Initiator <---> Responder | 2863 |-------------------------------------------------------------------| 2864 | Pos | Field | Description | Format | 2865 |-----+-----------+---------------------------------------+---------| 2866 | 0 | SECDCMD | SECD Command, 'J' | F X(1) | 2867 o-------------------------------------------------------------------o 2869 SECDCMD Command Code Character 2871 Value: 'J' SECD Command identifier. 2873 5.3.17 AUCH - Authentication Challenge 2875 o-------------------------------------------------------------------o 2876 | AUCH Authentication Challenge | 2877 | | 2878 | Start Session Phase Initiator <---> Responder | 2879 |-------------------------------------------------------------------| 2880 | Pos | Field | Description | Format | 2881 |-----+-----------+---------------------------------------+---------| 2882 | 0 | AUCHCMD | AUCH Command, 'A' | F X(1) | 2883 | 1 | AUCHCHAL | Challenge | V U(20) | 2884 o-------------------------------------------------------------------o 2886 AUCHCMD Command Code Character 2888 Value: 'A' AUCH Command identifier. 2890 AUCHCHAL Challenge Binary(20) 2892 A 20 byte random number uniquely generated each 2893 time an AUCH is sent. 2895 5.3.18 AURP - Authentication Response 2897 o-------------------------------------------------------------------o 2898 | AURP Authentication Response | 2899 | | 2900 | Start Session Phase Initiator <---> Responder | 2901 |-------------------------------------------------------------------| 2902 | Pos | Field | Description | Format | 2903 |-----+-----------+---------------------------------------+---------| 2904 | 0 | AURPCMD | AURP Command, 'S' | F X(1) | 2905 | 1 | AURPSGDL | Signed Challenge Length | V U(2) | 2906 | 3 | AURPSGD | Signed Challenge | V U(n) | 2907 o-------------------------------------------------------------------o 2909 AURPCMD Command Code Character 2911 Value: 'S' AURP Command identifier. 2913 AURPSGDL Signed challenge length Binary(2) 2915 Indicates the length of AURPSGD in octets. 2917 The length is expressed as an unsigned binary number using 2918 network byte order. 2920 AURPSGD Signed challenge Binary(n) 2922 Variable length field that is the challenge from the AUCH 2923 signed with the private key of the sender of the AURP and 2924 encoded into a [CMS] message. The [CMS] envelope must 2925 contain both the original challenge and the signature. 2927 5.4 Identification Code 2929 The Initiator (sender) and Responder (receiver) participating in an 2930 ODETTE-FTP session are uniquely identified by an Identification Code 2931 based on [ISO-6523], Structure for the Identification of 2932 Organisations (SIO). The locations are considered to be adjacent for 2933 the duration of the transmission. 2935 The SIO has the following format. 2937 o-------------------------------------------------------------------o 2938 | Pos | Field | Description | Format | 2939 |-----+-----------+---------------------------------------+---------| 2940 | 0 | SIOOID | ODETTE Identifier | F X(1) | 2941 | 1 | SIOICD | International Code Designator | V 9(4) | 2942 | 5 | SIOORG | Organisation Code | V X(14) | 2943 | 19 | SIOCSA | Computer Sub-Address | V X(6) | 2944 o-------------------------------------------------------------------o 2946 SIOOID ODETTE Identifier Character 2948 Value: 'O' Indicates ODETTE assigned Organisation Identifier. 2949 Other values may be used for non-ODETTE codes. 2951 SIOICD International Code Designator String(4) 2953 A code forming part of the Organisation Identifier. 2955 SIOORG Organisation Code String(14) 2957 A code forming part of the Organisation Identifier. This 2958 field may contain the letters A to Z, the digits 0 to 9, 2959 space and hyphen characters. 2961 SIOCSA Computer Sub-Address String(6) 2963 A locally assigned address which uniquely identifies a 2964 system within an organisation (defined by an Organisation 2965 Identifier). 2967 6. File Services 2969 6.1 Overview 2971 The ODETTE-FTP provides services for compressing, encrypting and 2972 signing files. These services should generally be performed 2973 off line, outside of the ODETTE-FTP communications session for 2974 performance reasons although this is not a strict requirement. 2976 The ODETTE-FTP requires that the following steps must be performed in 2977 this exact sequence, although any of steps 2, 3 or 4 may be omitted. 2978 Step 1 is required only if any of steps 2, 3, 0r 4 are performed: 2980 1. Insert record length indicators (V Format files only)(Section 6.5) 2981 2. Sign 2982 3. Compress 2983 4. Encrypt 2985 The cipher suite for the encryption and signing algorithms is 2986 assigned by bilateral agreement. 2988 Secured and/or compressed files must be enveloped. The envelope 2989 contains additional information about the service used that is 2990 necessary for a receiving party to fully process the file. 2992 6.2 File Signing 2994 Files that are to be signed are enveloped according to the file 2995 enveloping format (SFIDENV). Generally this will be as a 2996 [CMS] package. 2998 It is recommended that the envelope does not contain the public 2999 certificate of the signer. Where files are sent to the 3000 same recipient continuously, it would serve no benefit to repeatedly 3001 send the same certificate. The signature is an enveloped signature, 3002 as opposed to a detached signature. Both the orginal file data and 3003 signature are stored within the [CMS] package. 3005 6.3 File Encryption 3007 Files that are to be encrypted are enveloped according to the file 3008 enveloping format (SFIDENV). Generally this will be as a 3009 [CMS] package. 3011 It is recommended that encryption should be performed before the 3012 ODETTE-FTP session starts because a large file takes a long time to 3013 encrypt and could cause session time outs, even on high performance 3014 machines. 3016 Likewise, decryption of the file should occur outside of 3017 the session. Though it may be that an application chooses to allow 3018 in-session encryption and decryption for very small files. 3020 6.4 File Compression 3022 Files that are to be compressed are enveloped according to the 3023 file enveloping format (SFIDENV). Generally this will be as a 3024 [CMS] package using the [CMS Compressed] data type, which uses the 3025 [ZLIB] compression algorithm by default. 3027 Unlike the buffer compression method, this method operates on a 3028 whole file. Because of the increased levels of compression, file 3029 level compression essentially deprecates the older buffer 3030 compression inside ODETTE-FTP. The buffer compression is kept 3031 for backwards compatibility. 3033 6.5 V Format Files - Record Lengths 3035 A file that has been signed, compressed and/or encrypted will have 3036 lost its record structure, so ODETTE-FTP will not be able to insert 3037 the End of Record Flag in sub record headers in Data Exchange 3038 Buffers. To preserve the record structure, V format files must have 3039 record headers inserted into them prior to signing, compression or 3040 encryption. These 2 byte binary numbers, in network byte order, 3041 indicate the length of each record, allowing the receiving system, 3042 where appropriate, to recreate the files complete with the original 3043 variable length records. Note that the header bytes hold the number 3044 of data bytes in the record and don't include themselves. 3046 This is only applicable to V Format files, which themselves are 3047 typically only of concern for mainframes. 3049 7. ODETTE-FTP Data Exchange Buffer 3051 7.1 Overview 3053 Virtual Files are transmitted by mapping the Virtual File records 3054 into Data Exchange Buffers, the maximum length of which was 3055 negotiated between the ODETTE-FTP entities via the Start Session 3056 (SSID) commands exchanged during the Start Session Phase of the 3057 protocol. 3059 Virtual File records may be of arbitrary length. A simple 3060 compression scheme is defined for strings of repeated characters. 3062 An example of the use of the Data Exchange Buffer can be found in 3063 Appendix A. 3065 7.2 Data Exchange Buffer Format 3067 For transmission of Virtual File records, data is divided into 3068 Subrecords, each of which is preceded by a one octet Subrecord 3069 Header. 3071 The Data Exchange Buffer is made up of the initial Command character, 3073 o-------------------------------------------------------- 3074 | C | H | | H | | H | | / 3075 | M | D | SUBRECORD | D | SUBRECORD | D | SUBRECORD | /_ 3076 | D | R | | R | | R | | / 3077 o------------------------------------------------------- 3079 CMD 3081 The Data Exchange Buffer Command Character, 'D'. 3083 HDR 3085 A one octet Subrecord Header defined as follows: 3087 0 1 2 3 4 5 6 7 3088 o-------------------------------o 3089 | E | C | | 3090 | o | F | C O U N T | 3091 | R | | | 3092 o-------------------------------o 3094 Bits 3096 0 End of Record Flag 3098 Set to indicate that the next subrecord is the last 3099 subrecord of the current record. 3101 Unstructured files are transmitted as a single record, in 3102 this case the flag acts as an end of file marker. 3104 1 Compression Flag 3106 Set to indicate that the next subrecord is compressed. 3108 2-7 Subrecord Count 3110 The number of octets in the Virtual File represented by the 3111 next subrecord expressed as a binary value. 3113 For uncompressed data this is simply the length of the 3114 subrecord. 3116 For compressed data this is the number of times that the 3117 single octet in the following subrecord must be inserted in 3118 the Virtual File. 3120 As six bits are available, the next subrecord may 3121 represent between 0 and 63 octets of the Virtual File. 3123 7.3 Buffer Filling Rules 3125 A Data Exchange Buffer may be any length up to the value negotiated 3126 in the Start Session exchange. 3128 Virtual File records may be concatenated within one Data Exchange 3129 Buffer or split across a number of buffers. 3131 A subrecord is never split between two Exchange Buffers. If the 3132 remaining space in the current Exchange Buffer is insufficient to 3133 contain the next 'complete' subrecord one of the following strategies 3134 should be used: 3136 1. Truncate the Exchange Buffer, and put the complete 3137 subrecord (preceded by its header octet) in a new Exchange Buffer. 3139 2. Split the subrecord into two, filling the remainder of the 3140 Exchange Buffer with the first new subrecord and starting a new 3141 Exchange Buffer with the second. 3143 A record of length zero may appear anywhere in the Exchange Buffer. 3145 A subrecord of length zero may appear anywhere in the record and/or 3146 the Exchange Buffer. 3148 8. Stream Transmission Buffer 3150 8.1 Introduction 3152 To utilise the TCP stream a Stream Transmission Buffer (STB) is 3153 created by adding a Stream Transmission Header (STH) to the start 3154 of all Command and Data Exchange Buffers before they are passed to 3155 the TCP transport service. This allows the receiving ODETTE-FTP to 3156 recover the original Exchange Buffers. 3158 Note: The Stream Transmission Buffer is not used when using 3159 ODETTE-FTP over an X.25 network. 3161 This is because ODETTE-FTP can rely on the fact that the network 3162 service will preserve the sequence and boundaries of data units 3163 transmitted through the network and that the network service will 3164 pass the length of the data unit to the receiving ODETTE-FTP. 3165 TCP offers a stream based connection which does not provide 3166 these functions. 3168 The Stream Transmission Buffer comprises of a STH and OEB. 3170 o-----+-----------------+-----+--------------------+-----+------ 3171 | STH | OEB | STH | OEB | STH | OEB/ 3172 o-----+-----------------+-----+--------------------+-----+---- 3174 STH - Stream Transmission Header 3175 OEB - ODETTE-FTP Exchange Buffer 3177 8.2 Stream Transmission Header Format 3179 The Stream Transmission Header is shown below. The fields are 3180 transmitted from left to right. 3182 0 1 2 3 3183 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 3184 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3185 |Version| Flags | Length | 3186 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3188 Version 3190 Value: 0001 (binary) 3192 Stream Transmission Header version number. 3194 Flags 3196 Value: 0000 (binary) 3198 Reserved for future use. 3200 Length 3202 Range: 5 - 100003 (decimal) 3204 The length of the Stream Transmission Buffer (STH+OEB). 3206 The smallest STB is 5 octets consisting of a 4 octet header 3207 followed by a 1 octet Exchange Buffer such as a Change Direction 3208 (CD) command. 3210 The maximum Exchange Buffer length that can be negotiated is 99999 3211 octets (Section 5.3.2) giving a STB length of 100003. 3213 The length is expressed as a binary number in network byte order. 3215 It is expected that implementations of this protocol will follow the 3216 Internet robustness principle of being conservative in what is sent 3217 and liberal in what is accepted. 3219 9. Protocol State Machine 3221 9.1 ODETTE-FTP State Machine 3223 The operation of an ODETTE-FTP entity is formally defined by the 3224 State Machine presented below. There are five State and Transition 3225 tables and for each table additional information is given in the 3226 associated Predicate and Action lists. 3228 The response of an ODETTE-FTP entity to the receipt of an event is 3229 defined by a Transition table entry indexed by the Event/State 3230 intersection within the appropriate State table. 3232 Each Transition table entry defines the actions taken, events 3233 generated and new state entered. Predicates may be used within a 3234 table entry to select the correct response on the basis of local 3235 information held by the entity. 3237 A transition table contains the following fields: 3239 Index(I) State transition index. 3241 Predicate A list of predicates used to select between different 3242 possible transitions. The predicates are defined in 3243 the Predicate and Action list. 3245 Actions A list of actions taken by the entity. The actions 3246 are defined in the Predicate and Action list. 3248 Events Output events generated by the entity 3250 Next State The new state of the entity. 3252 9.2 Error Handling 3254 The receipt of an event in a given state may be invalid for three 3255 reasons. 3257 1. The case is impossible by design of the state automata, 3258 denoted 'X' in the State tables. For example a timer which has 3259 not been set cannot run out. 3261 2. The event is the result of an error in the Network Service 3262 implementation, also denoted 'X' in the state tables. The 3263 Network Service implementation is considered to be correct. 3265 3. For all other cases the event is considered to be a User Error, 3266 denoted "U" in the state tables. 3268 The State tables define the conditions under which a User event is 3269 valid, thus preventing the generation of a protocol error by the 3270 ODETTE-FTP entity as a result of a User Monitor error. The reaction 3271 of the entity to such errors is undefined and regarded as a local 3272 implementation issue. 3274 The State tables also allow protocol errors due to the receipt of 3275 invalid Exchange Buffers, to be detected. In such cases the reaction 3276 of the entity to the error is defined. 3278 9.3 States 3280 The Command Mode is strictly a Half Duplex Flip-Flop Mode. 3282 A_NC_ONLY Responder, Network Connection opened 3284 The Responder has sent its Ready Message (SSRM) and is 3285 waiting for Start Session (SSID) from the Initiator. 3287 A_WF_CONRS Responder Waiting for F_CONNECT_RS 3289 The Responder has received the Initiator's Start Session 3290 (SSID) and is waiting for a response (F_CONNECT_RS) from 3291 its User Monitor. 3293 CDSTWFCD CD_RQ stored in WF_CD state 3295 Since the User Monitor doesn't see the WF_CD state it may 3296 send a Change Direction request (F_CD_RQ) before the 3297 ODETTE-FTP receives a Change Direction (CD) command. 3299 CLIP Close Input Pending 3301 The Listener has received an End File (EFID) command and 3302 is waiting for the Close File response (F_CLOSE_FILE_RS) 3303 from its User Monitor. 3305 CLOP Close Out Pending 3307 The Speaker has sent an End File (EFID) command and is 3308 waiting for an End File Answer (EFPA or EFNA). 3310 ERSTWFCD End to End Response stored in WF_CD state 3312 Since the User Monitor doesn't see the WF_CD state it may 3313 send F_EERP_RQ, before the ODETTE-FTP receives a Change 3314 Direction (CD) command. 3316 IDLE Connection IDLE 3318 IDLELI Idle Listener 3320 IDLELICD Idle Listener, F_CD_RQ Received 3322 The ODETTE-FTP entity has become the Listener after 3323 receiving a Change Direction request (F_CD_RQ) from the 3324 User Monitor. The receipt of an End Session (ESID) is 3325 valid in this state. 3327 IDLESP Idle Speaker 3329 IDLESPCD Idle Speaker, F_CD_IND Sent 3331 The ODETTE-FTP entity has sent a Change Direction 3332 indication (F_CD_IND) to the User Monitor. A Change 3333 Direction request (F_CD_RQ) is invalid in this state. 3335 I_WF_NC Initiator Waiting for Network Connection 3337 The Initiator has requested a new network connection and 3338 is waiting for a Connection confirmation (N_CON_CF) from 3339 the Network Service. 3341 I_WF_RM Initiator Waiting for Ready Message 3343 Before sending Start Session (SSID), the Initiator must 3344 wait for a Ready Message (SSRM) from the Responder. 3346 I_WF_SSID Initiator Waiting for SSID 3348 The Initiator has sent a Start Session (SSID) command and 3349 is waiting for Start Session from the Responder. 3351 NRSTWFCD Negative End Response stored in WF_CD state 3353 Since the User Monitor doesn't see the WF_CD state it may 3354 send F_NERP_RQ, before the ODETTE-FTP receives a Change 3355 Direction (CD) command. 3357 OPI Open Input (Data Transfer Phase) 3359 The Listener is waiting for the Speaker to send a Data 3360 Exchange buffer. 3362 OPIP Open Input Pending 3364 The Listener has received a Start File (SFID) command and 3365 is waiting for the Start File response (F_START_FILE_RS) 3366 from its User Monitor. 3368 OPO Open Out (Data Transfer Phase) 3370 The Speaker has received a Start File Positive Answer 3371 (SFPA) and is waiting for a Data (F_DATA_RQ) or Close 3372 File (F_CLOSE_FILE) request from its User Monitor. 3374 OPOP Open Out Pending 3376 The Speaker has sent a Start File (SFID) command and is 3377 waiting for a Start File Answer (SFPA or SFNA). 3379 OPOWFC Open Out Wait for Credit 3381 The Speaker is waiting for a Set Credit (CDT) command 3382 before sending further Data Exchange buffers. 3384 RTRP Ready to Receive (RTR) Pending 3386 The Listener has received an EERP or a NERP and is 3387 waiting for the Ready to Receive response (F_RTR_RS) 3388 from its User Monitor. 3390 SFSTWFCD Start File Request stored in WF_CD state. 3392 Since the User Monitor doesn't see the WF_CD state it may 3393 send a Start File request (F_START_FILE_RQ) before the 3394 ODETTE-FTP receives a Change Direction (CD) command. 3396 WF_CD Wait for Change Direction 3398 The Listener wishes to become the Speaker and is waiting 3399 for a Change Direction (CD) command after sending an End 3400 File Positive Answer (EFPA) requesting change direction. 3402 WF_RTR Wait for Ready To Receive 3404 The Speaker has sent an End to End Response (EERP) 3405 or a Negative End Response (NERP) command and must wait 3406 for Ready To Receive (RTR) from the Listener. 3408 WF_NDISC Wait for N_DISC_IND 3410 ODETTE-FTP has sent an End Session (ESID) command and is 3411 waiting for a Disconnection indication (N_DISC_IND) from 3412 the Network Service. 3414 WF_SECD Wait for Security Change Direction 3416 The Speaker is expecting a Security Change 3417 Direction (SECD) from the Listener. 3419 WF_AUCH Wait for Authentication Challenge 3421 The Speaker has sent a Security Change Direction 3422 (SECD) command and must wait for Authentication Challenge 3423 (AUCH) from the Listener. 3425 WF_AURP Wait for Authentication Response 3427 The Speaker has sent an Authentication Challenge (AUCH) 3428 command and must wait for Authentication Response (AURP) 3429 from the Listener. 3431 9.4 Input Events 3433 User Monitor Input Events (Section 3) 3435 F_DATA_RQ F_CONNECT_RQ F_START_FILE_RQ F_CLOSE_FILE_RQ 3436 F_EERP_RQ F_CONNECT_RS F_START_FILE_RS(+) F_CLOSE_FILE_RS(+) 3437 F_NERP_RQ F_ABORT_RQ F_START_FILE_RS(-) F_CLOSE_FILE_RS(-) 3438 F_CD_RQ F_RELEASE_RQ F_RTR_RS 3440 Network Input Events (Section 2.2) 3442 N_CON_IND N_CON_CF N_DATA_IND N_DISC_IND N_RST_IND 3444 Peer ODETTE-FTP Input Events (Section 4) 3446 SSID SFID SFPA SFNA EFID EFPA EFNA 3447 DATA ESID EERP RTR CD CDT SSRM 3448 NERP SECD AUCH AURP 3450 Internal Input Events 3452 TIME-OUT - Internal ODETTE-FTP timer expires. 3454 Input event parameters are denoted I.Event-name.Parameter-name within 3455 the state table action and predicate lists. Their value can be 3456 examined but not changed by the ODETTE-FTP entity. 3458 9.5 Output Events 3460 User Monitor Output Events (Section 3) 3462 F_DATA_IND F_CONNECT_IND F_START_FILE_IND F_CLOSE_FILE_IND 3463 F_EERP_IND F_CONNECT_CF F_START_FILE_CF(+) F_CLOSE_FILE_CF(+) 3464 F_CD_IND F_ABORT_IND F_START_FILE_CF(-) F_CLOSE_FILE_CF(-) 3465 F_NERP_IND F_RELEASE_IND F_DATA_CF F_RTR_CF 3467 Network Output Events (Section 2.2) 3469 N_CON_RQ N_CON_RS N_DATA_RQ N_DISC_RQ 3471 Peer ODETTE-FTP Output Events (Section 4) 3473 SSID SFID SFPA SFNA EFID EFPA EFNA 3474 DATA ESID EERP RTR CD CDT SSRM 3475 NERP SECD AUCH AURP 3477 Output event parameters are denoted O.Event-name.Parameter-name 3478 within the state table action and predicate lists. Their values can 3479 be examined and changed by the ODETTE-FTP entity. 3481 9.7 Local Variables 3483 The following variables are maintained by the ODETTE-FTP entity to 3484 assist the operation of the protocol. They are denoted V.Variable- 3485 name within the state table action and predicate lists. Their value 3486 can be examined and changed by the ODETTE-FTP entity. The initial 3487 value of each variable is undefined. 3489 Variable Type Comments 3490 --------------------------------------------------------------------- 3491 Buf-size Integer Negotiated Data Exchange Buffer size. 3492 Called-addr Address Used to build O.F_CONNECT_IND.Called-addr 3493 Calling-addr Address To build O.F_CONNECT_IND.Calling-addr 3494 Compression Yes/No Compression in use as agreed. 3495 Credit_L Integer Listeners credit counter. 3496 Credit_S Integer Speaker's credit counter. 3497 Id String Used to build O.SSID.Id 3498 Mode Sender-only, Receiver-only, Both. 3499 Pswd String Password, used to build O.SSID.Pswd 3500 Req-buf Primitive Input event (F_XXX_RQ) stored in WF_CD 3501 state. 3502 Restart Yes/No Restart in used as agreed. 3503 Restart-pos Integer Used only during file opening. 3504 Window Integer The Credit value negotiated for the 3505 session. 3506 Caller Yes/No This entity initiated the ODETTE-FTP 3507 session. 3508 Authentication Yes/No Secure authentication in use as agreed 3509 Challenge Binary Random challenge 3510 --------------------------------------------------------------------- 3512 9.8 Local Constants 3514 The following constants define the capabilities of a given ODETTE-FTP 3515 entity. They are denoted C.Constant-name within the state table 3516 action and predicate lists. Their value can be examined but not 3517 changed by the ODETTE-FTP entity. 3519 Constant Value Comments 3520 --------------------------------------------------------------------- 3521 Cap-compression Yes/No Compression supported ? 3522 Cap-init Initiator Must be Initiator. 3523 Responder Must be Responder. 3524 Both Can be Initiator or Responder. 3525 Cap-mode Sender-only Must be sender. 3526 Receiver-only Must be receiver. 3527 Both Can be sender or receiver. 3528 Max-buf-size 127 < Int < 100000 Maximum Data Exchange Buffer 3529 size supported. 3530 Max-window 0 < Int < 1000 Local maximum credit value. 3531 Cap-restart Yes/No Restart supported ? 3532 Cap-logic 0, 1, 2 0 = does not support special 3533 logic 3534 1 = supports special logic 3535 2 = needs special logic 3536 --------------------------------------------------------------------- 3538 9.9 Session Connection State Table 3540 9.9.1 State Table 3542 o----------------------------------------------------------o 3543 | | Other States | 3544 | |--------------------------------------------------o | 3545 | | WF_SECD | | 3546 | |----------------------------------------------o | | 3547 | | WF_AURP | | | 3548 | |------------------------------------------o | | | 3549 | | WF_AUCH | | | | 3550 | |--------------------------------------o | | | | 3551 | S | A_WF_CONRS | | | | | 3552 | |----------------------------------o | | | | | 3553 | T | A_NC_ONLY | | | | | | 3554 | |------------------------------o | | | | | | 3555 | A | I_WF_SSID | | | | | | | 3556 | |--------------------------o | | | | | | | 3557 | T | I_WF_RM | | | | | | | | 3558 | |----------------------o | | | | | | | | 3559 | E | I_WF_NC | | | | | | | | | 3560 | |------------------o | | | | | | | | | 3561 | | IDLE | | | | | | | | | | 3562 |==================o---+---+---+---+---+---+---+---+---+---| 3563 | | F_CONNECT_RQ | A | X | X | X | X | X | X | X | X | X | 3564 | |--------------+---+---+---+---+---+---+---+---+---+---| 3565 | E | N_CON_CF | X | C | X | X | X | X | X | X | X | X | 3566 | |--------------+---+---+---+---+---+---+---+---+---+---| 3567 | V | SSRM | X | X | H | X | X | X | L | L | L | X | 3568 | |--------------+---+---+---+---+---+---+---+---+---+---| 3569 | E | SSID | X | X | X | D | E | F | L | L | L | F | 3570 | |--------------+---+---+---+---+---+---+---+---+---+---| 3571 | N | N_CON_IND | B | X | X | X | X | X | X | X | X | X | 3572 | |--------------+---+---+---+---+---+---+---+---+---+---| 3573 | T | F_CONNECT_RS | X | U | U | U | U | G | X | X | X | U | 3574 | |--------------+---+---+---+---+---+---+---+---+---+---| 3575 | | ESID | X | X | X | F | X | X | F | F | F | X | 3576 | |--------------+---+---+---+---+---+---+---+---+---+---| 3577 | | AUCH | X | X | U | U | X | X | I | L | L | U | 3578 | |--------------+---+---+---+---+---+---+---+---+---+---| 3579 | | AURP | X | X | U | U | X | X | L | K | L | U | 3580 | |--------------+---+---+---+---+---+---+---+---+---+---| 3581 | | SECD | X | X | U | U | X | X | L | L | J | U | 3582 o----------------------------------------------------------o 3584 9.9.2 Transition Table 3586 I | Predicate Actions Output Events Next State 3587 ===o============================================================= 3588 A | P1: F_ABORT_IND IDLE 3589 | !P1: 1,2 N_CON_RQ I_WF_NC 3590 ---+------------------------------------------------------------- 3591 B | P3: N_DISC_RQ IDLE 3592 | !P3: 2 N_CON_RS 3593 | SSRM A_NC_ONLY 3594 ---+------------------------------------------------------------- 3595 C | 4,2 I_WF_RM 3596 ---+------------------------------------------------------------- 3597 D | P2 & P8 & P11: 4,2,5 SECD WF_AUCH 3598 | P2 & P8 & !P11: 4,2,5 F_CONNECT_CF IDLESP 3599 | P2 & !P8: 4,2 ESID(R=12) 3600 | F_ABORT_IND(R,AO=L) WF_NDISC 3601 | else: 4,2 ESID(R=10) 3602 | F_ABORT_IND(R,AO=L) WF_NDISC 3603 ---+------------------------------------------------------------- 3604 E | P4: 4 N_DISC_RQ IDLE 3605 | !P4: 4,2 F_CONNECT_IND A_WF_CONRS 3606 ---+------------------------------------------------------------- 3607 F | 4 F_ABORT_IND 3608 | N_DISC_RQ IDLE 3609 ---+------------------------------------------------------------- 3610 G | P2 & P9 & P10: 4,2,5 SSID WF_SECD 3611 | P2 & !P9 & P10: 4,2,5 SSID IDLELI 3612 | !P10: 4,2 ESID(R=12) 3613 | F_ABORT_IND(R,AO=L) WF_NDISC 3614 | else: 4,2 ESID(R=10) 3615 | F_ABORT_IND(R,AO=L) WF_NDISC 3616 ---+------------------------------------------------------------- 3617 H | 4,2,3 SSID I_WF_SSID 3618 ---+------------------------------------------------------------- 3619 I | P5: 4,2 AURP WF_SECD 3620 | !P5: 4,2 AURP IDLELI 3621 ---+------------------------------------------------------------- 3622 J | 4,2 AUCH WF_AURP 3623 ---+------------------------------------------------------------- 3624 K | P6: 4,2 F_CONNECT_CF IDLESP 3625 | P7: 4,2 SECD WF_AUCH 3626 | else: 4,2 ESID(R=11) 3627 | F_ABORT_IND(R,AO=L) WF_NDISC 3628 ---+------------------------------------------------------------- 3629 L | 4,2 ESID(R=02) 3630 | F_ABORT_IND(R,AO=L) WF_NDISC 3631 ---+------------------------------------------------------------- 3633 9.9.3 Predicates and Actions. 3635 Predicate P1: (No resources available) OR 3636 (C.Cap-init = Responder) OR 3637 (C.Cap-mode = Sender-only AND 3638 I.F_CONNECT_RQ.Mode = Receiver-only) OR 3639 (C.Cap-mode = Receiver-only AND 3640 I.F_CONNECT_RQ.Mode = Sender-only) 3642 Predicate P2: SSID negotiation is successful 3643 ( for these, Buf-size, Restart, Compression, Mode, 3644 Special logic and Window, compare the inbound SSID 3645 with the local constants to set the local variables. 3646 Any incompatibilities result in failure of the 3647 negotiation. ) 3649 Predicate P3: C.Cap-init = Initiator 3651 Predicate P4: Mode in SSID incompatible with C.Cap-mode 3653 Predicate P5: V.Caller = Yes 3655 Predicate P6: (V.Caller = Yes) AND 3656 (AURP.Signature verifies with V.Challenge) 3658 Predicate P7: (V.Caller = No) AND 3659 (AURP.Signature verifies with V.Challenge) 3661 Predicate P8: V.Authentication = I.SSID.Authentication 3663 Predicate P9: I.F_CONNECT_RS.Authentication = Yes 3665 Predicate P10: O.F_CONNECT_IND.Authentication = 3666 I.F_CONNECT_RS.Authentication 3668 Predicate P11: V.Authentication = Yes 3670 Action 1: Set V.Mode from (C.Cap-mode, I.F_CONNECT_RQ.Mode) 3671 Set V.Pswd, V.Id, V.Restart and 3672 V.Authentication from I.F_CONNECT_RQ 3673 Set V.Buf-size = C.Max-buf-size 3674 Set V.Compression = C.Cap-compression 3675 Set V.Caller = Yes 3676 Build O.N_CON_RQ 3678 Action 2: Start inactivity timer 3680 Action 3: Set parameters in O.SSID = from local variables 3682 Action 4: Stop timer 3684 Action 5: Set V.Mode, V.Restart, V.Compression, V.Buf-size, 3685 V.Window, V.Authentication = from SSID 3687 Action 6: Set V.Challenge = A random number unique to 3688 the session 3690 9.10 Error and Abort State Table 3692 9.10.1 State Table 3694 o--------------------------------------o 3695 | | Other States | 3696 | S |------------------------------o | 3697 | T | WF_NDISC | | 3698 | A |--------------------------o | | 3699 | T | I_WF_NC | | | 3700 | E |----------------------o | | | 3701 | | IDLE | | | | 3702 |======================o---+---+---+---| 3703 | | TIME-OUT | X | X | A | B | 3704 | |------------------+---+---+---+---| 3705 | E | F_ABORT_RQ | X | A | X | C | 3706 | V |------------------+---+---+---+---| 3707 | E | N_RST_IND | X | X | A | D | 3708 | N |------------------+---+---+---+---| 3709 | T | N_DISC_IND | X | E | F | G | 3710 | |------------------+---+---+---+---| 3711 | | Invalid Buffer | X | X | H | I | 3712 o--------------------------------------o 3714 9.10.2 Transition Table 3716 I | Predicate Actions Output Events Next State 3717 ===o================================================================= 3718 A | N_DISC_RQ IDLE 3719 ---+----------------------------------------------------------------- 3720 B | F_ABORT_IND 3721 | N_DISC_RQ IDLE 3722 ---+----------------------------------------------------------------- 3723 C | 1 N_DISC_RQ IDLE 3724 ---+----------------------------------------------------------------- 3725 D | 1 N_DISC_RQ 3726 | F_ABORT_IND IDLE 3727 ---+----------------------------------------------------------------- 3728 E | F_ABORT_IND IDLE 3729 ---+----------------------------------------------------------------- 3730 F | 1 IDLE 3731 ---+----------------------------------------------------------------- 3732 G | 1 F_ABORT_IND IDLE 3733 ---+----------------------------------------------------------------- 3734 H | WF_NDISC 3735 ---+----------------------------------------------------------------- 3736 I | 1,2 ESID(R=01) 3737 | F_ABORT_IND(R,AO=L) WF_NDISC 3738 --------------------------------------------------------------------- 3740 9.10.3 Predicates and Actions. 3742 Action 1: Stop inactivity timer 3744 Action 2: Start inactivity timer 3746 9.11 Speaker State Table 1 3748 9.11.1 State Table 3750 The following abbreviations are used in the Speaker State table. 3752 F_REL_RQ(Ok) - F_RELEASE_RQ Reason = Normal 3753 F_REL_RQ(Err) - F_RELEASE_RQ Reason = Error 3755 o--------------------------------------------------------------------o 3756 | | Other States | 3757 | |--------------------------------------------------------------o | 3758 | | WF_NDISC | | 3759 | |----------------------------------------------------------o | | 3760 | | OPOWFC | | | 3761 | |------------------------------------------------------o | | | 3762 | | OPO | | | | 3763 |S|--------------------------------------------------o | | | | 3764 | | OPOP | | | | | 3765 |T|----------------------------------------------o | | | | | 3766 | | CDSTWFCD | | | | | | 3767 |A|------------------------------------------o | | | | | | 3768 | | SFSTWFCD | | | | | | | 3769 |T|--------------------------------------o | | | | | | | 3770 | | NRSTWFCD | | | | | | | | 3771 |E|----------------------------------o | | | | | | | | 3772 | | ERSTWFCD | | | | | | | | | 3773 | |------------------------------o | | | | | | | | | 3774 | | WF_CD | | | | | | | | | | 3775 | |--------------------------o | | | | | | | | | | 3776 | | WF_RTR | | | | | | | | | | | 3777 | |----------------------o | | | | | | | | | | | 3778 | | IDLESPCD | | | | | | | | | | | | 3779 | |------------------o | | | | | | | | | | | | 3780 | | IDLESP | | | | | | | | | | | | | 3781 |=+==============o---+---+---+---+---+---+---+---+---+---+---+---+---| 3782 | | F_EERP_RQ | A | A | W | F | W | W | U | U | U | U | U | U | U | 3783 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3784 | | F_NERP_RQ | Y | Y | W | Z | W | W | U | U | U | U | U | U | U | 3785 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3786 | | F_START_ | B | B | W | G | W | W | U | U | U | U | U | X | U | 3787 | | FILE_RQ | | | | | | | | | | | | | | 3788 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3789 | | SFPA | C | C | C | C | C | C | C | C | K | C | C | S | C | 3790 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3791 |E| SFNA | C | C | C | C | C | C | C | C | L | C | C | S | C | 3792 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3793 |V| CD | C | C | C | H | R | Z1| I | J | C | C | C | S | C | 3794 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3795 |E| F_DATA_RQ | U | U | U | U | U | U | U | U | U | M | U | S | U | 3796 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3797 |N| CDT | C | C | C | C | C | C | C | C | C | P | O | S | C | 3798 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3799 |T| F_CD_RQ | D | U | W | T | W | W | U | U | U | U | U | X | U | 3800 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3801 | | F_REL_RQ(Ok) | U | E | U | U | U | U | U | U | U | U | U | X | U | 3802 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3803 | | F_REL_RQ(Err)| Q | Q | Q | Q | Q | Q | Q | Q | Q | Q | Q | S | Q | 3804 | |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---| 3805 | | RTR | C | C | N | C | C | C | C | C | C | C | C | S | C | 3806 o--------------------------------------------------------------------o 3808 9.11.2 Transition Table 3810 I | Predicate Actions Output Events Next State 3811 ===o================================================================= 3812 A | P5: 1,2,3,18 EERP WF_RTR 3813 | !P5: 1,2,3 EERP WF_RTR 3814 ---+----------------------------------------------------------------- 3815 B | P1: UE 3816 | !P1: 1,2,5 SFID OPOP 3817 ---+----------------------------------------------------------------- 3818 C | 1,2 ESID(R=02) 3819 | F_ABORT_IND(R,AO=L) WF_NDISC 3820 ---+----------------------------------------------------------------- 3821 D | 1,2 CD IDLELICD 3822 ---+----------------------------------------------------------------- 3823 E | 1,2 ESID(R=00) WF_NDISC 3824 ---+----------------------------------------------------------------- 3825 F | 4 ERSTWFCD 3826 ---+----------------------------------------------------------------- 3827 G | P1: UE 3828 | !P1: 6 SFSTWFCD 3829 ---+----------------------------------------------------------------- 3830 H | 1,2 IDLESP 3831 ---+----------------------------------------------------------------- 3832 I | 1,2,10 SFID OPOP 3833 ---+----------------------------------------------------------------- 3834 J | 1,2 CD IDLELICD 3835 ---+----------------------------------------------------------------- 3836 K | P2: 1,2 ESID(R=02) 3837 | F_ABORT_IND(R,AO=L) WF_NDISC 3838 | !P2: 1,2,7,12 F_START_FILE_CF(+) OPO 3839 ---+----------------------------------------------------------------- 3840 L | 1,2,8 F_START_FILE_CF(-) IDLESP 3841 ---+----------------------------------------------------------------- 3842 M | P3: 1,2,11,13 DATA OPOWFC 3843 | !P3: 1,2,11,13 DATA 3844 | F_DATA_CF OPO 3845 ---+----------------------------------------------------------------- 3846 N | F_RTR_CF IDLESP 3847 ---+----------------------------------------------------------------- 3848 O | 12 F_DATA_CF OPO 3849 ---+----------------------------------------------------------------- 3850 P | Protocol 1,2 ESID(R=02) 3851 | Error F_ABORT_IND(R,AO=L) WF_NDISC 3852 ---+----------------------------------------------------------------- 3853 Q | 1,2 ESID(R) WF_NDISC 3854 ---+----------------------------------------------------------------- 3855 Continued --> 3857 I | Predicate Actions Output Events Next State 3858 ===o================================================================= 3859 R | 1,2,9 EERP WF_RTR 3860 ---+----------------------------------------------------------------- 3861 S | WF_NDISC 3862 ---+----------------------------------------------------------------- 3863 T | CDSTWFCD 3864 ---+----------------------------------------------------------------- 3865 U | User Error UE 3866 ---+----------------------------------------------------------------- 3867 W | User Error - Note 1 UE 3868 ---+----------------------------------------------------------------- 3869 X | Error 3870 ---+----------------------------------------------------------------- 3871 Y | P4 & P5: 1,2,15,18 NERP WF_RTR 3872 | !P4 & !P5: 1,2,15,14 NERP WF_RTR 3873 | P4 & !P5: 1,2,15 NERP WF_RTR 3874 | !P4 & P5: 1,2,15,14,18 NERP WF_RTR 3875 ---+----------------------------------------------------------------- 3876 Z | 16 NRSTWFCD 3877 --------------------------------------------------------------------- 3878 Z1| P4: 1,2,17 NERP WF_RTR 3879 | !P4: 1,2,17,14 NERP WF_RTR 3880 --------------------------------------------------------------------- 3882 9.11.3 Predicates and Actions. 3884 Predicate P1: (I.F_START_FILE_RQ.Restart-pos > 0 AND 3885 V.Restart = No) OR (V.Mode = Receiver-only) 3887 Note: Restart requested and not supported for this session. 3889 Predicate P2: I.SFPA.Restart-pos > V.Restart-pos 3891 Note: Protocol error due to the restart position in the 3892 SFPA acknowledgement being greater than the position 3893 requested in the SFID request. 3895 Predicate P3: V.Credit_S - 1 = 0 3897 Note: Speaker's Credit is exhausted. 3899 Predicate P4: No special logic is in use 3901 Predicate P5: Signed EERP/NERP requested 3903 Action 1: Stop inactivity timer 3905 Action 2: Start inactivity timer 3907 Action 3: Build an EERP from F_EERP_RQ 3909 Action 4: Store F_EERP_RQ in V.Req-buf 3911 Action 5: Build SFID from F_START_FILE_RQ 3912 V.Restart-pos = I.F_START_FILE_RQ.Restart-pos 3914 Action 6: Store F_START_FILE_RQ in V.Req-buf 3916 Action 7: Build F_START_FILE_CF(+) from I.SFPA 3918 Action 8: Build F_START_FILE_CF(-) from I.SFNA 3920 Action 9: Build EERP from F_EERP_RQ stored in V.Req-buf 3922 Action 10: Build SFID from F_START_FILE_RQ stored in V.Req-buf 3923 Set V.Restart-pos 3925 Action 11: Build Exchange Buffer 3927 Action 12: V.Credit_S = V.Window 3929 Action 13: V.Credit_S = V.Credit_S - 1 3931 Action 14: Activate CRC-calculus function. Wrap Exchange buffer 3932 in special logic 3934 Action 15: Build a NERP from F_NERP_RQ 3936 Action 16: Store F_NERP_RQ in V.Req-buf 3938 Action 17: Build NERP from F_NERP_RQ stored in V.Req-buf 3940 Action 18: Sign the contents of NERP/EERP 3942 Note 1: Whether to accept this "Request/Event" while in 3943 this state is a matter of local implementation. The 3944 ODETTE state tables are based on the assumption that 3945 this event cannot occur in this state and is 3946 considered to be a user error (UE). 3948 9.12 Speaker State Table 2 3950 9.12.1 State Table 3952 o---------------------------------o 3953 | S | CLOP | 3954 | T |-------------------------o | 3955 | A | OPOWFC | | 3956 | T |---------------------o | | 3957 | E | OPO | | | 3958 |=====================o---+---+---| 3959 | E | F_CLOSE_FILE_RQ | A | E | U | 3960 | V |-----------------+---+---+---| 3961 | E | EFPA | B | B | C | 3962 | N |-----------------+---+---+---| 3963 | T | EFNA | B | B | D | 3964 o---------------------------------o 3966 9.12.2 Transition Table 3968 I | Predicate Actions Output Events Next State 3969 ===o================================================================= 3970 A | 1,2,5,7 EFID CLOP 3971 ---+----------------------------------------------------------------- 3972 B | 1,2 ESID(R=02) 3973 | F_ABORT_IND(R,AO=L) WF_NDISC 3974 ---+----------------------------------------------------------------- 3975 C | P1: 1,2,3 F_CLOSE_FILE_CF(+,SP=No) 3976 | CD IDLELI 3977 | !P1: 1,2,4 F_CLOSE_FILE_CF(+,SP=Yes) IDLESP 3978 ---+----------------------------------------------------------------- 3979 D | 1,2,6 F_CLOSE_FILE_CF(-) IDLESP 3980 ---+----------------------------------------------------------------- 3981 E | See Note 1 3982 ---+----------------------------------------------------------------- 3983 U | User Error UE 3984 --------------------------------------------------------------------- 3986 9.12.3 Predicates and Actions. 3988 Predicate P1: (I.EFPA.CD-Request = Yes) 3990 Predicate P2: No special logic is in use 3992 Action 1: Stop inactivity timer 3994 Action 2: Start inactivity timer 3996 Action 3: O.F_CLOSE_FILE_CF(+).Speaker = No 3998 Action 4: O.F_CLOSE_FILE_CF(+).Speaker = Yes 4000 Action 5: Build EFID from F_CLOSE_FILE_RQ 4002 Action 6: Build F_CLOSE_FILE_CF(-) from EFNA 4004 Action 7: Set V.Credit_S = 0 4006 Action 8: Wrap Exchange buffer in special logic 4008 Note 1: In order to respect the "half duplex" property of 4009 ODETTE-FTP it is forbidden to send EFID while in the 4010 OPOWFC state. EFID can be sent only in the OPO state. 4012 The ODETTE-FTP implementation must avoid sending EFID 4013 (or receiving F_CLOSE_FILE_RQ) while in the OPOWFC 4014 state. 4016 9.13 Listener State Table 4018 9.13.1 State Table 4020 o---------------------------------------------o 4021 | | RTRP | 4022 | |-------------------------------------o | 4023 | | CLIP | | 4024 | |---------------------------------o | | 4025 | | OPI | | | 4026 | S |-----------------------------o | | | 4027 | T | OPIP | | | | 4028 | A |-------------------------o | | | | 4029 | T | IDLELICD | | | | | 4030 | E |---------------------o | | | | | 4031 | | IDLELI | | | | | | 4032 |=====================o---+---+---+---+---+---+ 4033 | | SFID | A | A | B | B | B | B | 4034 | |-----------------+---+---+---+---+---+---+ 4035 | E | DATA | B | B | B | I | B | B | 4036 | V |-----------------+---+---+---+---+---+---+ 4037 | E | EFID | B | B | B | J | B | B | 4038 | N |-----------------+---+---+---+---+---+---+ 4039 | T | F_START_FILE_RS | U | U | H | U | U | U | 4040 | |-----------------+---+---+---+---+---+---+ 4041 | | F_CLOSE_FILE_RS | U | U | U | U | K | U | 4042 | |-----------------+---+---+---+---+---+---+ 4043 | | CD | C | B | B | B | B | B | 4044 | |-----------------+---+---+---+---+---+---+ 4045 | | ESID R=Normal | D | F | D | D | D | D | 4046 | |-----------------+---+---+---+---+---+---+ 4047 | | ESID R=Error | D | D | D | D | D | D | 4048 | |-----------------+---+---+---+---+---+---+ 4049 | | EERP | E | E | B | B | B | B | 4050 | |-----------------+---+---+---+---+---+---+ 4051 | | NERP | L | L | B | B | B | B | 4052 | |-----------------+---+---+---+---+---+---+ 4053 | | F_RTR_RS | U | U | U | U | U | M | 4054 o---------------------------------------------o 4056 9.13.2 Transition Table 4058 I | Predicate Actions Output Events Next State 4059 ===o================================================================= 4060 A | P1: 1,2 ESID(R=02) 4061 | F_ABORT_IND(R,AO=L) WF_NDISC 4062 | !P1: 1,2,3 F_START_FILE_IND OPIP 4063 ---+----------------------------------------------------------------- 4064 B | 1,2 ESID(R=02) 4065 | F_ABORT_IND(R,AO=L) WF_NDISC 4066 ---+----------------------------------------------------------------- 4067 C | 1,2 F_CD_IND IDLESPCD 4068 ---+----------------------------------------------------------------- 4069 D | 1 F_ABORT_IND(Received 4070 | ESID Reason,AO=D) 4071 | N_DISC_RQ IDLE 4072 ---+----------------------------------------------------------------- 4073 E | 1,2,4 F_EERP_IND RTRP 4074 ---+----------------------------------------------------------------- 4075 F | 1 F_RELEASE_IND 4076 | N_DISC_RQ IDLE 4077 ---+----------------------------------------------------------------- 4078 H | P4: User Error UE 4079 | P2 & !P4 & !P5: 1,2,8 SFPA OPI 4080 | !P2 & !P4 & !P5: 1,2 SFNA IDLELI 4081 | P2 & !P4 & P5: 1,2,5,8 SFPA OPI 4082 | !P2 & !P4 & P5: 1,2,5 SFNA IDLELI 4083 ---+----------------------------------------------------------------- 4084 I | P6: 1,2 ESID(R=02) 4085 | F_ABORT_IND(R,A0=L) WF_NDISC 4086 | !P5 & !P6 & !P7: 1,2,7 F_DATA_IND (See Note 1) OPI 4087 | !P5 & !P6 & P7: 1,2,8 F_DATA_IND 4088 | CDT (See Note 1) OPI 4089 | P5 & !P6 & P8: 1,2 ESID(R=07) 4090 | F_ABORT_IND(R,A0=L) WF_NDISC 4091 | P5 & !P6 & !P7 : 1,2,6,7 F_DATA_IND (See Note 1) OPI 4092 | & !P8 4093 | P5 & !P6 & P7 : 1,2,5,6,8 F_DATA_IND OPI 4094 | & !P8 CDT (See Note 1) 4095 ---+----------------------------------------------------------------- 4096 J | 1,2 F_CLOSE_FILE_IND CLIP 4097 ---+----------------------------------------------------------------- 4098 K | P2 & P3 & !P5: 1,2 EFPA(CD-Req) WF_CD 4099 | P2 & !P3 & !P5: 1,2 EFPA(no CD) IDLELI 4100 | !P2 & !P5: 1,2 EFNA IDLELI 4101 | P2 & !P3 & P5: 1,2,5 EFPA(no CD) IDLELI 4102 | !P2 & P5: 1,2,5 EFNA IDLELI 4103 | P2 & P3 & P5: 1,2,5 EFPA(CD-Req) WF_CD 4104 ---+----------------------------------------------------------------- 4105 L | 1,2,10 F_NERP_IND RTRP 4106 ---+----------------------------------------------------------------- 4107 M | 1,2 RTR IDLELI 4108 ---+----------------------------------------------------------------- 4109 U | User Error UE 4110 --------------------------------------------------------------------- 4112 9.13.3 Predicates and Actions. 4114 Predicate P1: (I.SFID.Restart-pos > 0 AND V.Restart = No) OR 4115 (V.Mode = Sender-only) 4117 Note: Invalid Start File command 4119 Predicate P2: Positive Response 4121 Predicate P3: I.F_CLOSE_FILE_RS(+).Speaker = Yes 4123 Predicate P4: I.F_START_FILE_RS(+).Restart-pos > V.Restart 4125 Predicate P5: Special logic is used 4127 Predicate P6: V.Credit_L - 1 < 0 4129 Note: Protocol Error because the Speaker has exceeded its 4130 available transmission credit. 4132 Predicate P7: V.Credit_L - 1 = 0 4134 Note: The Speaker's credit must be reset before it can send 4135 further Data Exchange buffers. 4137 Predicate P8: The calculus of the received CRC indicates an error 4139 Action 1: Stop inactivity timer. 4141 Action 2: Start inactivity timer 4143 Action 3: Build F_START_FILE_IND from I.SFID 4144 V.Restart-pos = I.SFID.Restart-pos 4146 Action 4: Build F_EERP_IND from I.EERP 4148 Action 5: Add special logic header to the command to be sent to 4149 the speaker 4151 Action 6: Suppress the special logic header from the data buffer 4152 before giving it to the user. 4154 Action 7: V.Credit_L = V.Credit_L - 1 4156 Action 8: V.Credit_L = V.Window 4158 Action 10: Build F_NERP_IND from I.NERP 4160 Note 1: Flow control in case of reception. 4162 The ODETTE-FTP Listener must periodically send new 4163 credit to the Speaker. The timing of this operation 4164 will depend on: 4166 1. The User Monitor's capacity to receive data. 4167 2. The number of buffers available to ODETTE-FTP. 4168 3. The Speaker's available credit, which must be 4169 equal to zero. 4171 9.14 Example 4173 Consider an ODETTE-FTP entity that has sent a Start File (SFID) 4174 command and entered the Open Out Pending (OPOP) state. Its response 4175 on receiving a Positive Answer (SFPA) is documented in Speaker State 4176 Table 1 which shows that transition 'K' should be applied and is 4177 interpreted as follows: 4179 if (I.SFPA.Restart-pos > V.Restart-pos) then 4180 begin // invalid restart 4181 Actions: Stop inactivity timer, // reset timer 4182 Start inactivity timer; 4183 Output: ESID(R=02), // to peer ODETTE-FTP 4184 F_ABORT_IND(R,AO=L); // to user monitor 4185 New State: WF_NDISC; 4186 end 4187 else begin 4188 Actions: Stop inactivity timer, // reset timer 4189 Start inactivity timer; 4190 Build F_START_FILE_CF(+) from I.SFPA 4191 V.Credit_S = V.Window // initialise credit 4192 Output: F_START_FILE_CF(+); // to user monitor 4193 New State: OPO; 4194 end 4196 The ODETTE-FTP checks the restart position in the received Start File 4197 Positive Answer (SFPA) command. If it is invalid it aborts the 4198 session by sending an End Session (ESID) command to its peer and an 4199 Abort indication (F_ABORT_IND) to its User Monitor. If the restart 4200 position is valid a Start File confirmation (F_START_FILE_CF) is 4201 built and sent to the User Monitor, the credit window is initialised 4202 and the Open Out (OPO) state is entered. 4204 10. Miscellaneous 4206 10.1 Algorithm Choice 4208 The choice of algorithms to use for security or compression between 4209 trading partners is for bilateral agreement outside of the 4210 ODETTE-FTP. 4212 10.2 Cryptographic Algorithms 4214 The algorithms for symmetric and asymmetric cryptography and hashing 4215 are represented by a coded value, the cipher suite: 4217 Cipher Suite Symmetric Asymmetric Hashing 4219 01 3DES_EDE_CBC_3KEY RSA_PKCS1_15 SHA-1 4220 02 AES_256_CBC RSA_PKCS1_15 SHA-1 4222 Support of all cipher suites listed here is mandatory. 4224 The certificates used must be [X.509] certificates. 4226 TripleDES is using Cyclic Block Chaining mode (CBC) for added 4227 security and uses the EDE (Encryption Decryption Encryption) process 4228 with 3 different 64 bit keys. 4230 RSA padding is as defined in [PKCS #1]. 4232 AES is using a 256 bit key in Cyclic Block Chaining mode (CBC). 4234 10.2 Protocol Extensions 4236 The algorithms and file enveloping formats available in ODETTE-FTP 4237 may be extended outside of this document. 4239 A list of optional extensions authorised for use as part of 4240 ODETTE-FTP is available from ODETTE International Ltd and on their 4241 website at http://www.odette.org 4243 10.3 Certificate Services 4245 Certificates and certificate revocation lists may be exchanged as 4246 [CMS] enveloped files. It is therefore valid to exchange a [CMS] 4247 file that is neither encrypted, compressed or signed. It is an 4248 application implementation issue to determine the correct 4249 course of action on receipt of such a file. 4251 10.4 Security Considerations 4253 ODETTE-FTP security requires the use of [X.509] certificates. If 4254 no security options are agreed for use, the send and 4255 receive passwords are sent in plain text. Whilst this is acceptable 4256 over X.25 and ISDN networks, this is a risky practice over 4257 insecure public networks such as the Internet. 4259 All, some or none of the security options available in ODETTE-FTP 4260 may be used. No recommendations for the use of these options are 4261 provided in this specification. Whilst use of the highest strength 4262 encryption algorithms may seem admirable there is often a 4263 performance tradeoff to be made, and signing all files and 4264 acknowledgements has potential legal implications that should be 4265 considered. 4267 It should be noted that whilst the security measures ensure that 4268 an ODETTE-FTP partner is authenticated, it does not necessarily 4269 mean that the partner is authorised. Having proven the identity of 4270 a partner, it is an application issue to decide whether that 4271 partner is allowed to connect or exchange files. 4273 Extracted from [RFC 3850]: 4275 When processing certificates, there are many situations where the 4276 processing might fail. Because the processing may be done by a user 4277 agent, a security gateway, or other program, there is no single way 4278 to handle such failures. Just because the methods to handle the 4279 failures have not been listed, however, the reader should not assume 4280 that they are not important. The opposite is true: if a certificate 4281 is not provably valid and associated with the message, the processing 4282 software should take immediate and noticeable steps to inform the end 4283 user about it. 4285 Some of the many situations in which signature and certificate 4286 checking might fail include the following: 4288 No certificate chain leads to a trusted CA 4289 No ability to check the Certificate Revocation List (CRL) for a 4290 certificate 4291 An invalid CRL was received 4292 The CRL being checked is expired 4293 The certificate is expired 4294 The certificate has been revoked 4296 There are certainly other instances where a certificate may be 4297 invalid, and it is the responsibility of the processing software to 4298 check them all thoroughly, and to decide what to do if the check 4299 fails. See RFC 3280 for additional information on certificate path 4300 validation. 4302 The push / pull nature of ODETTE-FTP means that a trading partner can 4303 make an outbound connection from behind a firewall to another 4304 trading partner and exchange files in both directions. There 4305 is no need for both partners to open ports on their firewalls to 4306 allow incoming connections - only one trading partner needs to allow 4307 incoming connections. 4309 Appendix A. Virtual File Mapping Example 4311 This example demonstrates the mapping of a Virtual File into a 4312 sequence of ODETTE-FTP Data Exchange Buffers. 4314 Each line in this extract from 'The Rime of the Ancient Mariner' by 4315 Coleridge [RIME] is considered to be a separate record in a file 4316 containing variable length records, that is being transmitted as a 4317 V Format file. 4319 It is an ancient Mariner, 4320 And he stoppeth one of three. 4321 "By thy long grey beard and glittering eye, 4322 "Now wherefore stopp'st thou me ? 4324 "The bridegroom's doors are opended wide, 4325 "And I am next of kin; 4326 "The guests are met, the feast is set : 4327 "May'st hear the merry din." 4329 He holds him with his skinny hand, 4330 "There was a ship," quoth he. 4331 "Hold off | unhand me, grey-beard loon |" 4332 Eftsoons his hand dropt he. 4334 He holds them with his glittering eye - 4335 The Wedding-Guest stood still, 4336 And listens like a three years' child : 4337 The Mariner hath his will. 4339 The Wedding-Guest sat on a stone : 4340 He cannot chuse but hear ; 4341 And thus spake on that ancient man, 4342 The bright-eyes Mariner. 4344 The ship was cheered, the harbour cleared, 4345 Merrily did we drop 4346 Below the kirk, below the hill, 4347 Below the light-house top. 4349 The Exchange buffers below were built from the above. The top line of 4350 each represents the ASCII code, while the two lines below give the 4351 hexadecimal value. 4353 Note that : 4355 . The "D" at the beginning of each Exchange buffer is the command 4356 code. 4358 . The "." preceding each subrecord is the header octet (see the 4359 hexadecimal value). 4361 Exchange buffer 1 4363 D.It is an ancient Mariner,.And he stoppeth one of three.."By th 4364 494726726626666667246766672946626627767767626662662767662A247276 4365 499409301E01E395E40D129E52CD1E4085034F005480FE50F6048255EB229048 4367 y long grey beard and glittering eye,."Now wherefore stopp'st th 4368 7266662676726667626662666776766626762A24672766766676277677277276 4369 90CFE70725902512401E407C944529E70595C12EF70785256F25034F00734048 4371 ou me ?."The bridegroom's doors are opended wide,."And I am next 4372 6726623A25662676666766627266677267626766666276662924662426626677 4373 F50D50F9248502294572FFD7304FF2301250F05E45407945C621E40901D0E584 4375 of kin;."The guests are met, the feast is set :."May'st hear th 4376 26626663A2566267677726762667227662666772672767230246727726667276 4377 0F60B9EB72485075534301250D54C048506513409303540AF2D1973408512048 4379 Exchange buffer 2 4381 D.e merry din.".He holds him with his skinny hand,."There was a 4382 486266777266622A462666672666276762667276666726666292566762767262 4383 4D50D5229049EE228508FC43089D07948089303B9EE9081E4CD2485250713010 4385 ship," quoth he.."Hold off | unhand me, grey-beard loon |".Eftso 4386 7667222776762662A24666266622276666626622676726667626666222946776 4387 3890C2015F48085E928FC40F660105E81E40D5C07259D251240CFFE012B5643F 4389 ons his hand dropt he..He holds them with his glittering eye -.T 4390 6672667266662676772662A46266667276662767626672666776766626762295 4391 FE30893081E4042F04085E78508FC430485D07948089307C944529E705950DE4 4393 he Wedding-Guest stood still,.And listens like a three years' ch 4394 6625666666247677277666277666224662667766726666262767662766772266 4395 85075449E7D75534034FF40349CCC21E40C9345E30C9B5010482550951237038 4397 Exchange buffer 3 4399 D.ild :.The Mariner hath his will..The Wedding-Guest sat on a st 4400 4866623956624676667266762667276662A56625666666247677276726626277 4401 459C40AA4850D129E52081480893079CCE2485075449E7D7553403140FE01034 4403 one :.He cannot chuse but hear ;.And thus spake on that ancient 4404 66623946266666726677626772666723A4662767727766626627667266666672 4405 FE50AA85031EEF40385350254085120B31E4048530301B50FE0481401E395E40 4407 man,.The bright-eyes Mariner..The ship was cheered, the harbour 4408 66629566267666726767246766672A5662766727672666676622766266766772 4409 D1EC84850229784D59530D129E52EA48503890071303855254C048508122F520 4411 cleared,.Merrily did we drop.Below the kirk, below the hill,.Bel 4412 6666766294677667266627626767946667276626676226666727662666620466 4413 3C51254C3D5229C90494075042F0F25CF704850B92BC025CF70485089CCC325C 4415 Exchange buffer 4 4417 D.ow the light-house top. 4418 4967276626666726677627672 4419 47F704850C9784D8F53504F0E 4421 Appendix B. ISO 646 Character Subset 4423 o-----------------------------------------------------------------o 4424 | | 7| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 4425 | | B -+-----+-----+-----+-----+-----+-----+-----+-----| 4426 | | I 6| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 4427 | | T -+-----+-----+-----+-----+-----+-----+-----+-----| 4428 | | 5| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 4429 | |----+-----+-----+-----+-----+-----+-----+-----+-----| 4430 | | | | | | | | | | | 4431 | | | | | | | | | | | 4432 |------------| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 4433 | BIT | | | | | | | | | | 4434 | 4 3 2 1 | | | | | | | | | | 4435 |============o====o=====+=====+=====+=====+=====+=====+=====+=====| 4436 | 0 0 0 0 | 0 | | | SP | 0 | | P | | | 4437 |------------|----|-----+-----+-----+-----+-----+-----+-----+-----| 4438 | 0 0 0 1 | 1 | | | | 1 | A | Q | | | 4439 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4440 | 0 0 1 0 | 2 | | | | 2 | B | R | | | 4441 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4442 | 0 0 1 1 | 3 | | | | 3 | C | S | | | 4443 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4444 | 0 1 0 0 | 4 | | | | 4 | D | T | | | 4445 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4446 | 0 1 0 1 | 5 | | | | 5 | E | U | | | 4447 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4448 | 0 1 1 0 | 6 | | | & | 6 | F | V | | | 4449 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4450 | 0 1 1 1 | 7 | | | | 7 | G | W | | | 4451 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4452 | 1 0 0 0 | 8 | | | ( | 8 | H | X | | | 4453 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4454 | 1 0 0 1 | 9 | | | ) | 9 | I | Y | | | 4455 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4456 | 1 0 1 0 | 10 | | | | | J | Z | | | 4457 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4458 | 1 0 1 1 | 11 | | | | | K | | | | 4459 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4460 | 1 1 0 0 | 12 | | | | | L | | | | 4461 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4462 | 1 1 0 1 | 13 | | | - | | M | | | | 4463 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4464 | 1 1 1 0 | 14 | | | . | | N | | | | 4465 |------------+----|-----+-----+-----+-----+-----+-----+-----+-----| 4466 | 1 1 1 1 | 15 | | | / | | O | | | | 4467 o-----------------------------------------------------------------o 4469 Appendix C. X.25 Specific Information 4471 The International Standards Organisation (ISO) Open System 4472 Interconnection (OSI) model is the basis for the ODETTE-FTP. 4474 The ODETTE-FTP covers levels 4 to 7 and originally CCITT X.25 was the 4475 only recommended telecommunication protocol for OSI's layers 1, 2, 3. 4477 ISO Reference Model : 4479 +------------------------------+ <==== File Service 4480 | Level-7 FTP application | 4481 |------------------------------| 4482 | Level-6 FTP presentation | 4483 |------------------------------| 4484 | Level-5 FTP session | 4485 |------------------------------| 4486 | Level-4 FTP transport | 4487 |------------------------------| <==== Network Service 4488 | Level-3 X.25 | 4489 |------------------------------| 4490 | Level-2 X.25 | 4491 |------------------------------| 4492 | Level-1 X.25 | 4493 +------------------------------+ 4495 C.1 X.25 Addressing Restrictions 4497 When an X.25 call is made over a PSDN, the NUA of the destination 4498 must be specified in order that the PTT may route the call. The call 4499 placed is directed to the termination equipment upon the user's 4500 premises. 4502 It is possible to provide extra information in the Call 4503 Request Packet in addition to the mandatory NUA required by the PTT. 4505 This extra information may be of 2 kinds : 4507 (a) A sub-address : 4509 It is simply an extension to the address and it is put into the 4510 called address field of the Call Request Packet. This 4511 information (Address + Sub-address) is taken from the destination 4512 address field of the F_CONNECT_RQ, therefore from the user's 4513 point of view there is no distinction between the part which is 4514 the main address and the part which is the sub-address. 4516 (b) User data : 4518 There is no standard for user data. Moreover there is no 4519 information in the F_CONNECT_RQ from which the ODETTE-entity may 4520 derive user data to be put in the N_CONNECT_RQ; therefore User 4521 data shall not be used. 4523 C.2 Special Logic 4525 The SSID field SSIDSPEC specifies whether special logic must be 4526 applied ( Y (yes) or N (no) ) to the data exchange buffer before the 4527 ODETTE-FTP moves the data into the NSDU ( Network Service Data Unit ) 4528 and passes control to the network service. 4530 C.2.1 When special logic is not to be used 4532 This logic is not applied to SSRM and SSID commands. 4534 C.2.2 The need for "enveloping" exchange buffers 4536 The "special-logic" was created in order to allow the use of 4537 ODETTE-FTP over asynchronous links. The "special-logic" could be 4538 needed to enable terminals to access an X.25 network via an 4539 asynchronous entry (through a PAD: Packet Assembly / Disassembly). 4540 The "special-logic" is not needed in case of a whole X.25 connection. 4541 This "special-logic" realises a CRC function in order to detect 4542 errors due to the asynchronous medium. 4544 Negotiation of the "special-logic" parameter in the SSID command: 4546 SSID SSID 4547 ----------------------------------------------- 4549 special-logic=yes ---------------------> 4551 <------------------------------------ special-logic=yes 4552 or 4553 <------------------------------------ special-logic=no 4555 special-logic=no ----------------------> 4557 <------------------------------------ special-logic=no 4559 This logic is activated when the SPECIAL LOGIC parameter in the SSID 4560 specifies Y (yes). 4562 Special logic processing, when activated, will function within level 4563 4 of the OSI model. 4565 +------------------------------+ <==== File Service 4566 | Level-7 FTP application | 4567 |------------------------------| 4568 | Level-6 FTP presentation | 4569 |------------------------------| 4570 | Level-5 FTP session | 4571 |------------------------------| 4572 | Level-4 FTP transport | 4573 | SPECIAL LOGIC PROCESSING | 4574 |------------------------------| <==== Network Service 4575 | Level-3 X.25 | 4576 |------------------------------| 4577 | Level-2 X.25 | 4578 |------------------------------| 4579 | Level-1 X.25 | 4580 +------------------------------+ 4582 C.2.3 Responsibilities of special logic 4584 When transmitting an exchange buffer and special logic is active, 4585 layer 4 will wrap the exchange buffer in synchronization and 4586 delineation characters, then protect the data integrity by means of a 4587 block checksum (BCS). When receiving an exchange buffer and special 4588 logic is active, layer 4 will remove such things as synchronization 4589 and delineation characters etc ... before passing the exchange 4590 buffer to the higher layers. 4592 C.2.4 Extended exchange buffer format 4594 Each envelope has one byte header prefixed to it, and a 2 bytes 4595 checksum appended to the end. The checksum is derived in a manner 4596 specified in the ISO DIS 8073 TRANSPORT LAYER documentation. 4598 The layout of the data buffer will be structured as follows: 4600 +------------------------------------------------------------------+ 4601 | S | B | | B | C | 4602 | T | S | COMPLETE EXCHANGE BUFFER (CEB) | C | / | 4603 | X | N | | S | R | 4604 +------------------------------------------------------------------+ 4605 A A A A 4606 | | | | 4607 | +------------- Block sequence number | | 4608 | | | 4609 +----------------- Synchronization character | | 4610 | | 4611 Block checksum -----------------------+ | 4612 | 4613 Delineation character --------------------+ 4615 The envelope is initialised with an STX and the checksum variables 4616 are set to 0. The leading STX is not protected by the checksum 4617 calculation but is explicitly protected by a character compare at the 4618 receiver's end. The exchange buffer is processed character by 4619 character. As each character is removed from the exchange buffer it 4620 is put through the checksum calculation and then, prior to it's 4621 insertion in the envelope it is put through the Shift-out 4622 transparency logic, which will result in either one or two characters 4623 being inserted. When the contents of the exchange buffer have been 4624 entirely processed then the checksum variables are brought up to date 4625 by inserting two X'00's through the checksum calculator and the two 4626 resultant checksum characters forwarded to the shift-out transparency 4627 logic for insertion into the envelope. Finally a carriage return (CR) 4628 is appended to the envelope. The segment is now ready for 4629 transmission to line. 4631 Upon receipt of a valid envelope that has the correct sequence 4632 number, the host should increment his sequence number register ready 4633 for the next transmission. 4635 The receiver will initialise his receiving buffer area upon receipt 4636 of a STX character, place the STX at the beginning of the buffer and 4637 reset checksum variables. All subsequent characters are processed 4638 using Shift-out logic before they are inserted into the buffer, at 4639 which point they will be NOT processed by the checksum calculator, 4640 although the character following the Shift-out (after subtracting 4641 X'20') will be. The checksum characters themselves will be processed 4642 by the checksum calculator by virtue of the design of the checksum 4643 algorithm. 4645 C.2.5 Error recovery 4647 C.2.5.1 Mechanism 4649 The error correction scheme is implemented by the definition of three 4650 Timers and the use of an ASCII NAK (Negative Acknowledgement) 4651 character followed by a C/R. The will flow between the 4652 two session partners, but only as a consequence of previous bad data. 4654 A user of the error recovery correcting extension must always work 4655 with a Credit Value of 1. This can be forced upon any session partner 4656 at SSID negotiation. The effect will be to force a simple half-duplex 4657 flip-flop protocol. 4659 Upon receipt of a bad block, send to the session partner. 4661 Upon receipt of a , a session partner should retransmit the 4662 last block in its entirety. 4664 C.2.5.2 Timers 4666 The majority of error conditions will be detected by a bad BCS 4667 sequence. However, certain conditions cannot be so detected. For 4668 example, a corrupt C/R will mean that the receiver will not know that 4669 the end of a block has been reached. No matter how long he waits, no 4670 more data will come from the sender. Thus a Timer is the only way to 4671 detect this type of corruption. There are three Timers needed to 4672 detect all possible malignant conditions of this type. 4674 T1 - Exchange Buffer Time Out (Inactivity or Response) 4675 T2 - Inter Character Time Out 4676 T3 - Data Carrier Detect Loss Time Out 4678 The three Timers are in addition to the timer defined in the original 4679 protocol. 4681 TIMER T1 - RESPONSE TIME OUT (DEFAULT = 45 SECONDS) : 4683 Used to detect a high level block Time Out. E.g. the Time Out 4684 between an SFID and its associated SFPA or SFNA response. 4686 Started - It is started after the last character of an exchange 4687 buffer has been sent to the line. 4689 Stopped - It is stopped when a STX has been received. 4691 Expiry - Retransmit the whole block again, until such time as the 4692 retry limit has been reached. 4694 TIMER T2 - INTER CHARACTER TIME OUT (DEFAULT = 7 SECONDS) : 4696 Used to detect errors in the reception of individual characters. 4698 Started - For an asynchronous entity it is started upon receipt of 4699 each character while in synchronisation mode. For an 4700 X.25 entity it is started after a received block that 4701 did not terminate an exchange buffer. 4703 Stopped - Upon receipt of the next character. 4705 Expiry - Send a , drop out of synchronised mode and go 4706 back and listen to line. 4708 TIMER T3 - DATA CARRIER TEMPORARY LOSS (DEFAULT = 1 SECOND) : 4710 Used by an asynchronous entity only and is used to detect a 4711 temporary carrier failure. 4713 Started - When DCD (Data Carrier Detect) is lost. 4715 Stopped - When DCD is regained. 4717 Expiry - Disconnect the session. 4719 C.2.5.3 Types of error 4721 Data corruption when it occurs can be categorised in one of five 4722 ways: 4724 (1) CORRUPT STX (START OF TEXT) 4726 In this situation the STX is not seen and synchronisation is not 4727 achieved. The terminating C/R is received out of synchronisation and 4728 hence the block is not seen by the receiver. A is 4729 transmitted to the sender to indicate this. The sender should then 4730 retransmit the last block (each implementation will need to set a 4731 retry limit to be used for the number of consecutive times it 4732 attempts to retransmit a block - a default limit of 5 is 4733 recommended). All data received outside synchronisation (except 4734 ) are ignored. 4736 (A) (B) 4738 Dropped Start of Text (STX) 4740 +-------------------------+ 4741 | | B | | B | C | 4742 -----| | S | CEB | C | / |-----> Not sync 4743 | | N | | S | R | 4744 +-------------------------+ 4746 +-------+ 4747 | N | C | 4748 <-----| A | / |----- Not sync 4749 | K | R | 4750 +-------+ 4752 Exchange Buffer Resent 4754 +-------------------------+ 4755 | S | B | | B | C | 4756 -----| T | S | CEB | C | / |-----> Sync 4757 | X | N | | S | R | 4758 +-------------------------+ 4760 (2) CORRUPT TERMINATION (C/R) 4762 This situation manifests itself as an extended period of 4763 synchronisation with no activity. The T2 Timer will detect this 4764 condition. 4766 (A) (B) 4768 Corrupt Carriage Return 4770 +-------------------------+ 4771 | S | B | | B | | 4772 -----| T | S | CEB | C | |-----> No activity 4773 | X | N | | S | | 4774 +-------------------------+ 4776 +-------+ 4777 | N | C | T2 4778 <-----| A | / |----- Timed out 4779 | K | R | 4780 +-------+ 4782 Exchange Buffer Resent 4784 +-------------------------+ 4785 | S | B | | B | C | 4786 -----| T | S | CEB | C | / |-----> Sync 4787 | X | N | | S | R | 4788 +-------------------------+ 4790 (3) BAD DATA 4791 (4) BAD BCS (BLOCK CHECK SUM) 4793 In this situation, the receiver is unable to tell whether the error 4794 is bad data, or bad BCS. In either case the response is to discard 4795 the exchange buffer and send a . 4797 (A) (B) 4799 Bad Data/BCS 4801 +-------------------------+ 4802 | S | B | | B | C | Bad data 4803 -----| T | S | "%! | C | / |-----> detected 4804 | X | N | | S | R | 4805 +-------------------------+ 4807 +-------+ 4808 | N | C | 4809 <-----| A | / |----- Discard Block 4810 | K | R | 4811 +-------+ 4813 Exchange Buffer Resent 4815 +-------------------------+ 4816 | S | B | | B | C | 4817 -----| T | S | CEB | C | / |-----> Data OK 4818 | X | N | | S | R | 4819 +-------------------------+ 4821 (5) BAD BLOCK SEQUENCE NUMBER (BSN) 4823 A circular sequential number (0 up to and including 9) is assigned 4824 to transmitted exchange buffers. This is to aid detection of 4825 duplicate or out of sequence exchange buffers. Once a duplicate 4826 block is detected, the exchange buffer in question is discarded. 4827 Once an out of sequence block is detected this should result in a 4828 protocol violation. 4830 Example protocol sequence: 4832 (A) (B) 4834 Exchange Buffer Being Sent 4836 +-------------------------+ 4837 | S | | | B | C | Expecting 4838 -----| T | 0 | EERP | C | / |-----> BSN=0 4839 | X | | | S | R | Transmission 4840 +-------------------------+ 4842 Exchange Buffer Being Sent 4844 +-------------------------+ 4845 | S | | | B | C | Response to 4846 <----| T | 0 | RTR | C | / |----- Previous 4847 | X | | | S | R | Block 4848 +-------------------------+ 4850 Exchange Buffer Being Sent 4852 +-------------------------+ Expecting 4853 | S | | | B | C | BSN=1 (Block 4854 -----| T | 1 | SFID | C | / |- // -> lost in 4855 | X | | | S | R | Transmission) 4856 +-------------------------+ T1 Timed Out 4858 Exchange Buffer Being Sent 4860 +-------------------------+ 4861 | S | | | B | C | Send last 4862 <----| T | 0 | RTR | C | / |----- Block 4863 | X | | | S | R | again 4864 +-------------------------+ 4866 Discard Block 4867 and start 4868 Timer T1 4870 T1 Timed Out 4872 Exchange Buffer Resent 4874 +-------------------------+ 4875 | S | | | B | C | Expecting 4876 -----| T | 1 | SFID | C | / |-----> BSN=1 4877 | X | | | S | R | Block OK 4878 +-------------------------+ 4880 Exchange Buffer Being Sent 4882 +-------------------------+ 4883 | S | | | B | C | Response 4884 <----| T | 1 | SFPA | C | / |----- BSN=1 4885 | X | | | S | R | Block OK 4886 +-------------------------+ 4888 Exchange Buffer Being Sent 4890 +-------------------------+ 4891 | S | | | B | C | 4892 -----| T | 2 | DATA | C | / |-----> Data OK 4893 | X | | | S | R | 4894 +-------------------------+ 4896 Note: A credit value of 1 must be used to guarantee half-duplex 4897 flip-flop. 4899 C.2.6 Sequence of events for special logic processing 4901 Following functions will be executed in sequence: 4903 1. Calculation of the Block Sequence Number (BSN): 4905 BSN is set to zero by SSID. First block will be sent with value 4906 zero. Value of BSN is increased by one for each data buffer to be 4907 transmitted. When BSN value exceeds 9, counter will be reset to 4908 zero. 4910 Format: numeric/1 pos. 4912 2. Calculation of the Block Checksum (BCS): 4914 Calculation is done as specified in the ISO DIS 8073 TRANSPORT 4915 LAYER document. 4917 Format: binary/2 pos. 4919 3. Shift-out transparency (See TRANSMIT/RECEIVE logic) 4921 To avoid appearance of any control characters in the data stream, 4922 all the characters of the extended exchange buffer (with exception 4923 of the STX and carriage return characters enveloping the buffer) 4924 are put through a Shift-out logic, which result in a character 4925 being inserted (SO) and adding hex value '20' to the control 4926 character. 4928 4. The carriage return is inserted at the end of the data buffer. 4930 NOTE: After adding STX, BSN, BCS, CR and SO-logic, the data buffer 4931 may exceed the data exchange buffer size. 4933 C.2.7 Checksum creation algorithm 4935 These follow the ISO DIS 8073 TRANSPORT LAYER standard. 4937 SYMBOLS : 4939 The following symbols are used : 4941 C0,C1 Variables used in the algorithm 4942 L Length of the complete NSDU 4943 X Value of the first octet of the checksum parameter 4944 Y Value of the second octet of the checksum parameter 4946 ARITHMETIC CONVENTIONS : 4948 Addition is performed in one of the two following modes : 4950 a) modulo 255 arithmetic, 4951 b) one's complement arithmetic in which if any of the variables 4952 has the value minus zero (i.e. 255) it shall be regarded as 4953 though if was plus zero (i.e. 0). 4955 ALGORITHM FOR GENERATING CHECKSUM PARAMETERS : 4957 . Set up the complete NSDU with the value of the checksum parameter 4958 field set to zero. 4960 . Initialise C0 and C1 to zero. 4962 . Process each octet sequentially from i=1 to L by 4964 a) adding the value of the octet to C0; then 4965 b) adding the value of C0 to C1. 4967 . Calculate X and Y such that 4969 X = C0 - C1 4970 Y = C1 - 2*C0 4972 . Place the values X and Y in the checksum bytes 1 and 2 4973 respectively. 4975 C.2.8 Algorithm for checking checksum parameters 4977 . Initialise parameters C0 and C1 to zero. 4979 . Process each octet of NSDU sequentially from i=1 to L by 4981 a) adding the value of the octet to C0; then 4982 b) adding the value of C0 to C1. 4984 . If, when all the octets have been processed, either or both C0 4985 and C1 does not have the value zero, then the checksum formulas 4986 have not been satisfied. 4988 Note that the nature of the algorithm is such that it is not 4989 necessary to compare explicitly the stored checksum bytes. 4991 C.2.9 Shift-out processing 4993 (Transparency for all control characters) 4995 TRANSMIT LOGIC (values SO: X'0E' or X'8E') 4997 Buffer(1), ... , (n) is a character in the buffer to be sent. 4999 FOR i=1 to n /* for all octets of the buffer */ 5001 IF ((buffer(i) & X'7F') < X'20') 5003 THEN output (SO) 5004 output (buffer(i) + X'20') 5006 ELSE output (buffer(i)) 5008 NEXT: 5010 RECEIVE LOGIC (values SO: X'0E' or X'8E') 5012 Buffer(1), ... , (n) is a character in the received buffer. 5014 drop = false 5015 FOR i=1 to n /* for all octets of the buffer */ 5017 IF drop = true 5019 THEN output (buffer(i) - X'20') 5020 drop = false 5022 ELSE IF buffer(i) = (X'0D' or X'8D') 5023 THEN Stop 5024 ELSE IF buffer(i) = SO 5025 THEN drop = true 5026 ELSE output (buffer(i)) 5028 NEXT: 5030 C.3 PAD Parameter profile 5032 Before an (ODETTE-FTP) asynchronous entity --> Modem--> PAD--> 5033 (ODETTE-FTP) native X.25 link can be established, the target PAD 5034 parameters must be set such that correct communication is 5035 established. It is strongly recommended that the PAD-parameters are 5036 set by the X.25 entity. CCITT recommendations X.3, X.28 and X.29 5037 define the PAD parameters and procedures for exchange of control 5038 information and user data between a PAD and a packet mode DTE. 5040 Following is the Parameter list and values used to set the PAD for 5041 ODETTE-FTP communication. For further detailed information see the 5042 specification for CCITT X.25, X.28, X.29 and X.3. 5044 No Description Value Meaning 5045 1 Escape from Data Transfer 0 Controlled by host 5046 2 Echo 0 No Echo 5047 3 Data Forwarding Signal 2 Carriage Return 5048 4 Selection of Idle Timer Delay 20 1 second 5049 5 Ancillary Device Control 0 X-ON, X-OFF not used 5050 6 PAD Service Signals 1 All except prompt 5051 7 Procedure on Break 2 Reset 5052 8 Discard Output 0 Do not discard 5053 9 Padding after Carriage Return 0 No padding 5054 10 Line Folding 0 No line folding 5055 11 Terminal Data Rate - Read only 5056 12 Flow Control of the PAD 0 No flow control used 5057 13 Linefeed Insertion after C/R 0 No line feed 5058 14 Linefeed Padding 0 No line feed padding 5059 15 Editing 0 No editing 5060 16 Character Delete 127 Delete 5061 17 Line Delete 24 X 5062 18 Line Display 18 R 5063 19 Editing PAD Service Signals 0 No service signal 5064 20 Echo Mask 0 No echo mask 5065 21 Parity Treatment 0 No parity check 5066 22 Page Wait 0 No page wait 5068 Note 1: 5070 Refer to CCITT (1984) 5071 - Parameters 1 - 12 are mandatory and available internationally. 5072 - Parameters 13 - 22 may be available on certain networks and may 5073 also be available internationally. 5074 - A parameter value may be mandatory or optional. 5076 The ODETTE profile refers only to parameter values which must be 5077 internationally implemented if the parameter is made available 5078 internationally. 5080 The ODETTE-FTP special logic option may be impossible on some PADs 5081 because of none support of some of the parameters (13 - 22). (If the 5082 PAD is supporting parity check (21) by default, ODETTE-FTP special 5083 logic would be impossible.) 5085 It is a user responsibility to ensure special logic consistency when 5086 making the PAD subscription. 5088 Note 2: 5090 Some parameters may have to be set differently depending on: 5091 - Make and function of the start-stop mode DTE entity. 5092 - Start-stop mode DTE entity ODETTE-FTP monitor function. 5093 - PAD services implemented. 5094 - Packet mode DTE entity ODETTE-FTP monitor function. 5096 Appendix D. OFTP X.25 Over ISDN Recommendation 5098 This appendix describes the recommendation of ODETTE Group 4 (1) for 5099 the use of OFTP (2) over X.25 over ISDN. 5101 This document offers an introductory overview of a technical subject. 5102 It is structured to contain the ODETTE recommendation, together with 5103 introductory information for the person not familiar with ISDN and 5104 also notes on the issues associated with the implementation of the 5105 recommendation. 5107 The first section provides the detailed ODETTE recommendation which 5108 is followed by a general discussion. If you are not familiar with the 5109 terminology, please read the subsequent sections first. 5111 How far an existing X.25 Line adapter may be replaced by an ISDN line 5112 adapter in an installation depends on the opportunities in view of 5113 connections (X.25 or ISDN) of the involved partners for file 5114 transfer. 5116 Companies, which keep many connections to external partners (for 5117 example car manufacturing companies), may use the OFTP file transfer 5118 in view of compatibility, which must always be considered, anyway 5119 only in parallel to the X.25 network. 5121 It is not the aim of this recommendation, to remove the OFTP file 5122 transfer generally from the X.25 network to the ISDN network. This 5123 will not always be possible for international connections because of 5124 technical reasons, and this does not always make sense for 5125 connections with a low size of data to be transmitted. 5127 Certainly the use of ISDN, when exchanging a high volume of data (for 5128 example CAD/CAM files), is very much cheaper than the use of an X.25 5129 network. For such cases this recommendation shall provide a cost 5130 effective possibility for file transfer. 5132 (1) ODETTE Group 4 is responsible for the specification of 5133 Telecommunications standards and recommendations for use within the 5134 Automotive Industry. 5136 (2) OFTP (ODETTE File Transfer Protocol) is the communications 5137 standard specified by ODETTE Group 4 designed for the transfer of 5138 both EDI and non-EDI data. 5140 Contents 5142 D.1 - ODETTE ISDN 5143 Recommendation: Defines the ODETTE recommendation in these 5144 terms. 5146 D.2 - Introduction 5147 to ISDN: Introduces the ISDN environment to the 5148 unfamiliar reader. 5150 D.3 - Equipment 5151 Types: Describes the various methods of connecting 5152 to ISDN. 5154 D.4 - Implementation: Implementation issues 5156 D.1 ODETTE ISDN Recommendation 5158 X.25: Level 2 ISO 7776 5159 Protocol 5161 Level 3 ISO 8208 5162 Protocol 5164 Packet Size 128 5166 Level 2 7 5167 Window Size 5169 Level 3 7 5170 Window Size 5172 First LCN 1 5174 Number of LCNs 1 5176 Facilities Window Size and Packet Size 5177 negotiation shall be supported 5178 by everybody. Call User Data 5179 should not be required. 5181 Calling NUA Optionally provided by the call 5182 initiator. 5184 Called NUA Should be set to a value where 5185 the last 'n' digits can be 5186 specified by the called party. 5188 ISDN: Apart from requesting a 64K unrestricted digital 5189 call, no ISDN features shall be required. 5191 Timeout control: To avoid connections (B-Channels) within the 5192 circuit switched ISDN network remaining active 5193 but unused for a long time, the adapter should 5194 include a timeout control. 5196 An ISDN connection (B-channel) should be released 5197 if no X.25 packets have been transmitted on this 5198 connection for a longer time. For flexibility a 5199 variable user definable timer should be 5200 incorporated into the adapter. 5202 In the event of a timeout situation the adapter 5203 has to release the ISDN connection and notify the 5204 local OFTP by the transmission of a clear packet. 5206 The pages that follow are informational and do 5207 not form part of this recommendation 5209 D.2 Introduction to ISDN 5211 The use of digital encoding techniques over such high 5212 quality, error free, backbone networks has allowed the 5213 PTTs to offer high bandwidths to the end user. The service 5214 is named ISDN (Integrated Services Digital Network). 5216 The increasing need to transfer larger volumes of EDI 5217 data, in particular CAD/CAM drawings, has focused 5218 attention upon high speed, low cost, communication. The 5219 traditional X.25 over a Packet Switched Data Network 5220 (PSDN) has been a good general purpose communications subsystem. 5221 Unfortunately its cost and transfer speed make 5222 PSDN expensive for the new requirement. 5224 X.25 over the new ISDN provides both, the transfer speed and cost 5225 benefits to satisfy the new requirements. 5227 Terminology: For us to make sense of ISDN and X.25 it is important 5228 that we use definitions precisely and avoid the abuses 5229 of the past. 5231 ISDN: Integrated Services Digital Network 5233 X.25: X.25 is a communications protocol. It defines the 5234 structure of data packets that comprise the protocol 5235 and the manner in which they are used. 5237 PSDN: A PSDN (Packet Switching Data Network) is a network 5238 over which the X.25 protocol is operated. 5240 PSPDN: A PSPDN (Packet Switching Public Data Network) are 5241 PSDNs operated by the PTTs. PSPDNs are given Trade 5242 Names, such as PSS in the UK, Datex-P in Germany and 5243 Transpac in France. 5245 BRI: Basic Rate Interface, also known as Basic Rate 5246 Access, defines an ISDN facility with 2 x 64K 5247 B-Channels. 5249 PRI: Primary Rate Interface, also known as Primary Rate 5250 Access, defines an ISDN facility with 30 x 64K 5251 B-Channels. 5253 Channels: ISDN is typically brought into a consumer's premises 5254 using a twisted pair of wire. Over this wire data can 5255 be transmitted in frequency bands. These frequency 5256 bands are allocated as channels. 5258 B Channels: The B Channels are the data channels and operate at 5259 64Kb. The two end users of a connection will 5260 communicate over a B Channel. 5262 D Channel: Signalling on ISDN is performed over the D Channel. 5263 Signalling is used to setup and release connections on 5264 the B channels. In some countries the D channel can 5265 also be used for limited X.25 access to the PTTs PSDN. 5267 The D channel operates at the lower speed of 16Kb as it 5268 is normally used only at the beginning and end of a 5269 connection. 5271 Bandwidth Allocation: 5272 2 Wire B2 - 64 Kbit 5273 Twisted Pair B1 - 64 Kbit 5274 D Channel - 16 Kbit 5276 The standard for the operation of the D channel is 5277 called ETSI and is used in most European countries. 5278 However some countries that started the introduction 5279 very early used proprietary standards e.g. 5281 1TR6 Used in Germany 5282 BTNR Used in UK 5284 Although there are D channel variations, this will not 5285 affect communications over the B channels as the 5286 communication over the D channel is between the 5287 subscriber and the ISDN service provider. 5289 However, the consumer's equipment must be able to 5290 handle the channel D signalling operated by the ISDN 5291 service provider and so there may be a problem of 5292 equipment availability and certification. 5294 All the PTTs have committed to migrate to ETSI (3) and 5295 many are currently supporting both, their national 5296 variant and ETSI. It is advisable that in this 5297 situation the subscriber select the ETSI variant to 5298 avoid unnecessary equipment obsolescence. 5300 (3) Also known as EURO-ISDN and as Q.931 5302 Services: The high speed service is provided in two forms, Basic 5303 and Primary. 5305 Basic: 2+D, the D 2B channel operates at 16 Kb. The 5306 Basic Rate access is normally provided to the 5307 subscriber over simple twisted pair cable. 5309 Primary: 30B+D, the D channel operates at 64 Kb. 5310 Primary Rate access is normally provided to the 5311 subscriber over shielded coaxial cable. Note, that the 5312 bandwidth for Primary is 2.048 Mbit/s. 5314 Protocols: The B channel is a binary channel and is transparent to 5315 the flow of data. Therefore all of the currently 5316 available protocols can operate over a B channel. The 5317 most common protocols are: 5319 X.25: The X.25 protocol is a primary protocol for open 5320 computer to computer communication. 5322 Passive Bus: It is possible to have an ISDN service enter a building 5323 and then have an 8 core cable laid within the building 5324 with multiple ISDN junction points, in the same way as 5325 one would have multiple telephone points (extensions) 5326 for a particular external telephone line. 5328 Connection Setup 5330 The adapter is responsible for analysing the outgoing X.25 call 5331 request and making an ISDN call to a derived ISDN address, 5332 establishing a new X.25 level-2 and level-3; then propagating the 5333 X.25 Call Request Packet. 5335 Connection Termination 5337 The termination phase of the X.25 call is made with a Clear 5338 Request and finalised with a Clear Confirmation. The recipient of 5339 the Clear Confirm should then closedown the ISDN connection. 5341 The clear down of the ISDN connection should only be made if there 5342 are no other SVCs active on the ISDN connection; note that the 5343 usage of multiple simultaneous SVCs is only by virtue of 5344 bi-lateral agreement. 5346 D.3 Equipment Types 5348 There are a number of ways in which ISDN/X.25 access can be made. 5350 Integrated Adapter 5352 This is normally a PC based ISDN adapter inside a PC. It is 5353 normal in such an environment that the OFTP application has the 5354 ability to manipulate the ISDN and X.25 aspects of the session 5355 independently and therefore have complete control. 5357 Equally important, is that the speed of communication between the 5358 adapter and the application are at PC BUS speeds. It is therefore 5359 more likely that the effective transmission speed will be nearer 5360 the 64K limit. 5362 The other benefit of such a direct linkage, is that both 64K B 5363 channels may be used in parallel and both able to operate at 5364 64Kb. 5366 Elementary Terminal Adapter 5368 In this scenario, the computer has an integral X.25 adapter 5369 communicating X.21 with a Terminal Adapter that fronts the ISDN 5370 network. This allows a host with a X.25 capability to interface 5371 to ISDN, normally on a one to one 5373 The interface between the Terminal Adapter and the PC will 5374 typically only support one 64K B channel. This is obviously an 5375 inefficient usage of the ISDN service. 5377 Because the linkage between the computer and the Terminal Adapter 5378 is only X.25, then some modification/configuration may be needed 5379 inside the Terminal Adapter when new users are added. 5381 X.25 Switch 5383 This solution is normally found inside the larger corporates 5384 where an internal X.25 network is operated or where dual X.25 and 5385 ISDN is required. 5387 The main benefit of a switch is to support both PSDN and ISDN 5388 simultaneously. Also multiple X.21 lines may be implemented 5389 between the X.25 Switch and the computer. 5391 This solution normally requires more effort to configure and may 5392 require obligations to be placed upon how incoming callers 5393 specify routing. 5395 D.4 Implementation 5397 Introduction 5399 The adoption of ISDN as an additional sub-system to support OFTP 5400 communications has associated implementation problems which can be 5401 categorised as below: 5403 X.25/ISDN Addressing 5404 Making a call 5405 Receiving a call 5406 Logical Channel assignment 5407 Facilities Negotiation 5408 ISDN call attributes 5409 Homologation Issues 5410 Performance 5411 Growth 5413 X.25/ISDN Addressing 5415 The original OFTP was designed to work over the X.25 networks 5416 provided by the PTTs (PSPDNs). The national X.25 networks were 5417 interconnected to provide a global X.25 network and a common 5418 addressing scheme was adopted by all. Although there were a few 5419 differences in addressing within a national network, the interface 5420 to other countries was quite rigid and normalised. 5422 PSPDN Numbering 5424 The addressing scheme adopted in X.25 is a 15 digit number (Network 5425 User Address, NUA) where the first three identify the country, the 5426 fourth digit identifies the network within the country and the 5427 remainder specify the individual subscriber plus an optional 5428 subaddress. In the UK where a full X.25 numbering scheme is adopted, 5429 a NUA is e.g. 234221200170; where 2342 is the DNIC (Data Network 5430 Identification Code) and 21200170 is the subscriber number. 5432 ISDN Numbering 5434 ISDN is an extension of the normal telephone system, consequently it 5435 adopts (or rather is) the same numbering scheme as the telephone 5436 system (PSTN). 5438 The Numbering Conflict 5440 The PSDN and PSTN numbering schemes are two totally different 5441 numbering schemes. There is no relationship between them. It is this 5442 conflict that is at the heart of the matter. 5444 Making a Call 5446 It is a consequence of PSDN and PSTN being based upon different and 5447 unconnected numbering schemes that the key problem arises. 5449 For X.25 to work over ISDN, three main methods of addressing are 5450 available: 5452 Un-mapped: The X.25 called NUA is used as the PSTN number. Thus 5453 an X.25 call to 0733394023 will result in a PSTN call 5454 to 0733394023 and the call request that consequently 5455 flows will also be to 0733394023. 5457 Manipulated: The X.25 called NUA is manipulated by the subtraction 5458 and/or addition of digits to derive a resultant PSTN 5459 number. Thus 2394023 could be manipulated to derive a 5460 PSTN number of 00944733394023; where the prefix 2 is 5461 deleted and replaced by 00944733. 5463 Mapped: The X.25 called NUA is used as a look-up into a table 5464 of PSTN numbers. Thus an X.25 call to 234221200170 5465 could be mapped to and result in a PSTN call to 5466 0733394023 and the call request that consequently 5467 flows will remain as 234221200170. 5469 Un-mapped Calls 5471 Un-mapped calls are where the host specified X.25 NUA is converted 5472 directly to the corresponding ISDN number. 5474 Thus an X.25 call issued by the host to X.25 NUA 0733394023 will 5475 result in an ISDN call to the PSTN number 0733394023. After the 5476 call has been established, then HDLC/X.25 protocol setup will be 5477 established after which an X.25 call request will be transferred 5478 with the NUA 0733394023. 5480 When a PSTN call is made, the number of digits in the called number 5481 vary depending upon the location of the called party. 5483 When a number is called, it may be local, national or international. 5485 local: 394023 5486 national: 0733 394023 5487 international: 009 44 733 394023 5489 Depending upon where a call originates, the corresponding X.25 NUA 5490 in the call request packet will vary dramatically. 5492 Such variation of X.25 NUA, in particular the changing prefix, can 5493 be difficult to be accommodated by X.25 routing logic in many 5494 products. 5496 When an international PSTN call is being made, then it is likely 5497 that the PSTN number exceeds 15 digits, which is the maximum length 5498 of an X.25 NUA. Therefore, using un-mapped addressing may make some 5499 international calls impossible to make. 5501 Manipulated Calls 5503 The X.25 called NUA is manipulated by the subtraction and/or 5504 addition of digits to derive a resultant PSTN number. 5506 Let us assume that by internal convention we have identified the 5507 prefix '2' to indicate an international ISDN call. Thus an X.25 call 5508 request of 244733394023 could be manipulated to derive a PSTN number 5509 of 00944733394023; where the prefix '2' is deleted and replaced by 5510 '009' (the international prefix). 5512 The X.25 call NUA would typically be left in its un-manipulated 5513 state. As individual internal conventions vary, the X.25 call NUA 5514 will vary, in the case above it would be 244733394023, but another 5515 installation might have the convention where a prefix of '56' 5516 specifies the UK and so the NUA will be 56733394023 where the '56' 5517 is deleted and replaced with '00944' to derive the PSTN number. 5519 Mapped Calls 5521 The mapped method offers maximum flexibility in that: 5523 The PSTN number can exceed 15 digits. 5525 The X.25 NUA and PSTN number can be totally different. 5527 The problem with mapped calls is administrative. IBM mainframes 5528 can't handle X.25 over ISDN at all, let alone support mapping. For 5529 the mainframe solution to work an external X.25/ISDN router box is 5530 required and it is the responsibility of the external box to provide 5531 any mapping necessary. 5533 This means that any changes or addition of OFTP partners over ISDN 5534 will require access to the Computer room or special configuration 5535 equipment to change the tables inside the external X.25/ISDN router 5536 box. 5538 Receiving Calls 5540 We have seen from the previous section that the called X.25 NUA from 5541 an ISDN incoming call may vary considerably. If ISDN/X.25 is 5542 confined to a national boundary, then such variation will not be so 5543 great as most calls will have matching called X.25 NUA and PSTN 5544 numbers. 5546 X.25 switches and X.25 adapters normally route/accept/reject calls 5547 based upon their X.25 called NUA. In particular, routing is made 5548 upon the X.25 called NUA sub-address. 5550 To derive this subaddress there are 2 methods: 5552 1) the last 'n' digits are analysed. 5554 2) the base X.25 NUA of the line is removed from the called NUA. 5555 e.g. if the called X.25 NUA is 23422120017010 and the PSDN 5556 subscriber NUA is 234221200170 then the subaddress derived from 5557 subtraction is 10. 5559 Obviously, the second method will not work if the incoming NUA 5560 varies. 5562 ISDN Features 5564 ISDN, like X.25, has a core set of features which are then enriched 5565 with options. In the original OFTP X.25 specification it was decided 5566 that the Q-bit and D-bit options were not common to all networks or 5567 applications, they were therefore positively excluded from the 5568 specification. 5570 It is proposed that apart from the core ISDN features necessary to 5571 establish a call, no other features be used. 5573 Subaddressing 5575 There are two forms of ISDN subaddressing, overdialled and specific. 5577 The overdial method allows an ISDN number to be artificially 5578 extended. A typical case would be where a private exchange has been 5579 installed in a larger company. Assume that the base number is 394023 5580 and the computer is on internal extension 1234, then by specifying 5581 an ISDN number of 3940231234, direct access may be made to the 5582 internal extension. 5584 The problem with this method is that it extends to called number and 5585 may, especially for international access, exceed the ISDN numbering 5586 limits between countries. 5588 The other method of sub-addressing is where a discrete sub address 5589 is placed in a specific field in the ISDN call setup. 5591 The problem with this method, is that it requires the caller to 5592 place the sub-address in the ISDN call setup. Not all ISDN 5593 implementations will allow this insertion. 5595 In conclusion, subaddressing of any kind should be avoided. 5597 Logical Channel Assignment 5599 An X.25 dataline will have associated with it a number of logical 5600 channels. 5602 The number of channels is a part of the agreement between the PTT 5603 and the subscriber. The number of channels subscribed to is 5604 important; call failure and similar problems will result if the 5605 number of logical channels defined at the two remote ends are 5606 different. 5608 If a DTE makes a call out, then the highest defined logical channel 5609 number will be selected, if the remote DCE does not have the same 5610 number of logical channels defined, then an invalid logical channel 5611 is being used from the perspective of the recipient DCE and the call 5612 will be rejected. 5614 Facilities Negotiation 5616 In the PSPDN environment, it is possible to subscribe to negotiation 5617 of window size and packet size. Although this negotiation requested 5618 by the originator's DTE may be propagated to the remote DTE at the 5619 discretion of the originator's DCE, it is a local responsibility 5620 between the DTE and DCE pair. 5622 In the ISDN scenario where it is a DTE-DTE type connection, the 5623 window size and packet size may be left at the default value and 5624 consequently the values may be omitted from the call request. If no 5625 values are specified then it is vital that both DTEs have 5626 configured themselves to the recommended defaults. 5628 The symptom of a window size mismatch is a hang situation without 5629 any informational error codes. 5631 The symptoms of a packet size mismatch could work in some scenarios 5632 but would otherwise issue error codes indicating invalid packet 5633 sizes. 5635 Window Size 5637 The CCITT X.25 window size has a default value of '2', although 5638 subscribers may have other default window sizes, e.g. '7', by virtue 5639 of agreement with the PTT. 5641 Window size negotiation can be explicitly requested by specifying 5642 the requested window size in the Facilities fields in the Call 5643 Request packet. 5645 Packet Size: 5647 The CCITT X.25 packet size has a default value of '128' octets, 5648 although subscribers may have other default values, e.g. '1024', 5649 agreed with the PTT. 5651 ISDN Call Setup 5653 The initial setup of an ISDN call is initiated with the transmission 5654 of a Q.931 SETUP command. Apart from requesting that a call be 5655 established, the SETUP command can optionally carry information 5656 about the calling party, the called party, routing information, the 5657 type of circuit required (e.g. voice or data) and information about 5658 the protocols than are requested to be established. 5660 Setup Parameters: 5662 Bearer capability Information transfer and 5663 access attributes 5665 Called Party number Destination's network address 5667 Called Party subaddress Destination's complete 5668 address 5670 Calling Party number Source's network address 5672 Low-layer compatibility Layer 1-3 indication 5674 High-layer compatibility Layer 4-7 indication 5676 Homologation 5678 Homologation procedures were adopted and vigorously enforced by the 5679 PTTs with respect to the quality and conformance of communications 5680 equipment connected to the services provided by the PTT s. 5682 In particular, commercial X.25 products had to be tested and 5683 approved before they could be connected to the PTTs PSPDN. The 5684 advantage of this to the subscriber was that there was very little 5685 chance of the approved equipment not working. 5687 With ISDN, similar approval standards are still enforced. So the 5688 subscriber has the same confidence in their ISDN equipment. Wrong, 5689 the ISDN equipment itself is approved but the X.15 protocol that 5690 operates on top of ISDN is now outside of the scope of approval 5691 services. 5693 This means that quality of conformance to standards of X.25 over 5694 ISDN is subject to the variable quality procedures within the 5695 various ISDN equipment manufacturers. 5697 Although it is likely that commercial reputation will place pressure 5698 upon the manufacturers with a programming bug to correct such 5699 errors, it still requires the subscribers that do not communicate 5700 well to put time and effort into finding the party with the error. 5702 So far tests have shown a number of subtle errors, such as timing 5703 problems, that have taken many days to find, prove and fix. 5705 Growth 5707 Primary Rate Access: 5709 If a user decides to plan for growth from the beginning, then the 5710 Primary Rate Access (PRI) has apparent financial benefits. Such 5711 apparent savings are usually lost due to the increased cost of user 5712 hardware to support such an interface. The BRI for data usage is 5713 very common and cards/adapters are low in cost whereas the PRI 5714 cards/adapters are few and far between and consequently highly 5715 priced. 5717 Basic Rate Access: 5719 One way to grow with ISDN is to buy multiple BRI lines, increasing 5720 slowly in units of 2 x B channels. The PTTs will be able to 5721 provide the same subscriber number for all the lines provided in a 5722 similar way to the traditional hunting group associated with PSTN 5723 type working. 5725 Performance 5727 The obvious benefit of ISDN is speed; unfortunately the majority of 5728 computer systems in use today have a finite amount of computing 5729 power available. The attachment of multiple active high speed 5730 communication lines used in file transfer mode could take a 5731 significant amount of CPU resource to the detriment of other users 5732 on the system. 5734 Connecting an ISDN line with the default 2 B channels to your 5735 computer using an X.21 interface is going to give a consistent 64Kb 5736 throughput only if one of the B channels is active at any one time. 5738 If there are two 64Kb channels active and contending for a single 5739 64Kb X.21 interface then effective throughput will be reduced 5740 significantly to just over 50 %. 5742 Mainframe issues: 5744 Users with a mainframe front-end are also going to find cost an 5745 issue. The scanners that scan the communications interfaces are 5746 based upon aggregate throughput. A 64Kb interface takes up a lot of 5747 cycles. 5749 Determining 'DTE' or 'DCE' characteristics 5751 The following section is an extract from the ISO/IEC 8208 5752 (International Standards Organization, International 5753 Electrotechnical Commission) (1990-03-15) standard which is an ISO 5754 extension of the CCITT X.25 standard. 5756 The restart procedure can be used to determine whether the DTE acts 5757 as a DCE or maintains its role as a DTE with respect to the logical 5758 channel selection during Virtual Call establishment and resolution 5759 of Virtual Call collision. 5761 When prepared to initialise the Packet Layer, the DTE shall initiate 5762 the restart procedure (i.e. transmit a RESTART REQUEST packet). The 5763 determination is based on the response received from the DXE as 5764 outlined below. 5766 a) If the DTE receives a RESTART INDICATION packet with a 5767 restarting cause code that is not 'DTE Originated' (i.e., it 5768 came from a DCE), then the DTE shall maintain its role as a DTE. 5770 b) If the DTE receives a RESTART INDICATION packet with a 5771 restarting cause code of 'DTE Originated' (i.e., it came from 5772 another DTE) then the DTE shall confirm the restart an act as a 5773 DCE. 5775 c) If the DTE receives a RESTART INDICATION packet with a 5776 restarting cause code of 'DTE Originated' (i.e., it came from 5777 another DTE) and it does not have an unconfirmed RESTART REQUEST 5778 packet outstanding (i.e., a restart collision), then the DTE 5779 shall consider this restart procedure completed but shall take 5780 no further action except to transmit another RESTART REQUEST 5781 packet after some randomly chosen time delay. 5783 d) If the DTE issues a RESTART REQUEST packet that is subsequently 5784 confirmed with a RESTART CONFIRMATION packet, then the DTE shall 5785 maintain its role as a DTE. 5787 IANA Considerations 5789 This document has no actions for IANA. 5791 Acknowledgements 5793 This document draws extensively on revision 1.4 of the ODETTE File 5794 Transfer Specification [OFTP]. 5796 Many people have contributed to the development of this protocol and 5797 their work is hereby acknowledged. 5799 Informative References 5801 [ISO-6523] International Organisation for Standardisation, ISO 5802 Standard 6523:1984, "Data interchange -- Structures for the 5803 identification of organisations", 1984 5805 [OFTP] Organisation for Data Exchange by Tele Transmission in 5806 Europe, Odette File Transfer Protocol, Revision 1.4, April 2000 5808 [RFC-739] Postel, J., "Transmission Control Protocol", STD 7, 5809 RFC 793, September 1981 5811 [RIME] Coleridge, Samuel Taylor "The Rime of the Ancient Mariner", 5812 1798 5814 [X.509] Internet Society, "Internet X.509 Public Key Infrastructure, 5815 Certificate and CRL Profile", RFC 2459, January 1999 5817 [RFC 3850] Internet Society, "Secure/Multipurpose Internet Mail 5818 Extensions (S/MIME) Version 3.1 Certificate Handling", RFC 3850, 5819 July 2004 5821 Normative References 5823 [CMS Compressed] Gutmann, P., "Compressed Data Content Type for 5824 Cryptographic Message Syntax (CMS)", RFC 3274, June 2002 5826 [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, 5827 July 2004 5829 [ISO-646] International Organisation for Standardisation, ISO 5830 Standard 646:1991, "Information technology -- ISO 7-bit coded 5831 character set for information interchange", 1991 5833 [PKCS #1] RSA Laboratories East, "PKCS #1: RSA Encryption 5834 Version 1.5", RFC 2313, March 1998 5836 [TLS] Internet Society, "The TLS Protocol, Version 1.0", RFC 2246, 5837 January 1999 5839 [UTF-8] Yergeau, F., "UTF-8, A Transformation Format of ISO 10646", 5840 RFC 3629, November 2003 5842 [ZLIB] Deutsch, P., "ZLIB Compressed Data Format Specification 5843 version 3.3", RFC 1950, May 1996 5845 ODETTE Address 5847 The ODETTE File Transfer Protocol is a product of the Technology 5848 Committee of Odette International. The Technology Committee can 5849 be contacted via the ODETTE Central Office: 5851 ODETTE INTERNATIONAL Limited 5852 Forbes House 5853 Halkin Street 5854 London 5855 SW1X 7DS 5856 United Kingdom 5858 Phone: +44 (0)171 344 9227 5859 Fax: +44 (0)171 235 7112 5860 EMail info@odette.org 5861 Web www.odette.org 5863 Author's Address 5865 The author can be contacted at 5867 Ieuan Friend 5868 Data Interchange Plc 5869 Rhys House 5870 The Minerva Business Park 5871 Lynchwood 5872 Peterborough 5873 PE2 6FT 5874 United Kingdom 5876 Phone: +44 (0)1733 371 311 5877 EMail: ieuan.friend@dip.co.uk 5879 IPR Disclosure 5881 The IETF takes no position regarding the validity or scope of any 5882 Intellectual Property Rights or other rights that might be claimed to 5883 pertain to the implementation or use of the technology described in 5884 this document or the extent to which any license under such rights 5885 might or might not be available; nor does it represent that it has 5886 made any independent effort to identify any such rights. Information 5887 on the procedures with respect to rights in RFC documents can be 5888 found in BCP 78 and BCP 79. 5890 Copies of IPR disclosures made to the IETF Secretariat and any 5891 assurances of licenses to be made available, or the result of an 5892 attempt made to obtain a general license or permission for the use of 5893 such proprietary rights by implementers or users of this 5894 specification can be obtained from the IETF on-line IPR repository at 5895 http://www.ietf.org/ipr. 5897 The IETF invites any interested party to bring to its attention any 5898 copyrights, patents or patent applications, or other proprietary 5899 rights that may cover technology that may be required to implement 5900 this standard. Please address the information to the IETF at 5901 ietf-ipr@ietf.org. 5903 Copyright 5905 Copyright (C) The Internet Society (2006). 5907 This document is subject to the rights, licenses and restrictions 5908 contained in BCP 78, and except as set forth therein, the authors 5909 retain all their rights. 5911 This document and the information contained herein are provided on 5912 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE 5913 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE 5914 INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR 5915 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 5916 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 5917 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.