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
|
<!DOCTYPE html>
<html lang="en" class="RFC">
<head>
<meta charset="utf-8">
<meta content="Common,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>RFC 9174: Delay-Tolerant Networking TCP Convergence-Layer Protocol Version 4</title>
<meta content="Brian Sipos" name="author">
<meta content="Michael Demmer" name="author">
<meta content="Jörg Ott" name="author">
<meta content="Simon Perreault" name="author">
<meta content="
This document describes a TCP convergence layer (TCPCL) for Delay-Tolerant Networking (DTN). This version of the TCPCL protocol resolves implementation issues in the earlier TCPCL version 3 as defined in RFC 7242 and provides updates to the Bundle Protocol (BP) contents, encodings, and convergence-layer requirements in BP version 7 (BPv7). Specifically, TCPCLv4 uses BPv7 bundles encoded by the Concise Binary Object Representation (CBOR) as its service data unit being transported and provides a reliable transport of such bundles.
This TCPCL version also includes security and extensibility mechanisms.
" name="description">
<meta content="xml2rfc 3.12.0" name="generator">
<meta content="DTN" name="keyword">
<meta content="TCP" name="keyword">
<meta content="TLS" name="keyword">
<meta content="PKIX" name="keyword">
<meta content="9174" name="rfc.number">
<!-- Generator version information:
xml2rfc 3.12.0
Python 3.6.15
appdirs 1.4.4
ConfigArgParse 1.4.1
google-i18n-address 2.4.0
html5lib 1.0.1
intervaltree 3.0.2
Jinja2 2.11.3
kitchen 1.2.6
lxml 4.4.2
pycairo 1.15.1
pycountry 19.8.18
pyflakes 2.1.1
PyYAML 5.4.1
requests 2.24.0
setuptools 40.5.0
six 1.14.0
WeasyPrint 52.5
-->
<link href="rfc9174.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<style type="text/css">/*
NOTE: Changes at the bottom of this file overrides some earlier settings.
Once the style has stabilized and has been adopted as an official RFC style,
this can be consolidated so that style settings occur only in one place, but
for now the contents of this file consists first of the initial CSS work as
provided to the RFC Formatter (xml2rfc) work, followed by itemized and
commented changes found necssary during the development of the v3
formatters.
*/
/* fonts */
@import url('https://fonts.googleapis.com/css?family=Noto+Sans'); /* Sans-serif */
@import url('https://fonts.googleapis.com/css?family=Noto+Serif'); /* Serif (print) */
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); /* Monospace */
@viewport {
zoom: 1.0;
width: extend-to-zoom;
}
@-ms-viewport {
width: extend-to-zoom;
zoom: 1.0;
}
/* general and mobile first */
html {
}
body {
max-width: 90%;
margin: 1.5em auto;
color: #222;
background-color: #fff;
font-size: 14px;
font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
line-height: 1.6;
scroll-behavior: smooth;
}
.ears {
display: none;
}
/* headings */
#title, h1, h2, h3, h4, h5, h6 {
margin: 1em 0 0.5em;
font-weight: bold;
line-height: 1.3;
}
#title {
clear: both;
border-bottom: 1px solid #ddd;
margin: 0 0 0.5em 0;
padding: 1em 0 0.5em;
}
.author {
padding-bottom: 4px;
}
h1 {
font-size: 26px;
margin: 1em 0;
}
h2 {
font-size: 22px;
margin-top: -20px; /* provide offset for in-page anchors */
padding-top: 33px;
}
h3 {
font-size: 18px;
margin-top: -36px; /* provide offset for in-page anchors */
padding-top: 42px;
}
h4 {
font-size: 16px;
margin-top: -36px; /* provide offset for in-page anchors */
padding-top: 42px;
}
h5, h6 {
font-size: 14px;
}
#n-copyright-notice {
border-bottom: 1px solid #ddd;
padding-bottom: 1em;
margin-bottom: 1em;
}
/* general structure */
p {
padding: 0;
margin: 0 0 1em 0;
text-align: left;
}
div, span {
position: relative;
}
div {
margin: 0;
}
.alignRight.art-text {
background-color: #f9f9f9;
border: 1px solid #eee;
border-radius: 3px;
padding: 1em 1em 0;
margin-bottom: 1.5em;
}
.alignRight.art-text pre {
padding: 0;
}
.alignRight {
margin: 1em 0;
}
.alignRight > *:first-child {
border: none;
margin: 0;
float: right;
clear: both;
}
.alignRight > *:nth-child(2) {
clear: both;
display: block;
border: none;
}
svg {
display: block;
}
.alignCenter.art-text {
background-color: #f9f9f9;
border: 1px solid #eee;
border-radius: 3px;
padding: 1em 1em 0;
margin-bottom: 1.5em;
}
.alignCenter.art-text pre {
padding: 0;
}
.alignCenter {
margin: 1em 0;
}
.alignCenter > *:first-child {
border: none;
/* this isn't optimal, but it's an existence proof. PrinceXML doesn't
support flexbox yet.
*/
display: table;
margin: 0 auto;
}
/* lists */
ol, ul {
padding: 0;
margin: 0 0 1em 2em;
}
ol ol, ul ul, ol ul, ul ol {
margin-left: 1em;
}
li {
margin: 0 0 0.25em 0;
}
.ulCompact li {
margin: 0;
}
ul.empty, .ulEmpty {
list-style-type: none;
}
ul.empty li, .ulEmpty li {
margin-top: 0.5em;
}
ul.ulBare, li.ulBare {
margin-left: 0em !important;
}
ul.compact, .ulCompact,
ol.compact, .olCompact {
line-height: 100%;
margin: 0 0 0 2em;
}
/* definition lists */
dl {
}
dl > dt {
float: left;
margin-right: 1em;
}
/*
dl.nohang > dt {
float: none;
}
*/
dl > dd {
margin-bottom: .8em;
min-height: 1.3em;
}
dl.compact > dd, .dlCompact > dd {
margin-bottom: 0em;
}
dl > dd > dl {
margin-top: 0.5em;
margin-bottom: 0em;
}
/* links */
a {
text-decoration: none;
}
a[href] {
color: #22e; /* Arlen: WCAG 2019 */
}
a[href]:hover {
background-color: #f2f2f2;
}
figcaption a[href],
a[href].selfRef {
color: #222;
}
/* XXX probably not this:
a.selfRef:hover {
background-color: transparent;
cursor: default;
} */
/* Figures */
tt, code, pre, code {
background-color: #f9f9f9;
font-family: 'Roboto Mono', monospace;
}
pre {
border: 1px solid #eee;
margin: 0;
padding: 1em;
}
img {
max-width: 100%;
}
figure {
margin: 0;
}
figure blockquote {
margin: 0.8em 0.4em 0.4em;
}
figcaption {
font-style: italic;
margin: 0 0 1em 0;
}
@media screen {
pre {
overflow-x: auto;
max-width: 100%;
max-width: calc(100% - 22px);
}
}
/* aside, blockquote */
aside, blockquote {
margin-left: 0;
padding: 1.2em 2em;
}
blockquote {
background-color: #f9f9f9;
color: #111; /* Arlen: WCAG 2019 */
border: 1px solid #ddd;
border-radius: 3px;
margin: 1em 0;
}
cite {
display: block;
text-align: right;
font-style: italic;
}
/* tables */
table {
width: 100%;
margin: 0 0 1em;
border-collapse: collapse;
border: 1px solid #eee;
}
th, td {
text-align: left;
vertical-align: top;
padding: 0.5em 0.75em;
}
th {
text-align: left;
background-color: #e9e9e9;
}
tr:nth-child(2n+1) > td {
background-color: #f5f5f5;
}
table caption {
font-style: italic;
margin: 0;
padding: 0;
text-align: left;
}
table p {
/* XXX to avoid bottom margin on table row signifiers. If paragraphs should
be allowed within tables more generally, it would be far better to select on a class. */
margin: 0;
}
/* pilcrow */
a.pilcrow {
color: #666; /* Arlen: AHDJ 2019 */
text-decoration: none;
visibility: hidden;
user-select: none;
-ms-user-select: none;
-o-user-select:none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}
@media screen {
aside:hover > a.pilcrow,
p:hover > a.pilcrow,
blockquote:hover > a.pilcrow,
div:hover > a.pilcrow,
li:hover > a.pilcrow,
pre:hover > a.pilcrow {
visibility: visible;
}
a.pilcrow:hover {
background-color: transparent;
}
}
/* misc */
hr {
border: 0;
border-top: 1px solid #eee;
}
.bcp14 {
font-variant: small-caps;
}
.role {
font-variant: all-small-caps;
}
/* info block */
#identifiers {
margin: 0;
font-size: 0.9em;
}
#identifiers dt {
width: 3em;
clear: left;
}
#identifiers dd {
float: left;
margin-bottom: 0;
}
/* Fix PDF info block run off issue */
@media print {
#identifiers dd {
float: none;
}
}
#identifiers .authors .author {
display: inline-block;
margin-right: 1.5em;
}
#identifiers .authors .org {
font-style: italic;
}
/* The prepared/rendered info at the very bottom of the page */
.docInfo {
color: #666; /* Arlen: WCAG 2019 */
font-size: 0.9em;
font-style: italic;
margin-top: 2em;
}
.docInfo .prepared {
float: left;
}
.docInfo .prepared {
float: right;
}
/* table of contents */
#toc {
padding: 0.75em 0 2em 0;
margin-bottom: 1em;
}
nav.toc ul {
margin: 0 0.5em 0 0;
padding: 0;
list-style: none;
}
nav.toc li {
line-height: 1.3em;
margin: 0.75em 0;
padding-left: 1.2em;
text-indent: -1.2em;
}
/* references */
.references dt {
text-align: right;
font-weight: bold;
min-width: 7em;
}
.references dd {
margin-left: 8em;
overflow: auto;
}
.refInstance {
margin-bottom: 1.25em;
}
.references .ascii {
margin-bottom: 0.25em;
}
/* index */
.index ul {
margin: 0 0 0 1em;
padding: 0;
list-style: none;
}
.index ul ul {
margin: 0;
}
.index li {
margin: 0;
text-indent: -2em;
padding-left: 2em;
padding-bottom: 5px;
}
.indexIndex {
margin: 0.5em 0 1em;
}
.index a {
font-weight: 700;
}
/* make the index two-column on all but the smallest screens */
@media (min-width: 600px) {
.index ul {
-moz-column-count: 2;
-moz-column-gap: 20px;
}
.index ul ul {
-moz-column-count: 1;
-moz-column-gap: 0;
}
}
/* authors */
address.vcard {
font-style: normal;
margin: 1em 0;
}
address.vcard .nameRole {
font-weight: 700;
margin-left: 0;
}
address.vcard .label {
font-family: "Noto Sans",Arial,Helvetica,sans-serif;
margin: 0.5em 0;
}
address.vcard .type {
display: none;
}
.alternative-contact {
margin: 1.5em 0 1em;
}
hr.addr {
border-top: 1px dashed;
margin: 0;
color: #ddd;
max-width: calc(100% - 16px);
}
/* temporary notes */
.rfcEditorRemove::before {
position: absolute;
top: 0.2em;
right: 0.2em;
padding: 0.2em;
content: "The RFC Editor will remove this note";
color: #9e2a00; /* Arlen: WCAG 2019 */
background-color: #ffd; /* Arlen: WCAG 2019 */
}
.rfcEditorRemove {
position: relative;
padding-top: 1.8em;
background-color: #ffd; /* Arlen: WCAG 2019 */
border-radius: 3px;
}
.cref {
background-color: #ffd; /* Arlen: WCAG 2019 */
padding: 2px 4px;
}
.crefSource {
font-style: italic;
}
/* alternative layout for smaller screens */
@media screen and (max-width: 1023px) {
body {
padding-top: 2em;
}
#title {
padding: 1em 0;
}
h1 {
font-size: 24px;
}
h2 {
font-size: 20px;
margin-top: -18px; /* provide offset for in-page anchors */
padding-top: 38px;
}
#identifiers dd {
max-width: 60%;
}
#toc {
position: fixed;
z-index: 2;
top: 0;
right: 0;
padding: 0;
margin: 0;
background-color: inherit;
border-bottom: 1px solid #ccc;
}
#toc h2 {
margin: -1px 0 0 0;
padding: 4px 0 4px 6px;
padding-right: 1em;
min-width: 190px;
font-size: 1.1em;
text-align: right;
background-color: #444;
color: white;
cursor: pointer;
}
#toc h2::before { /* css hamburger */
float: right;
position: relative;
width: 1em;
height: 1px;
left: -164px;
margin: 6px 0 0 0;
background: white none repeat scroll 0 0;
box-shadow: 0 4px 0 0 white, 0 8px 0 0 white;
content: "";
}
#toc nav {
display: none;
padding: 0.5em 1em 1em;
overflow: auto;
height: calc(100vh - 48px);
border-left: 1px solid #ddd;
}
}
/* alternative layout for wide screens */
@media screen and (min-width: 1024px) {
body {
max-width: 724px;
margin: 42px auto;
padding-left: 1.5em;
padding-right: 29em;
}
#toc {
position: fixed;
top: 42px;
right: 42px;
width: 25%;
margin: 0;
padding: 0 1em;
z-index: 1;
}
#toc h2 {
border-top: none;
border-bottom: 1px solid #ddd;
font-size: 1em;
font-weight: normal;
margin: 0;
padding: 0.25em 1em 1em 0;
}
#toc nav {
display: block;
height: calc(90vh - 84px);
bottom: 0;
padding: 0.5em 0 0;
overflow: auto;
}
img { /* future proofing */
max-width: 100%;
height: auto;
}
}
/* pagination */
@media print {
body {
width: 100%;
}
p {
orphans: 3;
widows: 3;
}
#n-copyright-notice {
border-bottom: none;
}
#toc, #n-introduction {
page-break-before: always;
}
#toc {
border-top: none;
padding-top: 0;
}
figure, pre {
page-break-inside: avoid;
}
figure {
overflow: scroll;
}
h1, h2, h3, h4, h5, h6 {
page-break-after: avoid;
}
h2+*, h3+*, h4+*, h5+*, h6+* {
page-break-before: avoid;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
font-size: 10pt;
}
table {
border: 1px solid #ddd;
}
td {
border-top: 1px solid #ddd;
}
}
/* This is commented out here, as the string-set: doesn't
pass W3C validation currently */
/*
.ears thead .left {
string-set: ears-top-left content();
}
.ears thead .center {
string-set: ears-top-center content();
}
.ears thead .right {
string-set: ears-top-right content();
}
.ears tfoot .left {
string-set: ears-bottom-left content();
}
.ears tfoot .center {
string-set: ears-bottom-center content();
}
.ears tfoot .right {
string-set: ears-bottom-right content();
}
*/
@page :first {
padding-top: 0;
@top-left {
content: normal;
border: none;
}
@top-center {
content: normal;
border: none;
}
@top-right {
content: normal;
border: none;
}
}
@page {
size: A4;
margin-bottom: 45mm;
padding-top: 20px;
/* The follwing is commented out here, but set appropriately by in code, as
the content depends on the document */
/*
@top-left {
content: 'Internet-Draft';
vertical-align: bottom;
border-bottom: solid 1px #ccc;
}
@top-left {
content: string(ears-top-left);
vertical-align: bottom;
border-bottom: solid 1px #ccc;
}
@top-center {
content: string(ears-top-center);
vertical-align: bottom;
border-bottom: solid 1px #ccc;
}
@top-right {
content: string(ears-top-right);
vertical-align: bottom;
border-bottom: solid 1px #ccc;
}
@bottom-left {
content: string(ears-bottom-left);
vertical-align: top;
border-top: solid 1px #ccc;
}
@bottom-center {
content: string(ears-bottom-center);
vertical-align: top;
border-top: solid 1px #ccc;
}
@bottom-right {
content: '[Page ' counter(page) ']';
vertical-align: top;
border-top: solid 1px #ccc;
}
*/
}
/* Changes introduced to fix issues found during implementation */
/* Make sure links are clickable even if overlapped by following H* */
a {
z-index: 2;
}
/* Separate body from document info even without intervening H1 */
section {
clear: both;
}
/* Top align author divs, to avoid names without organization dropping level with org names */
.author {
vertical-align: top;
}
/* Leave room in document info to show Internet-Draft on one line */
#identifiers dt {
width: 8em;
}
/* Don't waste quite as much whitespace between label and value in doc info */
#identifiers dd {
margin-left: 1em;
}
/* Give floating toc a background color (needed when it's a div inside section */
#toc {
background-color: white;
}
/* Make the collapsed ToC header render white on gray also when it's a link */
@media screen and (max-width: 1023px) {
#toc h2 a,
#toc h2 a:link,
#toc h2 a:focus,
#toc h2 a:hover,
#toc a.toplink,
#toc a.toplink:hover {
color: white;
background-color: #444;
text-decoration: none;
}
}
/* Give the bottom of the ToC some whitespace */
@media screen and (min-width: 1024px) {
#toc {
padding: 0 0 1em 1em;
}
}
/* Style section numbers with more space between number and title */
.section-number {
padding-right: 0.5em;
}
/* prevent monospace from becoming overly large */
tt, code, pre, code {
font-size: 95%;
}
/* Fix the height/width aspect for ascii art*/
pre.sourcecode,
.art-text pre {
line-height: 1.12;
}
/* Add styling for a link in the ToC that points to the top of the document */
a.toplink {
float: right;
margin-right: 0.5em;
}
/* Fix the dl styling to match the RFC 7992 attributes */
dl > dt,
dl.dlParallel > dt {
float: left;
margin-right: 1em;
}
dl.dlNewline > dt {
float: none;
}
/* Provide styling for table cell text alignment */
table td.text-left,
table th.text-left {
text-align: left;
}
table td.text-center,
table th.text-center {
text-align: center;
}
table td.text-right,
table th.text-right {
text-align: right;
}
/* Make the alternative author contact informatio look less like just another
author, and group it closer with the primary author contact information */
.alternative-contact {
margin: 0.5em 0 0.25em 0;
}
address .non-ascii {
margin: 0 0 0 2em;
}
/* With it being possible to set tables with alignment
left, center, and right, { width: 100%; } does not make sense */
table {
width: auto;
}
/* Avoid reference text that sits in a block with very wide left margin,
because of a long floating dt label.*/
.references dd {
overflow: visible;
}
/* Control caption placement */
caption {
caption-side: bottom;
}
/* Limit the width of the author address vcard, so names in right-to-left
script don't end up on the other side of the page. */
address.vcard {
max-width: 30em;
margin-right: auto;
}
/* For address alignment dependent on LTR or RTL scripts */
address div.left {
text-align: left;
}
address div.right {
text-align: right;
}
/* Provide table alignment support. We can't use the alignX classes above
since they do unwanted things with caption and other styling. */
table.right {
margin-left: auto;
margin-right: 0;
}
table.center {
margin-left: auto;
margin-right: auto;
}
table.left {
margin-left: 0;
margin-right: auto;
}
/* Give the table caption label the same styling as the figcaption */
caption a[href] {
color: #222;
}
@media print {
.toplink {
display: none;
}
/* avoid overwriting the top border line with the ToC header */
#toc {
padding-top: 1px;
}
/* Avoid page breaks inside dl and author address entries */
.vcard {
page-break-inside: avoid;
}
}
/* Tweak the bcp14 keyword presentation */
.bcp14 {
font-variant: small-caps;
font-weight: bold;
font-size: 0.9em;
}
/* Tweak the invisible space above H* in order not to overlay links in text above */
h2 {
margin-top: -18px; /* provide offset for in-page anchors */
padding-top: 31px;
}
h3 {
margin-top: -18px; /* provide offset for in-page anchors */
padding-top: 24px;
}
h4 {
margin-top: -18px; /* provide offset for in-page anchors */
padding-top: 24px;
}
/* Float artwork pilcrow to the right */
@media screen {
.artwork a.pilcrow {
display: block;
line-height: 0.7;
margin-top: 0.15em;
}
}
/* Make pilcrows on dd visible */
@media screen {
dd:hover > a.pilcrow {
visibility: visible;
}
}
/* Make the placement of figcaption match that of a table's caption
by removing the figure's added bottom margin */
.alignLeft.art-text,
.alignCenter.art-text,
.alignRight.art-text {
margin-bottom: 0;
}
.alignLeft,
.alignCenter,
.alignRight {
margin: 1em 0 0 0;
}
/* In print, the pilcrow won't show on hover, so prevent it from taking up space,
possibly even requiring a new line */
@media print {
a.pilcrow {
display: none;
}
}
/* Styling for the external metadata */
div#external-metadata {
background-color: #eee;
padding: 0.5em;
margin-bottom: 0.5em;
display: none;
}
div#internal-metadata {
padding: 0.5em; /* to match the external-metadata padding */
}
/* Styling for title RFC Number */
h1#rfcnum {
clear: both;
margin: 0 0 -1em;
padding: 1em 0 0 0;
}
/* Make .olPercent look the same as <ol><li> */
dl.olPercent > dd {
margin-bottom: 0.25em;
min-height: initial;
}
/* Give aside some styling to set it apart */
aside {
border-left: 1px solid #ddd;
margin: 1em 0 1em 2em;
padding: 0.2em 2em;
}
aside > dl,
aside > ol,
aside > ul,
aside > table,
aside > p {
margin-bottom: 0.5em;
}
/* Additional page break settings */
@media print {
figcaption, table caption {
page-break-before: avoid;
}
}
/* Font size adjustments for print */
@media print {
body { font-size: 10pt; line-height: normal; max-width: 96%; }
h1 { font-size: 1.72em; padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */
h2 { font-size: 1.44em; padding-top: 1.5em; } /* 1*1.2*1.2 */
h3 { font-size: 1.2em; padding-top: 1.5em; } /* 1*1.2 */
h4 { font-size: 1em; padding-top: 1.5em; }
h5, h6 { font-size: 1em; margin: initial; padding: 0.5em 0 0.3em; }
}
/* Sourcecode margin in print, when there's no pilcrow */
@media print {
.artwork,
.sourcecode {
margin-bottom: 1em;
}
}
/* Avoid narrow tables forcing too narrow table captions, which may render badly */
table {
min-width: 20em;
}
/* ol type a */
ol.type-a { list-style-type: lower-alpha; }
ol.type-A { list-style-type: upper-alpha; }
ol.type-i { list-style-type: lower-roman; }
ol.type-I { list-style-type: lower-roman; }
/* Apply the print table and row borders in general, on request from the RPC,
and increase the contrast between border and odd row background sligthtly */
table {
border: 1px solid #ddd;
}
td {
border-top: 1px solid #ddd;
}
tr:nth-child(2n+1) > td {
background-color: #f8f8f8;
}
/* Use style rules to govern display of the TOC. */
@media screen and (max-width: 1023px) {
#toc nav { display: none; }
#toc.active nav { display: block; }
}
/* Add support for keepWithNext */
.keepWithNext {
break-after: avoid-page;
break-after: avoid-page;
}
/* Add support for keepWithPrevious */
.keepWithPrevious {
break-before: avoid-page;
}
/* Change the approach to avoiding breaks inside artwork etc. */
figure, pre, table, .artwork, .sourcecode {
break-before: auto;
break-after: auto;
}
/* Avoid breaks between <dt> and <dd> */
dl {
break-before: auto;
break-inside: auto;
}
dt {
break-before: auto;
break-after: avoid-page;
}
dd {
break-before: avoid-page;
break-after: auto;
orphans: 3;
widows: 3
}
span.break, dd.break {
margin-bottom: 0;
min-height: 0;
break-before: auto;
break-inside: auto;
break-after: auto;
}
/* Undo break-before ToC */
@media print {
#toc {
break-before: auto;
}
}
/* Text in compact lists should not get extra bottim margin space,
since that would makes the list not compact */
ul.compact p, .ulCompact p,
ol.compact p, .olCompact p {
margin: 0;
}
/* But the list as a whole needs the extra space at the end */
section ul.compact,
section .ulCompact,
section ol.compact,
section .olCompact {
margin-bottom: 1em; /* same as p not within ul.compact etc. */
}
/* The tt and code background above interferes with for instance table cell
backgrounds. Changed to something a bit more selective. */
tt, code {
background-color: transparent;
}
p tt, p code, li tt, li code {
background-color: #f8f8f8;
}
/* Tweak the pre margin -- 0px doesn't come out well */
pre {
margin-top: 0.5px;
}
/* Tweak the comact list text */
ul.compact, .ulCompact,
ol.compact, .olCompact,
dl.compact, .dlCompact {
line-height: normal;
}
/* Don't add top margin for nested lists */
li > ul, li > ol, li > dl,
dd > ul, dd > ol, dd > dl,
dl > dd > dl {
margin-top: initial;
}
/* Elements that should not be rendered on the same line as a <dt> */
/* This should match the element list in writer.text.TextWriter.render_dl() */
dd > div.artwork:first-child,
dd > aside:first-child,
dd > figure:first-child,
dd > ol:first-child,
dd > div:first-child > pre.sourcecode,
dd > table:first-child,
dd > ul:first-child {
clear: left;
}
/* fix for weird browser behaviour when <dd/> is empty */
dt+dd:empty::before{
content: "\00a0";
}
/* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */
li > p {
margin-bottom: 0.5em
}
/* Don't let p margin spill out from inside list items */
li > p:last-of-type {
margin-bottom: 0;
}
</style>
<link href="rfc-local.css" rel="stylesheet" type="text/css">
<link href="https://dx.doi.org/10.17487/rfc9174" rel="alternate">
<link href="urn:issn:2070-1721" rel="alternate">
<link href="https://datatracker.ietf.org/doc/draft-ietf-dtn-tcpclv4-26" rel="prev">
</head>
<body>
<script src="https://www.rfc-editor.org/js/metadata.min.js"></script>
<table class="ears">
<thead><tr>
<td class="left">RFC 9174</td>
<td class="center">DTN TCPCLv4</td>
<td class="right">January 2022</td>
</tr></thead>
<tfoot><tr>
<td class="left">Sipos, et al.</td>
<td class="center">Standards Track</td>
<td class="right">[Page]</td>
</tr></tfoot>
</table>
<div id="external-metadata" class="document-information"></div>
<div id="internal-metadata" class="document-information">
<dl id="identifiers">
<dt class="label-stream">Stream:</dt>
<dd class="stream">Internet Engineering Task Force (IETF)</dd>
<dt class="label-rfc">RFC:</dt>
<dd class="rfc"><a href="https://www.rfc-editor.org/rfc/rfc9174" class="eref">9174</a></dd>
<dt class="label-category">Category:</dt>
<dd class="category">Standards Track</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2022-01" class="published">January 2022</time>
</dd>
<dt class="label-issn">ISSN:</dt>
<dd class="issn">2070-1721</dd>
<dt class="label-authors">Authors:</dt>
<dd class="authors">
<div class="author">
<div class="author-name">B. Sipos</div>
<div class="org">RKF Engineering</div>
</div>
<div class="author">
<div class="author-name">M. Demmer</div>
</div>
<div class="author">
<div class="author-name">J. Ott</div>
<div class="org">Technical University of Munich</div>
</div>
<div class="author">
<div class="author-name">S. Perreault</div>
<div class="org">LogMeIn</div>
</div>
</dd>
</dl>
</div>
<h1 id="rfcnum">RFC 9174</h1>
<h1 id="title">Delay-Tolerant Networking TCP Convergence-Layer Protocol Version 4</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
This document describes a TCP convergence layer (TCPCL) for Delay-Tolerant Networking (DTN). This version of the TCPCL protocol resolves implementation issues in the earlier TCPCL version 3 as defined in RFC 7242 and provides updates to the Bundle Protocol (BP) contents, encodings, and convergence-layer requirements in BP version 7 (BPv7). Specifically, TCPCLv4 uses BPv7 bundles encoded by the Concise Binary Object Representation (CBOR) as its service data unit being transported and provides a reliable transport of such bundles.
This TCPCL version also includes security and extensibility mechanisms.<a href="#section-abstract-1" class="pilcrow">¶</a></p>
</section>
<div id="status-of-memo">
<section id="section-boilerplate.1">
<h2 id="name-status-of-this-memo">
<a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a>
</h2>
<p id="section-boilerplate.1-1">
This is an Internet Standards Track document.<a href="#section-boilerplate.1-1" class="pilcrow">¶</a></p>
<p id="section-boilerplate.1-2">
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 7841.<a href="#section-boilerplate.1-2" class="pilcrow">¶</a></p>
<p id="section-boilerplate.1-3">
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
<span><a href="https://www.rfc-editor.org/info/rfc9174">https://www.rfc-editor.org/info/rfc9174</a></span>.<a href="#section-boilerplate.1-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="copyright">
<section id="section-boilerplate.2">
<h2 id="name-copyright-notice">
<a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a>
</h2>
<p id="section-boilerplate.2-1">
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow">¶</a></p>
<p id="section-boilerplate.2-2">
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Revised BSD License.<a href="#section-boilerplate.2-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="toc">
<section id="section-toc.1">
<a href="#" onclick="scroll(0,0)" class="toplink">▲</a><h2 id="name-table-of-contents">
<a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a>
</h2>
<nav class="toc"><ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1">
<p id="section-toc.1-1.1.1" class="keepWithNext"><a href="#section-1" class="xref">1</a>. <a href="#name-introduction" class="xref">Introduction</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.1">
<p id="section-toc.1-1.1.2.1.1" class="keepWithNext"><a href="#section-1.1" class="xref">1.1</a>. <a href="#name-scope" class="xref">Scope</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2">
<p id="section-toc.1-1.2.1"><a href="#section-2" class="xref">2</a>. <a href="#name-requirements-language" class="xref">Requirements Language</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1">
<p id="section-toc.1-1.2.2.1.1" class="keepWithNext"><a href="#section-2.1" class="xref">2.1</a>. <a href="#name-definitions-specific-to-the" class="xref">Definitions Specific to the TCPCL Protocol</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3">
<p id="section-toc.1-1.3.1"><a href="#section-3" class="xref">3</a>. <a href="#name-general-protocol-descriptio" class="xref">General Protocol Description</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.1">
<p id="section-toc.1-1.3.2.1.1"><a href="#section-3.1" class="xref">3.1</a>. <a href="#name-convergence-layer-services" class="xref">Convergence-Layer Services</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2">
<p id="section-toc.1-1.3.2.2.1"><a href="#section-3.2" class="xref">3.2</a>. <a href="#name-tcpcl-session-overview" class="xref">TCPCL Session Overview</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.3">
<p id="section-toc.1-1.3.2.3.1"><a href="#section-3.3" class="xref">3.3</a>. <a href="#name-tcpcl-states-and-transition" class="xref">TCPCL States and Transitions</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.4">
<p id="section-toc.1-1.3.2.4.1"><a href="#section-3.4" class="xref">3.4</a>. <a href="#name-pkix-environments-and-ca-po" class="xref">PKIX Environments and CA Policy</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.5">
<p id="section-toc.1-1.3.2.5.1"><a href="#section-3.5" class="xref">3.5</a>. <a href="#name-session-keeping-policies" class="xref">Session-Keeping Policies</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.6">
<p id="section-toc.1-1.3.2.6.1"><a href="#section-3.6" class="xref">3.6</a>. <a href="#name-transfer-segmentation-polic" class="xref">Transfer Segmentation Policies</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.7">
<p id="section-toc.1-1.3.2.7.1"><a href="#section-3.7" class="xref">3.7</a>. <a href="#name-example-message-exchange" class="xref">Example Message Exchange</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4">
<p id="section-toc.1-1.4.1"><a href="#section-4" class="xref">4</a>. <a href="#name-session-establishment" class="xref">Session Establishment</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1">
<p id="section-toc.1-1.4.2.1.1"><a href="#section-4.1" class="xref">4.1</a>. <a href="#name-tcp-connection" class="xref">TCP Connection</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.2">
<p id="section-toc.1-1.4.2.2.1"><a href="#section-4.2" class="xref">4.2</a>. <a href="#name-contact-header" class="xref">Contact Header</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3">
<p id="section-toc.1-1.4.2.3.1"><a href="#section-4.3" class="xref">4.3</a>. <a href="#name-contact-validation-and-nego" class="xref">Contact Validation and Negotiation</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4">
<p id="section-toc.1-1.4.2.4.1"><a href="#section-4.4" class="xref">4.4</a>. <a href="#name-session-security" class="xref">Session Security</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.1">
<p id="section-toc.1-1.4.2.4.2.1.1"><a href="#section-4.4.1" class="xref">4.4.1</a>. <a href="#name-entity-identification" class="xref">Entity Identification</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.2">
<p id="section-toc.1-1.4.2.4.2.2.1"><a href="#section-4.4.2" class="xref">4.4.2</a>. <a href="#name-certificate-profile-for-the" class="xref">Certificate Profile for the TCPCL</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.3">
<p id="section-toc.1-1.4.2.4.2.3.1"><a href="#section-4.4.3" class="xref">4.4.3</a>. <a href="#name-tls-handshake" class="xref">TLS Handshake</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.4">
<p id="section-toc.1-1.4.2.4.2.4.1"><a href="#section-4.4.4" class="xref">4.4.4</a>. <a href="#name-tls-authentication" class="xref">TLS Authentication</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.5">
<p id="section-toc.1-1.4.2.4.2.5.1"><a href="#section-4.4.5" class="xref">4.4.5</a>. <a href="#name-policy-recommendations" class="xref">Policy Recommendations</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.6">
<p id="section-toc.1-1.4.2.4.2.6.1"><a href="#section-4.4.6" class="xref">4.4.6</a>. <a href="#name-example-tls-initiation" class="xref">Example TLS Initiation</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5">
<p id="section-toc.1-1.4.2.5.1"><a href="#section-4.5" class="xref">4.5</a>. <a href="#name-message-header" class="xref">Message Header</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.6">
<p id="section-toc.1-1.4.2.6.1"><a href="#section-4.6" class="xref">4.6</a>. <a href="#name-session-initialization-mess" class="xref">Session Initialization Message (SESS_INIT)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.7">
<p id="section-toc.1-1.4.2.7.1"><a href="#section-4.7" class="xref">4.7</a>. <a href="#name-session-parameter-negotiati" class="xref">Session Parameter Negotiation</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.8">
<p id="section-toc.1-1.4.2.8.1"><a href="#section-4.8" class="xref">4.8</a>. <a href="#name-session-extension-items" class="xref">Session Extension Items</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5">
<p id="section-toc.1-1.5.1"><a href="#section-5" class="xref">5</a>. <a href="#name-established-session-operati" class="xref">Established Session Operation</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1">
<p id="section-toc.1-1.5.2.1.1"><a href="#section-5.1" class="xref">5.1</a>. <a href="#name-upkeep-and-status-messages" class="xref">Upkeep and Status Messages</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1.2.1">
<p id="section-toc.1-1.5.2.1.2.1.1"><a href="#section-5.1.1" class="xref">5.1.1</a>. <a href="#name-session-upkeep-keepalive" class="xref">Session Upkeep (KEEPALIVE)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1.2.2">
<p id="section-toc.1-1.5.2.1.2.2.1"><a href="#section-5.1.2" class="xref">5.1.2</a>. <a href="#name-message-rejection-msg_rejec" class="xref">Message Rejection (MSG_REJECT)</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2">
<p id="section-toc.1-1.5.2.2.1"><a href="#section-5.2" class="xref">5.2</a>. <a href="#name-bundle-transfer" class="xref">Bundle Transfer</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2.2.1">
<p id="section-toc.1-1.5.2.2.2.1.1"><a href="#section-5.2.1" class="xref">5.2.1</a>. <a href="#name-bundle-transfer-id" class="xref">Bundle Transfer ID</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2.2.2">
<p id="section-toc.1-1.5.2.2.2.2.1"><a href="#section-5.2.2" class="xref">5.2.2</a>. <a href="#name-data-transmission-xfer_segm" class="xref">Data Transmission (XFER_SEGMENT)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2.2.3">
<p id="section-toc.1-1.5.2.2.2.3.1"><a href="#section-5.2.3" class="xref">5.2.3</a>. <a href="#name-data-acknowledgments-xfer_a" class="xref">Data Acknowledgments (XFER_ACK)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2.2.4">
<p id="section-toc.1-1.5.2.2.2.4.1"><a href="#section-5.2.4" class="xref">5.2.4</a>. <a href="#name-transfer-refusal-xfer_refus" class="xref">Transfer Refusal (XFER_REFUSE)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2.2.5">
<p id="section-toc.1-1.5.2.2.2.5.1"><a href="#section-5.2.5" class="xref">5.2.5</a>. <a href="#name-transfer-extension-items" class="xref">Transfer Extension Items</a></p>
</li>
</ul>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6">
<p id="section-toc.1-1.6.1"><a href="#section-6" class="xref">6</a>. <a href="#name-session-termination" class="xref">Session Termination</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.1">
<p id="section-toc.1-1.6.2.1.1"><a href="#section-6.1" class="xref">6.1</a>. <a href="#name-session-termination-message" class="xref">Session Termination Message (SESS_TERM)</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.2">
<p id="section-toc.1-1.6.2.2.1"><a href="#section-6.2" class="xref">6.2</a>. <a href="#name-idle-session-termination" class="xref">Idle Session Termination</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7">
<p id="section-toc.1-1.7.1"><a href="#section-7" class="xref">7</a>. <a href="#name-security-considerations" class="xref">Security Considerations</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1">
<p id="section-toc.1-1.7.2.1.1"><a href="#section-7.1" class="xref">7.1</a>. <a href="#name-threat-passive-leak-of-node" class="xref">Threat: Passive Leak of Node Data</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.2">
<p id="section-toc.1-1.7.2.2.1"><a href="#section-7.2" class="xref">7.2</a>. <a href="#name-threat-passive-leak-of-bund" class="xref">Threat: Passive Leak of Bundle Data</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.3">
<p id="section-toc.1-1.7.2.3.1"><a href="#section-7.3" class="xref">7.3</a>. <a href="#name-threat-tcpcl-version-downgr" class="xref">Threat: TCPCL Version Downgrade</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.4">
<p id="section-toc.1-1.7.2.4.1"><a href="#section-7.4" class="xref">7.4</a>. <a href="#name-threat-transport-security-s" class="xref">Threat: Transport Security Stripping</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.5">
<p id="section-toc.1-1.7.2.5.1"><a href="#section-7.5" class="xref">7.5</a>. <a href="#name-threat-weak-tls-configurati" class="xref">Threat: Weak TLS Configurations</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.6">
<p id="section-toc.1-1.7.2.6.1"><a href="#section-7.6" class="xref">7.6</a>. <a href="#name-threat-untrusted-end-entity" class="xref">Threat: Untrusted End-Entity Certificate</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.7">
<p id="section-toc.1-1.7.2.7.1"><a href="#section-7.7" class="xref">7.7</a>. <a href="#name-threat-certificate-validati" class="xref">Threat: Certificate Validation Vulnerabilities</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.8">
<p id="section-toc.1-1.7.2.8.1"><a href="#section-7.8" class="xref">7.8</a>. <a href="#name-threat-symmetric-key-limits" class="xref">Threat: Symmetric Key Limits</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.9">
<p id="section-toc.1-1.7.2.9.1"><a href="#section-7.9" class="xref">7.9</a>. <a href="#name-threat-bp-node-impersonatio" class="xref">Threat: BP Node Impersonation</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.10">
<p id="section-toc.1-1.7.2.10.1"><a href="#section-7.10" class="xref">7.10</a>. <a href="#name-threat-denial-of-service" class="xref">Threat: Denial of Service</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.11">
<p id="section-toc.1-1.7.2.11.1"><a href="#section-7.11" class="xref">7.11</a>. <a href="#name-mandatory-to-implement-tls" class="xref">Mandatory-to-Implement TLS</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.12">
<p id="section-toc.1-1.7.2.12.1"><a href="#section-7.12" class="xref">7.12</a>. <a href="#name-alternate-uses-of-tls" class="xref">Alternate Uses of TLS</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.12.2.1">
<p id="section-toc.1-1.7.2.12.2.1.1"><a href="#section-7.12.1" class="xref">7.12.1</a>. <a href="#name-tls-without-authentication" class="xref">TLS without Authentication</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.12.2.2">
<p id="section-toc.1-1.7.2.12.2.2.1"><a href="#section-7.12.2" class="xref">7.12.2</a>. <a href="#name-non-certificate-tls-use" class="xref">Non-certificate TLS Use</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.13">
<p id="section-toc.1-1.7.2.13.1"><a href="#section-7.13" class="xref">7.13</a>. <a href="#name-predictability-of-transfer-" class="xref">Predictability of Transfer IDs</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8">
<p id="section-toc.1-1.8.1"><a href="#section-8" class="xref">8</a>. <a href="#name-iana-considerations" class="xref">IANA Considerations</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.1">
<p id="section-toc.1-1.8.2.1.1"><a href="#section-8.1" class="xref">8.1</a>. <a href="#name-port-number" class="xref">Port Number</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.2">
<p id="section-toc.1-1.8.2.2.1"><a href="#section-8.2" class="xref">8.2</a>. <a href="#name-protocol-versions" class="xref">Protocol Versions</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.3">
<p id="section-toc.1-1.8.2.3.1"><a href="#section-8.3" class="xref">8.3</a>. <a href="#name-session-extension-types" class="xref">Session Extension Types</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.4">
<p id="section-toc.1-1.8.2.4.1"><a href="#section-8.4" class="xref">8.4</a>. <a href="#name-transfer-extension-types" class="xref">Transfer Extension Types</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.5">
<p id="section-toc.1-1.8.2.5.1"><a href="#section-8.5" class="xref">8.5</a>. <a href="#name-message-types" class="xref">Message Types</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.6">
<p id="section-toc.1-1.8.2.6.1"><a href="#section-8.6" class="xref">8.6</a>. <a href="#name-xfer_refuse-reason-codes-2" class="xref">XFER_REFUSE Reason Codes</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.7">
<p id="section-toc.1-1.8.2.7.1"><a href="#section-8.7" class="xref">8.7</a>. <a href="#name-sess_term-reason-codes-2" class="xref">SESS_TERM Reason Codes</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.8">
<p id="section-toc.1-1.8.2.8.1"><a href="#section-8.8" class="xref">8.8</a>. <a href="#name-msg_reject-reason-codes-2" class="xref">MSG_REJECT Reason Codes</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.9">
<p id="section-toc.1-1.8.2.9.1"><a href="#section-8.9" class="xref">8.9</a>. <a href="#name-object-identifier-for-pkix-" class="xref">Object Identifier for PKIX Module Identifier</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.10">
<p id="section-toc.1-1.8.2.10.1"><a href="#section-8.10" class="xref">8.10</a>. <a href="#name-object-identifier-for-pkix-o" class="xref">Object Identifier for PKIX Other Name Forms</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.11">
<p id="section-toc.1-1.8.2.11.1"><a href="#section-8.11" class="xref">8.11</a>. <a href="#name-object-identifier-for-pkix-e" class="xref">Object Identifier for PKIX Extended Key Usage</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9">
<p id="section-toc.1-1.9.1"><a href="#section-9" class="xref">9</a>. <a href="#name-references" class="xref">References</a></p>
<ul class="compact toc ulBare ulEmpty">
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.1">
<p id="section-toc.1-1.9.2.1.1"><a href="#section-9.1" class="xref">9.1</a>. <a href="#name-normative-references" class="xref">Normative References</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.2">
<p id="section-toc.1-1.9.2.2.1"><a href="#section-9.2" class="xref">9.2</a>. <a href="#name-informative-references" class="xref">Informative References</a></p>
</li>
</ul>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10">
<p id="section-toc.1-1.10.1"><a href="#appendix-A" class="xref">Appendix A</a>. <a href="#name-significant-changes-from-rf" class="xref">Significant Changes from RFC 7242</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11">
<p id="section-toc.1-1.11.1"><a href="#appendix-B" class="xref">Appendix B</a>. <a href="#name-asn1-module" class="xref">ASN.1 Module</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12">
<p id="section-toc.1-1.12.1"><a href="#appendix-C" class="xref">Appendix C</a>. <a href="#name-example-of-the-bundleeid-ot" class="xref">Example of the BundleEID Other Name Form</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13">
<p id="section-toc.1-1.13.1"><a href="#appendix-D" class="xref"></a><a href="#name-acknowledgments" class="xref">Acknowledgments</a></p>
</li>
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14">
<p id="section-toc.1-1.14.1"><a href="#appendix-E" class="xref"></a><a href="#name-authors-addresses" class="xref">Authors' Addresses</a></p>
</li>
</ul>
</nav>
</section>
</div>
<div id="sec-intro">
<section id="section-1">
<h2 id="name-introduction">
<a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a>
</h2>
<p id="section-1-1">
This document describes the TCP convergence-layer protocol for Delay-Tolerant Networking (DTN).
DTN is an end-to-end architecture providing communications in and/or through highly stressed environments, including those with intermittent connectivity, long and/or variable delays, and high bit error rates.
More detailed descriptions of the rationale and capabilities of these networks can be found in "<a href="#RFC4838" class="xref">Delay-Tolerant Networking Architecture</a>" <span>[<a href="#RFC4838" class="xref">RFC4838</a>]</span>.<a href="#section-1-1" class="pilcrow">¶</a></p>
<p id="section-1-2">
An important goal of the DTN architecture is to accommodate a wide range of networking technologies and environments.
The protocol used for DTN communications is the Bundle Protocol version 7 (BPv7) <span>[<a href="#RFC9171" class="xref">RFC9171</a>]</span>, an application-layer protocol that is used to construct a store-and-forward overlay network.
BPv7 requires the services of a "convergence-layer adapter" (CLA) to send and receive bundles using the service of some "native" link, network, or Internet protocol.
This document describes one such convergence-layer adapter that uses the well-known Transmission Control Protocol (TCP).
This convergence layer is referred to as TCP Convergence Layer version 4 (TCPCLv4).
For the remainder of this document,<a href="#section-1-2" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-1-3.1">the abbreviation "BP" without the version suffix refers to BPv7.<a href="#section-1-3.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-1-3.2">the abbreviation "TCPCL" without the version suffix refers to TCPCLv4.<a href="#section-1-3.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-1-4">
The locations of the TCPCL and the Bundle Protocol in the Internet model protocol stack (described in <span>[<a href="#RFC1122" class="xref">RFC1122</a>]</span>) are shown in <a href="#fig-tcpcl-ip-stack" class="xref">Figure 1</a>.
In particular, when BP is using TCP as its bearer with the TCPCL as its convergence layer, both BP and the TCPCL reside at the application layer of the Internet model.<a href="#section-1-4" class="pilcrow">¶</a></p>
<span id="name-the-locations-of-the-bundle"></span><div id="fig-tcpcl-ip-stack">
<figure id="figure-1">
<div class="alignCenter art-ascii-art art-text artwork" id="section-1-5.1">
<pre>
+-------------------------+
| DTN Application | -\
+-------------------------| |
| Bundle Protocol (BP) | -> Application Layer
+-------------------------+ |
| TCP Conv. Layer (TCPCL) | |
+-------------------------+ |
| TLS (optional) | -/
+-------------------------+
| TCP | ---> Transport Layer
+-------------------------+
| IPv4/IPv6 | ---> Network Layer
+-------------------------+
| Link-Layer Protocol | ---> Link Layer
+-------------------------+
</pre>
</div>
<figcaption><a href="#figure-1" class="selfRef">Figure 1</a>:
<a href="#name-the-locations-of-the-bundle" class="selfRef">The Locations of the Bundle Protocol and the TCP Convergence-Layer Protocol above the Internet Protocol Stack</a>
</figcaption></figure>
</div>
<section id="section-1.1">
<h3 id="name-scope">
<a href="#section-1.1" class="section-number selfRef">1.1. </a><a href="#name-scope" class="section-name selfRef">Scope</a>
</h3>
<p id="section-1.1-1">
This document describes the format of the protocol data units passed between entities participating in TCPCL communications.
This document does not address:<a href="#section-1.1-1" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-1.1-2.1">
The format of protocol data units of the Bundle Protocol, as those are defined elsewhere in <span>[<a href="#RFC9171" class="xref">RFC9171</a>]</span>.
This includes the concept of bundle fragmentation or bundle encapsulation.
The TCPCL transfers bundles as opaque data blocks.<a href="#section-1.1-2.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-1.1-2.2">
Mechanisms for locating or identifying other bundle entities (peers) within a network or across an internet.
The mapping of a node ID to a potential convergence layer (CL) protocol and network address is left to implementation and configuration of the BP Agent (BPA) and its various potential routing strategies, as is the mapping of a DNS name and/or address to a choice of an end-entity certificate to authenticate a node to its peers.<a href="#section-1.1-2.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-1.1-2.3">
Logic for routing bundles along a path toward a bundle's endpoint.
This CL protocol is involved only in transporting bundles between adjacent entities in a routing sequence.<a href="#section-1.1-2.3" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-1.1-2.4">
Policies or mechanisms for issuing Public Key Infrastructure Using X.509 (PKIX) certificates; provisioning, deploying, or accessing certificates and private keys; deploying or accessing certificate revocation lists (CRLs); or configuring security parameters on an individual entity or across a network.<a href="#section-1.1-2.4" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-1.1-2.5">
Uses of TLS that are not based on PKIX certificate authentication (see <a href="#sec-security-tlsnopki" class="xref">Section 7.12.2</a>) or in which authentication of both entities is not possible (see <a href="#sec-security-tlsnoauth" class="xref">Section 7.12.1</a>).<a href="#section-1.1-2.5" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-1.1-3">
Any TCPCL implementation requires a BPA to perform those above-listed functions in order to perform end-to-end bundle delivery.<a href="#section-1.1-3" class="pilcrow">¶</a></p>
</section>
</section>
</div>
<section id="section-2">
<h2 id="name-requirements-language">
<a href="#section-2" class="section-number selfRef">2. </a><a href="#name-requirements-language" class="section-name selfRef">Requirements Language</a>
</h2>
<p id="section-2-1">The key words "<span class="bcp14">MUST</span>", "<span class="bcp14">MUST NOT</span>",
"<span class="bcp14">REQUIRED</span>", "<span class="bcp14">SHALL</span>",
"<span class="bcp14">SHALL NOT</span>", "<span class="bcp14">SHOULD</span>",
"<span class="bcp14">SHOULD NOT</span>",
"<span class="bcp14">RECOMMENDED</span>", "<span class="bcp14">NOT RECOMMENDED</span>",
"<span class="bcp14">MAY</span>", and "<span class="bcp14">OPTIONAL</span>" in this document
are to be interpreted as described in BCP 14
<span>[<a href="#RFC2119" class="xref">RFC2119</a>]</span> <span>[<a href="#RFC8174" class="xref">RFC8174</a>]</span> when, and only
when, they appear in all capitals, as shown here.<a href="#section-2-1" class="pilcrow">¶</a></p>
<div id="sec-term-defs">
<section id="section-2.1">
<h3 id="name-definitions-specific-to-the">
<a href="#section-2.1" class="section-number selfRef">2.1. </a><a href="#name-definitions-specific-to-the" class="section-name selfRef">Definitions Specific to the TCPCL Protocol</a>
</h3>
<p id="section-2.1-1">
This section contains definitions specific to the TCPCL protocol.<a href="#section-2.1-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-2.1-2">
<dt id="section-2.1-2.1">Network Byte Order:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.2">
Here, "network byte order" means most significant byte first, a.k.a. big endian.
All of the integer encodings in this protocol <span class="bcp14">SHALL</span> be transmitted in network byte order.<a href="#section-2.1-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.3">TCPCL Entity:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.4">
<p id="section-2.1-2.4.1">
This is the notional TCPCL application that initiates TCPCL sessions.
This design, implementation, configuration, and specific behavior of such an entity is outside of the scope of this document.
However, the concept of an entity has utility within the scope of this document as the container and initiator of TCPCL sessions.
The relationship between a TCPCL entity and TCPCL sessions is defined as follows:<a href="#section-2.1-2.4.1" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-2.1-2.4.2.1">
A TCPCL entity <span class="bcp14">MAY</span> actively initiate any number of TCPCL sessions and should do so whenever the entity is the initial transmitter of information to another entity in the network.<a href="#section-2.1-2.4.2.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-2.1-2.4.2.2">
A TCPCL entity <span class="bcp14">MAY</span> support zero or more passive listening elements that listen for connection requests from other TCPCL entities operating on other entities in the network.<a href="#section-2.1-2.4.2.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-2.1-2.4.2.3">
A TCPCL entity <span class="bcp14">MAY</span> passively initiate any number of TCPCL sessions from requests received by its passive listening element(s) if the entity uses such elements.<a href="#section-2.1-2.4.2.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-2.1-2.4.3">
These relationships are illustrated in <a href="#fig-entity-session-relations" class="xref">Figure 2</a>.
For most TCPCL behavior within a session, the two entities are symmetric and there is no protocol distinction between them.
Some specific behavior, particularly during session establishment, distinguishes between the active entity and the passive entity.
For the remainder of this document, the term "entity" without the prefix "TCPCL" refers to a TCPCL entity.<a href="#section-2.1-2.4.3" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.5">TCP Connection:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.6">
The term "connection" in this specification exclusively refers to a TCP connection and any and all behaviors, sessions, and other states associated with that TCP connection.<a href="#section-2.1-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.7">TCPCL Session:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.8">
A TCPCL session (as opposed to a TCP connection) is a TCPCL communication relationship between two TCPCL entities.
A TCPCL session operates within a single underlying TCP connection, and the lifetime of a TCPCL session is bound to the lifetime of that TCP connection.
A TCPCL session is terminated when the TCP connection ends, due to either (1) one or both entities actively closing the TCP connection or (2) network errors causing a failure of the TCP connection.
Within a single TCPCL session, there are two possible transfer streams: one in each direction, with one stream from each entity being the outbound stream and the other being the inbound stream (see <a href="#fig-session-stream" class="xref">Figure 3</a>).
From the perspective of a TCPCL session, the two transfer streams do not logically interact with each other.
The streams do operate over the same TCP connection and between the same BPAs, so there are logical relationships at those layers (message and bundle interleaving, respectively).
For the remainder of this document, the term "session" without the prefix "TCPCL" refers to a TCPCL session.<a href="#section-2.1-2.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.9">Session Parameters:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.10">
These are a set of values used to affect the operation of the TCPCL for a given session.
The manner in which these parameters are conveyed to the bundle entity and thereby to the TCPCL is implementation dependent.
However, the mechanism by which two entities exchange and negotiate the values to be used for a given session is described in <a href="#sec-contact-negotiate" class="xref">Section 4.3</a>.<a href="#section-2.1-2.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.11">Transfer Stream:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.12">
A transfer stream is a unidirectional user-data path within a TCPCL session.
Transfers sent over a transfer stream are serialized, meaning that one transfer must complete its transmission prior to another transfer being started over the same transfer stream.
At the stream layer, there is no logical relationship between transfers in that stream; it's only within the BPA that transfers are fully decoded as bundles.
Each unidirectional stream has a single sender entity and a single receiver entity.<a href="#section-2.1-2.12" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.13">Transfer:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.14">
This refers to the procedures and mechanisms for conveyance of an individual bundle from one node to another.
Each transfer within the TCPCL is identified by a Transfer ID number, which is guaranteed to be unique only to a single direction within a single session.<a href="#section-2.1-2.14" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.15">Transfer Segment:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.16">
A transfer segment is a subset of a transfer of user data being communicated over a transfer stream.<a href="#section-2.1-2.16" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.17">Idle Session:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.18">
A TCPCL session is idle while there is no transmission in progress in either direction.
While idle, the only messages being transmitted or received are KEEPALIVE messages.<a href="#section-2.1-2.18" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.19">Live Session:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.20">
A TCPCL session is live while there is a transmission in progress in either direction.<a href="#section-2.1-2.20" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-2.1-2.21">Reason Codes:</dt>
<dd style="margin-left: 1.5em" id="section-2.1-2.22">
The TCPCL uses numeric codes to encode specific reasons for individual failure/error message types.<a href="#section-2.1-2.22" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-2.1-3">
The relationship between connections, sessions, and streams is shown in <a href="#fig-session-stream" class="xref">Figure 3</a>.<a href="#section-2.1-3" class="pilcrow">¶</a></p>
<span id="name-the-relationships-between-t"></span><div id="fig-entity-session-relations">
<figure id="figure-2">
<div class="alignCenter art-ascii-art art-text artwork" id="section-2.1-4.1">
<pre>
+--------------------------------------------+
| TCPCL Entity |
| | +----------------+
| +--------------------------------+ | | |-+
| | Actively Initiated Session #1 +------------->| Other | |
| +--------------------------------+ | | TCPCL Entity's | |
| ... | | Passive | |
| +--------------------------------+ | | Listener | |
| | Actively Initiated Session #n +------------->| | |
| +--------------------------------+ | +----------------+ |
| | +-----------------+
| +---------------------------+ |
| +---| +---------------------------+ | +----------------+
| | | | Optional Passive | | | |-+
| | +-| Listener(s) +<-------------+ | |
| | +---------------------------+ | | | |
| | | | Other | |
| | +---------------------------------+ | | TCPCL Entity's | |
| +--->| Passively Initiated Session #1 +-------->| Active | |
| | +---------------------------------+ | | Initiator(s) | |
| | | | | |
| | +---------------------------------+ | | | |
| +--->| Passively Initiated Session #n +-------->| | |
| +---------------------------------+ | +----------------+ |
| | +-----------------+
+--------------------------------------------+
</pre>
</div>
<figcaption><a href="#figure-2" class="selfRef">Figure 2</a>:
<a href="#name-the-relationships-between-t" class="selfRef">The Relationships between TCPCL Entities</a>
</figcaption></figure>
</div>
<span id="name-the-relationship-within-a-t"></span><div id="fig-session-stream">
<figure id="figure-3">
<div class="alignCenter art-ascii-art art-text artwork" id="section-2.1-5.1">
<pre>
+---------------------------+ +---------------------------+
| "Own" TCPCL Session | | "Other" TCPCL Session |
| | | |
| +----------------------+ | | +----------------------+ |
| | TCP Connection | | | | TCP Connection | |
| | | | | | | |
| | +-----------------+ | | Messages | | +-----------------+ | |
| | | Own Inbound | +--------------------+ | Peer Outbound | | |
| | | Transfer Stream | | Transfer Stream | | |
| | | ----- |<---[Seg]--[Seg]--[Seg]---| ----- | | |
| | | RECEIVER |---[Ack]----[Ack]-------->| SENDER | | |
| | +-----------------+ +-----------------+ | |
| | | |
| | +-----------------+ +-----------------+ | |
| | | Own Outbound |-------[Seg]---[Seg]----->| Peer Inbound | | |
| | | Transfer Stream |<---[Ack]----[Ack]-[Ack]--| Transfer Stream | | |
| | | ----- | | ----- | | |
| | | SENDER | +--------------------+ | RECEIVER | | |
| | +-----------------+ | | | | +-----------------+ | |
| +-----------------------+ | | +---------------------+ |
+----------------------------+ +--------------------------+
</pre>
</div>
<figcaption><a href="#figure-3" class="selfRef">Figure 3</a>:
<a href="#name-the-relationship-within-a-t" class="selfRef">The Relationship within a TCPCL Session of its Two Streams</a>
</figcaption></figure>
</div>
</section>
</div>
</section>
<div id="sec-prococol">
<section id="section-3">
<h2 id="name-general-protocol-descriptio">
<a href="#section-3" class="section-number selfRef">3. </a><a href="#name-general-protocol-descriptio" class="section-name selfRef">General Protocol Description</a>
</h2>
<p id="section-3-1">
The service of this protocol is the transmission of DTN bundles via TCP.
This document specifies the encapsulation of bundles, procedures for TCP setup and teardown, and a set of messages and entity requirements.
The general operation of the protocol is as follows.<a href="#section-3-1" class="pilcrow">¶</a></p>
<div id="sec-cl-services">
<section id="section-3.1">
<h3 id="name-convergence-layer-services">
<a href="#section-3.1" class="section-number selfRef">3.1. </a><a href="#name-convergence-layer-services" class="section-name selfRef">Convergence-Layer Services</a>
</h3>
<p id="section-3.1-1">
This version of the TCPCL protocol provides the following services to support the overlaying BPA.
In all cases, this is not an API definition but a logical description of how the CL can interact with the BPA.
Each of these interactions can be associated with any number of additional metadata items as necessary to support the operation of the CL or BPA.<a href="#section-3.1-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-3.1-2">
<dt id="section-3.1-2.1">Attempt Session:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.2">
The TCPCL allows a BPA to preemptively attempt to establish a TCPCL session with a peer entity.
Each session attempt can send a different set of session negotiation parameters as directed by the BPA.<a href="#section-3.1-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.3">Terminate Session:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.4">
The TCPCL allows a BPA to preemptively terminate an established TCPCL session with a peer entity.
The terminate request is done on a per-session basis.<a href="#section-3.1-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.5">Session State Changed:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6">
<p id="section-3.1-2.6.1">
The TCPCL entity indicates to the BPA when the session state changes.
The top-level session states indicated are as follows:<a href="#section-3.1-2.6.1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-3.1-2.6.2">
<dt id="section-3.1-2.6.2.1">Connecting:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.2">A TCP connection is being established. This state only applies to the active entity.<a href="#section-3.1-2.6.2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.3">Contact Negotiating:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.4">A TCP connection has been made (as either the active or passive entity), and contact negotiation has begun.<a href="#section-3.1-2.6.2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.5">Session Negotiating:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.6">Contact negotiation has been completed (including possible TLS use), and session negotiation has begun.<a href="#section-3.1-2.6.2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.7">Established:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.8">
The session has been fully established and is ready for its first transfer.
When the session is established, the peer node ID (along with an indication of whether or not it was authenticated) and the negotiated session parameters (see <a href="#sec-session-negotiate" class="xref">Section 4.7</a>) are also communicated to the BPA.<a href="#section-3.1-2.6.2.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.9">Ending:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.10">The entity sent a SESS_TERM message and is in the Ending state.<a href="#section-3.1-2.6.2.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.11">Terminated:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.12">The session has finished normal termination sequencing.<a href="#section-3.1-2.6.2.12" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.6.2.13">Failed:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.6.2.14">The session ended without normal termination sequencing.<a href="#section-3.1-2.6.2.14" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.7">Session Idle Changed:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.8">
The TCPCL entity indicates to the BPA when the Live/Idle substate of the session changes.
This occurs only when the top-level session state is "Established".
The session transitions from Idle to Live at the start of a transfer in either transfer stream; the session transitions from Live to Idle at the end of a transfer when the other transfer stream does not have an ongoing transfer.
Because the TCPCL transmits serially over a TCP connection, it suffers from "head-of-queue blocking", so a transfer in either direction can block an immediate start of a new transfer in the session.<a href="#section-3.1-2.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.9">Begin Transmission:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.10">
The principal purpose of the TCPCL is to allow a BPA to transmit bundle data over an established TCPCL session.
Transmission requests are done on a per-session basis, and the CL does not necessarily perform any per-session or inter-session queueing.
Any queueing of transmissions is the obligation of the BPA.<a href="#section-3.1-2.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.11">Transmission Success:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.12">
The TCPCL entity indicates to the BPA when a bundle has been fully transferred to a peer entity.<a href="#section-3.1-2.12" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.13">Transmission Intermediate Progress:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.14">
The TCPCL entity indicates to the BPA the intermediate progress of a transfer to a peer entity.
This intermediate progress is at the granularity of each transferred segment.<a href="#section-3.1-2.14" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.15">Transmission Failure:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.16">
The TCPCL entity indicates to the BPA certain reasons for bundle transmission failure, notably when the peer entity rejects the bundle or when a TCPCL session ends before transfer success.
The TCPCL itself does not have a notion of transfer timeout.<a href="#section-3.1-2.16" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.17">Reception Initialized:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.18">
The TCPCL entity indicates this status to the receiving BPA just before any transmission data is sent.
This corresponds to reception of the XFER_SEGMENT message with the <code>START</code> flag set to 1.<a href="#section-3.1-2.18" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.19">Interrupt Reception:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.20">
The TCPCL entity allows a BPA to interrupt an individual transfer before it has fully completed (successfully or not).
Interruption can occur any time after the reception is initialized.<a href="#section-3.1-2.20" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.21">Reception Success:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.22">
The TCPCL entity indicates to the BPA when a bundle has been fully transferred from a peer entity.<a href="#section-3.1-2.22" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.23">Reception Intermediate Progress:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.24">
The TCPCL entity indicates to the BPA the intermediate progress of a transfer from the peer entity.
This intermediate progress is at the granularity of each transferred segment.
An indication of intermediate reception gives a BPA the chance to inspect bundle header contents before the entire bundle is available and thus supports the "Interrupt Reception" capability.<a href="#section-3.1-2.24" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.1-2.25">Reception Failure:</dt>
<dd style="margin-left: 1.5em" id="section-3.1-2.26">
The TCPCL entity indicates to the BPA certain reasons for reception failure, notably when the local entity rejects an attempted transfer for some local policy reason or when a TCPCL session ends before transfer success.
The TCPCL itself does not have a notion of transfer timeout.<a href="#section-3.1-2.26" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
<div id="sec-protocol-session">
<section id="section-3.2">
<h3 id="name-tcpcl-session-overview">
<a href="#section-3.2" class="section-number selfRef">3.2. </a><a href="#name-tcpcl-session-overview" class="section-name selfRef">TCPCL Session Overview</a>
</h3>
<p id="section-3.2-1">
First, one entity establishes a TCPCL session to the other by initiating a TCP connection in accordance with <span>[<a href="#RFC0793" class="xref">RFC0793</a>]</span>.
After setup of the TCP connection is complete, an initial Contact Header is exchanged in both directions to establish a shared TCPCL version and negotiate the use of TLS security (as described in <a href="#sec-session-establishment" class="xref">Section 4</a>).
Once contact negotiation is complete, TCPCL messaging is available and the session negotiation is used to set parameters of the TCPCL session.
One of these parameters is a node ID; each TCPCL entity is acting on behalf of a BPA having a node ID.
This is used to assist in routing and forwarding messages by the BPA and is part of the authentication capability provided by TLS.<a href="#section-3.2-1" class="pilcrow">¶</a></p>
<p id="section-3.2-2">
Once negotiated, the parameters of a TCPCL session cannot change; if there is a desire by either peer to transfer data under different parameters, then a new session must be established.
This makes CL logic simpler but relies on the assumption that establishing a TCP connection is lightweight enough that TCP connection overhead is negligible compared to TCPCL data sizes.<a href="#section-3.2-2" class="pilcrow">¶</a></p>
<p id="section-3.2-3">
Once the TCPCL session is established and configured in this way, bundles can be transferred in either direction.
Each transfer is performed by segmenting the transfer data into one or more XFER_SEGMENT messages.
Multiple bundles can be transmitted consecutively in a single direction on a single TCPCL connection.
Segments from different bundles are never interleaved.
Bundle interleaving can be accomplished by fragmentation at the BP layer or by establishing multiple TCPCL sessions between the same peers.
There is no fundamental limit on the number of TCPCL sessions that a single entity can establish, beyond the limit imposed by the number of available (ephemeral) TCP ports of the active entity.<a href="#section-3.2-3" class="pilcrow">¶</a></p>
<p id="section-3.2-4">
One feature of this protocol is that the receiving entity can send acknowledgment (XFER_ACK) messages as bundle data segments arrive.
The rationale behind these acknowledgments is to enable the transmitting entity to determine how much of the bundle has been received, so that if the session is interrupted, it can perform reactive fragmentation to avoid resending the
already-transmitted part of the bundle.
In addition, there is no explicit flow control on the TCPCL.<a href="#section-3.2-4" class="pilcrow">¶</a></p>
<p id="section-3.2-5">
A TCPCL receiver can interrupt the transmission of a bundle at any point in time by replying with a XFER_REFUSE message, which causes the sender to stop transmission of the associated bundle (if it hasn't already finished transmission).<a href="#section-3.2-5" class="pilcrow">¶</a></p>
<aside id="section-3.2-6">
<p id="section-3.2-6.1">
Note: This enables a cross-layer optimization in that it allows a receiver that detects that it has already received a certain bundle to interrupt transmission as early as possible and thus save transmission capacity for other bundles.<a href="#section-3.2-6.1" class="pilcrow">¶</a></p>
</aside>
<p id="section-3.2-7">
For sessions that are idle, a KEEPALIVE message is sent at a negotiated interval.
This is used to convey entity liveness information during otherwise messageless time intervals.<a href="#section-3.2-7" class="pilcrow">¶</a></p>
<p id="section-3.2-8">
A SESS_TERM message is used to initiate the ending of a TCPCL session (see <a href="#sec-SESS_TERM" class="xref">Section 6.1</a>).
During termination sequencing, in-progress transfers can be completed but no new transfers can be initiated.
A SESS_TERM message can also be used to refuse a session setup by a peer (see <a href="#sec-contact-negotiate" class="xref">Section 4.3</a>).
Regardless of the reason, session termination is initiated by one of the entities and the other entity responds to it, as illustrated by Figures <a href="#fig-sessterm-init" class="xref">13</a> and <a href="#fig-sessterm-respond" class="xref">14</a> in the next subsection.
Even when there are no transfers queued or in progress, the session termination procedure allows each entity to distinguish between a clean end to a session and the TCP connection being closed because of some underlying network issue.<a href="#section-3.2-8" class="pilcrow">¶</a></p>
<p id="section-3.2-9">
Once a session is established, the TCPCL is a symmetric protocol between the peers.
Both sides can start sending data segments in a session, and one side's bundle transfer does not have to complete before the other side can start sending data segments on its own.
Hence, the protocol allows for a bidirectional mode of communication.
Note that in the case of concurrent bidirectional transmission, acknowledgment segments <span class="bcp14">MAY</span> be interleaved with data segments.<a href="#section-3.2-9" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-protocol-states">
<section id="section-3.3">
<h3 id="name-tcpcl-states-and-transition">
<a href="#section-3.3" class="section-number selfRef">3.3. </a><a href="#name-tcpcl-states-and-transition" class="section-name selfRef">TCPCL States and Transitions</a>
</h3>
<p id="section-3.3-1">
The states of a normal TCPCL session (i.e., without session failures) are indicated in <a href="#fig-session-states" class="xref">Figure 4</a>.<a href="#section-3.3-1" class="pilcrow">¶</a></p>
<span id="name-top-level-states-of-a-tcpcl"></span><div id="fig-session-states">
<figure id="figure-4">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-2.1">
<pre>
+-------+
| START |
+-------+
|
TCP Establishment
|
V
+-----------+ +---------------------+
| TCP |----------->| Contact / Session |
| Connected | | Negotiation |
+-----------+ +---------------------+
|
+-----Session Parameters-----+
| Negotiated
V
+-------------+ +-------------+
| Established |----New Transfer---->| Established |
| Session | | Session |
| Idle |<---Transfers Done---| Live |
+-------------+ +-------------+
| |
+------------------------------------+
|
V
+-------------+
| Established | +-------------+
| Session |----Transfers------>| TCP |
| Ending | Done | Terminating |
+-------------+ +-------------+
|
+----------TCP Close Message----------+
|
V
+-------+
| END |
+-------+
</pre>
</div>
<figcaption><a href="#figure-4" class="selfRef">Figure 4</a>:
<a href="#name-top-level-states-of-a-tcpcl" class="selfRef">Top-Level States of a TCPCL Session</a>
</figcaption></figure>
</div>
<p id="section-3.3-3">
Notes on established session states:<a href="#section-3.3-3" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-3.3-4.1">Session "Live" means transmitting or receiving over a transfer stream.<a href="#section-3.3-4.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-3.3-4.2">Session "Idle" means no transmission/reception over a transfer stream.<a href="#section-3.3-4.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-3.3-4.3">Session "Ending" means no new transfers will be allowed.<a href="#section-3.3-4.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-3.3-5">
Contact negotiation involves exchanging a Contact Header ("CH" in Figures <a href="#fig-contact-init-active" class="xref">5</a>, <a href="#fig-contact-init-passive" class="xref">6</a>, and <a href="#fig-contact-init-process" class="xref">7</a>) in both directions and deriving a negotiated state from the two headers.
The contact negotiation sequencing is performed as either the active or passive entity and is illustrated in Figures <a href="#fig-contact-init-active" class="xref">5</a> and <a href="#fig-contact-init-passive" class="xref">6</a>, respectively, which both share the data validation and negotiation of the Processing of Contact Header ("[PCH]") activity (<a href="#fig-contact-init-process" class="xref">Figure 7</a>) and the "[TCPCLOSE]" activity, which indicates TCP connection close.
Successful negotiation results in one of the Session Initiation ("[SI]") activities being performed, as shown further below.
To avoid data loss, a Session Termination ("[ST]") exchange allows cleanly finishing transfers before a session is ended.<a href="#section-3.3-5" class="pilcrow">¶</a></p>
<span id="name-contact-initiation-as-activ"></span><div id="fig-contact-init-active">
<figure id="figure-5">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-6.1">
<pre>
+-------+
| START |
+-------+
|
TCP Connecting
V
+-----------+
| TCP | +---------+
| Connected |--Send CH-->| Waiting |--Timeout-->[TCPCLOSE]
+-----------+ +---------+
|
Received CH
V
[PCH]
</pre>
</div>
<figcaption><a href="#figure-5" class="selfRef">Figure 5</a>:
<a href="#name-contact-initiation-as-activ" class="selfRef">Contact Initiation as Active Entity</a>
</figcaption></figure>
</div>
<span id="name-contact-initiation-as-passi"></span><div id="fig-contact-init-passive">
<figure id="figure-6">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-7.1">
<pre>
+-----------+ +---------+
| TCP |--Wait for-->| Waiting |--Timeout-->[TCPCLOSE]
| Connected | CH +---------+
+-----------+ |
Received CH
V
+-----------------+
| Preparing reply |--Send CH-->[PCH]
+-----------------+
</pre>
</div>
<figcaption><a href="#figure-6" class="selfRef">Figure 6</a>:
<a href="#name-contact-initiation-as-passi" class="selfRef">Contact Initiation as Passive Entity</a>
</figcaption></figure>
</div>
<span id="name-processing-of-contact-heade"></span><div id="fig-contact-init-process">
<figure id="figure-7">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-8.1">
<pre>
+-----------+
| Peer CH |
| available |
+-----------+
|
Validate and
Negotiate
V
+------------+
| Negotiated |--Failure-->[TCPCLOSE]
+------------+
| |
No TLS +----Negotiate---+ [ST]
| TLS | ^
V | Failure
+-----------+ V |
| TCPCL | +---------------+
| Messaging |<--Success--| TLS Handshake |
| Available | +---------------+
+-----------+
</pre>
</div>
<figcaption><a href="#figure-7" class="selfRef">Figure 7</a>:
<a href="#name-processing-of-contact-heade" class="selfRef">Processing of Contact Header [PCH]</a>
</figcaption></figure>
</div>
<p id="section-3.3-9">
Session negotiation involves exchanging a session initialization (SESS_INIT) message in both directions and deriving a negotiated state from the two messages.
The session negotiation sequencing is performed as either the active or passive entity and is illustrated in Figures <a href="#fig-sess-init-active" class="xref">8</a> and <a href="#fig-sess-init-passive" class="xref">9</a>, respectively (where "[PSI]" means "Processing of Session Initiation"), which both share the data validation and negotiation shown in <a href="#fig-sess-init-process" class="xref">Figure 10</a>.
The validation here includes certificate validation and authentication when TLS is used for the session.<a href="#section-3.3-9" class="pilcrow">¶</a></p>
<span id="name-session-initiation-si-as-ac"></span><div id="fig-sess-init-active">
<figure id="figure-8">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-10.1">
<pre>
+-----------+
| TCPCL | +---------+
| Messaging |--Send SESS_INIT-->| Waiting |--Timeout-->[ST]
| Available | +---------+
+-----------+ |
Received SESS_INIT
|
V
[PSI]
</pre>
</div>
<figcaption><a href="#figure-8" class="selfRef">Figure 8</a>:
<a href="#name-session-initiation-si-as-ac" class="selfRef">Session Initiation [SI] as Active Entity</a>
</figcaption></figure>
</div>
<span id="name-session-initiation-si-as-pa"></span><div id="fig-sess-init-passive">
<figure id="figure-9">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-11.1">
<pre>
+-----------+
| TCPCL | +---------+
| Messaging |----Wait for ---->| Waiting |--Timeout-->[ST]
| Available | SESS_INIT +---------+
+-----------+ |
Received SESS_INIT
|
+-----------------+
| Preparing reply |--Send SESS_INIT-->[PSI]
+-----------------+
</pre>
</div>
<figcaption><a href="#figure-9" class="selfRef">Figure 9</a>:
<a href="#name-session-initiation-si-as-pa" class="selfRef">Session Initiation [SI] as Passive Entity</a>
</figcaption></figure>
</div>
<span id="name-processing-of-session-initi"></span><div id="fig-sess-init-process">
<figure id="figure-10">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-12.1">
<pre>
+----------------+
| Peer SESS_INIT |
| available |
+----------------+
|
Validate and
Negotiate
V
+------------+
| Negotiated |---Failure--->[ST]
+------------+
|
Success
V
+--------------+
| Established |
| Session Idle |
+--------------+
</pre>
</div>
<figcaption><a href="#figure-10" class="selfRef">Figure 10</a>:
<a href="#name-processing-of-session-initi" class="selfRef">Processing of Session Initiation [PSI]</a>
</figcaption></figure>
</div>
<p id="section-3.3-13">
Transfers can occur after a session is established and it's not in the Ending state.
Each transfer occurs within a single logical transfer stream between a sender and a receiver, as illustrated in Figures <a href="#fig-transfer-tx-states" class="xref">11</a> and <a href="#fig-transfer-rx-states" class="xref">12</a>, respectively.<a href="#section-3.3-13" class="pilcrow">¶</a></p>
<span id="name-transfer-sender-states"></span><div id="fig-transfer-tx-states">
<figure id="figure-11">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-14.1">
<pre>
+--Send XFER_SEGMENT--+
+--------+ | |
| Stream | +-------------+ |
| Idle |---Send XFER_SEGMENT-->| In Progress |<------------+
+--------+ +-------------+
|
+---------All segments sent-------+
|
V
+---------+ +--------+
| Waiting |---- Receive Final---->| Stream |
| for Ack | XFER_ACK | Idle |
+---------+ +--------+
</pre>
</div>
<figcaption><a href="#figure-11" class="selfRef">Figure 11</a>:
<a href="#name-transfer-sender-states" class="selfRef">Transfer Sender States</a>
</figcaption></figure>
</div>
<aside id="section-3.3-15">
<p id="section-3.3-15.1">
Note on transfer sending: Pipelining of transfers can occur when the sending entity begins a new transfer while in the "Waiting for Ack" state.<a href="#section-3.3-15.1" class="pilcrow">¶</a></p>
</aside>
<span id="name-transfer-receiver-states"></span><div id="fig-transfer-rx-states">
<figure id="figure-12">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-16.1">
<pre>
+-Receive XFER_SEGMENT-+
+--------+ | Send XFER_ACK |
| Stream | +-------------+ |
| Idle |--Receive XFER_SEGMENT-->| In Progress |<-------------+
+--------+ +-------------+
|
+--------Sent Final XFER_ACK--------+
|
V
+--------+
| Stream |
| Idle |
+--------+
</pre>
</div>
<figcaption><a href="#figure-12" class="selfRef">Figure 12</a>:
<a href="#name-transfer-receiver-states" class="selfRef">Transfer Receiver States</a>
</figcaption></figure>
</div>
<p id="section-3.3-17">
Session termination involves one entity initiating the termination of the session and the other entity acknowledging the termination.
For either entity, it is the sending of the SESS_TERM message, which transitions the session to the Ending substate.
While a session is in the Ending state, only in-progress transfers can be completed and no new transfers can be started.<a href="#section-3.3-17" class="pilcrow">¶</a></p>
<span id="name-session-termination-st-from"></span><div id="fig-sessterm-init">
<figure id="figure-13">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-18.1">
<pre>
+-----------+ +---------+
| Session |--Send SESS_TERM-->| Session |
| Live/Idle | | Ending |
+-----------+ +---------+
</pre>
</div>
<figcaption><a href="#figure-13" class="selfRef">Figure 13</a>:
<a href="#name-session-termination-st-from" class="selfRef">Session Termination [ST] from the Initiator</a>
</figcaption></figure>
</div>
<span id="name-session-termination-st-from-"></span><div id="fig-sessterm-respond">
<figure id="figure-14">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.3-19.1">
<pre>
+-----------+ +---------+
| Session |--Send SESS_TERM-->| Session |
| Live/Idle | | Ending |
+-----------+<------+ +---------+
| |
Receive SESS_TERM |
| |
+-------------+
</pre>
</div>
<figcaption><a href="#figure-14" class="selfRef">Figure 14</a>:
<a href="#name-session-termination-st-from-" class="selfRef">Session Termination [ST] from the Responder</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="sec-pkix-env">
<section id="section-3.4">
<h3 id="name-pkix-environments-and-ca-po">
<a href="#section-3.4" class="section-number selfRef">3.4. </a><a href="#name-pkix-environments-and-ca-po" class="section-name selfRef">PKIX Environments and CA Policy</a>
</h3>
<p id="section-3.4-1">
This specification defines requirements regarding how to use PKIX certificates issued by a Certificate Authority (CA) but does not define any mechanisms for how those certificates come to be.
The requirements regarding TCPCL certificate use are broad, to support two quite different PKIX environments:<a href="#section-3.4-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-3.4-2">
<dt id="section-3.4-2.1">DTN-Aware CAs:</dt>
<dd style="margin-left: 1.5em" id="section-3.4-2.2">
In the ideal case, the CA or CAs issuing certificates for TCPCL entities are aware of the end use of the certificate, have a mechanism for verifying ownership of a node ID, and are issuing certificates directly for that node ID.
In this environment, the ability to authenticate a peer entity node ID directly avoids the need to authenticate a network name or address and then implicitly trust the node ID of the peer.
The TCPCL authenticates the node ID whenever possible; this is preferred over lower-level PKIX identities.<a href="#section-3.4-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.4-2.3">DTN-Ignorant CAs:</dt>
<dd style="margin-left: 1.5em" id="section-3.4-2.4">
It is expected that Internet-scale "public" CAs will continue to focus on DNS names as the preferred PKIX identifier.
There are large infrastructures already in place for managing network-level authentication and protocols to manage identity verification in those environments <span>[<a href="#RFC8555" class="xref">RFC8555</a>]</span>.
The TCPCL allows for this type of environment by authenticating a lower-level identifier for a peer and requiring the entity to trust that the node ID given by the peer (during session initialization) is valid.
This situation is not ideal, as it allows the vulnerabilities described in <a href="#sec-threat-node-impersonation" class="xref">Section 7.9</a>, but it still provides some amount of mutual authentication to take place for a TCPCL session.<a href="#section-3.4-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-3.4-3">
Even within a single TCPCL session, each entity may operate within different PKI environments and with different identifier limitations.
The requirements related to identifiers in a PKIX certificate are provided in <a href="#sec-tls-identification" class="xref">Section 4.4.1</a>.<a href="#section-3.4-3" class="pilcrow">¶</a></p>
<p id="section-3.4-4">
It is important for interoperability that a TCPCL entity have its own security policy tailored to accommodate the peers with which it is expected to operate.
Some security policy recommendations are given in <a href="#sec-tls-auth-policy-rec" class="xref">Section 4.4.5</a>, but these are meant as a starting point for tailoring.
A strict TLS security policy is appropriate for a private network with a single shared CA.
Operation on the Internet (such as inter-site BP gateways) could trade more lax TCPCL security with the use of encrypted bundle encapsulation <span>[<a href="#I-D.ietf-dtn-bibect" class="xref">DTN-BIBECT</a>]</span> to ensure strong bundle security.<a href="#section-3.4-4" class="pilcrow">¶</a></p>
<p id="section-3.4-5">
By using the Server Name Indication (SNI) DNS name (see <a href="#sec-tls-handshake" class="xref">Section 4.4.3</a>), a single passive entity can act as a convergence layer for multiple BPAs with distinct node IDs.
When this "virtual host" behavior is used, the DNS name is used as the indication of which BP node the active entity is attempting to communicate with.
A virtual host CL entity can be authenticated by a certificate containing all of the DNS names and/or node IDs being hosted or by several certificates each authenticating a single DNS name and/or node ID, using the SNI value from the peer to select which certificate to use.
The logic for mapping an SNI DNS name to an end-entity certificate is an implementation matter and can involve correlating a DNS name with a node ID or other certificate attributes.<a href="#section-3.4-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-session-keeping">
<section id="section-3.5">
<h3 id="name-session-keeping-policies">
<a href="#section-3.5" class="section-number selfRef">3.5. </a><a href="#name-session-keeping-policies" class="section-name selfRef">Session-Keeping Policies</a>
</h3>
<p id="section-3.5-1">
This specification defines requirements regarding how to initiate, sustain, and terminate a TCPCL session but does not impose any requirements on how sessions need to be managed by a BPA.
It is a network administration matter to determine an appropriate session-keeping policy, but guidance given here can be used to steer policy toward performance goals.<a href="#section-3.5-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-3.5-2">
<dt id="section-3.5-2.1">Persistent Session:</dt>
<dd style="margin-left: 1.5em" id="section-3.5-2.2">
This policy preemptively establishes a single session to known entities in the network and keeps the session active using KEEPALIVEs.
Benefits of this policy include reducing the total amount of TCP data that needs to be exchanged for a set of transfers (assuming that the KEEPALIVE size is significantly smaller than the transfer size) and allowing the session state to indicate peer connectivity.
Drawbacks include wasted network resources when a session is mostly idle or when network connectivity is inconsistent (which requires that failed sessions be reestablished), and potential queueing issues when multiple transfers are requested simultaneously.
This policy assumes that there is agreement between pairs of entities as to which of the peers will initiate sessions; if there is no such agreement, there is potential for duplicate sessions to be established between peers.<a href="#section-3.5-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.5-2.3">Ephemeral Sessions:</dt>
<dd style="margin-left: 1.5em" id="section-3.5-2.4">
This policy only establishes a session when an outgoing transfer needs to be sent.
Benefits of this policy include not wasting network resources on sessions that are idle for long periods of time and avoiding potential queueing issues as can be seen when using a single persistent session. Drawbacks include the TCP and TLS overhead of establishing a new session for each transfer.
This policy assumes that each entity can function in a passive role to listen for session requests from any peer that needs to send a transfer; when that is not the case, the polling behavior discussed below needs to happen.
This policy can be augmented to keep the session established as long as any transfers are queued.<a href="#section-3.5-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.5-2.5">Active-Only Polling Sessions:</dt>
<dd style="margin-left: 1.5em" id="section-3.5-2.6">
When naming and/or addressing of one entity is variable (i.e., a dynamically assigned IP address or domain name) or when firewall or routing rules prevent incoming TCP connections, that entity can only function in the active role.
In these cases, sessions also need to be established when an incoming transfer is expected from a peer or based on a periodic schedule.
This polling behavior causes inefficiencies compared to as-needed ephemeral sessions.<a href="#section-3.5-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-3.5-3">
Many other policies can be established in a TCPCL network between the two extremes of single persistent sessions and only ephemeral sessions.
Different policies can be applied to each peer entity and to each bundle as it needs to be transferred (e.g., for quality of service).
Additionally, future session extension types can apply further nuance to session policies and policy negotiation.<a href="#section-3.5-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-transfer-segmentation">
<section id="section-3.6">
<h3 id="name-transfer-segmentation-polic">
<a href="#section-3.6" class="section-number selfRef">3.6. </a><a href="#name-transfer-segmentation-polic" class="section-name selfRef">Transfer Segmentation Policies</a>
</h3>
<p id="section-3.6-1">
Each TCPCL session allows a negotiated transfer segmentation policy to be applied in each transfer direction.
A receiving entity can set the Segment Maximum Receive Unit (MRU) in its SESS_INIT message to determine the largest acceptable segment size, and a transmitting entity can segment a transfer into any sizes smaller than the receiver's Segment MRU.
It is a network administration matter to determine an appropriate segmentation policy for entities using the TCPCL protocol, but guidance given here can be used to steer policy toward performance goals.
Administrators are also advised to consider the Segment MRU in relation to chunking/packetization performed by TLS, TCP, and any intermediate network-layer nodes.<a href="#section-3.6-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-3.6-2">
<dt id="section-3.6-2.1">Minimum Overhead:</dt>
<dd style="margin-left: 1.5em" id="section-3.6-2.2">
For a simple network expected to exchange relatively small bundles, the Segment MRU can be set to be identical to the Transfer MRU, which indicates that all transfers can be sent with a single data segment (i.e., no actual segmentation).
If the network is closed and all transmitters are known to follow a single-segment transfer policy, then receivers can avoid the necessity of segment reassembly.
Because this CL operates over a TCP stream, which suffers from a form of head-of-queue blocking between messages, while one entity is transmitting a single XFER_SEGMENT message it is not able to transmit any XFER_ACK or XFER_REFUSE messages for any associated received transfers.<a href="#section-3.6-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.6-2.3">Predictable Message Sizing:</dt>
<dd style="margin-left: 1.5em" id="section-3.6-2.4">
In situations where the maximum message size is desired to be well controlled, the Segment MRU can be set to the largest acceptable size (the message size less the XFER_SEGMENT header size) and transmitters can always segment a transfer into maximum-size chunks no larger than the Segment MRU.
This guarantees that any single XFER_SEGMENT will not monopolize the TCP stream for too long, which would prevent outgoing XFER_ACK and XFER_REFUSE messages associated with received transfers.<a href="#section-3.6-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-3.6-2.5">Dynamic Segmentation:</dt>
<dd style="margin-left: 1.5em" id="section-3.6-2.6">
Even after negotiation of a Segment MRU for each receiving entity, the actual transfer segmentation only needs to guarantee that any individual segment is no larger than that MRU.
In a situation where TCP throughput is dynamic, the transfer segmentation size can also be dynamic in order to control message transmission duration.<a href="#section-3.6-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-3.6-3">
Many other policies can be established in a TCPCL network between the two extremes of minimum overhead (large MRU, single segment) and predictable message sizing (small MRU, highly segmented).
Different policies can be applied to each transfer stream to and from any particular entity.
Additionally, future session extension and transfer extension types can apply further nuance to transfer policies and policy negotiation.<a href="#section-3.6-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-protocol-example">
<section id="section-3.7">
<h3 id="name-example-message-exchange">
<a href="#section-3.7" class="section-number selfRef">3.7. </a><a href="#name-example-message-exchange" class="section-name selfRef">Example Message Exchange</a>
</h3>
<p id="section-3.7-1">
<a href="#fig-contact-example" class="xref">Figure 15</a> depicts the protocol exchange for a simple session, showing the session establishment and the transmission of a single bundle split into three data segments (of lengths "L1", "L2", and "L3") from Entity A to Entity B.<a href="#section-3.7-1" class="pilcrow">¶</a></p>
<p id="section-3.7-2">
Note that the sending entity can transmit multiple XFER_SEGMENT messages without waiting for the corresponding XFER_ACK responses.
This enables pipelining of messages on a transfer stream.
Although this example only demonstrates a single bundle transmission, it is also possible to pipeline multiple XFER_SEGMENT messages for different bundles without necessarily waiting for XFER_ACK messages to be returned for each one.
However, interleaving data segments from different bundles is not allowed.<a href="#section-3.7-2" class="pilcrow">¶</a></p>
<p id="section-3.7-3">
No errors or rejections are shown in this example.<a href="#section-3.7-3" class="pilcrow">¶</a></p>
<span id="name-an-example-of-the-flow-of-p"></span><div id="fig-contact-example">
<figure id="figure-15">
<div class="alignCenter art-ascii-art art-text artwork" id="section-3.7-4.1">
<pre>
Entity A Entity B
======== ========
+-------------------------+
| Open TCP Connection | -> +-------------------------+
+-------------------------+ <- | Accept Connection |
+-------------------------+
+-------------------------+
| Contact Header | -> +-------------------------+
+-------------------------+ <- | Contact Header |
+-------------------------+
+-------------------------+
| SESS_INIT | -> +-------------------------+
+-------------------------+ <- | SESS_INIT |
+-------------------------+
+-------------------------+
| XFER_SEGMENT (start) | ->
| Transfer ID [I1] |
| Length [L1] |
| Bundle Data 0..(L1-1) |
+-------------------------+
+-------------------------+ +-------------------------+
| XFER_SEGMENT | -> <- | XFER_ACK (start) |
| Transfer ID [I1] | | Transfer ID [I1] |
| Length [L2] | | Length [L1] |
|Bundle Data L1..(L1+L2-1)| +-------------------------+
+-------------------------+
+-------------------------+ +-------------------------+
| XFER_SEGMENT (end) | -> <- | XFER_ACK |
| Transfer ID [I1] | | Transfer ID [I1] |
| Length [L3] | | Length [L1+L2] |
|Bundle Data | +-------------------------+
| (L1+L2)..(L1+L2+L3-1)|
+-------------------------+
+-------------------------+
<- | XFER_ACK (end) |
| Transfer ID [I1] |
| Length [L1+L2+L3] |
+-------------------------+
+-------------------------+
| SESS_TERM | -> +-------------------------+
+-------------------------+ <- | SESS_TERM |
+-------------------------+
+-------------------------+ +-------------------------+
| TCP Close | -> <- | TCP Close |
+-------------------------+ +-------------------------+
</pre>
</div>
<figcaption><a href="#figure-15" class="selfRef">Figure 15</a>:
<a href="#name-an-example-of-the-flow-of-p" class="selfRef">An Example of the Flow of Protocol Messages on a Single TCP Session between Two Entities</a>
</figcaption></figure>
</div>
</section>
</div>
</section>
</div>
<div id="sec-session-establishment">
<section id="section-4">
<h2 id="name-session-establishment">
<a href="#section-4" class="section-number selfRef">4. </a><a href="#name-session-establishment" class="section-name selfRef">Session Establishment</a>
</h2>
<p id="section-4-1">
For bundle transmissions to occur using the TCPCL, a TCPCL session <span class="bcp14">MUST</span> first be established between communicating entities.
It is up to the implementation to decide how and when session setup is triggered.
For example, some sessions can be opened proactively and maintained for as long as is possible given the network conditions, while other sessions will be opened only when there is a bundle that is queued for transmission and the routing algorithm selects a certain next-hop node.<a href="#section-4-1" class="pilcrow">¶</a></p>
<div id="sec-tcp-connection">
<section id="section-4.1">
<h3 id="name-tcp-connection">
<a href="#section-4.1" class="section-number selfRef">4.1. </a><a href="#name-tcp-connection" class="section-name selfRef">TCP Connection</a>
</h3>
<p id="section-4.1-1">
To establish a TCPCL session, an entity <span class="bcp14">MUST</span> first establish a TCP connection with the intended peer entity, typically by using the services provided by the operating system.
Destination port number 4556 has been assigned by IANA as the registered port number for the TCPCL; see <a href="#sec-iana-port" class="xref">Section 8.1</a>.
Other destination port numbers <span class="bcp14">MAY</span> be used per local configuration.
Determining a peer's destination port number (if different from the registered TCPCL port number) is left up to the implementation.
Any source port number <span class="bcp14">MAY</span> be used for TCPCL sessions.
Typically, an operating system assigned number in the TCP Ephemeral range (49152-65535) is used.<a href="#section-4.1-1" class="pilcrow">¶</a></p>
<p id="section-4.1-2">
If the entity is unable to establish a TCP connection for any reason, then it is an implementation matter to determine how to handle the connection failure.
An entity <span class="bcp14">MAY</span> decide to reattempt to establish the connection.
If it does so, it <span class="bcp14">MUST NOT</span> overwhelm its target with repeated connection attempts.
Therefore, the entity <span class="bcp14">MUST NOT</span> retry the connection setup earlier than some delay time from the last attempt, and it <span class="bcp14">SHOULD</span> use a (binary) exponential backoff mechanism to increase this delay in the case of repeated failures.
The upper limit on a reattempt backoff is implementation defined but <span class="bcp14">SHOULD</span> be no longer than one minute (60 seconds) before signaling to the BPA that a connection cannot be made.<a href="#section-4.1-2" class="pilcrow">¶</a></p>
<p id="section-4.1-3">
Once a TCP connection is established, the active entity <span class="bcp14">SHALL</span> immediately transmit its Contact Header. The passive entity <span class="bcp14">SHALL</span> wait for the active entity's Contact Header.
Upon reception of a Contact Header, the passive entity <span class="bcp14">SHALL</span> transmit its Contact Header.
If either entity does not receive a Contact Header after some implementation-defined time duration after the TCP connection is established, the waiting entity <span class="bcp14">SHALL</span> close the TCP connection. Entities <span class="bcp14">SHOULD</span> choose a Contact Header reception timeout interval no longer than one minute (60 seconds).
The ordering of the Contact Header exchange allows the passive entity to avoid allocating resources to a potential TCPCL session until after a valid Contact Header has been received from the active entity.
This ordering also allows the passive peer to adapt to alternate TCPCL protocol versions.<a href="#section-4.1-3" class="pilcrow">¶</a></p>
<p id="section-4.1-4">
The format of the Contact Header is described in <a href="#sec-contact-header" class="xref">Section 4.2</a>.
Because the TCPCL protocol version in use is part of the initial Contact Header, entities using TCPCL version 4 can coexist on a network with entities using earlier TCPCL versions (with some negotiation needed for interoperation, as described in <a href="#sec-contact-negotiate" class="xref">Section 4.3</a>).<a href="#section-4.1-4" class="pilcrow">¶</a></p>
<p id="section-4.1-5">
Within this specification, when an entity is said to "close" a TCP connection the entity <span class="bcp14">SHALL</span> use the TCP FIN mechanism and not the RST mechanism.
However, either mechanism, when received, will cause a TCP connection to become closed.<a href="#section-4.1-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-contact-header">
<section id="section-4.2">
<h3 id="name-contact-header">
<a href="#section-4.2" class="section-number selfRef">4.2. </a><a href="#name-contact-header" class="section-name selfRef">Contact Header</a>
</h3>
<p id="section-4.2-1">
This section describes the format of the Contact Header and the meaning of its fields.<a href="#section-4.2-1" class="pilcrow">¶</a></p>
<p id="section-4.2-2">
If the entity is configured to enable the exchange of messages according to TLS 1.3 <span>[<a href="#RFC8446" class="xref">RFC8446</a>]</span> or any successors that are compatible with that TLS ClientHello, the <code>CAN_TLS</code> flag within its Contact Header <span class="bcp14">SHALL</span> be set to 1.
The <span class="bcp14">RECOMMENDED</span> policy is to enable TLS for all sessions, even if security policy does not allow or require authentication.
This follows the "opportunistic security" model specified in <span>[<a href="#RFC7435" class="xref">RFC7435</a>]</span>, though an active attacker could interfere with the exchange in such cases (see <a href="#sec-threat-tls-strip" class="xref">Section 7.4</a>).<a href="#section-4.2-2" class="pilcrow">¶</a></p>
<p id="section-4.2-3">
Upon receipt of the Contact Header, both entities perform the validation and negotiation procedures defined in <a href="#sec-contact-negotiate" class="xref">Section 4.3</a>.
After receiving the Contact Header from the other entity, either entity <span class="bcp14">MAY</span> refuse the session by sending a SESS_TERM message with an appropriate reason code.<a href="#section-4.2-3" class="pilcrow">¶</a></p>
<p id="section-4.2-4">
The format for the Contact Header is as follows:<a href="#section-4.2-4" class="pilcrow">¶</a></p>
<span id="name-contact-header-format"></span><div id="fig-contact-header">
<figure id="figure-16">
<div class="alignCenter art-ascii-art art-text artwork" id="section-4.2-5.1">
<pre>
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 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
+---------------+---------------+---------------+---------------+
| magic='dtn!' |
+---------------+---------------+---------------+---------------+
| Version | Flags |
+---------------+---------------+
</pre>
</div>
<figcaption><a href="#figure-16" class="selfRef">Figure 16</a>:
<a href="#name-contact-header-format" class="selfRef">Contact Header Format</a>
</figcaption></figure>
</div>
<p id="section-4.2-6">
See <a href="#sec-contact-negotiate" class="xref">Section 4.3</a> for details on the use of each of these Contact Header fields.<a href="#section-4.2-6" class="pilcrow">¶</a></p>
<p id="section-4.2-7">
The fields of the Contact Header are as follows:<a href="#section-4.2-7" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.2-8">
<dt id="section-4.2-8.1">magic:</dt>
<dd style="margin-left: 1.5em" id="section-4.2-8.2">
A four-octet field that always contains the octet sequence 0x64 0x74 0x6E 0x21, i.e., the text string "dtn!" in US-ASCII (and UTF-8).<a href="#section-4.2-8.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.2-8.3">Version:</dt>
<dd style="margin-left: 1.5em" id="section-4.2-8.4">
A one-octet field value containing the value 4 (current version of the TCPCL protocol).<a href="#section-4.2-8.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.2-8.5">Flags:</dt>
<dd style="margin-left: 1.5em" id="section-4.2-8.6">
A one-octet field of single-bit flags, interpreted according to the descriptions in <a href="#tab-contact-header-flags" class="xref">Table 1</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.<a href="#section-4.2-8.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-contact-header-flags"></span><div id="tab-contact-header-flags">
<table class="center" id="table-1">
<caption>
<a href="#table-1" class="selfRef">Table 1</a>:
<a href="#name-contact-header-flags" class="selfRef">Contact Header Flags</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>CAN_TLS</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that the sending peer has enabled TLS security.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
<td class="text-left" rowspan="1" colspan="1">others</td>
<td class="text-left" rowspan="1" colspan="1"></td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-contact-negotiate">
<section id="section-4.3">
<h3 id="name-contact-validation-and-nego">
<a href="#section-4.3" class="section-number selfRef">4.3. </a><a href="#name-contact-validation-and-nego" class="section-name selfRef">Contact Validation and Negotiation</a>
</h3>
<p id="section-4.3-1">
Upon reception of the Contact Header, each entity follows the following procedures to ensure the validity of the TCPCL session and to negotiate values for the session parameters.<a href="#section-4.3-1" class="pilcrow">¶</a></p>
<p id="section-4.3-2">
If the "magic string" is not present or is not valid, the connection <span class="bcp14">MUST</span> be terminated.
The intent of the magic string is to provide some protection against an inadvertent TCP connection by a different protocol than the one described in this document.
To prevent a flood of repeated connections from a misconfigured application, a passive entity <span class="bcp14">MAY</span> deny new TCP connections from a specific peer address for a period of time after one or more connections fail to provide a decodable Contact Header.<a href="#section-4.3-2" class="pilcrow">¶</a></p>
<p id="section-4.3-3">
The first negotiation attempts to determine which TCPCL protocol version to use.
The active entity always sends its Contact Header first and waits for a response from the passive entity.
During contact initiation, the active TCPCL entity <span class="bcp14">SHALL</span> send the highest TCPCL protocol version on a first session attempt for a TCPCL peer.
If the active entity receives a Contact Header with a lower protocol version than the one sent earlier on the TCP connection, the TCP connection <span class="bcp14">SHALL</span> be closed.
If the active entity receives a SESS_TERM message with a reason code of "Version mismatch", that entity <span class="bcp14">MAY</span> attempt further TCPCL sessions with the peer using earlier protocol version numbers in decreasing order.
Managing multi-TCPCL-session state such as this is an implementation matter.<a href="#section-4.3-3" class="pilcrow">¶</a></p>
<p id="section-4.3-4">
If the passive entity receives a Contact Header containing a version that is not a version of the TCPCL protocol that the entity implements, then the entity <span class="bcp14">SHALL</span> send its Contact Header and immediately terminate the session with a reason code of "Version mismatch".
If the passive entity receives a Contact Header with a version that is lower than the latest version of the protocol that the entity implements, the entity <span class="bcp14">MAY</span> either terminate the session (with a reason code of "Version mismatch") or adapt its operation to conform to the older version of the protocol.
The decision of version fallback is an implementation matter.<a href="#section-4.3-4" class="pilcrow">¶</a></p>
<p id="section-4.3-5">
The negotiated contact parameters defined by this specification are described in the following paragraphs.<a href="#section-4.3-5" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.3-6">
<dt id="section-4.3-6.1">TCPCL Version:</dt>
<dd style="margin-left: 1.5em" id="section-4.3-6.2">
Both Contact Headers of a successful contact negotiation have identical TCPCL version numbers as described above.
Only upon response of a Contact Header from the passive entity is the TCPCL protocol version established and session negotiation begun.<a href="#section-4.3-6.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.3-6.3">Enable TLS:</dt>
<dd style="margin-left: 1.5em" id="section-4.3-6.4">
<p id="section-4.3-6.4.1">
Negotiation of the Enable TLS parameter is performed by taking the logical AND of the two Contact Headers' <code>CAN_TLS</code> flags.
A local security policy is then applied to determine whether the negotiated value of Enable TLS is acceptable.
A reasonable security policy would require or disallow the use of TLS, depending upon the desired network flows.
The <span class="bcp14">RECOMMENDED</span> policy is to require TLS for all sessions, even if security policy does not allow or require authentication.
Because this state is negotiated over an unsecured medium, there is a risk of TLS Stripping as described in <a href="#sec-threat-tls-strip" class="xref">Section 7.4</a>.<a href="#section-4.3-6.4.1" class="pilcrow">¶</a></p>
<p id="section-4.3-6.4.2">
If the Enable TLS state is unacceptable, the entity <span class="bcp14">SHALL</span> terminate the session with a reason code of "Contact Failure".
Note that this "Contact Failure" reason is different than a failure of a TLS handshake or TLS authentication after an agreed-upon and acceptable Enable TLS state.
If the negotiated Enable TLS value is "true" and acceptable, then the TLS negotiation feature described in <a href="#sec-session-security" class="xref">Section 4.4</a> begins immediately following the Contact Header exchange.<a href="#section-4.3-6.4.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
<div id="sec-session-security">
<section id="section-4.4">
<h3 id="name-session-security">
<a href="#section-4.4" class="section-number selfRef">4.4. </a><a href="#name-session-security" class="section-name selfRef">Session Security</a>
</h3>
<p id="section-4.4-1">
This version of the TCPCL protocol supports establishing a TLS session within an existing TCP connection.
When TLS is used within the TCPCL, it affects the entire session.
Once TLS is established, there is no mechanism available to downgrade the TCPCL session to non-TLS operation.<a href="#section-4.4-1" class="pilcrow">¶</a></p>
<p id="section-4.4-2">
Once established, the lifetime of a TLS connection <span class="bcp14">SHALL</span> be bound to the lifetime of the underlying TCP connection.
Immediately prior to actively ending a TLS connection after TCPCL session termination, the peer that sent the original (non-reply) SESS_TERM message <span class="bcp14">SHOULD</span> follow the closure alert procedure provided in <span>[<a href="#RFC8446" class="xref">RFC8446</a>]</span> to cleanly terminate the TLS connection.
Because each TCPCL message is either fixed length or self-indicates its length, the lack of a TLS closure alert will not cause data truncation or corruption.<a href="#section-4.4-2" class="pilcrow">¶</a></p>
<p id="section-4.4-3">
Subsequent TCPCL session attempts to the same passive entity <span class="bcp14">MAY</span> attempt to use the TLS session resumption feature.
There is no guarantee that the passive entity will accept the request to resume a TLS session, and the active entity cannot assume any resumption outcome.<a href="#section-4.4-3" class="pilcrow">¶</a></p>
<div id="sec-tls-identification">
<section id="section-4.4.1">
<h4 id="name-entity-identification">
<a href="#section-4.4.1" class="section-number selfRef">4.4.1. </a><a href="#name-entity-identification" class="section-name selfRef">Entity Identification</a>
</h4>
<p id="section-4.4.1-1">
The TCPCL uses TLS for certificate exchange in both directions to identify each entity and to allow each entity to authenticate its peer.
Each certificate can potentially identify multiple entities, and there is no problem using such a certificate as long as the identifiers are sufficient to meet authentication policy (as described in later sections) for the entity that presents it.<a href="#section-4.4.1-1" class="pilcrow">¶</a></p>
<p id="section-4.4.1-2">
Because the PKIX environment of each TCPCL entity is likely not controlled by the certificate end users (see <a href="#sec-pkix-env" class="xref">Section 3.4</a>), the TCPCL defines a prioritized list of what a certificate can identify regarding a TCPCL entity:<a href="#section-4.4.1-2" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.4.1-3">
<dt id="section-4.4.1-3.1">Node ID:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.1-3.2">
The ideal certificate identity is the node ID of the entity using the NODE-ID, as defined below.
When the node ID is identified, there is no need for any lower-level identification to be present (though it can still be present, and if so it is also validated).<a href="#section-4.4.1-3.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.1-3.3">DNS Name:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.1-3.4">
If CA policy forbids a certificate to contain an arbitrary NODE-ID but allows a DNS-ID to be identified, then one or more stable DNS names can be identified in the certificate.
The use of wildcard DNS-IDs is discouraged due to the complex rules for matching and dependence on implementation support for wildcard matching (see <span><a href="https://www.rfc-editor.org/rfc/rfc6125#section-6.4.3" class="relref">Section 6.4.3</a> of [<a href="#RFC6125" class="xref">RFC6125</a>]</span>).<a href="#section-4.4.1-3.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.1-3.5">Network Address:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.1-3.6">
If no stable DNS name is available but a stable network address is available and CA policy allows a certificate to contain an IPADDR-ID (as defined below), then one or more network addresses can be identified in the certificate.<a href="#section-4.4.1-3.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-4.4.1-4">
This specification defines a NODE-ID of a certificate as being the subjectAltName entry of type otherName with a name form of <code>BundleEID</code> (see <a href="#sec-pkix-oids" class="xref">Section 4.4.2.1</a>) and a value limited to a node ID.
An entity <span class="bcp14">SHALL</span> ignore any entry of type otherName with a name form of <code>BundleEID</code> and a value that is some URI other than a node ID.
The NODE-ID is similar to the URI-ID as defined in <span>[<a href="#RFC6125" class="xref">RFC6125</a>]</span> but is restricted to a node ID rather than a URI with a qualified-name authority part.
Unless specified otherwise by the definition of the URI scheme being authenticated, URI matching of a NODE-ID <span class="bcp14">SHALL</span> use the URI comparison logic provided in <span>[<a href="#RFC3986" class="xref">RFC3986</a>]</span> and scheme-based normalization of those schemes specified in <span>[<a href="#RFC9171" class="xref">RFC9171</a>]</span>.
A URI scheme can refine this "exact match" logic with rules regarding how node IDs within that scheme are to be compared with the certificate-authenticated NODE-ID.<a href="#section-4.4.1-4" class="pilcrow">¶</a></p>
<p id="section-4.4.1-5">
This specification reuses the DNS-ID definition in <span><a href="https://www.rfc-editor.org/rfc/rfc6125#section-1.8" class="relref">Section 1.8</a> of [<a href="#RFC6125" class="xref">RFC6125</a>]</span>, which is the subjectAltName entry of type dNSName whose value is encoded according to <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span>.<a href="#section-4.4.1-5" class="pilcrow">¶</a></p>
<p id="section-4.4.1-6">
This specification defines an IPADDR-ID of a certificate as being the subjectAltName entry of type iPAddress whose value is encoded according to <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span>.<a href="#section-4.4.1-6" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-tcpcl-cert-profile">
<section id="section-4.4.2">
<h4 id="name-certificate-profile-for-the">
<a href="#section-4.4.2" class="section-number selfRef">4.4.2. </a><a href="#name-certificate-profile-for-the" class="section-name selfRef">Certificate Profile for the TCPCL</a>
</h4>
<p id="section-4.4.2-1">
All end-entity certificates used by a TCPCL entity <span class="bcp14">SHALL</span> conform to <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span>, or any updates or successors to that profile.
When an end-entity certificate is supplied, the full certification chain <span class="bcp14">SHOULD</span> be included unless security policy indicates that is unnecessary.
An entity <span class="bcp14">SHOULD</span> omit the root CA certificate (the last item of the chain) when sending a certification chain, as the recipient already has the root CA to anchor its validation.<a href="#section-4.4.2-1" class="pilcrow">¶</a></p>
<p id="section-4.4.2-2">
The TCPCL requires version 3 certificates due to the extensions used by this profile.
TCPCL entities <span class="bcp14">SHALL</span> reject as invalid version 1 and version 2 end-entity certificates.<a href="#section-4.4.2-2" class="pilcrow">¶</a></p>
<p id="section-4.4.2-3">
TCPCL entities <span class="bcp14">SHALL</span> accept certificates that contain an empty Subject field or contain a Subject without a Common Name.
Identity information in end-entity certificates is contained entirely in the subjectAltName extension as defined in <a href="#sec-tls-identification" class="xref">Section 4.4.1</a> and discussed in the paragraphs below.<a href="#section-4.4.2-3" class="pilcrow">¶</a></p>
<p id="section-4.4.2-4">
All end-entity and CA certificates used for the TCPCL <span class="bcp14">SHOULD</span> contain both a subject key identifier and an authority key identifier extension in accordance with <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span>.
TCPCL entities <span class="bcp14">SHOULD NOT</span> rely on either a subject key identifier or an authority key identifier being present in any received certificate. Including key identifiers simplifies the work of an entity that needs to assemble a certification chain.<a href="#section-4.4.2-4" class="pilcrow">¶</a></p>
<p id="section-4.4.2-5">
Unless prohibited by CA policy, a TCPCL end-entity certificate <span class="bcp14">SHALL</span> contain a NODE-ID that authenticates the node ID of the peer.
When assigned one or more stable DNS names, a TCPCL end-entity certificate <span class="bcp14">SHOULD</span> contain a DNS-ID that authenticates those (fully qualified) names.
When assigned one or more stable network addresses, a TCPCL end-entity certificate <span class="bcp14">MAY</span> contain an IPADDR-ID that authenticates those addresses.<a href="#section-4.4.2-5" class="pilcrow">¶</a></p>
<p id="section-4.4.2-6">
When allowed by CA policy, a Bundle Protocol Security (BPSec; see <span>[<a href="#RFC9172" class="xref">RFC9172</a>]</span>) end-entity certificate <span class="bcp14">SHOULD</span> contain a PKIX Extended Key Usage (EKU) extension in accordance with <span><a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.12" class="relref">Section 4.2.1.12</a> of [<a href="#RFC5280" class="xref">RFC5280</a>]</span>.
When the PKIX EKU extension is present, it <span class="bcp14">SHOULD</span> contain the key purpose <code>id-kp-bundleSecurity</code> (see <a href="#sec-pkix-oids" class="xref">Section 4.4.2.1</a>).
Although not specifically required by the TCPCL, some networks or TLS implementations assume that <code>id-kp-clientAuth</code> and <code>id-kp-serverAuth</code> need to be used for the client side and the server side of TLS authentication, respectively.
For interoperability, a TCPCL end-entity certificate <span class="bcp14">MAY</span> contain an EKU with both <code>id-kp-clientAuth</code> and <code>id-kp-serverAuth</code> values.<a href="#section-4.4.2-6" class="pilcrow">¶</a></p>
<p id="section-4.4.2-7">
When allowed by CA policy, a TCPCL end-entity certificate <span class="bcp14">SHOULD</span> contain a PKIX key usage extension in accordance with <span><a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3" class="relref">Section 4.2.1.3</a> of [<a href="#RFC5280" class="xref">RFC5280</a>]</span>.
The PKIX key usage bit that is consistent with TCPCL security using TLS 1.3 is digitalSignature.
The specific algorithms used during the TLS handshake will determine which of those key uses are exercised.
Earlier versions of TLS can mandate the use of the keyEncipherment bit or the keyAgreement bit.<a href="#section-4.4.2-7" class="pilcrow">¶</a></p>
<p id="section-4.4.2-8">
When allowed by CA policy, a TCPCL end-entity certificate <span class="bcp14">SHOULD</span> contain an Online Certificate Status Protocol (OCSP) URI within an authority information access extension in accordance with <span><a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.2.1" class="relref">Section 4.2.2.1</a> of [<a href="#RFC5280" class="xref">RFC5280</a>]</span>.<a href="#section-4.4.2-8" class="pilcrow">¶</a></p>
<div id="sec-pkix-oids">
<section id="section-4.4.2.1">
<h5 id="name-pkix-oid-allocations">
<a href="#section-4.4.2.1" class="section-number selfRef">4.4.2.1. </a><a href="#name-pkix-oid-allocations" class="section-name selfRef">PKIX OID Allocations</a>
</h5>
<p id="section-4.4.2.1-1">
This document defines a PKIX Other Name Form identifier, <code>id-on-bundleEID</code>, in <a href="#sec-asn1-mod" class="xref">Appendix B</a>; this identifier can be used as the <code>type-id</code> in a subjectAltName entry of type otherName.
The <code>BundleEID</code> value associated with the otherName type-id <code>id-on-bundleEID</code> <span class="bcp14">SHALL</span> be a URI, encoded as an IA5String, with a scheme that is present in the IANA "Bundle Protocol URI Scheme Types" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>.
Although this Other Name Form allows any endpoint ID to be present, the NODE-ID defined in <a href="#sec-tls-identification" class="xref">Section 4.4.1</a> limits its use to contain only a node ID.<a href="#section-4.4.2.1-1" class="pilcrow">¶</a></p>
<p id="section-4.4.2.1-2">
This document defines a PKIX EKU key purpose, <code>id-kp-bundleSecurity</code>, in <a href="#sec-asn1-mod" class="xref">Appendix B</a>; this purpose can be used to restrict a certificate's use.
The <code>id-kp-bundleSecurity</code> purpose can be combined with other purposes in the same certificate.<a href="#section-4.4.2.1-2" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="sec-tls-handshake">
<section id="section-4.4.3">
<h4 id="name-tls-handshake">
<a href="#section-4.4.3" class="section-number selfRef">4.4.3. </a><a href="#name-tls-handshake" class="section-name selfRef">TLS Handshake</a>
</h4>
<p id="section-4.4.3-1">
The use of TLS is negotiated via the Contact Header, as described in <a href="#sec-contact-negotiate" class="xref">Section 4.3</a>.
After negotiating an Enable TLS parameter of "true", and before any other TCPCL messages are sent within the session, the session entities <span class="bcp14">SHALL</span> begin a TLS handshake in accordance with <span>[<a href="#RFC8446" class="xref">RFC8446</a>]</span>.
By convention, this protocol uses the entity that initiated the underlying TCP connection (the active peer) as the "client" role of the TLS handshake request.<a href="#section-4.4.3-1" class="pilcrow">¶</a></p>
<p id="section-4.4.3-2">
The TLS handshake, if it occurs, is considered to be part of the contact negotiation before the TCPCL session itself is established.
Specifics regarding exposure of sensitive data are discussed in <a href="#sec-security" class="xref">Section 7</a>.<a href="#section-4.4.3-2" class="pilcrow">¶</a></p>
<p id="section-4.4.3-3">
The parameters within each TLS negotiation are implementation dependent but any TCPCL entity <span class="bcp14">SHALL</span> follow all recommended practices specified in <span><a href="#RFC7525" class="xref">BCP 195</a> [<a href="#RFC7525" class="xref">RFC7525</a>]</span>, or any updates or successors that become part of BCP 195.
Within each TLS handshake, the following requirements apply (using the rough order in which they occur):<a href="#section-4.4.3-3" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.4.3-4">
<dt id="section-4.4.3-4.1">ClientHello:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.3-4.2">
<p id="section-4.4.3-4.2.1">
When a resolved DNS name was used to establish the TCP connection, the TLS ClientHello <span class="bcp14">SHOULD</span> include a "server_name" extension in accordance with <span>[<a href="#RFC6066" class="xref">RFC6066</a>]</span>.
When present, the server_name extension <span class="bcp14">SHALL</span> contain a "HostName" value taken from the DNS name (of the passive entity) that was resolved.<a href="#section-4.4.3-4.2.1" class="pilcrow">¶</a></p>
<aside id="section-4.4.3-4.2.2">
<p id="section-4.4.3-4.2.2.1">
Note: The "HostName" in the server_name extension is the network name for the passive entity, not the node ID of that entity.<a href="#section-4.4.3-4.2.2.1" class="pilcrow">¶</a></p>
</aside>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.3-4.3">Server Certificate:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.3-4.4">
The passive entity <span class="bcp14">SHALL</span> supply a certificate within the TLS handshake to allow authentication of its side of the session.
The supplied end-entity certificate <span class="bcp14">SHALL</span> conform to the profile described in <a href="#sec-tcpcl-cert-profile" class="xref">Section 4.4.2</a>.
The passive entity <span class="bcp14">MAY</span> use the SNI DNS name to choose an appropriate server-side certificate that authenticates that DNS name.<a href="#section-4.4.3-4.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.3-4.5">Certificate Request:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.3-4.6">
During the TLS handshake, the passive entity <span class="bcp14">SHALL</span> request a client-side certificate.<a href="#section-4.4.3-4.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.3-4.7">Client Certificate:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.3-4.8">
The active entity <span class="bcp14">SHALL</span> supply a certificate chain within the TLS handshake to allow authentication of its side of the session.
The supplied end-entity certificate <span class="bcp14">SHALL</span> conform to the profile described in <a href="#sec-tcpcl-cert-profile" class="xref">Section 4.4.2</a>.<a href="#section-4.4.3-4.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-4.4.3-5">
If a TLS handshake cannot negotiate a TLS connection, both entities of the TCPCL session <span class="bcp14">SHALL</span> close the TCP connection.
At this point, the TCPCL session has not yet been established, so there is no TCPCL session to terminate.<a href="#section-4.4.3-5" class="pilcrow">¶</a></p>
<p id="section-4.4.3-6">
After a TLS connection is successfully established, the active entity <span class="bcp14">SHALL</span> send a SESS_INIT message to begin session negotiation.
This session negotiation and all subsequent messaging are secured.<a href="#section-4.4.3-6" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-tls-authentication">
<section id="section-4.4.4">
<h4 id="name-tls-authentication">
<a href="#section-4.4.4" class="section-number selfRef">4.4.4. </a><a href="#name-tls-authentication" class="section-name selfRef">TLS Authentication</a>
</h4>
<p id="section-4.4.4-1">
Using PKIX certificates exchanged during the TLS handshake, each of the entities can authenticate a peer node ID directly or authenticate the peer DNS name or network address.
The logic for handling certificates and certificate data is separated into the following phases:<a href="#section-4.4.4-1" class="pilcrow">¶</a></p>
<ol start="1" type="1" class="normal type-1" id="section-4.4.4-2">
<li id="section-4.4.4-2.1">Validating the certification path from the end-entity certificate up to a trusted root CA.<a href="#section-4.4.4-2.1" class="pilcrow">¶</a>
</li>
<li id="section-4.4.4-2.2">Validating the EKU and other properties of the end-entity certificate.<a href="#section-4.4.4-2.2" class="pilcrow">¶</a>
</li>
<li id="section-4.4.4-2.3">Authenticating identities from a valid end-entity certificate.<a href="#section-4.4.4-2.3" class="pilcrow">¶</a>
</li>
<li id="section-4.4.4-2.4">Applying security policy to the result of each identity type authentication.<a href="#section-4.4.4-2.4" class="pilcrow">¶</a>
</li>
</ol>
<p id="section-4.4.4-3">
The result of validating a peer identity (see <a href="#sec-tls-identification" class="xref">Section 4.4.1</a>) against one or more types of certificate claims is one of the following:<a href="#section-4.4.4-3" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.4.4-4">
<dt id="section-4.4.4-4.1">Absent:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.4-4.2">
Indicating that no such claims are present in the certificate and the identity cannot be authenticated.<a href="#section-4.4.4-4.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.4-4.3">Success:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.4-4.4">
Indicating that one or more such claims are present and at least one matches the peer identity value.<a href="#section-4.4.4-4.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.4.4-4.5">Failure:</dt>
<dd style="margin-left: 1.5em" id="section-4.4.4-4.6">
Indicating that one or more such claims are present and none match the peer identity.<a href="#section-4.4.4-4.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<div id="sec-tls-auth-valid-cert">
<section id="section-4.4.4.1">
<h5 id="name-certificate-path-and-purpos">
<a href="#section-4.4.4.1" class="section-number selfRef">4.4.4.1. </a><a href="#name-certificate-path-and-purpos" class="section-name selfRef">Certificate Path and Purpose Validation</a>
</h5>
<p id="section-4.4.4.1-1">
For any peer end-entity certificate received during the TLS handshake, the entity <span class="bcp14">SHALL</span> perform the certification path validation described in <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span> up to one of the entity's trusted CA certificates.
If enabled by local policy, the entity <span class="bcp14">SHALL</span> perform an OCSP check of each certificate providing OCSP authority information in accordance with <span>[<a href="#RFC6960" class="xref">RFC6960</a>]</span>.
If certificate validation fails or if security policy disallows a certificate for any reason, the entity <span class="bcp14">SHALL</span> fail the TLS handshake with a "bad_certificate" alert.
Leaving out part of the certification chain can cause the entity to fail to validate a certificate if the certificates that were left out are unknown to the entity (see <a href="#sec-threat-untrust-cert" class="xref">Section 7.6</a>).<a href="#section-4.4.4.1-1" class="pilcrow">¶</a></p>
<p id="section-4.4.4.1-2">
For the end-entity peer certificate received during the TLS handshake, the entity <span class="bcp14">SHALL</span> apply security policy to the key usage extension (if present) and EKU extension (if present) in accordance with Sections <a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.12" class="relref">4.2.1.12</a> and <a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3" class="relref">4.2.1.3</a> of <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span>, respectively, and with the profile discussed in <a href="#sec-tcpcl-cert-profile" class="xref">Section 4.4.2</a> of this document.<a href="#section-4.4.4.1-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-tls-auth-valid-netid">
<section id="section-4.4.4.2">
<h5 id="name-network-level-authenticatio">
<a href="#section-4.4.4.2" class="section-number selfRef">4.4.4.2. </a><a href="#name-network-level-authenticatio" class="section-name selfRef">Network-Level Authentication</a>
</h5>
<p id="section-4.4.4.2-1">
Either during or immediately after the TLS handshake, each entity, if required by security policy, <span class="bcp14">SHALL</span> validate the following certificate identifiers together in accordance with <span><a href="https://www.rfc-editor.org/rfc/rfc6125#section-6" class="relref">Section 6</a> of [<a href="#RFC6125" class="xref">RFC6125</a>]</span>:<a href="#section-4.4.4.2-1" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-4.4.4.2-2.1">
If the active entity resolved a DNS name (of the passive entity) in order to initiate the TCP connection, that DNS name <span class="bcp14">SHALL</span> be used as a DNS-ID reference identifier.<a href="#section-4.4.4.2-2.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-4.4.4.2-2.2">
The IP address of the other side of the TCP connection <span class="bcp14">SHALL</span> be used as an IPADDR-ID reference identifier.<a href="#section-4.4.4.2-2.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-4.4.4.2-3">
If the network-level identifier's authentication result is Failure or if the result is Absent and security policy requires an authenticated network-level identifier, the entity <span class="bcp14">SHALL</span> terminate the session (with a reason code of "Contact Failure").<a href="#section-4.4.4.2-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-tls-auth-valid-nodeid">
<section id="section-4.4.4.3">
<h5 id="name-node-id-authentication">
<a href="#section-4.4.4.3" class="section-number selfRef">4.4.4.3. </a><a href="#name-node-id-authentication" class="section-name selfRef">Node ID Authentication</a>
</h5>
<p id="section-4.4.4.3-1">
Immediately before session parameter negotiation, each entity, if required by security policy, <span class="bcp14">SHALL</span> validate the certificate NODE-ID in accordance with <span><a href="https://www.rfc-editor.org/rfc/rfc6125#section-6" class="relref">Section 6</a> of [<a href="#RFC6125" class="xref">RFC6125</a>]</span> using the node ID of the peer's SESS_INIT message as the NODE-ID reference identifier.
If the NODE-ID validation result is Failure or if the result is Absent and security policy requires an authenticated node ID, the entity <span class="bcp14">SHALL</span> terminate the session (with a reason code of "Contact Failure").<a href="#section-4.4.4.3-1" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="sec-tls-auth-policy-rec">
<section id="section-4.4.5">
<h4 id="name-policy-recommendations">
<a href="#section-4.4.5" class="section-number selfRef">4.4.5. </a><a href="#name-policy-recommendations" class="section-name selfRef">Policy Recommendations</a>
</h4>
<p id="section-4.4.5-1">
A <span class="bcp14">RECOMMENDED</span> security policy encompasses the following:<a href="#section-4.4.5-1" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-4.4.5-2.1">enabling the use of OCSP checking during the TLS handshake.<a href="#section-4.4.5-2.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-4.4.5-2.2">instructing that, if an EKU extension is present, the extension needs to contain <code>id-kp-bundleSecurity</code> (<a href="#sec-pkix-oids" class="xref">Section 4.4.2.1</a>) to be usable with TCPCL security.<a href="#section-4.4.5-2.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-4.4.5-2.3">requiring a validated node ID (<a href="#sec-tls-auth-valid-nodeid" class="xref">Section 4.4.4.3</a>) and ignoring any network-level identifier (<a href="#sec-tls-auth-valid-netid" class="xref">Section 4.4.4.2</a>).<a href="#section-4.4.5-2.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-4.4.5-3">
This policy relies on and informs the certificate requirements provided in <a href="#sec-tls-handshake" class="xref">Section 4.4.3</a>.
This policy assumes that a DTN-aware CA (see <a href="#sec-pkix-env" class="xref">Section 3.4</a>) will only issue a certificate for a node ID when it has verified that the private key holder actually controls the bundle node; this is needed to avoid the threat identified in <a href="#sec-threat-node-impersonation" class="xref">Section 7.9</a>.
This policy requires that a certificate contain a NODE-ID and allows the certificate to also contain network-level identifiers.
A tailored policy on a more controlled network could relax the requirement on node ID validation and allow just network-level identifiers to authenticate a peer.<a href="#section-4.4.5-3" class="pilcrow">¶</a></p>
</section>
</div>
<section id="section-4.4.6">
<h4 id="name-example-tls-initiation">
<a href="#section-4.4.6" class="section-number selfRef">4.4.6. </a><a href="#name-example-tls-initiation" class="section-name selfRef">Example TLS Initiation</a>
</h4>
<p id="section-4.4.6-1">
A summary of a typical TLS initiation is shown in the sequence in <a href="#fig-tls-example" class="xref">Figure 17</a> below.
In this example, the active peer terminates the session, but termination can be initiated from either peer.<a href="#section-4.4.6-1" class="pilcrow">¶</a></p>
<span id="name-a-simple-visual-example-of-"></span><div id="fig-tls-example">
<figure id="figure-17">
<div class="alignCenter art-ascii-art art-text artwork" id="section-4.4.6-2.1">
<pre>
Entity A Entity B
active peer passive peer
+-------------------------+
| Open TCP Connection | -> +-------------------------+
+-------------------------+ <- | Accept Connection |
+-------------------------+
+-------------------------+
| Contact Header | -> +-------------------------+
+-------------------------+ <- | Contact Header |
+-------------------------+
+-------------------------+ +-------------------------+
| TLS Negotiation | -> <- | TLS Negotiation |
| (as client) | | (as server) |
+-------------------------+ +-------------------------+
DNS-ID and IPADDR-ID authentication occurs.
Secured TCPCL messaging can begin.
+-------------------------+
| SESS_INIT | -> +-------------------------+
+-------------------------+ <- | SESS_INIT |
+-------------------------+
NODE-ID authentication occurs.
Session is established, transfers can begin.
+-------------------------+
| SESS_TERM | -> +-------------------------+
+-------------------------+ <- | SESS_TERM |
+-------------------------+
+-------------------------+
| TLS Closure Alert | -> +-------------------------+
+-------------------------+ <- | TLS Closure Alert |
+-------------------------+
+-------------------------+ +-------------------------+
| TCP Close | -> <- | TCP Close |
+-------------------------+ +-------------------------+
</pre>
</div>
<figcaption><a href="#figure-17" class="selfRef">Figure 17</a>:
<a href="#name-a-simple-visual-example-of-" class="selfRef">A Simple Visual Example of TCPCL TLS Establishment between Two Entities</a>
</figcaption></figure>
</div>
</section>
</section>
</div>
<div id="sec-msg-header">
<section id="section-4.5">
<h3 id="name-message-header">
<a href="#section-4.5" class="section-number selfRef">4.5. </a><a href="#name-message-header" class="section-name selfRef">Message Header</a>
</h3>
<p id="section-4.5-1">
After the initial exchange of a Contact Header and (if TLS is negotiated to be used) the TLS handshake, all messages transmitted over the session are identified by a one-octet header with the following structure:<a href="#section-4.5-1" class="pilcrow">¶</a></p>
<span id="name-format-of-the-message-heade"></span><div id="fig-msg-header">
<figure id="figure-18">
<div class="alignCenter art-ascii-art art-text artwork" id="section-4.5-2.1">
<pre>
0 1 2 3 4 5 6 7
+---------------+
| Message Type |
+---------------+
</pre>
</div>
<figcaption><a href="#figure-18" class="selfRef">Figure 18</a>:
<a href="#name-format-of-the-message-heade" class="selfRef">Format of the Message Header</a>
</figcaption></figure>
</div>
<p id="section-4.5-3">The Message Header contains the following field:<a href="#section-4.5-3" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.5-4">
<dt id="section-4.5-4.1">Message Type:</dt>
<dd style="margin-left: 1.5em" id="section-4.5-4.2">Indicates the type of the message as per <a href="#tab-msg-types" class="xref">Table 2</a> below.
Encoded values are listed in <a href="#sec-iana-message-types" class="xref">Section 8.5</a>.<a href="#section-4.5-4.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-tcpcl-message-types"></span><div id="tab-msg-types">
<table class="center" id="table-2">
<caption>
<a href="#table-2" class="selfRef">Table 2</a>:
<a href="#name-tcpcl-message-types" class="selfRef">TCPCL Message Types</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">SESS_INIT</td>
<td class="text-left" rowspan="1" colspan="1">0x07</td>
<td class="text-left" rowspan="1" colspan="1">
Contains the session parameter inputs from one of the entities, as described in <a href="#sec-SESS_INIT" class="xref">Section 4.6</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">SESS_TERM</td>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">
Indicates that one of the entities participating in the session wishes to cleanly terminate the session, as described in <a href="#sec-SESS_TERM" class="xref">Section 6.1</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">XFER_SEGMENT</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">
Indicates the transmission of a segment of bundle data, as described in <a href="#sec-XFER_SEGMENT" class="xref">Section 5.2.2</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">XFER_ACK</td>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">
Acknowledges reception of a data segment, as described in <a href="#sec-XFER_ACK" class="xref">Section 5.2.3</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">XFER_REFUSE</td>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">
Indicates that the transmission of the current bundle <span class="bcp14">SHALL</span> be stopped, as described in <a href="#sec-XFER_REFUSE" class="xref">Section 5.2.4</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">KEEPALIVE</td>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">
Used to keep the TCPCL session active, as described in <a href="#sec-KEEPALIVE" class="xref">Section 5.1.1</a>.
</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">MSG_REJECT</td>
<td class="text-left" rowspan="1" colspan="1">0x06</td>
<td class="text-left" rowspan="1" colspan="1">
Contains a TCPCL message rejection, as described in <a href="#sec-MSG_REJECT" class="xref">Section 5.1.2</a>.
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-SESS_INIT">
<section id="section-4.6">
<h3 id="name-session-initialization-mess">
<a href="#section-4.6" class="section-number selfRef">4.6. </a><a href="#name-session-initialization-mess" class="section-name selfRef">Session Initialization Message (SESS_INIT)</a>
</h3>
<p id="section-4.6-1">
Before a session is established and ready to transfer bundles, the session parameters are negotiated between the connected entities.
The SESS_INIT message is used to convey the per-entity parameters, which are used together to negotiate the per-session parameters as described in <a href="#sec-session-negotiate" class="xref">Section 4.7</a>.<a href="#section-4.6-1" class="pilcrow">¶</a></p>
<p id="section-4.6-2">
The format of a SESS_INIT message is shown in <a href="#fig-msg-SESS_INIT-fields" class="xref">Figure 19</a>.<a href="#section-4.6-2" class="pilcrow">¶</a></p>
<span id="name-sess_init-format"></span><div id="fig-msg-SESS_INIT-fields">
<figure id="figure-19">
<div class="alignCenter art-ascii-art art-text artwork" id="section-4.6-3.1">
<pre>
+-----------------------------+
| Message Header |
+-----------------------------+
| Keepalive Interval (U16) |
+-----------------------------+
| Segment MRU (U64) |
+-----------------------------+
| Transfer MRU (U64) |
+-----------------------------+
| Node ID Length (U16) |
+-----------------------------+
| Node ID Data (variable) |
+-----------------------------+
| Session Extension |
| Items Length (U32) |
+-----------------------------+
| Session Extension |
| Items (var.) |
+-----------------------------+
</pre>
</div>
<figcaption><a href="#figure-19" class="selfRef">Figure 19</a>:
<a href="#name-sess_init-format" class="selfRef">SESS_INIT Format</a>
</figcaption></figure>
</div>
<p id="section-4.6-4">
The fields of the SESS_INIT message are as follows:<a href="#section-4.6-4" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.6-5">
<dt id="section-4.6-5.1">Keepalive Interval:</dt>
<dd style="margin-left: 1.5em" id="section-4.6-5.2">
A 16-bit unsigned integer indicating the minimum interval, in seconds, to negotiate as the Session Keepalive using the method described in <a href="#sec-session-negotiate" class="xref">Section 4.7</a>.<a href="#section-4.6-5.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.6-5.3">Segment MRU:</dt>
<dd style="margin-left: 1.5em" id="section-4.6-5.4">
A 64-bit unsigned integer indicating the largest allowable single-segment data payload size to be received in this session.
Any XFER_SEGMENT sent to this peer <span class="bcp14">SHALL</span> have a data payload no longer than the peer's Segment MRU.
The two entities of a single session <span class="bcp14">MAY</span> have different Segment MRUs, and no relationship between the two is required.<a href="#section-4.6-5.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.6-5.5">Transfer MRU:</dt>
<dd style="margin-left: 1.5em" id="section-4.6-5.6">
A 64-bit unsigned integer indicating the largest allowable total-bundle data size to be received in this session.
Any bundle transfer sent to this peer <span class="bcp14">SHALL</span> have a Total Bundle Length payload no longer than the peer's Transfer MRU.
This value can be used to perform proactive bundle fragmentation.
The two entities of a single session <span class="bcp14">MAY</span> have different Transfer MRUs, and no relationship between the two is required.<a href="#section-4.6-5.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.6-5.7">Node ID Length and Node ID Data:</dt>
<dd style="margin-left: 1.5em" id="section-4.6-5.8">
Together, these fields represent a variable-length text string.
The Node ID Length is a 16-bit unsigned integer indicating the number of octets of Node ID Data to follow.
A zero-length node ID <span class="bcp14">SHALL</span> be used to indicate the lack of a node ID rather than a truly empty node ID.
This case allows an entity to avoid exposing node ID information on an untrusted network.
A non-zero-length Node ID Data <span class="bcp14">SHALL</span> contain the UTF-8 encoded node ID of the entity that sent the SESS_INIT message.
Every node ID <span class="bcp14">SHALL</span> be a URI consistent with the requirements in <span>[<a href="#RFC3986" class="xref">RFC3986</a>]</span> and the URI schemes of the IANA "Bundle Protocol URI Scheme Types" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>.
The node ID itself can be authenticated as described in <a href="#sec-tls-authentication" class="xref">Section 4.4.4</a>.<a href="#section-4.6-5.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.6-5.9">Session Extension Items Length and Session Extension Items list: </dt>
<dd style="margin-left: 1.5em" id="section-4.6-5.10"> Together, these fields represent protocol extension data not defined by this specification.
The Session Extension Items Length is the total number of octets to follow that are used to encode the Session Extension Items list. The encoding of each Session Extension Item is within a consistent data container as described in <a href="#sec-session-extension" class="xref">Section 4.8</a>.
The full set of Session Extension Items apply for the duration of the TCPCL session to follow.
The order and multiplicity of these Session Extension Items are significant, as defined in the associated type specification(s).
If the content of the Session Extension Items list disagrees with the Session Extension Items Length (e.g., the last item claims to use more or fewer octets than are indicated in the Session Extension Items Length), the reception of the SESS_INIT is considered to have failed.<a href="#section-4.6-5.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-4.6-6">
If an entity receives a peer node ID that is not authenticated (by the procedure described in <a href="#sec-tls-auth-valid-nodeid" class="xref">Section 4.4.4.3</a>), that node ID <span class="bcp14">SHOULD NOT</span> be used by a BPA for any discovery or routing functions.
Trusting an unauthenticated node ID can lead to the threat described in <a href="#sec-threat-node-impersonation" class="xref">Section 7.9</a>.<a href="#section-4.6-6" class="pilcrow">¶</a></p>
<p id="section-4.6-7">
When the active entity initiates a TCPCL session, it is likely based on routing information that binds a node ID to CL parameters used to initiate the session.
If the active entity receives a SESS_INIT with a different node ID than was intended for the TCPCL session, the session <span class="bcp14">MAY</span> be allowed to be established.
If allowed, such a session <span class="bcp14">SHALL</span> be associated with the node ID provided in the SESS_INIT message rather than any intended value.<a href="#section-4.6-7" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-session-negotiate">
<section id="section-4.7">
<h3 id="name-session-parameter-negotiati">
<a href="#section-4.7" class="section-number selfRef">4.7. </a><a href="#name-session-parameter-negotiati" class="section-name selfRef">Session Parameter Negotiation</a>
</h3>
<p id="section-4.7-1">
An entity calculates the parameters for a TCPCL session by negotiating the values from its own preferences (conveyed by the SESS_INIT it sent to the peer) with the preferences of the peer entity (expressed in the SESS_INIT that it received from the peer).
The negotiated parameters defined by this specification are described in the following paragraphs.<a href="#section-4.7-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.7-2">
<dt id="section-4.7-2.1">Transfer MTU and Segment MTU:</dt>
<dd style="margin-left: 1.5em" id="section-4.7-2.2">
The Maximum Transmission Unit (MTU) for whole transfers and individual segments is identical to the Transfer MRU and Segment MRU, respectively, of the received SESS_INIT message. A transmitting peer can send individual segments with any size smaller than the Segment MTU, depending on local policy, dynamic network conditions, etc.
Determining the size of each transmitted segment is an implementation matter.
If either the Transfer MRU or Segment MRU is unacceptable, the entity <span class="bcp14">SHALL</span> terminate the session with a reason code of "Contact Failure".<a href="#section-4.7-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.7-2.3">Session Keepalive:</dt>
<dd style="margin-left: 1.5em" id="section-4.7-2.4">
<p id="section-4.7-2.4.1">
Negotiation of the Session Keepalive parameter is performed by taking the minimum of the two Keepalive Interval values from the two SESS_INIT messages.
The Session Keepalive Interval is a parameter for the behavior described in <a href="#sec-KEEPALIVE" class="xref">Section 5.1.1</a>.
If the Session Keepalive Interval is unacceptable, the entity <span class="bcp14">SHALL</span> terminate the session with a reason code of "Contact Failure".<a href="#section-4.7-2.4.1" class="pilcrow">¶</a></p>
<aside id="section-4.7-2.4.2">
<p id="section-4.7-2.4.2.1">
Note: A negotiated Session Keepalive of zero indicates that KEEPALIVEs are disabled.<a href="#section-4.7-2.4.2.1" class="pilcrow">¶</a></p>
</aside>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-4.7-3">
Once this process of parameter negotiation is completed, this protocol defines no additional mechanism to change the parameters of an established session; to effect such a change, the TCPCL session <span class="bcp14">MUST</span> be terminated and a new session established.<a href="#section-4.7-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-session-extension">
<section id="section-4.8">
<h3 id="name-session-extension-items">
<a href="#section-4.8" class="section-number selfRef">4.8. </a><a href="#name-session-extension-items" class="section-name selfRef">Session Extension Items</a>
</h3>
<p id="section-4.8-1">
Each of the Session Extension Items <span class="bcp14">SHALL</span> be encoded in an identical Type-Length-Value (TLV) container form as indicated in <a href="#fig-session-extension" class="xref">Figure 20</a>.<a href="#section-4.8-1" class="pilcrow">¶</a></p>
<p id="section-4.8-2">
The fields of the Session Extension Item are as follows:<a href="#section-4.8-2" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-4.8-3">
<dt id="section-4.8-3.1">Item Flags:</dt>
<dd style="margin-left: 1.5em" id="section-4.8-3.2">
A one-octet field containing generic bit flags related to the Item, which are listed in <a href="#tab-session-extension-flags" class="xref">Table 3</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.
If a TCPCL entity receives a Session Extension Item with an unknown Item Type and the <code>CRITICAL</code> flag set to 1, the entity <span class="bcp14">SHALL</span> terminate the TCPCL session with a SESS_TERM reason code of "Contact Failure".
If the <code>CRITICAL</code> flag is 0, an entity <span class="bcp14">SHALL</span> skip over and ignore any item with an unknown Item Type.<a href="#section-4.8-3.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.8-3.3">Item Type:</dt>
<dd style="margin-left: 1.5em" id="section-4.8-3.4">
A 16-bit unsigned integer field containing the type of the extension item.
This specification does not define any extension types directly but does create an IANA registry for such codes (see <a href="#sec-iana-session-extension-type" class="xref">Section 8.3</a>).<a href="#section-4.8-3.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.8-3.5">Item Length:</dt>
<dd style="margin-left: 1.5em" id="section-4.8-3.6">
A 16-bit unsigned integer field containing the number of Item Value octets to follow.<a href="#section-4.8-3.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4.8-3.7">Item Value:</dt>
<dd style="margin-left: 1.5em" id="section-4.8-3.8">
A variable-length data field that is interpreted according to the associated Item Type.
This specification places no restrictions on an extension's use of available Item Value data.
Extension specifications <span class="bcp14">SHOULD</span> avoid the use of large data lengths, as no bundle transfers can begin until the full extension data is sent.<a href="#section-4.8-3.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-session-extension-item-form"></span><div id="fig-session-extension">
<figure id="figure-20">
<div class="alignCenter art-ascii-art art-text artwork" id="section-4.8-4.1">
<pre>
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 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
+---------------+---------------+---------------+---------------+
| Item Flags | Item Type | Item Length...|
+---------------+---------------+---------------+---------------+
| length contd. | Item Value... |
+---------------+---------------+---------------+---------------+
</pre>
</div>
<figcaption><a href="#figure-20" class="selfRef">Figure 20</a>:
<a href="#name-session-extension-item-form" class="selfRef">Session Extension Item Format</a>
</figcaption></figure>
</div>
<span id="name-session-extension-item-flag"></span><div id="tab-session-extension-flags">
<table class="center" id="table-3">
<caption>
<a href="#table-3" class="selfRef">Table 3</a>:
<a href="#name-session-extension-item-flag" class="selfRef">Session Extension Item Flags</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>CRITICAL</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that the receiving peer must handle the extension item.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
<td class="text-left" rowspan="1" colspan="1">others</td>
<td class="text-left" rowspan="1" colspan="1"></td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</section>
</div>
<div id="sec-session">
<section id="section-5">
<h2 id="name-established-session-operati">
<a href="#section-5" class="section-number selfRef">5. </a><a href="#name-established-session-operati" class="section-name selfRef">Established Session Operation</a>
</h2>
<p id="section-5-1">
This section describes the protocol operation for the duration of an established session, including the mechanism for transmitting bundles over the session.<a href="#section-5-1" class="pilcrow">¶</a></p>
<div id="sec-conn-upkeep">
<section id="section-5.1">
<h3 id="name-upkeep-and-status-messages">
<a href="#section-5.1" class="section-number selfRef">5.1. </a><a href="#name-upkeep-and-status-messages" class="section-name selfRef">Upkeep and Status Messages</a>
</h3>
<div id="sec-KEEPALIVE">
<section id="section-5.1.1">
<h4 id="name-session-upkeep-keepalive">
<a href="#section-5.1.1" class="section-number selfRef">5.1.1. </a><a href="#name-session-upkeep-keepalive" class="section-name selfRef">Session Upkeep (KEEPALIVE)</a>
</h4>
<p id="section-5.1.1-1">
The protocol includes a provision for transmission of KEEPALIVE messages over the TCPCL session to help determine if the underlying TCP connection has been disrupted.<a href="#section-5.1.1-1" class="pilcrow">¶</a></p>
<p id="section-5.1.1-2">
As described in <a href="#sec-session-negotiate" class="xref">Section 4.7</a>, a negotiated parameter of each session is the Session Keepalive Interval. If the negotiated Session Keepalive is zero (i.e., one or both SESS_INIT messages contain a zero Keepalive Interval), then the keepalive feature is disabled.
There is no logical minimum value for the Keepalive Interval (within the minimum imposed by the positive-value encoding), but when used for many sessions on an open, shared network, a short interval could lead to excessive traffic.
For shared network use, entities <span class="bcp14">SHOULD</span> choose a Keepalive Interval no shorter than 30 seconds.
There is no logical maximum value for the Keepalive Interval (within the maximum imposed by the fixed-size encoding), but an idle TCP connection is liable for closure by the host operating system if the keepalive time is longer than tens of minutes.
Entities <span class="bcp14">SHOULD</span> choose a Keepalive Interval no longer than 10 minutes (600 seconds).<a href="#section-5.1.1-2" class="pilcrow">¶</a></p>
<p id="section-5.1.1-3">
The chosen Keepalive Interval <span class="bcp14">SHOULD NOT</span> be too short, as TCP retransmissions may occur in the case of packet loss.
Those will have to be triggered by a timeout (TCP retransmission timeout (RTO)), which is dependent on the measured RTT for the TCP connection so that KEEPALIVE messages can experience noticeable latency.<a href="#section-5.1.1-3" class="pilcrow">¶</a></p>
<p id="section-5.1.1-4">
The format of a KEEPALIVE message is a one-octet Message Type code of KEEPALIVE (as described in <a href="#tab-msg-types" class="xref">Table 2</a>) with no additional data.
Both sides <span class="bcp14">SHALL</span> send a KEEPALIVE message whenever the negotiated interval has elapsed with no transmission of any message (KEEPALIVE or other).<a href="#section-5.1.1-4" class="pilcrow">¶</a></p>
<p id="section-5.1.1-5">
If no message (KEEPALIVE or other) has been received in a session after some implementation-defined time duration, then the entity <span class="bcp14">SHALL</span> terminate the session by transmitting a SESS_TERM message (as described in <a href="#sec-SESS_TERM" class="xref">Section 6.1</a>) with a reason code of "Idle timeout".
If configurable, the idle timeout duration <span class="bcp14">SHOULD</span> be no shorter than twice the Keepalive Interval.
If not configurable, the idle timeout duration <span class="bcp14">SHOULD</span> be exactly twice the Keepalive Interval.<a href="#section-5.1.1-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-MSG_REJECT">
<section id="section-5.1.2">
<h4 id="name-message-rejection-msg_rejec">
<a href="#section-5.1.2" class="section-number selfRef">5.1.2. </a><a href="#name-message-rejection-msg_rejec" class="section-name selfRef">Message Rejection (MSG_REJECT)</a>
</h4>
<p id="section-5.1.2-1">
This message type is not expected to be seen in a well-functioning session.
Its purpose is to aid in troubleshooting bad entity behavior by allowing the peer to observe why an entity is not responding as expected to its messages.<a href="#section-5.1.2-1" class="pilcrow">¶</a></p>
<p id="section-5.1.2-2">
If a TCPCL entity receives a message type that is unknown to it (possibly due to an unhandled protocol version mismatch or an incorrectly negotiated session extension that defines a new message type), the entity <span class="bcp14">SHALL</span> send a MSG_REJECT message with a reason code of "Message Type Unknown" and close the TCP connection.
If a TCPCL entity receives a message type that is known but is inappropriate for the negotiated session parameters (possibly due to an incorrectly negotiated session extension), the entity <span class="bcp14">SHALL</span> send a MSG_REJECT message with a reason code of "Message Unsupported".
If a TCPCL entity receives a message that is inappropriate for the current session state (e.g., a SESS_INIT after the session has already been established or a XFER_ACK message with an unknown Transfer ID), the entity <span class="bcp14">SHALL</span> send a MSG_REJECT message with a reason code of "Message Unexpected".<a href="#section-5.1.2-2" class="pilcrow">¶</a></p>
<p id="section-5.1.2-3">
The format of a MSG_REJECT message is shown in <a href="#fig-MSG_REJECT-fields" class="xref">Figure 21</a>.<a href="#section-5.1.2-3" class="pilcrow">¶</a></p>
<span id="name-format-of-msg_reject-messag"></span><div id="fig-MSG_REJECT-fields">
<figure id="figure-21">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.1.2-4.1">
<pre>
+-----------------------------+
| Message Header |
+-----------------------------+
| Reason Code (U8) |
+-----------------------------+
| Rejected Message Header |
+-----------------------------+
</pre>
</div>
<figcaption><a href="#figure-21" class="selfRef">Figure 21</a>:
<a href="#name-format-of-msg_reject-messag" class="selfRef">Format of MSG_REJECT Messages</a>
</figcaption></figure>
</div>
<p id="section-5.1.2-5">
The fields of the MSG_REJECT message are as follows:<a href="#section-5.1.2-5" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.1.2-6">
<dt id="section-5.1.2-6.1">Reason Code:</dt>
<dd style="margin-left: 1.5em" id="section-5.1.2-6.2">
A one-octet refusal reason code interpreted according to the descriptions in <a href="#tab-MSG_REJECT-reasons" class="xref">Table 4</a>.<a href="#section-5.1.2-6.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.1.2-6.3">Rejected Message Header:</dt>
<dd style="margin-left: 1.5em" id="section-5.1.2-6.4">
The Rejected Message Header is a copy of the Message Header to which the MSG_REJECT message is sent as a response.<a href="#section-5.1.2-6.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-msg_reject-reason-codes"></span><div id="tab-MSG_REJECT-reasons">
<table class="center" id="table-4">
<caption>
<a href="#table-4" class="selfRef">Table 4</a>:
<a href="#name-msg_reject-reason-codes" class="selfRef">MSG_REJECT Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">Message Type Unknown</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">A message was received with a Message Type code unknown to the TCPCL entity.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Message Unsupported</td>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">A message was received, but the TCPCL entity cannot comply with the message contents.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Message Unexpected</td>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">A message was received while the session is in a state in which the message is not expected.</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</section>
</div>
<div id="sec-transfer">
<section id="section-5.2">
<h3 id="name-bundle-transfer">
<a href="#section-5.2" class="section-number selfRef">5.2. </a><a href="#name-bundle-transfer" class="section-name selfRef">Bundle Transfer</a>
</h3>
<p id="section-5.2-1">
All of the messages discussed in this section are directly associated with transferring a bundle between TCPCL entities.<a href="#section-5.2-1" class="pilcrow">¶</a></p>
<p id="section-5.2-2">
A single TCPCL transfer results in the exchange of a bundle (handled by the convergence layer as opaque data) between two entities.
In the TCPCL, a transfer is accomplished by dividing a single bundle up into "segments" based on the receiving-side Segment MRU, which is defined in <a href="#sec-SESS_INIT" class="xref">Section 4.6</a>.
The choice of the length to use for segments is an implementation matter, but each segment <span class="bcp14">MUST NOT</span> be larger than the receiving entity's Segment MRU.
The first segment for a bundle is indicated by the <code>START</code> flag, and the last segment is indicated by the <code>END</code> flag.<a href="#section-5.2-2" class="pilcrow">¶</a></p>
<p id="section-5.2-3">
A single transfer (and, by extension, a single segment) <span class="bcp14">SHALL NOT</span> contain data of more than a single bundle.
This requirement is imposed on the agent using the TCPCL, rather than on the TCPCL itself.<a href="#section-5.2-3" class="pilcrow">¶</a></p>
<p id="section-5.2-4">
If multiple bundles are transmitted on a single TCPCL connection, they <span class="bcp14">MUST</span> be transmitted consecutively, without the interleaving of segments from multiple bundles.<a href="#section-5.2-4" class="pilcrow">¶</a></p>
<div id="sec-transfer-id">
<section id="section-5.2.1">
<h4 id="name-bundle-transfer-id">
<a href="#section-5.2.1" class="section-number selfRef">5.2.1. </a><a href="#name-bundle-transfer-id" class="section-name selfRef">Bundle Transfer ID</a>
</h4>
<p id="section-5.2.1-1">
Each of the bundle transfer messages contains a Transfer ID, which is used to correlate messages (from both sides of a transfer) for each bundle.
A Transfer ID does not attempt to address uniqueness of the bundle data itself and is not related to such concepts as bundle fragmentation.
Each invocation of the TCPCL by the BPA, requesting transmission of a bundle (fragmentary or otherwise), results in the initiation of a single TCPCL transfer.
Each transfer entails the sending of a sequence of some number of XFER_SEGMENT and XFER_ACK messages; all are correlated by the same Transfer ID.
The sending entity originates a Transfer ID, and the receiving entity uses that same Transfer ID in acknowledgments.<a href="#section-5.2.1-1" class="pilcrow">¶</a></p>
<p id="section-5.2.1-2">
Transfer IDs from each entity <span class="bcp14">SHALL</span> be unique within a single TCPCL session.
Upon exhaustion of the entire 64-bit Transfer ID space, the sending entity <span class="bcp14">SHALL</span> terminate the session with a SESS_TERM reason code of "Resource Exhaustion".
For bidirectional bundle transfers, a TCPCL entity <span class="bcp14">SHOULD NOT</span> rely on any relationship between Transfer IDs originating from each side of the TCPCL session.<a href="#section-5.2.1-2" class="pilcrow">¶</a></p>
<p id="section-5.2.1-3">
Although there is not a strict requirement for initial Transfer ID values or the ordering of Transfer IDs (see <a href="#sec-security-xferid" class="xref">Section 7.13</a>), in the absence of any other mechanism for generating Transfer IDs, an entity <span class="bcp14">SHALL</span> use the following algorithm: the initial Transfer ID from each entity is zero, and subsequent Transfer ID values are incremented from the prior Transfer ID value by one.<a href="#section-5.2.1-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-XFER_SEGMENT">
<section id="section-5.2.2">
<h4 id="name-data-transmission-xfer_segm">
<a href="#section-5.2.2" class="section-number selfRef">5.2.2. </a><a href="#name-data-transmission-xfer_segm" class="section-name selfRef">Data Transmission (XFER_SEGMENT)</a>
</h4>
<p id="section-5.2.2-1">
Each bundle is transmitted in one or more data segments.
The format of a XFER_SEGMENT message is shown in <a href="#fig-XFER_SEGMENT-fields" class="xref">Figure 22</a>.<a href="#section-5.2.2-1" class="pilcrow">¶</a></p>
<span id="name-format-of-xfer_segment-mess"></span><div id="fig-XFER_SEGMENT-fields">
<figure id="figure-22">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.2.2-2.1">
<pre>
+------------------------------+
| Message Header |
+------------------------------+
| Message Flags (U8) |
+------------------------------+
| Transfer ID (U64) |
+------------------------------+
| Transfer Extension |
| Items Length (U32) |
| (only for START segment) |
+------------------------------+
| Transfer Extension |
| Items (var.) |
| (only for START segment) |
+------------------------------+
| Data length (U64) |
+------------------------------+
| Data contents (octet string) |
+------------------------------+
</pre>
</div>
<figcaption><a href="#figure-22" class="selfRef">Figure 22</a>:
<a href="#name-format-of-xfer_segment-mess" class="selfRef">Format of XFER_SEGMENT Messages</a>
</figcaption></figure>
</div>
<p id="section-5.2.2-3">
The fields of the XFER_SEGMENT message are as follows:<a href="#section-5.2.2-3" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.2.2-4">
<dt id="section-5.2.2-4.1">Message Flags:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.2-4.2">
A one-octet field of single-bit flags, interpreted according to the descriptions in <a href="#tab-XFER_SEGMENT-flags" class="xref">Table 5</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.<a href="#section-5.2.2-4.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.2-4.3">Transfer ID:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.2-4.4">
A 64-bit unsigned integer identifying the transfer being made.<a href="#section-5.2.2-4.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.2-4.5">Transfer Extension Items Length and Transfer Extension Items list:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.2-4.6"> Together, these fields represent protocol extension data for this specification.
The Transfer Extension Items Length and Transfer Extension Items list <span class="bcp14">SHALL</span> only be present when the <code>START</code> flag is set to 1 on the message.
The Transfer Extension Items Length is the total number of octets to follow that are used to encode the Transfer Extension Items list.
The encoding of each Transfer Extension Item is within a consistent data container, as described in <a href="#sec-transfer-extension" class="xref">Section 5.2.5</a>.
The full set of Transfer Extension Items apply only to the associated single transfer.
The order and multiplicity of these Transfer Extension Items are significant, as defined in the associated type specification(s).
If the content of the Transfer Extension Items list disagrees with the Transfer Extension Items Length (e.g., the last item claims to use more or fewer octets than are indicated in the Transfer Extension Items Length), the reception of the XFER_SEGMENT is considered to have failed.<a href="#section-5.2.2-4.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.2-4.7">Data length:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.2-4.8">
A 64-bit unsigned integer indicating the number of octets in Data contents to follow.<a href="#section-5.2.2-4.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.2-4.9">Data contents:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.2-4.10">
The variable-length data payload of the message.<a href="#section-5.2.2-4.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-xfer_segment-flags"></span><div id="tab-XFER_SEGMENT-flags">
<table class="center" id="table-5">
<caption>
<a href="#table-5" class="selfRef">Table 5</a>:
<a href="#name-xfer_segment-flags" class="selfRef">XFER_SEGMENT Flags</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>END</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that this is the last segment of the transfer.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>START</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that this is the first segment of the transfer.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
<td class="text-left" rowspan="1" colspan="1">others</td>
<td class="text-left" rowspan="1" colspan="1"></td>
</tr>
</tbody>
</table>
</div>
<p id="section-5.2.2-6">
The flags portion of the message contains two flag values in the two low-order bits, denoted <code>START</code> and <code>END</code> in <a href="#tab-XFER_SEGMENT-flags" class="xref">Table 5</a>.
The <code>START</code> flag <span class="bcp14">SHALL</span> be set to 1 when transmitting the first segment of a transfer.
The <code>END</code> flag <span class="bcp14">SHALL</span> be set to 1 when transmitting the last segment of a transfer.
In the case where an entire transfer is accomplished in a single segment, both the <code>START</code> flag and the <code>END</code> flag <span class="bcp14">SHALL</span> be set to 1.<a href="#section-5.2.2-6" class="pilcrow">¶</a></p>
<p id="section-5.2.2-7">
Once a transfer of a bundle has commenced, the entity <span class="bcp14">MUST</span> only send segments containing sequential portions of that bundle until it sends a segment with the <code>END</code> flag set to 1.
No interleaving of multiple transfers from the same entity is possible within a single TCPCL session.
Simultaneous transfers between two entities <span class="bcp14">MAY</span> be achieved using multiple TCPCL sessions.<a href="#section-5.2.2-7" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-XFER_ACK">
<section id="section-5.2.3">
<h4 id="name-data-acknowledgments-xfer_a">
<a href="#section-5.2.3" class="section-number selfRef">5.2.3. </a><a href="#name-data-acknowledgments-xfer_a" class="section-name selfRef">Data Acknowledgments (XFER_ACK)</a>
</h4>
<p id="section-5.2.3-1">
Although the TCP transport provides reliable transfer of data between transport peers, the typical BSD sockets interface provides no means to inform a sending application of when the receiving application has processed some amount of transmitted data.
Thus, after transmitting some data, the TCPCL needs an additional mechanism to determine whether the receiving agent has successfully received and fully processed the segment.
To this end, the TCPCL protocol provides feedback messaging whereby a receiving entity transmits acknowledgments of reception of data segments.<a href="#section-5.2.3-1" class="pilcrow">¶</a></p>
<p id="section-5.2.3-2">
The format of a XFER_ACK message is shown in <a href="#fig-XFER_ACK-fields" class="xref">Figure 23</a>.<a href="#section-5.2.3-2" class="pilcrow">¶</a></p>
<span id="name-format-of-xfer_ack-messages"></span><div id="fig-XFER_ACK-fields">
<figure id="figure-23">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.2.3-3.1">
<pre>
+-----------------------------+
| Message Header |
+-----------------------------+
| Message Flags (U8) |
+-----------------------------+
| Transfer ID (U64) |
+-----------------------------+
| Acknowledged length (U64) |
+-----------------------------+
</pre>
</div>
<figcaption><a href="#figure-23" class="selfRef">Figure 23</a>:
<a href="#name-format-of-xfer_ack-messages" class="selfRef">Format of XFER_ACK Messages</a>
</figcaption></figure>
</div>
<p id="section-5.2.3-4">
The fields of the XFER_ACK message are as follows:<a href="#section-5.2.3-4" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.2.3-5">
<dt id="section-5.2.3-5.1">Message Flags:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.3-5.2">
A one-octet field of single-bit flags, interpreted according to the descriptions in <a href="#tab-XFER_SEGMENT-flags" class="xref">Table 5</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.<a href="#section-5.2.3-5.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.3-5.3">Transfer ID:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.3-5.4">
A 64-bit unsigned integer identifying the transfer being acknowledged.<a href="#section-5.2.3-5.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.3-5.5">Acknowledged length:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.3-5.6">
A 64-bit unsigned integer indicating the total number of octets in the transfer that are being acknowledged.<a href="#section-5.2.3-5.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-5.2.3-6">
A receiving TCPCL entity <span class="bcp14">SHALL</span> send a XFER_ACK message in response to each received XFER_SEGMENT message after the segment has been fully processed.
The flags portion of the XFER_ACK header <span class="bcp14">SHALL</span> be set to match the corresponding XFER_SEGMENT message being acknowledged (including flags not decodable to the entity).
The acknowledged length of each XFER_ACK contains the sum of the Data length fields of all XFER_SEGMENT messages received so far in the course of the indicated transfer.
The sending entity <span class="bcp14">SHOULD</span> transmit multiple XFER_SEGMENT messages without waiting for the corresponding XFER_ACK responses.
This enables pipelining of messages on a transfer stream.<a href="#section-5.2.3-6" class="pilcrow">¶</a></p>
<p id="section-5.2.3-7">
For example, suppose the sending entity transmits four segments of bundle data with lengths 100, 200, 500, and 1000, respectively.
After receiving the first segment, the entity sends an acknowledgment of length 100.
After the second segment is received, the entity sends an acknowledgment of length 300.
The third and fourth acknowledgments are of lengths 800 and 1800, respectively.<a href="#section-5.2.3-7" class="pilcrow">¶</a></p>
<p id="section-5.2.3-8"></p>
</section>
</div>
<div id="sec-XFER_REFUSE">
<section id="section-5.2.4">
<h4 id="name-transfer-refusal-xfer_refus">
<a href="#section-5.2.4" class="section-number selfRef">5.2.4. </a><a href="#name-transfer-refusal-xfer_refus" class="section-name selfRef">Transfer Refusal (XFER_REFUSE)</a>
</h4>
<p id="section-5.2.4-1">
The TCPCL supports a mechanism by which a receiving entity can indicate to the sender that it does not want to receive the corresponding bundle.
To do so, upon receiving a XFER_SEGMENT message, the entity <span class="bcp14">MAY</span> transmit a XFER_REFUSE message.
As data segments and acknowledgments can cross on the wire, the bundle that is being refused <span class="bcp14">SHALL</span> be identified by the Transfer ID of the refusal.<a href="#section-5.2.4-1" class="pilcrow">¶</a></p>
<p id="section-5.2.4-2">
There is no required relationship between the Transfer MRU of a TCPCL entity (which is supposed to represent a firm limitation of what the entity will accept) and the sending of a XFER_REFUSE message.
A XFER_REFUSE can be used in cases where the agent's bundle storage is temporarily depleted or somehow constrained.
A XFER_REFUSE can also be used after the bundle header or any bundle data is inspected by an agent and determined to be unacceptable.<a href="#section-5.2.4-2" class="pilcrow">¶</a></p>
<p id="section-5.2.4-3">
A transfer receiver <span class="bcp14">MAY</span> send a XFER_REFUSE message as soon as it receives any XFER_SEGMENT message.
The transfer sender <span class="bcp14">MUST</span> be prepared for this and <span class="bcp14">MUST</span> associate the refusal with the correct bundle via the Transfer ID fields.<a href="#section-5.2.4-3" class="pilcrow">¶</a></p>
<p id="section-5.2.4-4">
The TCPCL itself does not have any required behavior related to responding to a XFER_REFUSE based on its reason code; the refusal is passed up as an indication to the BPA that the transfer has been refused.
If a transfer refusal has a reason code that is not decodable to the BPA, the agent <span class="bcp14">SHOULD</span> treat the refusal as having a reason code of "Unknown".<a href="#section-5.2.4-4" class="pilcrow">¶</a></p>
<p id="section-5.2.4-5">
The format of the XFER_REFUSE message is shown in <a href="#fig-msg-XFER_REFUSE" class="xref">Figure 24</a>.<a href="#section-5.2.4-5" class="pilcrow">¶</a></p>
<span id="name-format-of-xfer_refuse-messa"></span><div id="fig-msg-XFER_REFUSE">
<figure id="figure-24">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.2.4-6.1">
<pre>
+-----------------------------+
| Message Header |
+-----------------------------+
| Reason Code (U8) |
+-----------------------------+
| Transfer ID (U64) |
+-----------------------------+
</pre>
</div>
<figcaption><a href="#figure-24" class="selfRef">Figure 24</a>:
<a href="#name-format-of-xfer_refuse-messa" class="selfRef">Format of XFER_REFUSE Messages</a>
</figcaption></figure>
</div>
<p id="section-5.2.4-7">
The fields of the XFER_REFUSE message are as follows:<a href="#section-5.2.4-7" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.2.4-8">
<dt id="section-5.2.4-8.1">Reason Code:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.4-8.2">
A one-octet refusal reason code interpreted according to the descriptions in <a href="#tab-XFER_REFUSE-reasons" class="xref">Table 6</a>.<a href="#section-5.2.4-8.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.4-8.3">Transfer ID:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.4-8.4">
A 64-bit unsigned integer identifying the transfer being refused.<a href="#section-5.2.4-8.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-xfer_refuse-reason-codes"></span><div id="tab-XFER_REFUSE-reasons">
<table class="center" id="table-6">
<caption>
<a href="#table-6" class="selfRef">Table 6</a>:
<a href="#name-xfer_refuse-reason-codes" class="selfRef">XFER_REFUSE Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">Unknown</td>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">The reason for refusal is unknown or is not specified.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Completed</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">The receiver already has the complete bundle. The sender <span class="bcp14">MAY</span> consider the bundle as completely received.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">No Resources</td>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">The receiver's resources are exhausted. The sender <span class="bcp14">SHOULD</span> apply reactive bundle fragmentation before retrying.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Retransmit</td>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">The receiver has encountered a problem that requires the bundle to be retransmitted in its entirety.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Not Acceptable</td>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">Some issue with the bundle data or the transfer extension data was encountered. The sender <span class="bcp14">SHOULD NOT</span> retry the same bundle with the same extensions.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Extension Failure</td>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">A failure processing the Transfer Extension Items has occurred.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Session Terminating</td>
<td class="text-left" rowspan="1" colspan="1">0x06</td>
<td class="text-left" rowspan="1" colspan="1">The receiving entity is in the process of terminating the session. The sender <span class="bcp14">MAY</span> retry the same bundle at a later time in a different session.</td>
</tr>
</tbody>
</table>
</div>
<p id="section-5.2.4-10">
The receiver <span class="bcp14">MUST</span>, for each transfer preceding the one to be refused, have either acknowledged all XFER_SEGMENT messages or refused the bundle transfer.<a href="#section-5.2.4-10" class="pilcrow">¶</a></p>
<p id="section-5.2.4-11">
The bundle transfer refusal <span class="bcp14">MAY</span> be sent before an entire data segment is received.
If a sender receives a XFER_REFUSE message, the sender <span class="bcp14">MUST</span> complete the transmission of any partially sent XFER_SEGMENT message.
There is no way to interrupt an individual TCPCL message partway through sending it.
The sender <span class="bcp14">MUST NOT</span> subsequently commence transmission of any further segments of the refused bundle.
Note, however, that this requirement does not ensure that an entity will not receive another XFER_SEGMENT for the same bundle after transmitting a XFER_REFUSE message, since messages can cross on the wire; if this happens, subsequent segments of the bundle <span class="bcp14">SHALL</span> also be refused with a XFER_REFUSE message.<a href="#section-5.2.4-11" class="pilcrow">¶</a></p>
<aside id="section-5.2.4-12">
<p id="section-5.2.4-12.1">
Note: If a bundle transmission is aborted in this way, the receiver does not receive a segment with the <code>END</code> flag set to 1 for the aborted bundle.
The beginning of the next bundle is identified by the <code>START</code> flag set to 1, indicating the start of a new transfer, and with a distinct Transfer ID value.<a href="#section-5.2.4-12.1" class="pilcrow">¶</a></p>
</aside>
</section>
</div>
<div id="sec-transfer-extension">
<section id="section-5.2.5">
<h4 id="name-transfer-extension-items">
<a href="#section-5.2.5" class="section-number selfRef">5.2.5. </a><a href="#name-transfer-extension-items" class="section-name selfRef">Transfer Extension Items</a>
</h4>
<p id="section-5.2.5-1">
Each of the Transfer Extension Items <span class="bcp14">SHALL</span> be encoded in an identical Type-Length-Value (TLV) container form as indicated in <a href="#fig-transfer-extension" class="xref">Figure 25</a>.<a href="#section-5.2.5-1" class="pilcrow">¶</a></p>
<p id="section-5.2.5-2">
The fields of the Transfer Extension Item are as follows:<a href="#section-5.2.5-2" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.2.5-3">
<dt id="section-5.2.5-3.1">Item Flags:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.5-3.2">
A one-octet field containing generic bit flags related to the Item, which are listed in <a href="#tab-transfer-extension-flags" class="xref">Table 7</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.
If a TCPCL entity receives a Transfer Extension Item with an unknown Item Type and the <code>CRITICAL</code> flag is 1, the entity <span class="bcp14">SHALL</span> refuse the transfer with a XFER_REFUSE reason code of "Extension Failure".
If the <code>CRITICAL</code> flag is 0, an entity <span class="bcp14">SHALL</span> skip over and ignore any item with an unknown Item Type.<a href="#section-5.2.5-3.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.5-3.3">Item Type:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.5-3.4">
A 16-bit unsigned integer field containing the type of the extension item.
This specification creates an IANA registry for such codes (see <a href="#sec-iana-transfer-extension-type" class="xref">Section 8.4</a>).<a href="#section-5.2.5-3.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.5-3.5">Item Length:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.5-3.6">
A 16-bit unsigned integer field containing the number of Item Value octets to follow.<a href="#section-5.2.5-3.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-5.2.5-3.7">Item Value:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.5-3.8">
A variable-length data field that is interpreted according to the associated Item Type.
This specification places no restrictions on an extension's use of available Item Value data.
Extension specifications <span class="bcp14">SHOULD</span> avoid the use of large data lengths, as the associated transfer cannot begin until the full extension data is sent.<a href="#section-5.2.5-3.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-transfer-extension-item-for"></span><div id="fig-transfer-extension">
<figure id="figure-25">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.2.5-4.1">
<pre>
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 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
+---------------+---------------+---------------+---------------+
| Item Flags | Item Type | Item Length...|
+---------------+---------------+---------------+---------------+
| length contd. | Item Value... |
+---------------+---------------+---------------+---------------+
</pre>
</div>
<figcaption><a href="#figure-25" class="selfRef">Figure 25</a>:
<a href="#name-transfer-extension-item-for" class="selfRef">Transfer Extension Item Format</a>
</figcaption></figure>
</div>
<span id="name-transfer-extension-item-fla"></span><div id="tab-transfer-extension-flags">
<table class="center" id="table-7">
<caption>
<a href="#table-7" class="selfRef">Table 7</a>:
<a href="#name-transfer-extension-item-fla" class="selfRef">Transfer Extension Item Flags</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>CRITICAL</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that the receiving peer must handle the extension item.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
<td class="text-left" rowspan="1" colspan="1">others</td>
<td class="text-left" rowspan="1" colspan="1"></td>
</tr>
</tbody>
</table>
</div>
<div id="sec-transfer-extension-transfer-length">
<section id="section-5.2.5.1">
<h5 id="name-transfer-length-extension">
<a href="#section-5.2.5.1" class="section-number selfRef">5.2.5.1. </a><a href="#name-transfer-length-extension" class="section-name selfRef">Transfer Length Extension</a>
</h5>
<p id="section-5.2.5.1-1">
The purpose of the Transfer Length Extension is to allow entities to preemptively refuse bundles that would exceed their resources or to prepare storage on the receiving entity for the upcoming bundle data.<a href="#section-5.2.5.1-1" class="pilcrow">¶</a></p>
<p id="section-5.2.5.1-2">
Multiple Transfer Length Extension Items <span class="bcp14">SHALL NOT</span> occur within the same transfer.
The lack of a Transfer Length Extension Item in any transfer <span class="bcp14">SHALL NOT</span> imply anything regarding the potential length of the transfer.
The Transfer Length Extension <span class="bcp14">SHALL</span> use the IANA-assigned code point from <a href="#sec-iana-transfer-extension-type" class="xref">Section 8.4</a>.<a href="#section-5.2.5.1-2" class="pilcrow">¶</a></p>
<p id="section-5.2.5.1-3">
If a transfer occupies exactly one segment (i.e., both the <code>START</code> flag and the <code>END</code> flag are 1), the Transfer Length Extension <span class="bcp14">SHOULD NOT</span> be present.
The extension does not provide any additional information for single-segment transfers.<a href="#section-5.2.5.1-3" class="pilcrow">¶</a></p>
<p id="section-5.2.5.1-4">
The format of the Transfer Length Extension data is shown in <a href="#fig-Transfer-Length-fields" class="xref">Figure 26</a>.<a href="#section-5.2.5.1-4" class="pilcrow">¶</a></p>
<span id="name-format-of-transfer-length-e"></span><div id="fig-Transfer-Length-fields">
<figure id="figure-26">
<div class="alignCenter art-ascii-art art-text artwork" id="section-5.2.5.1-5.1">
<pre>
+----------------------+
| Total Length (U64) |
+----------------------+
</pre>
</div>
<figcaption><a href="#figure-26" class="selfRef">Figure 26</a>:
<a href="#name-format-of-transfer-length-e" class="selfRef">Format of Transfer Length Extension Data</a>
</figcaption></figure>
</div>
<p id="section-5.2.5.1-6">The Transfer Length Extension data contains the following field:<a href="#section-5.2.5.1-6" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-5.2.5.1-7">
<dt id="section-5.2.5.1-7.1">Total Length:</dt>
<dd style="margin-left: 1.5em" id="section-5.2.5.1-7.2">
A 64-bit unsigned integer indicating the size of the data to be transferred.
The Total Length field <span class="bcp14">SHALL</span> be treated as authoritative by the receiver.
If, for whatever reason, the actual total length of bundle data received differs from the value indicated by the Total Length value, the receiver <span class="bcp14">SHALL</span> treat the transmitted data as invalid and send a XFER_REFUSE with a reason code of "Not Acceptable".<a href="#section-5.2.5.1-7.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
</section>
</div>
</section>
</div>
</section>
</div>
<div id="sec-termination">
<section id="section-6">
<h2 id="name-session-termination">
<a href="#section-6" class="section-number selfRef">6. </a><a href="#name-session-termination" class="section-name selfRef">Session Termination</a>
</h2>
<p id="section-6-1">
This section describes the procedures for terminating a TCPCL session.
The purpose of terminating a session is to allow transfers to complete before the TCP connection is closed but not allow any new transfers to start.
A session state change is necessary for this to happen, because transfers can be in progress in either direction (transfer stream) within a session.
Waiting for a transfer to complete in one direction does not control or influence the possibility of a transfer in the other direction.
Either peer of a session can terminate an established session at any time.<a href="#section-6-1" class="pilcrow">¶</a></p>
<div id="sec-SESS_TERM">
<section id="section-6.1">
<h3 id="name-session-termination-message">
<a href="#section-6.1" class="section-number selfRef">6.1. </a><a href="#name-session-termination-message" class="section-name selfRef">Session Termination Message (SESS_TERM)</a>
</h3>
<p id="section-6.1-1">
To cleanly terminate a session, a SESS_TERM message <span class="bcp14">SHALL</span> be transmitted by either entity at any point following complete transmission of any other message.
When sent to initiate a termination, the <code>REPLY</code> flag of a SESS_TERM message <span class="bcp14">SHALL</span> be 0.
Upon receiving a SESS_TERM message after not sending a SESS_TERM message in the same session, an entity <span class="bcp14">SHALL</span> send an acknowledging SESS_TERM message.
When sent to acknowledge a termination, a SESS_TERM message <span class="bcp14">SHALL</span> have identical data content from the message being acknowledged except for the <code>REPLY</code> flag, which is set to 1 to indicate acknowledgment.<a href="#section-6.1-1" class="pilcrow">¶</a></p>
<p id="section-6.1-2">
Once a SESS_TERM message is sent, the state of that TCPCL session changes to Ending.
While the session is in the Ending state,<a href="#section-6.1-2" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="section-6.1-3.1">an entity <span class="bcp14">MAY</span> finish an in-progress transfer in either direction.<a href="#section-6.1-3.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-6.1-3.2">an entity <span class="bcp14">SHALL NOT</span> begin any new outgoing transfer for the remainder of the session.<a href="#section-6.1-3.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="section-6.1-3.3">an entity <span class="bcp14">SHALL NOT</span> accept any new incoming transfer for the remainder of the session.<a href="#section-6.1-3.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-6.1-4">If a new incoming transfer is attempted while in the Ending state, the receiving entity <span class="bcp14">SHALL</span> send a XFER_REFUSE with a reason code of "Session Terminating".<a href="#section-6.1-4" class="pilcrow">¶</a></p>
<p id="section-6.1-5">
There are circumstances where an entity has an urgent need to close a TCP connection associated with a TCPCL session, without waiting for transfers to complete but also in a way that doesn't force timeouts to occur -- for example, due to impending shutdown of the underlying data-link layer.
Instead of following a clean termination sequence, after transmitting a SESS_TERM message, an entity <span class="bcp14">MAY</span> perform an unclean termination by immediately closing the associated TCP connection.
When performing an unclean termination, an entity <span class="bcp14">SHOULD</span> acknowledge all received XFER_SEGMENTs with a XFER_ACK before closing the TCP connection.
Not acknowledging received segments can result in unnecessary bundle or bundle fragment retransmissions.
Any delay between a request to close the TCP connection and the actual closing of the connection (a "half-closed" state) <span class="bcp14">MAY</span> be ignored by the TCPCL entity.
If the underlying TCP connection is closed during a transmission (in either transfer stream), the transfer <span class="bcp14">SHALL</span> be indicated to the BPA as failed (see the transmission failure and reception failure indications defined in <a href="#sec-cl-services" class="xref">Section 3.1</a>).<a href="#section-6.1-5" class="pilcrow">¶</a></p>
<p id="section-6.1-6">
The TCPCL itself does not have any required behavior related to responding to a SESS_TERM based on its reason code; the termination is passed up as an indication to the BPA that the session state has changed.
If a termination has a reason code that is not decodable to the BPA, the agent <span class="bcp14">SHOULD</span> treat the termination as having a reason code of "Unknown".<a href="#section-6.1-6" class="pilcrow">¶</a></p>
<p id="section-6.1-7">
The format of the SESS_TERM message is shown in <a href="#fig-msg-SESS_TERM-fields" class="xref">Figure 27</a>.<a href="#section-6.1-7" class="pilcrow">¶</a></p>
<span id="name-format-of-sess_term-message"></span><div id="fig-msg-SESS_TERM-fields">
<figure id="figure-27">
<div class="alignCenter art-ascii-art art-text artwork" id="section-6.1-8.1">
<pre>
+-----------------------------+
| Message Header |
+-----------------------------+
| Message Flags (U8) |
+-----------------------------+
| Reason Code (U8) |
+-----------------------------+
</pre>
</div>
<figcaption><a href="#figure-27" class="selfRef">Figure 27</a>:
<a href="#name-format-of-sess_term-message" class="selfRef">Format of SESS_TERM Messages</a>
</figcaption></figure>
</div>
<p id="section-6.1-9">
The fields of the SESS_TERM message are as follows:<a href="#section-6.1-9" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlParallel" id="section-6.1-10">
<dt id="section-6.1-10.1">Message Flags:</dt>
<dd style="margin-left: 1.5em" id="section-6.1-10.2">
A one-octet field of single-bit flags, interpreted according to the descriptions in <a href="#tab-SESS_TERM-flags" class="xref">Table 8</a>.
All reserved header flag bits <span class="bcp14">SHALL</span> be set to 0 by the sender.
All reserved header flag bits <span class="bcp14">SHALL</span> be ignored by the receiver.<a href="#section-6.1-10.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-6.1-10.3">Reason Code:</dt>
<dd style="margin-left: 1.5em" id="section-6.1-10.4">
A one-octet refusal reason code interpreted according to the descriptions in <a href="#tab-SESS_TERM-reasons" class="xref">Table 9</a>.<a href="#section-6.1-10.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-sess_term-flags"></span><div id="tab-SESS_TERM-flags">
<table class="center" id="table-8">
<caption>
<a href="#table-8" class="selfRef">Table 8</a>:
<a href="#name-sess_term-flags" class="selfRef">SESS_TERM Flags</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">
<code>REPLY</code>
</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">If this bit is set, it indicates that this message is an acknowledgment of an earlier SESS_TERM message.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
<td class="text-left" rowspan="1" colspan="1">others</td>
<td class="text-left" rowspan="1" colspan="1"></td>
</tr>
</tbody>
</table>
</div>
<span id="name-sess_term-reason-codes"></span><div id="tab-SESS_TERM-reasons">
<table class="center" id="table-9">
<caption>
<a href="#table-9" class="selfRef">Table 9</a>:
<a href="#name-sess_term-reason-codes" class="selfRef">SESS_TERM Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Name</th>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">Unknown</td>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">A termination reason is not available.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Idle timeout</td>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">The session is being terminated due to idleness.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Version mismatch</td>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">The entity cannot conform to the specified TCPCL protocol version.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Busy</td>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">The entity is too busy to handle the current session.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Contact Failure</td>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">The entity cannot interpret or negotiate a Contact Header or SESS_INIT option.</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Resource Exhaustion</td>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">The entity has run into some resource limit and cannot continue the session.</td>
</tr>
</tbody>
</table>
</div>
<p id="section-6.1-13">
The earliest a TCPCL session termination <span class="bcp14">MAY</span> occur is immediately after transmission of a Contact Header (and prior to any further message transmissions).
This can, for example, be used as a notification that the entity is currently not able or willing to communicate.
However, an entity <span class="bcp14">MUST</span> always send the Contact Header to its peer before sending a SESS_TERM message.<a href="#section-6.1-13" class="pilcrow">¶</a></p>
<p id="section-6.1-14">
Termination of the TCP connection <span class="bcp14">MAY</span> occur prior to receiving the Contact Header as discussed in <a href="#sec-tcp-connection" class="xref">Section 4.1</a>.
If reception of the Contact Header itself somehow fails (e.g., an invalid magic string is received), an entity <span class="bcp14">SHALL</span> close the TCP connection without sending a SESS_TERM message.<a href="#section-6.1-14" class="pilcrow">¶</a></p>
<p id="section-6.1-15">
If a session is to be terminated before the sending of a protocol message has completed, then the entity <span class="bcp14">MUST NOT</span> transmit the SESS_TERM message but still <span class="bcp14">SHALL</span> close the TCP connection.
Each TCPCL message is contiguous in the octet stream and has no ability to be cut short and/or preempted by another message.
This is particularly important when large segment sizes are being transmitted; either the entire XFER_SEGMENT is sent before a SESS_TERM message or the connection is simply terminated mid-XFER_SEGMENT.<a href="#section-6.1-15" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-idle-terminate">
<section id="section-6.2">
<h3 id="name-idle-session-termination">
<a href="#section-6.2" class="section-number selfRef">6.2. </a><a href="#name-idle-session-termination" class="section-name selfRef">Idle Session Termination</a>
</h3>
<p id="section-6.2-1">
The protocol includes a provision for clean termination of idle sessions.
Determining the length of time to wait before terminating idle sessions, if they are to be terminated at all, is an implementation and configuration matter.<a href="#section-6.2-1" class="pilcrow">¶</a></p>
<p id="section-6.2-2">
If there is a configured time to terminate idle sessions and if no TCPCL messages (other than KEEPALIVE messages) have been received for at least that amount of time, then either entity <span class="bcp14">MAY</span> terminate the session by transmitting a SESS_TERM message with a reason code of "Idle timeout" (as described in <a href="#tab-SESS_TERM-reasons" class="xref">Table 9</a>).<a href="#section-6.2-2" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="sec-security">
<section id="section-7">
<h2 id="name-security-considerations">
<a href="#section-7" class="section-number selfRef">7. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a>
</h2>
<p id="section-7-1">
This section separates security considerations into threat categories based on guidance provided in <span><a href="#RFC3552" class="xref">BCP 72</a> [<a href="#RFC3552" class="xref">RFC3552</a>]</span>.<a href="#section-7-1" class="pilcrow">¶</a></p>
<section id="section-7.1">
<h3 id="name-threat-passive-leak-of-node">
<a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-threat-passive-leak-of-node" class="section-name selfRef">Threat: Passive Leak of Node Data</a>
</h3>
<p id="section-7.1-1">
When used without TLS security, the TCPCL exposes the node ID and other configuration data to passive eavesdroppers.
This occurs even when no transfers occur within a TCPCL session.
This can be avoided by always using TLS, even if authentication is not available (see <a href="#sec-security-tlsalt" class="xref">Section 7.12</a>).<a href="#section-7.1-1" class="pilcrow">¶</a></p>
</section>
<section id="section-7.2">
<h3 id="name-threat-passive-leak-of-bund">
<a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-threat-passive-leak-of-bund" class="section-name selfRef">Threat: Passive Leak of Bundle Data</a>
</h3>
<p id="section-7.2-1">
The TCPCL can be used to provide point-to-point transport security, but it does not provide security of data at rest and does not guarantee end-to-end bundle security.
The bundle security mechanisms defined in <span>[<a href="#RFC9172" class="xref">RFC9172</a>]</span> are to be used instead.<a href="#section-7.2-1" class="pilcrow">¶</a></p>
<p id="section-7.2-2">
When used without TLS security, the TCPCL exposes all bundle data to passive eavesdroppers.
This can be avoided by always using TLS, even if authentication is not available (see <a href="#sec-security-tlsalt" class="xref">Section 7.12</a>).<a href="#section-7.2-2" class="pilcrow">¶</a></p>
</section>
<section id="section-7.3">
<h3 id="name-threat-tcpcl-version-downgr">
<a href="#section-7.3" class="section-number selfRef">7.3. </a><a href="#name-threat-tcpcl-version-downgr" class="section-name selfRef">Threat: TCPCL Version Downgrade</a>
</h3>
<p id="section-7.3-1">
When a TCPCL entity supports multiple versions of the protocol, it is possible for a malicious or misconfigured peer to use an older version of the TCPCL protocol that does not support transport security.
An on-path attacker can also manipulate a Contact Header to present a lower protocol version than desired.<a href="#section-7.3-1" class="pilcrow">¶</a></p>
<p id="section-7.3-2">
It is up to security policies within each TCPCL entity to ensure that the negotiated TCPCL version meets transport security requirements.<a href="#section-7.3-2" class="pilcrow">¶</a></p>
</section>
<div id="sec-threat-tls-strip">
<section id="section-7.4">
<h3 id="name-threat-transport-security-s">
<a href="#section-7.4" class="section-number selfRef">7.4. </a><a href="#name-threat-transport-security-s" class="section-name selfRef">Threat: Transport Security Stripping</a>
</h3>
<p id="section-7.4-1">
When security policy allows non-TLS sessions, the TCPCL does not protect against active network attackers.
It is possible for an on-path attacker to set the <code>CAN_TLS</code> flag to 0 on either side of the Contact Header exchange, which will cause the negotiation discussed in <a href="#sec-contact-negotiate" class="xref">Section 4.3</a> to disable TLS.
This leads to the "SSL Stripping" attack described in <span>[<a href="#RFC7457" class="xref">RFC7457</a>]</span>.<a href="#section-7.4-1" class="pilcrow">¶</a></p>
<p id="section-7.4-2">
The purpose of the <code>CAN_TLS</code> flag is to allow the use of the TCPCL on entities that simply do not have a TLS implementation available.
When TLS is available on an entity, it is strongly encouraged that the security policy disallow non-TLS sessions.
This requires that the TLS handshake occur, regardless of the policy-driven parameters of the handshake and policy-driven handling of the handshake outcome.<a href="#section-7.4-2" class="pilcrow">¶</a></p>
<p id="section-7.4-3">
One mechanism to mitigate the possibility of TLS Stripping is the use of DNS-based Authentication of Named Entities (DANE) <span>[<a href="#RFC6698" class="xref">RFC6698</a>]</span> toward the passive peer.
This mechanism relies on DNS and is unidirectional, so it doesn't help with applying policy toward the active peer, but it can be useful in an environment using opportunistic security.
The configuration and use of DANE are outside of the scope of this document.<a href="#section-7.4-3" class="pilcrow">¶</a></p>
<p id="section-7.4-4">
The negotiated use of TLS is identical in behavior to the use of STARTTLS as described in <span>[<a href="#RFC2595" class="xref">RFC2595</a>]</span>, <span>[<a href="#RFC4511" class="xref">RFC4511</a>]</span>, and others.<a href="#section-7.4-4" class="pilcrow">¶</a></p>
</section>
</div>
<section id="section-7.5">
<h3 id="name-threat-weak-tls-configurati">
<a href="#section-7.5" class="section-number selfRef">7.5. </a><a href="#name-threat-weak-tls-configurati" class="section-name selfRef">Threat: Weak TLS Configurations</a>
</h3>
<p id="section-7.5-1">
Even when using TLS to secure the TCPCL session, the actual cipher suite negotiated between the TLS peers can be insecure.
Recommendations for using cipher suites are included in <span><a href="#RFC7525" class="xref">BCP 195</a> [<a href="#RFC7525" class="xref">RFC7525</a>]</span>.
It is up to security policies within each TCPCL entity to ensure that the negotiated TLS cipher suite meets transport security requirements.<a href="#section-7.5-1" class="pilcrow">¶</a></p>
</section>
<div id="sec-threat-untrust-cert">
<section id="section-7.6">
<h3 id="name-threat-untrusted-end-entity">
<a href="#section-7.6" class="section-number selfRef">7.6. </a><a href="#name-threat-untrusted-end-entity" class="section-name selfRef">Threat: Untrusted End-Entity Certificate</a>
</h3>
<p id="section-7.6-1">
The authentication method discussed in <a href="#sec-tls-authentication" class="xref">Section 4.4.4</a> uses end-entity certificates chained to a trusted root CA. During a TLS handshake, either entity can send a certificate set that does not contain the full chain, possibly excluding intermediate or root CAs.
In an environment where peers are known to already contain needed root and intermediate CAs, there is no need to include those CAs, but this carries the risk of an entity not actually having one of the needed CAs.<a href="#section-7.6-1" class="pilcrow">¶</a></p>
</section>
</div>
<section id="section-7.7">
<h3 id="name-threat-certificate-validati">
<a href="#section-7.7" class="section-number selfRef">7.7. </a><a href="#name-threat-certificate-validati" class="section-name selfRef">Threat: Certificate Validation Vulnerabilities</a>
</h3>
<p id="section-7.7-1">
Even when TLS itself is operating properly, an attacker can attempt to exploit vulnerabilities within certificate check algorithms or configuration to establish a secure TCPCL session using an invalid certificate.
A BPA treats the peer node ID within a TCPCL session as authoritative, and exploitation via an invalid certificate could lead to bundle data leaking and/or denial of service to the node ID being impersonated.<a href="#section-7.7-1" class="pilcrow">¶</a></p>
<p id="section-7.7-2">
There are many reasons, as described in <span>[<a href="#RFC5280" class="xref">RFC5280</a>]</span> and <span>[<a href="#RFC6125" class="xref">RFC6125</a>]</span>, why a certificate can fail to validate, including using the certificate outside of its valid time interval, using purposes for which it was not authorized, or using it after it has been revoked by its CA.
Validating a certificate is a complex task and can require network connectivity outside of the primary TCPCL network path(s) if a mechanism such as OCSP <span>[<a href="#RFC6960" class="xref">RFC6960</a>]</span> is used by the CA.
The configuration and use of particular certificate validation methods are outside of the scope of this document.<a href="#section-7.7-2" class="pilcrow">¶</a></p>
</section>
<section id="section-7.8">
<h3 id="name-threat-symmetric-key-limits">
<a href="#section-7.8" class="section-number selfRef">7.8. </a><a href="#name-threat-symmetric-key-limits" class="section-name selfRef">Threat: Symmetric Key Limits</a>
</h3>
<p id="section-7.8-1">Even with a secure block cipher and securely established session keys, there are limits to the amount of plaintext that can be safely encrypted with a given set of keys, as described in <span>[<a href="#AEAD-LIMITS" class="xref">AEAD-LIMITS</a>]</span>.
When permitted by the negotiated TLS version (see <span>[<a href="#RFC8446" class="xref">RFC8446</a>]</span>), it is advisable to take advantage of session key updates to avoid those limits.<a href="#section-7.8-1" class="pilcrow">¶</a></p>
</section>
<div id="sec-threat-node-impersonation">
<section id="section-7.9">
<h3 id="name-threat-bp-node-impersonatio">
<a href="#section-7.9" class="section-number selfRef">7.9. </a><a href="#name-threat-bp-node-impersonatio" class="section-name selfRef">Threat: BP Node Impersonation</a>
</h3>
<p id="section-7.9-1">
The certificates exchanged by TLS enable authentication of the peer DNS name and node ID, but it is possible that either a peer does not provide a valid certificate or the certificate does not validate either the DNS-ID/IPADDR-ID or NODE-ID of the peer (see <a href="#sec-pkix-env" class="xref">Section 3.4</a>).
Having a CA-validated certificate does not alone guarantee the identity of the network host or BP node from which the certificate is provided; additional validation procedures as provided in <a href="#sec-tls-authentication" class="xref">Section 4.4.4</a> bind the DNS-ID/IPADDR-ID or NODE-ID based on the contents of the certificate.<a href="#section-7.9-1" class="pilcrow">¶</a></p>
<p id="section-7.9-2">
The DNS-ID/IPADDR-ID validation is a weaker form of authentication, because even if a peer is operating on an authenticated network DNS name or IP address it can provide an invalid node ID and cause bundles to be "leaked" to an invalid node.
Especially in DTN environments, network names and addresses of nodes can be time-variable, so binding a certificate to a node ID results in a more stable identity.<a href="#section-7.9-2" class="pilcrow">¶</a></p>
<p id="section-7.9-3">
NODE-ID validation ensures that the peer to which a bundle is transferred is in fact the node that the BPA expects it to be.
In circumstances where certificates can only be issued to DNS names, node ID validation is not possible, but it could be reasonable to assume that a trusted host is not going to present an invalid node ID.
Determining when a DNS-ID/IPADDR-ID authentication can be trusted to validate a node ID is also a policy matter outside of the scope of this document.<a href="#section-7.9-3" class="pilcrow">¶</a></p>
<p id="section-7.9-4">
One mitigation regarding arbitrary entities with valid PKIX certificates impersonating arbitrary node IDs is the use of the PKIX EKU key purpose <code>id-kp-bundleSecurity</code> (<a href="#sec-pkix-oids" class="xref">Section 4.4.2.1</a>).
When this EKU is present in the certificate, it represents a stronger assertion that the private key holder should in fact be trusted to operate as a bundle node.<a href="#section-7.9-4" class="pilcrow">¶</a></p>
</section>
</div>
<section id="section-7.10">
<h3 id="name-threat-denial-of-service">
<a href="#section-7.10" class="section-number selfRef">7.10. </a><a href="#name-threat-denial-of-service" class="section-name selfRef">Threat: Denial of Service</a>
</h3>
<p id="section-7.10-1">
The behaviors described in this section all amount to a potential denial of service to a TCPCL entity.
The denial of service could be limited to an individual TCPCL session, could affect other well-behaved sessions on an entity, or could affect all sessions on a host.<a href="#section-7.10-1" class="pilcrow">¶</a></p>
<p id="section-7.10-2">
A malicious entity can trigger timeouts by continually establishing TCPCL sessions and delaying the sending of protocol-required data.
The victim entity can block TCP connections from network peers that are thought to behave incorrectly within the TCPCL.<a href="#section-7.10-2" class="pilcrow">¶</a></p>
<p id="section-7.10-3">
An entity can send a large amount of data over a TCPCL session, requiring the receiving entity to handle the data.
The victim entity can attempt to stop the flood of data by sending a XFER_REFUSE message or can forcibly terminate the session.<a href="#section-7.10-3" class="pilcrow">¶</a></p>
<p id="section-7.10-4">
A "data dribble" attack is also possible, in which an entity presents a very small Segment MRU that causes transfers to be split among a large number of very small segments and causes the resultant segmentation overhead to overwhelm the actual bundle data segments.
Similarly, an entity can present a very small Transfer MRU that will cause resources to be wasted on establishment and upkeep of a TCPCL session over which a bundle could never be transferred.
The victim entity can terminate the session during parameter negotiation (<a href="#sec-session-negotiate" class="xref">Section 4.7</a>) if the MRUs are unacceptable.<a href="#section-7.10-4" class="pilcrow">¶</a></p>
<p id="section-7.10-5">
An abusive entity could cause the keepalive mechanism to waste throughput within a network link that would otherwise be usable for bundle transmissions.
Due to the quantization of the Keepalive Interval parameter, the smallest Session Keepalive is one second, which should be long enough to not flood the link.
The victim entity can terminate the session during parameter negotiation (<a href="#sec-session-negotiate" class="xref">Section 4.7</a>) if the Keepalive Interval is unacceptable.<a href="#section-7.10-5" class="pilcrow">¶</a></p>
<p id="section-7.10-6">
Finally, an attacker or a misconfigured entity can cause issues at the TCP connection that will cause unnecessary TCP retransmissions or connection resets, effectively denying the use of the overlying TCPCL session.<a href="#section-7.10-6" class="pilcrow">¶</a></p>
</section>
<div id="sec-security-tls-mandate">
<section id="section-7.11">
<h3 id="name-mandatory-to-implement-tls">
<a href="#section-7.11" class="section-number selfRef">7.11. </a><a href="#name-mandatory-to-implement-tls" class="section-name selfRef">Mandatory-to-Implement TLS</a>
</h3>
<p id="section-7.11-1">
Following IETF best current practice, TLS is mandatory to implement for all TCPCL implementations but TLS is optional to use for a given TCPCL session.
The policy recommendations in Sections <a href="#sec-contact-header" class="xref">4.2</a> and <a href="#sec-contact-negotiate" class="xref">4.3</a> both enable TLS and require TLS, but entities are permitted to disable and not require TLS based on local configuration. The configuration to enable or require TLS for an entity or a session is outside of the scope of this document.
The configuration to disable TLS is different from the threat of TLS Stripping as described in <a href="#sec-threat-tls-strip" class="xref">Section 7.4</a>.<a href="#section-7.11-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-security-tlsalt">
<section id="section-7.12">
<h3 id="name-alternate-uses-of-tls">
<a href="#section-7.12" class="section-number selfRef">7.12. </a><a href="#name-alternate-uses-of-tls" class="section-name selfRef">Alternate Uses of TLS</a>
</h3>
<p id="section-7.12-1">
This specification makes use of PKIX certificate validation and authentication within TLS.
There are alternate uses of TLS that are not necessarily incompatible with the security goals of this specification but that are outside of the scope of this document.
The following subsections give examples of alternate TLS uses.<a href="#section-7.12-1" class="pilcrow">¶</a></p>
<div id="sec-security-tlsnoauth">
<section id="section-7.12.1">
<h4 id="name-tls-without-authentication">
<a href="#section-7.12.1" class="section-number selfRef">7.12.1. </a><a href="#name-tls-without-authentication" class="section-name selfRef">TLS without Authentication</a>
</h4>
<p id="section-7.12.1-1"> In environments where PKI is available but there are restrictions on the issuance of certificates (including the contents of certificates), it may be possible to make use of TLS in a way that authenticates only the passive entity of a TCPCL session or that does not authenticate either entity.
Using TLS in a way that does not successfully authenticate some claim of both peer entities of a TCPCL session is outside of the scope of this document but does have properties similar to the opportunistic security model <span>[<a href="#RFC7435" class="xref">RFC7435</a>]</span>.<a href="#section-7.12.1-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-security-tlsnopki">
<section id="section-7.12.2">
<h4 id="name-non-certificate-tls-use">
<a href="#section-7.12.2" class="section-number selfRef">7.12.2. </a><a href="#name-non-certificate-tls-use" class="section-name selfRef">Non-certificate TLS Use</a>
</h4>
<p id="section-7.12.2-1">
In environments where PKI is unavailable, alternate uses of TLS that do not require certificates such as pre-shared key (PSK) authentication <span>[<a href="#RFC5489" class="xref">RFC5489</a>]</span> and the use of raw public keys <span>[<a href="#RFC7250" class="xref">RFC7250</a>]</span> are available and can be used to ensure confidentiality within the TCPCL.
Using non-PKI node authentication methods is outside of the scope of this document.<a href="#section-7.12.2-1" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="sec-security-xferid">
<section id="section-7.13">
<h3 id="name-predictability-of-transfer-">
<a href="#section-7.13" class="section-number selfRef">7.13. </a><a href="#name-predictability-of-transfer-" class="section-name selfRef">Predictability of Transfer IDs</a>
</h3>
<p id="section-7.13-1">
The only requirement on Transfer IDs is that they be unique within each session from the sending peer only.
The trivial algorithm of the first transfer starting at zero and later transfers incrementing by one causes absolutely predictable Transfer IDs.
Even when a TCPCL session is not TLS secured and there is an on-path attacker causing denial of service with XFER_REFUSE messages, it is not possible to preemptively refuse a transfer, so there is no benefit in having unpredictable Transfer IDs within a session.<a href="#section-7.13-1" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="sec-iana">
<section id="section-8">
<h2 id="name-iana-considerations">
<a href="#section-8" class="section-number selfRef">8. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a>
</h2>
<p id="section-8-1">
Registration procedures referred to in this section (e.g., the RFC Required policy) are defined in <span>[<a href="#RFC8126" class="xref">RFC8126</a>]</span>.<a href="#section-8-1" class="pilcrow">¶</a></p>
<p id="section-8-2">
Some of the registries have been defined as version specific for TCPCLv4, and these registries reuse some or all codepoints from TCPCLv3. This was done to disambiguate the use of these codepoints between TCPCLv3 and TCPCLv4 while preserving the semantics of some of the codepoints.<a href="#section-8-2" class="pilcrow">¶</a></p>
<div id="sec-iana-port">
<section id="section-8.1">
<h3 id="name-port-number">
<a href="#section-8.1" class="section-number selfRef">8.1. </a><a href="#name-port-number" class="section-name selfRef">Port Number</a>
</h3>
<p id="section-8.1-1">
Within the "Service Name and Transport Protocol Port Number Registry" <span>[<a href="#IANA-PORTS" class="xref">IANA-PORTS</a>]</span>, TCP port number 4556 had previously been assigned as the default port for the TCPCL; see <span>[<a href="#RFC7242" class="xref">RFC7242</a>]</span>.
This assignment is unchanged by TCPCL version 4, but the assignment reference has been updated to point to this specification.
Each TCPCL entity identifies its TCPCL protocol version in its initial contact (see Sections <a href="#sec-protocol-session" class="xref">3.2</a> and <a href="#sec-iana-protonum" class="xref">8.2</a>), so there is no ambiguity regarding what protocol is being used.
The related assignments for UDP and DCCP port 4556 (both registered by <span>[<a href="#RFC7122" class="xref">RFC7122</a>]</span>) are unchanged.<a href="#section-8.1-1" class="pilcrow">¶</a></p>
<span id="name-tcp-port-number-for-the-tcp"></span><table class="center" id="table-10">
<caption>
<a href="#table-10" class="selfRef">Table 10</a>:
<a href="#name-tcp-port-number-for-the-tcp" class="selfRef">TCP Port Number for the TCPCL</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Parameter</th>
<th class="text-left" rowspan="1" colspan="1">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">Service Name:</td>
<td class="text-left" rowspan="1" colspan="1">dtn-bundle</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Transport Protocol(s):</td>
<td class="text-left" rowspan="1" colspan="1">TCP</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Assignee:</td>
<td class="text-left" rowspan="1" colspan="1">IESG (iesg@ietf.org)</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Contact:</td>
<td class="text-left" rowspan="1" colspan="1">IESG (iesg@ietf.org)</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Description:</td>
<td class="text-left" rowspan="1" colspan="1">DTN Bundle TCP CL Protocol</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Reference:</td>
<td class="text-left" rowspan="1" colspan="1">This specification</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">Port Number:</td>
<td class="text-left" rowspan="1" colspan="1">4556</td>
</tr>
</tbody>
</table>
</section>
</div>
<div id="sec-iana-protonum">
<section id="section-8.2">
<h3 id="name-protocol-versions">
<a href="#section-8.2" class="section-number selfRef">8.2. </a><a href="#name-protocol-versions" class="section-name selfRef">Protocol Versions</a>
</h3>
<p id="section-8.2-1">
IANA has registered the following value in the "Bundle Protocol TCP Convergence-Layer Version Numbers" registry <span>[<a href="#RFC7242" class="xref">RFC7242</a>]</span>.<a href="#section-8.2-1" class="pilcrow">¶</a></p>
<span id="name-new-tcpcl-version-number"></span><table class="center" id="table-11">
<caption>
<a href="#table-11" class="selfRef">Table 11</a>:
<a href="#name-new-tcpcl-version-number" class="selfRef">New TCPCL Version Number</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Value</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
<th class="text-left" rowspan="1" colspan="1">Reference</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">4</td>
<td class="text-left" rowspan="1" colspan="1">TCPCLv4</td>
<td class="text-left" rowspan="1" colspan="1">This specification</td>
</tr>
</tbody>
</table>
</section>
</div>
<div id="sec-iana-session-extension-type">
<section id="section-8.3">
<h3 id="name-session-extension-types">
<a href="#section-8.3" class="section-number selfRef">8.3. </a><a href="#name-session-extension-types" class="section-name selfRef">Session Extension Types</a>
</h3>
<p id="section-8.3-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 Session Extension Types" registry and populated it with the contents of <a href="#tab-iana-session-extension-type" class="xref">Table 12</a>.
The registration procedure is Expert Review within the lower range 0x0001-0x7FFF.
Values in the range 0x8000-0xFFFF are reserved for Private or Experimental Use, which are not recorded by IANA.<a href="#section-8.3-1" class="pilcrow">¶</a></p>
<p id="section-8.3-2">
Specifications of new session extension types need to define the encoding of the Item Value data as well as any meaning or restriction on the number of or order of instances of the type within an extension item list.
Specifications need to define how the extension functions when no instance of the new extension type is received during session negotiation.<a href="#section-8.3-2" class="pilcrow">¶</a></p>
<p id="section-8.3-3">
Experts are encouraged to be biased towards approving registrations unless they are abusive, frivolous, or actively harmful (not merely esthetically displeasing or architecturally dubious).<a href="#section-8.3-3" class="pilcrow">¶</a></p>
<span id="name-session-extension-type-code"></span><div id="tab-iana-session-extension-type">
<table class="center" id="table-12">
<caption>
<a href="#table-12" class="selfRef">Table 12</a>:
<a href="#name-session-extension-type-code" class="selfRef">Session Extension Type Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Session Extension Type</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x0000</td>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x0001-0x7FFF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x8000-0xFFFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-transfer-extension-type">
<section id="section-8.4">
<h3 id="name-transfer-extension-types">
<a href="#section-8.4" class="section-number selfRef">8.4. </a><a href="#name-transfer-extension-types" class="section-name selfRef">Transfer Extension Types</a>
</h3>
<p id="section-8.4-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 Transfer Extension Types" registry and populated it with the contents of <a href="#tab-iana-transfer-extension-type" class="xref">Table 13</a>. The registration procedure is Expert Review within the lower range 0x0001-0x7FFF.
Values in the range 0x8000-0xFFFF are reserved for Private or Experimental Use, which are not recorded by
IANA.<a href="#section-8.4-1" class="pilcrow">¶</a></p>
<p id="section-8.4-2">
Specifications of new transfer extension types need to define the encoding of the Item Value data as well as any meaning or restriction on the number of or order of instances of the type within an extension item list.
Specifications need to define how the extension functions when no instance of the new extension type is received in a transfer.<a href="#section-8.4-2" class="pilcrow">¶</a></p>
<p id="section-8.4-3">
Experts are encouraged to be biased towards approving registrations unless they are abusive, frivolous, or actively harmful (not merely esthetically displeasing or architecturally dubious).<a href="#section-8.4-3" class="pilcrow">¶</a></p>
<span id="name-transfer-extension-type-cod"></span><div id="tab-iana-transfer-extension-type">
<table class="center" id="table-13">
<caption>
<a href="#table-13" class="selfRef">Table 13</a>:
<a href="#name-transfer-extension-type-cod" class="selfRef">Transfer Extension Type Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Transfer Extension Type</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x0000</td>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x0001</td>
<td class="text-left" rowspan="1" colspan="1">Transfer Length Extension</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x0002-0x7FFF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x8000-0xFFFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-message-types">
<section id="section-8.5">
<h3 id="name-message-types">
<a href="#section-8.5" class="section-number selfRef">8.5. </a><a href="#name-message-types" class="section-name selfRef">Message Types</a>
</h3>
<p id="section-8.5-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 Message Types" registry and populated it with the contents of <a href="#tab-iana-message-types" class="xref">Table 14</a>.
The registration procedure is RFC Required within the lower range 0x01-0xEF.
Values in the range 0xF0-0xFF are reserved for Private or Experimental Use, which are not recorded by
IANA.<a href="#section-8.5-1" class="pilcrow">¶</a></p>
<p id="section-8.5-2">
Specifications of new message types need to define the encoding of the message data as well as the purpose and relationship of the new message to existing session/transfer state within the baseline message sequencing.
The use of new message types needs to be negotiated between TCPCL entities within a session (using the session extension mechanism) so that the receiving entity can properly decode all message types used in the session.<a href="#section-8.5-2" class="pilcrow">¶</a></p>
<p id="section-8.5-3">
Experts are encouraged to favor new session/transfer extension types over new message types.
TCPCL messages are not self-delimiting, so care must be taken in introducing new message types.
If an entity receives an unknown message type, the only thing that can be done is to send a MSG_REJECT and close the TCP connection; not even a clean termination can be done at that point.<a href="#section-8.5-3" class="pilcrow">¶</a></p>
<span id="name-message-type-codes"></span><div id="tab-iana-message-types">
<table class="center" id="table-14">
<caption>
<a href="#table-14" class="selfRef">Table 14</a>:
<a href="#name-message-type-codes" class="selfRef">Message Type Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Message Type</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">XFER_SEGMENT</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">XFER_ACK</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">XFER_REFUSE</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">KEEPALIVE</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">SESS_TERM</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x06</td>
<td class="text-left" rowspan="1" colspan="1">MSG_REJECT</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x07</td>
<td class="text-left" rowspan="1" colspan="1">SESS_INIT</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x08-0xEF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0xF0-0xFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-XFER_REFUSE-codes">
<section id="section-8.6">
<h3 id="name-xfer_refuse-reason-codes-2">
<a href="#section-8.6" class="section-number selfRef">8.6. </a><a href="#name-xfer_refuse-reason-codes-2" class="section-name selfRef">XFER_REFUSE Reason Codes</a>
</h3>
<p id="section-8.6-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 XFER_REFUSE Reason Codes" registry and populated it with the contents of <a href="#tab-iana-XFER_REFUSE-codes" class="xref">Table 15</a>.
The registration procedure is Specification Required within the lower range 0x00-0xEF.
Values in the range 0xF0-0xFF are reserved for Private or Experimental Use, which are not recorded by
IANA.<a href="#section-8.6-1" class="pilcrow">¶</a></p>
<p id="section-8.6-2">
Specifications of new XFER_REFUSE reason codes need to define the meaning of the reason and disambiguate it from preexisting reasons. Each refusal reason needs to be usable by the receiving BPA to make retransmission or rerouting decisions.<a href="#section-8.6-2" class="pilcrow">¶</a></p>
<p id="section-8.6-3">
Experts are encouraged to be biased towards approving registrations unless they are abusive, frivolous, or actively harmful (not merely esthetically displeasing or architecturally dubious).<a href="#section-8.6-3" class="pilcrow">¶</a></p>
<span id="name-xfer_refuse-reason-codes-3"></span><div id="tab-iana-XFER_REFUSE-codes">
<table class="center" id="table-15">
<caption>
<a href="#table-15" class="selfRef">Table 15</a>:
<a href="#name-xfer_refuse-reason-codes-3" class="selfRef">XFER_REFUSE Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Refusal Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">Unknown</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">Completed</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">No Resources</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">Retransmit</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">Not Acceptable</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">Extension Failure</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x06</td>
<td class="text-left" rowspan="1" colspan="1">Session Terminating</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x07-0xEF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0xF0-0xFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-SESS_TERM-codes">
<section id="section-8.7">
<h3 id="name-sess_term-reason-codes-2">
<a href="#section-8.7" class="section-number selfRef">8.7. </a><a href="#name-sess_term-reason-codes-2" class="section-name selfRef">SESS_TERM Reason Codes</a>
</h3>
<p id="section-8.7-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 SESS_TERM Reason Codes" registry and populated it with the contents of <a href="#tab-iana-SESS_TERM-codes" class="xref">Table 16</a>.
The registration procedure is Specification Required within the lower range 0x00-0xEF.
Values in the range 0xF0-0xFF are reserved for Private or Experimental Use, which are not recorded by
IANA.<a href="#section-8.7-1" class="pilcrow">¶</a></p>
<p id="section-8.7-2">
Specifications of new SESS_TERM reason codes need to define the meaning of the reason and disambiguate it from preexisting reasons.
Each termination reason needs to be usable by the receiving BPA to make reconnection decisions.<a href="#section-8.7-2" class="pilcrow">¶</a></p>
<p id="section-8.7-3">
Experts are encouraged to be biased towards approving registrations unless they are abusive, frivolous, or actively harmful (not merely esthetically displeasing or architecturally dubious).<a href="#section-8.7-3" class="pilcrow">¶</a></p>
<span id="name-sess_term-reason-codes-3"></span><div id="tab-iana-SESS_TERM-codes">
<table class="center" id="table-16">
<caption>
<a href="#table-16" class="selfRef">Table 16</a>:
<a href="#name-sess_term-reason-codes-3" class="selfRef">SESS_TERM Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Termination Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">Unknown</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">Idle timeout</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">Version mismatch</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">Busy</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x04</td>
<td class="text-left" rowspan="1" colspan="1">Contact Failure</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x05</td>
<td class="text-left" rowspan="1" colspan="1">Resource Exhaustion</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x06-0xEF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0xF0-0xFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-MSG_REJECT-codes">
<section id="section-8.8">
<h3 id="name-msg_reject-reason-codes-2">
<a href="#section-8.8" class="section-number selfRef">8.8. </a><a href="#name-msg_reject-reason-codes-2" class="section-name selfRef">MSG_REJECT Reason Codes</a>
</h3>
<p id="section-8.8-1">
Under the "Bundle Protocol" registry <span>[<a href="#IANA-BUNDLE" class="xref">IANA-BUNDLE</a>]</span>, IANA has created the "Bundle Protocol TCP Convergence-Layer Version 4 MSG_REJECT Reason Codes" registry and populated it with the contents of <a href="#tab-iana-MSG_REJECT-codes" class="xref">Table 17</a>.
The registration procedure is Specification Required within the lower range 0x01-0xEF.
Values in the range 0xF0-0xFF are reserved for Private or Experimental Use, which are not recorded
by IANA.<a href="#section-8.8-1" class="pilcrow">¶</a></p>
<p id="section-8.8-2">
Specifications of new MSG_REJECT reason codes need to define the meaning of the reason and disambiguate it from preexisting reasons.
Each rejection reason needs to be usable by the receiving TCPCL entity to make message sequencing and/or session termination decisions.<a href="#section-8.8-2" class="pilcrow">¶</a></p>
<p id="section-8.8-3">
Experts are encouraged to be biased towards approving registrations unless they are abusive, frivolous, or actively harmful (not merely esthetically displeasing or architecturally dubious).<a href="#section-8.8-3" class="pilcrow">¶</a></p>
<span id="name-msg_reject-reason-codes-3"></span><div id="tab-iana-MSG_REJECT-codes">
<table class="center" id="table-17">
<caption>
<a href="#table-17" class="selfRef">Table 17</a>:
<a href="#name-msg_reject-reason-codes-3" class="selfRef">MSG_REJECT Reason Codes</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Code</th>
<th class="text-left" rowspan="1" colspan="1">Rejection Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x00</td>
<td class="text-left" rowspan="1" colspan="1">Reserved</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x01</td>
<td class="text-left" rowspan="1" colspan="1">Message Type Unknown</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x02</td>
<td class="text-left" rowspan="1" colspan="1">Message Unsupported</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x03</td>
<td class="text-left" rowspan="1" colspan="1">Message Unexpected</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0x04-0xEF</td>
<td class="text-left" rowspan="1" colspan="1">Unassigned</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">0xF0-0xFF</td>
<td class="text-left" rowspan="1" colspan="1">Reserved for Private or Experimental Use</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-smi-mod">
<section id="section-8.9">
<h3 id="name-object-identifier-for-pkix-">
<a href="#section-8.9" class="section-number selfRef">8.9. </a><a href="#name-object-identifier-for-pkix-" class="section-name selfRef">Object Identifier for PKIX Module Identifier</a>
</h3>
<p id="section-8.9-1">
IANA has registered the following in the "SMI Security for PKIX Module Identifier" registry <span>[<a href="#IANA-SMI" class="xref">IANA-SMI</a>]</span> for identifying the module described in <a href="#sec-asn1-mod" class="xref">Appendix B</a>.<a href="#section-8.9-1" class="pilcrow">¶</a></p>
<span id="name-new-smi-security-module"></span><div id="id-mod-dtn-tcpclv4-2021">
<table class="center" id="table-18">
<caption>
<a href="#table-18" class="selfRef">Table 18</a>:
<a href="#name-new-smi-security-module" class="selfRef">New SMI Security Module</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Decimal</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
<th class="text-left" rowspan="1" colspan="1">References</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">103</td>
<td class="text-left" rowspan="1" colspan="1">id-mod-dtn-tcpclv4-2021</td>
<td class="text-left" rowspan="1" colspan="1">This specification</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
<div id="sec-iana-pkix-on-oid">
<section id="section-8.10">
<h3 id="name-object-identifier-for-pkix-o">
<a href="#section-8.10" class="section-number selfRef">8.10. </a><a href="#name-object-identifier-for-pkix-o" class="section-name selfRef">Object Identifier for PKIX Other Name Forms</a>
</h3>
<p id="section-8.10-1">
IANA has registered the following in the "SMI Security for PKIX Other Name Forms" registry <span>[<a href="#IANA-SMI" class="xref">IANA-SMI</a>]</span> for
identifying bundle endpoint IDs:<a href="#section-8.10-1" class="pilcrow">¶</a></p>
<span id="name-new-pkix-other-name-form"></span><div id="id-on-bundleEID">
<table class="center" id="table-19">
<caption>
<a href="#table-19" class="selfRef">Table 19</a>:
<a href="#name-new-pkix-other-name-form" class="selfRef">New PKIX Other Name Form</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Decimal</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
<th class="text-left" rowspan="1" colspan="1">References</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">11</td>
<td class="text-left" rowspan="1" colspan="1">id-on-bundleEID</td>
<td class="text-left" rowspan="1" colspan="1">This specification</td>
</tr>
</tbody>
</table>
</div>
<p id="section-8.10-3">The formal structure of the associated Other Name Form is provided in <a href="#sec-asn1-mod" class="xref">Appendix B</a>. The use of this OID is defined in Sections <a href="#sec-tls-identification" class="xref">4.4.1</a> and <a href="#sec-tcpcl-cert-profile" class="xref">4.4.2</a>.<a href="#section-8.10-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="sec-iana-pkix-kp-oid">
<section id="section-8.11">
<h3 id="name-object-identifier-for-pkix-e">
<a href="#section-8.11" class="section-number selfRef">8.11. </a><a href="#name-object-identifier-for-pkix-e" class="section-name selfRef">Object Identifier for PKIX Extended Key Usage</a>
</h3>
<p id="section-8.11-1">
IANA has registered the following in the "SMI Security for PKIX Extended Key Purpose" registry <span>[<a href="#IANA-SMI" class="xref">IANA-SMI</a>]</span> for securing BP bundles.<a href="#section-8.11-1" class="pilcrow">¶</a></p>
<span id="name-new-pkix-extended-key-purpo"></span><div id="tbl-id-kp-bundleSecurity">
<table class="center" id="table-20">
<caption>
<a href="#table-20" class="selfRef">Table 20</a>:
<a href="#name-new-pkix-extended-key-purpo" class="selfRef">New PKIX Extended Key Purpose</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Decimal</th>
<th class="text-left" rowspan="1" colspan="1">Description</th>
<th class="text-left" rowspan="1" colspan="1">References</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">35</td>
<td class="text-left" rowspan="1" colspan="1">id-kp-bundleSecurity</td>
<td class="text-left" rowspan="1" colspan="1">This specification</td>
</tr>
</tbody>
</table>
</div>
<p id="section-8.11-3">The formal definition of this EKU is provided in <a href="#sec-asn1-mod" class="xref">Appendix B</a>. The use of this OID is defined in <a href="#sec-tcpcl-cert-profile" class="xref">Section 4.4.2</a>.<a href="#section-8.11-3" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<section id="section-9">
<h2 id="name-references">
<a href="#section-9" class="section-number selfRef">9. </a><a href="#name-references" class="section-name selfRef">References</a>
</h2>
<section id="section-9.1">
<h3 id="name-normative-references">
<a href="#section-9.1" class="section-number selfRef">9.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a>
</h3>
<dl class="references">
<dt id="IANA-BUNDLE">[IANA-BUNDLE]</dt>
<dd>
<span class="refAuthor">IANA</span>, <span class="refTitle">"Bundle Protocol"</span>, <span><<a href="https://www.iana.org/assignments/bundle/">https://www.iana.org/assignments/bundle/</a>></span>. </dd>
<dd class="break"></dd>
<dt id="IANA-PORTS">[IANA-PORTS]</dt>
<dd>
<span class="refAuthor">IANA</span>, <span class="refTitle">"Service Name and Transport Protocol Port Number Registry"</span>, <span><<a href="https://www.iana.org/assignments/service-names-port-numbers/">https://www.iana.org/assignments/service-names-port-numbers/</a>></span>. </dd>
<dd class="break"></dd>
<dt id="IANA-SMI">[IANA-SMI]</dt>
<dd>
<span class="refAuthor">IANA</span>, <span class="refTitle">"Structure of Management Information (SMI) Numbers (MIB Module Registrations)"</span>, <span><<a href="https://www.iana.org/assignments/smi-numbers/">https://www.iana.org/assignments/smi-numbers/</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC0793">[RFC0793]</dt>
<dd>
<span class="refAuthor">Postel, J.</span>, <span class="refTitle">"Transmission Control Protocol"</span>, <span class="seriesInfo">STD 7</span>, <span class="seriesInfo">RFC 793</span>, <span class="seriesInfo">DOI 10.17487/RFC0793</span>, <time datetime="1981-09" class="refDate">September 1981</time>, <span><<a href="https://www.rfc-editor.org/info/rfc793">https://www.rfc-editor.org/info/rfc793</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC1122">[RFC1122]</dt>
<dd>
<span class="refAuthor">Braden, R., Ed.</span>, <span class="refTitle">"Requirements for Internet Hosts - Communication Layers"</span>, <span class="seriesInfo">STD 3</span>, <span class="seriesInfo">RFC 1122</span>, <span class="seriesInfo">DOI 10.17487/RFC1122</span>, <time datetime="1989-10" class="refDate">October 1989</time>, <span><<a href="https://www.rfc-editor.org/info/rfc1122">https://www.rfc-editor.org/info/rfc1122</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC2119">[RFC2119]</dt>
<dd>
<span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC3986">[RFC3986]</dt>
<dd>
<span class="refAuthor">Berners-Lee, T.</span>, <span class="refAuthor">Fielding, R.</span>, and <span class="refAuthor">L. Masinter</span>, <span class="refTitle">"Uniform Resource Identifier (URI): Generic Syntax"</span>, <span class="seriesInfo">STD 66</span>, <span class="seriesInfo">RFC 3986</span>, <span class="seriesInfo">DOI 10.17487/RFC3986</span>, <time datetime="2005-01" class="refDate">January 2005</time>, <span><<a href="https://www.rfc-editor.org/info/rfc3986">https://www.rfc-editor.org/info/rfc3986</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC5280">[RFC5280]</dt>
<dd>
<span class="refAuthor">Cooper, D.</span>, <span class="refAuthor">Santesson, S.</span>, <span class="refAuthor">Farrell, S.</span>, <span class="refAuthor">Boeyen, S.</span>, <span class="refAuthor">Housley, R.</span>, and <span class="refAuthor">W. Polk</span>, <span class="refTitle">"Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"</span>, <span class="seriesInfo">RFC 5280</span>, <span class="seriesInfo">DOI 10.17487/RFC5280</span>, <time datetime="2008-05" class="refDate">May 2008</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5280">https://www.rfc-editor.org/info/rfc5280</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6066">[RFC6066]</dt>
<dd>
<span class="refAuthor">Eastlake 3rd, D.</span>, <span class="refTitle">"Transport Layer Security (TLS) Extensions: Extension Definitions"</span>, <span class="seriesInfo">RFC 6066</span>, <span class="seriesInfo">DOI 10.17487/RFC6066</span>, <time datetime="2011-01" class="refDate">January 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6066">https://www.rfc-editor.org/info/rfc6066</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6125">[RFC6125]</dt>
<dd>
<span class="refAuthor">Saint-Andre, P.</span> and <span class="refAuthor">J. Hodges</span>, <span class="refTitle">"Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)"</span>, <span class="seriesInfo">RFC 6125</span>, <span class="seriesInfo">DOI 10.17487/RFC6125</span>, <time datetime="2011-03" class="refDate">March 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6125">https://www.rfc-editor.org/info/rfc6125</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6960">[RFC6960]</dt>
<dd>
<span class="refAuthor">Santesson, S.</span>, <span class="refAuthor">Myers, M.</span>, <span class="refAuthor">Ankney, R.</span>, <span class="refAuthor">Malpani, A.</span>, <span class="refAuthor">Galperin, S.</span>, and <span class="refAuthor">C. Adams</span>, <span class="refTitle">"X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP"</span>, <span class="seriesInfo">RFC 6960</span>, <span class="seriesInfo">DOI 10.17487/RFC6960</span>, <time datetime="2013-06" class="refDate">June 2013</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6960">https://www.rfc-editor.org/info/rfc6960</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7525">[RFC7525]</dt>
<dd>
<span class="refAuthor">Sheffer, Y.</span>, <span class="refAuthor">Holz, R.</span>, and <span class="refAuthor">P. Saint-Andre</span>, <span class="refTitle">"Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)"</span>, <span class="seriesInfo">BCP 195</span>, <span class="seriesInfo">RFC 7525</span>, <span class="seriesInfo">DOI 10.17487/RFC7525</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7525">https://www.rfc-editor.org/info/rfc7525</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8126">[RFC8126]</dt>
<dd>
<span class="refAuthor">Cotton, M.</span>, <span class="refAuthor">Leiba, B.</span>, and <span class="refAuthor">T. Narten</span>, <span class="refTitle">"Guidelines for Writing an IANA Considerations Section in RFCs"</span>, <span class="seriesInfo">BCP 26</span>, <span class="seriesInfo">RFC 8126</span>, <span class="seriesInfo">DOI 10.17487/RFC8126</span>, <time datetime="2017-06" class="refDate">June 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8126">https://www.rfc-editor.org/info/rfc8126</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8174">[RFC8174]</dt>
<dd>
<span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8446">[RFC8446]</dt>
<dd>
<span class="refAuthor">Rescorla, E.</span>, <span class="refTitle">"The Transport Layer Security (TLS) Protocol Version 1.3"</span>, <span class="seriesInfo">RFC 8446</span>, <span class="seriesInfo">DOI 10.17487/RFC8446</span>, <time datetime="2018-08" class="refDate">August 2018</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8446">https://www.rfc-editor.org/info/rfc8446</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC9171">[RFC9171]</dt>
<dd>
<span class="refAuthor">Burleigh, S.</span>, <span class="refAuthor">Fall, K.</span>, and <span class="refAuthor">E. Birrane, III</span>, <span class="refTitle">"Bundle Protocol Version 7"</span>, <span class="seriesInfo">RFC 9171</span>, <span class="seriesInfo">DOI 10.17487/RFC9171</span>, <time datetime="2022-01" class="refDate">January 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9171">https://www.rfc-editor.org/info/rfc9171</a>></span>. </dd>
<dd class="break"></dd>
<dt id="X.680">[X.680]</dt>
<dd>
<span class="refAuthor">ITU-T</span>, <span class="refTitle">"Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation"</span>, <span class="refContent">ITU-T Recommendation X.680, ISO/IEC 8824-1:2021</span>, <time datetime="2021-02" class="refDate">February 2021</time>, <span><<a href="https://www.itu.int/rec/T-REC-X.680-202102-I/en">https://www.itu.int/rec/T-REC-X.680-202102-I/en</a>></span>. </dd>
<dd class="break"></dd>
</dl>
</section>
<section id="section-9.2">
<h3 id="name-informative-references">
<a href="#section-9.2" class="section-number selfRef">9.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a>
</h3>
<dl class="references">
<dt id="AEAD-LIMITS">[AEAD-LIMITS]</dt>
<dd>
<span class="refAuthor">Luykx, A.</span> and <span class="refAuthor">K. Paterson</span>, <span class="refTitle">"Limits on Authenticated Encryption Use in TLS"</span>, <time datetime="2017-08" class="refDate">August 2017</time>, <span><<a href="https://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf">https://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC2595">[RFC2595]</dt>
<dd>
<span class="refAuthor">Newman, C.</span>, <span class="refTitle">"Using TLS with IMAP, POP3 and ACAP"</span>, <span class="seriesInfo">RFC 2595</span>, <span class="seriesInfo">DOI 10.17487/RFC2595</span>, <time datetime="1999-06" class="refDate">June 1999</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2595">https://www.rfc-editor.org/info/rfc2595</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC3552">[RFC3552]</dt>
<dd>
<span class="refAuthor">Rescorla, E.</span> and <span class="refAuthor">B. Korver</span>, <span class="refTitle">"Guidelines for Writing RFC Text on Security Considerations"</span>, <span class="seriesInfo">BCP 72</span>, <span class="seriesInfo">RFC 3552</span>, <span class="seriesInfo">DOI 10.17487/RFC3552</span>, <time datetime="2003-07" class="refDate">July 2003</time>, <span><<a href="https://www.rfc-editor.org/info/rfc3552">https://www.rfc-editor.org/info/rfc3552</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC4511">[RFC4511]</dt>
<dd>
<span class="refAuthor">Sermersheim, J., Ed.</span>, <span class="refTitle">"Lightweight Directory Access Protocol (LDAP): The Protocol"</span>, <span class="seriesInfo">RFC 4511</span>, <span class="seriesInfo">DOI 10.17487/RFC4511</span>, <time datetime="2006-06" class="refDate">June 2006</time>, <span><<a href="https://www.rfc-editor.org/info/rfc4511">https://www.rfc-editor.org/info/rfc4511</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC4838">[RFC4838]</dt>
<dd>
<span class="refAuthor">Cerf, V.</span>, <span class="refAuthor">Burleigh, S.</span>, <span class="refAuthor">Hooke, A.</span>, <span class="refAuthor">Torgerson, L.</span>, <span class="refAuthor">Durst, R.</span>, <span class="refAuthor">Scott, K.</span>, <span class="refAuthor">Fall, K.</span>, and <span class="refAuthor">H. Weiss</span>, <span class="refTitle">"Delay-Tolerant Networking Architecture"</span>, <span class="seriesInfo">RFC 4838</span>, <span class="seriesInfo">DOI 10.17487/RFC4838</span>, <time datetime="2007-04" class="refDate">April 2007</time>, <span><<a href="https://www.rfc-editor.org/info/rfc4838">https://www.rfc-editor.org/info/rfc4838</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC5489">[RFC5489]</dt>
<dd>
<span class="refAuthor">Badra, M.</span> and <span class="refAuthor">I. Hajjeh</span>, <span class="refTitle">"ECDHE_PSK Cipher Suites for Transport Layer Security (TLS)"</span>, <span class="seriesInfo">RFC 5489</span>, <span class="seriesInfo">DOI 10.17487/RFC5489</span>, <time datetime="2009-03" class="refDate">March 2009</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5489">https://www.rfc-editor.org/info/rfc5489</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC5912">[RFC5912]</dt>
<dd>
<span class="refAuthor">Hoffman, P.</span> and <span class="refAuthor">J. Schaad</span>, <span class="refTitle">"New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)"</span>, <span class="seriesInfo">RFC 5912</span>, <span class="seriesInfo">DOI 10.17487/RFC5912</span>, <time datetime="2010-06" class="refDate">June 2010</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5912">https://www.rfc-editor.org/info/rfc5912</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6698">[RFC6698]</dt>
<dd>
<span class="refAuthor">Hoffman, P.</span> and <span class="refAuthor">J. Schlyter</span>, <span class="refTitle">"The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA"</span>, <span class="seriesInfo">RFC 6698</span>, <span class="seriesInfo">DOI 10.17487/RFC6698</span>, <time datetime="2012-08" class="refDate">August 2012</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6698">https://www.rfc-editor.org/info/rfc6698</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7122">[RFC7122]</dt>
<dd>
<span class="refAuthor">Kruse, H.</span>, <span class="refAuthor">Jero, S.</span>, and <span class="refAuthor">S. Ostermann</span>, <span class="refTitle">"Datagram Convergence Layers for the Delay- and Disruption-Tolerant Networking (DTN) Bundle Protocol and Licklider Transmission Protocol (LTP)"</span>, <span class="seriesInfo">RFC 7122</span>, <span class="seriesInfo">DOI 10.17487/RFC7122</span>, <time datetime="2014-03" class="refDate">March 2014</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7122">https://www.rfc-editor.org/info/rfc7122</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7242">[RFC7242]</dt>
<dd>
<span class="refAuthor">Demmer, M.</span>, <span class="refAuthor">Ott, J.</span>, and <span class="refAuthor">S. Perreault</span>, <span class="refTitle">"Delay-Tolerant Networking TCP Convergence-Layer Protocol"</span>, <span class="seriesInfo">RFC 7242</span>, <span class="seriesInfo">DOI 10.17487/RFC7242</span>, <time datetime="2014-06" class="refDate">June 2014</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7242">https://www.rfc-editor.org/info/rfc7242</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7250">[RFC7250]</dt>
<dd>
<span class="refAuthor">Wouters, P., Ed.</span>, <span class="refAuthor">Tschofenig, H., Ed.</span>, <span class="refAuthor">Gilmore, J.</span>, <span class="refAuthor">Weiler, S.</span>, and <span class="refAuthor">T. Kivinen</span>, <span class="refTitle">"Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)"</span>, <span class="seriesInfo">RFC 7250</span>, <span class="seriesInfo">DOI 10.17487/RFC7250</span>, <time datetime="2014-06" class="refDate">June 2014</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7250">https://www.rfc-editor.org/info/rfc7250</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7435">[RFC7435]</dt>
<dd>
<span class="refAuthor">Dukhovni, V.</span>, <span class="refTitle">"Opportunistic Security: Some Protection Most of the Time"</span>, <span class="seriesInfo">RFC 7435</span>, <span class="seriesInfo">DOI 10.17487/RFC7435</span>, <time datetime="2014-12" class="refDate">December 2014</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7435">https://www.rfc-editor.org/info/rfc7435</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7457">[RFC7457]</dt>
<dd>
<span class="refAuthor">Sheffer, Y.</span>, <span class="refAuthor">Holz, R.</span>, and <span class="refAuthor">P. Saint-Andre</span>, <span class="refTitle">"Summarizing Known Attacks on Transport Layer Security (TLS) and Datagram TLS (DTLS)"</span>, <span class="seriesInfo">RFC 7457</span>, <span class="seriesInfo">DOI 10.17487/RFC7457</span>, <time datetime="2015-02" class="refDate">February 2015</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7457">https://www.rfc-editor.org/info/rfc7457</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8555">[RFC8555]</dt>
<dd>
<span class="refAuthor">Barnes, R.</span>, <span class="refAuthor">Hoffman-Andrews, J.</span>, <span class="refAuthor">McCarney, D.</span>, and <span class="refAuthor">J. Kasten</span>, <span class="refTitle">"Automatic Certificate Management Environment (ACME)"</span>, <span class="seriesInfo">RFC 8555</span>, <span class="seriesInfo">DOI 10.17487/RFC8555</span>, <time datetime="2019-03" class="refDate">March 2019</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8555">https://www.rfc-editor.org/info/rfc8555</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC9172">[RFC9172]</dt>
<dd>
<span class="refAuthor">Birrane, III, E.</span> and <span class="refAuthor">K. McKeever</span>, <span class="refTitle">"Bundle Protocol Security (BPSec)"</span>, <span class="seriesInfo">RFC 9172</span>, <span class="seriesInfo">DOI 10.17487/RFC9172</span>, <time datetime="2022-01" class="refDate">January 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9172">https://www.rfc-editor.org/info/rfc9172</a>></span>. </dd>
<dd class="break"></dd>
<dt id="I-D.ietf-dtn-bibect">[DTN-BIBECT]</dt>
<dd>
<span class="refAuthor">Burleigh, S.</span>, <span class="refTitle">"Bundle-in-Bundle Encapsulation"</span>, <span class="refContent">Work in Progress</span>, <span class="seriesInfo">Internet-Draft, draft-ietf-dtn-bibect-03</span>, <time datetime="2020-02-18" class="refDate">18 February 2020</time>, <span><<a href="https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03">https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03</a>></span>. </dd>
<dd class="break"></dd>
</dl>
</section>
</section>
<section id="appendix-A">
<h2 id="name-significant-changes-from-rf">
<a href="#appendix-A" class="section-number selfRef">Appendix A. </a><a href="#name-significant-changes-from-rf" class="section-name selfRef">Significant Changes from RFC 7242</a>
</h2>
<p id="appendix-A-1">
The areas in which changes from <span>[<a href="#RFC7242" class="xref">RFC7242</a>]</span> have been made to existing headers and messages are as follows:<a href="#appendix-A-1" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="appendix-A-2.1">Split Contact Header into pre-TLS protocol negotiation and SESS_INIT parameter negotiation. The Contact Header is now fixed length.<a href="#appendix-A-2.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.2">Changed Contact Header content to limit number of negotiated options.<a href="#appendix-A-2.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.3">Added session option to negotiate maximum segment size (per each direction).<a href="#appendix-A-2.3" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.4">Renamed "endpoint ID" to "node ID" to conform with BPv7 terminology.<a href="#appendix-A-2.4" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.5">Added session extension capability.<a href="#appendix-A-2.5" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.6">Added transfer extension capability. Moved transfer total length into an extension item.<a href="#appendix-A-2.6" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.7">Defined new IANA registries for message / type / reason codes to allow renaming some codes for clarity.<a href="#appendix-A-2.7" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.8">Pointed out that segments of all new IANA registries are reserved for private/experimental use.<a href="#appendix-A-2.8" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.9">Expanded Message Header to octet-aligned fields instead of bit-packing.<a href="#appendix-A-2.9" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.10">Added a bundle transfer identification number to all bundle-related messages (XFER_SEGMENT, XFER_ACK, XFER_REFUSE).<a href="#appendix-A-2.10" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.11">Added flags in XFER_ACK to mirror flags from XFER_SEGMENT.<a href="#appendix-A-2.11" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.12">Removed all uses of Self-Delimiting Numeric Value (SDNV) fields and replaced with fixed-bit-length (network byte order) fields.<a href="#appendix-A-2.12" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.13">Renamed SHUTDOWN to SESS_TERM to deconflict term "shutdown" related to TCP connections.<a href="#appendix-A-2.13" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-2.14">Removed the notion of a reconnection delay parameter.<a href="#appendix-A-2.14" class="pilcrow">¶</a>
</li>
</ul>
<p id="appendix-A-3">
The areas in which extensions from <span>[<a href="#RFC7242" class="xref">RFC7242</a>]</span> have been made as new messages and codes are as follows:<a href="#appendix-A-3" class="pilcrow">¶</a></p>
<ul class="normal">
<li class="normal" id="appendix-A-4.1">Added MSG_REJECT message to indicate that an unknown or unhandled message was received.<a href="#appendix-A-4.1" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-4.2">Added TLS connection security mechanism.<a href="#appendix-A-4.2" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-4.3">Added "Not Acceptable", "Extension Failure", and "Session Terminating" XFER_REFUSE reason codes.<a href="#appendix-A-4.3" class="pilcrow">¶</a>
</li>
<li class="normal" id="appendix-A-4.4">Added "Contact Failure" (contact negotiation failure) and "Resource Exhaustion" SESS_TERM reason codes.<a href="#appendix-A-4.4" class="pilcrow">¶</a>
</li>
</ul>
</section>
<div id="sec-asn1-mod">
<section id="appendix-B">
<h2 id="name-asn1-module">
<a href="#appendix-B" class="section-number selfRef">Appendix B. </a><a href="#name-asn1-module" class="section-name selfRef">ASN.1 Module</a>
</h2>
<p id="appendix-B-1">
The following ASN.1 module formally specifies the <code>BundleEID</code> structure, its Other Name Form, and the <code>bundleSecurity</code> EKU, using ASN.1 syntax per <span>[<a href="#X.680" class="xref">X.680</a>]</span>.
This specification uses the ASN.1 definitions from <span>[<a href="#RFC5912" class="xref">RFC5912</a>]</span> with the 2002 ASN.1 notation used in that document.<a href="#appendix-B-1" class="pilcrow">¶</a></p>
<div id="appendix-B-2">
<pre class="lang-asn.1 sourcecode"><CODE BEGINS>
DTN-TCPCLv4-2021
{ iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-dtn-tcpclv4-2021(103) }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
IMPORTS
OTHER-NAME
FROM PKIX1Implicit-2009 -- [RFC5912]
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-implicit-02(59) }
id-pkix
FROM PKIX1Explicit-2009 -- [RFC5912]
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-explicit-02(51) } ;
id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
id-on OBJECT IDENTIFIER ::= { id-pkix 8 }
DTNOtherNames OTHER-NAME ::= { on-bundleEID, ... }
-- The otherName definition for BundleEID
on-bundleEID OTHER-NAME ::= {
BundleEID IDENTIFIED BY { id-on-bundleEID }
}
id-on-bundleEID OBJECT IDENTIFIER ::= { id-on 11 }
-- Same encoding as GeneralName of uniformResourceIdentifier
BundleEID ::= IA5String
-- The Extended Key Usage key for bundle security
id-kp-bundleSecurity OBJECT IDENTIFIER ::= { id-kp 35 }
END
<CODE ENDS></pre><a href="#appendix-B-2" class="pilcrow">¶</a>
</div>
</section>
</div>
<section id="appendix-C">
<h2 id="name-example-of-the-bundleeid-ot">
<a href="#appendix-C" class="section-number selfRef">Appendix C. </a><a href="#name-example-of-the-bundleeid-ot" class="section-name selfRef">Example of the BundleEID Other Name Form</a>
</h2>
<p id="appendix-C-1">
This non-normative example demonstrates an otherName with a name form of <code>BundleEID</code> to encode the node ID "dtn://example/".<a href="#appendix-C-1" class="pilcrow">¶</a></p>
<p id="appendix-C-2">
The hexadecimal form of the DER encoding of the otherName is as follows:<a href="#appendix-C-2" class="pilcrow">¶</a></p>
<div id="appendix-C-3">
<pre class="lang-hex sourcecode">
a01c06082b0601050507080ba010160e64746e3a2f2f6578616d706c652f
</pre><a href="#appendix-C-3" class="pilcrow">¶</a>
</div>
<p id="appendix-C-4">
And the text decoding in <a href="#fig-example-dtneid" class="xref">Figure 28</a> is an output of Peter Gutmann's "dumpasn1" program.<a href="#appendix-C-4" class="pilcrow">¶</a></p>
<span id="name-visualized-decoding-of-the-"></span><div id="fig-example-dtneid">
<figure id="figure-28">
<div class="alignLeft art-ascii-art art-text artwork" id="appendix-C-5.1">
<pre>
0 28: [0] {
2 8: OBJECT IDENTIFIER '1 3 6 1 5 5 7 8 11'
12 16: [0] {
14 14: IA5String 'dtn://example/'
: }
: }
</pre>
</div>
<figcaption><a href="#figure-28" class="selfRef">Figure 28</a>:
<a href="#name-visualized-decoding-of-the-" class="selfRef">Visualized Decoding of the on-bundleEID</a>
</figcaption></figure>
</div>
</section>
<div id="sec-doc-ack">
<section id="appendix-D">
<h2 id="name-acknowledgments">
<a href="#name-acknowledgments" class="section-name selfRef">Acknowledgments</a>
</h2>
<p id="appendix-D-1">
This specification is based on comments regarding the implementation of <span>[<a href="#RFC7242" class="xref">RFC7242</a>]</span> as provided by <span class="contact-name">Scott Burleigh</span>.<a href="#appendix-D-1" class="pilcrow">¶</a></p>
<p id="appendix-D-2">
The ASN.1 module and its Other Name Form are based on a recommendation provided by <span class="contact-name">Russ Housley</span>.<a href="#appendix-D-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="authors-addresses">
<section id="appendix-E">
<h2 id="name-authors-addresses">
<a href="#name-authors-addresses" class="section-name selfRef">Authors' Addresses</a>
</h2>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Brian Sipos</span></div>
<div dir="auto" class="left"><span class="org">RKF Engineering Solutions, LLC</span></div>
<div dir="auto" class="left"><span class="street-address">7500 Old Georgetown Road<br>Suite 1275</span></div>
<div dir="auto" class="left">
<span class="locality">Bethesda</span>, <span class="region">MD</span> <span class="postal-code">20814-6198</span>
</div>
<div dir="auto" class="left"><span class="country-name">United States of America</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:brian.sipos+ietf@gmail.com" class="email">brian.sipos+ietf@gmail.com</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Michael Demmer</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:demmer@gmail.com" class="email">demmer@gmail.com</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Jörg Ott</span></div>
<div dir="auto" class="left"><span class="org">Technical University of Munich</span></div>
<div dir="auto" class="left"><span class="extended-address">Department of Informatics<br>Chair of Connected Mobility</span></div>
<div dir="auto" class="left"><span class="street-address">Boltzmannstrasse 3</span></div>
<div dir="auto" class="left">
<span class="postal-code">DE-85748</span> <span class="locality">Garching</span>
</div>
<div dir="auto" class="left"><span class="country-name">Germany</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:ott@in.tum.de" class="email">ott@in.tum.de</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Simon Perreault</span></div>
<div dir="auto" class="left"><span class="org">LogMeIn</span></div>
<div dir="auto" class="left"><span class="street-address">410 boulevard Charest Est<br>Suite 250</span></div>
<div dir="auto" class="left">
<span class="locality">Quebec</span> <span class="region">QC</span> <span class="postal-code">G1K 8G3</span>
</div>
<div dir="auto" class="left"><span class="country-name">Canada</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:simon.perreault@logmein.com" class="email">simon.perreault@logmein.com</a>
</div>
</address>
</section>
</div>
<script>const toc = document.getElementById("toc");
toc.querySelector("h2").addEventListener("click", e => {
toc.classList.toggle("active");
});
toc.querySelector("nav").addEventListener("click", e => {
toc.classList.remove("active");
});
</script>
</body>
</html>
|