1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557
|
<pre>Network Working Group I. Friend
Request for Comments: 5024 ODETTE
Obsoletes: <a href="./rfc2204">2204</a> November 2007
Category: Informational
<span class="h1">ODETTE File Transfer Protocol 2</span>
Status of This Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
IESG Note
This RFC is not a candidate for any level of Internet Standard. The
IETF disclaims any knowledge of the fitness of this RFC for any
purpose and in particular notes that the decision to publish is not
based on IETF review for such things as security, congestion control,
or inappropriate interaction with deployed protocols. The RFC Editor
has chosen to publish this document at its discretion. Readers of
this document should exercise caution in evaluating its value for
implementation and deployment. See <a href="./rfc3932">RFC 3932</a> for more information.
Abstract
This memo updates the ODETTE File Transfer Protocol, an established
file transfer protocol facilitating electronic data interchange of
business data between trading partners, to version 2.
The protocol now supports secure and authenticated communication over
the Internet using Transport Layer Security, provides file
encryption, signing, and compression using Cryptographic Message
Syntax, and provides signed receipts for the acknowledgement of
received files.
The protocol supports both direct peer-to-peer communication and
indirect communication via a Value Added Network and may be used with
TCP/IP, X.25, and ISDN-based networks.
<span class="grey">Friend Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-4">4</a>
<a href="#section-1.1">1.1</a>. Background .................................................<a href="#page-4">4</a>
<a href="#section-1.2">1.2</a>. Summary of Features ........................................<a href="#page-5">5</a>
<a href="#section-1.3">1.3</a>. General Principles .........................................<a href="#page-5">5</a>
<a href="#section-1.4">1.4</a>. Structure ..................................................<a href="#page-6">6</a>
<a href="#section-1.5">1.5</a>. Virtual Files ..............................................<a href="#page-6">6</a>
<a href="#section-1.6">1.6</a>. Service Description ........................................<a href="#page-9">9</a>
<a href="#section-1.7">1.7</a>. Security ...................................................<a href="#page-9">9</a>
<a href="#section-2">2</a>. Network Service ................................................<a href="#page-11">11</a>
<a href="#section-2.1">2.1</a>. Introduction ..............................................<a href="#page-11">11</a>
<a href="#section-2.2">2.2</a>. Service Primitives ........................................<a href="#page-11">11</a>
<a href="#section-2.3">2.3</a>. Secure ODETTE-FTP Session .................................<a href="#page-12">12</a>
<a href="#section-2.4">2.4</a>. Port Assignment ...........................................<a href="#page-12">12</a>
<a href="#section-3">3</a>. File Transfer Service ..........................................<a href="#page-13">13</a>
<a href="#section-3.1">3.1</a>. Model .....................................................<a href="#page-13">13</a>
<a href="#section-3.2">3.2</a>. Session Setup .............................................<a href="#page-14">14</a>
<a href="#section-3.3">3.3</a>. File Transfer .............................................<a href="#page-16">16</a>
<a href="#section-3.4">3.4</a>. Session Take Down .........................................<a href="#page-20">20</a>
<a href="#section-3.5">3.5</a>. Service State Automata ....................................<a href="#page-23">23</a>
<a href="#section-4">4</a>. Protocol Specification .........................................<a href="#page-28">28</a>
<a href="#section-4.1">4.1</a>. Overview ..................................................<a href="#page-28">28</a>
<a href="#section-4.2">4.2</a>. Start Session Phase .......................................<a href="#page-28">28</a>
<a href="#section-4.3">4.3</a>. Start File Phase ..........................................<a href="#page-30">30</a>
<a href="#section-4.4">4.4</a>. Data Transfer Phase .......................................<a href="#page-34">34</a>
<a href="#section-4.5">4.5</a>. End File Phase ............................................<a href="#page-35">35</a>
<a href="#section-4.6">4.6</a>. End Session Phase .........................................<a href="#page-36">36</a>
<a href="#section-4.7">4.7</a>. Problem Handling ..........................................<a href="#page-36">36</a>
<a href="#section-5">5</a>. Commands and Formats ...........................................<a href="#page-37">37</a>
<a href="#section-5.1">5.1</a>. Conventions ...............................................<a href="#page-37">37</a>
<a href="#section-5.2">5.2</a>. Commands ..................................................<a href="#page-37">37</a>
<a href="#section-5.3">5.3</a>. Command Formats ...........................................<a href="#page-37">37</a>
<a href="#section-5.4">5.4</a>. Identification Code .......................................<a href="#page-68">68</a>
<a href="#section-6">6</a>. File Services ..................................................<a href="#page-69">69</a>
<a href="#section-6.1">6.1</a>. Overview ..................................................<a href="#page-69">69</a>
<a href="#section-6.2">6.2</a>. File Signing ..............................................<a href="#page-69">69</a>
<a href="#section-6.3">6.3</a>. File Encryption ...........................................<a href="#page-70">70</a>
<a href="#section-6.4">6.4</a>. File Compression ..........................................<a href="#page-70">70</a>
<a href="#section-6.5">6.5</a>. V Format Files - Record Lengths ...........................<a href="#page-70">70</a>
<a href="#section-7">7</a>. ODETTE-FTP Data Exchange Buffer ................................<a href="#page-71">71</a>
<a href="#section-7.1">7.1</a>. Overview ..................................................<a href="#page-71">71</a>
<a href="#section-7.2">7.2</a>. Data Exchange Buffer Format ...............................<a href="#page-71">71</a>
<a href="#section-7.3">7.3</a>. Buffer Filling Rules ......................................<a href="#page-72">72</a>
<a href="#section-8">8</a>. Stream Transmission Buffer .....................................<a href="#page-73">73</a>
<a href="#section-8.1">8.1</a>. Introduction ..............................................<a href="#page-73">73</a>
<a href="#section-8.2">8.2</a>. Stream Transmission Header Format .........................<a href="#page-73">73</a>
<span class="grey">Friend Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<a href="#section-9">9</a>. Protocol State Machine .........................................<a href="#page-74">74</a>
<a href="#section-9.1">9.1</a>. ODETTE-FTP State Machine ..................................<a href="#page-74">74</a>
<a href="#section-9.2">9.2</a>. Error Handling ............................................<a href="#page-75">75</a>
<a href="#section-9.3">9.3</a>. States ....................................................<a href="#page-76">76</a>
<a href="#section-9.4">9.4</a>. Input Events ..............................................<a href="#page-79">79</a>
<a href="#section-9.5">9.5</a>. Output Events .............................................<a href="#page-79">79</a>
<a href="#section-9.6">9.6</a>. Local Variables ...........................................<a href="#page-80">80</a>
<a href="#section-9.7">9.7</a>. Local Constants ...........................................<a href="#page-81">81</a>
<a href="#section-9.8">9.8</a>. Session Connection State Table ............................<a href="#page-82">82</a>
<a href="#section-9.9">9.9</a>. Error and Abort State Table ...............................<a href="#page-85">85</a>
<a href="#section-9.10">9.10</a>. Speaker State Table 1 ....................................<a href="#page-86">86</a>
<a href="#section-9.11">9.11</a>. Speaker State Table 2 ....................................<a href="#page-91">91</a>
<a href="#section-9.12">9.12</a>. Listener State Table .....................................<a href="#page-93">93</a>
<a href="#section-9.13">9.13</a>. Example ..................................................<a href="#page-96">96</a>
<a href="#section-10">10</a>. Miscellaneous .................................................<a href="#page-97">97</a>
<a href="#section-10.1">10.1</a>. Algorithm Choice .........................................<a href="#page-97">97</a>
<a href="#section-10.2">10.2</a>. Cryptographic Algorithms .................................<a href="#page-97">97</a>
<a href="#section-10.3">10.3</a>. Protocol Extensions ......................................<a href="#page-97">97</a>
<a href="#section-10.4">10.4</a>. Certificate Services .....................................<a href="#page-98">98</a>
<a href="#section-11">11</a>. Security Considerations .......................................<a href="#page-98">98</a>
<a href="#appendix-A">Appendix A</a>. Virtual File Mapping Example .........................<a href="#page-100">100</a>
<a href="#appendix-B">Appendix B</a>. ISO 646 Character Subset .............................<a href="#page-103">103</a>
<a href="#appendix-C">Appendix C</a>. X.25 Specific Information ............................<a href="#page-104">104</a>
<a href="#appendix-C.1">C.1</a>. X.25 Addressing Restrictions .............................<a href="#page-104">104</a>
<a href="#appendix-C.2">C.2</a>. Special Logic ............................................<a href="#page-105">105</a>
<a href="#appendix-C.3">C.3</a>. PAD Parameter Profile ....................................<a href="#page-116">116</a>
<a href="#appendix-D">Appendix D</a>. OFTP X.25 Over ISDN Recommendation ...................<a href="#page-118">118</a>
<a href="#appendix-D.1">D.1</a>. ODETTE ISDN Recommendation ...............................<a href="#page-119">119</a>
<a href="#appendix-D.2">D.2</a>. Introduction to ISDN .....................................<a href="#page-120">120</a>
<a href="#appendix-D.3">D.3</a>. Equipment Types ..........................................<a href="#page-123">123</a>
<a href="#appendix-D.4">D.4</a>. Implementation ...........................................<a href="#page-124">124</a>
Acknowledgements .................................................<a href="#page-132">132</a>
Normative References .............................................<a href="#page-132">132</a>
Informative References ...........................................<a href="#page-133">133</a>
ODETTE Address ...................................................<a href="#page-134">134</a>
<span class="grey">Friend Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Background</span>
The ODETTE File Transfer Protocol (ODETTE-FTP) was defined in 1986 by
working group four of the Organisation for Data Exchange by Tele
Transmission in Europe (ODETTE) to address the electronic data
interchange (EDI) requirements of the European automotive industry.
ODETTE-FTP allows business applications to exchange files on a peer-
to-peer basis in a standardised, purely automatic manner and provides
a defined acknowledgement process on successful receipt of a file.
ODETTE-FTP is not to be confused as a variant of, or similar to, the
Internet FTP [<a href="#ref-FTP" title=""File Transfer Protocol"">FTP</a>], which provides an interactive means for
individuals to share files and which does not have any sort of
acknowledgement process. By virtue of its interactive nature, lack
of file acknowledgements, and client/server design, FTP does not
easily lend itself to mission-critical environments for the exchange
of business data.
Over the last ten years, ODETTE-FTP has been widely deployed on
systems of all sizes from personal computers to large mainframes
while the Internet has emerged as the dominant international network,
providing high-speed communication at low cost. To match the demand
for EDI over the Internet, ODETTE has decided to extend the scope of
its file transfer protocol to incorporate security functions and
advanced compression techniques to ensure that it remains at the
forefront of information exchange technology.
The protocol now supports secure and authenticated communication over
the Internet using Transport Layer Security, provides file
encryption, signing, and compression using Cryptographic Message
Syntax, and provides signed receipts for the acknowledgement of
received files.
The protocol supports both direct peer-to-peer communication and
indirect communication via a Value Added Network and may be used with
TCP/IP, X.25 and ISDN based networks.
ODETTE-FTP has been defined by the ODETTE Security Working Group
which consists of a number of ODETTE member organisations. All
members have significant operational experience working with and
developing OFTP and EDI solutions.
<span class="grey">Friend Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Summary of Features</span>
This memo is a development of version 1.4 of ODETTE-FTP [<a href="#ref-OFTP" title="Revision 1.4">OFTP</a>] with
these changes/additions:
Session level encryption
File level encryption
Secure authentication
File compression
Signed End to End Response (EERP)
Signed Negative End Response (NERP)
Maximum permitted file size increased to 9 PB (petabytes)
Virtual file description added
Extended error codes
Version 1.4 of ODETTE-FTP included these changes and additions to
version 1.3:
Negative End Response (NERP)
Extended Date and Time stamp
New reason code 14 (File direction refused)
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. General Principles</span>
The aim of ODETTE-FTP is to facilitate the transmission of a file
between one or more locations in a way that is independent of the
data communication network, system hardware, and software
environment.
In designing and specifying the protocol, the following factors were
considered.
1. The possible differences of size and sophistication of file
storage and small and large systems.
2. The necessity to work with existing systems (reduce changes to
existing products and allow easy implementation).
3. Systems of different ages.
4. Systems of different manufactures.
5. The potential for growth in sophistication (limit impact and avoid
changes at other locations).
<span class="grey">Friend Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-1.4" href="#section-1.4">1.4</a>. Structure</span>
ODETTE-FTP is modelled on the OSI reference model. It is designed to
use the Network Service provided by level 3 of the model and provide
a File Service to the users. Thus, the protocol spans levels 4 to 7
of the model.
The description of ODETTE-FTP contained in this memo is closely
related to the original 'X.25' specification of the protocol and in
the spirit of the OSI model describes:
1. A File Service provided to a User Monitor.
2. A protocol for the exchange of information between peer
ODETTE-FTP entities.
<span class="h3"><a class="selflink" id="section-1.5" href="#section-1.5">1.5</a>. Virtual Files</span>
Information is always exchanged between ODETTE-FTP entities in a
standard representation called a Virtual File. This allows data
transfer without regard for the nature of the communicating systems.
The mapping of a file between a local and virtual representation will
vary from system to system and is not defined here.
<span class="grey">Friend Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
o---------o
Site | Local |
A | File A |
o---------o
|
o----------------------- Mapping A ------------------------o
| | |
| o---------o |
| | Virtual | |
| | File | |
| o---------o |
| o------------------------------------------------o |
| | | |
| | ODETTE-FTP | |
| | | |
| o------------------------------------------------o |
| o---------o o---------o |
| | Virtual | | Virtual | |
| | File | | File | |
| o---------o o----+----o |
| | | |
o------ Mapping B ------------------------ Mapping C ------o
| |
o---------o o----+----o
| Local | Site Site | Local |
| File B | B C | File C |
o---------o o---------o
A Virtual File is described by a set of attributes identifying and
defining the data to be transferred. The main attributes are
detailed in Sections <a href="#section-1.5.1">1.5.1</a> to <a href="#section-1.5.4">1.5.4</a>.
<span class="h4"><a class="selflink" id="section-1.5.1" href="#section-1.5.1">1.5.1</a>. Organisation</span>
Sequential
Logical records are presented one after another. ODETTE-FTP must
be aware of the record boundaries.
<span class="h4"><a class="selflink" id="section-1.5.2" href="#section-1.5.2">1.5.2</a>. Identification</span>
Dataset Name
Dataset name of the Virtual File being transferred, assigned by
bilateral agreement.
<span class="grey">Friend Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Time stamp (HHMMSScccc)
A file qualifier indicating the time the Virtual File was made
available for transmission. The counter (cccc=0001-9999) gives
higher resolution.
Date stamp (CCYYMMDD)
A file qualifier indicating the date the Virtual File was made
available for transmission.
The Dataset Name, Date, and Time attributes are assigned by the
Virtual File's originator and are used to uniquely identify a file.
They are all mandatory and must not be changed by intermediate
locations.
The User Monitor may use the Virtual File Date and Time attributes in
local processes involving date comparisons and calculations. Any
such use falls outside the scope of this protocol.
<span class="h4"><a class="selflink" id="section-1.5.3" href="#section-1.5.3">1.5.3</a>. Record Format</span>
Four record formats are defined:
Fixed (F)
Each record in the file has the same length.
Variable (V)
The records in the file can have different lengths.
Unstructured (U)
The file contains a stream of data. No structure is defined.
Text File (T)
A Text File is defined as a sequence of ASCII characters,
containing no control characters except CR-LF that delimit
lines. A line will not have more than 2048 characters.
<span class="h4"><a class="selflink" id="section-1.5.4" href="#section-1.5.4">1.5.4</a>. Restart</span>
ODETTE-FTP can negotiate the restart of an interrupted Virtual File
transmission. Fixed and Variable format files are restarted on
record boundaries. For Unstructured and Text files, the restart
position is expressed as a file offset in 1K (1024 octet) blocks.
<span class="grey">Friend Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The restart position is always calculated relative to the start of
the Virtual File.
<span class="h3"><a class="selflink" id="section-1.6" href="#section-1.6">1.6</a>. Service Description</span>
ODETTE-FTP provides a file transfer service to a User Monitor and in
turn uses the Internet transport layer stream service to communicate
between peers.
These services are specified in this memo using service primitives
grouped into four classes as follows:
Request (RQ) An entity asks the service to do some work.
Indication (IND) A service informs an entity of an event.
Response (RS) An entity responds to an event.
Confirm (CF) A service informs an entity of the response.
Services may be confirmed, using the request, indication, response,
and confirm primitives, or unconfirmed using just the request and
indication primitives.
<span class="h3"><a class="selflink" id="section-1.7" href="#section-1.7">1.7</a>. Security</span>
ODETTE-FTP provides a number of security services to protect a
Virtual File transmission across a hostile network.
These security services are as follows:
Confidentiality
Integrity
Non-repudiation of receipt
Non-repudiation of origin
Secure authentication
Security services in this specification are implemented as follows:
Session level encryption
File level encryption
Signed files
Signed receipts
Session level authentication
ODETTE-FTP Authentication
Session level encryption provides data confidentiality by encryption
of all the protocol commands and data exchanged between two parties,
preventing a third party from extracting any useful information from
the transmission.
<span class="grey">Friend Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
This session level encryption is achieved by layering ODETTE-FTP over
Transport Layer Security [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>], distinguishing between secure and
unsecure TCP/IP traffic using different port numbers.
File encryption provides complementary data confidentiality by
encryption of the files in their entirety. Generally, this
encryption occurs prior to transmission, but it is also possible to
encrypt and send files while in session. File encryption has the
additional benefit of allowing a file to remain encrypted outside of
the communications session in which it was sent. The file can be
received and forwarded by multiple intermediaries, yet only the final
destination will be able to decrypt the file. File encryption does
not encrypt the actual protocol commands, so trading partner EDI
codes and Virtual File names are still viewable.
Secure authentication is implemented through the session level
authentication features available in [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] and proves the identity of
the parties wishing to communicate.
ODETTE-FTP Authentication also provides an authentication mechanism,
but one that is integral to ODETTE-FTP and is available on all
network infrastructures over which ODETTE-FTP is operated (this is in
contrast to [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] which is generally only available over TCP/IP-based
networks). Both parties are required to possess certificates when
ODETTE-FTP Authentication is used.
The security features in ODETTE-FTP 2 are centred around the use of
[<a href="#ref-X.509" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">X.509</a>] certificates. To take advantage of the complete range of
security services offered in both directions, each party is required
to possess an [<a href="#ref-X.509" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">X.509</a>] certificate. If the confidentiality of data
between two parties is the only concern, then [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] alone can be
used, which allows the party accepting an incoming connection (the
Responder) to be the only partner required to possess a certificate.
For businesses, this means that session level encryption between a
hub and its trading partners can be achieved without requiring all
the trading partners to obtain a certificate, assuming that trading
partners always connect to the hub.
With the exception of [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>], all the security services work with X.25
and ISDN as transport media. Although nothing technically precludes
[<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] from working with X.25 or ISDN, implementations are rare.
<span class="grey">Friend Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Network Service</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Introduction</span>
ODETTE-FTP peer entities communicate with each other via the OSI
Network Service or the Transmission Control Protocol Transport
Service [<a href="./rfc793" title=""Transmission Control Protocol"">RFC793</a>]. This is described by service primitives
representing request, indication, response, and confirmation actions.
For the Internet environment, the service primitives mentioned below
for the Network Service have to be mapped to the respective Transport
Service primitives. This section describes the Network Service
primitives used by ODETTE-FTP and their relationship to the TCP
interface. In practice, the local transport service application
programming interface will be used to access the TCP service.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Service Primitives</span>
All network primitives can be directly mapped to the respective
Transport primitives when using TCP.
<span class="h4"><a class="selflink" id="section-2.2.1" href="#section-2.2.1">2.2.1</a>. Network Connection</span>
N_CON_RQ ------> N_CON_IND
N_CON_CF <------ N_CON_RS
This describes the setup of a connection. The requesting ODETTE-FTP
peer uses the N_CON_RQ primitive to request an active OPEN of a
connection to a peer ODETTE-FTP, the Responder, which has previously
requested a passive OPEN. The Responder is notified of the incoming
connection via N_CON_IND and accepts it with N_CON_RS. The requester
is notified of the completion of its OPEN request upon receipt of
N_CON_CF.
Parameters
Request Indication Response Confirmation
---------------------------------------------------------------------
Dest addr ------> same same same
<span class="h4"><a class="selflink" id="section-2.2.2" href="#section-2.2.2">2.2.2</a>. Network Data</span>
N_DATA_RQ ------> N_DATA_IND
Data exchange is an unconfirmed service. The requester passes data
for transmission to the Network Service via the N_DATA_RQ primitive.
The Responder is notified of the availability of data via N_DATA_IND.
<span class="grey">Friend Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
In practice, the notification and receipt of data may be combined,
such as by the return from a blocking read from the network socket.
Parameters
Request Indication
---------------------------------------------------------------------
Data ------------------> same
<span class="h4"><a class="selflink" id="section-2.2.3" href="#section-2.2.3">2.2.3</a>. Network Disconnection</span>
N_DISC_RQ ------> N_DISC_IND
An ODETTE-FTP requests the termination of a connection with the
N_DISC_RQ service primitive. Its peer is notified of the CLOSE by a
N_DISC_IND event. It is recognised that each peer must issue a
N_DISC_RQ primitive to complete the TCP symmetric close procedure.
<span class="h4"><a class="selflink" id="section-2.2.4" href="#section-2.2.4">2.2.4</a>. Network Reset</span>
------> N_RST_IND
An ODETTE-FTP entity is notified of a network error by a N_RST_IND
event. It should be noted that N_RST_IND would also be generated by
a peer RESETTING the connection, but this is ignored here as N_RST_RQ
is never sent to the Network Service by ODETTE-FTP.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Secure ODETTE-FTP Session</span>
[<a id="ref-TLS">TLS</a>] provides a mechanism for securing an ODETTE-FTP session over
the Internet or a TCP network. ODETTE-FTP is layered over [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>],
distinguishing between secure and unsecure traffic by using different
server ports.
The implementation is very simple. Layer ODETTE-FTP over [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] in
the same way as layering ODETTE-FTP over TCP/IP. [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] provides both
session encryption and authentication, both of which may be used by
the connecting parties. A party acts as a [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] server when
receiving calls and acts as a [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] client when making calls. When
the [<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] handshake has completed, the responding ODETTE-FTP may
start the ODETTE-FTP session by sending the Ready Message.
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Port Assignment</span>
An ODETTE-FTP requester will select a suitable local port.
The responding ODETTE-FTP will listen for connections on Registered
Port 3305; the service name is 'odette-ftp'.
<span class="grey">Friend Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The responding ODETTE-FTP will listen for secure TLS connections on
Registered Port 6619; the service name is 'odette-ftps'.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. File Transfer Service</span>
The File Transfer Service describes the services offered by an
ODETTE-FTP entity to its User Monitor (generally an application).
NOTE: The implementation of the service primitives is an application
issue.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Model</span>
o-------------------o o-------------------o
| | | |
| USER MONITOR | | USER MONITOR |
| | | |
o-------------------o o-------------------o
| A | A
| | | |
F_XXX_RQ/RS | | F_XXX_IND/CF F_XXX_RQ/RS | | F_XXX_IND/CF
V | V |
o-------------------o o-------------------o
| |- - - - - - >| |
| ODETTE-FTP Entity | E-Buffer | ODETTE-FTP Entity |
| |< - - - - - -| |
o-------------------o o-------------------o
| A | A
N_XXX_RQ/RS | | N_XXX_IND/CF N_XXX_RQ/RS | | N_XXX_IND/CF
| | | |
V | V |
o---------------------------------------------------------o
| |
| N E T W O R K |
| |
o---------------------------------------------------------o
Key: E-Buffer - Exchange Buffer
F_ - File Transfer Service Primitive
N_ - Network Service Primitive
<span class="grey">Friend Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Session Setup</span>
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. Session Connection Service</span>
These diagrams represent the interactions between two communicating
ODETTE-FTP entities and their respective User Agents.
The vertical lines represent the ODETTE-FTP entities. The User
Agents are not shown.
| |
F_CONNECT_RQ ---->|------------|----> F_CONNECT_IND
| |
F_CONNECT_CF <----|------------|<---- F_CONNECT_RS
| |
Parameters
Request Indication Response Confirm
---------------------------------------------------------------------
called-address -> same --- ----
calling-address-> same --- ----
ID1 ------------> same ID2 ------------> same
PSW1------------> same PSW2 -----------> same
mode1 ----------> mode2 ----------> mode3 ----------> same
restart1 -------> same -----------> restart2 -------> same
authentication1-> same -----------> authentication2-> same
---------------------------------------------------------------------
Mode
Specifies the file transfer capabilities of the entity sending or
receiving a F_CONNECT primitive for the duration of the session.
Value:
Sender-only The entity can only send files.
Receiver-only The entity can only receive files.
Both The entity can both send and receive files.
Negotiation:
Sender-only Not negotiable.
Receiver-only Not negotiable.
Both Can be negotiated down to Sender-only or
Receiver-only by the User Monitor or the
ODETTE-FTP entity.
<span class="grey">Friend Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Request Indication Response Confirm
---------------------------------------------------------------------
Sender-only ----> Receiver-only --> Receiver-only --> Sender-only
Receiver-only --> Sender-only ----> Sender-only ----> Receiver-only
Both -----+-----> Both ----+------> Both -----------> Both
| or +------> Receiver-only --> Sender-only
| or +------> Sender-only ----> Receiver-only
|
or +-----> Receiver-only --> Receiver-only --> Sender-only
or +-----> Sender-only ----> Sender-only ----> Receiver-only
---------------------------------------------------------------------
Restart
Specifies the file transfer restart capabilities of the User
Monitor.
Value:
Y The entity can restart file transfers.
N The entity cannot restart file transfers.
Negotiation:
Request Indication Response Confirm
---------------------------------------------------------------------
restart = Y ----> restart = Y --+-> restart = Y ----> restart = Y
or +-> restart = N ----> restart = N
restart = N ----> restart = N ----> restart = N ----> restart = N
---------------------------------------------------------------------
Authentication
Specifies the authentication requirement of the User Monitor.
Value:
Y Authentication required.
N Authentication not required.
Negotiation: Not negotiable.
<span class="grey">Friend Informational [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Request Indication Response Confirm
---------------------------------------------------------------------
auth = Y ----> auth = Y ----> auth = Y ----> auth = Y
auth = N ----> auth = N ----> auth = N ----> auth = N
---------------------------------------------------------------------
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. File Transfer</span>
<span class="h4"><a class="selflink" id="section-3.3.1" href="#section-3.3.1">3.3.1</a>. File Opening</span>
| |
F_START_FILE_RQ ---->|------------|----> F_START_FILE_IND
| |
F_START_FILE_CF(+|-) <----|------------|<---- F_START_FILE_RS(+|-)
| |
Parameters
Request Ind. RS(+) CF(+) RS(-) CF(-)
------------------------------------------------------------------
filename-------> same ---- ---- ---- ----
date-time------> same ---- ---- ---- ----
destination----> same ---- ---- ---- ----
originator-----> same ---- ---- ---- ----
rec-format-----> same ---- ---- ---- ----
rec-size ------> same ---- ---- ---- ----
file-size------> same ---- ---- ---- ----
org-file-size--> same ---- ---- ---- ----
signed-eerp----> same ---- ---- ---- ----
cipher---------> same ---- ---- ---- ----
sec-services---> same ---- ---- ---- ----
compression----> same ---- ---- ---- ----
envelope-format> same ---- ---- ---- ----
description----> same ---- ---- ---- ----
restart-pos1---> same-> restart-pos2-> same ---- ----
---- ---- ---- ---- cause ------> same
---- ---- ---- ---- retry-later-> same
------------------------------------------------------------------
Notes:
1. Retry-later has values "Y" or "N".
2. Cause is the reason for refusing the transfer (1,..,13,99).
3. Restart-pos1 not equal 0 is only valid if restart has been
agreed during initial negotiation.
4. Restart-pos2 is less than or equal to restart-pos1.
<span class="grey">Friend Informational [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-3.3.2" href="#section-3.3.2">3.3.2</a>. Data Regime</span>
| |
F_DATA_RQ ---->|------------|----> F_DATA_IND
| |
F_DATA_CF <----|(---CDT----)|
| |
Note: Unlike other commands, where the F_XXX_CF signal is a result of
a corresponding F_XXX_RS command, in this case, the local entity
layer issues this signal when it is ready for the next data
request. This decision is based on the current credit count and
the reception of CDT (Set Credit) from the receiver.
<span class="h4"><a class="selflink" id="section-3.3.3" href="#section-3.3.3">3.3.3</a>. File Closing</span>
| |
F_CLOSE_FILE_RQ --->|------------|----> F_CLOSE_FILE_IND
| |
F_CLOSE_FILE_CF(+|-) <---|------------|<---- F_CLOSE_FILE_RS(+|-)
| |
Parameters
Request Ind RS(+) CF(+) RS(-) CF(-)
---------------------------------------------------------------------
rec-count ---> same ---- ---- ---- ----
unit-count --> same ---- ---- ---- ----
---- ---- Speaker=Y ---> Speaker=N ---- ----
---- ---- Speaker=N ---> Speaker=Y ---- ----
---- ---- ---- ---- cause ---> same
---------------------------------------------------------------------
In a positive Close File response (F_CLOSE_FILE_RS(+)) the current
Listener may either:
1. Set Speaker to "Yes" and become the Speaker or
2. Set Speaker to "No" and remain the Listener.
The File Transfer service will ensure that the setting of the speaker
parameter is consistent with the capabilities of the peer user.
The turn is never exchanged in the case of a negative response or
confirmation.
Only the Speaker is allowed to issue F_XXX_FILE_RQ primitives.
<span class="grey">Friend Informational [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-3.3.4" href="#section-3.3.4">3.3.4</a>. Exchanging the Turn</span>
<span class="h5"><a class="selflink" id="section-3.3.4.1" href="#section-3.3.4.1">3.3.4.1</a>. Initial Turn (First Speaker)</span>
The Initiator becomes the first Speaker at the end of the Session
Setup (F_CONNECT_CF received by Initiator and F_CONNECT_RS sent by
Responder).
<span class="h5"><a class="selflink" id="section-3.3.4.2" href="#section-3.3.4.2">3.3.4.2</a>. Following Turns</span>
Rules:
1. At each unsuccessful End of File, the turn is not exchanged.
2. At each successful End of File, the turn is exchanged if requested
by the Listener:
- The current Listener receives F_CLOSE_FILE_IND (Speaker =
choice).
- If the Listener answers F_CLOSE_FILE_RS(Speaker = YES), it
becomes the Speaker, the Speaker receives F_CLOSE_FILE_CF
(Speaker = NO) and becomes the Listener.
- If the Listener answers F_CLOSE_FILE_RS(Speaker = NO), it
remains as the Listener, and the Speaker receives
F_CLOSE_FILE_CF (Speaker = YES) and remains as the Speaker.
3. The Speaker can issue a Change Direction request (F_CD_RQ) to
become the Listener. The Listener receives a Change Direction
indication (F_CD_IND) and becomes the Speaker.
4. In order to prevent loops of F_CD_RQ/IND, the Speaker may not send
an F_CD_RQ after receiving an unsolicited F_CD_IND. If the
Listener receives a solicited F_CD_IND as a result of sending
EFPA(Speaker=Yes), it is acceptable to immediately relinquish the
right to speak by sending an F_CD_RQ.
<span class="h4"><a class="selflink" id="section-3.3.5" href="#section-3.3.5">3.3.5</a>. End to End Response</span>
This service is initiated by the current Speaker (if there is no file
transfer in progress) to send an End to End Response from the final
destination to the originator of a file.
<span class="grey">Friend Informational [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
| |
F_EERP_RQ ---->|------------|----> F_EERP_IND
| |
F_RTR_CF <----|------------|<---- F_RTR_RS
| |
Parameters
Request Indication
------------------------------------
filename -----------> same
date ---------------> same
time ---------------> same
destination --------> same
originator ---------> same
hash ---------------> same
signature ----------> same
------------------------------------
Relationship with Turn:
- Only the Speaker may send an End to End Response request.
- Invoking the EERP service does not change the turn.
- If an F_CD_IND has been received just before F_EERP_RQ is issued,
this results in leaving the special condition created by the
reception of F_CD_IND; i.e., while it was possible to issue
F_RELEASE_RQ and not possible to issue F_CD_RQ just after the
reception of F_CD_IND, after having issued F_EERP_RQ the normal
Speaker status is entered again (F_CD_RQ valid, but F_RELEASE_RQ
not valid).
Notes:
1. The F_EERP_RQ (and also F_NERP_RQ) is confirmed with an F_RTR_CF
signal. The F_RTR_CF signal is common to both F_EERP_RQ and
F_NERP_RQ. There should be no ambiguity, since there can only be
one such request pending at any one time.
2. The signature is optional and is requested when sending the
F_START_FILE_RQ.
3. If it is not possible to sign the EERP, then an unsigned EERP
should still be sent.
<span class="grey">Friend Informational [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
4. It is an application implementation issue to validate the contents
of the EERP and its signature and to decide what action to take on
receipt of an EERP that fails validation or is not signed when a
signed EERP was requested.
<span class="h4"><a class="selflink" id="section-3.3.6" href="#section-3.3.6">3.3.6</a>. Negative End Response</span>
This service is initiated by the current speaker (if there is no file
transfer in progress) to send a Negative End Response when a file
could not be transmitted to the next destination. It is sent only if
the problem is of a non-temporary kind.
This service may also be initiated by the final destination instead
of sending an End to End Response when a file could not be processed,
after having successfully received the file.
| |
F_NERP_RQ ---->|------------|----> F_NERP_IND
| |
F_RTR_CF <----|------------|----- F_RTR_RS
| |
Parameters
Request Indication
---------------------------------------------------
filename ----------------------> same
date --------------------------> same
time --------------------------> same
destination -------------------> same
originator --------------------> same
creator of negative response --> same
reason ------------------------> same
reason text -------------------> same
hash --------------------------> same
signature ---------------------> same
---------------------------------------------------
Relationship with Turn:
The same as for the End-To-End response (see <a href="#section-3.3.5">Section 3.3.5</a>).
<span class="grey">Friend Informational [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Session Take Down</span>
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. Normal Close</span>
| |
F_RELEASE_RQ ---->|------------|----> F_RELEASE_IND
| |
Parameters
Request Indication
---------------------------------------------------------------------
reason = normal -------> ----
---------------------------------------------------------------------
The Release service can only be initiated by the Speaker.
The Speaker can only issue a Release request (F_RELEASE_RQ) just
after receiving an unsolicited Change Direction indication
(F_CD_IND). This ensures that the other partner doesn't want to send
any more files in this session.
Peer ODETTE-FTP entities action a normal session release by
specifying Reason = Normal in an End Session (ESID) command.
<span class="h4"><a class="selflink" id="section-3.4.2" href="#section-3.4.2">3.4.2</a>. Abnormal Close</span>
| |
F_RELEASE_RQ ---->|------------|----> F_ABORT_IND
| |
Parameters
Request Indication
---------------------------------------------------------------------
reason = error value --> same (or equivalent)
AO (Abort Origin) = (L)ocal or (D)istant
---------------------------------------------------------------------
Abnormal session release can be initiated by either the Speaker or
the Listener and also by the user or provider.
Abnormal session release can occur at any time within the session.
Peer ODETTE-FTP entities action an abnormal session release by
specifying Reason = Error-value in an End Session (ESID) command.
<span class="grey">Friend Informational [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The abnormal session release deals with the following types of error:
1. The service provider will initiate an abnormal release in the
following cases:
1. Protocol error.
2. Failure of the Start Session (SSID) negotiation.
3. Command not recognised.
4. Data Exchange Buffer size error.
5. Resources not available.
6. Other unspecified abort code (with Reason = unspecified).
2. The User Monitor will initiate an abnormal release in the
following cases:
1. Local site emergency close down.
2. Resources not available.
3. Other unspecified abort code (with Reason = unspecified).
Other error types may be handled by an abort of the connection.
<span class="h4"><a class="selflink" id="section-3.4.3" href="#section-3.4.3">3.4.3</a>. Abort</span>
| |
F_ABORT_RQ ---->|------------|----> F_ABORT_IND
| |
User-Initiated Abort
| |
F_ABORT_IND <----|------------|----> F_ABORT_IND
| |
Provider-Initiated Abort
Parameters
Request Indication
---------------------------------------------------------------------
-- R (Reason): specified or unspecified
-- AO (Abort Origin): (L)ocal or (D)istant
---------------------------------------------------------------------
The Abort service may be invoked by either entity at any time.
The service provider may initiate an abort in case of error
detection.
<span class="grey">Friend Informational [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-3.4.4" href="#section-3.4.4">3.4.4</a>. Explanation of Session Take Down Services</span>
User | OFTP | Network | OFTP | User
---------------|------|----------------------|------|---------------
| | | |
1. Normal Release
F_RELEASE_RQ | | ESID(R=normal) | | F_RELEASE_IND
*--------------|-> ==|======================|=> --|-------------->
(R=normal) | | | |
2. User-Initiated Abnormal Release
F_RELEASE_RQ | | ESID(R=error) | | F_ABORT_IND
*--------------|-> ==|======================|=> -|-------------->
(R=error value)| | | | (R=error,AO=D)
3. Provider-Initiated Abnormal Release
F_ABORT_IND | | ESID(R=error) | | F_ABORT_IND
<--------------|-* *=|======================|=> --|-------------->
| | | |
4. User-Initiated Connection Abort
F_ABORT_RQ | | N_DISC_RQ | | F_ABORT_IND
*--------------|-> --|--------->..----------|-> --|-------------->
| | N_DISC_IND | | (R=unsp.,AO=D)
5. Provider-Initiated Connection Abort
F_ABORT_IND | | N_DISC_RQ | | F_ABORT_IND
<--------------|-* *-|--------->..----------|-> --|-------------->
(R=error,AO=L) | | N_DISC_IND | | (R=unsp.,AO=D)
Key: * Origin of command flow
F_ ---> File Transfer Service primitive
N_ ---> Network Service primitive
===> ODETTE-FTP (OFTP) protocol message
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. Service State Automata</span>
These state automata define the service as viewed by the User
Monitor. Events causing a state transition are shown in lower case
and the resulting action in upper case where appropriate.
<span class="grey">Friend Informational [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-3.5.1" href="#section-3.5.1">3.5.1</a>. Idle State Diagram</span>
o------------o
decision | | f_connect_ind
+-----------------| IDLE |-----------------+
| F_CONNECT_RQ | (0) | F_CONNECT_RS |
| o------------o |
V |
o-----------------o |
| | |
| I_WF_FCONNECTCF | |
| | |
o--------+--------o |
| |
| F_CONNECT_CF |
V V
o-----------------o o-----------------o
| | | |
| IDLE SPEAKER | | IDLE LISTENER |
| (1) | | (2) |
| See Speaker | | See Listener |
| State Diagram | | State Diagram |
| | | |
o-----------------o o-----------------o
<span class="grey">Friend Informational [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-3.5.2" href="#section-3.5.2">3.5.2</a>. Speaker State Diagram</span>
o-----------------o o-----------------o
| IDLE LISTENER | | IDLE |
| CD_RQ just sent | | see (0) |
| see (3), Listen | | Idle |
| State Diagram | | State Diagram |
o-----------------o o-----------------o
A A
| |
decision decision
F_CD_RQ F_RELEASE_RQ
| |
o================o decision o----------o decision o---------------o
| |---------->| WAIT FOR |<----------| |
| | F_EERP_RQ | | F_EERP_RQ | |
| IDLE | | EERP/ | | IDLE |
| SPEAKER | decision | NERP | decision | SPEAKER |
| (1) |---------->| CONFIRM. |<----------| (4) |
| | F_NERP_RQ | | F_NERP_RQ | |
| | | | | |
| | | | | CD_IND |
| | f_rtr_cf | | | just received |
| |<----------| | | |
| | o----------o | |
| | | |
| | | |
o================o o---------------o
A A | |
| | | decision and P2 decision and P2 |
| | +-----------------+ +---------------------+
| | F_START_FILE_RQ | | F_START_FILE_RQ
| | V V
| | o---------------o
| | f_file_start_cf(-) | |
| +----------------------| OPENING |
| | |
| o---------------o
| |
f_file_close_cf(-) or f_start_file_cf(+)
f_file_close_cf(+) and not P1 |
| V
<span class="grey">Friend Informational [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
o---------------o o---------------o record to send o---------o
| | | |------------------>| |
| CLOSING | | DATA TRANSFER | F_DATA_RQ | NEXT |
| | | | | RECORD |
| | | | f_data_cf | |
| | | |<------------------| |
o---------------o o---------------o o---------o
| A |
| | end of file |
| +-------------------+
| F_CLOSE_FILE_RQ
| o-----------------o
| f_file_close_cf(+) and P1 | IDLE LISTENER |
+--------------------------------------------->| see (2), Listen |
| State Diagram |
Predicates: o-----------------o
P1: Positive confirmation and Speaker = YES
P2: Mode = Both or (Mode = Sender-only)
<span class="h4"><a class="selflink" id="section-3.5.3" href="#section-3.5.3">3.5.3</a> Listener State Diagram</span>
o-----------------o o-----------------o
| IDLE SPEAKER | | IDLE |
| CD_IND just | | |
| received see(4) | | see (0) |
| Speaker State | | Idle |
| Diagram | | State Diagram |
o-----------------o o-----------------o
A A
| |
decision f_eerp_ind decision
F_CD_IND +--------------+ F_RELEASE_IND
| | F_RTR_RS | |
o=================o | o-----------------o
| |<-----------+ | |
| | | |
| | f_nerp_ind | |
| |------------+ | |
| | F_RTR_RS | | |
| | | | |
| |<-----------+ | |
| IDLE LISTENER | f_eerp_ind | IDLE LISTENER |
| (2) |<-----------------------------| (3) |
| | F_RTR_RS | CD_RQ |
| | | just sent |
| | f_nerp_ind | |
| |<-----------------------------| |
<span class="grey">Friend Informational [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
| | F_RTR_RS | |
| | | |
| | f_start_file_ind | |
| | and not P1 | |
| |---------------------+ | |
o=================o F_START_FILE_RS(-) | o-----------------o
A A | A A | | |
| | | | +-----------------------+ | |
| | | | | |
| | | | f_start_file_ind and not P1 | |
| | | +--------------------------------------+ |
| | | F_START_FILE_RS(-) |
| | | |
| | | f_start_file_ind f_start_file_ind |
| | | and P1 and P1 |
| | +----------------------------+ +------------------+
| | F_START_FILE_RS(+) | | F_START_FILE_RS(+)
| | V V
| | o---------------o
| |f_close_file_ind and not P3 | |
| +----------------------------| |
| F_CLOSE_FILE_RS(+,N) | |
| | DATA |
| | TRANSFER |
| f_close_file_ind and not P2 | |-------------+
+------------------------------| | |
F_CLOSE_FILE_RS(-) | |<------------+
o---------------o F_DATA_IND
o---------------o |
| IDLESPEAKER | f_close_file_ind and P3 |
| see (1), Spkr |<--------------------------+
| State Diagram | F_CLOSE_FILE_RS(+,Y)
o---------------o
Predicates:
P1: Decision to send F_START_FILE_RS(+)
P2: Decision to send F_CLOSE_FILE_RS(+)
P3: Decision to become Speaker
<span class="grey">Friend Informational [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Protocol Specification</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Overview</span>
ODETTE-FTP is divided into five operating phases.
Start Session
Start File
Data Transfer
End File
End Session
After the End File phase, an ODETTE-FTP entity may enter a new Start
File phase or terminate the session via the End Session phase.
ODETTE-FTP peers communicate by sending and receiving messages in
Exchange Buffers via the Network Service. Each Exchange Buffer
contains one of the following commands.
SSRM Start Session Ready Message
SSID Start Session
SECD Security Change Direction
AUCH Authentication Challenge
AURP Authentication Response
SFID Start File
SFPA Start File Positive Answer
SFNA Start File Negative Answer
DATA Data
CDT Set Credit
EFID End File
EFPA End File Positive Answer
EFNA End File Negative Answer
ESID End Session
CD Change Direction
EERP End to End Response
NERP Negative End Response
RTR Ready To Receive
The remainder of this section describes the protocol flows. Section
five details the command formats.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Start Session Phase</span>
The Start Session phase is entered immediately after the network
connection has been established.
<span class="grey">Friend Informational [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Entity Definition</span>
The ODETTE-FTP entity that took the initiative to establish the
network connection becomes the Initiator. Its peer becomes the
Responder.
<span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. Protocol Sequence</span>
The first message must be sent by the Responder.
1. Initiator <-------------SSRM -- Responder Ready Message
-- SSID ------------> Identification
<------------ SSID -- Identification
<span class="h4"><a class="selflink" id="section-4.2.3" href="#section-4.2.3">4.2.3</a>. Secure Authentication</span>
Having exchanged SSIDs, the Initiator may optionally begin an
authentication phase, in which each party proves its identity to the
other.
<span class="h4"><a class="selflink" id="section-4.2.4" href="#section-4.2.4">4.2.4</a>. Protocol Sequence</span>
The first authentication message must be sent by the Initiator.
1. Initiator -- SECD ------------> Responder Change Direction
<------------ AUCH -- Challenge
-- AURP ------------> Response
<------------ SECD -- Change Direction
-- AUCH ------------> Challenge
<------------ AURP -- Response
The Initiator sends a Security Change Direction (SECD) to which the
Responder replies with an Authentication Challenge (AUCH).
The Responder looks up the public certificate that is linked to the
purported identity of the Initiator (located in the SSID). If the
Responder is unable to locate a suitable certificate then
authentication fails. The Responder uses the public key contained in
the certificate to encrypt a random challenge, unique for each
session, for the Initiator. This encrypted challenge is sent as a
[<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] envelope to the Initiator as part of the AUCH.
The Initiator decrypts the challenge using their private key and
sends the decrypted challenge back to the Responder in the
Authentication Response (AURP).
The Responder checks that the data received in the AURP matches the
random challenge that was sent to the Initiator.
<span class="grey">Friend Informational [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
If the data matches, then the Initiator has authenticated
successfully and the Responder replies with a Security Change
Direction (SECD) beginning the complementary process of verifying the
Responder to the Initiator. If the data does not match, then the
Initiator fails authentication.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Start File Phase</span>
<span class="h4"><a class="selflink" id="section-4.3.1" href="#section-4.3.1">4.3.1</a>. Entity Definition</span>
The Initiator from the Start Session phase is designated the Speaker
while the Responder becomes the Listener. The roles are reversed by
the Speaker sending a Change Direction command to the Listener.
<span class="h4"><a class="selflink" id="section-4.3.2" href="#section-4.3.2">4.3.2</a>. Protocol Sequence</span>
1. Speaker -- SFID ------------> Listener Start File
<------------ SFPA -- Answer YES
2. Speaker -- SFID ------------> Listener Start File
<------------ SFNA -- Answer NO
Go To 1
Note: The User Monitor should take steps to prevent a loop
situation occurring.
2. Speaker -- CD --------------> Listener Change Direction
Listener <------------ EERP -- Speaker End to End Response
-- RTR -------------> Ready to Receive
<------------ NERP -- Negative End Response
-- RTR -------------> Ready to Receive
<------------ SFID -- Start File
<span class="h4"><a class="selflink" id="section-4.3.3" href="#section-4.3.3">4.3.3</a>. Restart Facilities</span>
The Start File command includes a count allowing the restart of an
interrupted transmission to be negotiated. If restart facilities are
not available, the restart count must be set to zero. The sender
will start with the lowest record count + 1.
<span class="h4"><a class="selflink" id="section-4.3.4" href="#section-4.3.4">4.3.4</a>. Broadcast Facilities</span>
The destination in a Start File command can be specified as follows.
1. An explicitly defined destination.
2. A group destination that allows an intermediate location to
broadcast the Virtual File to multiple destinations.
<span class="grey">Friend Informational [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The Listener will send a negative answer to the Speaker when the
destination is not known.
<span class="h4"><a class="selflink" id="section-4.3.5" href="#section-4.3.5">4.3.5</a>. Priority</span>
The prioritisation of files for transmission is left to the local
implementation. To allow some flexibility, a change direction
mechanism is available in the End File phase.
<span class="h4"><a class="selflink" id="section-4.3.6" href="#section-4.3.6">4.3.6</a>. End to End Response (EERP)</span>
The End to End Response (EERP) command notifies the originator of a
Virtual File that the Virtual File has been successfully delivered to
its final destination. This allows the originator to perform house
keeping tasks such as deleting copies of the delivered data.
If the originator of the Virtual File requested a signed EERP in the
SFID, the EERP must be signed. Signing allows the originator of the
file to prove that the EERP was generated by the final destination.
If the final destination is unable to sign the EERP, it may send back
an unsigned EERP. It is an implementation issue to allow the
acceptance of an unsigned EERP if a signed EERP is requested.
A Response Command must be sent from the location performing the
final processing or distribution of the data to the originator. The
Response is mandatory and may be sent in the same or in any
subsequent session.
When an intermediate location broadcasts or distributes a Virtual
File, it must receive a Response command from all the locations to
which it forwarded the data before sending its own Response. This
ensures that the Response received by the Virtual File's originator
accounts for all the destination locations. An intermediate location
therefore needs to track the status of files it processes over time.
The requesting of a signed EERP is incompatible with the use of
broadcast facilities because an EERP can be signed by only one
destination. If this scenario occurs, the intermediate broadcast
location may continue and ignore the request for a signed EERP or
send back a NERP.
Example: Point to Point
Location A sends file Ba to location B, which will send an EERP to
location A after it successfully receives the file.
<span class="grey">Friend Informational [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
o----------o o-----------o
| Loc. A |----------- S1 ---------->| Loc. B |
| | | |
| [Ba] |<---------- R2 -----------| [Ba] |
+----------o o-----------o
Key: S - File Transfer
R - Response EERP
[Ba] - File for B from A
Example: Data distribution
Location A sends a Virtual File containing data for distribution
to locations B and C via clearing centres E1 and E2. Clearing
centre E1 must wait for a response from E2 (for file Ba) and
location C before it sends its response, R8, to location A.
Clearing centre E2 can only send response R7 to E1 when location B
acknowledges file Ba with response R6.
o---------o o---------o o---------o o---------o
| Loc. A |-- S1 ->| Loc. E1 |-- S2 ->| Loc. E2 |-- S5 ->| Loc. B |
| | | | | | | |
| [Ba,Ca] |<- R8 --| [Ba,Ca] |<- R7 --| [Ba] |<- R6 --| [Ba] |
o---------o o---------o o---------o o---------o
A |
| | o---------o
| +----- S3 ->| Loc. C |
| | |
+--------- R4 --| [Ca] |
o---------o
Example: Data collection
Locations A and B send files Ca and Cb to clearing centre E1,
which forwards both files to location C in a single Virtual File.
When it receives response R4 from C, clearing centre E1 sends
response R5 to location A and R6 to location B.
<span class="grey">Friend Informational [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
o---------o o---------o o---------o
| Loc. A |-- S1 ->| Loc. E1 |-- S3 ->| Loc. C |
| | | | | |
| [Ca] |<- R5 --| [Ca,Cb] |<- R4 --| [Ca,Cb] |
o---------o o---------o o---------o
A |
o---------o | |
| Loc. B |-- S2 -----+ |
| | |
| [Cb] |<- R6 ---------+
o---------o
<span class="h4"><a class="selflink" id="section-4.3.7" href="#section-4.3.7">4.3.7</a>. Negative End Response (NERP)</span>
In addition to the EERP, which allows control over successful
transmission of a file, a Negative End Response signals that a file
could not be delivered to the final destination or that the final
destination could not process the received file.
It may be created by an intermediate node that could not transmit the
file any further because the next node refuses to accept the file.
The cause of the refusal has to be non-temporary, otherwise the
intermediate node has to try the transmission again.
It may also be created by the final node that is unable to process
the file because of non-recoverable syntax or semantic errors in the
file, or because of the failure of any other processing performed on
the file.
The NERP will be sent back to the originator of the file.
The parameters are equal to the ones of the EERP, but with additional
information about the creator of the NERP and the abort reason.
Where the NERP is created due to a failure to transmit, the abort
reason is taken from the refusal reason that was sent by the node
refusing the file. Because of the NERP, it is possible for the
intermediate node to stop trying to send the non-deliverable file and
to delete the file.
The NERP allows the originator of the file to react to the
unsuccessful transmission or processing, depending on the reason code
and the creator of the NERP.
If the originator of the Virtual File requested a signed EERP in the
SFID, the NERP must be signed. Signing allows the originator of the
file to prove by whom the NERP was generated. If the location
<span class="grey">Friend Informational [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
generating the NERP is unable to sign the NERP, it may send back an
unsigned NERP. It is an implementation issue to allow the acceptance
of an unsigned EERP if a signed NERP is requested.
<span class="h4"><a class="selflink" id="section-4.3.8" href="#section-4.3.8">4.3.8</a>. Ready To Receive Command (RTR)</span>
In order to avoid congestion between two adjacent nodes caused by a
continuous flow of EERPs and NERPs, a Ready To Receive (RTR) command
is provided. The RTR acts as an EERP/NERP acknowledgement for flow
control but has no end-to-end significance.
Speaker -- EERP ------------> Listener End to End Response
<------------- RTR -- Ready to Receive
-- EERP ------------> End to End Response
<------------- RTR -- Ready to Receive
-- NERP ------------> Negative End Response
<------------- RTR -- Ready to Receive
-- SFID ------------> Start File
or
-- CD --------------> Exchange the turn
After sending an EERP or NERP, the Speaker must wait for an RTR
before sending any other commands. The only acceptable commands to
follow are:
EERP
NERP
SFID or CD (if there are no more EERPs or NERPs to be sent)
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Data Transfer Phase</span>
Virtual File data flows from the Speaker to the Listener during the
Data Transfer phase, which is entered after the Start File phase.
<span class="h4"><a class="selflink" id="section-4.4.1" href="#section-4.4.1">4.4.1</a>. Protocol Sequence</span>
To avoid congestion at the protocol level, a flow control mechanism
is provided via the Set Credit (CDT) command.
A Credit limit is negotiated in the Start Session phase; this
represents the number of Data Exchange Buffers that the Speaker may
send before it is obliged to wait for a Credit command from the
Listener.
The available credit is initially set to the negotiated value by the
Start File positive answer, which acts as an implicit Credit command.
The Speaker decreases the available credit count by one for each data
buffer sent to the Listener.
<span class="grey">Friend Informational [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
When the available credit is exhausted, the Speaker must wait for a
Credit command from the Listener; otherwise, a protocol error will
occur and the session will be aborted.
The Listener should endeavour to send the Credit command without
delay to prevent the Speaker blocking.
1. Speaker -- SFID ------------> Listener Start File
<------------ SFPA -- Answer YES
2. If the credit value is set to 2
Speaker -- Data ------------> Listener Start File
-- Data ------------>
<------------- CDT -- Set Credit
-- Data ------------>
-- EFID ------------> End File
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. End File Phase</span>
<span class="h4"><a class="selflink" id="section-4.5.1" href="#section-4.5.1">4.5.1</a>. Protocol Sequence</span>
The Speaker notifies the Listener that it has finished sending a
Virtual File by sending an End File (EFID) command. The Listener
replies with a positive or negative End File command and has the
option to request a Change Direction command from the Speaker.
1. Speaker -- EFID ------------> Listener End File
<------------ EFPA -- Answer YES
2. Speaker -- EFID ------------> Listener End File
<------------ EFPA -- Answer YES + CD
-- CD --------------> Change Direction
Listener <------------ EERP -- Speaker End to End Response
-------------- RTR -> Ready to Receive
Listener <------------ NERP -- Speaker Negative End Response
-------------- RTR -> Ready to Receive
Go to Start File Phase
3. Speaker -- EFID ------------> Listener End File
<------------ EFNA -- Answer NO
<span class="grey">Friend Informational [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. End Session Phase</span>
<span class="h4"><a class="selflink" id="section-4.6.1" href="#section-4.6.1">4.6.1</a>. Protocol Sequence</span>
The Speaker terminates the session by sending an End Session (ESID)
command. The Speaker may only do this if the Listener has just
relinquished its role as speaker.
1. Speaker -- EFID ------------> Listener End File
<------------ EFPA -- Answer YES
-- CD --------------> Change Direction
Listener <------------ ESID -- Speaker End Session
<span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. Problem Handling</span>
Error detection and handling should be done as close as possible to
the problem. This aids problem determination and correction. Each
layer of the reference model is responsible for its own error
handling.
ODETTE-FTP can detect protocol errors by virtue of its state machine
and uses activity timers to detect session hang conditions. These
mechanisms are separate from the End to End controls.
<span class="h4"><a class="selflink" id="section-4.7.1" href="#section-4.7.1">4.7.1</a>. Protocol Errors</span>
If a protocol error occurs, the session will be terminated and
application activity aborted. Both locations enter the IDLE state.
<span class="h4"><a class="selflink" id="section-4.7.2" href="#section-4.7.2">4.7.2</a>. Timers</span>
To protect against application and network hang conditions, ODETTE-
FTP uses activity timers for all situations where a response is
required. The timers and actions to be taken if they expire are
described in <a href="#section-9">Section 9</a>, "Protocol State Machine".
<span class="h4"><a class="selflink" id="section-4.7.3" href="#section-4.7.3">4.7.3</a>. Clearing Centres</span>
The use of clearing centres introduces the possibility of errors
occurring as a result of data processing activities within the
centre. Such errors are not directly related to ODETTE-FTP or the
communication network and are therefore outside the scope of this
specification.
<span class="grey">Friend Informational [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Commands and Formats</span>
ODETTE-FTP entities communicate via Exchange Buffers. The Command
Exchange Buffers are described below. Virtual File data is carried
in Data Exchange Buffers, which are described in <a href="#section-7">Section 7</a>.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Conventions</span>
<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a>. Representation Unit</span>
The basic unit of information is an octet, containing 8 bits.
<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a>. Values and Characters</span>
The ISO 646 IRV 7-bit coded character set [<a href="#ref-ISO-646" title=""Information technology -- ISO 7-bit coded character set for information interchange"">ISO-646</a>], according to
<a href="#appendix-B">Appendix B</a>, is used to encode constants and strings within Command
Exchange Buffers except where [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>] is explicitly indicated against
a field.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Commands</span>
A Command Exchange Buffer contains a single command starting at the
beginning of the buffer. Commands and data are never mixed within an
Exchange Buffer. Commands cannot be compressed. Variable-length
parameters may be omitted entirely if not required and the associated
length indicator field set to zero.
Components:
1. Command identifier:
The first octet of an Exchange Buffer is the Command Identifier
and defines the format of the buffer.
2. Parameter(s):
Command parameters are stored in fields within a Command Exchange
Buffer. Where variable-length fields are used, they are preceded
with a header field indicating the length. All values are
required except where explicitly indicated.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Command Formats</span>
The ODETTE-FTP commands are described below using the following
definitions.
<span class="grey">Friend Informational [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Position (Pos)
Field offset within the Command Exchange Buffer, relative to a
zero origin.
Field
The name of the field.
Description
A description of the field.
Format
F - A field containing fixed values. All allowable values for
the field are enumerated in the command definition.
V - A field with variable values within a defined range. For
example, the SFIDLRECL field may contain any integer value
between 00000 and 99999.
X(n) - An alphanumeric field of length n octets.
A String contains alphanumeric characters from the following
set:
The numerals: 0 to 9
The upper case letters: A to Z
The following special set: / - . & ( ) space.
Space is not allowed as an embedded character.
9(n) - A numeric field of length n octets.
U(n) - A binary field of length n octets.
Numbers encoded as binary are always unsigned and in
network byte order.
T(n) - An field of length n octets, encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>].
String and alphanumeric fields are always left justified and right
padded with spaces where needed.
Numeric fields are always right justified and left padded with
zeros where needed.
<span class="grey">Friend Informational [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Reserved fields should be padded with spaces.
<span class="h4"><a class="selflink" id="section-5.3.1" href="#section-5.3.1">5.3.1</a>. SSRM - Start Session Ready Message</span>
o-------------------------------------------------------------------o
| SSRM Start Session Ready Message |
| |
| Start Session Phase Initiator <---- Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SSRMCMD | SSRM Command, 'I' | F X(1) |
| 1 | SSRMMSG | Ready Message, 'ODETTE FTP READY ' | F X(17) |
| 18 | SSRMCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------o
SSRMCMD Command Code Character
Value: 'I' SSRM Command identifier.
SSRMMSG Ready Message String(17)
Value: 'ODETTE FTP READY '
SSRMCR Carriage Return Character
Value: Character with hex value '0D' or '8D'.
<span class="grey">Friend Informational [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.2" href="#section-5.3.2">5.3.2</a>. SSID - Start Session</span>
o-------------------------------------------------------------------o
| SSID Start Session |
| |
| Start Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SSIDCMD | SSID Command 'X' | F X(1) |
| 1 | SSIDLEV | Protocol Release Level | F 9(1) |
| 2 | SSIDCODE | Initiator's Identification Code | V X(25) |
| 27 | SSIDPSWD | Initiator's Password | V X(8) |
| 35 | SSIDSDEB | Data Exchange Buffer Size | V 9(5) |
| 40 | SSIDSR | Send / Receive Capabilities (S/R/B) | F X(1) |
| 41 | SSIDCMPR | Buffer Compression Indicator (Y/N) | F X(1) |
| 42 | SSIDREST | Restart Indicator (Y/N) | F X(1) |
| 43 | SSIDSPEC | Special Logic Indicator (Y/N) | F X(1) |
| 44 | SSIDCRED | Credit | V 9(3) |
| 47 | SSIDAUTH | Secure Authentication (Y/N) | F X(1) |
| 48 | SSIDRSV1 | Reserved | F X(4) |
| 52 | SSIDUSER | User Data | V X(8) |
| 60 | SSIDCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------o
SSIDCMD Command Code
Character
Value: 'X' SSID Command identifier.
SSIDLEV Protocol Release Level Numeric(1)
Used to specify the level of the ODETTE-FTP protocol
Value: '1' for Revision 1.2
'2' for Revision 1.3
'4' for Revision 1.4
'5' for Revision 2.0
Future release levels will have higher numbers. The
protocol release level is negotiable, with the lowest level
being selected.
Note: ODETTE File Transfer Protocol 1.3 (<a href="./rfc2204">RFC 2204</a>)
specifies '1' for the release level, despite adhering
to revision 1.3.
<span class="grey">Friend Informational [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SSIDCODE Initiator's Identification Code String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
Uniquely identifies the Initiator (sender) participating in
the ODETTE-FTP session.
It is an application implementation issue to link the
expected [<a href="#ref-X.509" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">X.509</a>] certificate to the SSIDCODE provided.
SSIDPSWD Initiator's Password String(8)
Key to authenticate the sender. Assigned by bilateral
agreement.
SSIDSDEB Data Exchange Buffer Size Numeric(5)
Minimum: 128
Maximum: 99999
The length, in octets, of the largest Data Exchange Buffer
that can be accepted by the location. The length includes
the command octet but does not include the Stream
Transmission Header.
After negotiation, the smallest size will be selected.
SSIDSR Send / Receive Capabilities Character
Value: 'S' Location can only send files.
'R' Location can only receive files.
'B' Location can both send and receive files.
Sending and receiving will be serialised during the
session, so parallel transmissions will not take place in
the same session.
An error occurs if adjacent locations both specify the send
or receive capability.
<span class="grey">Friend Informational [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SSIDCMPR Buffer Compression Indicator Character
Value: 'Y' The location can handle OFTP data buffer compression
'N' The location cannot handle OFTP buffer compression
Compression is only used if supported by both locations.
The compression mechanism referred to here applies to each
individual OFTP data buffer. This is different from the
file compression mechanism in OFTP, which involves the
compression of whole files.
SSIDREST Restart Indicator Character
Value: 'Y' The location can handle the restart of a partially
transmitted file.
'N' The location cannot restart a file.
SSIDSPEC Special Logic Indicator Character
Value: 'Y' Location can handle Special Logic
'N' Location cannot handle Special Logic
Special Logic is only used if supported by both locations.
The Special Logic extensions are only useful to access an
X.25 network via an asynchronous entry and are not
supported for TCP/IP connections.
SSIDCRED Credit Numeric(3)
Maximum: 999
The number of consecutive Data Exchange Buffers sent by the
Speaker before it must wait for a Credit (CDT) command from
the Listener.
The credit value is only applied to Data flow in the Data
Transfer phase.
The Speaker's available credit is initialised to SSIDCRED
when it receives a Start File Positive Answer (SFPA)
command from the Listener. It is zeroed by the End File
(EFID) command.
After negotiation, the smallest size must be selected in
the answer of the Responder, otherwise a protocol error
will abort the session.
<span class="grey">Friend Informational [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Negotiation of the "credit-window-size" parameter.
Window Size m -- SSID ------------>
<------------ SSID -- Window Size n
(n less than or
equal to m)
Note: negotiated value will be "n".
SSIDAUTH Secure Authentication Character
Value: 'Y' The location requires secure authentication. 'N' The
location does not require secure authentication.
Secure authentication is only used if agreed by both
locations.
If the answer of the Responder does not match with the
authentication requirements of the Initiator, then the
Initiator must abort the session.
No negotiation of authentication is allowed.
authentication p -- SSID ------------>
<------------ SSID -- authentication q
p == q -> continue.
p != q -> abort.
SSIDRSV1 Reserved String(4)
This field is reserved for future use.
SSIDUSER User Data String(8)
May be used by ODETTE-FTP in any way. If unused, it should
be initialised to spaces. It is expected that a bilateral
agreement exists as to the meaning of the data.
SSIDCR Carriage Return Character
Value: Character with hex value '0D' or '8D'.
<span class="grey">Friend Informational [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.3" href="#section-5.3.3">5.3.3</a>. SFID - Start File</span>
o-------------------------------------------------------------------o
| SFID Start File |
| |
| Start File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFIDCMD | SFID Command, 'H' | F X(1) |
| 1 | SFIDDSN | Virtual File Dataset Name | V X(26) |
| 27 | SFIDRSV1 | Reserved | F X(3) |
| 30 | SFIDDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) |
| 38 | SFIDTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) |
| 48 | SFIDUSER | User Data | V X(8) |
| 56 | SFIDDEST | Destination | V X(25) |
| 81 | SFIDORIG | Originator | V X(25) |
| 106 | SFIDFMT | File Format (F/V/U/T) | F X(1) |
| 107 | SFIDLRECL | Maximum Record Size | V 9(5) |
| 112 | SFIDFSIZ | File Size, 1K blocks | V 9(13) |
| 125 | SFIDOSIZ | Original File Size, 1K blocks | V 9(13) |
| 138 | SFIDREST | Restart Position | V 9(17) |
| 155 | SFIDSEC | Security Level | F 9(2) |
| 157 | SFIDCIPH | Cipher suite selection | F 9(2) |
| 159 | SFIDCOMP | File compression algorithm | F 9(1) |
| 160 | SFIDENV | File enveloping format | F 9(1) |
| 161 | SFIDSIGN | Signed EERP request | F X(1) |
| 162 | SFIDDESCL | Virtual File Description length | V 9(3) |
| 165 | SFIDDESC | Virtual File Description | V T(n) |
o-------------------------------------------------------------------o
SFIDCMD Command Code Character
Value: 'H' SFID Command identifier.
SFIDDSN Virtual File Dataset Name String(26)
Dataset name of the Virtual File being transferred,
assigned by bilateral agreement.
No general structure is defined for this attribute.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
SFIDRSV1 Reserved String(3)
This field is reserved for future use.
<span class="grey">Friend Informational [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFIDDATE Virtual File Date stamp Numeric(8)
Format: 'CCYYMMDD' 8 decimal digits representing the century,
year, month, and day.
Date stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
SFIDTIME Virtual File Time stamp Numeric(10)
Format: 'HHMMSScccc' 10 decimal digits representing hours,
minutes, seconds, and a counter (0001-9999), which gives
higher resolution.
Time stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
SFIDUSER User Data String(8)
May be used by ODETTE-FTP in any way. If unused, it should
be initialised to spaces. It is expected that a bilateral
agreement exists as to the meaning of the data.
SFIDDEST Destination String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
The Final Recipient of the Virtual File.
This is the location that will look into the Virtual File
content and perform mapping functions. It is also the
location that creates the End to End Response (EERP)
command for the received file.
SFIDORIG Originator String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
Originator of the Virtual File.
It is the location that created (mapped) the data for
transmission.
<span class="grey">Friend Informational [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFIDFMT File Format Character
Value: 'F' Fixed format binary file
'V' Variable format binary file
'U' Unstructured binary file
'T' Text
Virtual File format. Used to calculate the restart
position (<a href="#section-1.5.4">Section 1.5.4</a>).
Once a file has been signed, compressed, and/or encrypted,
in file format terms it becomes unstructured, format U.
The record boundaries are no longer discernable until the
file is decrypted, decompressed, and/or verified. SFID
File Format Field in this scenario indicates the format of
the original file, and the transmitted file must be treated
as U format.
SFIDLRECL Maximum Record Size Numeric(5)
Maximum: 99999
Length in octets of the longest logical record that may be
transferred to a location. Only user data is included.
If SFIDFMT is 'T' or 'U', then this attribute must be set
to '00000'.
If SFIDFMT is 'V' and the file is compressed, encrypted, or
signed, then the maximum value of SFIDRECL is '65536'.
SFIDFSIZ Transmitted File Size Numeric(13)
Maximum: 9999999999999
Space in 1K (1024 octet) blocks required at the Originator
location to store the actual Virtual File that is to be
transmitted.
For example, if a file is compressed before sending, then
this is the space required to store the compressed file.
This parameter is intended to provide only a good estimate
of the Virtual File size.
Using 13 digits allows for a maximum file size of
approximately 9.3 PB (petabytes) to be transmitted.
<span class="grey">Friend Informational [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFIDOSIZ Original File Size Numeric(13)
Maximum: 9999999999999
Space in 1K (1024 octet) blocks required at the Originator
location to store the original before it was signed,
compressed, and/or encrypted.
If no security or compression services have been used,
SFIDOSIZ should contain the same value as SFIDFSIZ.
If the original file size is not known, the value zero
should be used.
This parameter is intended to provide only a good estimate
of the original file size.
The sequence of events in file exchange are:
(a) raw data file ready to be sent
SFIDOSIZ = Original File Size
(b) signing/compression/encryption
(c) transmission
SFIDFSIZ = Transmitted File Size
(d) decryption/decompression/verification
(e) received raw data file for in-house applications
SFIDOSIZ = Original File Size
The Transmitted File Size at (c) indicates to the receiver
how much storage space is needed to receive the file.
The Original File Size at (e) indicates to the in-house
application how much storage space is needed to process the
file.
<span class="grey">Friend Informational [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFIDREST Restart Position Numeric(17)
Maximum: 99999999999999999
Virtual File restart position.
The count represents the:
- Record Number if SSIDFMT is 'F' or 'V'.
- File offset in 1K (1024 octet) blocks if SFIDFMT is
'U' or 'T'.
The count will express the transmitted user data (i.e.,
before ODETTE-FTP buffer compression, header not included).
After negotiation between adjacent locations,
retransmission will start at the lowest value.
Once a file has been signed, compressed, and/or encrypted,
in file format terms, it has become unstructured, like
format U. The file should be treated as format U for the
purposes of restart, regardless of the actual value in
SFIDFMT.
SFIDSEC Security Level Numeric(2)
Value: '00' No security services
'01' Encrypted
'02' Signed
'03' Encrypted and signed
Indicates whether the file has been signed and/or encrypted
before transmission. (See <a href="#section-6.2">Section 6.2</a>.)
SFIDCIPH Cipher suite selection Numeric(2)
Value: '00' No security services
'01' See <a href="#section-10.2">Section 10.2</a>
Indicates the cipher suite used to sign and/or encrypt the
file and also to indicate the cipher suite that should be
used when a signed EERP or NERP is requested.
<span class="grey">Friend Informational [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFIDCOMP File compression algorithm Numeric(1)
Value: '0' No compression
'1' Compressed with [<a href="#ref-ZLIB" title=""ZLIB Compressed Data Format Specification version 3.3"">ZLIB</a>] algorithm
Indicates the algorithm used to compress the file.
(See <a href="#section-6.4">Section 6.4</a>.)
SFIDENV File enveloping format Numeric(1)
Value: '0' No envelope
'1' File is enveloped using [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
Indicates the enveloping format used in the file.
If the file is encrypted/signed/compressed or is an
enveloped file for the exchange and revocation of
certificates, this field must be set accordingly.
SFIDSIGN Signed EERP request Character
Value: 'Y' The EERP returned in acknowledgement of the file
must be signed
'N' The EERP must not be signed
Requests whether the EERP returned for the file must be
signed.
SFIDDESCL Virtual File Description length Numeric(3)
Length in octets of the field SFIDDESC.
A value of 0 indicates that no description is present.
SFIDDESC Virtual File Description [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>](n)
May be used by ODETTE-FTP in any way. If not used,
SFIDDESCL should be set to zero.
No general structure is defined for this attribute, but it
is expected that a bilateral agreement exists as to the
meaning of the data.
It is encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>] to support a range of national
languages.
Maximum length of the encoded value is 999 octets.
<span class="grey">Friend Informational [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.4" href="#section-5.3.4">5.3.4</a>. SFPA - Start File Positive Answer</span>
o-------------------------------------------------------------------o
| SFPA Start File Positive Answer |
| |
| Start File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFPACMD | SFPA Command, '2' | F X(1) |
| 1 | SFPAACNT | Answer Count | V 9(17) |
o-------------------------------------------------------------------o
SFPACMD Command Code Character
Value: '2' SFPA Command identifier.
SFPAACNT Answer Count Numeric(17)
The Listener must enter a count lower than or equal to the
restart count specified by the Speaker in the Start File
(SFID) command. The count expresses the received user
data. If restart facilities are not available, a count of
zero must be specified.
<span class="h4"><a class="selflink" id="section-5.3.5" href="#section-5.3.5">5.3.5</a>. SFNA - Start File Negative Answer</span>
o-------------------------------------------------------------------o
| SFNA Start File Negative Answer |
| |
| Start File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SFNACMD | SFNA Command, '3' | F X(1) |
| 1 | SFNAREAS | Answer Reason | F 9(2) |
| 3 | SFNARRTR | Retry Indicator, (Y/N) | F X(1) |
| 4 | SFNAREASL | Answer Reason Text Length | V 9(3) |
| 7 | SFNAREAST | Answer Reason Text | V T(n) |
o-------------------------------------------------------------------o
SFNACMD Command Code Character
Value: '3' SFNA Command identifier.
<span class="grey">Friend Informational [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFNAREAS Answer Reason Numeric(2)
Value: '01' Invalid filename.
'02' Invalid destination.
'03' Invalid origin.
'04' Storage record format not supported.
'05' Maximum record length not supported.
'06' File size is too big.
'10' Invalid record count.
'11' Invalid byte count.
'12' Access method failure.
'13' Duplicate file.
'14' File direction refused.
'15' Cipher suite not supported.
'16' Encrypted file not allowed.
'17' Unencrypted file not allowed.
'18' Compression not allowed.
'19' Signed file not allowed.
'20' Unsigned file not allowed.
'99' Unspecified reason.
Reason why transmission cannot proceed.
SFNARRTR Retry Indicator Character
Value: 'N' Transmission should not be retried.
'Y' The transmission may be retried later.
This parameter is used to advise the Speaker if it should
retry at a later time due to a temporary condition at the
Listener site, such as a lack of storage space. It should
be used in conjunction with the Answer Reason code
(SFNAREAS).
An invalid file name error code may be the consequence of a
problem in the mapping of the Virtual File on to a real
file. Such problems cannot always be resolved immediately.
It is therefore recommended that when an SFNA with Retry =
Y is received the User Monitor attempts to retransmit the
relevant file in a subsequent session.
SFNAREASL Answer Reason Text Length Numeric(3)
Length in octets of the field SFNAREAST.
0 indicates that no SFNAREAST field follows.
<span class="grey">Friend Informational [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
SFNAREAST Answer Reason Text [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>](n)
Reason why transmission cannot proceed in plain text.
It is encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>].
Maximum length of the encoded reason is 999 octets.
No general structure is defined for this attribute.
<span class="h4"><a class="selflink" id="section-5.3.6" href="#section-5.3.6">5.3.6</a>. DATA - Data Exchange Buffer</span>
o-------------------------------------------------------------------o
| DATA Data Exchange Buffer |
| |
| Data Transfer Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | DATACMD | DATA Command, 'D' | F X(1) |
| 1 | DATABUF | Data Exchange Buffer payload | V U(n) |
o-------------------------------------------------------------------o
DATACMD Command Code Character
Value: 'D' DATA Command identifier.
DATABUF Data Exchange Buffer payload Binary(n)
Variable-length buffer containing the data payload. The
Data Exchange Buffer is described in <a href="#section-7">Section 7</a>.
<span class="h4"><a class="selflink" id="section-5.3.7" href="#section-5.3.7">5.3.7</a>. CDT - Set Credit</span>
o-------------------------------------------------------------------o
| CDT Set Credit |
| |
| Data Transfer Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | CDTCMD | CDT Command, 'C' | F X(1) |
| 1 | CDTRSV1 | Reserved | F X(2) |
o-------------------------------------------------------------------o
CDTCMD Command Code Character
Value: 'C' CDT Command identifier.
<span class="grey">Friend Informational [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
CDTRSV1 Reserved String(2)
This field is reserved for future use.
<span class="h4"><a class="selflink" id="section-5.3.8" href="#section-5.3.8">5.3.8</a>. EFID - End File</span>
o-------------------------------------------------------------------o
| EFID End File |
| |
| End File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFIDCMD | EFID Command, 'T' | F X(1) |
| 1 | EFIDRCNT | Record Count | V 9(17) |
| 18 | EFIDUCNT | Unit Count | V 9(17) |
o-------------------------------------------------------------------o
EFIDCMD Command Code Character
Value: 'T' EFID Command identifier.
EFIDRCNT Record Count Numeric(17)
Maximum: 99999999999999999
For SSIDFMT 'F' or 'V', the exact record count.
For SSIDFMT 'U' or 'T', zeros.
The count will express the real size of the file (before
buffer compression, header not included). The total count
is always used, even during restart processing.
EFIDUCNT Unit Count Numeric(17)
Maximum: 99999999999999999
Exact number of units (octets) transmitted.
The count will express the real size of the file. The
total count is always used, even during restart processing.
<span class="grey">Friend Informational [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.9" href="#section-5.3.9">5.3.9</a>. EFPA - End File Positive Answer</span>
o-------------------------------------------------------------------o
| EFPA End File Positive Answer |
| |
| End File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFPACMD | EFPA Command, '4' | F X(1) |
| 1 | EFPACD | Change Direction Indicator, (Y/N) | F X(1) |
o-------------------------------------------------------------------o
EFPACMD Command Code Character
Value: '4' EFPA Command identifier.
EFPACD Change Direction Indicator Character
Value: 'N' Change direction not requested.
'Y' Change direction requested.
This parameter allows the Listener to request a Change
Direction (CD) command from the Speaker.
<span class="h4"><a class="selflink" id="section-5.3.10" href="#section-5.3.10">5.3.10</a>. EFNA - End File Negative Answer</span>
o-------------------------------------------------------------------o
| EFNA End File Negative Answer |
| |
| End File Phase Speaker <---- Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EFNACMD | EFNA Command, '5' | F X(1) |
| 1 | EFNAREAS | Answer Reason | F 9(2) |
| 3 | EFNAREASL | Answer Reason Text Length | V 9(3) |
| 6 | EFNAREAST | Answer Reason Text | V T(n) |
o-------------------------------------------------------------------o
EFNACMD Command Code Character
Value: '5' EFNA Command identifier.
<span class="grey">Friend Informational [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
EFNAREAS Answer Reason Numeric(2)
Value: '01' Invalid filename.
'02' Invalid destination.
'03' Invalid origin.
'04' Storage record format not supported.
'05' Maximum record length not supported.
'06' File size is too big.
'10' Invalid record count.
'11' Invalid byte count.
'12' Access method failure.
'13' Duplicate file.
'14' File direction refused.
'15' Cipher suite not supported.
'16' Encrypted file not allowed.
'17' Unencrypted file not allowed.
'18' Compression not allowed.
'19' Signed file not allowed.
'20' Unsigned file not allowed.
'21' Invalid file signature.
'22' File decryption failure.
'23' File decompression failure.
'99' Unspecified reason.
Reason why transmission failed.
EFNAREASL Answer Reason Text Length Numeric(3)
Length in octets of the field EFNAREAST.
0 indicates that no EFNAREAST field follows.
EFNAREAST Answer Reason Text [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>](n)
Reason why transmission failed in plain text.
It is encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>].
Maximum length of the encoded reason is 999 octets.
No general structure is defined for this attribute.
<span class="grey">Friend Informational [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.11" href="#section-5.3.11">5.3.11</a>. ESID - End Session</span>
o-------------------------------------------------------------------o
| ESID End Session |
| |
| End Session Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | ESIDCMD | ESID Command, 'F' | F X(1) |
| 1 | ESIDREAS | Reason Code | F 9(2) |
| 3 | ESIDREASL | Reason Text Length | V 9(3) |
| 6 | ESIDREAST | Reason Text | V T(n) |
| | ESIDCR | Carriage Return | F X(1) |
o-------------------------------------------------------------------o
ESIDCMD Command Code Character
Value: 'F' ESID Command identifier.
ESIDREAS Reason Code Numeric(2)
Value: '00' Normal session termination
'01' Command not recognised
An Exchange Buffer contains an invalid command code
(1st octet of the buffer).
'02' Protocol violation
An Exchange Buffer contains an invalid command for
the current state of the receiver.
'03' User code not known
A Start Session (SSID) command contains an unknown or
invalid Identification Code.
'04' Invalid password
A Start Session (SSID) command contained an invalid
password.
'05' Local site emergency close down
The local site has entered an emergency close down
mode. Communications are being forcibly terminated.
<span class="grey">Friend Informational [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
'06' Command contained invalid data
A field within a Command Exchange Buffer contains
invalid data.
'07' Exchange Buffer size error
The length of the Exchange Buffer as determined by
the Stream Transmission Header differs from the
length implied by the Command Code.
'08' Resources not available
The request for connection has been denied due to a
resource shortage. The connection attempt should be
retried later.
'09' Time out
'10' Mode or capabilities incompatible
'11' Invalid challenge response
'12' Secure authentication requirements incompatible
'99' Unspecified Abort code
An error was detected for which no specific code is
defined.
ESIDREASL Reason Text Length Numeric(3)
Length in octets of the field ESIDREAST.
0 indicates that no ESIDREAST field is present.
ESIDREAST Reason Text [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>](n)
Reason why session ended in plain text.
It is encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>].
Maximum length of the encoded reason is 999 octets.
No general structure is defined for this attribute.
<span class="grey">Friend Informational [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
ESIDCR Carriage Return Character
Value: Character with hex value '0D' or '8D'.
<span class="h4"><a class="selflink" id="section-5.3.12" href="#section-5.3.12">5.3.12</a>. CD - Change Direction</span>
o-------------------------------------------------------------------o
| CD Change Direction |
| |
| Start File Phase Speaker ----> Listener |
| End File Phase Speaker ----> Listener |
| End Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | CDCMD | CD Command, 'R' | F X(1) |
o-------------------------------------------------------------------o
CDCMD Command Code Character
Value: 'R' CD Command identifier.
<span class="h4"><a class="selflink" id="section-5.3.13" href="#section-5.3.13">5.3.13</a>. EERP - End to End Response</span>
o-------------------------------------------------------------------o
| EERP End to End Response |
| |
| Start File Phase Speaker ----> Listener |
| End File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | EERPCMD | EERP Command, 'E' | F X(1) |
| 1 | EERPDSN | Virtual File Dataset Name | V X(26) |
| 27 | EERPRSV1 | Reserved | F X(3) |
| 30 | EERPDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) |
| 38 | EERPTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) |
| 48 | EERPUSER | User Data | V X(8) |
| 56 | EERPDEST | Destination | V X(25) |
| 81 | EERPORIG | Originator | V X(25) |
| 106 | EERPHSHL | Virtual File hash length | V U(2) |
| 108 | EERPHSH | Virtual File hash | V U(n) |
| | EERPSIGL | EERP signature length | V U(2) |
| | EERPSIG | EERP signature | V U(n) |
o-------------------------------------------------------------------o
<span class="grey">Friend Informational [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
EERPCMD Command Code Character
Value: 'E' EERP Command identifier.
EERPDSN Virtual File Dataset Name String(26)
Dataset name of the Virtual File being transferred,
assigned by bilateral agreement.
No general structure is defined for this attribute.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
EERPRSV1 Reserved String(3)
This field is reserved for future use.
EERPDATE Virtual File Date stamp Numeric(8)
Format: 'CCYYMMDD' 8 decimal digits representing the century,
year, month, and day, respectively.
Date stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
EERPTIME Virtual File Time stamp Numeric(10)
Format: 'HHMMSScccc' 10 decimal digits representing hours,
minutes, seconds, and a counter (0001-9999), which gives
higher resolution.
Time stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
EERPUSER User Data String(8)
May be used by ODETTE-FTP in any way. If unused, it should
be initialised to spaces. It is expected that a bilateral
agreement exists as to the meaning of the data.
<span class="grey">Friend Informational [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
EERPDEST Destination String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
Originator of the Virtual File.
This is the location that created the data for
transmission.
EERPORIG Originator String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
Final Recipient of the Virtual File.
This is the location that will look into the Virtual File
content and process it accordingly. It is also the
location that creates the EERP for the received file.
EERPHSHL Virtual File hash length Binary(2)
Length in octets of the field EERPHSH.
A binary value of 0 indicates that no hash is present.
This is always the case if the EERP is not signed.
EERPHSH Virtual File hash Binary(n)
Hash of the transmitted Virtual File, i.e., not the hash of
the original file.
The algorithm used is determined by the bilaterally agreed
cipher suite specified in the SFIDCIPH.
It is an application implementation issue to validate the
EERPHSH to ensure that the EERP is acknowledging the exact
same file as was originally transmitted.
EERPSIGL EERP signature length Binary(2)
0 indicates that this EERP has not been signed.
Any other value indicates the length of EERPSIG in octets
and indicates that this EERP has been signed.
<span class="grey">Friend Informational [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
EERPSIG EERP signature Binary(n)
Contains the [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] enveloped signature of the EERP.
Signature = Sign{EERPDSN
EERPDATE
EERPTIME
EERPDEST
EERPORIG
EERPHSH}
Each field is taken in its entirety, including any padding.
The envelope must contain the original data, not just the
signature.
The [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] content type used is SignedData.
The encapsulated content type used is id-data.
It is an application issue to validate the signature with
the contents of the EERP.
<span class="h4"><a class="selflink" id="section-5.3.14" href="#section-5.3.14">5.3.14</a>. NERP - Negative End Response</span>
o-------------------------------------------------------------------o
| NERP Negative End Response |
| |
| Start File Phase Speaker ----> Listener |
| End File Phase Speaker ----> Listener |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | NERPCMD | NERP Command, 'N' | F X(1) |
| 1 | NERPDSN | Virtual File Dataset Name | V X(26) |
| 27 | NERPRSV1 | Reserved | F X(6) |
| 33 | NERPDATE | Virtual File Date stamp, (CCYYMMDD) | V 9(8) |
| 41 | NERPTIME | Virtual File Time stamp, (HHMMSScccc) | V 9(10) |
| 51 | NERPDEST | Destination | V X(25) |
| 76 | NERPORIG | Originator | V X(25) |
| 101 | NERPCREA | Creator of NERP | V X(25) |
| 126 | NERPREAS | Reason code | F 9(2) |
| 128 | NERPREASL | Reason text length | V 9(3) |
| 131 | NERPREAST | Reason text | V T(n) |
| | NERPHSHL | Virtual File hash length | V U(2) |
| | NERPHSH | Virtual File hash | V U(n) |
| | NERPSIGL | NERP signature length | V U(2) |
| | NERPSIG | NERP signature | V U(n) |
o-------------------------------------------------------------------o
<span class="grey">Friend Informational [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
NERPCMD Command Code Character
Value: 'N' NERP Command identifier.
NERPDSN Virtual File Dataset Name String(26)
Dataset name of the Virtual File being transferred,
assigned by bilateral agreement.
No general structure is defined for this attribute.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
NERPRSV1 Reserved String(6)
This field is reserved for future use.
NERPDATE Virtual File Date stamp Numeric(8)
Format: 'CCYYMMDD' 8 decimal digits representing the century,
year, month, and day, respectively.
Date stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
NERPTIME Virtual File Time stamp Numeric(10)
Format: 'HHMMSScccc' 10 decimal digits representing hours,
minutes, seconds, and a counter (0001-9999), which gives
higher resolution.
Time stamp assigned by the Virtual File's Originator
indicating when the file was made available for
transmission.
See Virtual Files - Identification (<a href="#section-1.5.2">Section 1.5.2</a>)
NERPDEST Destination String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
Originator of the Virtual File.
This is the location that created the data for
transmission.
<span class="grey">Friend Informational [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
NERPORIG Originator String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
The Final Recipient of the Virtual File.
This is the location that will look into the Virtual File
content and perform mapping functions.
NERPCREA Creator of the NERP String(25)
Format: See Identification Code (<a href="#section-5.4">Section 5.4</a>)
It is the location that created the NERP.
NERPREAS Reason code Numeric(2)
This attribute will specify why transmission cannot proceed
or why processing of the file failed.
"SFNA(RETRY=N)" below should be interpreted as "EFNA or
SFNA(RETRY=N)" where appropriate.
Value '03' ESID received with reason code '03'
(user code not known)
'04' ESID received with reason code '04'
(invalid password)
'09' ESID received with reason code '99'
(unspecified reason)
'11' SFNA(RETRY=N) received with reason code '01'
(invalid file name)
'12' SFNA(RETRY=N) received with reason code '02'
(invalid destination)
'13' SFNA(RETRY=N) received with reason code '03'
(invalid origin)
'14' SFNA(RETRY=N) received with reason code '04'
(invalid storage record format)
'15' SFNA(RETRY=N) received with reason code '05'
(maximum record length not supported)
'16' SFNA(RETRY=N) received with reason code '06'
(file size too big)
'20' SFNA(RETRY=N) received with reason code '10'
(invalid record count)
'21' SFNA(RETRY=N) received with reason code '11'
(invalid byte count)
'22' SFNA(RETRY=N) received with reason code '12'
(access method failure)
<span class="grey">Friend Informational [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
'23' SFNA(RETRY=N) received with reason code '13'
(duplicate file)
'24' SFNA(RETRY=N) received with reason code '14'
(file direction refused)
'25' SFNA(RETRY=N) received with reason code '15'
(cipher suite not supported)
'26' SFNA(RETRY=N) received with reason code '16'
(encrypted file not allowed)
'27' SFNA(RETRY=N) received with reason code '17'
(unencrypted file not allowed)
'28' SFNA(RETRY=N) received with reason code '18'
(compression not allowed)
'29' SFNA(RETRY=N) received with reason code '19'
(signed file not allowed)
'30' SFNA(RETRY=N) received with reason code '20'
(unsigned file not allowed)
'31' File signature not valid.
'32' File decompression failed.
'33' File decryption failed.
'34' File processing failed.
'35' Not delivered to recipient.
'36' Not acknowledged by recipient.
'50' Transmission stopped by the operator.
'90' File size incompatible with recipient's
protocol version.
'99' Unspecified reason.
NERPREASL Reason Text Length Numeric(3)
Length in octets of the field NERPREAST.
0 indicates that no NERPREAST field follows.
NERPREAST Reason Text [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>](n)
Reason why transmission cannot proceed in plain text.
It is encoded using [<a href="#ref-UTF-8" title=""UTF-8, A Transformation Format of ISO 10646"">UTF-8</a>].
Maximum length of the encoded reason is 999 octets.
No general structure is defined for this attribute.
<span class="grey">Friend Informational [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
NERPHSHL Virtual File hash length Binary(2)
Length in octets of the field NERPHSH.
A binary value of 0 indicates that no hash is present.
This is always the case if the NERP is not signed.
NERPHSH Virtual File hash Binary(n)
Hash of the Virtual File being transmitted.
The algorithm used is determined by the bilaterally agreed
cipher suite specified in the SFIDCIPH.
NERPSIGL NERP Signature length Binary(2)
0 indicates that this NERP has not been signed.
Any other value indicates the length of NERPSIG in octets
and indicates that this NERP has been signed.
NERPSIG NERP Signature Binary(n)
Contains the [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] enveloped signature of the NERP.
Signature = Sign{NERPDSN
NERPDATE
NERPTIME
NERPDEST
NERPORIG
NERPCREA
NERPHSH}
Each field is taken in its entirety, including any padding.
The envelope must contain the original data, not just the
signature.
The [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] content type used is SignedData.
The encapsulated content type used is id-data.
It is an application issue to validate the signature with
the contents of the NERP.
<span class="grey">Friend Informational [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-5.3.15" href="#section-5.3.15">5.3.15</a>. RTR - Ready To Receive</span>
o-------------------------------------------------------------------o
| RTR Ready To Receive |
| |
| Start File Phase Initiator <---- Responder |
| End File Phase Initiator <---- Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | RTRCMD | RTR Command, 'P' | F X(1) |
o-------------------------------------------------------------------o
RTRCMD Command Code Character
Value: 'P' RTR Command identifier.
<span class="h4"><a class="selflink" id="section-5.3.16" href="#section-5.3.16">5.3.16</a>. SECD - Security Change Direction</span>
o-------------------------------------------------------------------o
| SECD Security Change Direction |
| |
| Start Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SECDCMD | SECD Command, 'J' | F X(1) |
o-------------------------------------------------------------------o
SECDCMD Command Code Character
Value: 'J' SECD Command identifier.
<span class="h4"><a class="selflink" id="section-5.3.17" href="#section-5.3.17">5.3.17</a>. AUCH - Authentication Challenge</span>
o-------------------------------------------------------------------o
| AUCH Authentication Challenge |
| |
| Start Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | AUCHCMD | AUCH Command, 'A' | F X(1) |
| 1 | AUCHCHLL | Challenge Length | V U(2) |
| 3 | AUCHCHAL | Challenge | V U(n) |
o-------------------------------------------------------------------o
<span class="grey">Friend Informational [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
AUCHCMD Command Code Character
Value: 'A' AUCH Command identifier.
AUCHCHLL Challenge length Binary(2)
Indicates the length of AUCHCHAL in octets.
The length is expressed as an unsigned binary number using
network byte order.
AUCHCHAL Challenge Binary(n)
A [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] encrypted 20-byte random number uniquely generated
each time an AUCH is sent.
NOTE:
Any encryption algorithm that is available through a defined cipher
suite (<a href="#section-10.2">Section 10.2</a>) may be used. See <a href="#section-10.1">Section 10.1</a> regarding the
choice of a cipher suite.
<span class="h4"><a class="selflink" id="section-5.3.18" href="#section-5.3.18">5.3.18</a>. AURP - Authentication Response</span>
o-------------------------------------------------------------------o
| AURP Authentication Response |
| |
| Start Session Phase Initiator <---> Responder |
|-------------------------------------------------------------------|
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | AURPCMD | AURP Command, 'S' | F X(1) |
| 1 | AURPRSP | Response | V U(20) |
o-------------------------------------------------------------------o
AURPCMD Command Code Character
Value: 'S' AURP Command identifier.
AURPRSP Response Binary(20)
Contains the decrypted challenge (AUCHCHAL).
<span class="grey">Friend Informational [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
IMPORTANT:
It is an application implementation issue to validate a received AURP
to ensure that the response matches the challenge. This validation
is extremely important to ensure that a party is correctly
authenticated.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Identification Code</span>
The Initiator (sender) and Responder (receiver) participating in an
ODETTE-FTP session are uniquely identified by an Identification Code
based on [<a href="#ref-ISO-6523" title=""Data interchange -- Structures for the identification of organisations"">ISO-6523</a>], Structure for the Identification of
Organisations (SIO). The locations are considered to be adjacent for
the duration of the transmission.
The SIO has the following format.
o-------------------------------------------------------------------o
| Pos | Field | Description | Format |
|-----+-----------+---------------------------------------+---------|
| 0 | SIOOID | ODETTE Identifier | F X(1) |
| 1 | SIOICD | International Code Designator | V 9(4) |
| 5 | SIOORG | Organisation Code | V X(14) |
| 19 | SIOCSA | Computer Subaddress | V X(6) |
o-------------------------------------------------------------------o
SIOOID ODETTE Identifier Character
Value: 'O' Indicates ODETTE assigned Organisation Identifier.
Other values may be used for non-ODETTE codes.
SIOICD International Code Designator String(4)
A code forming part of the Organisation Identifier.
SIOORG Organisation Code String(14)
A code forming part of the Organisation Identifier. This
field may contain the letters A to Z, the digits 0 to 9,
and space and hyphen characters.
SIOCSA Computer Subaddress String(6)
A locally assigned address that uniquely identifies a
system within an organisation (defined by an Organisation
Identifier).
<span class="grey">Friend Informational [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. File Services</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Overview</span>
ODETTE-FTP provides services for compressing, encrypting, and signing
files. These services should generally be performed off line,
outside of the ODETTE-FTP communications session for performance
reasons, although this is not a strict requirement.
ODETTE-FTP requires that the following steps must be performed in
this exact sequence, although any of steps 2, 3, or 4 may be omitted.
Step 1 is required only if any of steps 2, 3, or 4 are performed:
1. Insert record length indicators (V format files only; see <a href="#section-6.5">Section</a>
<a href="#section-6.5">6.5</a>)
2. Sign
3. Compress
4. Encrypt
The cipher suite for the encryption and signing algorithms is
assigned by bilateral agreement.
Secured and/or compressed files must be enveloped. The envelope
contains additional information about the service used that is
necessary for a receiving party to fully process the file.
The [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] content types used are:
EnvelopedData - Indicates encrypted data
CompressedData - Indicates compressed data
SignedData - Indicates signed content
Data - Indicates unstructured data
For signed or encrypted data, the encapsulated content type
(eContentType field) is id-data.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. File Signing</span>
Files that are to be signed are enveloped according to the file
enveloping format (SFIDENV). Generally, this will be as a [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
package.
A file may be signed more than once to ease the changeover between
old and new certificates.
<span class="grey">Friend Informational [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
It is recommended that the envelope does not contain the public
certificate of the signer. Where files are sent to the same
recipient continuously, it would serve no benefit to repeatedly send
the same certificate. Both the original file data and signature are
stored within the [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] package.
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. File Encryption</span>
Files that are to be encrypted are enveloped according to the file
enveloping format (SFIDENV). Generally, this will be as a [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
package.
It is recommended that encryption should be performed before the
ODETTE-FTP session starts because a large file takes a long time to
encrypt and could cause session time outs, even on high-performance
machines.
Likewise, decryption of the file should occur outside of the session.
However, an application may choose to allow in-session encryption and
decryption for very small files.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. File Compression</span>
Files that are to be compressed are enveloped according to the file
enveloping format (SFIDENV). Generally, this will be as a [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
package using the [<a href="#ref-CMS-Compression">CMS-Compression</a>] data type, which uses the [<a href="#ref-ZLIB" title=""ZLIB Compressed Data Format Specification version 3.3"">ZLIB</a>]
compression algorithm by default.
Unlike the buffer compression method, this method operates on a whole
file. Because of the increased levels of compression, file level
compression essentially deprecates the older buffer compression
inside ODETTE-FTP. The buffer compression is kept for backwards
compatibility.
<span class="h3"><a class="selflink" id="section-6.5" href="#section-6.5">6.5</a>. V Format Files - Record Lengths</span>
A file that has been signed, compressed, and/or encrypted will have
lost its record structure, so ODETTE-FTP will not be able to insert
the End of Record Flag in subrecord headers in Data Exchange Buffers.
To preserve the record structure, V format files must have record
headers inserted into them prior to signing, compression, or
encryption. These 2-byte binary numbers, in network byte order,
indicate the length of each record, allowing the receiving system,
where appropriate, to recreate the files complete with the original
variable-length records. Note that the header bytes hold the number
of data bytes in the record and don't include themselves.
<span class="grey">Friend Informational [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
This is only applicable to V format files, which themselves are
typically only of concern for mainframes.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. ODETTE-FTP Data Exchange Buffer</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Overview</span>
Virtual Files are transmitted by mapping the Virtual File records
into Data Exchange Buffers, the maximum length of which was
negotiated between the ODETTE-FTP entities via the Start Session
(SSID) commands exchanged during the Start Session phase of the
protocol.
Virtual File records may be of arbitrary length. A simple
compression scheme is defined for strings of repeated characters.
An example of the use of the Data Exchange Buffer can be found in
<a href="#appendix-A">Appendix A</a>.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Data Exchange Buffer Format</span>
For transmission of Virtual File records, data is divided into
subrecords, each of which is preceded by a 1-octet Subrecord Header.
The Data Exchange Buffer is made up of the initial Command Character
followed by pairs of Subrecord Headers and subrecords, as follows.
o--------------------------------------------------------
| C | H | | H | | H | | /
| M | D | SUBRECORD | D | SUBRECORD | D | SUBRECORD | /_
| D | R | | R | | R | | /
o-------------------------------------------------------
CMD
The Data Exchange Buffer Command Character, 'D'.
HDR
A 1-octet Subrecord Header defined as follows:
0 1 2 3 4 5 6 7
o-------------------------------o
| E | C | |
| o | F | C O U N T |
| R | | |
o-------------------------------o
<span class="grey">Friend Informational [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Bits
0 End of Record Flag
Set to indicate that the next subrecord is the last
subrecord of the current record.
Unstructured files are transmitted as a single record; in
this case, the flag acts as an end-of-file marker.
1 Compression Flag
Set to indicate that the next subrecord is compressed.
2-7 Subrecord Count
The number of octets in the Virtual File represented by the
next subrecord expressed as a binary value.
For uncompressed data, this is simply the length of the
subrecord.
For compressed data, this is the number of times that the
single octet in the following subrecord must be inserted in
the Virtual File.
As 6 bits are available, the next subrecord may represent
between 0 and 63 octets of the Virtual File.
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Buffer Filling Rules</span>
A Data Exchange Buffer may be any length up to the value negotiated
in the Start Session exchange.
Virtual File records may be concatenated within one Data Exchange
Buffer or split across a number of buffers.
A subrecord is never split between two Exchange Buffers. If the
remaining space in the current Exchange Buffer is insufficient to
contain the next 'complete' subrecord, one of the following
strategies should be used:
1. Truncate the Exchange Buffer, and put the complete subrecord
(preceded by its header octet) in a new Exchange Buffer.
2. Split the subrecord into two, filling the remainder of the
Exchange Buffer with the first new subrecord and starting a new
Exchange Buffer with the second.
<span class="grey">Friend Informational [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
A record of length zero may appear anywhere in the Exchange Buffer.
A subrecord of length zero may appear anywhere in the record and/or
the Exchange Buffer.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Stream Transmission Buffer</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Introduction</span>
To utilise the TCP stream, a Stream Transmission Buffer (STB) is
created by adding a Stream Transmission Header (STH) to the start of
all Command and Data Exchange Buffers before they are passed to the
TCP transport service. This allows the receiving ODETTE-FTP to
recover the original Exchange Buffers.
Note: The Stream Transmission Buffer is not used when using ODETTE-
FTP over an X.25 network.
This is because ODETTE-FTP can rely on the fact that the Network
Service will preserve the sequence and boundaries of data units
transmitted through the network and that the Network Service will
pass the length of the data unit to the receiving ODETTE-FTP. TCP
offers a stream-based connection that does not provide these
functions.
The Stream Transmission Buffer is composed of an STH and an OEB.
o-----+-----------------+-----+--------------------+-----+------
| STH | OEB | STH | OEB | STH | OEB/
o-----+-----------------+-----+--------------------+-----+----
STH - Stream Transmission Header
OEB - ODETTE-FTP Exchange Buffer
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Stream Transmission Header Format</span>
The Stream Transmission Header is shown below. The fields are
transmitted from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Flags | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="grey">Friend Informational [Page 73]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Version
Value: 0001 (binary)
Stream Transmission Header version number.
Flags
Value: 0000 (binary)
Reserved for future use.
Length
Range: 5 - 100003 (decimal)
The length of the Stream Transmission Buffer (STH+OEB).
The smallest STB is 5 octets consisting of a 4-octet header
followed by a 1-octet Exchange Buffer such as a Change Direction
(CD) command.
The maximum Exchange Buffer length that can be negotiated is 99999
octets (<a href="#section-5.3.2">Section 5.3.2</a>) giving an STB length of 100003.
The length is expressed as a binary number in network byte order.
It is expected that implementations of this protocol will follow the
Internet robustness principle of being conservative in what is sent
and liberal in what is accepted.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Protocol State Machine</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. ODETTE-FTP State Machine</span>
The operation of an ODETTE-FTP entity is formally defined by the
State Machine presented below. There are five State and Transition
tables, and for each table additional information is given in the
associated Predicate and Action lists.
The response of an ODETTE-FTP entity to the receipt of an event is
defined by a Transition table entry indexed by the Event/State
intersection within the appropriate state table.
Each Transition table entry defines the actions taken, events
generated, and new state entered. Predicates may be used within a
table entry to select the correct response on the basis of local
information held by the entity.
<span class="grey">Friend Informational [Page 74]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
A Transition table contains the following fields:
Index (I) State transition index.
Predicate A list of predicates used to select between different
possible transitions. The predicates are defined in
the Predicate and Action lists.
Actions A list of actions taken by the entity. The actions are
defined in the Predicate and Action lists.
Events Output events generated by the entity.
Next State The new state of the entity.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Error Handling</span>
The receipt of an event in a given state may be invalid for three
reasons.
1. The case is impossible by design of the state automata, denoted
'X' in the state tables. For example, a timer that has not been
set cannot run out.
2. The event is the result of an error in the Network Service
implementation, also denoted 'X' in the state tables. The
Network Service implementation is considered to be correct.
3. For all other cases, the event is considered to be a User Error,
denoted "U" in the state tables.
The state tables define the conditions under which a User event is
valid, thus preventing the generation of a protocol error by the
ODETTE-FTP entity as a result of a User Monitor error. The reaction
of the entity to such errors is undefined and regarded as a local
implementation issue.
The state tables also allow protocol errors due to the receipt of
invalid Exchange Buffers, to be detected. In such cases, the
reaction of the entity to the error is defined.
<span class="grey">Friend Informational [Page 75]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-9.3" href="#section-9.3">9.3</a>. States</span>
The Command Mode is strictly a half-duplex flip-flop mode.
A_NC_ONLY Responder, Network Connection opened
The Responder has sent its Ready Message (SSRM) and is
waiting for Start Session (SSID) from the Initiator.
A_WF_CONRS Responder Waiting for F_CONNECT_RS
The Responder has received the Initiator's Start Session
(SSID) and is waiting for a response (F_CONNECT_RS) from
its User Monitor.
CDSTWFCD CD_RQ stored in WF_CD state
Since the User Monitor doesn't see the WF_CD state, it
may send a Change Direction request (F_CD_RQ) before the
ODETTE-FTP receives a Change Direction (CD) command.
CLIP Close Input Pending
The Listener has received an End File (EFID) command and
is waiting for the Close File response (F_CLOSE_FILE_RS)
from its User Monitor.
CLOP Close Out Pending
The Speaker has sent an End File (EFID) command and is
waiting for an End File Answer (EFPA or EFNA).
ERSTWFCD End to End Response stored in WF_CD state
Since the User Monitor doesn't see the WF_CD state, it
may send F_EERP_RQ, before ODETTE-FTP receives a Change
Direction (CD) command.
IDLE Connection IDLE
IDLELI Idle Listener
IDLELICD Idle Listener, F_CD_RQ Received
The ODETTE-FTP entity has become the Listener after
receiving a Change Direction request (F_CD_RQ) from the
User Monitor. The receipt of an End Session (ESID) is
valid in this state.
<span class="grey">Friend Informational [Page 76]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
IDLESP Idle Speaker
IDLESPCD Idle Speaker, F_CD_IND Sent
The ODETTE-FTP entity has sent a Change Direction
indication (F_CD_IND) to the User Monitor. A Change
Direction request (F_CD_RQ) is invalid in this state.
I_WF_NC Initiator Waiting for Network Connection
The Initiator has requested a new network connection and
is waiting for a Connection confirmation (N_CON_CF) from
the Network Service.
I_WF_RM Initiator Waiting for Ready Message
Before sending Start Session (SSID), the Initiator must
wait for a Ready Message (SSRM) from the Responder.
I_WF_SSID Initiator Waiting for SSID
The Initiator has sent a Start Session (SSID) command and
is waiting for Start Session from the Responder.
NRSTWFCD Negative End Response stored in WF_CD state
Since the User Monitor doesn't see the WF_CD state, it
may send F_NERP_RQ, before ODETTE-FTP receives a Change
Direction (CD) command.
OPI Open Input (Data Transfer Phase)
The Listener is waiting for the Speaker to send a Data
Exchange Buffer.
OPIP Open Input Pending
The Listener has received a Start File (SFID) command and
is waiting for the Start File response (F_START_FILE_RS)
from its User Monitor.
OPO Open Out (Data Transfer Phase)
The Speaker has received a Start File Positive Answer
(SFPA) and is waiting for a Data (F_DATA_RQ) or Close
File (F_CLOSE_FILE) request from its User Monitor.
<span class="grey">Friend Informational [Page 77]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
OPOP Open Out Pending
The Speaker has sent a Start File (SFID) command and is
waiting for a Start File Answer (SFPA or SFNA).
OPOWFC Open Out Wait for Credit
The Speaker is waiting for a Set Credit (CDT) command
before sending further Data Exchange buffers.
RTRP Ready to Receive (RTR) Pending
The Listener has received an EERP or a NERP and is
waiting for the Ready to Receive response (F_RTR_RS) from
its User Monitor.
SFSTWFCD Start File Request stored in WF_CD state.
Since the User Monitor doesn't see the WF_CD state, it
may send a Start File request (F_START_FILE_RQ) before
the ODETTE-FTP receives a Change Direction (CD) command.
WF_CD Wait for Change Direction
The Listener wishes to become the Speaker and is waiting
for a Change Direction (CD) command after sending an End
File Positive Answer (EFPA) requesting change direction.
WF_RTR Wait for Ready To Receive
The Speaker has sent an End to End Response (EERP) or a
Negative End Response (NERP) command and must wait for
Ready To Receive (RTR) from the Listener.
WF_NDISC Wait for N_DISC_IND
ODETTE-FTP has sent an End Session (ESID) command and is
waiting for a Disconnection indication (N_DISC_IND) from
the Network Service.
WF_SECD Wait for Security Change Direction
The Speaker is expecting a Security Change Direction
(SECD) from the Listener.
<span class="grey">Friend Informational [Page 78]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
WF_AUCH Wait for Authentication Challenge
The Speaker has sent a Security Change Direction (SECD)
command and must wait for Authentication Challenge (AUCH)
from the Listener.
WF_AURP Wait for Authentication Response
The Speaker has sent an Authentication Challenge (AUCH)
command and must wait for Authentication Response (AURP)
from the Listener.
<span class="h3"><a class="selflink" id="section-9.4" href="#section-9.4">9.4</a>. Input Events</span>
User Monitor Input Events (<a href="#section-3">Section 3</a>)
F_DATA_RQ F_CONNECT_RQ F_START_FILE_RQ F_CLOSE_FILE_RQ
F_EERP_RQ F_CONNECT_RS F_START_FILE_RS(+) F_CLOSE_FILE_RS(+)
F_NERP_RQ F_ABORT_RQ F_START_FILE_RS(-) F_CLOSE_FILE_RS(-)
F_CD_RQ F_RELEASE_RQ F_RTR_RS
Network Input Events (<a href="#section-2.2">Section 2.2</a>)
N_CON_IND N_CON_CF N_DATA_IND N_DISC_IND N_RST_IND
Peer ODETTE-FTP Input Events (<a href="#section-4">Section 4</a>)
SSID SFID SFPA SFNA EFID EFPA EFNA
DATA ESID EERP RTR CD CDT SSRM
NERP SECD AUCH AURP
Internal Input Events
TIME-OUT - Internal ODETTE-FTP timer expires.
Input event parameters are denoted I.Event-name.Parameter-name within
the state table action and predicate lists. Their value can be
examined but not changed by the ODETTE-FTP entity.
<span class="h3"><a class="selflink" id="section-9.5" href="#section-9.5">9.5</a>. Output Events</span>
User Monitor Output Events (<a href="#section-3">Section 3</a>)
F_DATA_IND F_CONNECT_IND F_START_FILE_IND F_CLOSE_FILE_IND
F_EERP_IND F_CONNECT_CF F_START_FILE_CF(+) F_CLOSE_FILE_CF(+)
F_CD_IND F_ABORT_IND F_START_FILE_CF(-) F_CLOSE_FILE_CF(-)
F_NERP_IND F_RELEASE_IND F_DATA_CF F_RTR_CF
<span class="grey">Friend Informational [Page 79]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Network Output Events (<a href="#section-2.2">Section 2.2</a>)
N_CON_RQ N_CON_RS N_DATA_RQ N_DISC_RQ
Peer ODETTE-FTP Output Events (<a href="#section-4">Section 4</a>)
SSID SFID SFPA SFNA EFID EFPA EFNA
DATA ESID EERP RTR CD CDT SSRM
NERP SECD AUCH AURP
Output event parameters are denoted O.Event-name.Parameter-name
within the state table action and predicate lists. Their values can
be examined and changed by the ODETTE-FTP entity.
<span class="h3"><a class="selflink" id="section-9.6" href="#section-9.6">9.6</a>. Local Variables</span>
The following variables are maintained by the ODETTE-FTP entity to
assist the operation of the protocol. They are denoted V.Variable-
name within the state table action and predicate lists. Their value
can be examined and changed by the ODETTE-FTP entity. The initial
value of each variable is undefined.
Variable Type Comments
---------------------------------------------------------------------
Buf-size Integer Negotiated Data Exchange Buffer size.
Called-addr Address Used to build O.F_CONNECT_IND.Called-addr
Calling-addr Address To build O.F_CONNECT_IND.Calling-addr
Compression Yes/No Compression in use as agreed.
Credit_L Integer Listener's credit counter.
Credit_S Integer Speaker's credit counter.
Id String Used to build O.SSID.Id
Mode Sender-only, Receiver-only, Both.
Pswd String Password, used to build O.SSID.Pswd
Req-buf Primitive Input event (F_XXX_RQ) stored in WF_CD
state.
Restart Yes/No Restart in used as agreed.
Restart-pos Integer Used only during file opening.
Window Integer The credit value negotiated for the
session.
Caller Yes/No This entity initiated the ODETTE-FTP
session.
Authentication Yes/No Secure authentication in use as agreed
Challenge Binary Random challenge
---------------------------------------------------------------------
<span class="grey">Friend Informational [Page 80]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-81" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-9.7" href="#section-9.7">9.7</a>. Local Constants</span>
The following constants define the capabilities of a given ODETTE-FTP
entity. They are denoted C.Constant-name within the state table
action and predicate lists. Their value can be examined but not
changed by the ODETTE-FTP entity.
Constant Value Comments
---------------------------------------------------------------------
Cap-compression Yes/No Compression supported?
Cap-init Initiator Must be Initiator.
Responder Must be Responder.
Both Can be Initiator or Responder.
Cap-mode Sender-only Must be sender.
Receiver-only Must be receiver.
Both Can be sender or receiver.
Max-buf-size 127 < Int < 100000 Maximum Data Exchange Buffer
size supported.
Max-window 0 < Int < 1000 Local maximum credit value.
Cap-restart Yes/No Restart supported?
Cap-logic 0, 1, 2 0 = does not support special
logic
1 = supports special logic
2 = needs special logic
---------------------------------------------------------------------
<span class="grey">Friend Informational [Page 81]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-82" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-9.8" href="#section-9.8">9.8</a>. Session Connection State Table</span>
<span class="h4"><a class="selflink" id="section-9.8.1" href="#section-9.8.1">9.8.1</a>. State Table</span>
o----------------------------------------------------------o
| | Other States |
| |--------------------------------------------------o |
| | WF_SECD | |
| |----------------------------------------------o | |
| | WF_AURP | | |
| |------------------------------------------o | | |
| | WF_AUCH | | | |
| |--------------------------------------o | | | |
| S | A_WF_CONRS | | | | |
| |----------------------------------o | | | | |
| T | A_NC_ONLY | | | | | |
| |------------------------------o | | | | | |
| A | I_WF_SSID | | | | | | |
| |--------------------------o | | | | | | |
| T | I_WF_RM | | | | | | | |
| |----------------------o | | | | | | | |
| E | I_WF_NC | | | | | | | | |
| |------------------o | | | | | | | | |
| | IDLE | | | | | | | | | |
|==================o---+---+---+---+---+---+---+---+---+---|
| | F_CONNECT_RQ | A | X | X | X | X | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| E | N_CON_CF | X | C | X | X | X | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| V | SSRM | X | X | H | X | X | X | L | L | L | X |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| E | SSID | X | X | X | D | E | F | L | L | L | F |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| N | N_CON_IND | B | X | X | X | X | X | X | X | X | X |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| T | F_CONNECT_RS | X | U | U | U | U | G | X | X | X | U |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| | ESID | X | X | X | F | X | X | F | F | F | X |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| | AUCH | X | X | U | U | X | X | I | L | L | U |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| | AURP | X | X | U | U | X | X | L | K | L | U |
| |--------------+---+---+---+---+---+---+---+---+---+---|
| | SECD | X | X | U | U | X | X | L | L | J | U |
o----------------------------------------------------------o
<span class="grey">Friend Informational [Page 82]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-83" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-9.8.2" href="#section-9.8.2">9.8.2</a>. Transition Table</span>
I | Predicate Actions Output Events Next State
===o=============================================================
A | P1: F_ABORT_IND IDLE
| !P1: 1,2 N_CON_RQ I_WF_NC
---+-------------------------------------------------------------
B | P3: N_DISC_RQ IDLE
| !P3: 2 N_CON_RS
| SSRM A_NC_ONLY
---+-------------------------------------------------------------
C | 4,2 I_WF_RM
---+-------------------------------------------------------------
D | P2 & P8 & P11: 4,2,5 SECD WF_AUCH
| P2 & P8 & !P11: 4,2,5 F_CONNECT_CF IDLESP
| P2 & !P8: 4,2 ESID(R=12)
| F_ABORT_IND(R,AO=L) WF_NDISC
| else: 4,2 ESID(R=10)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-------------------------------------------------------------
E | P4: 4 N_DISC_RQ IDLE
| !P4: 4,2 F_CONNECT_IND A_WF_CONRS
---+-------------------------------------------------------------
F | 4 F_ABORT_IND
| N_DISC_RQ IDLE
---+-------------------------------------------------------------
G | P2 & P9 & P10: 4,2,5 SSID WF_SECD
| P2 & !P9 & P10: 4,2,5 SSID IDLELI
| !P10: 4,2 ESID(R=12)
| F_ABORT_IND(R,AO=L) WF_NDISC
| else: 4,2 ESID(R=10)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-------------------------------------------------------------
H | 4,2,3 SSID I_WF_SSID
---+-------------------------------------------------------------
I | P5: 4,2 AURP WF_SECD
| !P5: 4,2 AURP IDLELI
---+-------------------------------------------------------------
J | 4,2 AUCH WF_AURP
---+-------------------------------------------------------------
K | P6: 4,2 F_CONNECT_CF IDLESP
| P7: 4,2 SECD WF_AUCH
| else: 4,2 ESID(R=11)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-------------------------------------------------------------
L | 4,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-------------------------------------------------------------
<span class="grey">Friend Informational [Page 83]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-84" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-9.8.3" href="#section-9.8.3">9.8.3</a>. Predicates and Actions</span>
Predicate P1: (No resources available) OR
(C.Cap-init = Responder) OR
(C.Cap-mode = Sender-only AND
I.F_CONNECT_RQ.Mode = Receiver-only) OR
(C.Cap-mode = Receiver-only AND
I.F_CONNECT_RQ.Mode = Sender-only)
Predicate P2: SSID negotiation is successful
(for these, Buf-size, Restart, Compression, Mode,
Special logic, and Window, compare the inbound SSID
with the local constants to set the local variables.
Any incompatibilities result in failure of the
negotiation.)
Predicate P3: C.Cap-init = Initiator
Predicate P4: Mode in SSID incompatible with C.Cap-mode
Predicate P5: V.Caller = Yes
Predicate P6: (V.Caller = Yes) AND (AURP.Signature verifies with
V.Challenge)
Predicate P7: (V.Caller = No) AND (AURP.Signature verifies with
V.Challenge)
Predicate P8: V.Authentication = I.SSID.Authentication
Predicate P9: I.F_CONNECT_RS.Authentication = Yes
Predicate P10: O.F_CONNECT_IND.Authentication =
I.F_CONNECT_RS.Authentication
Predicate P11: V.Authentication = Yes
Action 1: Set V.Mode from (C.Cap-mode, I.F_CONNECT_RQ.Mode)
Set V.Pswd, V.Id, V.Restart, and
V.Authentication from I.F_CONNECT_RQ
Set V.Buf-size = C.Max-buf-size
Set V.Compression = C.Cap-compression
Set V.Caller = Yes
Build O.N_CON_RQ
Action 2: Start inactivity timer
Action 3: Set parameters in O.SSID = from local variables
<span class="grey">Friend Informational [Page 84]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-85" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Action 4: Stop timer
Action 5: Set V.Mode, V.Restart, V.Compression, V.Buf-size,
V.Window, V.Authentication = from SSID
Action 6: Set V.Challenge = A random number unique to the
session
<span class="h3"><a class="selflink" id="section-9.9" href="#section-9.9">9.9</a>. Error and Abort State Table</span>
<span class="h4"><a class="selflink" id="section-9.9.1" href="#section-9.9.1">9.9.1</a>. State Table</span>
o--------------------------------------o
| | Other States |
| S |------------------------------o |
| T | WF_NDISC | |
| A |--------------------------o | |
| T | I_WF_NC | | |
| E |----------------------o | | |
| | IDLE | | | |
|======================o---+---+---+---|
| | TIME-OUT | X | X | A | B |
| |------------------+---+---+---+---|
| E | F_ABORT_RQ | X | A | X | C |
| V |------------------+---+---+---+---|
| E | N_RST_IND | X | X | A | D |
| N |------------------+---+---+---+---|
| T | N_DISC_IND | X | E | F | G |
| |------------------+---+---+---+---|
| | Invalid Buffer | X | X | H | I |
o--------------------------------------o
<span class="grey">Friend Informational [Page 85]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-86" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-9.9.2" href="#section-9.9.2">9.9.2</a>. Transition Table</span>
I | Predicate Actions Output Events Next State
===o=================================================================
A | N_DISC_RQ IDLE
---+-----------------------------------------------------------------
B | F_ABORT_IND
| N_DISC_RQ IDLE
---+-----------------------------------------------------------------
C | 1 N_DISC_RQ IDLE
---+-----------------------------------------------------------------
D | 1 N_DISC_RQ
| F_ABORT_IND IDLE
---+-----------------------------------------------------------------
E | F_ABORT_IND IDLE
---+-----------------------------------------------------------------
F | 1 IDLE
---+-----------------------------------------------------------------
G | 1 F_ABORT_IND IDLE
---+-----------------------------------------------------------------
H | WF_NDISC
---+-----------------------------------------------------------------
I | 1,2 ESID(R=01)
| F_ABORT_IND(R,AO=L) WF_NDISC
---------------------------------------------------------------------
<span class="h4"><a class="selflink" id="section-9.9.3" href="#section-9.9.3">9.9.3</a>. Predicates and Actions</span>
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
<span class="h3"><a class="selflink" id="section-9.10" href="#section-9.10">9.10</a>. Speaker State Table 1</span>
<span class="h4"><a class="selflink" id="section-9.10.1" href="#section-9.10.1">9.10.1</a>. State Table</span>
The following abbreviations are used in the Speaker state table.
F_REL_RQ(Ok) - F_RELEASE_RQ Reason = Normal
F_REL_RQ(Err) - F_RELEASE_RQ Reason = Error
o--------------------------------------------------------------------o
| | Other States |
| |--------------------------------------------------------------o |
| | WF_NDISC | |
| |----------------------------------------------------------o | |
| | OPOWFC | | |
<span class="grey">Friend Informational [Page 86]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-87" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
| |------------------------------------------------------o | | |
| | OPO | | | |
|S|--------------------------------------------------o | | | |
| | OPOP | | | | |
|T|----------------------------------------------o | | | | |
| | CDSTWFCD | | | | | |
|A|------------------------------------------o | | | | | |
| | SFSTWFCD | | | | | | |
|T|--------------------------------------o | | | | | | |
| | NRSTWFCD | | | | | | | |
|E|----------------------------------o | | | | | | | |
| | ERSTWFCD | | | | | | | | |
| |------------------------------o | | | | | | | | |
| | WF_CD | | | | | | | | | |
| |--------------------------o | | | | | | | | | |
| | WF_RTR | | | | | | | | | | |
| |----------------------o | | | | | | | | | | |
| | IDLESPCD | | | | | | | | | | | |
| |------------------o | | | | | | | | | | | |
| | IDLESP | | | | | | | | | | | | |
|=+==============o---+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_EERP_RQ | A | A | W | F | W | W | U | U | U | U | U | U | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_NERP_RQ | Y | Y | W | Z | W | W | U | U | U | U | U | U | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_START_ | B | B | W | G | W | W | U | U | U | U | U | X | U |
| | FILE_RQ | | | | | | | | | | | | | |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | SFPA | C | C | C | C | C | C | C | C | K | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
|E| SFNA | C | C | C | C | C | C | C | C | L | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
|V| CD | C | C | C | H | R | Z1| I | J | C | C | C | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
|E| F_DATA_RQ | U | U | U | U | U | U | U | U | U | M | U | S | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
|N| CDT | C | C | C | C | C | C | C | C | C | P | O | S | C |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
|T| F_CD_RQ | D | U | W | T | W | W | U | U | U | U | U | X | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_REL_RQ(Ok) | U | E | U | U | U | U | U | U | U | U | U | X | U |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | F_REL_RQ(Err)| Q | Q | Q | Q | Q | Q | Q | Q | Q | Q | Q | S | Q |
| |--------------+---+---+---+---+---+---+---+---+---+---+---+---+---|
| | RTR | C | C | N | C | C | C | C | C | C | C | C | S | C |
o--------------------------------------------------------------------o
<span class="grey">Friend Informational [Page 87]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-88" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-9.10.2" href="#section-9.10.2">9.10.2</a>. Transition Table</span>
I | Predicate Actions Output Events Next State
===o=================================================================
A | P5: 1,2,3,18 EERP WF_RTR
| !P5: 1,2,3 EERP WF_RTR
---+-----------------------------------------------------------------
B | P1: UE
| !P1: 1,2,5 SFID OPOP
---+-----------------------------------------------------------------
C | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
D | 1,2 CD IDLELICD
---+-----------------------------------------------------------------
E | 1,2 ESID(R=00) WF_NDISC
---+-----------------------------------------------------------------
F | 4 ERSTWFCD
---+-----------------------------------------------------------------
G | P1: UE
| !P1: 6 SFSTWFCD
---+-----------------------------------------------------------------
H | 1,2 IDLESP
---+-----------------------------------------------------------------
I | 1,2,10 SFID OPOP
---+-----------------------------------------------------------------
J | 1,2 CD IDLELICD
---+-----------------------------------------------------------------
K | P2: 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
| !P2: 1,2,7,12 F_START_FILE_CF(+) OPO
---+-----------------------------------------------------------------
L | 1,2,8 F_START_FILE_CF(-) IDLESP
---+-----------------------------------------------------------------
M | P3: 1,2,11,13 DATA OPOWFC
| !P3: 1,2,11,13 DATA
| F_DATA_CF OPO
---+-----------------------------------------------------------------
N | F_RTR_CF IDLESP
---+-----------------------------------------------------------------
O | 12 F_DATA_CF OPO
---+-----------------------------------------------------------------
P | Protocol 1,2 ESID(R=02)
| Error F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
Q | 1,2 ESID(R) WF_NDISC
---+-----------------------------------------------------------------
Continued -->
<span class="grey">Friend Informational [Page 88]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-89" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
I | Predicate Actions Output Events Next State
===o=================================================================
R | 1,2,9 EERP WF_RTR
---+-----------------------------------------------------------------
S | WF_NDISC
---+-----------------------------------------------------------------
T | CDSTWFCD
---+-----------------------------------------------------------------
U | User Error UE
---+-----------------------------------------------------------------
W | User Error - Note 1 UE
---+-----------------------------------------------------------------
X | Error
---+-----------------------------------------------------------------
Y | P4 & P5: 1,2,15,18 NERP WF_RTR
| !P4 & !P5: 1,2,15,14 NERP WF_RTR
| P4 & !P5: 1,2,15 NERP WF_RTR
| !P4 & P5: 1,2,15,14,18 NERP WF_RTR
---+-----------------------------------------------------------------
Z | 16 NRSTWFCD
---------------------------------------------------------------------
Z1| P4: 1,2,17 NERP WF_RTR
| !P4: 1,2,17,14 NERP WF_RTR
---------------------------------------------------------------------
<span class="h4"><a class="selflink" id="section-9.10.3" href="#section-9.10.3">9.10.3</a>. Predicates and Actions</span>
Predicate P1: (I.F_START_FILE_RQ.Restart-pos > 0 AND V.Restart = No)
OR (V.Mode = Receiver-only)
Note: Restart requested and not supported for this session.
Predicate P2: I.SFPA.Restart-pos > V.Restart-pos
Note: Protocol error due to the restart position in the SFPA
acknowledgement being greater than the position
requested in the SFID request.
Predicate P3: V.Credit_S - 1 = 0
Note: Speaker's Credit is exhausted.
Predicate P4: No special logic is in use
Predicate P5: Signed EERP/NERP requested
Action 1: Stop inactivity timer
<span class="grey">Friend Informational [Page 89]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-90" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Action 2: Start inactivity timer
Action 3: Build an EERP from F_EERP_RQ
Action 4: Store F_EERP_RQ in V.Req-buf
Action 5: Build SFID from F_START_FILE_RQ
V.Restart-pos = I.F_START_FILE_RQ.Restart-pos
Action 6: Store F_START_FILE_RQ in V.Req-buf
Action 7: Build F_START_FILE_CF(+) from I.SFPA
Action 8: Build F_START_FILE_CF(-) from I.SFNA
Action 9: Build EERP from F_EERP_RQ stored in V.Req-buf
Action 10: Build SFID from F_START_FILE_RQ stored in V.Req-buf
Set V.Restart-pos
Action 11: Build Exchange Buffer
Action 12: V.Credit_S = V.Window
Action 13: V.Credit_S = V.Credit_S - 1
Action 14: Activate CRC-calculus function. Wrap Exchange buffer
in special logic
Action 15: Build a NERP from F_NERP_RQ
Action 16: Store F_NERP_RQ in V.Req-buf
Action 17: Build NERP from F_NERP_RQ stored in V.Req-buf
Action 18: Sign the contents of NERP/EERP
Note 1: Whether to accept this "Request/Event" while in this
state is a matter of local implementation. The ODETTE
state tables are based on the assumption that this
event cannot occur in this state and is considered to
be a user error (UE).
<span class="grey">Friend Informational [Page 90]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-91" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-9.11" href="#section-9.11">9.11</a>. Speaker State Table 2</span>
<span class="h4"><a class="selflink" id="section-9.11.1" href="#section-9.11.1">9.11.1</a>. State Table</span>
o---------------------------------o
| S | CLOP |
| T |-------------------------o |
| A | OPOWFC | |
| T |---------------------o | |
| E | OPO | | |
|=====================o---+---+---|
| E | F_CLOSE_FILE_RQ | A | E | U |
| V |-----------------+---+---+---|
| E | EFPA | B | B | C |
| N |-----------------+---+---+---|
| T | EFNA | B | B | D |
o---------------------------------o
<span class="h4"><a class="selflink" id="section-9.11.2" href="#section-9.11.2">9.11.2</a>. Transition Table</span>
I | Predicate Actions Output Events Next State
===o=================================================================
A | 1,2,5,7 EFID CLOP
---+-----------------------------------------------------------------
B | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
C | P1: 1,2,3 F_CLOSE_FILE_CF(+,SP=No)
| CD IDLELI
| !P1: 1,2,4 F_CLOSE_FILE_CF(+,SP=Yes) IDLESP
---+-----------------------------------------------------------------
D | 1,2,6 F_CLOSE_FILE_CF(-) IDLESP
---+-----------------------------------------------------------------
E | See Note 1
---+-----------------------------------------------------------------
U | User Error UE
---------------------------------------------------------------------
<span class="h4"><a class="selflink" id="section-9.11.3" href="#section-9.11.3">9.11.3</a>. Predicates and Actions</span>
Predicate P1: (I.EFPA.CD-Request = Yes)
Predicate P2: No special logic is in use
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
<span class="grey">Friend Informational [Page 91]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-92" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Action 3: O.F_CLOSE_FILE_CF(+).Speaker = No
Action 4: O.F_CLOSE_FILE_CF(+).Speaker = Yes
Action 5: Build EFID from F_CLOSE_FILE_RQ
Action 6: Build F_CLOSE_FILE_CF(-) from EFNA
Action 7: Set V.Credit_S = 0
Action 8: Wrap Exchange buffer in special logic
Note 1: In order to respect the "half duplex" property of
ODETTE-FTP, it is forbidden to send EFID while in the
OPOWFC state. EFID can be sent only in the OPO state.
The ODETTE-FTP implementation must avoid sending EFID
(or receiving F_CLOSE_FILE_RQ) while in the OPOWFC
state.
<span class="grey">Friend Informational [Page 92]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-93" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="section-9.12" href="#section-9.12">9.12</a>. Listener State Table</span>
<span class="h4"><a class="selflink" id="section-9.12.1" href="#section-9.12.1">9.12.1</a>. State Table</span>
o---------------------------------------------o
| | RTRP |
| |-------------------------------------o |
| | CLIP | |
| |---------------------------------o | |
| | OPI | | |
| S |-----------------------------o | | |
| T | OPIP | | | |
| A |-------------------------o | | | |
| T | IDLELICD | | | | |
| E |---------------------o | | | | |
| | IDLELI | | | | | |
|=====================o---+---+---+---+---+---+
| | SFID | A | A | B | B | B | B |
| |-----------------+---+---+---+---+---+---+
| E | DATA | B | B | B | I | B | B |
| V |-----------------+---+---+---+---+---+---+
| E | EFID | B | B | B | J | B | B |
| N |-----------------+---+---+---+---+---+---+
| T | F_START_FILE_RS | U | U | H | U | U | U |
| |-----------------+---+---+---+---+---+---+
| | F_CLOSE_FILE_RS | U | U | U | U | K | U |
| |-----------------+---+---+---+---+---+---+
| | CD | C | B | B | B | B | B |
| |-----------------+---+---+---+---+---+---+
| | ESID R=Normal | D | F | D | D | D | D |
| |-----------------+---+---+---+---+---+---+
| | ESID R=Error | D | D | D | D | D | D |
| |-----------------+---+---+---+---+---+---+
| | EERP | E | E | B | B | B | B |
| |-----------------+---+---+---+---+---+---+
| | NERP | L | L | B | B | B | B |
| |-----------------+---+---+---+---+---+---+
| | F_RTR_RS | U | U | U | U | U | M |
o---------------------------------------------o
<span class="grey">Friend Informational [Page 93]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-94" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="section-9.12.2" href="#section-9.12.2">9.12.2</a>. Transition Table</span>
I | Predicate Actions Output Events Next State
===o=================================================================
A | P1: 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
| !P1: 1,2,3 F_START_FILE_IND OPIP
---+-----------------------------------------------------------------
B | 1,2 ESID(R=02)
| F_ABORT_IND(R,AO=L) WF_NDISC
---+-----------------------------------------------------------------
C | 1,2 F_CD_IND IDLESPCD
---+-----------------------------------------------------------------
D | 1 F_ABORT_IND(Received
| ESID Reason,AO=D)
| N_DISC_RQ IDLE
---+-----------------------------------------------------------------
E | 1,2,4 F_EERP_IND RTRP
---+-----------------------------------------------------------------
F | 1 F_RELEASE_IND
| N_DISC_RQ IDLE
---+-----------------------------------------------------------------
H | P4: User Error UE
| P2 & !P4 & !P5: 1,2,8 SFPA OPI
| !P2 & !P4 & !P5: 1,2 SFNA IDLELI
| P2 & !P4 & P5: 1,2,5,8 SFPA OPI
| !P2 & !P4 & P5: 1,2,5 SFNA IDLELI
---+-----------------------------------------------------------------
I | P6: 1,2 ESID(R=02)
| F_ABORT_IND(R,A0=L) WF_NDISC
| !P5 & !P6 & !P7: 1,2,7 F_DATA_IND (See Note 1) OPI
| !P5 & !P6 & P7: 1,2,8 F_DATA_IND
| CDT (See Note 1) OPI
| P5 & !P6 & P8: 1,2 ESID(R=07)
| F_ABORT_IND(R,A0=L) WF_NDISC
| P5 & !P6 & !P7 : 1,2,6,7 F_DATA_IND (See Note 1) OPI
| & !P8
| P5 & !P6 & P7 : 1,2,5,6,8 F_DATA_IND OPI
| & !P8 CDT (See Note 1)
---+-----------------------------------------------------------------
J | 1,2 F_CLOSE_FILE_IND CLIP
---+-----------------------------------------------------------------
K | P2 & P3 & !P5: 1,2 EFPA(CD-Req) WF_CD
| P2 & !P3 & !P5: 1,2 EFPA(no CD) IDLELI
| !P2 & !P5: 1,2 EFNA IDLELI
| P2 & !P3 & P5: 1,2,5 EFPA(no CD) IDLELI
| !P2 & P5: 1,2,5 EFNA IDLELI
| P2 & P3 & P5: 1,2,5 EFPA(CD-Req) WF_CD
<span class="grey">Friend Informational [Page 94]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-95" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
---+-----------------------------------------------------------------
L | 1,2,10 F_NERP_IND RTRP
---+-----------------------------------------------------------------
M | 1,2 RTR IDLELI
---+-----------------------------------------------------------------
U | User Error UE
---------------------------------------------------------------------
<span class="h4"><a class="selflink" id="section-9.12.3" href="#section-9.12.3">9.12.3</a>. Predicates and Actions</span>
Predicate P1: (I.SFID.Restart-pos > 0 AND V.Restart = No) OR (V.Mode
= Sender-only)
Note: Invalid Start File command.
Predicate P2: Positive Response
Predicate P3: I.F_CLOSE_FILE_RS(+).Speaker = Yes
Predicate P4: I.F_START_FILE_RS(+).Restart-pos > V.Restart
Predicate P5: Special logic is used
Predicate P6: V.Credit_L - 1 < 0
Note: Protocol Error because the Speaker has exceeded its
available transmission credit.
Predicate P7: V.Credit_L - 1 = 0
Note: The Speaker's credit must be reset before it can send
further Data Exchange Buffers.
Predicate P8: The calculus of the received CRC indicates an error
Action 1: Stop inactivity timer
Action 2: Start inactivity timer
Action 3: Build F_START_FILE_IND from I.SFID
V.Restart-pos = I.SFID.Restart-pos
Action 4: Build F_EERP_IND from I.EERP
Action 5: Add special logic header to the command to be sent to
the Speaker
<span class="grey">Friend Informational [Page 95]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-96" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Action 6: Suppress the special logic header from the data buffer
before giving it to the user
Action 7: V.Credit_L = V.Credit_L - 1
Action 8: V.Credit_L = V.Window
Action 10: Build F_NERP_IND from I.NERP
Note 1: Flow control in case of reception.
The ODETTE-FTP Listener must periodically send new
credit to the Speaker. The timing of this operation
will depend on:
1. The User Monitor's capacity to receive data.
2. The number of buffers available to ODETTE-FTP.
3. The Speaker's available credit, which must be
equal to zero.
<span class="h3"><a class="selflink" id="section-9.13" href="#section-9.13">9.13</a>. Example</span>
Consider an ODETTE-FTP entity that has sent a Start File (SFID)
command and entered the Open Out Pending (OPOP) state. Its response
on receiving a Positive Answer (SFPA) is documented in Speaker State
Table 1, which shows that transition 'K' should be applied and is
interpreted as follows:
if (I.SFPA.Restart-pos > V.Restart-pos) then
begin // invalid restart
Actions: Stop inactivity timer, // reset timer
Start inactivity timer;
Output: ESID(R=02), // to peer ODETTE-FTP
F_ABORT_IND(R,AO=L); // to User Monitor
New State: WF_NDISC;
end
else begin
Actions: Stop inactivity timer, // reset timer
Start inactivity timer;
Build F_START_FILE_CF(+) from I.SFPA
V.Credit_S = V.Window // initialise credit
Output: F_START_FILE_CF(+); // to User Monitor
New State: OPO;
end
<span class="grey">Friend Informational [Page 96]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-97" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
ODETTE-FTP checks the restart position in the received Start File
Positive Answer (SFPA) command. If it is invalid, it aborts the
session by sending an End Session (ESID) command to its peer and an
Abort indication (F_ABORT_IND) to its User Monitor. If the restart
position is valid, a Start File confirmation (F_START_FILE_CF) is
built and sent to the User Monitor, the credit window is initialised,
and the Open Out (OPO) state is entered.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Miscellaneous</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Algorithm Choice</span>
The choice of algorithms to use for security or compression between
partners is for bilateral agreement outside of ODETTE-FTP.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Cryptographic Algorithms</span>
The algorithms for symmetric and asymmetric cryptography and hashing
are represented by a coded value, the cipher suite:
Cipher Suite Symmetric Asymmetric Hashing
------------ ----------------- ------------ -------
01 3DES_EDE_CBC_3KEY RSA_PKCS1_15 SHA-1
02 AES_256_CBC RSA_PKCS1_15 SHA-1
Support of all cipher suites listed here is mandatory.
The certificates used must be [<a href="#ref-X.509" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">X.509</a>] certificates.
TripleDES is using Cipher Block Chaining (CBC) mode for added
security and uses the Encryption Decryption Encryption (EDE) process
with 3 different 64-bit keys.
RSA padding is as defined in [PKCS#1].
AES is using a 256-bit key in CBC mode.
An extended list of optional cipher suites may be used (<a href="#section-10.3">Section</a>
<a href="#section-10.3">10.3</a>), but there is no guarantee that two communicating ODETTE-FTP
entities would both support these optional cipher suites.
<span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. Protocol Extensions</span>
The algorithms and file enveloping formats available in ODETTE-FTP
may be extended outside of this document.
<span class="grey">Friend Informational [Page 97]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-98" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
An up-to-date list of cipher suite values for use in ODETTE-FTP is
maintained by ODETTE International, and published on their website at
www.odette.org.
<span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a>. Certificate Services</span>
Certificates and certificate revocation lists may be exchanged as
[<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] enveloped files. It is therefore valid to exchange a [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
file that is neither encrypted, compressed, nor signed. It is an
application implementation issue to determine the correct course of
action on receipt of such a file.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Security Considerations</span>
ODETTE-FTP security requires the use of [<a href="#ref-X.509" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">X.509</a>] certificates. If no
security options are agreed for use, the send and receive passwords
are sent in plain text. Whilst this is acceptable over X.25 and ISDN
networks, this is a risky practice over insecure public networks such
as the Internet.
All, some, or none of the security options available in ODETTE-FTP
may be used. No recommendations for the use of these options are
provided in this specification. Whilst use of the highest-strength
encryption algorithms may seem admirable, there is often a
performance tradeoff to be made, and signing all files and
acknowledgements has potential legal implications that should be
considered.
It should be noted that whilst the security measures ensure that an
ODETTE-FTP partner is authenticated, it does not necessarily mean
that the partner is authorised. Having proven the identity of a
partner, it is an application issue to decide whether that partner is
allowed to connect or exchange files.
Extracted from [<a href="./rfc3850" title=""Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Certificate Handling"">RFC3850</a>]:
"When processing certificates, there are many situations where the
processing might fail. Because the processing may be done by a user
agent, a security gateway, or other program, there is no single way
to handle such failures. Just because the methods to handle the
failures have not been listed, however, the reader should not assume
that they are not important. The opposite is true: if a certificate
is not provably valid and associated with the message, the processing
software should take immediate and noticeable steps to inform the end
user about it.
<span class="grey">Friend Informational [Page 98]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-99" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Some of the many situations in which signature and certificate
checking might fail include the following:
No certificate chain leads to a trusted CA
No ability to check the Certificate Revocation List (CRL) for a
certificate
An invalid CRL was received
The CRL being checked is expired
The certificate is expired
The certificate has been revoked
There are certainly other instances where a certificate may be
invalid, and it is the responsibility of the processing software to
check them all thoroughly, and to decide what to do if the check
fails. See <a href="./rfc3280">RFC 3280</a> for additional information on certificate path
validation."
The push / pull nature of ODETTE-FTP means that a party can make an
outbound connection from behind a firewall to another party and
exchange files in both directions. There is no need for both
partners to open ports on their firewalls to allow incoming
connections; only one party needs to allow incoming connections.
See <a href="#section-1.7">Section 1.7</a> for a discussion of the benefits of session security
[<a href="#ref-TLS" title=""The Transport Layer Security (TLS) Protocol Version 1.1"">TLS</a>] versus file security.
<span class="grey">Friend Informational [Page 99]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-100" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Virtual File Mapping Example</span>
This example demonstrates the mapping of a Virtual File into a
sequence of ODETTE-FTP Data Exchange Buffers.
Each line in this extract from 'The Rime of the Ancient Mariner' by
Coleridge [<a href="#ref-RIME" title=""The Rime of the Ancient Mariner"">RIME</a>] is separated by CR-LFs in a file that is being
transmitted as a T format file.
It is an ancient Mariner,
And he stoppeth one of three.
"By thy long grey beard and glittering eye,
Now wherefore stopp'st thou me?
"The Bridegroom's doors are opened wide,
And I am next of kin;
The guests are met, the feast is set:
May'st hear the merry din."
He holds him with his skinny hand,
"There was a ship," quoth he.
"Hold off! unhand me, grey-beard loon!"
Eftsoons his hand dropt he.
He holds him with his glittering eye--
The Wedding-Guest stood still,
And listens like a three years; child:
The Mariner hath his will.
The Wedding-Guest sat on a stone:
He cannot chuse but hear;
And thus spake on that ancient man,
The bright-eyed Mariner.
The ship was cheered, the harbour cleared,
Merrily did we drop
Below the kirk, below the hill,
Below the light-house top.
The Exchange Buffers below were built from the above. The top line
of each represents the ASCII code, while the two lines below give the
hexadecimal value.
Note that:
. The "D" at the beginning of each Exchange Buffer is the command
code.
<span class="grey">Friend Informational [Page 100]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-101" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
. The "?" preceding each subrecord is the header octet (see the
hexadecimal value).
Exchange Buffer 1
D?It is an ancient Mariner,..And he stoppeth one of three..."By
4347267266266666672467666720046626627767767626662662767662002472
4F9409301E01E395E40D129E52CDA1E4085034F005480FE50F6048255EDA2290
t?hy long grey beard and glittering eye,..Now wherefore stopp'st
7367266662676726667626662666776766626762004672766766676277677277
4F890CFE70725902512401E407C944529E70595CDAEF70785256F25034F00734
?thou me?...."The Bridegroom's doors are opened wide,..And I am
2376672663000025662476666766627266677267626766662766620046624266
0F48F50D5FDADA248502294572FFD7304FF2301250F05E5407945CDA1E40901D
?next of kin;..The guests are met, the feast is set:..May'st he
2366772662666300566267677726762667227662666772672767300467277266
0FE5840F60B9EBDA485075534301250D54C04850651340930354ADAD19734085
a?r the merry din."....He holds him with his skinny hand,.."Ther
6372766266777266622000046266667266627676266727666672666620025667
1F204850D5229049EE2DADA8508FC43089D07948089303B9EE9081E4CDA24852
e? was a ship," quoth he..."Hold off! unhand me, grey-beard loon
6327672627667222776762662002466626662276666626622676726667626666
5F07130103890C2015F48085EDA28FC40F66105E81E40D5C07259D251240CFFE
!?"..Eftsoons his hand dropt he.....He holds him with his glitte
2320046776667266726666267677266200004626666726662767626672666776
1F2DA5643FFE30893081E4042F04085EDADA8508FC43089D07948089307C9445
r?ing eye--..The Wedding-Guest stood still,..And listens like a
7366626762200566256666662476772776662776662004662667766726666262
2F9E70595DDDA485075449E7D75534034FF40349CCCDA1E40C9345E30C9B5010
t?hree years; child:..The Mariner hath his will.....The Wedding-
7367662766773266666300566246766672667626672766620000566256666662
4F8255095123B0389C4ADA4850D129E52081480893079CCEDADA485075449E7D
G?uest sat on a stone:..He cannot chuse but hear;..And thus spak
4376772767266262776663004626666672667762677266673004662767727766
7F553403140FE01034FE5ADA85031EEF4038535025408512BDA1E4048530301B
e? on that ancient man,..The bright-eyed Mariner.....The ship wa
6326627667266666672666200566267666726766246766672000056627667276
5F0FE0481401E395E40D1ECDA4850229784D59540D129E52EDADA48503890071
<span class="grey">Friend Informational [Page 101]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-102" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
s? cheered, the harbour cleared,..Merrily did we drop..Below the
7326666766227662667667726666766200467766726662762676700466672766
3F03855254C048508122F5203C51254CDAD5229C90494075042F0DA25CF70485
.kirk, below the hill,..Below the light-house top...
2B667622666672766266662004666727662666672667762767200
03B92BC025CF70485089CCCDA25CF704850C9784D8F53504F0EDA
<span class="grey">Friend Informational [Page 102]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-103" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. ISO 646 Character Subset</span>
o-----------------------------------------------------------------o
| | 7| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| | B -+-----+-----+-----+-----+-----+-----+-----+-----|
| | I 6| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| | T -+-----+-----+-----+-----+-----+-----+-----+-----|
| | 5| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
| |----+-----+-----+-----+-----+-----+-----+-----+-----|
| | | | | | | | | | |
| | | | | | | | | | |
|------------| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| BIT | | | | | | | | | |
| 4 3 2 1 | | | | | | | | | |
|============o====o=====+=====+=====+=====+=====+=====+=====+=====|
| 0 0 0 0 | 0 | | | SP | 0 | | P | | |
|------------|----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 0 0 1 | 1 | | | | 1 | A | Q | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 0 1 0 | 2 | | | | 2 | B | R | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 0 1 1 | 3 | | | | 3 | C | S | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 1 0 0 | 4 | | | | 4 | D | T | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 1 0 1 | 5 | | | | 5 | E | U | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 1 1 0 | 6 | | | & | 6 | F | V | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 0 1 1 1 | 7 | | | | 7 | G | W | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 0 0 0 | 8 | | | ( | 8 | H | X | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 0 0 1 | 9 | | | ) | 9 | I | Y | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 0 1 0 | 10 | | | | | J | Z | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 0 1 1 | 11 | | | | | K | | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 1 0 0 | 12 | | | | | L | | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 1 0 1 | 13 | | | - | | M | | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 1 1 0 | 14 | | | . | | N | | | |
|------------+----|-----+-----+-----+-----+-----+-----+-----+-----|
| 1 1 1 1 | 15 | | | / | | O | | | |
o-----------------------------------------------------------------o
<span class="grey">Friend Informational [Page 103]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-104" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">Appendix C</a>. X.25 Specific Information</span>
The International Organization for Standardization (ISO) Open Systems
Interconnection (OSI) model is the basis for ODETTE-FTP.
ODETTE-FTP covers levels 4 to 7, and originally CCITT X.25 was the
only recommended telecommunication protocol for OSI's layers 1, 2, 3.
ISO Reference Model:
+------------------------------+ <==== File Service
| Level-7 FTP application |
|------------------------------|
| Level-6 FTP presentation |
|------------------------------|
| Level-5 FTP session |
|------------------------------|
| Level-4 FTP transport |
|------------------------------| <==== Network Service
| Level-3 X.25 |
|------------------------------|
| Level-2 X.25 |
|------------------------------|
| Level-1 X.25 |
+------------------------------+
<span class="h3"><a class="selflink" id="appendix-C.1" href="#appendix-C.1">C.1</a>. X.25 Addressing Restrictions</span>
When an X.25 call is made over a PSDN, the Network User Address (NUA)
of the destination must be specified in order that the PTT may route
the call. The call placed is directed to the termination equipment
upon the user's premises.
It is possible to provide extra information in the Call Request
Packet in addition to the mandatory NUA required by the PTT.
This extra information may be of 2 kinds:
(a) A subaddress:
It is simply an extension to the address and it is put into the
called address field of the Call Request Packet. This
information (Address + Subaddress) is taken from the destination
address field of the F_CONNECT_RQ; therefore, from the user's
point of view, there is no distinction between the main address
and subaddress parts.
<span class="grey">Friend Informational [Page 104]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-105" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
(b) User data:
There is no standard for user data. Moreover, there is no
information in the F_CONNECT_RQ from which the ODETTE-entity may
derive user data to be put in the N_CONNECT_RQ; therefore, user
data shall not be used.
<span class="h3"><a class="selflink" id="appendix-C.2" href="#appendix-C.2">C.2</a>. Special Logic</span>
The SSID field SSIDSPEC specifies whether special logic must be
applied (Y (yes) or N (no)) to the Data Exchange Buffer before the
ODETTE-FTP moves the data into the NSDU (Network Service Data Unit)
and passes control to the Network Service.
<span class="h4"><a class="selflink" id="appendix-C.2.1" href="#appendix-C.2.1">C.2.1</a>. When Special Logic Is Not To Be Used</span>
This logic is not applied to SSRM and SSID commands.
<span class="h4"><a class="selflink" id="appendix-C.2.2" href="#appendix-C.2.2">C.2.2</a>. The Need for "Enveloping" Exchange Buffers</span>
The "special-logic" parameter was created in order to allow the use
of ODETTE-FTP over asynchronous links. The "special-logic" could be
needed to enable terminals to access an X.25 network via an
asynchronous entry (through a PAD: Packet Assembly / Disassembly).
The "special-logic" is not needed in case of a whole X.25 connection.
This "special-logic" realises a CRC function in order to detect
errors due to the asynchronous medium.
Negotiation of the "special-logic" parameter in the SSID command is
as follows:
SSID SSID
-----------------------------------------------
special-logic=yes --------------------->
<------------------------------------ special-logic=yes
or
<------------------------------------ special-logic=no
special-logic=no ---------------------->
<------------------------------------ special-logic=no
This logic is activated when the "special-logic" parameter in the
SSID specifies Y (yes).
<span class="grey">Friend Informational [Page 105]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-106" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Special logic processing, when activated, will function within level
4 of the OSI model.
+------------------------------+ <==== File Service
| Level-7 FTP application |
|------------------------------|
| Level-6 FTP presentation |
|------------------------------|
| Level-5 FTP session |
|------------------------------|
| Level-4 FTP transport |
| SPECIAL LOGIC PROCESSING |
|------------------------------| <==== Network Service
| Level-3 X.25 |
|------------------------------|
| Level-2 X.25 |
|------------------------------|
| Level-1 X.25 |
+------------------------------+
<span class="h4"><a class="selflink" id="appendix-C.2.3" href="#appendix-C.2.3">C.2.3</a>. Responsibilities of Special Logic</span>
When transmitting an Exchange Buffer and special logic is active,
layer 4 will wrap the Exchange Buffer in synchronization and
delineation characters, then protect the data integrity by means of a
block checksum (BCS). When receiving an Exchange Buffer and special
logic is active, layer 4 will remove such things as synchronization
and delineation characters, etc., before passing the Exchange Buffer
to the higher layers.
<span class="h4"><a class="selflink" id="appendix-C.2.4" href="#appendix-C.2.4">C.2.4</a>. Extended Exchange Buffer Format</span>
Each envelope has a 1-byte header prefixed to it, and a 2-byte
checksum appended to the end. The checksum is derived in a manner
specified in the ISO DIS 8073 TRANSPORT LAYER documentation.
<span class="grey">Friend Informational [Page 106]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-107" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The layout of the data buffer will be structured as follows:
+------------------------------------------------------------------+
| S | B | | B | C |
| T | S | COMPLETE EXCHANGE BUFFER (CEB) | C | / |
| X | N | | S | R |
+------------------------------------------------------------------+
A A A A
| | | |
| +------------- Block sequence number | |
| | |
+----------------- Synchronization character | |
| |
Block checksum -----------------------+ |
|
Delineation character --------------------+
The envelope is initialised with an STX and the checksum variables
are set to 0. The leading STX is not protected by the checksum
calculation but is explicitly protected by a character compare at the
receiver's end. The Exchange Buffer is processed character by
character. As each character is removed from the Exchange Buffer, it
is put through the checksum calculation and then, prior to its
insertion in the envelope, it is put through the Shift-out
transparency logic, which will result in either one or two characters
being inserted. When the contents of the Exchange Buffer have been
entirely processed, then the checksum variables are brought up to
date by inserting two X'00's through the checksum calculator and the
two resultant checksum characters forwarded to the Shift-out
transparency logic for insertion into the envelope. Finally, a
carriage return (CR) is appended to the envelope. The segment is now
ready for transmission to line.
Upon receipt of a valid envelope that has the correct sequence
number, the host should increment his sequence number register ready
for the next transmission.
The receiver will initialise his receiving buffer area upon receipt
of an STX character, place the STX at the beginning of the buffer,
and reset checksum variables. All subsequent characters are
processed using Shift-out logic before they are inserted into the
buffer, at which point they will NOT be processed by the checksum
calculator, although the character following the Shift-out (after
subtracting X'20') will be. The checksum characters themselves will
be processed by the checksum calculator by virtue of the design of
the checksum algorithm.
<span class="grey">Friend Informational [Page 107]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-108" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="appendix-C.2.5" href="#appendix-C.2.5">C.2.5</a>. Error recovery</span>
<span class="h5"><a class="selflink" id="appendix-C.2.5.1" href="#appendix-C.2.5.1">C.2.5.1</a>. Mechanism</span>
The error correction scheme is implemented by the definition of three
timers and the use of an ASCII NAK (Negative Acknowledgement)
character followed by a C/R. The <NAK><C/R> will flow between the
two session partners, but only as a consequence of previous bad data.
A user of the error recovery correcting extension must always work
with a credit value of 1. This can be forced upon any session
partner at SSID negotiation. The effect will be to force a simple
half-duplex flip-flop protocol.
Upon receipt of a bad block, send <NAK><C/R> to the session partner.
Upon receipt of a <NAK><C/R>, a session partner should retransmit the
last block in its entirety.
<span class="h5"><a class="selflink" id="appendix-C.2.5.2" href="#appendix-C.2.5.2">C.2.5.2</a>. Timers</span>
The majority of error conditions will be detected by a bad BCS
sequence. However, certain conditions cannot be so detected. For
example, a corrupt C/R will mean that the receiver will not know that
the end of a block has been reached. No matter how long he waits, no
more data will come from the sender. Thus, a timer is the only way
to detect this type of corruption. There are three timers needed to
detect all possible malignant conditions of this type.
T1 - Exchange Buffer Time Out (Inactivity or Response)
T2 - Inter Character Time Out
T3 - Data Carrier Detect Loss Time Out
The three timers are in addition to the timer defined in the original
protocol.
TIMER T1 - RESPONSE TIME OUT (DEFAULT = 45 SECONDS):
Used to detect a high-level block Time Out, e.g., the Time Out
between an SFID and its associated SFPA or SFNA response.
Started - It is started after the last character of an exchange
buffer has been sent to the line.
Stopped - It is stopped when an STX has been received.
Expiry - Retransmit the whole block again, until such time as the
retry limit has been reached.
<span class="grey">Friend Informational [Page 108]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-109" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
TIMER T2 - INTER CHARACTER TIME OUT (DEFAULT = 7 SECONDS):
Used to detect errors in the reception of individual characters.
Started - For an asynchronous entity, it is started upon receipt
of each character while in synchronisation mode. For an
X.25 entity, it is started after a received block that
did not terminate an Exchange Buffer.
Stopped - Upon receipt of the next character.
Expiry - Send a <NAK><C/R>, drop out of synchronised mode, and go
back and listen to line.
TIMER T3 - DATA CARRIER TEMPORARY LOSS (DEFAULT = 1 SECOND):
Used by an asynchronous entity only and is used to detect a
temporary carrier failure.
Started - When DCD (Data Carrier Detect) is lost.
Stopped - When DCD is regained.
Expiry - Disconnect the session.
<span class="h5"><a class="selflink" id="appendix-C.2.5.3" href="#appendix-C.2.5.3">C.2.5.3</a>. Types of Error</span>
Data corruption when it occurs can be categorised in one of five
ways:
(1) CORRUPT STX (START OF TEXT)
In this situation the STX is not seen and synchronisation is not
achieved. The terminating C/R is received out of synchronisation
and hence the block is not seen by the receiver. A <NAK><C/R> is
transmitted to the sender to indicate this. The sender should then
retransmit the last block (each implementation will need to set a
retry limit to be used for the number of consecutive times it
attempts to retransmit a block -- a default limit of 5 is
recommended). All data received outside synchronisation (except
<NAK><C/R>) are ignored.
<span class="grey">Friend Informational [Page 109]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-110" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
(A) (B)
Dropped Start of Text (STX)
+-------------------------+
| | B | | B | C |
-----| | S | CEB | C | / |-----> Not sync
| | N | | S | R |
+-------------------------+
+-------+
| N | C |
<-----| A | / |----- Not sync
| K | R |
+-------+
Exchange Buffer Resent
+-------------------------+
| S | B | | B | C |
-----| T | S | CEB | C | / |-----> Sync
| X | N | | S | R |
+-------------------------+
(2) CORRUPT TERMINATION (C/R)
This situation manifests itself as an extended period of
synchronisation with no activity. The T2 timer will detect this
condition.
(A) (B)
Corrupt Carriage Return
+-------------------------+
| S | B | | B | |
-----| T | S | CEB | C | |-----> No activity
| X | N | | S | |
+-------------------------+
+-------+
| N | C | T2
<-----| A | / |----- Timed out
| K | R |
+-------+
<span class="grey">Friend Informational [Page 110]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-111" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Exchange Buffer Resent
+-------------------------+
| S | B | | B | C |
-----| T | S | CEB | C | / |-----> Sync
| X | N | | S | R |
+-------------------------+
(3) BAD DATA
(4) BAD BCS (BLOCK CHECK SUM)
In this situation, the receiver is unable to tell whether the error
is bad data or bad BCS. In either case, the response is to discard
the Exchange Buffer and send a <NAK><C/R>.
(A) (B)
Bad Data/BCS
+-------------------------+
| S | B | | B | C | Bad data
-----| T | S | "%! | C | / |-----> detected
| X | N | | S | R |
+-------------------------+
+-------+
| N | C |
<-----| A | / |----- Discard Block
| K | R |
+-------+
Exchange Buffer Resent
+-------------------------+
| S | B | | B | C |
-----| T | S | CEB | C | / |-----> Data OK
| X | N | | S | R |
+-------------------------+
(5) BAD BLOCK SEQUENCE NUMBER (BSN)
A circular sequential number (0 up to and including 9) is assigned
to transmitted Exchange Buffers. This is to aid detection of
duplicate or out-of-sequence Exchange Buffers. Once a duplicate
block is detected, the Exchange Buffer in question is discarded.
Once an out of sequence block is detected, this should result in a
protocol violation.
<span class="grey">Friend Informational [Page 111]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-112" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Example protocol sequence:
(A) (B)
Exchange Buffer Being Sent
+-------------------------+
| S | | | B | C | Expecting
-----| T | 0 | EERP | C | / |-----> BSN=0
| X | | | S | R | Transmission
+-------------------------+
Exchange Buffer Being Sent
+-------------------------+
| S | | | B | C | Response to
<----| T | 0 | RTR | C | / |----- Previous
| X | | | S | R | Block
+-------------------------+
Exchange Buffer Being Sent
+-------------------------+ Expecting
| S | | | B | C | BSN=1 (Block
-----| T | 1 | SFID | C | / |- // -> lost in
| X | | | S | R | Transmission)
+-------------------------+ T1 Timed Out
Exchange Buffer Being Sent
+-------------------------+
| S | | | B | C | Send last
<----| T | 0 | RTR | C | / |----- Block
| X | | | S | R | again
+-------------------------+
Discard Block
and start
Timer T1
T1 Timed Out
<span class="grey">Friend Informational [Page 112]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-113" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Exchange Buffer Resent
+-------------------------+
| S | | | B | C | Expecting
-----| T | 1 | SFID | C | / |-----> BSN=1
| X | | | S | R | Block OK
+-------------------------+
Exchange Buffer Being Sent
+-------------------------+
| S | | | B | C | Response
<----| T | 1 | SFPA | C | / |----- BSN=1
| X | | | S | R | Block OK
+-------------------------+
Exchange Buffer Being Sent
+-------------------------+
| S | | | B | C |
-----| T | 2 | DATA | C | / |-----> Data OK
| X | | | S | R |
+-------------------------+
Note: A credit value of 1 must be used to guarantee half-duplex
flip-flop.
<span class="h4"><a class="selflink" id="appendix-C.2.6" href="#appendix-C.2.6">C.2.6</a>. Sequence of Events for Special Logic Processing</span>
The following functions will be executed in sequence:
1. Calculation of the Block Sequence Number (BSN):
BSN is set to zero by SSID. First block will be sent with value
zero. Value of BSN is increased by one for each data buffer to be
transmitted. When BSN value exceeds 9, counter will be reset to
zero.
Format: numeric/1 pos.
2. Calculation of the Block Checksum (BCS):
Calculation is done as specified in the ISO DIS 8073 TRANSPORT
LAYER document.
Format: binary/2 pos.
<span class="grey">Friend Informational [Page 113]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-114" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
3. Shift-out transparency (See TRANSMIT/RECEIVE logic.)
To avoid appearance of any control characters in the data stream,
all the characters of the extended Exchange Buffer (with exception
of the STX and carriage return characters enveloping the buffer)
are put through a Shift-out logic, which result in a character
being inserted (SO) and adding hex value '20' to the control
character.
4. The carriage return is inserted at the end of the data buffer.
Note: After adding STX, BSN, BCS, CR, and SO-logic, the data buffer
may exceed the Data Exchange Buffer size.
<span class="h4"><a class="selflink" id="appendix-C.2.7" href="#appendix-C.2.7">C.2.7</a>. Checksum Creation Algorithm</span>
These follow the ISO DIS 8073 TRANSPORT LAYER standard.
SYMBOLS:
The following symbols are used:
C0,C1 Variables used in the algorithm
L Length of the complete NSDU
X Value of the first octet of the checksum parameter
Y Value of the second octet of the checksum parameter
ARITHMETIC CONVENTIONS:
Addition is performed in one of the two following modes:
a) modulo 255 arithmetic
b) one's complement arithmetic in which if any of the variables
has the value minus zero (i.e., 255) it shall be regarded as
though if was plus zero (i.e., 0).
ALGORITHM FOR GENERATING CHECKSUM PARAMETERS:
. Set up the complete NSDU with the value of the checksum parameter
field set to zero.
. Initialise C0 and C1 to zero.
. Process each octet sequentially from i=1 to L by
a) adding the value of the octet to C0, then
b) adding the value of C0 to C1.
<span class="grey">Friend Informational [Page 114]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-115" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
. Calculate X and Y such that
X = C0 - C1
Y = C1 - 2*C0
. Place the values X and Y in the checksum bytes 1 and 2,
respectively.
<span class="h4"><a class="selflink" id="appendix-C.2.8" href="#appendix-C.2.8">C.2.8</a>. Algorithm for checking checksum parameters</span>
. Initialise parameters C0 and C1 to zero.
. Process each octet of NSDU sequentially from i=1 to L by
a) adding the value of the octet to C0, then
b) adding the value of C0 to C1.
. If, when all the octets have been processed, either or both C0
and C1 does not have the value zero, then the checksum formulas
have not been satisfied.
Note that the nature of the algorithm is such that it is not
necessary to compare explicitly the stored checksum bytes.
<span class="h4"><a class="selflink" id="appendix-C.2.9" href="#appendix-C.2.9">C.2.9</a>. Shift-out Processing</span>
(Transparency for all control characters)
TRANSMIT LOGIC (values SO: X'0E' or X'8E')
Buffer(1), ... , (n) is a character in the buffer to be sent.
FOR i=1 to n /* for all octets of the buffer */
IF ((buffer(i) & X'7F') < X'20')
THEN output (SO)
output (buffer(i) + X'20')
ELSE output (buffer(i))
<span class="grey">Friend Informational [Page 115]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-116" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
NEXT:
RECEIVE LOGIC (values SO: X'0E' or X'8E')
Buffer(1), ... , (n) is a character in the received buffer.
drop = false
FOR i=1 to n /* for all octets of the buffer */
IF drop = true
THEN output (buffer(i) - X'20')
drop = false
ELSE IF buffer(i) = (X'0D' or X'8D')
THEN Stop
ELSE IF buffer(i) = SO
THEN drop = true
ELSE output (buffer(i))
NEXT:
<span class="h3"><a class="selflink" id="appendix-C.3" href="#appendix-C.3">C.3</a>. PAD Parameter Profile</span>
Before an (ODETTE-FTP) asynchronous entity --> Modem --> PAD -->
(ODETTE-FTP) native X.25 link can be established, the target PAD
parameters must be set such that correct communication is
established. It is strongly recommended that the PAD parameters are
set by the X.25 entity. CCITT recommendations X.3, X.28, and X.29
define the PAD parameters and procedures for exchange of control
information and user data between a PAD and a packet mode Data
Terminal Equipment (DTE).
Following is the Parameter list and values used to set the PAD for
ODETTE-FTP communication. For further detailed information see the
specification for CCITT X.25, X.28, X.29 and X.3.
No. Description Value Meaning
---------------------------------------------------------------
1 Escape from Data Transfer 0 Controlled by host
2 Echo 0 No Echo
3 Data Forwarding Signal 2 Carriage Return
4 Selection of Idle Timer Delay 20 1 second
5 Ancillary Device Control 0 X-ON, X-OFF not used
6 PAD Service Signals 1 All except prompt
7 Procedure on Break 2 Reset
8 Discard Output 0 Do not discard
9 Padding after Carriage Return 0 No padding
<span class="grey">Friend Informational [Page 116]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-117" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
10 Line Folding 0 No line folding
11 Terminal Data Rate - Read only
12 Flow Control of the PAD 0 No flow control used
13 Linefeed Insertion after C/R 0 No linefeed
14 Linefeed Padding 0 No linefeed padding
15 Editing 0 No editing
16 Character Delete 127 Delete
17 Line Delete 24 <CTRL>X
18 Line Display 18 <CTRL>R
19 Editing PAD Service Signals 0 No service signal
20 Echo Mask 0 No echo mask
21 Parity Treatment 0 No parity check
22 Page Wait 0 No page wait
Note 1:
Refer to CCITT (1984)
- Parameters 1 - 12 are mandatory and available internationally.
- Parameters 13 - 22 may be available on certain networks and may
also be available internationally.
- A parameter value may be mandatory or optional.
The ODETTE profile refers only to parameter values which must be
internationally implemented if the parameter is made available
internationally.
The ODETTE-FTP "special-logic" parameter may be impossible on some
PADs because they do not support of some of the parameters (13 - 22).
(If the PAD is supporting parity check (21) by default, ODETTE-FTP
special logic would be impossible.)
It is a user responsibility to ensure special logic consistency when
making the PAD subscription.
Note 2:
Some parameters may have to be set differently depending on:
- Make and function of the start-stop mode DTE entity.
- Start-stop mode DTE entity ODETTE-FTP monitor function.
- PAD services implemented.
- Packet mode DTE entity ODETTE-FTP monitor function.
<span class="grey">Friend Informational [Page 117]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-118" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h2"><a class="selflink" id="appendix-D" href="#appendix-D">Appendix D</a>. OFTP X.25 over ISDN Recommendation</span>
This appendix describes the recommendation of ODETTE Group 4 (1) for
the use of OFTP (2) over X.25 over ISDN.
(1) ODETTE Group 4 is responsible for the specification of
Telecommunications standards and recommendations for use
within the Automotive Industry.
(2) OFTP (ODETTE File Transfer Protocol) is the communications
standard specified by ODETTE Group 4 designed for the transfer
of both EDI and non-EDI data.
This document offers an introductory overview of a technical subject.
It is structured to contain the ODETTE recommendation, together with
introductory information for the person not familiar with ISDN, and
notes on the issues associated with the implementation of the
recommendation.
The first section provides the detailed ODETTE recommendation, which
is followed by a general discussion. If you are not familiar with
the terminology, please read the subsequent sections first.
How far an existing X.25 Line adapter may be replaced by an ISDN line
adapter in an installation depends on the opportunities in view of
connections (X.25 or ISDN) of the involved partners for file
transfer.
Companies that keep many connections to external partners (for
example, car manufacturing companies) may use the OFTP file transfer
in view of compatibility, which must always be considered anyway only
in parallel to the X.25 network.
It is not the aim of this recommendation to remove the OFTP file
transfer generally from the X.25 network to the ISDN network. This
will not always be possible for international connections because of
technical reasons, and this does not always make sense for
connections with a low size of data to be transmitted.
Certainly, the use of ISDN, when exchanging a high volume of data
(for example, CAD/CAM files), is very much cheaper than the use of an
X.25 network. For such cases, this recommendation shall provide a
cost-effective possibility for file transfer.
This appendix is organized as follows. D.1 defines the ODETTE
recommendation in these terms, D.2 introduces the ISDN environment to
the unfamiliar reader, D.3 describes the various methods of
connecting to ISDN, and D.4 covers implementation issues.
<span class="grey">Friend Informational [Page 118]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-119" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="appendix-D.1" href="#appendix-D.1">D.1</a>. ODETTE ISDN Recommendation</span>
X.25: Level 2 ISO 7776
Protocol
Level 3 ISO 8208
Protocol
Packet Size 128
Level 2 7
Window Size
Level 3 7
Window Size
First LCN 1
Number of LCNs 1
Facilities Window Size and Packet Size
negotiation shall be supported
by everybody. Call User Data
should not be required.
Calling NUA Optionally provided by the call
initiator.
Called NUA Should be set to a value where
the last 'n' digits can be
specified by the called party.
ISDN: Apart from requesting a 64K unrestricted digital
call, no ISDN features shall be required.
Timeout control: To avoid connections (B channels) within the
circuit-switched ISDN network remaining active
but unused for a long time, the adapter should
include a timeout control.
An ISDN connection (B channel) should be released
if no X.25 packets have been transmitted on this
connection for a longer time. For flexibility a
variable user definable timer should be
incorporated into the adapter.
<span class="grey">Friend Informational [Page 119]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-120" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
In the event of a timeout situation the adapter
has to release the ISDN connection and notify the
local OFTP by the transmission of a clear packet.
The pages that follow are informational and do not form part of this
recommendation.
<span class="h3"><a class="selflink" id="appendix-D.2" href="#appendix-D.2">D.2</a>. Introduction to ISDN</span>
The use of digital encoding techniques over such high-quality,
error-free backbone networks has allowed the PTTs to offer high
bandwidths to the end user. The service is named ISDN (Integrated
Services Digital Network).
The increasing need to transfer larger volumes of EDI data, in
particular CAD/CAM drawings, has focused attention upon high-speed,
low-cost communication. The traditional X.25 over a Packet Switched
Data Network (PSDN) has been a good general purpose communications
subsystem. Unfortunately, its cost and transfer speed make PSDN
expensive for the new requirement.
X.25 over the new ISDN provides both the transfer speed and cost
benefits to satisfy the new requirements.
We include the following terminology because for us to make sense of
ISDN and X.25, it is important that we use definitions precisely and
avoid the abuses of the past.
ISDN: Integrated Services Digital Network
X.25: X.25 is a communications protocol. It defines the
structure of data packets that comprise the protocol and
the manner in which they are used.
PSDN: A PSDN (Packet Switched Data Network) is a network over
which the X.25 protocol is operated.
PSPDN: A PSPDN (Packet Switched Public Data Network) is a PSDN
operated by the PTTs. PSPDNs are given trade names,
such as PSS in the UK, Datex-P in Germany, and Transpac
in France.
BRI: Basic Rate Interface, also known as Basic Rate Access,
defines an ISDN facility with 2 x 64 K B channels.
PRI: Primary Rate Interface, also known as Primary Rate
Access, defines an ISDN facility with 30 x 64 K B
channels.
<span class="grey">Friend Informational [Page 120]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-121" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Channels: ISDN is typically brought into a consumer's premises
using a twisted pair of wire. Over this wire, data can
be transmitted in frequency bands. These frequency
bands are allocated as channels.
B channels: The B channels are the data channels and operate at 64
Kb. The two end users of a connection will communicate
over a B channel.
D channel: Signalling on ISDN is performed over the D channel.
Signalling is used to set up and release connections on
the B channels. In some countries, the D channel can
also be used for limited X.25 access to the PTTs' PSDN.
The D channel operates at the lower speed of 16 Kb as it
is normally used only at the beginning and end of a
connection.
Bandwidth Allocation:
2 Wire B2 - 64 Kb
Twisted Pair B1 - 64 Kb
D Channel - 16 Kb
The standard for the operation of the D channel is
called ETSI and is used in most European countries.
However, some countries that started the introduction
very early used proprietary standards, for example:
1TR6 - Used in Germany
BTNR - Used in the UK
Although there are D channel variations, this will not
affect communications over the B channels as the
communication over the D channel is between the
subscriber and the ISDN service provider.
However, the consumer's equipment must be able to handle
the channel D signalling operated by the ISDN service
provider and so there may be a problem of equipment
availability and certification.
All the PTTs have committed to migrate to ETSI (also
known as EURO-ISDN and Q.931) and many are currently
supporting both their national variant and ETSI. It is
advisable that in this situation the subscriber select
the ETSI variant to avoid unnecessary equipment
obsolescence.
<span class="grey">Friend Informational [Page 121]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-122" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Services: The high-speed service is provided in two forms, Basic
and Primary.
Basic: 2+D, the D 2B channel operates at 16 Kb. The
Basic Rate access is normally provided to the subscriber
over simple twisted pair cable.
Primary: 30B+D, the D channel operates at 64 Kb.
Primary Rate access is normally provided to the
subscriber over shielded coaxial cable. Note that the
bandwidth for Primary is 2.048 Mbit/s.
Protocols: The B channel is a binary channel and is transparent to
the flow of data. Therefore, all of the currently
available protocols can operate over a B channel. The
most common protocol is X.25.
X.25: The X.25 protocol is a primary protocol for open
computer-to-computer communication.
Passive Bus: It is possible to have an ISDN service enter a building
and then have an 8-core cable laid within the building
with multiple ISDN junction points, in the same way as
one would have multiple telephone points (extensions)
for a particular external telephone line.
Connection Setup
The adapter is responsible for analysing the outgoing X.25 call
request and making an ISDN call to a derived ISDN address,
establishing a new X.25 level-2 and level-3, and then propagating
the X.25 Call Request Packet.
Connection Termination
The termination phase of the X.25 call is made with a Clear
Request and finalised with a Clear Confirmation. The recipient of
the Clear Confirm should then close down the ISDN connection.
The clear down of the ISDN connection should only be made if there
are no other Switched Virtual Circuits (SVCs) active on the ISDN
connection; note that the usage of multiple simultaneous SVCs is
only by virtue of bilateral agreement.
<span class="grey">Friend Informational [Page 122]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-123" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="appendix-D.3" href="#appendix-D.3">D.3</a>. Equipment Types</span>
There are a number of ways in which ISDN/X.25 access can be made.
Integrated Adapter
This is normally a PC-based ISDN adapter inside a PC. It is
normal in such an environment that the OFTP application has the
ability to manipulate the ISDN and X.25 aspects of the session
independently and therefore have complete control.
Equally important is that the speed of communication between the
adapter and the application are at PC BUS speeds. It is
therefore more likely that the effective transmission speed will
be nearer the 64K limit.
The other benefit of such a direct linkage is that both 64K B
channels may be used in parallel and both able to operate at
64Kb.
Elementary Terminal Adapter
In this scenario, the computer has an integral X.25 adapter
communicating X.21 with a Terminal Adapter that fronts the ISDN
network. This allows a host with a X.25 capability to interface
to ISDN, normally on a one-to-one basis.
The interface between the Terminal Adapter and the PC will
typically only support one 64K B channel. This is obviously an
inefficient usage of the ISDN service.
Because the linkage between the computer and the Terminal Adapter
is only X.25, then some modification/configuration may be needed
inside the Terminal Adapter when new users are added.
X.25 Switch
This solution is normally found inside the larger corporates
where an internal X.25 network is operated or where dual X.25 and
ISDN is required.
The main benefit of a switch is to support both PSDN and ISDN
simultaneously. Also, multiple X.21 lines may be implemented
between the X.25 switch and the computer.
This solution normally requires more effort to configure and may
require obligations to be placed upon how incoming callers
specify routing.
<span class="grey">Friend Informational [Page 123]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-124" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h3"><a class="selflink" id="appendix-D.4" href="#appendix-D.4">D.4</a>. Implementation</span>
The adoption of ISDN as an additional subsystem to support OFTP
communications has associated implementation problems, which can be
categorised as below:
X.25/ISDN Addressing
Making a Call
Receiving a Call
Logical Channel Assignment
Facilities Negotiation
ISDN Call Attributes
Homologation Issues
Growth
Performance
<span class="h4"><a class="selflink" id="appendix-D.4.1" href="#appendix-D.4.1">D.4.1</a>. X.25/ISDN Addressing</span>
The original OFTP was designed to work over the X.25 networks
provided by the PTTs (PSPDNs). The national X.25 networks were
interconnected to provide a global X.25 network, and a common
addressing scheme was adopted by all. Although there were a few
differences in addressing within a national network, the interface to
other countries was quite rigid and normalised.
PSPDN Numbering
The addressing scheme adopted in X.25 is a 15-digit number
(Network User Address, NUA) where the first three identify the
country, the fourth digit identifies the network within the
country, and the remainder specify the individual subscriber plus
an optional subaddress. In the UK where a full X.25 numbering
scheme is adopted, a NUA is, e.g., 234221200170, where 2342 is the
DNIC (Data Network Identification Code) and 21200170 is the
subscriber number.
ISDN Numbering
ISDN is an extension of the normal telephone system; consequently,
it adopts (or rather is) the same numbering scheme as the
telephone system (PSTN).
The Numbering Conflict
The PSDN and PSTN numbering schemes are two totally different
numbering schemes. There is no relationship between them. It is
this conflict that is at the heart of the matter.
<span class="grey">Friend Informational [Page 124]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-125" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="appendix-D.4.2" href="#appendix-D.4.2">D.4.2</a>. Making a Call</span>
It is a consequence of PSDN and PSTN being based upon different and
unconnected numbering schemes that the key problem arises.
For X.25 to work over ISDN, three main methods of addressing are
available:
Un-mapped: The X.25 called NUA is used as the PSTN number. Thus,
an X.25 call to 0733394023 will result in a PSTN call
to 0733394023 and the call request that consequently
flows will also be to 0733394023.
Manipulated: The X.25 called NUA is manipulated by the subtraction
and/or addition of digits to derive a resultant PSTN
number. Thus, 2394023 could be manipulated to derive
a PSTN number of 00944733394023, where the prefix 2 is
deleted and replaced by 00944733.
Mapped: The X.25 called NUA is used as a look-up into a table
of PSTN numbers. Thus, an X.25 call to 234221200170
could be mapped to and result in a PSTN call to
0733394023 and the call request that consequently
flows will remain as 234221200170.
Un-mapped Calls
Un-mapped calls are where the host-specified X.25 NUA is converted
directly to the corresponding ISDN number.
Thus, an X.25 call issued by the host to X.25 NUA 0733394023 will
result in an ISDN call to the PSTN number 0733394023. After the
call has been established, then HDLC/X.25 protocol setup will be
established after which an X.25 call request will be transferred
with the NUA 0733394023.
When a PSTN call is made, the number of digits in the called
number vary depending upon the location of the called party.
When a number is called, it may be local, national, or
international.
local: 394023
national: 0733 394023
international: 009 44 733 394023
Depending upon where a call originates, the corresponding X.25 NUA
in the call request packet will vary dramatically.
<span class="grey">Friend Informational [Page 125]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-126" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Such variation of X.25 NUA, in particular the changing prefix, can
be difficult to be accommodated by X.25 routing logic in many
products.
When an international PSTN call is being made, then it is likely
that the PSTN number exceeds 15 digits, which is the maximum
length of an X.25 NUA. Therefore, using un-mapped addressing may
make some international calls impossible to make.
Manipulated Calls
The X.25 called NUA is manipulated by the subtraction and/or
addition of digits to derive a resultant PSTN number.
Let us assume that by internal convention we have identified the
prefix '2' to indicate an international ISDN call. Thus, an X.25
call request of 244733394023 could be manipulated to derive a PSTN
number of 00944733394023, where the prefix '2' is deleted and
replaced by '009' (the international prefix).
The X.25 called NUA would typically be left in its un-manipulated
state. As individual internal conventions vary, the X.25 called
NUA will vary. In the case above, it would be 244733394023, but
another installation might have the convention where a prefix of
'56' specifies the UK and so the NUA will be 56733394023, where
the '56' is deleted and replaced with '00944' to derive the PSTN
number.
Mapped Calls
The mapped method offers maximum flexibility in that:
The PSTN number can exceed 15 digits.
The X.25 NUA and PSTN number can be totally different.
The problem with mapped calls is administrative. IBM mainframes
can't handle X.25 over ISDN at all, let alone support mapping.
For the mainframe solution to work, an external X.25/ISDN router
box is required and it is the responsibility of the external box
to provide any mapping necessary.
This means that any changes or addition of OFTP partners over ISDN
will require access to the computer room or special configuration
equipment to change the tables inside the external X.25/ISDN
router box.
<span class="grey">Friend Informational [Page 126]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-127" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="appendix-D.4.3" href="#appendix-D.4.3">D.4.3</a>. Receiving a Call</span>
We have seen from the previous section that the called X.25 NUA
from an ISDN incoming call may vary considerably. If ISDN/X.25 is
confined to a national boundary, then such variation will not be
so great as most calls will have matching called X.25 NUA and PSTN
numbers.
X.25 switches and X.25 adapters normally route/accept/reject calls
based upon their X.25 called NUA. In particular, routing is made
upon the X.25 called NUA subaddress.
To derive this subaddress, there are 2 methods:
1) the last 'n' digits are analysed.
2) the base X.25 NUA of the line is removed from the called NUA.
For example, if the called X.25 NUA is 23422120017010 and the
PSDN subscriber NUA is 234221200170, then the subaddress
derived from subtraction is 10.
Obviously, the second method will not work if the incoming NUA
varies.
ISDN Features
ISDN, like X.25, has a core set of features that are then enriched
with options. In the original OFTP X.25 specification, it was
decided that the Q-bit and D-bit options were not common to all
networks or applications; they were therefore positively excluded
from the specification.
It is proposed that apart from the core ISDN features necessary to
establish a call, no other features be used.
Subaddressing
There are two forms of ISDN subaddressing, overdialled and specific.
The overdial method allows an ISDN number to be artificially
extended. A typical case would be where a private exchange has been
installed in a larger company. Assume that the base number is
394023 and the computer is on internal extension 1234, then by
specifying an ISDN number of 3940231234, direct access may be made
to the internal extension.
<span class="grey">Friend Informational [Page 127]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-128" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The problem with this method is that it extends to called number and
may, especially for international access, exceed the ISDN numbering
limits between countries.
The other method of subaddressing is where a discrete subaddress is
placed in a specific field in the ISDN call setup.
The problem with this method, is that it requires the caller to
place the subaddress in the ISDN call setup. Not all ISDN
implementations will allow this insertion.
In conclusion, subaddressing of any kind should be avoided.
<span class="h4"><a class="selflink" id="appendix-D.4.4" href="#appendix-D.4.4">D.4.4</a>. Logical Channel Assignment</span>
An X.25 dataline will have associated with it a number of logical
channels.
The number of channels is a part of the agreement between the PTT
and the subscriber. The number of channels subscribed to is
important; call failure and similar problems will result if the
number of logical channels defined at the two remote ends are
different.
If a DTE makes a call out, then the highest defined logical channel
number will be selected. If the remote Data Communications
Equipment (DCE) does not have the same number of logical channels
defined, then an invalid logical channel is being used from the
perspective of the recipient DCE and the call will be rejected.
<span class="h4"><a class="selflink" id="appendix-D.4.5" href="#appendix-D.4.5">D.4.5</a>. Facilities Negotiation</span>
In the PSPDN environment, it is possible to subscribe to negotiation
of window size and packet size. Although this negotiation requested
by the originator's DTE may be propagated to the remote DTE at the
discretion of the originator's DCE, it is a local responsibility
between the DTE and DCE pair.
In the ISDN scenario where it is a DTE-DTE type connection, the
window size and packet size may be left at the default value and
consequently the values may be omitted from the call request. If no
values are specified, then it is vital that both DTEs have
configured themselves to the recommended defaults.
The symptom of a window size mismatch is a hang situation without
any informational error codes.
<span class="grey">Friend Informational [Page 128]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-129" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
The symptoms of a packet size mismatch could work in some scenarios,
but would otherwise issue error codes indicating invalid packet
sizes.
Window Size
The CCITT X.25 window size has a default value of '2', although
subscribers may have other default window sizes, e.g., '7', by
virtue of agreement with the PTT.
Window size negotiation can be explicitly requested by specifying
the requested window size in the Facilities fields in the Call
Request packet.
Packet Size
The CCITT X.25 packet size has a default value of '128' octets,
although subscribers may have other default values, e.g., '1024',
agreed with the PTT.
<span class="h4"><a class="selflink" id="appendix-D.4.6" href="#appendix-D.4.6">D.4.6</a>. ISDN Call Setup</span>
The initial setup of an ISDN call is initiated with the
transmission of a Q.931 SETUP command. Apart from requesting that
a call be established, the SETUP command can optionally carry
information about the calling party, the called party, routing
information, the type of circuit required (e.g., voice or data),
and information about the protocols that are requested to be
established.
Setup Parameters:
Bearer capability Information transfer and
access attributes
Called Party number Destination's network address
Called Party subaddress Destination's complete
address
Calling Party number Source's network address
Low-layer compatibility Layer 1-3 indication
High-layer compatibility Layer 4-7 indication
<span class="grey">Friend Informational [Page 129]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-130" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="appendix-D.4.7" href="#appendix-D.4.7">D.4.7</a>. Homologation Issues</span>
Homologation procedures were adopted and vigorously enforced by the
PTTs with respect to the quality and conformance of communications
equipment connected to the services provided by the PTTs.
In particular, commercial X.25 products had to be tested and approved
before they could be connected to the PTTs' PSPDN. The advantage of
this to the subscriber was that there was very little chance of the
approved equipment not working.
With ISDN, similar approval standards are still enforced. So the
subscriber has the same confidence in their ISDN equipment. Wrong,
the ISDN equipment itself is approved, but the X.15 protocol that
operates on top of ISDN is now outside of the scope of approval
services.
This means that quality of conformance to standards of X.25 over ISDN
is subject to the variable quality procedures within the various ISDN
equipment manufacturers.
Although it is likely that commercial reputation will place pressure
upon the manufacturers with a programming bug to correct such errors,
it still requires the subscribers that do not communicate well to put
time and effort into finding the party with the error.
So far, tests have shown a number of subtle errors, such as timing
problems, that have taken many days to find, prove, and fix.
<span class="h4"><a class="selflink" id="appendix-D.4.8" href="#appendix-D.4.8">D.4.8</a>. Growth</span>
Primary Rate Access
If a user decides to plan for growth from the beginning, then the
Primary Rate Access has apparent financial benefits. Such
apparent savings are usually lost due to the increased cost of
user hardware to support such an interface. The BRI for data
usage is very common and cards/adapters are low in cost, whereas
the PRI cards/adapters are few and far between and consequently
highly priced.
Basic Rate Access
One way to grow with ISDN is to buy multiple BRI lines, increasing
slowly in units of 2 x B channels. The PTTs will be able to
provide the same subscriber number for all the lines provided in a
similar way to the traditional hunting group associated with PSTN
type working.
<span class="grey">Friend Informational [Page 130]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-131" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
<span class="h4"><a class="selflink" id="appendix-D.4.9" href="#appendix-D.4.9">D.4.9</a>. Performance</span>
The obvious benefit of ISDN is speed; unfortunately, the majority
of computer systems in use today have a finite amount of computing
power available. The attachment of multiple active high-speed
communication lines used in file transfer mode could take a
significant amount of CPU resource to the detriment of other users
on the system.
Connecting an ISDN line with the default 2 B channels to your
computer using an X.21 interface is going to give a consistent 64
Kb throughput only if one of the B channels is active at any one
time.
If there are two 64 Kb channels active and contending for a single
64 Kb X.21 interface, then effective throughput will be reduced
significantly to just over 50%.
Mainframe issues:
Users with a mainframe front-end are also going to find cost an
issue. The scanners that scan the communications interfaces are
based upon aggregate throughput. A 64 Kb interface takes up a lot
of cycles.
Determining 'DTE' or 'DCE' Characteristics
The following section is an extract from the ISO/IEC 8208
(International Standards Organization, International
Electrotechnical Commission) (1990-03-15) standard, which is an
ISO extension of the CCITT X.25 standard.
The restart procedure can be used to determine whether the DTE
acts as a DCE or maintains its role as a DTE with respect to the
logical channel selection during Virtual Call establishment and
resolution of Virtual Call collision.
When prepared to initialise the Packet Layer, the DTE shall
initiate the restart procedure (i.e., transmit a RESTART REQUEST
packet). The determination is based on the response received from
the data exchange equipment (DXE) as outlined below.
a) If the DTE receives a RESTART INDICATION packet with a
restarting cause code that is not 'DTE Originated' (i.e., it
came from a DCE), then the DTE shall maintain its role as a DTE.
<span class="grey">Friend Informational [Page 131]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-132" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
b) If the DTE receives a RESTART INDICATION packet with a
restarting cause code of 'DTE Originated' (i.e., it came from
another DTE), then the DTE shall confirm the restart and act as
a DCE.
c) If the DTE receives a RESTART INDICATION packet with a
restarting cause code of 'DTE Originated' (i.e., it came from
another DTE) and it does not have an unconfirmed RESTART REQUEST
packet outstanding (i.e., a restart collision), then the DTE
shall consider this restart procedure completed but shall take
no further action except to transmit another RESTART REQUEST
packet after some randomly chosen time delay.
d) If the DTE issues a RESTART REQUEST packet that is subsequently
confirmed with a RESTART CONFIRMATION packet, then the DTE shall
maintain its role as a DTE.
Acknowledgements
This document draws extensively on revision 1.4 of the ODETTE File
Transfer Specification [<a href="#ref-OFTP" title="Revision 1.4">OFTP</a>].
Many people have contributed to the development of this protocol and
their work is hereby acknowledged.
Normative References
[<a id="ref-CMS-Compression">CMS-Compression</a>]
Gutmann, P., "Compressed Data Content Type for
Cryptographic Message Syntax (CMS)", <a href="./rfc3274">RFC 3274</a>, June 2002.
[<a id="ref-CMS">CMS</a>] Housley, R., "Cryptographic Message Syntax (CMS)", <a href="./rfc3852">RFC</a>
<a href="./rfc3852">3852</a>, July 2004.
[<a id="ref-ISO-646">ISO-646</a>] International Organisation for Standardisation, ISO
Standard 646:1991, "Information technology -- ISO 7-bit
coded character set for information interchange", 1991.
[PKCS#1] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", <a href="./rfc3447">RFC 3447</a>, February 2003.
[<a id="ref-TLS">TLS</a>] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.1", <a href="./rfc4346">RFC 4346</a>, April 2006.
[<a id="ref-UTF-8">UTF-8</a>] Yergeau, F., "UTF-8, A Transformation Format of ISO
10646", STD 63, <a href="./rfc3629">RFC 3629</a>, November 2003.
<span class="grey">Friend Informational [Page 132]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-133" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
[<a id="ref-ZLIB">ZLIB</a>] Deutsch, P. and J-L. Gailly, "ZLIB Compressed Data Format
Specification version 3.3", <a href="./rfc1950">RFC 1950</a>, May 1996.
Informative References
[<a id="ref-ISO-6523">ISO-6523</a>] International Organisation for Standardisation, ISO
Standard 6523:1984, "Data interchange -- Structures for
the identification of organisations", 1984.
[<a id="ref-OFTP">OFTP</a>] Organisation for Data Exchange by Tele Transmission in
Europe, Odette File Transfer Protocol, Revision 1.4, April
2000.
[<a id="ref-FTP">FTP</a>] Postel, J. and J. Reynolds, "File Transfer Protocol", STD
9, <a href="./rfc959">RFC 959</a>, October 1985.
[<a id="ref-RFC793">RFC793</a>] Postel, J., "Transmission Control Protocol", STD 7, <a href="./rfc793">RFC</a>
<a href="./rfc793">793</a>, September 1981.
[<a id="ref-RIME">RIME</a>] Coleridge, Samuel Taylor, "The Rime of the Ancient
Mariner", 1817.
[<a id="ref-X.509">X.509</a>] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet
X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile", <a href="./rfc3280">RFC 3280</a>,
April 2002.
[<a id="ref-RFC3850">RFC3850</a>] Ramsdell, B., "Secure/Multipurpose Internet Mail
Extensions (S/MIME) Version 3.1 Certificate Handling", <a href="./rfc3850">RFC</a>
<a href="./rfc3850">3850</a>, July 2004.
<span class="grey">Friend Informational [Page 133]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-134" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
ODETTE Address
The ODETTE File Transfer Protocol is a product of the Technology
Committee of Odette International. The Technology Committee can be
contacted via the ODETTE Central Office:
ODETTE INTERNATIONAL Limited
Forbes House
Halkin Street
London
SW1X 7DS
United Kingdom
Phone: +44 (0)171 344 9227
Fax: +44 (0)171 235 7112
EMail: info@odette.org
URL: <a href="http://www.odette.org">http://www.odette.org</a>
Author's Address
Ieuan Friend
Data Interchange Plc
Rhys House
The Minerva Business Park
Lynchwood
Peterborough
PE2 6FT
United Kingdom
Phone: +44 (0)1733 371 311
EMail: ieuan.friend@dip.co.uk
<span class="grey">Friend Informational [Page 134]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-135" ></span>
<span class="grey"><a href="./rfc5024">RFC 5024</a> ODETTE FTP 2 November 2007</span>
Full Copyright Statement
Copyright (C) The IETF Trust (2007).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and at www.rfc-editor.org/copyright.html, and
except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Friend Informational [Page 135]
</pre>
|