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
|
<!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 8724: SCHC: Generic Framework for Static Context Header Compression and Fragmentation</title>
<meta content="Ana Minaburo" name="author">
<meta content="Laurent Toutain" name="author">
<meta content="Carles Gomez" name="author">
<meta content="Dominique Barthel" name="author">
<meta content="Juan Carlos Zuniga" name="author">
<meta content="
This document defines the Static Context Header Compression
and fragmentation (SCHC) framework, which provides both a header compression
mechanism and an optional fragmentation mechanism. SCHC has been
designed with Low-Power Wide Area Networks (LPWANs) in mind.
SCHC compression is based on a common static context stored both in the LPWAN device and in the network infrastructure side. This document defines a generic header compression mechanism and its application to compress IPv6/UDP headers.
This document also specifies an optional fragmentation and
reassembly mechanism. It can be used to support the IPv6 MTU
requirement over the LPWAN technologies. Fragmentation is needed
for IPv6 datagrams that, after SCHC compression or when such
compression was not possible, still exceed the Layer 2 maximum payload size.
The SCHC header compression and fragmentation mechanisms are independent of the specific LPWAN technology over which they are used. This document defines generic functionalities and offers flexibility with regard to parameter settings and mechanism choices.
This document standardizes the exchange over the LPWAN between two SCHC entities.
Settings and choices specific to a technology or a product are expected to be grouped into profiles, which are specified in other documents.
Data models for the context and profiles are out of scope.
" name="description">
<meta content="xml2rfc 2.43.0" name="generator">
<meta content="header compression" name="keyword">
<meta content="compression" name="keyword">
<meta content="fragmentation" name="keyword">
<meta content="static context" name="keyword">
<meta content="rule-based" name="keyword">
<meta content="LPWAN" name="keyword">
<meta content="LPWANs" name="keyword">
<meta content="low power" name="keyword">
<meta content="low-power" name="keyword">
<meta content="6LoWPAN" name="keyword">
<meta content="6lo" name="keyword">
<meta content="LoWPAN" name="keyword">
<meta content="LoWPANs" name="keyword">
<meta content="LLN" name="keyword">
<meta content="LLNs" name="keyword">
<meta content="LTN" name="keyword">
<meta content="LTE" name="keyword">
<meta content="LTE-M" name="keyword">
<meta content="Sigfox" name="keyword">
<meta content="LoRaWAN" name="keyword">
<meta content="NB-IOT" name="keyword">
<meta content="5G" name="keyword">
<meta content="IoT" name="keyword">
<meta content="Internet of Things" name="keyword">
<meta content="adaptation layer" name="keyword">
<meta content="UDP" name="keyword">
<meta content="IPv6" name="keyword">
<meta content="WSN" name="keyword">
<meta content="sensor network" name="keyword">
<meta content="wireless sensor network" name="keyword">
<meta content="802.15.4" name="keyword">
<meta content="constrained network" name="keyword">
<meta content="constrained node" name="keyword">
<meta content="constrained-node network" name="keyword">
<meta content="8724" name="rfc.number">
<link href="rfc8724.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.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;
}
#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;
}
}
/* Avoid wrapping of URLs in references */
@media screen {
.references a {
white-space: nowrap;
}
}
/* 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: avoid-page;
break-after: auto;
}
/* Avoid breaks between <dt> and <dd> */
dl {
break-inside: auto;
}
dt {
break-before: auto;
break-inside: avoid-page;
break-after: avoid-page;
}
dd {
break-before: avoid-page;
break-inside: avoid-page;
break-after: auto;
}
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;
}
}</style>
<link href="rfc-local.css" rel="stylesheet" type="text/css">
<link href="https://dx.doi.org/10.17487/rfc8724" rel="alternate">
<link href="urn:issn:2070-1721" rel="alternate">
<link href="https://datatracker.ietf.org/doc/draft-ietf-lpwan-ipv6-static-context-hc-24" 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 8724</td>
<td class="center">LPWAN SCHC</td>
<td class="right">April 2020</td>
</tr></thead>
<tfoot><tr>
<td class="left">Minaburo, 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/rfc8724" class="eref">8724</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="2020-04" class="published">April 2020</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">A. Minaburo</div>
<div class="org">Acklio</div>
</div>
<div class="author">
<div class="author-name">L. Toutain</div>
<div class="org">IMT Atlantique</div>
</div>
<div class="author">
<div class="author-name">C. Gomez</div>
<div class="org">Universitat Politecnica de Catalunya</div>
</div>
<div class="author">
<div class="author-name">D. Barthel</div>
<div class="org">Orange Labs</div>
</div>
<div class="author">
<div class="author-name">JC. Zuniga</div>
<div class="org">SIGFOX</div>
</div>
</dd>
</dl>
</div>
<h1 id="rfcnum">RFC 8724</h1>
<h1 id="title">SCHC: Generic Framework for Static Context Header Compression and Fragmentation</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">This document defines the Static Context Header Compression
and fragmentation (SCHC) framework, which provides both a header compression
mechanism and an optional fragmentation mechanism. SCHC has been
designed with Low-Power Wide Area Networks (LPWANs) in mind.<a href="#section-abstract-1" class="pilcrow">¶</a></p>
<p id="section-abstract-2">SCHC compression is based on a common static context stored both in the LPWAN device and in the network infrastructure side. This document defines a generic header compression mechanism and its application to compress IPv6/UDP headers.<a href="#section-abstract-2" class="pilcrow">¶</a></p>
<p id="section-abstract-3">This document also specifies an optional fragmentation and
reassembly mechanism. It can be used to support the IPv6 MTU
requirement over the LPWAN technologies. Fragmentation is needed
for IPv6 datagrams that, after SCHC compression or when such
compression was not possible, still exceed the Layer 2 maximum payload size.<a href="#section-abstract-3" class="pilcrow">¶</a></p>
<p id="section-abstract-4">The SCHC header compression and fragmentation mechanisms are independent of the specific LPWAN technology over which they are used. This document defines generic functionalities and offers flexibility with regard to parameter settings and mechanism choices.
This document standardizes the exchange over the LPWAN between two SCHC entities.
Settings and choices specific to a technology or a product are expected to be grouped into profiles, which are specified in other documents.
Data models for the context and profiles are out of scope.<a href="#section-abstract-4" 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/rfc8724">https://www.rfc-editor.org/info/rfc8724</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) 2020 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 Simplified BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Simplified 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="toc ulEmpty">
<li class="toc 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><a href="#section-toc.1-1.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.2">
<p id="section-toc.1-1.2.1" class="keepWithNext"><a href="#section-2" class="xref">2</a>. <a href="#name-requirements-notation" class="xref">Requirements Notation</a><a href="#section-toc.1-1.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.3">
<p id="section-toc.1-1.3.1" class="keepWithNext"><a href="#section-3" class="xref">3</a>. <a href="#name-lpwan-architecture" class="xref">LPWAN Architecture</a><a href="#section-toc.1-1.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-terminology" class="xref">Terminology</a><a href="#section-toc.1-1.4.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-schc-overview" class="xref">SCHC Overview</a><a href="#section-toc.1-1.5.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc 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-schc-packet-format" class="xref">SCHC Packet Format</a><a href="#section-toc.1-1.5.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-functional-mapping" class="xref">Functional Mapping</a><a href="#section-toc.1-1.5.2.2.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc 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-ruleid" class="xref">RuleID</a><a href="#section-toc.1-1.6.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-compression-decompression" class="xref">Compression/Decompression</a><a href="#section-toc.1-1.7.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc 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-schc-c-d-rules" class="xref">SCHC C/D Rules</a><a href="#section-toc.1-1.7.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-packet-processing" class="xref">Packet Processing</a><a href="#section-toc.1-1.7.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-matching-operators" class="xref">Matching Operators</a><a href="#section-toc.1-1.7.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-compression-decompression-a" class="xref">Compression/Decompression Actions (CDA)</a><a href="#section-toc.1-1.7.2.4.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.1">
<p id="section-toc.1-1.7.2.4.2.1.1"><a href="#section-7.4.1" class="xref">7.4.1</a>. <a href="#name-processing-fixed-length-fie" class="xref">Processing Fixed-Length Fields</a><a href="#section-toc.1-1.7.2.4.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.2">
<p id="section-toc.1-1.7.2.4.2.2.1"><a href="#section-7.4.2" class="xref">7.4.2</a>. <a href="#name-processing-variable-length-" class="xref">Processing Variable-Length Fields</a><a href="#section-toc.1-1.7.2.4.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.3">
<p id="section-toc.1-1.7.2.4.2.3.1"><a href="#section-7.4.3" class="xref">7.4.3</a>. <a href="#name-not-sent-cda" class="xref">Not-Sent CDA</a><a href="#section-toc.1-1.7.2.4.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.4">
<p id="section-toc.1-1.7.2.4.2.4.1"><a href="#section-7.4.4" class="xref">7.4.4</a>. <a href="#name-value-sent-cda" class="xref">Value-Sent CDA</a><a href="#section-toc.1-1.7.2.4.2.4.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.5">
<p id="section-toc.1-1.7.2.4.2.5.1"><a href="#section-7.4.5" class="xref">7.4.5</a>. <a href="#name-mapping-sent-cda" class="xref">Mapping-Sent CDA</a><a href="#section-toc.1-1.7.2.4.2.5.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.6">
<p id="section-toc.1-1.7.2.4.2.6.1"><a href="#section-7.4.6" class="xref">7.4.6</a>. <a href="#name-lsb-cda" class="xref">LSB CDA</a><a href="#section-toc.1-1.7.2.4.2.6.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.7">
<p id="section-toc.1-1.7.2.4.2.7.1"><a href="#section-7.4.7" class="xref">7.4.7</a>. <a href="#name-deviid-appiid-cda" class="xref">DevIID, AppIID CDA</a><a href="#section-toc.1-1.7.2.4.2.7.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.7.2.4.2.8">
<p id="section-toc.1-1.7.2.4.2.8.1"><a href="#section-7.4.8" class="xref">7.4.8</a>. <a href="#name-compute-" class="xref">Compute-*</a><a href="#section-toc.1-1.7.2.4.2.8.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
</ul>
</li>
<li class="toc 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-fragmentation-reassembly" class="xref">Fragmentation/Reassembly</a><a href="#section-toc.1-1.8.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc 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-overview" class="xref">Overview</a><a href="#section-toc.1-1.8.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc 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-schc-f-r-protocol-elements" class="xref">SCHC F/R Protocol Elements</a><a href="#section-toc.1-1.8.2.2.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.8.2.2.2.1">
<p id="section-toc.1-1.8.2.2.2.1.1"><a href="#section-8.2.1" class="xref">8.2.1</a>. <a href="#name-messages" class="xref">Messages</a><a href="#section-toc.1-1.8.2.2.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.2.2.2">
<p id="section-toc.1-1.8.2.2.2.2.1"><a href="#section-8.2.2" class="xref">8.2.2</a>. <a href="#name-tiles-windows-bitmaps-timer" class="xref">Tiles, Windows, Bitmaps, Timers, Counters</a><a href="#section-toc.1-1.8.2.2.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.2.2.3">
<p id="section-toc.1-1.8.2.2.2.3.1"><a href="#section-8.2.3" class="xref">8.2.3</a>. <a href="#name-integrity-checking" class="xref">Integrity Checking</a><a href="#section-toc.1-1.8.2.2.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.2.2.4">
<p id="section-toc.1-1.8.2.2.2.4.1"><a href="#section-8.2.4" class="xref">8.2.4</a>. <a href="#name-header-fields" class="xref">Header Fields</a><a href="#section-toc.1-1.8.2.2.2.4.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc 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-schc-f-r-message-formats" class="xref">SCHC F/R Message Formats</a><a href="#section-toc.1-1.8.2.3.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.8.2.3.2.1">
<p id="section-toc.1-1.8.2.3.2.1.1"><a href="#section-8.3.1" class="xref">8.3.1</a>. <a href="#name-schc-fragment-format" class="xref">SCHC Fragment Format</a><a href="#section-toc.1-1.8.2.3.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.3.2.2">
<p id="section-toc.1-1.8.2.3.2.2.1"><a href="#section-8.3.2" class="xref">8.3.2</a>. <a href="#name-schc-ack-format" class="xref">SCHC ACK Format</a><a href="#section-toc.1-1.8.2.3.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.3.2.3">
<p id="section-toc.1-1.8.2.3.2.3.1"><a href="#section-8.3.3" class="xref">8.3.3</a>. <a href="#name-schc-ack-req-format" class="xref">SCHC ACK REQ Format</a><a href="#section-toc.1-1.8.2.3.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.3.2.4">
<p id="section-toc.1-1.8.2.3.2.4.1"><a href="#section-8.3.4" class="xref">8.3.4</a>. <a href="#name-schc-sender-abort-format" class="xref">SCHC Sender-Abort Format</a><a href="#section-toc.1-1.8.2.3.2.4.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.3.2.5">
<p id="section-toc.1-1.8.2.3.2.5.1"><a href="#section-8.3.5" class="xref">8.3.5</a>. <a href="#name-schc-receiver-abort-format" class="xref">SCHC Receiver-Abort Format</a><a href="#section-toc.1-1.8.2.3.2.5.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc 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-schc-f-r-modes" class="xref">SCHC F/R Modes</a><a href="#section-toc.1-1.8.2.4.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.8.2.4.2.1">
<p id="section-toc.1-1.8.2.4.2.1.1"><a href="#section-8.4.1" class="xref">8.4.1</a>. <a href="#name-no-ack-mode" class="xref">No-ACK Mode</a><a href="#section-toc.1-1.8.2.4.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.4.2.2">
<p id="section-toc.1-1.8.2.4.2.2.1"><a href="#section-8.4.2" class="xref">8.4.2</a>. <a href="#name-ack-always-mode" class="xref">ACK-Always Mode</a><a href="#section-toc.1-1.8.2.4.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.8.2.4.2.3">
<p id="section-toc.1-1.8.2.4.2.3.1"><a href="#section-8.4.3" class="xref">8.4.3</a>. <a href="#name-ack-on-error-mode" class="xref">ACK-on-Error Mode</a><a href="#section-toc.1-1.8.2.4.2.3.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
</ul>
</li>
<li class="toc 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-padding-management" class="xref">Padding Management</a><a href="#section-toc.1-1.9.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10">
<p id="section-toc.1-1.10.1"><a href="#section-10" class="xref">10</a>. <a href="#name-schc-compression-for-ipv6-a" class="xref">SCHC Compression for IPv6 and UDP Headers</a><a href="#section-toc.1-1.10.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.10.2.1">
<p id="section-toc.1-1.10.2.1.1"><a href="#section-10.1" class="xref">10.1</a>. <a href="#name-ipv6-version-field" class="xref">IPv6 Version Field</a><a href="#section-toc.1-1.10.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.2">
<p id="section-toc.1-1.10.2.2.1"><a href="#section-10.2" class="xref">10.2</a>. <a href="#name-ipv6-traffic-class-field" class="xref">IPv6 Traffic Class Field</a><a href="#section-toc.1-1.10.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.3">
<p id="section-toc.1-1.10.2.3.1"><a href="#section-10.3" class="xref">10.3</a>. <a href="#name-flow-label-field" class="xref">Flow Label Field</a><a href="#section-toc.1-1.10.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.4">
<p id="section-toc.1-1.10.2.4.1"><a href="#section-10.4" class="xref">10.4</a>. <a href="#name-payload-length-field" class="xref">Payload Length Field</a><a href="#section-toc.1-1.10.2.4.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.5">
<p id="section-toc.1-1.10.2.5.1"><a href="#section-10.5" class="xref">10.5</a>. <a href="#name-next-header-field" class="xref">Next Header Field</a><a href="#section-toc.1-1.10.2.5.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.6">
<p id="section-toc.1-1.10.2.6.1"><a href="#section-10.6" class="xref">10.6</a>. <a href="#name-hop-limit-field" class="xref">Hop Limit Field</a><a href="#section-toc.1-1.10.2.6.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.7">
<p id="section-toc.1-1.10.2.7.1"><a href="#section-10.7" class="xref">10.7</a>. <a href="#name-ipv6-addresses-fields" class="xref">IPv6 Addresses Fields</a><a href="#section-toc.1-1.10.2.7.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.10.2.7.2.1">
<p id="section-toc.1-1.10.2.7.2.1.1"><a href="#section-10.7.1" class="xref">10.7.1</a>. <a href="#name-ipv6-source-and-destination" class="xref">IPv6 Source and Destination Prefixes</a><a href="#section-toc.1-1.10.2.7.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.7.2.2">
<p id="section-toc.1-1.10.2.7.2.2.1"><a href="#section-10.7.2" class="xref">10.7.2</a>. <a href="#name-ipv6-source-and-destination-" class="xref">IPv6 Source and Destination IID</a><a href="#section-toc.1-1.10.2.7.2.2.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.8">
<p id="section-toc.1-1.10.2.8.1"><a href="#section-10.8" class="xref">10.8</a>. <a href="#name-ipv6-extension-headers" class="xref">IPv6 Extension Headers</a><a href="#section-toc.1-1.10.2.8.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.9">
<p id="section-toc.1-1.10.2.9.1"><a href="#section-10.9" class="xref">10.9</a>. <a href="#name-udp-source-and-destination-" class="xref">UDP Source and Destination Ports</a><a href="#section-toc.1-1.10.2.9.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.10">
<p id="section-toc.1-1.10.2.10.1"><a href="#section-10.10" class="xref">10.10</a>. <a href="#name-udp-length-field" class="xref">UDP Length Field</a><a href="#section-toc.1-1.10.2.10.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.10.2.11">
<p id="section-toc.1-1.10.2.11.1"><a href="#section-10.11" class="xref">10.11</a>. <a href="#name-udp-checksum-field" class="xref">UDP Checksum Field</a><a href="#section-toc.1-1.10.2.11.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.11">
<p id="section-toc.1-1.11.1"><a href="#section-11" class="xref">11</a>. <a href="#name-iana-considerations" class="xref">IANA Considerations</a><a href="#section-toc.1-1.11.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12">
<p id="section-toc.1-1.12.1"><a href="#section-12" class="xref">12</a>. <a href="#name-security-considerations" class="xref">Security Considerations</a><a href="#section-toc.1-1.12.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.12.2.1">
<p id="section-toc.1-1.12.2.1.1"><a href="#section-12.1" class="xref">12.1</a>. <a href="#name-security-considerations-for" class="xref">Security Considerations for SCHC Compression/Decompression</a><a href="#section-toc.1-1.12.2.1.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.12.2.1.2.1">
<p id="section-toc.1-1.12.2.1.2.1.1"><a href="#section-12.1.1" class="xref">12.1.1</a>. <a href="#name-forged-schc-packet" class="xref">Forged SCHC Packet</a><a href="#section-toc.1-1.12.2.1.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.1.2.2">
<p id="section-toc.1-1.12.2.1.2.2.1"><a href="#section-12.1.2" class="xref">12.1.2</a>. <a href="#name-compressed-packet-size-as-a" class="xref">Compressed Packet Size as a Side Channel to Guess a Secret Token</a><a href="#section-toc.1-1.12.2.1.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.1.2.3">
<p id="section-toc.1-1.12.2.1.2.3.1"><a href="#section-12.1.3" class="xref">12.1.3</a>. <a href="#name-decompressed-packet-differe" class="xref">Decompressed Packet Different from the Original Packet</a><a href="#section-toc.1-1.12.2.1.2.3.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.2">
<p id="section-toc.1-1.12.2.2.1"><a href="#section-12.2" class="xref">12.2</a>. <a href="#name-security-considerations-for-" class="xref">Security Considerations for SCHC Fragmentation/Reassembly</a><a href="#section-toc.1-1.12.2.2.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.12.2.2.2.1">
<p id="section-toc.1-1.12.2.2.2.1.1"><a href="#section-12.2.1" class="xref">12.2.1</a>. <a href="#name-buffer-reservation-attack" class="xref">Buffer Reservation Attack</a><a href="#section-toc.1-1.12.2.2.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.2.2.2">
<p id="section-toc.1-1.12.2.2.2.2.1"><a href="#section-12.2.2" class="xref">12.2.2</a>. <a href="#name-corrupt-fragment-attack" class="xref">Corrupt Fragment Attack</a><a href="#section-toc.1-1.12.2.2.2.2.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.2.2.3">
<p id="section-toc.1-1.12.2.2.2.3.1"><a href="#section-12.2.3" class="xref">12.2.3</a>. <a href="#name-fragmentation-as-a-way-to-b" class="xref">Fragmentation as a Way to Bypass Network Inspection</a><a href="#section-toc.1-1.12.2.2.2.3.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.12.2.2.2.4">
<p id="section-toc.1-1.12.2.2.2.4.1"><a href="#section-12.2.4" class="xref">12.2.4</a>. <a href="#name-privacy-issues-associated-w" class="xref">Privacy Issues Associated with SCHC Header Fields</a><a href="#section-toc.1-1.12.2.2.2.4.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
</ul>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.13">
<p id="section-toc.1-1.13.1"><a href="#section-13" class="xref">13</a>. <a href="#name-references" class="xref">References</a><a href="#section-toc.1-1.13.1" class="pilcrow">¶</a></p>
<ul class="toc ulEmpty">
<li class="toc ulEmpty" id="section-toc.1-1.13.2.1">
<p id="section-toc.1-1.13.2.1.1"><a href="#section-13.1" class="xref">13.1</a>. <a href="#name-normative-references" class="xref">Normative References</a><a href="#section-toc.1-1.13.2.1.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.13.2.2">
<p id="section-toc.1-1.13.2.2.1"><a href="#section-13.2" class="xref">13.2</a>. <a href="#name-informative-references" class="xref">Informative References</a><a href="#section-toc.1-1.13.2.2.1" class="pilcrow">¶</a></p>
</li>
</ul>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.14">
<p id="section-toc.1-1.14.1"><a href="#section-appendix.a" class="xref">Appendix A</a>. <a href="#name-compression-examples" class="xref">Compression Examples</a><a href="#section-toc.1-1.14.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.15">
<p id="section-toc.1-1.15.1"><a href="#section-appendix.b" class="xref">Appendix B</a>. <a href="#name-fragmentation-examples" class="xref">Fragmentation Examples</a><a href="#section-toc.1-1.15.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.16">
<p id="section-toc.1-1.16.1"><a href="#section-appendix.c" class="xref">Appendix C</a>. <a href="#name-fragmentation-state-machine" class="xref">Fragmentation State Machines</a><a href="#section-toc.1-1.16.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.17">
<p id="section-toc.1-1.17.1"><a href="#section-appendix.d" class="xref">Appendix D</a>. <a href="#name-schc-parameters" class="xref">SCHC Parameters</a><a href="#section-toc.1-1.17.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.18">
<p id="section-toc.1-1.18.1"><a href="#section-appendix.e" class="xref">Appendix E</a>. <a href="#name-supporting-multiple-window-" class="xref">Supporting Multiple Window Sizes for Fragmentation</a><a href="#section-toc.1-1.18.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.19">
<p id="section-toc.1-1.19.1"><a href="#section-appendix.f" class="xref">Appendix F</a>. <a href="#name-ack-always-and-ack-on-error" class="xref">ACK-Always and ACK-on-Error on Quasi-Bidirectional Links</a><a href="#section-toc.1-1.19.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.20">
<p id="section-toc.1-1.20.1"><a href="#section-appendix.g" class="xref"></a><a href="#name-acknowledgements" class="xref">Acknowledgements</a><a href="#section-toc.1-1.20.1" class="pilcrow">¶</a></p>
</li>
<li class="toc ulEmpty" id="section-toc.1-1.21">
<p id="section-toc.1-1.21.1"><a href="#section-appendix.h" class="xref"></a><a href="#name-authors-addresses" class="xref">Authors' Addresses</a><a href="#section-toc.1-1.21.1" class="pilcrow">¶</a></p>
</li>
</ul>
</nav>
</section>
</div>
<div id="Introduction">
<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 defines the Static Context Header Compression and fragmentation (SCHC) framework, which provides both a header compression mechanism and an optional fragmentation mechanism. SCHC has been designed with Low-Power Wide Area Networks (LPWANs) in mind.<a href="#section-1-1" class="pilcrow">¶</a></p>
<p id="section-1-2">LPWAN technologies impose some strict limitations on traffic. For instance, devices sleep most of the time and may only receive data during short periods of time after transmission, in order to preserve battery.
LPWAN technologies are also characterized by a greatly reduced data unit and/or payload size (see <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>).<a href="#section-1-2" class="pilcrow">¶</a></p>
<p id="section-1-3">Header compression is needed for efficient Internet connectivity to a node within an LPWAN. The following properties of LPWANs can be exploited to get an efficient header compression:<a href="#section-1-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-1-4.1">The network topology is star-oriented, which means that all packets between the same source-destination pair follow the same path. For the needs of this document, the architecture can simply be described as Devices (Dev) exchanging information with LPWAN Application Servers (Apps) through a Network Gateway (NGW).<a href="#section-1-4.1" class="pilcrow">¶</a>
</li>
<li id="section-1-4.2">Because devices embed built-in applications, the traffic flows to be compressed are known in advance. Indeed, new applications are less frequently installed in an LPWAN device than they are in a general-purpose computer or smartphone.<a href="#section-1-4.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-1-5">SCHC compression uses a Context (a set of Rules) in which information about header fields is stored. This Context is static: the values of the header fields and the actions to do compression/decompression do not change over time. This avoids the need for complex resynchronization mechanisms.
Indeed, a return path may be more restricted/expensive, or may
sometimes be completely unavailable <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>.
A compression protocol that relies on feedback is not compatible with the characteristics of such LPWANs.<a href="#section-1-5" class="pilcrow">¶</a></p>
<p id="section-1-6">In most cases, a small Rule identifier is enough to represent the full IPv6/UDP headers. The SCHC header compression mechanism is independent of the specific LPWAN technology over which it is used.<a href="#section-1-6" class="pilcrow">¶</a></p>
<p id="section-1-7">Furthermore, some LPWAN technologies do not provide a fragmentation functionality; to support the IPv6 MTU requirement of 1280 bytes <span>[<a href="#RFC8200" class="xref">RFC8200</a>]</span>, they require a fragmentation protocol at the adaptation layer below IPv6.
Accordingly, this document defines an optional fragmentation/reassembly mechanism to help LPWAN technologies support the IPv6 MTU requirement.<a href="#section-1-7" class="pilcrow">¶</a></p>
<p id="section-1-8">This document defines generic functionality and offers flexibility with regard to parameter settings
and mechanism choices. Technology-specific settings are expected to be grouped into Profiles specified in other documents.<a href="#section-1-8" class="pilcrow">¶</a></p>
</section>
</div>
<div id="requirements-notation">
<section id="section-2">
<h2 id="name-requirements-notation">
<a href="#section-2" class="section-number selfRef">2. </a><a href="#name-requirements-notation" class="section-name selfRef">Requirements Notation</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>
</section>
</div>
<div id="LPWAN-Archi">
<section id="section-3">
<h2 id="name-lpwan-architecture">
<a href="#section-3" class="section-number selfRef">3. </a><a href="#name-lpwan-architecture" class="section-name selfRef">LPWAN Architecture</a>
</h2>
<p id="section-3-1">LPWAN architectures are similar among them, but each LPWAN technology names architecture elements differently.
In this document, we use terminology from <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>,
which identifies the following entities in a typical LPWAN
(see <a href="#Fig-LPWANarchi" class="xref">Figure 1</a>):<a href="#section-3-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-3-2.1">Devices (Dev) are the end-devices or hosts (e.g., sensors, actuators, etc.). There can be a very high density of devices per Radio Gateway.<a href="#section-3-2.1" class="pilcrow">¶</a>
</li>
<li id="section-3-2.2">The Radio Gateway (RGW) is the endpoint of the constrained link.<a href="#section-3-2.2" class="pilcrow">¶</a>
</li>
<li id="section-3-2.3">The Network Gateway (NGW) is the interconnection node between the Radio Gateway and the Internet.<a href="#section-3-2.3" class="pilcrow">¶</a>
</li>
<li id="section-3-2.4">The Application Server (App) is the endpoint of the application-level protocol on the Internet side.<a href="#section-3-2.4" class="pilcrow">¶</a>
</li>
</ul>
<span id="name-lpwan-architecture-simplifi"></span><div id="Fig-LPWANarchi">
<figure id="figure-1">
<div class="artwork art-text alignLeft" id="section-3-3.1">
<pre>
() () () |
() () () () / \ +---------+
() () () () () () / \======| ^ | +-----------+
() () () | | <--|--> | |Application|
() () () () / \==========| v |=============| Server |
() () () / \ +---------+ +-----------+
Dev RGWs NGW App</pre>
</div>
<figcaption><a href="#figure-1" class="selfRef">Figure 1</a>:
<a href="#name-lpwan-architecture-simplifi" class="selfRef">LPWAN Architecture (Simplified from That Shown in RFC 8376)</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="Term">
<section id="section-4">
<h2 id="name-terminology">
<a href="#section-4" class="section-number selfRef">4. </a><a href="#name-terminology" class="section-name selfRef">Terminology</a>
</h2>
<p id="section-4-1">This section defines terminology and abbreviations used in this document.
It extends the terminology of <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>.<a href="#section-4-1" class="pilcrow">¶</a></p>
<p id="section-4-2">The SCHC acronym is pronounced like "sheek" in English (or "chic" in French). Therefore, this document writes "a SCHC Packet" instead of "an SCHC Packet".<a href="#section-4-2" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-4-3">
<dt id="section-4-3.1">App:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.2">LPWAN Application Server, as defined by <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>. It runs an application sending/receiving packets to/from the Dev.<a href="#section-4-3.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.3">AppIID:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.4">Application Interface Identifier. The IID that
identifies the App interface.<a href="#section-4-3.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.5">Compression Residue:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.6">The bits that remain to be sent (beyond the RuleID itself) after applying the SCHC compression.<a href="#section-4-3.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.7">Context:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.8">A set of Rules used to compress/decompress headers, or to fragment/reassemble a packet.<a href="#section-4-3.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.9">Dev:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.10">Device, as defined by <span>[<a href="#RFC8376" class="xref">RFC8376</a>]</span>.<a href="#section-4-3.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.11">DevIID:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.12">Device Interface Identifier. The IID that identifies the Dev interface.<a href="#section-4-3.12" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.13">Downlink:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.14">From the App to the Dev.<a href="#section-4-3.14" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.15">IID:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.16">Interface Identifier. See the IPv6 addressing architecture <span>[<a href="#RFC7136" class="xref">RFC7136</a>]</span>.<a href="#section-4-3.16" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.17">L2:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.18">Layer 2. The immediate lower layer that SCHC interfaces with, for example an underlying LPWAN technology. It does not necessarily correspond to the OSI model definition of Layer 2.<a href="#section-4-3.18" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.19">L2 Word:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.20">This is the minimum subdivision of payload data that the L2 will carry. In most L2 technologies, the L2 Word is an octet.
In bit-oriented radio technologies, the L2 Word might be a single bit.
The L2 Word size is assumed to be constant over time for each device.<a href="#section-4-3.20" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.21">Padding:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.22">Extra bits that may be appended by SCHC to a data unit that it passes down to L2 for transmission.
SCHC itself operates on bits, not bytes, and does not have any alignment prerequisite. See <a href="#Padding" class="xref">Section 9</a>.<a href="#section-4-3.22" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.23">Profile:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.24">SCHC offers variations in the way it is operated, with a number of parameters listed in <a href="#SCHCParams" class="xref">Appendix D</a>.
A Profile indicates a particular setting of all these parameters.
Both ends of a SCHC communication must be provisioned with the same Profile information and with the same set of Rules before the communication starts,
so that there is no ambiguity in how they expect to communicate.<a href="#section-4-3.24" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.25">Rule:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.26">Part of the Context that describes how a packet is compressed/decompressed or fragmented/reassembled.<a href="#section-4-3.26" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.27">RuleID:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.28">Rule Identifier. An identifier for a Rule.<a href="#section-4-3.28" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.29">SCHC:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.30">Static Context Header Compression and fragmentation (SCHC), a generic framework.<a href="#section-4-3.30" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.31">SCHC C/D:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.32">SCHC Compressor/Decompressor, or SCHC Compression/Decompression. The SCHC entity or mechanism used on both sides, at the Dev and at the network, to achieve compression/decompression of headers.<a href="#section-4-3.32" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.33">SCHC F/R:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.34">SCHC Fragmenter/Reassembler or SCHC Fragmentation/Reassembly. The SCHC entity or mechanism used on both sides, at the Dev and at the network, to achieve fragmentation/reassembly of SCHC Packets.<a href="#section-4-3.34" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.35">SCHC Packet:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.36">A packet (e.g., an IPv6 packet) whose header has been compressed as per the header compression mechanism defined in this document. If the header compression process is unable to actually compress the packet header, the packet with the uncompressed header is still called a SCHC Packet (in this case, a RuleID is used to indicate that the packet header has not been compressed). See <a href="#SCHComp" class="xref">Section 7</a> for more details.<a href="#section-4-3.36" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-4-3.37">Uplink:</dt>
<dd style="margin-left: 4.5em" id="section-4-3.38">From the Dev to the App.<a href="#section-4-3.38" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-4-4">Additional terminology for the optional SCHC F/R is found in <a href="#FragTools" class="xref">Section 8.2</a>.<a href="#section-4-4" class="pilcrow">¶</a></p>
<p id="section-4-5">Additional terminology for SCHC C/D is found in <a href="#schc-cd-rules" class="xref">Section 7.1</a>.<a href="#section-4-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="Overview">
<section id="section-5">
<h2 id="name-schc-overview">
<a href="#section-5" class="section-number selfRef">5. </a><a href="#name-schc-overview" class="section-name selfRef">SCHC Overview</a>
</h2>
<p id="section-5-1">SCHC can be characterized as an adaptation layer between an upper layer (for example, IPv6) and an underlying layer (for example, an LPWAN technology).
SCHC comprises two sublayers (i.e., the Compression sublayer and the Fragmentation sublayer), as shown in <a href="#Fig-IntroLayers" class="xref">Figure 2</a>.<a href="#section-5-1" class="pilcrow">¶</a></p>
<span id="name-example-of-protocol-stack-c"></span><div id="Fig-IntroLayers">
<figure id="figure-2">
<div class="artwork art-text alignLeft" id="section-5-2.1">
<pre>
+----------------+
| IPv6 |
+- +----------------+
| | Compression |
SCHC < +----------------+
| | Fragmentation |
+- +----------------+
|LPWAN technology|
+----------------+</pre>
</div>
<figcaption><a href="#figure-2" class="selfRef">Figure 2</a>:
<a href="#name-example-of-protocol-stack-c" class="selfRef">Example of Protocol Stack Comprising IPv6, SCHC, and an LPWAN Technology</a>
</figcaption></figure>
</div>
<p id="section-5-3">Before an upper layer packet (e.g., an IPv6 packet) is transmitted to the underlying layer, header compression is first attempted. The resulting packet is called a "SCHC Packet", whether or not any compression is performed.
If needed by the underlying layer, the optional SCHC fragmentation <span class="bcp14">MAY</span> be applied to the SCHC Packet.
The inverse operations take place at the receiver. This process is illustrated in <a href="#Fig-Operations" class="xref">Figure 3</a>.<a href="#section-5-3" class="pilcrow">¶</a></p>
<span id="name-schc-operations-at-the-send"></span><div id="Fig-Operations">
<figure id="figure-3">
<div class="artwork art-text alignLeft" id="section-5-4.1">
<pre>
A packet (e.g., an IPv6 packet)
| ^
v |
+------------------+ +--------------------+
| SCHC Compression | | SCHC Decompression |
+------------------+ +--------------------+
| ^
| If no fragmentation (*) |
+-------------- SCHC Packet -------------->|
| |
v |
+--------------------+ +-----------------+
| SCHC Fragmentation | | SCHC Reassembly |
+--------------------+ +-----------------+
| ^ | ^
| | | |
| +---------- SCHC ACK (+) -------------+ |
| |
+-------------- SCHC Fragments -------------------+
Sender Receiver
*: the decision not to use SCHC fragmentation is left to each Profile
+: optional, depends on Fragmentation mode</pre>
</div>
<figcaption><a href="#figure-3" class="selfRef">Figure 3</a>:
<a href="#name-schc-operations-at-the-send" class="selfRef">SCHC Operations at the Sender and the Receiver</a>
</figcaption></figure>
</div>
<div id="schc-packet-format">
<section id="section-5.1">
<h3 id="name-schc-packet-format">
<a href="#section-5.1" class="section-number selfRef">5.1. </a><a href="#name-schc-packet-format" class="section-name selfRef">SCHC Packet Format</a>
</h3>
<p id="section-5.1-1">The SCHC Packet is composed of the Compressed Header followed by the payload from the original packet (see <a href="#Fig-SCHCpckt" class="xref">Figure 4</a>).
The Compressed Header itself is composed of the RuleID and a Compression Residue, which is the output of compressing the packet header with the Rule identified by that RuleID (see <a href="#SCHComp" class="xref">Section 7</a>).
The Compression Residue may be empty. Both the RuleID and the Compression Residue potentially have a variable size, and are not necessarily a multiple of bytes in size.<a href="#section-5.1-1" class="pilcrow">¶</a></p>
<span id="name-schc-packet"></span><div id="Fig-SCHCpckt">
<figure id="figure-4">
<div class="artwork art-text alignLeft" id="section-5.1-2.1">
<pre>
|------- Compressed Header -------|
+---------------------------------+--------------------+
| RuleID | Compression Residue | Payload |
+---------------------------------+--------------------+</pre>
</div>
<figcaption><a href="#figure-4" class="selfRef">Figure 4</a>:
<a href="#name-schc-packet" class="selfRef">SCHC Packet</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="FunctionalMapping">
<section id="section-5.2">
<h3 id="name-functional-mapping">
<a href="#section-5.2" class="section-number selfRef">5.2. </a><a href="#name-functional-mapping" class="section-name selfRef">Functional Mapping</a>
</h3>
<p id="section-5.2-1"><a href="#Fig-archi" class="xref">Figure 5</a> maps the
functional elements of <a href="#Fig-Operations" class="xref">Figure 3</a> onto the LPWAN architecture elements of
<a href="#Fig-LPWANarchi" class="xref">Figure 1</a>.<a href="#section-5.2-1" class="pilcrow">¶</a></p>
<span id="name-architectural-mapping"></span><div id="Fig-archi">
<figure id="figure-5">
<div class="artwork art-text alignLeft" id="section-5.2-2.1">
<pre>
Dev App
+----------------+ +----+ +----+ +----+
| App1 App2 App3 | |App1| |App2| |App3|
| | | | | | | |
| UDP | |UDP | |UDP | |UDP |
| IPv6 | |IPv6| |IPv6| |IPv6|
| | | | | | | |
|SCHC C/D and F/R| | | | | | |
+--------+-------+ +----+ +----+ +----+
| +---+ +---+ +----+ +----+ . . .
+~ |RGW| === |NGW| == |SCHC| == |SCHC|..... Internet ....
+---+ +---+ |F/R | |C/D |
+----+ +----+</pre>
</div>
<figcaption><a href="#figure-5" class="selfRef">Figure 5</a>:
<a href="#name-architectural-mapping" class="selfRef">Architectural Mapping</a>
</figcaption></figure>
</div>
<p id="section-5.2-3">SCHC C/D and SCHC F/R are located on both sides of the LPWAN transmission, hereafter called the "Dev side" and the "Network Infrastructure side".<a href="#section-5.2-3" class="pilcrow">¶</a></p>
<p id="section-5.2-4">The operation in the Uplink direction is as follows. The Device application uses IPv6 or IPv6/UDP protocols. Before sending the packets, the Dev compresses their headers using SCHC C/D;
if the SCHC Packet resulting from the compression needs to be fragmented by SCHC, SCHC F/R is performed (see <a href="#Frag" class="xref">Section 8</a>).
The resulting SCHC Fragments are sent to an LPWAN Radio Gateway (RGW), which forwards them to a Network Gateway (NGW).
The NGW sends the data to a SCHC F/R for reassembly (if needed) and then to the SCHC C/D for decompression.
After decompression, the packet can be sent over the Internet
to one or several Apps.<a href="#section-5.2-4" class="pilcrow">¶</a></p>
<p id="section-5.2-5">The SCHC F/R and SCHC C/D on the Network Infrastructure side can
be part of the NGW or located in the Internet as long as a
tunnel is established between them and the NGW.
For some LPWAN technologies, it may be suitable to locate the SCHC F/R
functionality nearer the NGW, in order to better deal with time constraints of such technologies.<a href="#section-5.2-5" class="pilcrow">¶</a></p>
<p id="section-5.2-6">The SCHC C/Ds on both sides <span class="bcp14">MUST</span> share the same set of Rules.
So <span class="bcp14">MUST</span> the SCHC F/Rs on both sides.<a href="#section-5.2-6" class="pilcrow">¶</a></p>
<p id="section-5.2-7">The operation in the Downlink direction is similar to that in the Uplink direction, only reversing the order in which the architecture elements are traversed.<a href="#section-5.2-7" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="RuleID">
<section id="section-6">
<h2 id="name-ruleid">
<a href="#section-6" class="section-number selfRef">6. </a><a href="#name-ruleid" class="section-name selfRef">RuleID</a>
</h2>
<p id="section-6-1">RuleIDs identify the Rules used for compression/decompression or
for fragmentation/reassembly.<a href="#section-6-1" class="pilcrow">¶</a></p>
<p id="section-6-2">The scope of the RuleID of a compression/decompression Rule is the link between the SCHC C/D in a given Dev and the corresponding SCHC C/D in the Network Infrastructure side.
The scope of the RuleID of a fragmentation/reassembly Rule is the link between the SCHC F/R in a given Dev and the corresponding SCHC F/R in the Network Infrastructure side.
If such a link is bidirectional, the scope includes both directions.<a href="#section-6-2" class="pilcrow">¶</a></p>
<p id="section-6-3">The RuleIDs are therefore specific to the Context related to one Dev. Hence, multiple Dev instances, which refer to different Contexts, <span class="bcp14">MAY</span> reuse the same RuleID for different Rules.
On the Network Infrastructure side, in order to identify the correct Rule to be applied to Uplink traffic, the SCHC C/D or SCHC F/R needs to associate the RuleID with the Dev identifier.
Similarly, for Downlink traffic, the SCHC C/D or SCHC F/R on the Network Infrastructure side first needs to identify the destination Dev before looking for the appropriate Rule (and associated RuleID) in the Context of that Dev.<a href="#section-6-3" class="pilcrow">¶</a></p>
<p id="section-6-4">Inside their scopes, Rules for compression/decompression and Rules for fragmentation/reassembly share the same RuleID space.<a href="#section-6-4" class="pilcrow">¶</a></p>
<p id="section-6-5">The size of the RuleIDs is not specified in this document,
as it is implementation-specific and can vary according to the
LPWAN technology and the number of Rules, among other things. It is defined in Profiles.<a href="#section-6-5" class="pilcrow">¶</a></p>
<p id="section-6-6">The RuleIDs are used:<a href="#section-6-6" class="pilcrow">¶</a></p>
<ul>
<li id="section-6-7.1">
<p id="section-6-7.1.1">For SCHC C/D, to identify the Rule that is used to compress a packet header.<a href="#section-6-7.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-6-7.1.2.1">At least one RuleID <span class="bcp14">MUST</span> be allocated to tagging packets for which SCHC compression was not possible (i.e., no matching compression Rule was found).<a href="#section-6-7.1.2.1" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-6-7.2">
<p id="section-6-7.2.1">In SCHC F/R, to identify the specific mode and settings of fragmentation/reassembly for one direction of data traffic (Uplink or Downlink).<a href="#section-6-7.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-6-7.2.2.1">When SCHC F/R is used for both communication directions, at least two RuleID values are needed for fragmentation/reassembly: one per direction of data traffic.
This is because fragmentation/reassembly may entail control messages flowing in the reverse direction compared to data traffic.<a href="#section-6-7.2.2.1" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</section>
</div>
<div id="SCHComp">
<section id="section-7">
<h2 id="name-compression-decompression">
<a href="#section-7" class="section-number selfRef">7. </a><a href="#name-compression-decompression" class="section-name selfRef">Compression/Decompression</a>
</h2>
<p id="section-7-1">Compression with SCHC
is based on using a set of Rules, which constitutes the Context of SCHC C/D, to compress or
decompress headers. SCHC avoids Context synchronization traffic,
which consumes considerable bandwidth in other header
compression mechanisms such as RObust Header Compression (RoHC)
<span>[<a href="#RFC5795" class="xref">RFC5795</a>]</span>. Since the content of
packets is highly predictable in LPWANs, static Contexts
can be stored beforehand. The Contexts <span class="bcp14">MUST</span> be
stored at both ends, and they can be learned by a provisioning
protocol, by out-of-band means, or by pre-provisioning. The way the Contexts are provisioned is out of the scope of this document.<a href="#section-7-1" class="pilcrow">¶</a></p>
<div id="schc-cd-rules">
<section id="section-7.1">
<h3 id="name-schc-c-d-rules">
<a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-schc-c-d-rules" class="section-name selfRef">SCHC C/D Rules</a>
</h3>
<p id="section-7.1-1">The main idea of the SCHC compression scheme is to transmit the RuleID to the other end instead of sending known field values. This RuleID identifies a Rule that matches the original packet values. Hence, when a value is known by both ends, it is only necessary to send the corresponding RuleID over the LPWAN.
The manner by which Rules are generated is out of the scope of this document. The Rules <span class="bcp14">MAY</span> be changed at run-time, but the mechanism is out of scope of this document.<a href="#section-7.1-1" class="pilcrow">¶</a></p>
<p id="section-7.1-2">The SCHC C/D Context is a set of Rules.
See <a href="#Fig-ctxt" class="xref">Figure 6</a> for a high-level, abstract representation of the Context.
The formal specification of the representation of the Rules is outside the scope of this document.<a href="#section-7.1-2" class="pilcrow">¶</a></p>
<p id="section-7.1-3">Each Rule itself contains a list of Field Descriptors composed of a Field Identifier (FID), a Field Length (FL), a Field Position (FP), a Direction Indicator (DI), a Target Value (TV), a Matching Operator (MO), and a Compression/Decompression Action (CDA).<a href="#section-7.1-3" class="pilcrow">¶</a></p>
<span id="name-a-schc-c-d-context"></span><div id="Fig-ctxt">
<figure id="figure-6">
<div class="artwork art-text alignLeft" id="section-7.1-4.1">
<pre>
/-----------------------------------------------------------------\
| Rule N |
/-----------------------------------------------------------------\|
| Rule i ||
/-----------------------------------------------------------------\||
| (FID) Rule 1 |||
|+-------+--+--+--+------------+-----------------+---------------+|||
||Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||
|+-------+--+--+--+------------+-----------------+---------------+|||
||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||
|+-------+--+--+--+------------+-----------------+---------------+|||
||... |..|..|..| ... | ... | ... ||||
|+-------+--+--+--+------------+-----------------+---------------+||/
||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||
|+-------+--+--+--+------------+-----------------+---------------+|/
| |
\-----------------------------------------------------------------/</pre>
</div>
<figcaption><a href="#figure-6" class="selfRef">Figure 6</a>:
<a href="#name-a-schc-c-d-context" class="selfRef">A SCHC C/D Context</a>
</figcaption></figure>
</div>
<p id="section-7.1-5">A Rule does not describe how the compressor parses a packet header to find and identify each field (e.g., the IPv6 Source Address, the UDP Destination Port, or a CoAP URI path option).
It is assumed that there is a protocol parser alongside SCHC that is able to identify
all the fields encountered in the headers to be compressed,
and to label them with a Field ID.
Rules only describe the compression/decompression behavior for each header field, after it has been identified.<a href="#section-7.1-5" class="pilcrow">¶</a></p>
<p id="section-7.1-6">In a Rule, the Field Descriptors are listed in the order in which the fields appear in the packet header.
The Field Descriptors describe the header fields with the following entries:<a href="#section-7.1-6" class="pilcrow">¶</a></p>
<ul>
<li id="section-7.1-7.1">Field Identifier (FID) designates a protocol and field (e.g., UDP Destination Port), unambiguously among all protocols that a SCHC compressor processes. In the presence of protocol nesting, the Field ID also identifies the nesting.<a href="#section-7.1-7.1" class="pilcrow">¶</a>
</li>
<li id="section-7.1-7.2">Field Length (FL) represents the length of the original field. It can be either a fixed value (in bits) if the length is known when the Rule is created or a type if the length is variable. The length of a header field is defined by its own protocol specification (e.g., IPv6 or UDP). If the length is variable, the type defines the process to compute the length and its unit (bits, bytes...).<a href="#section-7.1-7.2" class="pilcrow">¶</a>
</li>
<li id="section-7.1-7.3">Field Position (FP): most often, a field only occurs once in a packet header.
However, some fields may occur multiple times. An example is the uri-path of CoAP.
FP indicates which occurrence this Field Descriptor applies to.
The default value is 1.
The value 1 designates the first occurrence.
The value 0 is special. It means "don't care", see <a href="#PProcessing" class="xref">Section 7.2</a>.<a href="#section-7.1-7.3" class="pilcrow">¶</a>
</li>
<li id="section-7.1-7.4">
<p id="section-7.1-7.4.1">A Direction Indicator (DI) indicates the packet direction(s) this Field Descriptor applies to. It allows for asymmetric processing, using the same Rule. Three values are possible:<a href="#section-7.1-7.4.1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-7.1-7.4.2">
<dt id="section-7.1-7.4.2.1">Up:</dt>
<dd id="section-7.1-7.4.2.2">this Field Descriptor is only applicable to packets traveling Uplink.<a href="#section-7.1-7.4.2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.1-7.4.2.3">Dw:</dt>
<dd id="section-7.1-7.4.2.4">this Field Descriptor is only applicable to packets traveling Downlink.<a href="#section-7.1-7.4.2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.1-7.4.2.5">Bi:</dt>
<dd id="section-7.1-7.4.2.6">this Field Descriptor is applicable to packets traveling Uplink or Downlink.<a href="#section-7.1-7.4.2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</li>
<li id="section-7.1-7.5">Target Value (TV) is the value used to match against the packet header field. The Target Value can be a scalar value of any type (integer, strings, etc.) or a more complex structure (array, list, etc.). The types and representations are out of scope for this document.<a href="#section-7.1-7.5" class="pilcrow">¶</a>
</li>
<li id="section-7.1-7.6">Matching Operator (MO) is the operator used to match the field value and the Target Value. The Matching Operator may require some parameters. The set of MOs defined in this document can be found in <a href="#chap-MO" class="xref">Section 7.3</a>.<a href="#section-7.1-7.6" class="pilcrow">¶</a>
</li>
<li id="section-7.1-7.7">Compression/Decompression Action (CDA) describes the pair of actions that are performed at the compressor to compress a header field and at the decompressor to recover the original value of the header field. Some CDAs might use parameter values for their operation. The set of CDAs defined in this document can be found in <a href="#chap-CDA" class="xref">Section 7.4</a>.<a href="#section-7.1-7.7" class="pilcrow">¶</a>
</li>
</ul>
</section>
</div>
<div id="PProcessing">
<section id="section-7.2">
<h3 id="name-packet-processing">
<a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-packet-processing" class="section-name selfRef">Packet Processing</a>
</h3>
<p id="section-7.2-1">The compression/decompression process follows several phases:<a href="#section-7.2-1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-7.2-2">
<dt id="section-7.2-2.1">Compression Rule selection:</dt>
<dd id="section-7.2-2.2">
<p id="section-7.2-2.2.1">the general idea is to browse the Rule set to find a Rule that has a matching
Field Descriptor (given the DI and FP) for all and only those header fields that appear in the packet being compressed.
The detailed algorithm is the following:<a href="#section-7.2-2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-7.2-2.2.2.1">The first step is to check the FIDs.
If any header field of the packet being examined cannot be matched with a Field Descriptor with the correct FID, the Rule <span class="bcp14">MUST</span> be disregarded.
If any Field Descriptor in the Rule has a FID that cannot be matched to one of the header fields of the packet being examined, the Rule <span class="bcp14">MUST</span> be disregarded.<a href="#section-7.2-2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-7.2-2.2.2.2">The next step is to match the Field Descriptors by their direction, using the DI. If any field of the packet header cannot be matched with a Field Descriptor with the correct FID and DI, the Rule <span class="bcp14">MUST</span> be disregarded.<a href="#section-7.2-2.2.2.2" class="pilcrow">¶</a>
</li>
<li id="section-7.2-2.2.2.3">
<p id="section-7.2-2.2.2.3.1">Then, the Field Descriptors are further selected according to FP. If any field of the packet header cannot be matched with a Field Descriptor with the correct FID, DI and FP, the Rule <span class="bcp14">MUST</span> be disregarded.<a href="#section-7.2-2.2.2.3.1" class="pilcrow">¶</a></p>
<p id="section-7.2-2.2.2.3.2">
The value 0 for FP means "don't care", i.e., the comparison of this Field Descriptor's FP with
the position of the field of the packet header being compressed
returns True, whatever that position. FP=0 can be useful to build compression Rules for protocol headers in which
some fields order is irrelevant. An example could be uri-queries in CoAP.
Care needs to be exercised when writing Rules containing FP=0 values.
Indeed, it may result in decompressed packets having fields ordered differently compared to the original packet.<a href="#section-7.2-2.2.2.3.2" class="pilcrow">¶</a></p>
</li>
<li id="section-7.2-2.2.2.4">
<p id="section-7.2-2.2.2.4.1">Once each header field has been associated with a Field Descriptor with matching FID, DI, and FP, each packet field's value is then compared to the corresponding TV stored in the Rule for that specific field, using the MO.
If every field in the packet header satisfies the corresponding MOs of a Rule (i.e., all MO results are True), that Rule is valid for use to compress the header.
Otherwise, the Rule <span class="bcp14">MUST</span> be disregarded.<a href="#section-7.2-2.2.2.4.1" class="pilcrow">¶</a></p>
<p id="section-7.2-2.2.2.4.2">
This specification does not prevent multiple Rules from matching the above steps and, therefore, being valid for use.
Which Rule to use among multiple valid Rules is left to the implementation.
As long as the same Rule set is installed at both ends, this degree of freedom does not constitute an interoperability issue.<a href="#section-7.2-2.2.2.4.2" class="pilcrow">¶</a></p>
</li>
<li id="section-7.2-2.2.2.5">If no valid compression Rule is found, then the packet <span class="bcp14">MUST</span> be sent uncompressed
using the RuleID dedicated to this purpose (see <a href="#RuleID" class="xref">Section 6</a>).
The entire packet header is the Compression Residue (see <a href="#Fig-SCHCpckt" class="xref">Figure 4</a>).
Sending an uncompressed header is likely to require SCHC F/R.<a href="#section-7.2-2.2.2.5" class="pilcrow">¶</a>
</li>
</ul>
</dd>
<dd class="break"></dd>
<dt id="section-7.2-2.3">Compression:</dt>
<dd id="section-7.2-2.4">if a valid Rule is found, each field of the header is compressed according to the CDAs of the Rule.
The fields are compressed in the order that the Field Descriptors appear in the Rule.
The compression of each field results in a residue, which may be empty.
The Compression Residue for the packet header is the concatenation of the non-empty residues for each field of the header, in the order the Field Descriptors appear in the Rule.
The order in which the Field Descriptors appear in the Rule is therefore semantically important.<a href="#section-7.2-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<span id="name-compression-residue-structu"></span><div id="Fig-CompRes">
<figure id="figure-7">
<div class="artwork art-text alignLeft" id="section-7.2-3.1">
<pre>
|------------------- Compression Residue -------------------|
+-----------------+-----------------+-----+-----------------+
| field 1 residue | field 2 residue | ... | field N residue |
+-----------------+-----------------+-----+-----------------+</pre>
</div>
<figcaption><a href="#figure-7" class="selfRef">Figure 7</a>:
<a href="#name-compression-residue-structu" class="selfRef">Compression Residue Structure</a>
</figcaption></figure>
</div>
<dl class="dlParallel" id="section-7.2-4">
<dt id="section-7.2-4.1">Sending:</dt>
<dd id="section-7.2-4.2">The RuleID is sent to the other end jointly with the Compression Residue (which could be empty) or the uncompressed header, and directly followed by the payload (see <a href="#Fig-SCHCpckt" class="xref">Figure 4</a>).
The way the RuleID is sent will be specified in the Profile and is out of the scope of the present document.
For example, it could be included in an L2 header or sent as part of the L2 payload.<a href="#section-7.2-4.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.2-4.3">Decompression:</dt>
<dd id="section-7.2-4.4">
<p id="section-7.2-4.4.1">when decompressing, on the Network Infrastructure side, the SCHC C/D needs to find the correct Rule based on the L2 address of the Dev. On the Dev side, only the RuleID is needed to identify the correct Rule since the Dev typically only holds Rules that apply to itself.<a href="#section-7.2-4.4.1" class="pilcrow">¶</a></p>
<p id="section-7.2-4.4.2">
This Rule describes the compressed header format. From this, the decompressor determines the order of the residues, the fixed-size or variable-size nature of each residue (see <a href="#var-length-field" class="xref">Section 7.4.2</a>),
and the size of the fixed-size residues.<a href="#section-7.2-4.4.2" class="pilcrow">¶</a></p>
<p id="section-7.2-4.4.3">
Therefore, from the received compressed header, it can retrieve all the residue values and associate them to the corresponding header fields.<a href="#section-7.2-4.4.3" class="pilcrow">¶</a></p>
<p id="section-7.2-4.4.4">
For each field in the header, the receiver applies the CDA action associated with that field in order to reconstruct the original header field value. The CDA application order can be different from the order in which the fields are listed in the Rule. In particular, Compute-* <span class="bcp14">MUST</span> be applied after the application of the CDAs of all the fields it computes on.<a href="#section-7.2-4.4.4" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
<div id="chap-MO">
<section id="section-7.3">
<h3 id="name-matching-operators">
<a href="#section-7.3" class="section-number selfRef">7.3. </a><a href="#name-matching-operators" class="section-name selfRef">Matching Operators</a>
</h3>
<p id="section-7.3-1">MOs are functions used at the compression side of SCHC C/D. They are not typed and can be applied to integer, string or any other data type. The result of the operation can either be True or False. The following MOs are defined:<a href="#section-7.3-1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-7.3-2">
<dt id="section-7.3-2.1">equal:</dt>
<dd id="section-7.3-2.2">The match result is True if the field value in the packet matches the TV.<a href="#section-7.3-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.3-2.3">ignore:</dt>
<dd id="section-7.3-2.4">No matching is attempted between the
field value in the packet and the TV in the Rule. The result
is always True.<a href="#section-7.3-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.3-2.5">MSB(x):</dt>
<dd id="section-7.3-2.6">A match is obtained if the most significant (leftmost) x bits of the packet header field value are equal to the TV in the Rule. The x parameter of the MSB MO indicates how many bits are involved in the comparison. If the FL is described as variable, the x parameter must be a multiple of the FL unit. For example, x must be multiple of 8 if the unit of the variable length is bytes.<a href="#section-7.3-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-7.3-2.7">match-mapping:</dt>
<dd id="section-7.3-2.8">With match-mapping, TV is a list of values. Each value of the list is identified by an index. Compression is achieved by sending the index instead of the original header field value. This operator matches if the header field value is equal to one of the values in the target list.<a href="#section-7.3-2.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
<div id="chap-CDA">
<section id="section-7.4">
<h3 id="name-compression-decompression-a">
<a href="#section-7.4" class="section-number selfRef">7.4. </a><a href="#name-compression-decompression-a" class="section-name selfRef">Compression/Decompression Actions (CDA)</a>
</h3>
<p id="section-7.4-1">The CDA specifies the actions taken during the compression of header fields and the inverse action taken by the decompressor to restore the original value.
The CDAs defined by this document are described in detail in <a href="#NotSentCDA" class="xref">Section 7.4.3</a> to <a href="#compute-" class="xref">Section 7.4.8</a>.
They are summarized in <a href="#Fig-function" class="xref">Table 1</a>.<a href="#section-7.4-1" class="pilcrow">¶</a></p>
<span id="name-compression-and-decompressi"></span><div id="Fig-function">
<table class="center" id="table-1">
<caption>
<a href="#table-1" class="selfRef">Table 1</a>:
<a href="#name-compression-and-decompressi" class="selfRef">Compression and Decompression Actions</a>
</caption>
<thead>
<tr>
<th class="text-left" rowspan="1" colspan="1">Action</th>
<th class="text-left" rowspan="1" colspan="1">Compression</th>
<th class="text-left" rowspan="1" colspan="1">Decompression</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" rowspan="1" colspan="1">not-sent</td>
<td class="text-left" rowspan="1" colspan="1">elided</td>
<td class="text-left" rowspan="1" colspan="1">use TV stored in Rule</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">value-sent</td>
<td class="text-left" rowspan="1" colspan="1">send</td>
<td class="text-left" rowspan="1" colspan="1">use received value</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">mapping-sent</td>
<td class="text-left" rowspan="1" colspan="1">send index</td>
<td class="text-left" rowspan="1" colspan="1">retrieve value from TV list</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">LSB</td>
<td class="text-left" rowspan="1" colspan="1">send least significant bits (LSB)</td>
<td class="text-left" rowspan="1" colspan="1">concatenate TV and received value</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">compute-*</td>
<td class="text-left" rowspan="1" colspan="1">elided</td>
<td class="text-left" rowspan="1" colspan="1">recompute at decompressor</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">DevIID</td>
<td class="text-left" rowspan="1" colspan="1">elided</td>
<td class="text-left" rowspan="1" colspan="1">build IID from L2 Dev addr</td>
</tr>
<tr>
<td class="text-left" rowspan="1" colspan="1">AppIID</td>
<td class="text-left" rowspan="1" colspan="1">elided</td>
<td class="text-left" rowspan="1" colspan="1">build IID from L2 App addr</td>
</tr>
</tbody>
</table>
</div>
<p id="section-7.4-3">The first column shows the action's name. The second and third columns show the compression and decompression behaviors for each action.<a href="#section-7.4-3" class="pilcrow">¶</a></p>
<div id="fixed-length-field">
<section id="section-7.4.1">
<h4 id="name-processing-fixed-length-fie">
<a href="#section-7.4.1" class="section-number selfRef">7.4.1. </a><a href="#name-processing-fixed-length-fie" class="section-name selfRef">Processing Fixed-Length Fields</a>
</h4>
<p id="section-7.4.1-1">If the field is identified in the Field Descriptor as being of fixed length, then applying the CDA to compress this field results in a fixed amount of bits.
The residue for that field is simply the bits resulting from applying the CDA to the field.
This value may be empty (e.g., not-sent CDA), in which case the field residue is absent from the Compression Residue.<a href="#section-7.4.1-1" class="pilcrow">¶</a></p>
<span id="name-fixed-size-field-residue-st"></span><div id="Fig-FieldResFixLength">
<figure id="figure-8">
<div class="artwork art-text alignLeft" id="section-7.4.1-2.1">
<pre>
|- field residue -|
+-----------------+
| value |
+-----------------+</pre>
</div>
<figcaption><a href="#figure-8" class="selfRef">Figure 8</a>:
<a href="#name-fixed-size-field-residue-st" class="selfRef">Fixed-Size Field Residue Structure</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="var-length-field">
<section id="section-7.4.2">
<h4 id="name-processing-variable-length-">
<a href="#section-7.4.2" class="section-number selfRef">7.4.2. </a><a href="#name-processing-variable-length-" class="section-name selfRef">Processing Variable-Length Fields</a>
</h4>
<p id="section-7.4.2-1">If the field is identified in the Field Descriptor as being of variable length,
then applying the CDA to compress this field may result in a value of fixed size
(e.g., not-sent or mapping-sent)
or of variable size (e.g., value-sent or LSB).
In the latter case, the residue for that field is the bits that result from applying the CDA to the field, preceded with the size of the value.
The most significant bit of the size is stored to the left (leftmost bit of the residue field).<a href="#section-7.4.2-1" class="pilcrow">¶</a></p>
<span id="name-variable-size-field-residue"></span><div id="Fig-FieldResVarLength">
<figure id="figure-9">
<div class="artwork art-text alignLeft" id="section-7.4.2-2.1">
<pre>
|--- field residue ---|
+-------+-------------+
| size | value |
+-------+-------------+</pre>
</div>
<figcaption><a href="#figure-9" class="selfRef">Figure 9</a>:
<a href="#name-variable-size-field-residue" class="selfRef">Variable-Size Field Residue Structure</a>
</figcaption></figure>
</div>
<p id="section-7.4.2-3">The size (using the unit defined in the FL) is encoded on 4, 12, or 28 bits as follows:<a href="#section-7.4.2-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-7.4.2-4.1">If the size is between 0 and 14, it is encoded as a 4-bit unsigned integer.<a href="#section-7.4.2-4.1" class="pilcrow">¶</a>
</li>
<li id="section-7.4.2-4.2">Sizes between 15 and 254 are encoded as 0b1111 followed by the 8-bit unsigned integer.<a href="#section-7.4.2-4.2" class="pilcrow">¶</a>
</li>
<li id="section-7.4.2-4.3">Larger sizes are encoded as 0xfff followed by the 16-bit unsigned integer.<a href="#section-7.4.2-4.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-7.4.2-5">If the field is identified in the Field Descriptor as being of variable length and this field is not present in the packet header being compressed, size 0 <span class="bcp14">MUST</span> be sent to denote its absence.<a href="#section-7.4.2-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="NotSentCDA">
<section id="section-7.4.3">
<h4 id="name-not-sent-cda">
<a href="#section-7.4.3" class="section-number selfRef">7.4.3. </a><a href="#name-not-sent-cda" class="section-name selfRef">Not-Sent CDA</a>
</h4>
<p id="section-7.4.3-1">The not-sent action can be used when the field value is
specified in a Rule and, therefore, known by both the
Compressor and the Decompressor. This action
<span class="bcp14">SHOULD</span> be used with the "equal" MO. If MO is
"ignore", there is a risk of having a decompressed field
value that is different from the original field that was compressed.<a href="#section-7.4.3-1" class="pilcrow">¶</a></p>
<p id="section-7.4.3-2">The compressor does not send any residue for a field on which not-sent compression is applied.<a href="#section-7.4.3-2" class="pilcrow">¶</a></p>
<p id="section-7.4.3-3">The decompressor restores the field value with the TV stored in the matched Rule identified by the received RuleID.<a href="#section-7.4.3-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="value-sent-cda">
<section id="section-7.4.4">
<h4 id="name-value-sent-cda">
<a href="#section-7.4.4" class="section-number selfRef">7.4.4. </a><a href="#name-value-sent-cda" class="section-name selfRef">Value-Sent CDA</a>
</h4>
<p id="section-7.4.4-1">The value-sent action can be used when the field value is not known by both the Compressor and the Decompressor. The field is sent in its entirety, using the same bit order as in the original packet header.<a href="#section-7.4.4-1" class="pilcrow">¶</a></p>
<p id="section-7.4.4-2">If this action is performed on a variable-length field, the size of the residue value (using the units defined in FL) <span class="bcp14">MUST</span> be sent as described in <a href="#var-length-field" class="xref">Section 7.4.2</a>.<a href="#section-7.4.4-2" class="pilcrow">¶</a></p>
<p id="section-7.4.4-3">This action is generally used with the "ignore" MO.<a href="#section-7.4.4-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="mapping-sent-cda">
<section id="section-7.4.5">
<h4 id="name-mapping-sent-cda">
<a href="#section-7.4.5" class="section-number selfRef">7.4.5. </a><a href="#name-mapping-sent-cda" class="section-name selfRef">Mapping-Sent CDA</a>
</h4>
<p id="section-7.4.5-1">The mapping-sent action is used to send an index (the index into the TV list of values) instead of the original value. This action is used together with the "match-mapping" MO.<a href="#section-7.4.5-1" class="pilcrow">¶</a></p>
<p id="section-7.4.5-2">On the compressor side, the match-mapping MO searches the TV for a match with the header field value. The mapping-sent CDA then sends the corresponding index as the field residue.
The most significant bit of the index is stored to the left (leftmost bit of the residue field).<a href="#section-7.4.5-2" class="pilcrow">¶</a></p>
<p id="section-7.4.5-3">On the decompressor side, the CDA uses the received index to restore the field value by looking up the list in the TV.<a href="#section-7.4.5-3" class="pilcrow">¶</a></p>
<p id="section-7.4.5-4">The number of bits sent is the minimal size for coding all the possible indices.<a href="#section-7.4.5-4" class="pilcrow">¶</a></p>
<p id="section-7.4.5-5">The first element in the list <span class="bcp14">MUST</span> be represented by index value 0, and successive elements in the list <span class="bcp14">MUST</span> have indices incremented by 1.<a href="#section-7.4.5-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="lsb-cda">
<section id="section-7.4.6">
<h4 id="name-lsb-cda">
<a href="#section-7.4.6" class="section-number selfRef">7.4.6. </a><a href="#name-lsb-cda" class="section-name selfRef">LSB CDA</a>
</h4>
<p id="section-7.4.6-1">The LSB action is used together with the "MSB(x)" MO to avoid sending the most significant part of the packet field if that part is already known by the receiving end.<a href="#section-7.4.6-1" class="pilcrow">¶</a></p>
<p id="section-7.4.6-2">The compressor sends the LSBs as the field residue value.
The number of bits sent is the original header field length minus the length specified in the MSB(x) MO.
The bits appear in the residue in the same bit order as in the original packet header.<a href="#section-7.4.6-2" class="pilcrow">¶</a></p>
<p id="section-7.4.6-3">The decompressor concatenates the x most significant bits
of the TV and the received residue value.<a href="#section-7.4.6-3" class="pilcrow">¶</a></p>
<p id="section-7.4.6-4">If this action is performed on a variable-length field, the size of the residue value (using the units defined in FL) <span class="bcp14">MUST</span> be sent as described in <a href="#var-length-field" class="xref">Section 7.4.2</a>.<a href="#section-7.4.6-4" class="pilcrow">¶</a></p>
</section>
</div>
<div id="deviid-appiid-cda">
<section id="section-7.4.7">
<h4 id="name-deviid-appiid-cda">
<a href="#section-7.4.7" class="section-number selfRef">7.4.7. </a><a href="#name-deviid-appiid-cda" class="section-name selfRef">DevIID, AppIID CDA</a>
</h4>
<p id="section-7.4.7-1">These actions are used to process the DevIID and AppIID of the IPv6 addresses, respectively. AppIID CDA is less common since most current LPWAN technologies frames contain a single L2 address, which is the Dev's address.<a href="#section-7.4.7-1" class="pilcrow">¶</a></p>
<p id="section-7.4.7-2">The DevIID value <span class="bcp14">MAY</span> be computed from the Dev ID present in the L2 header, or from some other stable identifier. The computation is specific to each Profile and <span class="bcp14">MAY</span> depend on the Dev ID size.<a href="#section-7.4.7-2" class="pilcrow">¶</a></p>
<p id="section-7.4.7-3">In the Downlink direction, at the compressor, the DevIID CDA may be used to generate the L2 addresses on the LPWAN, based on the packet's Destination Address.<a href="#section-7.4.7-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="compute-">
<section id="section-7.4.8">
<h4 id="name-compute-">
<a href="#section-7.4.8" class="section-number selfRef">7.4.8. </a><a href="#name-compute-" class="section-name selfRef">Compute-*</a>
</h4>
<p id="section-7.4.8-1">Some fields can be elided at the compressor and recomputed locally at the decompressor.<a href="#section-7.4.8-1" class="pilcrow">¶</a></p>
<p id="section-7.4.8-2">Because the field is uniquely identified by its FID (e.g., IPv6 length), the relevant protocol specification unambiguously defines the algorithm for such computation.<a href="#section-7.4.8-2" class="pilcrow">¶</a></p>
<p id="section-7.4.8-3">An example of a field that knows how to recompute itself is IPv6 length.<a href="#section-7.4.8-3" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
</section>
</div>
<div id="Frag">
<section id="section-8">
<h2 id="name-fragmentation-reassembly">
<a href="#section-8" class="section-number selfRef">8. </a><a href="#name-fragmentation-reassembly" class="section-name selfRef">Fragmentation/Reassembly</a>
</h2>
<div id="overview">
<section id="section-8.1">
<h3 id="name-overview">
<a href="#section-8.1" class="section-number selfRef">8.1. </a><a href="#name-overview" class="section-name selfRef">Overview</a>
</h3>
<p id="section-8.1-1">In LPWAN technologies, the L2 MTU typically ranges from tens to hundreds of bytes.
Some of these technologies do not have an internal fragmentation/reassembly mechanism.<a href="#section-8.1-1" class="pilcrow">¶</a></p>
<p id="section-8.1-2">The optional SCHC F/R functionality enables such LPWAN technologies to comply with the IPv6 MTU requirement of 1280 bytes <span>[<a href="#RFC8200" class="xref">RFC8200</a>]</span>.
It is <span class="bcp14">OPTIONAL</span> to implement per this specification, but Profiles may specify that it is <span class="bcp14">REQUIRED</span>.<a href="#section-8.1-2" class="pilcrow">¶</a></p>
<p id="section-8.1-3">This specification includes several SCHC F/R modes, which allow for a range of reliability options such as optional SCHC Fragment retransmission.
More modes may be defined in the future.<a href="#section-8.1-3" class="pilcrow">¶</a></p>
<p id="section-8.1-4">The same SCHC F/R mode <span class="bcp14">MUST</span> be used for all SCHC Fragments of a given SCHC Packet.
This document does not specify which mode(s) must be implemented and used over a specific LPWAN technology. That information will be given in Profiles.<a href="#section-8.1-4" class="pilcrow">¶</a></p>
<p id="section-8.1-5">SCHC allows transmitting non-fragmented SCHC Packet concurrently with fragmented SCHC Packets.
In addition, SCHC F/R provides protocol elements that allow transmitting several fragmented SCHC Packets concurrently, i.e., interleaving the transmission of fragments from different fragmented SCHC Packets.
A Profile <span class="bcp14">MAY</span> restrict the latter behavior.<a href="#section-8.1-5" class="pilcrow">¶</a></p>
<p id="section-8.1-6">The L2 Word size (see <a href="#Term" class="xref">Section 4</a>) determines the encoding of some messages.
SCHC F/R usually generates SCHC Fragments and SCHC ACKs that are multiples of L2 Words.<a href="#section-8.1-6" class="pilcrow">¶</a></p>
</section>
</div>
<div id="FragTools">
<section id="section-8.2">
<h3 id="name-schc-f-r-protocol-elements">
<a href="#section-8.2" class="section-number selfRef">8.2. </a><a href="#name-schc-f-r-protocol-elements" class="section-name selfRef">SCHC F/R Protocol Elements</a>
</h3>
<p id="section-8.2-1">This subsection describes the different elements that are used to enable the SCHC F/R functionality defined in this document.
These elements include the SCHC F/R messages, tiles, windows, bitmaps, counters, timers, and header fields.<a href="#section-8.2-1" class="pilcrow">¶</a></p>
<p id="section-8.2-2">The elements are described here in a generic manner. Their application to each SCHC F/R mode is found in <a href="#FragModes" class="xref">Section 8.4</a>.<a href="#section-8.2-2" class="pilcrow">¶</a></p>
<div id="messages">
<section id="section-8.2.1">
<h4 id="name-messages">
<a href="#section-8.2.1" class="section-number selfRef">8.2.1. </a><a href="#name-messages" class="section-name selfRef">Messages</a>
</h4>
<p id="section-8.2.1-1">SCHC F/R defines the following messages:<a href="#section-8.2.1-1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-8.2.1-2">
<dt id="section-8.2.1-2.1">SCHC Fragment:</dt>
<dd id="section-8.2.1-2.2">A message that carries part of a SCHC Packet from the sender to the receiver.<a href="#section-8.2.1-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.1-2.3">SCHC ACK:</dt>
<dd id="section-8.2.1-2.4">An acknowledgement for fragmentation, by the receiver to the sender.
This message is used to indicate whether or not the reception of pieces of,
or the whole of, the fragmented SCHC Packet was successful.<a href="#section-8.2.1-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.1-2.5">SCHC ACK REQ:</dt>
<dd id="section-8.2.1-2.6">A request by the sender for a SCHC ACK from the receiver.<a href="#section-8.2.1-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.1-2.7">SCHC Sender-Abort:</dt>
<dd id="section-8.2.1-2.8">A message by the sender telling the receiver that it has aborted the transmission of a fragmented SCHC Packet.<a href="#section-8.2.1-2.8" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.1-2.9">SCHC Receiver-Abort:</dt>
<dd id="section-8.2.1-2.10">A message by the receiver to tell the sender to abort the transmission of a fragmented SCHC Packet.<a href="#section-8.2.1-2.10" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
<p id="section-8.2.1-3">The format of these messages is provided in <a href="#Fragfor" class="xref">Section 8.3</a>.<a href="#section-8.2.1-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="OtherTools">
<section id="section-8.2.2">
<h4 id="name-tiles-windows-bitmaps-timer">
<a href="#section-8.2.2" class="section-number selfRef">8.2.2. </a><a href="#name-tiles-windows-bitmaps-timer" class="section-name selfRef">Tiles, Windows, Bitmaps, Timers, Counters</a>
</h4>
<div id="tiles">
<section id="section-8.2.2.1">
<h5 id="name-tiles">
<a href="#section-8.2.2.1" class="section-number selfRef">8.2.2.1. </a><a href="#name-tiles" class="section-name selfRef">Tiles</a>
</h5>
<p id="section-8.2.2.1-1">The SCHC Packet is fragmented into pieces, hereafter called "tiles".
The tiles <span class="bcp14">MUST</span> be non-empty and pairwise disjoint.
Their union <span class="bcp14">MUST</span> be equal to the SCHC Packet.<a href="#section-8.2.2.1-1" class="pilcrow">¶</a></p>
<p id="section-8.2.2.1-2">See <a href="#Fig-TilesExample" class="xref">Figure 10</a> for an example.<a href="#section-8.2.2.1-2" class="pilcrow">¶</a></p>
<span id="name-schc-packet-fragmented-in-t"></span><div id="Fig-TilesExample">
<figure id="figure-10">
<div class="artwork art-text alignLeft" id="section-8.2.2.1-3.1">
<pre>
SCHC Packet
+----+--+-----+---+----+-+---+-----+...-----+----+---+------+
Tiles | | | | | | | | | | | | |
+----+--+-----+---+----+-+---+-----+...-----+----+---+------+</pre>
</div>
<figcaption><a href="#figure-10" class="selfRef">Figure 10</a>:
<a href="#name-schc-packet-fragmented-in-t" class="selfRef">SCHC Packet Fragmented in Tiles</a>
</figcaption></figure>
</div>
<p id="section-8.2.2.1-4">Modes (see <a href="#FragModes" class="xref">Section 8.4</a>) <span class="bcp14">MAY</span> place additional constraints on tile sizes.<a href="#section-8.2.2.1-4" class="pilcrow">¶</a></p>
<p id="section-8.2.2.1-5">Each SCHC Fragment message carries at least one tile in its Payload, if the Payload field is present.<a href="#section-8.2.2.1-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="Windows">
<section id="section-8.2.2.2">
<h5 id="name-windows">
<a href="#section-8.2.2.2" class="section-number selfRef">8.2.2.2. </a><a href="#name-windows" class="section-name selfRef">Windows</a>
</h5>
<p id="section-8.2.2.2-1">Some SCHC F/R modes may handle successive tiles in groups, called windows.<a href="#section-8.2.2.2-1" class="pilcrow">¶</a></p>
<p id="section-8.2.2.2-2">If windows are used:<a href="#section-8.2.2.2-2" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.2.2-3.1">all the windows of a SCHC Packet, except the last one, <span class="bcp14">MUST</span> contain the same number of tiles.
This number is WINDOW_SIZE.<a href="#section-8.2.2.2-3.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.2">WINDOW_SIZE <span class="bcp14">MUST</span> be specified in a Profile.<a href="#section-8.2.2.2-3.2" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.3">the windows are numbered.<a href="#section-8.2.2.2-3.3" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.4">their numbers <span class="bcp14">MUST</span> increment by 1 from 0 upward, from the start of the SCHC Packet to its end.<a href="#section-8.2.2.2-3.4" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.5">the last window <span class="bcp14">MUST</span> contain WINDOW_SIZE tiles or less.<a href="#section-8.2.2.2-3.5" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.6">tiles are numbered within each window.<a href="#section-8.2.2.2-3.6" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.7">the tile indices <span class="bcp14">MUST</span> decrement by 1 from WINDOW_SIZE - 1 downward, looking from the start of the SCHC Packet toward its end.<a href="#section-8.2.2.2-3.7" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-3.8">therefore, each tile of a SCHC Packet is uniquely identified by a window number and a tile index within this window.<a href="#section-8.2.2.2-3.8" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.2.2.2-4">See <a href="#Fig-WindowsExample" class="xref">Figure 11</a> for an example.<a href="#section-8.2.2.2-4" class="pilcrow">¶</a></p>
<span id="name-schc-packet-fragmented-in-ti"></span><div id="Fig-WindowsExample">
<figure id="figure-11">
<div class="artwork art-text alignLeft" id="section-8.2.2.2-5.1">
<pre>
+---------------------------------------------...-----------+
| SCHC Packet |
+---------------------------------------------...-----------+
Tile# | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 |3|
Window# |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|- 28-|</pre>
</div>
<figcaption><a href="#figure-11" class="selfRef">Figure 11</a>:
<a href="#name-schc-packet-fragmented-in-ti" class="selfRef">SCHC Packet Fragmented in Tiles Grouped in 29 Windows, with WINDOW_SIZE = 5</a>
</figcaption></figure>
</div>
<p id="section-8.2.2.2-6"><a href="#MultWinSizes" class="xref">Appendix E</a> discusses the benefits of selecting one among multiple window sizes depending on the size of the SCHC Packet to be fragmented.<a href="#section-8.2.2.2-6" class="pilcrow">¶</a></p>
<p id="section-8.2.2.2-7">When windows are used:<a href="#section-8.2.2.2-7" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.2.2-8.1">Bitmaps (see <a href="#Bitmap" class="xref">Section 8.2.2.3</a>) <span class="bcp14">MAY</span> be sent back by the receiver to the sender in a SCHC ACK message.<a href="#section-8.2.2.2-8.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.2-8.2">A Bitmap corresponds to exactly one Window.<a href="#section-8.2.2.2-8.2" class="pilcrow">¶</a>
</li>
</ul>
</section>
</div>
<div id="Bitmap">
<section id="section-8.2.2.3">
<h5 id="name-bitmaps">
<a href="#section-8.2.2.3" class="section-number selfRef">8.2.2.3. </a><a href="#name-bitmaps" class="section-name selfRef">Bitmaps</a>
</h5>
<p id="section-8.2.2.3-1">Each bit in the Bitmap for a window corresponds to a tile in the window.
Therefore, each Bitmap has WINDOW_SIZE bits.
The bit at the leftmost position corresponds to the tile numbered WINDOW_SIZE - 1.
Consecutive bits, going right, correspond to sequentially decreasing tile indices.
In Bitmaps for windows that are not the last one of a SCHC Packet,
the bit at the rightmost position corresponds to the tile numbered 0.
In the Bitmap for the last window,
the bit at the rightmost position corresponds either to the tile numbered 0 or to a tile that is sent/received as "the last one of the SCHC Packet" without explicitly stating its number (see <a href="#LastFrag" class="xref">Section 8.3.1.2</a>).<a href="#section-8.2.2.3-1" class="pilcrow">¶</a></p>
<p id="section-8.2.2.3-2">At the receiver:<a href="#section-8.2.2.3-2" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.2.3-3.1">a bit set to 1 in the Bitmap indicates that a tile associated with that bit position has been correctly received for that window.<a href="#section-8.2.2.3-3.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.2.3-3.2">a bit set to 0 in the Bitmap indicates that there has been no tile correctly received, associated with that bit position, for that window.
Possible reasons include that the tile was not sent at all, not received, or received with errors.<a href="#section-8.2.2.3-3.2" class="pilcrow">¶</a>
</li>
</ul>
</section>
</div>
<div id="MiscTools">
<section id="section-8.2.2.4">
<h5 id="name-timers-and-counters">
<a href="#section-8.2.2.4" class="section-number selfRef">8.2.2.4. </a><a href="#name-timers-and-counters" class="section-name selfRef">Timers and Counters</a>
</h5>
<p id="section-8.2.2.4-1">Some SCHC F/R modes can use the following timers and counters:<a href="#section-8.2.2.4-1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-8.2.2.4-2">
<dt id="section-8.2.2.4-2.1">Inactivity Timer:</dt>
<dd id="section-8.2.2.4-2.2">a SCHC Fragment receiver uses this timer to abort waiting for a SCHC F/R message.<a href="#section-8.2.2.4-2.2" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.2.4-2.3">Retransmission Timer:</dt>
<dd id="section-8.2.2.4-2.4">a SCHC Fragment sender uses this timer to abort waiting for an expected SCHC ACK.<a href="#section-8.2.2.4-2.4" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.2.4-2.5">Attempts:</dt>
<dd id="section-8.2.2.4-2.6">this counter counts the requests for SCHC ACKs, up to MAX_ACK_REQUESTS.<a href="#section-8.2.2.4-2.6" class="pilcrow">¶</a>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
</section>
</div>
<div id="IntegrityChecking">
<section id="section-8.2.3">
<h4 id="name-integrity-checking">
<a href="#section-8.2.3" class="section-number selfRef">8.2.3. </a><a href="#name-integrity-checking" class="section-name selfRef">Integrity Checking</a>
</h4>
<p id="section-8.2.3-1">The integrity of the fragmentation-reassembly process of a SCHC Packet <span class="bcp14">MUST</span> be checked at the receive end.
A Profile <span class="bcp14">MUST</span> specify how integrity checking is performed.<a href="#section-8.2.3-1" class="pilcrow">¶</a></p>
<p id="section-8.2.3-2">It is <span class="bcp14">RECOMMENDED</span> that integrity checking be performed by computing a Reassembly Check Sequence (RCS)
based on the SCHC Packet at the sender side
and transmitting it to the receiver for comparison with the RCS locally computed after reassembly.<a href="#section-8.2.3-2" class="pilcrow">¶</a></p>
<p id="section-8.2.3-3">The RCS supports UDP checksum elision by SCHC C/D (see <a href="#UDPchecksum" class="xref">Section 10.11</a>).<a href="#section-8.2.3-3" class="pilcrow">¶</a></p>
<p id="section-8.2.3-4">The CRC32 polynomial 0xEDB88320 (i.e., the reversed polynomial representation, which is
used in the Ethernet standard <span>[<a href="#ETHERNET" class="xref">ETHERNET</a>]</span>) is <span class="bcp14">RECOMMENDED</span> as the default algorithm for computing the
RCS.<a href="#section-8.2.3-4" class="pilcrow">¶</a></p>
<p id="section-8.2.3-5">The RCS <span class="bcp14">MUST</span> be computed on the full SCHC Packet concatenated with the padding bits, if any, of the SCHC Fragment carrying the last tile.
The rationale is that the SCHC reassembler has no way of knowing the boundary between the last tile and the padding bits.
Indeed, this requires decompressing the SCHC Packet, which is out of the scope of the SCHC reassembler.<a href="#section-8.2.3-5" class="pilcrow">¶</a></p>
<p id="section-8.2.3-6">The concatenation of the complete SCHC Packet and any padding bits, if present, of the last SCHC Fragment does not
generally constitute an integer number of bytes.
CRC libraries are usually byte oriented.
It is <span class="bcp14">RECOMMENDED</span> that the concatenation of the
complete SCHC Packet and any last fragment padding bits be zero-extended to the next byte boundary and
that the RCS be computed on that byte array.<a href="#section-8.2.3-6" class="pilcrow">¶</a></p>
</section>
</div>
<div id="HeaderFields">
<section id="section-8.2.4">
<h4 id="name-header-fields">
<a href="#section-8.2.4" class="section-number selfRef">8.2.4. </a><a href="#name-header-fields" class="section-name selfRef">Header Fields</a>
</h4>
<p id="section-8.2.4-1">The SCHC F/R messages contain the following fields (see the formats in <a href="#Fragfor" class="xref">Section 8.3</a>):<a href="#section-8.2.4-1" class="pilcrow">¶</a></p>
<dl class="dlParallel" id="section-8.2.4-2">
<dt id="section-8.2.4-2.1">RuleID:</dt>
<dd id="section-8.2.4-2.2">
<p id="section-8.2.4-2.2.1">this field is present in all the SCHC F/R messages. The Rule identifies:<a href="#section-8.2.4-2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.4-2.2.2.1">that a SCHC F/R message is being carried, as opposed to an unfragmented SCHC Packet,<a href="#section-8.2.4-2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.4-2.2.2.2">which SCHC F/R mode is used,<a href="#section-8.2.4-2.2.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.2.4-2.2.2.3">in case this mode uses windows, what the value of
WINDOW_SIZE is, and<a href="#section-8.2.4-2.2.2.3" class="pilcrow">¶</a>
</li>
<li id="section-8.2.4-2.2.2.4">what other optional fields are present and what the field sizes are.<a href="#section-8.2.4-2.2.2.4" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.2.4-2.2.3">
The Rule tells apart a non-fragmented SCHC Packet from SCHC Fragments.
It will also tell apart SCHC Fragments of fragmented SCHC Packets that use different SCHC F/R modes or different parameters.
Therefore, interleaved transmission of these is possible.<a href="#section-8.2.4-2.2.3" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.2.4">
All SCHC F/R messages pertaining to the same SCHC Packet <span class="bcp14">MUST</span> bear the same RuleID.<a href="#section-8.2.4-2.2.4" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.3">Datagram Tag (DTag):</dt>
<dd id="section-8.2.4-2.4">
<p id="section-8.2.4-2.4.1">This field allows differentiating SCHC F/R messages belonging to different SCHC Packets
that may be using the same RuleID simultaneously.
Hence, it allows interleaving fragments of a new SCHC Packet with fragments of a previous SCHC Packet under the same RuleID.<a href="#section-8.2.4-2.4.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.4.2">
The size of the DTag field (called "T", in bits) is defined by each Profile for each RuleID.
When T is 0, the DTag field does not appear in the SCHC F/R messages and the DTag value is defined as 0.<a href="#section-8.2.4-2.4.2" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.4.3">
When T is 0, there can be no more than one fragmented SCHC Packet in transit for each fragmentation RuleID.<a href="#section-8.2.4-2.4.3" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.4.4">
If T is not 0, DTag:<a href="#section-8.2.4-2.4.4" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.4-2.4.5.1">
<span class="bcp14">MUST</span> be set to the same value for all the SCHC F/R messages related to the same fragmented SCHC Packet, and<a href="#section-8.2.4-2.4.5.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.4-2.4.5.2">
<span class="bcp14">MUST</span> be set to different values for SCHC F/R messages related to different SCHC Packets that are being fragmented under the same RuleID and whose transmission may overlap.<a href="#section-8.2.4-2.4.5.2" class="pilcrow">¶</a>
</li>
</ul>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.5">W:</dt>
<dd id="section-8.2.4-2.6">
<p id="section-8.2.4-2.6.1">The W field is optional. It is only present if windows are used.
Its presence and size (called "M", in bits) is defined by each SCHC F/R mode and each Profile for each RuleID.<a href="#section-8.2.4-2.6.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.6.2">
This field carries information pertaining to the window a SCHC F/R message relates to.
If present, W <span class="bcp14">MUST</span> carry the same value for all the SCHC F/R messages related to the same window.
Depending on the mode and Profile, W may carry the full window number, or just the LSB or any other partial representation of the window number.<a href="#section-8.2.4-2.6.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.7">Fragment Compressed Number (FCN):</dt>
<dd id="section-8.2.4-2.8">
<p id="section-8.2.4-2.8.1">The FCN field is present in the SCHC Fragment Header.
Its size (called "N", in bits) is defined by each Profile for each RuleID.<a href="#section-8.2.4-2.8.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.8.2">
This field conveys information about the progress in the sequence of tiles being transmitted by SCHC Fragment messages.
For example, it can contain a partial, efficient representation of a larger-sized tile index.
The description of the exact use of the FCN field is left to each SCHC F/R mode.
However, two values are reserved for special purposes. They help control the SCHC F/R process:<a href="#section-8.2.4-2.8.2" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.2.4-2.8.3.1">The FCN value with all the bits equal to 1 (called "All-1") signals that the very last tile of a SCHC Packet has been transmitted.
By extension, if windows are used, the last window of a packet is called the "All-1" window.<a href="#section-8.2.4-2.8.3.1" class="pilcrow">¶</a>
</li>
<li id="section-8.2.4-2.8.3.2">If windows are used, the FCN value with all the bits equal to 0 (called "All-0") signals
the last tile of a window that is not the last one of the SCHC packet.
By extension, such a window is called an "All-0 window".<a href="#section-8.2.4-2.8.3.2" class="pilcrow">¶</a>
</li>
</ul>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.9">Reassembly Check Sequence (RCS):</dt>
<dd id="section-8.2.4-2.10">
<p id="section-8.2.4-2.10.1">This field only appears in the All-1 SCHC Fragments.
Its size (called "U", in bits) is defined by each Profile for each RuleID.<a href="#section-8.2.4-2.10.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.10.2">
See <a href="#IntegrityChecking" class="xref">Section 8.2.3</a> for the RCS default size, default polynomial and details on RCS computation.<a href="#section-8.2.4-2.10.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.11">C (integrity Check):</dt>
<dd id="section-8.2.4-2.12">
<p id="section-8.2.4-2.12.1">C is a 1-bit field.
This field is used in the SCHC ACK message to report on the reassembled SCHC Packet integrity check (see <a href="#IntegrityChecking" class="xref">Section 8.2.3</a>).<a href="#section-8.2.4-2.12.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.12.2">
A value of 1 tells that the integrity check was performed and is successful.
A value of 0 tells that the integrity check was not performed or that it was a failure.<a href="#section-8.2.4-2.12.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="section-8.2.4-2.13">Compressed Bitmap:</dt>
<dd id="section-8.2.4-2.14">
<p id="section-8.2.4-2.14.1">The Compressed Bitmap is used together with windows and Bitmaps (see <a href="#Bitmap" class="xref">Section 8.2.2.3</a>).
Its presence and size is defined for each SCHC F/R mode for each RuleID.<a href="#section-8.2.4-2.14.1" class="pilcrow">¶</a></p>
<p id="section-8.2.4-2.14.2">
This field appears in the SCHC ACK message to report on the receiver Bitmap (see <a href="#BitmapTrunc" class="xref">Section 8.3.2.1</a>).<a href="#section-8.2.4-2.14.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
</dl>
</section>
</div>
</section>
</div>
<div id="Fragfor">
<section id="section-8.3">
<h3 id="name-schc-f-r-message-formats">
<a href="#section-8.3" class="section-number selfRef">8.3. </a><a href="#name-schc-f-r-message-formats" class="section-name selfRef">SCHC F/R Message Formats</a>
</h3>
<p id="section-8.3-1">This section defines the SCHC Fragment formats, the SCHC ACK format, the SCHC ACK REQ format and the SCHC Abort formats.<a href="#section-8.3-1" class="pilcrow">¶</a></p>
<div id="schc-fragment-format">
<section id="section-8.3.1">
<h4 id="name-schc-fragment-format">
<a href="#section-8.3.1" class="section-number selfRef">8.3.1. </a><a href="#name-schc-fragment-format" class="section-name selfRef">SCHC Fragment Format</a>
</h4>
<p id="section-8.3.1-1">A SCHC Fragment conforms to the general format shown in <a href="#Fig-FragFormat" class="xref">Figure 12</a>.
It comprises a SCHC Fragment Header and a SCHC Fragment Payload.
The SCHC Fragment Payload carries one or several tile(s).<a href="#section-8.3.1-1" class="pilcrow">¶</a></p>
<span id="name-schc-fragment-general-forma"></span><div id="Fig-FragFormat">
<figure id="figure-12">
<div class="artwork art-text alignLeft" id="section-8.3.1-2.1">
<pre>
+-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~
| Fragment Header | Fragment Payload | padding (as needed)
+-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~</pre>
</div>
<figcaption><a href="#figure-12" class="selfRef">Figure 12</a>:
<a href="#name-schc-fragment-general-forma" class="selfRef">SCHC Fragment General Format</a>
</figcaption></figure>
</div>
<div id="NotLastFrag">
<section id="section-8.3.1.1">
<h5 id="name-regular-schc-fragment">
<a href="#section-8.3.1.1" class="section-number selfRef">8.3.1.1. </a><a href="#name-regular-schc-fragment" class="section-name selfRef">Regular SCHC Fragment</a>
</h5>
<p id="section-8.3.1.1-1">The Regular SCHC Fragment format is shown in <a href="#Fig-NotLastFrag" class="xref">Figure 13</a>.
Regular SCHC Fragments are generally used to carry tiles that are not the last one of a SCHC Packet.
The DTag field and the W field are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.<a href="#section-8.3.1.1-1" class="pilcrow">¶</a></p>
<span id="name-detailed-header-format-for-"></span><div id="Fig-NotLastFrag">
<figure id="figure-13">
<div class="artwork art-text alignLeft" id="section-8.3.1.1-2.1">
<pre>
|-- SCHC Fragment Header ----|
|-- T --|-M-|-- N --|
+-- ... -+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~
| RuleID | DTag | W | FCN | Fragment Payload | padding (as needed)
+-- ... -+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~</pre>
</div>
<figcaption><a href="#figure-13" class="selfRef">Figure 13</a>:
<a href="#name-detailed-header-format-for-" class="selfRef">Detailed Header Format for Regular SCHC Fragments</a>
</figcaption></figure>
</div>
<p id="section-8.3.1.1-3">The FCN field <span class="bcp14">MUST NOT</span> contain all bits set to 1.<a href="#section-8.3.1.1-3" class="pilcrow">¶</a></p>
<p id="section-8.3.1.1-4">Profiles <span class="bcp14">MUST</span> ensure that
a SCHC Fragment with FCN equal to 0 (called an "All-0 SCHC Fragment") is distinguishable by size,
even in the presence of padding,
from a SCHC ACK REQ message (see <a href="#ACKREQ" class="xref">Section 8.3.3</a>) with the same RuleID value and with the same T, M, and N values.
This condition is met if the Payload is at least the size of an L2 Word.
This condition is also met if the SCHC Fragment Header is a multiple of L2 Words.<a href="#section-8.3.1.1-4" class="pilcrow">¶</a></p>
</section>
</div>
<div id="LastFrag">
<section id="section-8.3.1.2">
<h5 id="name-all-1-schc-fragment">
<a href="#section-8.3.1.2" class="section-number selfRef">8.3.1.2. </a><a href="#name-all-1-schc-fragment" class="section-name selfRef">All-1 SCHC Fragment</a>
</h5>
<p id="section-8.3.1.2-1">The All-1 SCHC Fragment format is shown in <a href="#Fig-LastFrag" class="xref">Figure 14</a>.
The sender uses the All-1 SCHC Fragment format for the message that completes the emission of a fragmented SCHC Packet.
The DTag field, the W field, the RCS field and the Payload are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.
At least one of RCS field or Fragment Payload <span class="bcp14">MUST</span> be present.
The FCN field is all ones.<a href="#section-8.3.1.2-1" class="pilcrow">¶</a></p>
<span id="name-detailed-header-format-for-t"></span><div id="Fig-LastFrag">
<figure id="figure-14">
<div class="artwork art-text alignLeft" id="section-8.3.1.2-2.1">
<pre>
|------- SCHC Fragment Header -------|
|-- T --|-M-|-- N --|-- U --|
+-- ... -+- ... -+---+- ... -+- ... -+-----...-----+~~~~~~~~~~~~~~~~~
| RuleID | DTag | W | 11..1 | RCS | FragPayload | pad. (as needed)
+-- ... -+- ... -+---+- ... -+- ... -+-----...-----+~~~~~~~~~~~~~~~~~
(FCN)</pre>
</div>
<figcaption><a href="#figure-14" class="selfRef">Figure 14</a>:
<a href="#name-detailed-header-format-for-t" class="selfRef">Detailed Header Format for the All-1 SCHC Fragment</a>
</figcaption></figure>
</div>
<p id="section-8.3.1.2-3">Profiles <span class="bcp14">MUST</span> ensure that
an All-1 SCHC Fragment message is distinguishable by size,
even in the presence of padding,
from a SCHC Sender-Abort message (see <a href="#SenderAbort" class="xref">Section 8.3.4</a>) with the same RuleID value and with the same T, M, and N values.
This condition is met if the RCS is present and is at least the size of an L2 Word
or if the Payload is present and is at least the size an L2 Word.
This condition is also met if the SCHC Sender-Abort Header is a multiple of L2 Words.<a href="#section-8.3.1.2-3" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="ACK">
<section id="section-8.3.2">
<h4 id="name-schc-ack-format">
<a href="#section-8.3.2" class="section-number selfRef">8.3.2. </a><a href="#name-schc-ack-format" class="section-name selfRef">SCHC ACK Format</a>
</h4>
<p id="section-8.3.2-1">The SCHC ACK message is shown in <a href="#Fig-ACK-Format" class="xref">Figure 15</a>.
The DTag field and the W field are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.
The Compressed Bitmap field <span class="bcp14">MUST</span> be present in SCHC F/R modes that use windows and <span class="bcp14">MUST NOT</span> be present in other modes.<a href="#section-8.3.2-1" class="pilcrow">¶</a></p>
<span id="name-format-of-the-schc-ack-mess"></span><div id="Fig-ACK-Format">
<figure id="figure-15">
<div class="artwork art-text alignLeft" id="section-8.3.2-2.1">
<pre>
|--- SCHC ACK Header ----|
|-- T --|-M-| 1 |
+-- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~
| RuleID | DTag | W |C=1| padding as needed (success)
+-- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~
+-- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~
| RuleID | DTag | W |C=0|Compressed Bitmap| pad. as needed (failure)
+-- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~</pre>
</div>
<figcaption><a href="#figure-15" class="selfRef">Figure 15</a>:
<a href="#name-format-of-the-schc-ack-mess" class="selfRef">Format of the SCHC ACK Message</a>
</figcaption></figure>
</div>
<p id="section-8.3.2-3">The SCHC ACK Header contains a C bit (see <a href="#HeaderFields" class="xref">Section 8.2.4</a>).<a href="#section-8.3.2-3" class="pilcrow">¶</a></p>
<p id="section-8.3.2-4">If the C bit is set to 1 (integrity check successful),
no Bitmap is carried.<a href="#section-8.3.2-4" class="pilcrow">¶</a></p>
<p id="section-8.3.2-5">If the C bit is set to 0 (integrity check not performed or failed) and if windows are used,
a Compressed Bitmap for the window referred to by the W field is transmitted
as specified in <a href="#BitmapTrunc" class="xref">Section 8.3.2.1</a>.<a href="#section-8.3.2-5" class="pilcrow">¶</a></p>
<div id="BitmapTrunc">
<section id="section-8.3.2.1">
<h5 id="name-bitmap-compression">
<a href="#section-8.3.2.1" class="section-number selfRef">8.3.2.1. </a><a href="#name-bitmap-compression" class="section-name selfRef">Bitmap Compression</a>
</h5>
<p id="section-8.3.2.1-1">For transmission, the Compressed Bitmap in the SCHC ACK message is defined by the following algorithm (see <a href="#Fig-Localbitmap" class="xref">Figure 16</a> for a follow-along example):<a href="#section-8.3.2.1-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.3.2.1-2.1">Build a temporary SCHC ACK message that contains the Header followed by the original Bitmap
(see <a href="#Bitmap" class="xref">Section 8.2.2.3</a> for a description of Bitmaps).<a href="#section-8.3.2.1-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.3.2.1-2.2">Position scissors at the end of the Bitmap, after
its last bit.<a href="#section-8.3.2.1-2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.3.2.1-2.3">While the bit on the left of the scissors is 1 and belongs to the Bitmap, keep moving left, then stop.<a href="#section-8.3.2.1-2.3" class="pilcrow">¶</a>
</li>
<li id="section-8.3.2.1-2.4">Then, while the scissors are not on an L2 Word boundary of the SCHC ACK message and there is a Bitmap bit on the right of the scissors, keep moving right, then stop.<a href="#section-8.3.2.1-2.4" class="pilcrow">¶</a>
</li>
<li id="section-8.3.2.1-2.5">At this point, cut and drop off any bits to the right of the scissors.<a href="#section-8.3.2.1-2.5" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.3.2.1-3">When one or more bits have effectively been dropped off as a result of the above algorithm, the SCHC ACK message is a multiple of L2 Words; no padding bits will be appended.<a href="#section-8.3.2.1-3" class="pilcrow">¶</a></p>
<p id="section-8.3.2.1-4">Because the SCHC Fragment sender knows the size of the original Bitmap, it can reconstruct the original Bitmap from the Compressed Bitmap received in the SCHC ACK message.<a href="#section-8.3.2.1-4" class="pilcrow">¶</a></p>
<p id="section-8.3.2.1-5"><a href="#Fig-Localbitmap" class="xref">Figure 16</a> shows an example where L2 Words are actually bytes and where the original Bitmap contains 17 bits, the last 15 of which are all set to 1.<a href="#section-8.3.2.1-5" class="pilcrow">¶</a></p>
<span id="name-schc-ack-header-plus-uncomp"></span><div id="Fig-Localbitmap">
<figure id="figure-16">
<div class="artwork art-text alignLeft" id="section-8.3.2.1-6.1">
<pre>
|--- SCHC ACK Header ----|-------- Bitmap --------|
|-- T --|-M-| 1 |
+-- ... -+- ... -+---+---+---------------------------------+
| RuleID | DTag | W |C=0|1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1|
+-- ... -+- ... -+---+---+---------------------------------+
next L2 Word boundary ->|</pre>
</div>
<figcaption><a href="#figure-16" class="selfRef">Figure 16</a>:
<a href="#name-schc-ack-header-plus-uncomp" class="selfRef">SCHC ACK Header Plus Uncompressed Bitmap</a>
</figcaption></figure>
</div>
<p id="section-8.3.2.1-7"><a href="#Fig-transmittedbitmap" class="xref">Figure 17</a> shows that the last 14 bits are not sent.<a href="#section-8.3.2.1-7" class="pilcrow">¶</a></p>
<span id="name-resulting-schc-ack-message-"></span><div id="Fig-transmittedbitmap">
<figure id="figure-17">
<div class="artwork art-text alignLeft" id="section-8.3.2.1-8.1">
<pre>
|--- SCHC ACK Header ----|CpBmp|
|-- T --|-M-| 1 |
+-- ... -+- ... -+---+---+-----+
| RuleID | DTag | W |C=0|1 0 1|
+-- ... -+- ... -+---+---+-----+
next L2 Word boundary ->|</pre>
</div>
<figcaption><a href="#figure-17" class="selfRef">Figure 17</a>:
<a href="#name-resulting-schc-ack-message-" class="selfRef">Resulting SCHC ACK Message with Compressed Bitmap</a>
</figcaption></figure>
</div>
<p id="section-8.3.2.1-9"><a href="#Fig-Bitmap-Win" class="xref">Figure 18</a> shows an example of a SCHC ACK with tile indices ranging from 6 down to 0, where the Bitmap indicates that the second and the fourth tile of the window have not been correctly received.<a href="#section-8.3.2.1-9" class="pilcrow">¶</a></p>
<span id="name-example-of-a-schc-ack-messa"></span><div id="Fig-Bitmap-Win">
<figure id="figure-18">
<div class="artwork art-text alignLeft" id="section-8.3.2.1-10.1">
<pre>
|--- SCHC ACK Header ----|--- Bitmap --|
|-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #)
+--------+-------+---+---+-------------+
| RuleID | DTag | W |C=0|1 0 1 0 1 1 1| uncompressed Bitmap
+--------+-------+---+---+-------------+
next L2 Word boundary ->|<-- L2 Word --->|
+--------+-------+---+---+-------------+~~~~+
| RuleID | DTag | W |C=0|1 0 1 0 1 1 1|pad.| transmitted SCHC ACK
+--------+-------+---+---+-------------+~~~~+
next L2 Word boundary ->|<-- L2 Word --->|</pre>
</div>
<figcaption><a href="#figure-18" class="selfRef">Figure 18</a>:
<a href="#name-example-of-a-schc-ack-messa" class="selfRef">Example of a SCHC ACK Message, Missing Tiles</a>
</figcaption></figure>
</div>
<p id="section-8.3.2.1-11"><a href="#Fig-Bitmap-lastWin" class="xref">Figure 19</a> shows an example of a SCHC ACK with tile indices ranging from 6 down to 0, where integrity check has not been performed or has failed and the Bitmap indicates that there is no missing tile in that window.<a href="#section-8.3.2.1-11" class="pilcrow">¶</a></p>
<span id="name-example-of-a-schc-ack-messag"></span><div id="Fig-Bitmap-lastWin">
<figure id="figure-19">
<div class="artwork art-text alignLeft" id="section-8.3.2.1-12.1">
<pre>
|--- SCHC ACK Header ----|--- Bitmap --|
|-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #)
+--------+-------+---+---+-------------+
| RuleID | DTag | W |C=0|1 1 1 1 1 1 1| with uncompressed Bitmap
+--------+-------+---+---+-------------+
next L2 Word boundary ->|
+-- ... -+- ... -+---+---+-+
| RuleID | DTag | W |C=0|1| transmitted SCHC ACK
+-- ... -+- ... -+---+---+-+
next L2 Word boundary ->|</pre>
</div>
<figcaption><a href="#figure-19" class="selfRef">Figure 19</a>:
<a href="#name-example-of-a-schc-ack-messag" class="selfRef">Example of a SCHC ACK Message, No Missing Tile</a>
</figcaption></figure>
</div>
</section>
</div>
</section>
</div>
<div id="ACKREQ">
<section id="section-8.3.3">
<h4 id="name-schc-ack-req-format">
<a href="#section-8.3.3" class="section-number selfRef">8.3.3. </a><a href="#name-schc-ack-req-format" class="section-name selfRef">SCHC ACK REQ Format</a>
</h4>
<p id="section-8.3.3-1">The SCHC ACK REQ is used by a sender to request a SCHC ACK from the receiver.
Its format is shown in <a href="#Fig-ACKREQ" class="xref">Figure 20</a>.
The DTag field and the W field are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.
The FCN field is all zero.<a href="#section-8.3.3-1" class="pilcrow">¶</a></p>
<span id="name-schc-ack-req-format-2"></span><div id="Fig-ACKREQ">
<figure id="figure-20">
<div class="artwork art-text alignLeft" id="section-8.3.3-2.1">
<pre>
|--- SCHC ACK REQ Header ----|
|-- T --|-M-|-- N --|
+-- ... -+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~
| RuleID | DTag | W | 0..0 | padding (as needed) (no payload)
+-- ... -+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~</pre>
</div>
<figcaption><a href="#figure-20" class="selfRef">Figure 20</a>:
<a href="#name-schc-ack-req-format-2" class="selfRef">SCHC ACK REQ Format</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="SenderAbort">
<section id="section-8.3.4">
<h4 id="name-schc-sender-abort-format">
<a href="#section-8.3.4" class="section-number selfRef">8.3.4. </a><a href="#name-schc-sender-abort-format" class="section-name selfRef">SCHC Sender-Abort Format</a>
</h4>
<p id="section-8.3.4-1">When a SCHC Fragment sender needs to abort an ongoing fragmented SCHC Packet transmission, it sends a SCHC Sender-Abort message to the SCHC Fragment receiver.<a href="#section-8.3.4-1" class="pilcrow">¶</a></p>
<p id="section-8.3.4-2">The SCHC Sender-Abort format is shown in <a href="#Fig-SenderAbort" class="xref">Figure 21</a>.
The DTag field and the W field are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.
The FCN field is all ones.<a href="#section-8.3.4-2" class="pilcrow">¶</a></p>
<span id="name-schc-sender-abort-format-2"></span><div id="Fig-SenderAbort">
<figure id="figure-21">
<div class="artwork art-text alignLeft" id="section-8.3.4-3.1">
<pre>
|--- Sender-Abort Header ----|
|-- T --|-M-|-- N --|
+-- ... -+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~
| RuleID | DTag | W | 11..1 | padding (as needed)
+-- ... -+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~</pre>
</div>
<figcaption><a href="#figure-21" class="selfRef">Figure 21</a>:
<a href="#name-schc-sender-abort-format-2" class="selfRef">SCHC Sender-Abort Format</a>
</figcaption></figure>
</div>
<p id="section-8.3.4-4">If the W field is present:<a href="#section-8.3.4-4" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.3.4-5.1">the fragment sender <span class="bcp14">MUST</span> set it to all ones.
Other values are RESERVED.<a href="#section-8.3.4-5.1" class="pilcrow">¶</a>
</li>
<li id="section-8.3.4-5.2">the fragment receiver <span class="bcp14">MUST</span> check its value.
If the value is different from all ones, the message <span class="bcp14">MUST</span> be ignored.<a href="#section-8.3.4-5.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.3.4-6">The SCHC Sender-Abort <span class="bcp14">MUST NOT</span> be acknowledged.<a href="#section-8.3.4-6" class="pilcrow">¶</a></p>
</section>
</div>
<div id="schc-receiver-abort-format">
<section id="section-8.3.5">
<h4 id="name-schc-receiver-abort-format">
<a href="#section-8.3.5" class="section-number selfRef">8.3.5. </a><a href="#name-schc-receiver-abort-format" class="section-name selfRef">SCHC Receiver-Abort Format</a>
</h4>
<p id="section-8.3.5-1">When a SCHC Fragment receiver needs to abort an ongoing fragmented SCHC Packet transmission, it transmits a SCHC Receiver-Abort message to the SCHC Fragment sender.<a href="#section-8.3.5-1" class="pilcrow">¶</a></p>
<p id="section-8.3.5-2">The SCHC Receiver-Abort format is shown in <a href="#Fig-ReceiverAbort" class="xref">Figure 22</a>.
The DTag field and the W field are <span class="bcp14">OPTIONAL</span>, their presence is specified by each mode and Profile.<a href="#section-8.3.5-2" class="pilcrow">¶</a></p>
<span id="name-schc-receiver-abort-format-2"></span><div id="Fig-ReceiverAbort">
<figure id="figure-22">
<div class="artwork art-text alignLeft" id="section-8.3.5-3.1">
<pre>
|-- Receiver-Abort Header ---|
|--- T ---|-M-| 1 |
+--- ... --+-- ... --+---+---+-+-+-+-+-+-+-+-+-+-+-+
| RuleID | DTag | W |C=1| 1..1| 1..1 |
+--- ... --+-- ... --+---+---+-+-+-+-+-+-+-+-+-+-+-+
next L2 Word boundary ->|<-- L2 Word -->|</pre>
</div>
<figcaption><a href="#figure-22" class="selfRef">Figure 22</a>:
<a href="#name-schc-receiver-abort-format-2" class="selfRef">SCHC Receiver-Abort Format</a>
</figcaption></figure>
</div>
<p id="section-8.3.5-4">If the W field is present:<a href="#section-8.3.5-4" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.3.5-5.1">the fragment receiver <span class="bcp14">MUST</span> set it to all ones.
Other values are RESERVED.<a href="#section-8.3.5-5.1" class="pilcrow">¶</a>
</li>
<li id="section-8.3.5-5.2">if the value is different from all ones, the fragment sender <span class="bcp14">MUST</span> ignore the message.<a href="#section-8.3.5-5.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.3.5-6">The SCHC Receiver-Abort has the same header as a SCHC ACK message.
The bits that follow the SCHC Receiver-Abort Header <span class="bcp14">MUST</span> be as follows:<a href="#section-8.3.5-6" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.3.5-7.1">if the Header does not end at an L2 Word boundary, append bits set to 1 as needed to reach the next L2 Word boundary.<a href="#section-8.3.5-7.1" class="pilcrow">¶</a>
</li>
<li id="section-8.3.5-7.2">append exactly one more L2 Word with bits all set to ones.<a href="#section-8.3.5-7.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.3.5-8">Such a bit pattern never occurs in a legitimate SCHC ACK. This is how the fragment sender recognizes a SCHC Receiver-Abort.<a href="#section-8.3.5-8" class="pilcrow">¶</a></p>
<p id="section-8.3.5-9">The SCHC Receiver-Abort <span class="bcp14">MUST NOT</span> be acknowledged.<a href="#section-8.3.5-9" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="FragModes">
<section id="section-8.4">
<h3 id="name-schc-f-r-modes">
<a href="#section-8.4" class="section-number selfRef">8.4. </a><a href="#name-schc-f-r-modes" class="section-name selfRef">SCHC F/R Modes</a>
</h3>
<p id="section-8.4-1">This specification includes several SCHC F/R modes that:<a href="#section-8.4-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4-2.1">allow for a range of reliability options, such as optional SCHC Fragment retransmission.<a href="#section-8.4-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4-2.2">support various LPWAN characteristics, such as links with variable MTU or unidirectional links.<a href="#section-8.4-2.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4-3">More modes may be defined in the future.<a href="#section-8.4-3" class="pilcrow">¶</a></p>
<p id="section-8.4-4"><a href="#FragExamples" class="xref">Appendix B</a> provides examples of fragmentation sessions based on the modes described hereafter.<a href="#section-8.4-4" class="pilcrow">¶</a></p>
<p id="section-8.4-5"><a href="#FSM" class="xref">Appendix C</a> provides examples of Finite State Machines implementing the SCHC F/R modes described hereafter.<a href="#section-8.4-5" class="pilcrow">¶</a></p>
<div id="No-ACK-subsection">
<section id="section-8.4.1">
<h4 id="name-no-ack-mode">
<a href="#section-8.4.1" class="section-number selfRef">8.4.1. </a><a href="#name-no-ack-mode" class="section-name selfRef">No-ACK Mode</a>
</h4>
<p id="section-8.4.1-1">The No-ACK mode has been designed under the assumption that data unit out-of-sequence delivery does not occur between the entity performing fragmentation and the entity performing reassembly.
This mode supports L2 technologies that have a variable MTU.<a href="#section-8.4.1-1" class="pilcrow">¶</a></p>
<p id="section-8.4.1-2">In No-ACK mode, there is no communication from the fragment receiver to the fragment sender.
The sender transmits all the SCHC Fragments without expecting any acknowledgement.
Therefore, No-ACK does not require bidirectional links: unidirectional links are just fine.<a href="#section-8.4.1-2" class="pilcrow">¶</a></p>
<p id="section-8.4.1-3">In No-ACK mode, only the All-1 SCHC Fragment is padded as needed. The other SCHC Fragments are intrinsically aligned to L2 Words.<a href="#section-8.4.1-3" class="pilcrow">¶</a></p>
<p id="section-8.4.1-4">The tile sizes are not required to be uniform.
Windows are not used.
The Retransmission Timer is not used.
The Attempts counter is not used.<a href="#section-8.4.1-4" class="pilcrow">¶</a></p>
<p id="section-8.4.1-5">Each Profile <span class="bcp14">MUST</span> specify which RuleID value(s) corresponds to SCHC F/R messages operating in this mode.<a href="#section-8.4.1-5" class="pilcrow">¶</a></p>
<p id="section-8.4.1-6">The W field <span class="bcp14">MUST NOT</span> be present in the SCHC F/R messages.
SCHC ACK <span class="bcp14">MUST NOT</span> be sent.
SCHC ACK REQ <span class="bcp14">MUST NOT</span> be sent.
SCHC Sender-Abort <span class="bcp14">MAY</span> be sent.
SCHC Receiver-Abort <span class="bcp14">MUST NOT</span> be sent.<a href="#section-8.4.1-6" class="pilcrow">¶</a></p>
<p id="section-8.4.1-7">The value of N (size of the FCN field) is <span class="bcp14">RECOMMENDED</span> to be 1.<a href="#section-8.4.1-7" class="pilcrow">¶</a></p>
<p id="section-8.4.1-8">Each Profile, for each RuleID value, <span class="bcp14">MUST</span> define:<a href="#section-8.4.1-8" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.1-9.1">the size of the DTag field,<a href="#section-8.4.1-9.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1-9.2">the size and algorithm for the RCS field, and<a href="#section-8.4.1-9.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1-9.3">the expiration time of the Inactivity Timer.<a href="#section-8.4.1-9.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.1-10">Each Profile, for each RuleID value, <span class="bcp14">MAY</span> define<a href="#section-8.4.1-10" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.1-11.1">a value of N different from the recommended one, and<a href="#section-8.4.1-11.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1-11.2">the meaning of values sent in the FCN field, for values different from the All-1 value.<a href="#section-8.4.1-11.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.1-12">For each active pair of RuleID and DTag values, the receiver <span class="bcp14">MUST</span> maintain an Inactivity Timer.
If the receiver is under-resourced to do this, it <span class="bcp14">MUST</span> silently drop the related messages.<a href="#section-8.4.1-12" class="pilcrow">¶</a></p>
<div id="sender-behavior">
<section id="section-8.4.1.1">
<h5 id="name-sender-behavior">
<a href="#section-8.4.1.1" class="section-number selfRef">8.4.1.1. </a><a href="#name-sender-behavior" class="section-name selfRef">Sender Behavior</a>
</h5>
<p id="section-8.4.1.1-1">At the beginning of the fragmentation of a new SCHC Packet, the fragment sender <span class="bcp14">MUST</span> select a RuleID and DTag value pair for this SCHC Packet.<a href="#section-8.4.1.1-1" class="pilcrow">¶</a></p>
<p id="section-8.4.1.1-2">Each SCHC Fragment <span class="bcp14">MUST</span> contain exactly one tile in its Payload.
The tile <span class="bcp14">MUST</span> be at least the size of an L2 Word.
The sender <span class="bcp14">MUST</span> transmit the SCHC Fragments messages in the order that the tiles appear in the SCHC Packet.
Except for the last tile of a SCHC Packet, each tile <span class="bcp14">MUST</span> be of a size
that complements the SCHC Fragment Header so
that the SCHC Fragment is a multiple of L2 Words without the need for padding bits.
Except for the last one, the SCHC Fragments <span class="bcp14">MUST</span> use the Regular SCHC Fragment format specified in <a href="#NotLastFrag" class="xref">Section 8.3.1.1</a>.
The SCHC Fragment that carries the last tile <span class="bcp14">MUST</span> be an All-1 SCHC Fragment, described in <a href="#LastFrag" class="xref">Section 8.3.1.2</a>.<a href="#section-8.4.1.1-2" class="pilcrow">¶</a></p>
<p id="section-8.4.1.1-3">The sender <span class="bcp14">MAY</span> transmit a SCHC Sender-Abort.<a href="#section-8.4.1.1-3" class="pilcrow">¶</a></p>
<p id="section-8.4.1.1-4"><a href="#Fig-NoACKModeSnd" class="xref">Figure 39</a> shows an example of a corresponding state machine.<a href="#section-8.4.1.1-4" class="pilcrow">¶</a></p>
</section>
</div>
<div id="receiver-behavior">
<section id="section-8.4.1.2">
<h5 id="name-receiver-behavior">
<a href="#section-8.4.1.2" class="section-number selfRef">8.4.1.2. </a><a href="#name-receiver-behavior" class="section-name selfRef">Receiver Behavior</a>
</h5>
<p id="section-8.4.1.2-1">Upon receiving each Regular SCHC Fragment:<a href="#section-8.4.1.2-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.1.2-2.1">the receiver <span class="bcp14">MUST</span> reset the Inactivity Timer.<a href="#section-8.4.1.2-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1.2-2.2">the receiver assembles the payloads of the SCHC Fragments.<a href="#section-8.4.1.2-2.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.1.2-3">On receiving an All-1 SCHC Fragment:<a href="#section-8.4.1.2-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.1.2-4.1">the receiver <span class="bcp14">MUST</span> append the All-1 SCHC Fragment Payload and the padding bits to the
previously received SCHC Fragment Payloads for this SCHC Packet.<a href="#section-8.4.1.2-4.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1.2-4.2">the receiver <span class="bcp14">MUST</span> perform the integrity check.<a href="#section-8.4.1.2-4.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1.2-4.3">if integrity checking fails,
the receiver <span class="bcp14">MUST</span> drop the reassembled SCHC Packet.<a href="#section-8.4.1.2-4.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.1.2-4.4">the reassembly operation concludes.<a href="#section-8.4.1.2-4.4" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.1.2-5">On expiration of the Inactivity Timer,
the receiver <span class="bcp14">MUST</span> drop the SCHC Packet being reassembled.<a href="#section-8.4.1.2-5" class="pilcrow">¶</a></p>
<p id="section-8.4.1.2-6">On receiving a SCHC Sender-Abort,
the receiver <span class="bcp14">MAY</span> drop the SCHC Packet being reassembled.<a href="#section-8.4.1.2-6" class="pilcrow">¶</a></p>
<p id="section-8.4.1.2-7"><a href="#Fig-NoACKModeRcv" class="xref">Figure 40</a> shows an example of a corresponding state machine.<a href="#section-8.4.1.2-7" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="ACK-Always-subsection">
<section id="section-8.4.2">
<h4 id="name-ack-always-mode">
<a href="#section-8.4.2" class="section-number selfRef">8.4.2. </a><a href="#name-ack-always-mode" class="section-name selfRef">ACK-Always Mode</a>
</h4>
<p id="section-8.4.2-1">The ACK-Always mode has been designed under the following assumptions:<a href="#section-8.4.2-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2-2.1">Data unit out-of-sequence delivery does not occur between the entity performing fragmentation and the entity performing reassembly,<a href="#section-8.4.2-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-2.2">The L2 MTU value does not change while the fragments of a SCHC Packet are being transmitted, and<a href="#section-8.4.2-2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-2.3">There is a feedback path from the reassembler to the fragmenter.
See <a href="#AsymLinks" class="xref">Appendix F</a> for a discussion on using ACK-Always mode on quasi-bidirectional links.<a href="#section-8.4.2-2.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2-3">In ACK-Always mode, windows are used.
An acknowledgement, positive or negative, is transmitted by the fragment receiver to the fragment sender at the end of the transmission of each window of SCHC Fragments.<a href="#section-8.4.2-3" class="pilcrow">¶</a></p>
<p id="section-8.4.2-4">The tiles are not required to be of uniform size. In ACK-Always mode, only the All-1 SCHC Fragment is padded as needed. The other SCHC Fragments are intrinsically aligned to L2 Words.<a href="#section-8.4.2-4" class="pilcrow">¶</a></p>
<p id="section-8.4.2-5">Briefly, the algorithm is as follows: after a first blind transmission of all the tiles of a window, the fragment sender iterates retransmitting the tiles that are reported missing until the fragment receiver reports that all the tiles belonging to the window have been correctly received or until too many attempts were made.
The fragment sender only advances to the next window of tiles when it has ascertained that all the tiles belonging to the current window have been fully and correctly received. This results in a per-window lock-step behavior between the sender and the receiver.<a href="#section-8.4.2-5" class="pilcrow">¶</a></p>
<p id="section-8.4.2-6">Each Profile <span class="bcp14">MUST</span> specify which RuleID value(s) correspond to SCHC F/R messages operating in this mode.<a href="#section-8.4.2-6" class="pilcrow">¶</a></p>
<p id="section-8.4.2-7">The W field <span class="bcp14">MUST</span> be present and its size M <span class="bcp14">MUST</span> be 1 bit.<a href="#section-8.4.2-7" class="pilcrow">¶</a></p>
<p id="section-8.4.2-8">Each Profile, for each RuleID value, <span class="bcp14">MUST</span> define:<a href="#section-8.4.2-8" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2-9.1">the value of N,<a href="#section-8.4.2-9.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.2">the value of WINDOW_SIZE, which <span class="bcp14">MUST</span> be strictly less than 2^N,<a href="#section-8.4.2-9.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.3">the size and algorithm for the RCS field,<a href="#section-8.4.2-9.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.4">the value of T,<a href="#section-8.4.2-9.4" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.5">the value of MAX_ACK_REQUESTS,<a href="#section-8.4.2-9.5" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.6">the expiration time of the Retransmission Timer, and<a href="#section-8.4.2-9.6" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-9.7">the expiration time of the Inactivity Timer.<a href="#section-8.4.2-9.7" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2-10">For each active pair of RuleID and DTag values, the sender <span class="bcp14">MUST</span> maintain:<a href="#section-8.4.2-10" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2-11.1">one Attempts counter<a href="#section-8.4.2-11.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-11.2">one Retransmission Timer<a href="#section-8.4.2-11.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2-12">For each active pair of RuleID and DTag values, the receiver <span class="bcp14">MUST</span> maintain<a href="#section-8.4.2-12" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2-13.1">one Inactivity Timer, and<a href="#section-8.4.2-13.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2-13.2">one Attempts counter.<a href="#section-8.4.2-13.2" class="pilcrow">¶</a>
</li>
</ul>
<div id="sender-behavior-1">
<section id="section-8.4.2.1">
<h5 id="name-sender-behavior-2">
<a href="#section-8.4.2.1" class="section-number selfRef">8.4.2.1. </a><a href="#name-sender-behavior-2" class="section-name selfRef">Sender Behavior</a>
</h5>
<p id="section-8.4.2.1-1">At the beginning of the fragmentation of a new SCHC Packet, the fragment sender <span class="bcp14">MUST</span> select a RuleID and DTag value pair for this SCHC Packet.<a href="#section-8.4.2.1-1" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-2">Each SCHC Fragment <span class="bcp14">MUST</span> contain exactly one tile in its Payload.
All tiles with the index 0, as well as the last tile, <span class="bcp14">MUST</span> be at least the size of an L2 Word.<a href="#section-8.4.2.1-2" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-3">In all SCHC Fragment messages, the W field <span class="bcp14">MUST</span> be filled with the LSB of the window number that the sender is currently processing.<a href="#section-8.4.2.1-3" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-4">For a SCHC Fragment that carries a tile other than the last one of the SCHC Packet:<a href="#section-8.4.2.1-4" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.1-5.1">the Fragment <span class="bcp14">MUST</span> be of the Regular type specified in <a href="#NotLastFrag" class="xref">Section 8.3.1.1</a>.<a href="#section-8.4.2.1-5.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-5.2">the FCN field <span class="bcp14">MUST</span> contain the tile index.<a href="#section-8.4.2.1-5.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-5.3">each tile <span class="bcp14">MUST</span> be of a size
that complements the SCHC Fragment Header so
that the SCHC Fragment is a multiple of L2 Words without the need for padding bits.<a href="#section-8.4.2.1-5.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2.1-6">The SCHC Fragment that carries the last tile <span class="bcp14">MUST</span> be an All-1 SCHC Fragment, described in <a href="#LastFrag" class="xref">Section 8.3.1.2</a>.<a href="#section-8.4.2.1-6" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-7">The fragment sender <span class="bcp14">MUST</span> start by transmitting the window numbered 0.<a href="#section-8.4.2.1-7" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-8">All message receptions being discussed in the rest of this section are to be understood as
"matching the RuleID and DTag pair being processed", even if not spelled out, for brevity.<a href="#section-8.4.2.1-8" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-9">The sender starts by a "blind transmission" phase, in which it <span class="bcp14">MUST</span> transmit all the tiles composing the window, in decreasing tile index order.<a href="#section-8.4.2.1-9" class="pilcrow">¶</a></p>
<p id="section-8.4.2.1-10">Then, it enters a "retransmission phase" in which
it <span class="bcp14">MUST</span> initialize an Attempts counter to 0,
it <span class="bcp14">MUST</span> start a Retransmission Timer
and it <span class="bcp14">MUST</span> await a SCHC ACK.<a href="#section-8.4.2.1-10" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.1-11.1">
<p id="section-8.4.2.1-11.1.1">Then, upon receiving a SCHC ACK:<a href="#section-8.4.2.1-11.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.1-11.1.2.1">if the SCHC ACK indicates that some tiles are missing at the receiver, then
the sender <span class="bcp14">MUST</span> transmit all the tiles that have been reported missing,
it <span class="bcp14">MUST</span> increment Attempts,
it <span class="bcp14">MUST</span> reset the Retransmission Timer,
and <span class="bcp14">MUST</span> await the next SCHC ACK.<a href="#section-8.4.2.1-11.1.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-11.1.2.2">if the current window is not the last one and the SCHC ACK indicates that all tiles were correctly received,
the sender <span class="bcp14">MUST</span> stop the Retransmission Timer,
it <span class="bcp14">MUST</span> advance to the next fragmentation window,
and it <span class="bcp14">MUST</span> start a blind transmission phase as described above.<a href="#section-8.4.2.1-11.1.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-11.1.2.3">if the current window is the last one and the SCHC ACK indicates that more tiles were received than the sender sent,
the fragment sender <span class="bcp14">MUST</span> send a SCHC Sender-Abort,
and it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.2.1-11.1.2.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-11.1.2.4">if the current window is the last one and the
SCHC ACK indicates that all tiles were correctly
received, yet the integrity check was a failure,
the fragment sender <span class="bcp14">MUST</span> send a SCHC Sender-Abort,
and it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.2.1-11.1.2.4" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-11.1.2.5">if the current window is the last one and the SCHC ACK indicates that integrity checking was successful,
the sender exits successfully.<a href="#section-8.4.2.1-11.1.2.5" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-8.4.2.1-11.2">
<p id="section-8.4.2.1-11.2.1">on Retransmission Timer expiration:<a href="#section-8.4.2.1-11.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.1-11.2.2.1">if Attempts is strictly less that MAX_ACK_REQUESTS,
the fragment sender <span class="bcp14">MUST</span> send a SCHC ACK REQ
and <span class="bcp14">MUST</span> increment the Attempts counter.<a href="#section-8.4.2.1-11.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-11.2.2.2">otherwise,
the fragment sender <span class="bcp14">MUST</span> send a SCHC Sender-Abort,
and it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.2.1-11.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.2.1-12">At any time:<a href="#section-8.4.2.1-12" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.1-13.1">on receiving a SCHC Receiver-Abort, the fragment sender <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.2.1-13.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.1-13.2">on receiving a SCHC ACK that bears a W value different from the W value that it currently uses, the fragment sender <span class="bcp14">MUST</span> silently discard and ignore that SCHC ACK.<a href="#section-8.4.2.1-13.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2.1-14"><a href="#Fig-ACKAlwaysSnd" class="xref">Figure 41</a> shows an example of a corresponding state machine.<a href="#section-8.4.2.1-14" class="pilcrow">¶</a></p>
</section>
</div>
<div id="receiver-behavior-1">
<section id="section-8.4.2.2">
<h5 id="name-receiver-behavior-2">
<a href="#section-8.4.2.2" class="section-number selfRef">8.4.2.2. </a><a href="#name-receiver-behavior-2" class="section-name selfRef">Receiver Behavior</a>
</h5>
<p id="section-8.4.2.2-1">On receiving a SCHC Fragment with a RuleID and DTag pair not being processed at that time:<a href="#section-8.4.2.2-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-2.1">the receiver <span class="bcp14">SHOULD</span> check if the DTag value has not recently been used for that RuleID value,
thereby ensuring that the received SCHC Fragment is not a remnant of a prior fragmented SCHC Packet transmission.
The initial value of the Inactivity Timer is the <span class="bcp14">RECOMMENDED</span> lifetime for the DTag value at the receiver.
If the SCHC Fragment is determined to be such a remnant, the receiver <span class="bcp14">MAY</span> silently ignore it and discard it.<a href="#section-8.4.2.2-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-2.2">the receiver <span class="bcp14">MUST</span> start a process to assemble a new SCHC Packet with that RuleID and DTag value pair.<a href="#section-8.4.2.2-2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-2.3">the receiver <span class="bcp14">MUST</span> start an Inactivity Timer for that RuleID and DTag pair.
It <span class="bcp14">MUST</span> initialize an Attempts counter to 0 for that RuleID and DTag pair.
It <span class="bcp14">MUST</span> initialize a window counter to 0.
If the receiver is under-resourced to do this, it <span class="bcp14">MUST</span> respond to the sender with a SCHC Receiver-Abort.<a href="#section-8.4.2.2-2.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2.2-3">In the rest of this section, "local W bit" means the least significant bit of the window counter of the receiver.<a href="#section-8.4.2.2-3" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-4">On reception of any SCHC F/R message for the RuleID and DTag pair being processed, the receiver <span class="bcp14">MUST</span> reset the Inactivity Timer pertaining to that RuleID and DTag pair.<a href="#section-8.4.2.2-4" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-5">All message receptions being discussed in the rest of this section are to be understood as
"matching the RuleID and DTag pair being processed", even if not spelled out, for brevity.<a href="#section-8.4.2.2-5" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-6">The receiver <span class="bcp14">MUST</span> first initialize an empty Bitmap for the first window then
enter an "acceptance phase", in which:<a href="#section-8.4.2.2-6" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-7.1">on receiving a SCHC Fragment or a SCHC ACK REQ, either one having the W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> silently ignore and discard that message.<a href="#section-8.4.2.2-7.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-7.2">on receiving a SCHC ACK REQ with the W bit equal to the local W bit,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window.<a href="#section-8.4.2.2-7.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-7.3">
<p id="section-8.4.2.2-7.3.1">on receiving a SCHC Fragment with the W bit equal to the local W bit,
the receiver <span class="bcp14">MUST</span> assemble the received tile based on the window counter and on the FCN field in the SCHC Fragment,
and it <span class="bcp14">MUST</span> update the Bitmap.<a href="#section-8.4.2.2-7.3.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-7.3.2.1">if the SCHC Fragment received is an All-0 SCHC Fragment,
the current window is determined to be a not-last window,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window
and it <span class="bcp14">MUST</span> enter the "retransmission phase" for this window.<a href="#section-8.4.2.2-7.3.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-7.3.2.2">
<p id="section-8.4.2.2-7.3.2.2.1">if the SCHC Fragment received is an All-1 SCHC Fragment,
the current window is determined to be the last window,
the padding bits of the All-1 SCHC Fragment <span class="bcp14">MUST</span> be assembled after the received tile,
the receiver <span class="bcp14">MUST</span> perform the integrity check
and it <span class="bcp14">MUST</span> send a SCHC ACK for this window. Then:<a href="#section-8.4.2.2-7.3.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-7.3.2.2.2.1">If the integrity check indicates that the full SCHC Packet has been correctly reassembled,
the receiver <span class="bcp14">MUST</span> enter the "clean-up phase" for this window.<a href="#section-8.4.2.2-7.3.2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-7.3.2.2.2.2">If the integrity check indicates that the full SCHC Packet has not been correctly reassembled,
the receiver enters the "retransmission phase" for this window.<a href="#section-8.4.2.2-7.3.2.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.2.2-8">In the "retransmission phase":<a href="#section-8.4.2.2-8" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.1">
<p id="section-8.4.2.2-9.1.1">if the window is a not-last window:<a href="#section-8.4.2.2-9.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.1.2.1">on receiving a SCHC Fragment that is not All-0 or All-1 and that has a W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> increment its window counter and allocate a fresh Bitmap,
it <span class="bcp14">MUST</span> assemble the tile received and update the Bitmap,
and it <span class="bcp14">MUST</span> enter the "acceptance phase" for that new window.<a href="#section-8.4.2.2-9.1.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.1.2.2">on receiving a SCHC ACK REQ with a W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> increment its window counter and allocate a fresh Bitmap,
it <span class="bcp14">MUST</span> send a SCHC ACK for that new window,
and it <span class="bcp14">MUST</span> enter the "acceptance phase" for that new window.<a href="#section-8.4.2.2-9.1.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.1.2.3">on receiving a SCHC All-0 Fragment with a W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> increment its window counter and allocate a fresh Bitmap,
it <span class="bcp14">MUST</span> assemble the tile received and update the Bitmap,
it <span class="bcp14">MUST</span> send a SCHC ACK for that new window,
and it <span class="bcp14">MUST</span> stay in the "retransmission phase" for that new window.<a href="#section-8.4.2.2-9.1.2.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.1.2.4">
<p id="section-8.4.2.2-9.1.2.4.1">on receiving a SCHC All-1 Fragment with a W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> increment its window counter and allocate a fresh Bitmap;
it <span class="bcp14">MUST</span> assemble the tile received,
including the padding bits;
it <span class="bcp14">MUST</span> update the Bitmap and perform the integrity check;
it <span class="bcp14">MUST</span> send a SCHC ACK for the new window,
which is determined to be the last window. Then:<a href="#section-8.4.2.2-9.1.2.4.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.1.2.4.2.1">If the integrity check indicates that the full SCHC Packet has been correctly reassembled,
the receiver <span class="bcp14">MUST</span> enter the "clean-up phase" for that new window.<a href="#section-8.4.2.2-9.1.2.4.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.1.2.4.2.2">If the integrity check indicates that the full SCHC Packet has not been correctly reassembled,
the receiver enters the "retransmission phase" for that new window.<a href="#section-8.4.2.2-9.1.2.4.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-8.4.2.2-9.1.2.5">
<p id="section-8.4.2.2-9.1.2.5.1">on receiving a SCHC Fragment with a W bit equal to the local W bit:<a href="#section-8.4.2.2-9.1.2.5.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.1.2.5.2.1">if the SCHC Fragment received is an All-1 SCHC Fragment,
the receiver <span class="bcp14">MUST</span> silently ignore it and discard it.<a href="#section-8.4.2.2-9.1.2.5.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.1.2.5.2.2">otherwise,
the receiver <span class="bcp14">MUST</span> assemble the tile received and update the Bitmap.
If the Bitmap becomes fully populated with 1's or if the SCHC Fragment is an All-0,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window.<a href="#section-8.4.2.2-9.1.2.5.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-8.4.2.2-9.1.2.6">on receiving a SCHC ACK REQ with the W bit equal to the local W bit,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window.<a href="#section-8.4.2.2-9.1.2.6" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-8.4.2.2-9.2">
<p id="section-8.4.2.2-9.2.1">if the window is the last window:<a href="#section-8.4.2.2-9.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.2.2.1">on receiving a SCHC Fragment or a SCHC ACK REQ, either one having a W bit different from the local W bit,
the receiver <span class="bcp14">MUST</span> silently ignore and discard that message.<a href="#section-8.4.2.2-9.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.2.2.2">on receiving a SCHC ACK REQ with the W bit equal to the local W bit,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window.<a href="#section-8.4.2.2-9.2.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.2.2.3">
<p id="section-8.4.2.2-9.2.2.3.1">on receiving a SCHC Fragment with a W bit equal to the local W bit:<a href="#section-8.4.2.2-9.2.2.3.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.2.2.3.2.1">if the SCHC Fragment received is an All-0 SCHC Fragment,
the receiver <span class="bcp14">MUST</span> silently ignore it and discard it.<a href="#section-8.4.2.2-9.2.2.3.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.2.2.3.2.2">
<p id="section-8.4.2.2-9.2.2.3.2.2.1">otherwise, the receiver <span class="bcp14">MUST</span> update the Bitmap,
and it <span class="bcp14">MUST</span> assemble the tile received.
If the SCHC Fragment received is an All-1 SCHC Fragment,
the receiver <span class="bcp14">MUST</span> assemble the padding bits of the All-1 SCHC Fragment after the received tile,
it <span class="bcp14">MUST</span> perform the integrity check and:<a href="#section-8.4.2.2-9.2.2.3.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.2.2.3.2.2.2.1">if the integrity check indicates that the full SCHC Packet has been correctly reassembled,
the receiver <span class="bcp14">MUST</span> send a SCHC ACK
and it enters the "clean-up phase".<a href="#section-8.4.2.2-9.2.2.3.2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-9.2.2.3.2.2.2.2">
<p id="section-8.4.2.2-9.2.2.3.2.2.2.2.1">if the integrity check indicates that the full SCHC Packet has not been correctly reassembled:<a href="#section-8.4.2.2-9.2.2.3.2.2.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-9.2.2.3.2.2.2.2.2.1">if the SCHC Fragment received was an All-1 SCHC Fragment, the receiver <span class="bcp14">MUST</span> send a SCHC ACK for this window.<a href="#section-8.4.2.2-9.2.2.3.2.2.2.2.2.1" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.2.2-10">In the "clean-up phase":<a href="#section-8.4.2.2-10" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.2.2-11.1">On receiving an All-1 SCHC Fragment or a SCHC ACK REQ, either one having the W bit equal to the local W bit, the receiver <span class="bcp14">MUST</span> send a SCHC ACK.<a href="#section-8.4.2.2-11.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.2.2-11.2">Any other SCHC Fragment received <span class="bcp14">MUST</span> be silently ignored and discarded.<a href="#section-8.4.2.2-11.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.2.2-12">At any time,
on sending a SCHC ACK,
the receiver <span class="bcp14">MUST</span> increment the Attempts counter.<a href="#section-8.4.2.2-12" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-13">At any time,
on incrementing its window counter,
the receiver <span class="bcp14">MUST</span> reset the Attempts counter.<a href="#section-8.4.2.2-13" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-14">At any time,
on expiration of the Inactivity Timer,
on receiving a SCHC Sender-Abort or
when Attempts reaches MAX_ACK_REQUESTS,
the receiver <span class="bcp14">MUST</span> send a SCHC Receiver-Abort,
and it <span class="bcp14">MAY</span> exit the receive process for that SCHC Packet.<a href="#section-8.4.2.2-14" class="pilcrow">¶</a></p>
<p id="section-8.4.2.2-15"><a href="#Fig-ACKAlwaysRcv" class="xref">Figure 42</a> shows an example of a corresponding state machine.<a href="#section-8.4.2.2-15" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="ACK-on-Error-subsection">
<section id="section-8.4.3">
<h4 id="name-ack-on-error-mode">
<a href="#section-8.4.3" class="section-number selfRef">8.4.3. </a><a href="#name-ack-on-error-mode" class="section-name selfRef">ACK-on-Error Mode</a>
</h4>
<p id="section-8.4.3-1">The ACK-on-Error mode supports L2 technologies that have variable MTU and out-of-order delivery.
It requires an L2 that provides a feedback path from the reassembler to the fragmenter.
See <a href="#AsymLinks" class="xref">Appendix F</a> for a discussion on using ACK-on-Error mode on quasi-bidirectional links.<a href="#section-8.4.3-1" class="pilcrow">¶</a></p>
<p id="section-8.4.3-2">In ACK-on-Error mode, windows are used.<a href="#section-8.4.3-2" class="pilcrow">¶</a></p>
<p id="section-8.4.3-3">All tiles except the last one and the penultimate one <span class="bcp14">MUST</span> be of equal size, hereafter called "regular".
The size of the last tile <span class="bcp14">MUST</span> be smaller than or equal to the regular tile size.
Regarding the penultimate tile, a Profile <span class="bcp14">MUST</span> pick one of the following two options:<a href="#section-8.4.3-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3-4.1">The penultimate tile size <span class="bcp14">MUST</span> be the
regular tile size, or<a href="#section-8.4.3-4.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-4.2">the penultimate tile size <span class="bcp14">MUST</span> be either the regular tile size or the regular tile size minus one L2 Word.<a href="#section-8.4.3-4.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3-5">A SCHC Fragment message carries one or several contiguous tiles, which may span multiple windows.
A SCHC ACK reports on the reception of exactly one window of tiles.<a href="#section-8.4.3-5" class="pilcrow">¶</a></p>
<p id="section-8.4.3-6">See <a href="#Fig-TilesACKonError" class="xref">Figure 23</a> for an example.<a href="#section-8.4.3-6" class="pilcrow">¶</a></p>
<span id="name-schc-packet-fragmented-in-til"></span><div id="Fig-TilesACKonError">
<figure id="figure-23">
<div class="artwork art-text alignLeft" id="section-8.4.3-7.1">
<pre>
+---------------------------------------------...-----------+
| SCHC Packet |
+---------------------------------------------...-----------+
Tile# | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 |3|
Window# |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|- 28-|
SCHC Fragment msg |-----------|</pre>
</div>
<figcaption><a href="#figure-23" class="selfRef">Figure 23</a>:
<a href="#name-schc-packet-fragmented-in-til" class="selfRef">SCHC Packet Fragmented in Tiles, ACK-on-Error Mode</a>
</figcaption></figure>
</div>
<p id="section-8.4.3-8">The W field is wide enough that it unambiguously represents an absolute window number.
The fragment receiver sends SCHC ACKs to the fragment sender about windows for which tiles are missing.
No SCHC ACK is sent by the fragment receiver for windows that it knows have been fully received.<a href="#section-8.4.3-8" class="pilcrow">¶</a></p>
<p id="section-8.4.3-9">The fragment sender retransmits SCHC Fragments for tiles that are reported missing.
It can advance to next windows even before it has ascertained that all tiles belonging to previous windows have been correctly received,
and it can still later retransmit SCHC Fragments with tiles belonging to previous windows.
Therefore, the sender and the receiver may operate in a decoupled fashion.
The fragmented SCHC Packet transmission concludes when:<a href="#section-8.4.3-9" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3-10.1">integrity checking shows that the fragmented SCHC Packet has been correctly reassembled at the receive end,
and this information has been conveyed back to the sender, or<a href="#section-8.4.3-10.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-10.2">too many retransmission attempts were made, or<a href="#section-8.4.3-10.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-10.3">the receiver determines that the transmission of this fragmented SCHC Packet has been inactive for too long.<a href="#section-8.4.3-10.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3-11">Each Profile <span class="bcp14">MUST</span> specify which RuleID value(s) corresponds to SCHC F/R messages operating in this mode.<a href="#section-8.4.3-11" class="pilcrow">¶</a></p>
<p id="section-8.4.3-12">The W field <span class="bcp14">MUST</span> be present in the SCHC F/R messages.<a href="#section-8.4.3-12" class="pilcrow">¶</a></p>
<p id="section-8.4.3-13">Each Profile, for each RuleID value, <span class="bcp14">MUST</span> define:<a href="#section-8.4.3-13" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3-14.1">the tile size (a tile does not need to be multiple of an L2 Word, but it <span class="bcp14">MUST</span> be at least the size of an L2 Word),<a href="#section-8.4.3-14.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.2">the value of M,<a href="#section-8.4.3-14.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.3">the value of N,<a href="#section-8.4.3-14.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.4">the value of WINDOW_SIZE, which <span class="bcp14">MUST</span> be strictly less than 2^N,<a href="#section-8.4.3-14.4" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.5">the size and algorithm for the RCS field,<a href="#section-8.4.3-14.5" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.6">the value of T,<a href="#section-8.4.3-14.6" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.7">the value of MAX_ACK_REQUESTS,<a href="#section-8.4.3-14.7" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.8">the expiration time of the Retransmission Timer,<a href="#section-8.4.3-14.8" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.9">the expiration time of the Inactivity Timer,<a href="#section-8.4.3-14.9" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.10">if the last tile is carried in a Regular SCHC Fragment or an All-1 SCHC Fragment (see <a href="#ACK-on-Error-sender" class="xref">Section 8.4.3.1</a>), and<a href="#section-8.4.3-14.10" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-14.11">if the penultimate tile <span class="bcp14">MAY</span> be one L2 Word smaller than the regular tile size. In this case, the regular tile size <span class="bcp14">MUST</span> be at least twice the L2 Word size.<a href="#section-8.4.3-14.11" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3-15">For each active pair of RuleID and DTag values, the sender <span class="bcp14">MUST</span> maintain:<a href="#section-8.4.3-15" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3-16.1">one Attempts counter, and<a href="#section-8.4.3-16.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-16.2">one Retransmission Timer.<a href="#section-8.4.3-16.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3-17">For each active pair of RuleID and DTag values, the receiver <span class="bcp14">MUST</span> maintain:<a href="#section-8.4.3-17" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3-18.1">one Inactivity Timer, and<a href="#section-8.4.3-18.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3-18.2">one Attempts counter.<a href="#section-8.4.3-18.2" class="pilcrow">¶</a>
</li>
</ul>
<div id="ACK-on-Error-sender">
<section id="section-8.4.3.1">
<h5 id="name-sender-behavior-3">
<a href="#section-8.4.3.1" class="section-number selfRef">8.4.3.1. </a><a href="#name-sender-behavior-3" class="section-name selfRef">Sender Behavior</a>
</h5>
<p id="section-8.4.3.1-1">At the beginning of the fragmentation of a new SCHC Packet:<a href="#section-8.4.3.1-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-2.1">the fragment sender <span class="bcp14">MUST</span> select a RuleID and DTag value pair for this SCHC Packet.
A Rule <span class="bcp14">MUST NOT</span> be selected if the values of M and WINDOW_SIZE for that Rule are such that the SCHC Packet cannot be fragmented in (2^M) * WINDOW_SIZE tiles or less.<a href="#section-8.4.3.1-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-2.2">the fragment sender <span class="bcp14">MUST</span> initialize the Attempts counter to 0 for that RuleID and DTag value pair.<a href="#section-8.4.3.1-2.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-3">A Regular SCHC Fragment message carries in its payload one or more tiles.
If more than one tile is carried in one Regular SCHC Fragment:<a href="#section-8.4.3.1-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-4.1">the selected tiles <span class="bcp14">MUST</span> be contiguous in the original SCHC Packet, and<a href="#section-8.4.3.1-4.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-4.2">they <span class="bcp14">MUST</span> be placed in the SCHC Fragment Payload adjacent to one another, in the order they appear in the SCHC Packet, from the start of the SCHC Packet toward its end.<a href="#section-8.4.3.1-4.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-5">Tiles that are not the last one <span class="bcp14">MUST</span> be sent in Regular SCHC Fragments specified in <a href="#NotLastFrag" class="xref">Section 8.3.1.1</a>.
The FCN field <span class="bcp14">MUST</span> contain the tile index of the first tile sent in that SCHC Fragment.<a href="#section-8.4.3.1-5" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-6">In a Regular SCHC Fragment message, the sender <span class="bcp14">MUST</span> fill the W field with the window number of the first tile sent in that SCHC Fragment.<a href="#section-8.4.3.1-6" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-7">A Profile <span class="bcp14">MUST</span> define if the last tile of a SCHC Packet is sent:<a href="#section-8.4.3.1-7" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-8.1">in a Regular SCHC Fragment, alone or as part of a multi-tiles Payload,<a href="#section-8.4.3.1-8.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-8.2">alone in an All-1 SCHC Fragment, or<a href="#section-8.4.3.1-8.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-8.3">with any of the above two methods.<a href="#section-8.4.3.1-8.3" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-9">In an All-1 SCHC Fragment message, the sender <span class="bcp14">MUST</span> fill the W field with the window number of the last tile of the SCHC Packet.<a href="#section-8.4.3.1-9" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-10">The fragment sender <span class="bcp14">MUST</span> send SCHC Fragments such that, all together, they contain all the tiles of the fragmented SCHC Packet.<a href="#section-8.4.3.1-10" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-11">The fragment sender <span class="bcp14">MUST</span> send at least one All-1 SCHC Fragment.<a href="#section-8.4.3.1-11" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-12">In doing the two items above, the sender <span class="bcp14">MUST</span> ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment.<a href="#section-8.4.3.1-12" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-13">The fragment sender <span class="bcp14">MUST</span> listen for SCHC ACK messages after having sent:<a href="#section-8.4.3.1-13" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-14.1">an All-1 SCHC Fragment, or<a href="#section-8.4.3.1-14.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-14.2">a SCHC ACK REQ.<a href="#section-8.4.3.1-14.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-15">A Profile <span class="bcp14">MAY</span> specify other times at which the fragment sender <span class="bcp14">MUST</span> listen for SCHC ACK messages.
For example, this could be after sending a complete window of tiles.<a href="#section-8.4.3.1-15" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-16">Each time a fragment sender sends an All-1 SCHC Fragment or a SCHC ACK REQ:<a href="#section-8.4.3.1-16" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-17.1">it <span class="bcp14">MUST</span> increment the Attempts counter, and<a href="#section-8.4.3.1-17.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-17.2">it <span class="bcp14">MUST</span> reset the Retransmission Timer.<a href="#section-8.4.3.1-17.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-18">On Retransmission Timer expiration:<a href="#section-8.4.3.1-18" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-19.1">if the Attempts counter is strictly less than MAX_ACK_REQUESTS,
the fragment sender <span class="bcp14">MUST</span> send
either the All-1 SCHC Fragment or
a SCHC ACK REQ with the W field corresponding to the last window,<a href="#section-8.4.3.1-19.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-19.2">otherwise, the fragment sender <span class="bcp14">MUST</span> send a SCHC Sender-Abort, and
it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.3.1-19.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.1-20">All message receptions being discussed in the rest of this section are to be understood as
"matching the RuleID and DTag pair being processed", even if not spelled out, for brevity.<a href="#section-8.4.3.1-20" class="pilcrow">¶</a></p>
<p id="section-8.4.3.1-21">On receiving a SCHC ACK:<a href="#section-8.4.3.1-21" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1">
<p id="section-8.4.3.1-22.1.1">if the W field in the SCHC ACK corresponds to the last window of the SCHC Packet:<a href="#section-8.4.3.1-22.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.1">if the C bit is set, the sender <span class="bcp14">MAY</span> exit successfully.<a href="#section-8.4.3.1-22.1.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2">
<p id="section-8.4.3.1-22.1.2.2.1">otherwise:<a href="#section-8.4.3.1-22.1.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.1">
<p id="section-8.4.3.1-22.1.2.2.2.1.1">if the Profile mandates that the last tile be sent in an All-1 SCHC Fragment:<a href="#section-8.4.3.1-22.1.2.2.2.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.1">
<p id="section-8.4.3.1-22.1.2.2.2.1.2.1.1">if the SCHC ACK shows no missing tile at the receiver, the sender:<a href="#section-8.4.3.1-22.1.2.2.2.1.2.1.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.1.2.1">
<span class="bcp14">MUST</span> send a SCHC Sender-Abort, and<a href="#section-8.4.3.1-22.1.2.2.2.1.2.1.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.1.2.2">
<span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.3.1-22.1.2.2.2.1.2.1.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.2">
<p id="section-8.4.3.1-22.1.2.2.2.1.2.2.1">otherwise:<a href="#section-8.4.3.1-22.1.2.2.2.1.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.2.2.1">the fragment sender <span class="bcp14">MUST</span> send SCHC Fragment messages containing all the tiles that are reported missing in the SCHC ACK.<a href="#section-8.4.3.1-22.1.2.2.2.1.2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.2.2.2">if the last of these SCHC Fragment messages is not an All-1 SCHC Fragment,
then the fragment sender <span class="bcp14">MUST</span> in addition send after it a SCHC ACK REQ with the W field corresponding to the last window.<a href="#section-8.4.3.1-22.1.2.2.2.1.2.2.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.1.2.2.2.3">in doing the two items above, the sender <span class="bcp14">MUST</span> ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment.<a href="#section-8.4.3.1-22.1.2.2.2.1.2.2.2.3" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.2">
<p id="section-8.4.3.1-22.1.2.2.2.2.1">otherwise:<a href="#section-8.4.3.1-22.1.2.2.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.2.2.1">if the SCHC ACK shows no missing tile at the receiver, the sender
<span class="bcp14">MUST</span> send the All-1 SCHC Fragment<a href="#section-8.4.3.1-22.1.2.2.2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.2.2.2">
<p id="section-8.4.3.1-22.1.2.2.2.2.2.2.1">otherwise:<a href="#section-8.4.3.1-22.1.2.2.2.2.2.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.1.2.2.2.2.2.2.2.1">the fragment sender <span class="bcp14">MUST</span> send SCHC Fragment messages containing all the tiles that are reported missing in the SCHC ACK.<a href="#section-8.4.3.1-22.1.2.2.2.2.2.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.1.2.2.2.2.2.2.2.2">the fragment sender <span class="bcp14">MUST</span> then send
either the All-1 SCHC Fragment or
a SCHC ACK REQ with the W field corresponding to the last window.<a href="#section-8.4.3.1-22.1.2.2.2.2.2.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li id="section-8.4.3.1-22.2">
<p id="section-8.4.3.1-22.2.1">otherwise, the fragment sender:<a href="#section-8.4.3.1-22.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.1-22.2.2.1">
<span class="bcp14">MUST</span> send SCHC Fragment messages containing the tiles that are reported missing in the SCHC ACK.<a href="#section-8.4.3.1-22.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.1-22.2.2.2">then, it <span class="bcp14">MAY</span> send a SCHC ACK REQ with the W field corresponding to the last window.<a href="#section-8.4.3.1-22.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.3.1-23">See <a href="#Fig-ACKonerrorSnd" class="xref">Figure 43</a> for one among several possible examples of a Finite State Machine implementing a sender behavior obeying this specification.<a href="#section-8.4.3.1-23" class="pilcrow">¶</a></p>
</section>
</div>
<div id="ACK-on-Error-receiver">
<section id="section-8.4.3.2">
<h5 id="name-receiver-behavior-3">
<a href="#section-8.4.3.2" class="section-number selfRef">8.4.3.2. </a><a href="#name-receiver-behavior-3" class="section-name selfRef">Receiver Behavior</a>
</h5>
<p id="section-8.4.3.2-1">On receiving a SCHC Fragment with a RuleID and DTag pair not being processed at that time:<a href="#section-8.4.3.2-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-2.1">the receiver <span class="bcp14">SHOULD</span> check if the DTag value has not recently been used for that RuleID value,
thereby ensuring that the received SCHC Fragment is not a remnant of a prior fragmented SCHC Packet transmission.
The initial value of the Inactivity Timer is the <span class="bcp14">RECOMMENDED</span> lifetime for the DTag value at the receiver.
If the SCHC Fragment is determined to be such a remnant, the receiver <span class="bcp14">MAY</span> silently ignore it and discard it.<a href="#section-8.4.3.2-2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-2.2">the receiver <span class="bcp14">MUST</span> start a process to assemble a new SCHC Packet with that RuleID and DTag value pair.
The receiver <span class="bcp14">MUST</span> start an Inactivity Timer for that RuleID and DTag value pair.
It <span class="bcp14">MUST</span> initialize an Attempts counter to 0 for that RuleID and DTag value pair.
If the receiver is under-resourced to do this, it <span class="bcp14">MUST</span> respond to the sender with a SCHC Receiver-Abort.<a href="#section-8.4.3.2-2.2" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.2-3">On reception of any SCHC F/R message for the RuleID and DTag pair being processed, the receiver <span class="bcp14">MUST</span> reset the Inactivity Timer pertaining to that RuleID and DTag pair.<a href="#section-8.4.3.2-3" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-4">All message receptions being discussed in the rest of this section are to be understood as
"matching the RuleID and DTag pair being processed", even if not spelled out, for brevity.<a href="#section-8.4.3.2-4" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-5">On receiving a SCHC Fragment message,
the receiver determines what tiles were received, based on the payload length and on the W and FCN fields of the SCHC Fragment.<a href="#section-8.4.3.2-5" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-6.1">if the FCN is All-1, if a Payload is present, the full SCHC Fragment Payload <span class="bcp14">MUST</span> be assembled including the padding bits.
This is because the size of the last tile is not known by the receiver;
therefore, padding bits are indistinguishable from the tile data bits, at this stage.
They will be removed by the SCHC C/D sublayer.
If the size of the SCHC Fragment Payload exceeds or equals
the size of one regular tile plus the size of an L2 Word, this <span class="bcp14">SHOULD</span> raise an error flag.<a href="#section-8.4.3.2-6.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-6.2">
<p id="section-8.4.3.2-6.2.1">otherwise, tiles <span class="bcp14">MUST</span> be assembled based on the a priori known tile size.<a href="#section-8.4.3.2-6.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-6.2.2.1">If allowed by the Profile, the end of the payload <span class="bcp14">MAY</span> contain the last tile, which may be shorter. Padding bits are indistinguishable from the tile data bits, at this stage.<a href="#section-8.4.3.2-6.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-6.2.2.2">The payload may contain the penultimate tile that, if allowed by the Profile, <span class="bcp14">MAY</span> be exactly one L2 Word shorter than the regular tile size.<a href="#section-8.4.3.2-6.2.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-6.2.2.3">
<p id="section-8.4.3.2-6.2.2.3.1">Otherwise, padding bits <span class="bcp14">MUST</span> be discarded.
This is possible because:<a href="#section-8.4.3.2-6.2.2.3.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-6.2.2.3.2.1">the size of the tiles is known a priori,<a href="#section-8.4.3.2-6.2.2.3.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-6.2.2.3.2.2">tiles are larger than an L2 Word, and<a href="#section-8.4.3.2-6.2.2.3.2.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-6.2.2.3.2.3">padding bits are always strictly less than an L2 Word.<a href="#section-8.4.3.2-6.2.2.3.2.3" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.3.2-7">On receiving a SCHC ACK REQ or an All-1 SCHC Fragment:<a href="#section-8.4.3.2-7" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-8.1">if the receiver knows of any windows with missing tiles for the packet being reassembled, it
<span class="bcp14">MUST</span> return a SCHC ACK for the lowest-numbered such window:<a href="#section-8.4.3.2-8.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-8.2">
<p id="section-8.4.3.2-8.2.1">otherwise:<a href="#section-8.4.3.2-8.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-8.2.2.1">if it has received at least one tile, it <span class="bcp14">MUST</span> return a SCHC ACK for the highest-numbered window it currently has tiles for,<a href="#section-8.4.3.2-8.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-8.2.2.2">otherwise, it <span class="bcp14">MUST</span> return a SCHC ACK for window numbered 0.<a href="#section-8.4.3.2-8.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
<p id="section-8.4.3.2-9">A Profile <span class="bcp14">MAY</span> specify other times and circumstances at which
a receiver sends a SCHC ACK,
and which window the SCHC ACK reports about in these circumstances.<a href="#section-8.4.3.2-9" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-10">Upon sending a SCHC ACK, the receiver <span class="bcp14">MUST</span> increase the Attempts counter.<a href="#section-8.4.3.2-10" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-11">After receiving an All-1 SCHC Fragment,
a receiver <span class="bcp14">MUST</span> check the integrity of the reassembled SCHC Packet at least every time
it prepares for sending a SCHC ACK for the last window.<a href="#section-8.4.3.2-11" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-12">Upon receiving a SCHC Sender-Abort,
the receiver <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.3.2-12" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-13">Upon expiration of the Inactivity Timer,
the receiver <span class="bcp14">MUST</span> send a SCHC Receiver-Abort,
and it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.3.2-13" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-14">On the Attempts counter exceeding MAX_ACK_REQUESTS,
the receiver <span class="bcp14">MUST</span> send a SCHC Receiver-Abort,
and it <span class="bcp14">MAY</span> exit with an error condition.<a href="#section-8.4.3.2-14" class="pilcrow">¶</a></p>
<p id="section-8.4.3.2-15">Reassembly of the SCHC Packet concludes when:<a href="#section-8.4.3.2-15" class="pilcrow">¶</a></p>
<ul>
<li id="section-8.4.3.2-16.1">a Sender-Abort has been received, or<a href="#section-8.4.3.2-16.1" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-16.2">the Inactivity Timer has expired, or<a href="#section-8.4.3.2-16.2" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-16.3">the Attempts counter has exceeded MAX_ACK_REQUESTS, or<a href="#section-8.4.3.2-16.3" class="pilcrow">¶</a>
</li>
<li id="section-8.4.3.2-16.4">at least an All-1 SCHC Fragment has been received and integrity checking of the reassembled SCHC Packet is successful.<a href="#section-8.4.3.2-16.4" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-8.4.3.2-17">See <a href="#Fig-ACKonerrorRcv" class="xref">Figure 44</a> for one among several possible examples of a Finite State Machine implementing a receiver behavior obeying this specification. The example provided is meant to match the sender Finite State Machine of <a href="#Fig-ACKonerrorSnd" class="xref">Figure 43</a>.<a href="#section-8.4.3.2-17" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
</section>
</div>
</section>
</div>
<div id="Padding">
<section id="section-9">
<h2 id="name-padding-management">
<a href="#section-9" class="section-number selfRef">9. </a><a href="#name-padding-management" class="section-name selfRef">Padding Management</a>
</h2>
<p id="section-9-1">SCHC C/D and SCHC F/R operate on bits, not bytes. SCHC itself does not have any alignment prerequisite.
The size of SCHC Packets can be any number of bits.<a href="#section-9-1" class="pilcrow">¶</a></p>
<p id="section-9-2">If the L2 constrains the payload to align to coarser boundaries (for example, bytes),
the SCHC messages <span class="bcp14">MUST</span> be padded.
When padding occurs, the number of appended bits <span class="bcp14">MUST</span> be strictly less than the L2 Word size.<a href="#section-9-2" class="pilcrow">¶</a></p>
<p id="section-9-3">If a SCHC Packet is sent unfragmented (see <a href="#Fig-Operations-Pad" class="xref">Figure 24</a>), it is padded as needed for transmission.<a href="#section-9-3" class="pilcrow">¶</a></p>
<p id="section-9-4">If a SCHC Packet needs to be fragmented for transmission, it is not padded in itself. Only the SCHC F/R messages are padded as needed for transmission.
Some SCHC F/R messages are intrinsically aligned to L2 Words.<a href="#section-9-4" class="pilcrow">¶</a></p>
<span id="name-schc-operations-including-p"></span><div id="Fig-Operations-Pad">
<figure id="figure-24">
<div class="artwork art-text alignLeft" id="section-9-5.1">
<pre>
A packet (e.g., an IPv6 packet)
| ^ (padding bits
v | dropped)
+------------------+ +--------------------+
| SCHC Compression | | SCHC Decompression |
+------------------+ +--------------------+
| ^
| If no fragmentation, |
+---- SCHC Packet + padding as needed ----->|
| | (integrity
v | checked)
+--------------------+ +-----------------+
| SCHC Fragmentation | | SCHC Reassembly |
+--------------------+ +-----------------+
| ^ | ^
| | | |
| +--- SCHC ACK + padding as needed --+ |
| |
+------- SCHC Fragments + padding as needed---------+
Sender Receiver</pre>
</div>
<figcaption><a href="#figure-24" class="selfRef">Figure 24</a>:
<a href="#name-schc-operations-including-p" class="selfRef">SCHC Operations, Including Padding as Needed</a>
</figcaption></figure>
</div>
<p id="section-9-6">Each Profile <span class="bcp14">MUST</span> specify the size of the L2 Word.
The L2 Word might actually be a single bit, in which case no padding will take place at all.<a href="#section-9-6" class="pilcrow">¶</a></p>
<p id="section-9-7">A Profile <span class="bcp14">MUST</span> define the value of the padding bits if the L2 Word is wider than a single bit. The <span class="bcp14">RECOMMENDED</span> value is 0.<a href="#section-9-7" class="pilcrow">¶</a></p>
</section>
</div>
<div id="schc-compression-for-ipv6-and-udp-headers">
<section id="section-10">
<h2 id="name-schc-compression-for-ipv6-a">
<a href="#section-10" class="section-number selfRef">10. </a><a href="#name-schc-compression-for-ipv6-a" class="section-name selfRef">SCHC Compression for IPv6 and UDP Headers</a>
</h2>
<p id="section-10-1">This section lists the IPv6 and UDP header fields and describes how they can be compressed.
An example of a set of Rules for UDP/IPv6 header compression is provided in <a href="#compressIPv6" class="xref">Appendix A</a>.<a href="#section-10-1" class="pilcrow">¶</a></p>
<div id="ipv6-version-field">
<section id="section-10.1">
<h3 id="name-ipv6-version-field">
<a href="#section-10.1" class="section-number selfRef">10.1. </a><a href="#name-ipv6-version-field" class="section-name selfRef">IPv6 Version Field</a>
</h3>
<p id="section-10.1-1">The IPv6 version field is labeled by the protocol parser as being the "version" field of the IPv6 protocol.
Therefore, it only exists for IPv6 packets.
In the Rule, TV is set to 6, MO to "ignore"
and CDA to "not-sent".<a href="#section-10.1-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="ipv6-traffic-class-field">
<section id="section-10.2">
<h3 id="name-ipv6-traffic-class-field">
<a href="#section-10.2" class="section-number selfRef">10.2. </a><a href="#name-ipv6-traffic-class-field" class="section-name selfRef">IPv6 Traffic Class Field</a>
</h3>
<p id="section-10.2-1">If the Diffserv field does not vary and is known by both sides, the Field Descriptor in the Rule <span class="bcp14">SHOULD</span> contain a TV with
this well-known value, an "equal" MO, and a "not-sent" CDA.<a href="#section-10.2-1" class="pilcrow">¶</a></p>
<p id="section-10.2-2">Otherwise (e.g., ECN bits are to be transmitted), two possibilities can be considered depending on the variability of the value:<a href="#section-10.2-2" class="pilcrow">¶</a></p>
<ul>
<li id="section-10.2-3.1">One possibility is to not compress the field and send the original value. In the Rule, TV is not set to any particular value, MO is set to "ignore", and CDA is set to "value-sent".<a href="#section-10.2-3.1" class="pilcrow">¶</a>
</li>
<li id="section-10.2-3.2">
<p id="section-10.2-3.2.1">If some upper bits in the field are constant and known, a better option is to only send the LSBs. In the Rule, TV is set to a value with the stable known upper part, MO is set to MSB(x), and CDA to LSB.<a href="#section-10.2-3.2.1" class="pilcrow">¶</a></p>
<p id="section-10.2-3.2.2">
ECN functionality depends on both bits of the ECN field, which
are the 2 LSBs of this field; hence, sending only a single
LSB of this field is <span class="bcp14">NOT RECOMMENDED</span>.<a href="#section-10.2-3.2.2" class="pilcrow">¶</a></p>
</li>
</ul>
</section>
</div>
<div id="flow-label-field">
<section id="section-10.3">
<h3 id="name-flow-label-field">
<a href="#section-10.3" class="section-number selfRef">10.3. </a><a href="#name-flow-label-field" class="section-name selfRef">Flow Label Field</a>
</h3>
<p id="section-10.3-1">If the flow label is not set, i.e., its value is zero, the Field Descriptor in the Rule <span class="bcp14">SHOULD</span> contain a TV set to zero, an "equal" MO, and a "not-sent" CDA.<a href="#section-10.3-1" class="pilcrow">¶</a></p>
<p id="section-10.3-2">If the flow label is set to a pseudorandom value according to <span>[<a href="#RFC6437" class="xref">RFC6437</a>]</span>, in the Rule, TV is not set to any particular value, MO is set to "ignore", and CDA is set to "value-sent".<a href="#section-10.3-2" class="pilcrow">¶</a></p>
<p id="section-10.3-3">If the flow label is set according to some prior agreement, i.e., by a flow state establishment method as allowed by <span>[<a href="#RFC6437" class="xref">RFC6437</a>]</span>,
the Field Descriptor in the Rule <span class="bcp14">SHOULD</span> contain a TV with this agreed-upon value, an "equal" MO, and a "not-sent" CDA.<a href="#section-10.3-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="payload-length-field">
<section id="section-10.4">
<h3 id="name-payload-length-field">
<a href="#section-10.4" class="section-number selfRef">10.4. </a><a href="#name-payload-length-field" class="section-name selfRef">Payload Length Field</a>
</h3>
<p id="section-10.4-1">This field can be elided for the transmission on the LPWAN. The SCHC C/D recomputes the original payload length value. In the Field Descriptor, TV is not set, MO is set to "ignore", and CDA is "compute-*".<a href="#section-10.4-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="next-header-field">
<section id="section-10.5">
<h3 id="name-next-header-field">
<a href="#section-10.5" class="section-number selfRef">10.5. </a><a href="#name-next-header-field" class="section-name selfRef">Next Header Field</a>
</h3>
<p id="section-10.5-1">If the Next Header field does not vary and is known by both sides, the Field Descriptor in the Rule <span class="bcp14">SHOULD</span> contain a TV with
this Next Header value, the MO <span class="bcp14">SHOULD</span> be "equal", and the CDA <span class="bcp14">SHOULD</span> be "not-sent".<a href="#section-10.5-1" class="pilcrow">¶</a></p>
<p id="section-10.5-2">Otherwise, TV is not set in the Field Descriptor, MO is set to "ignore", and CDA is set to "value-sent". Alternatively, a matching-list <span class="bcp14">MAY</span> also be used.<a href="#section-10.5-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="hop-limit-field">
<section id="section-10.6">
<h3 id="name-hop-limit-field">
<a href="#section-10.6" class="section-number selfRef">10.6. </a><a href="#name-hop-limit-field" class="section-name selfRef">Hop Limit Field</a>
</h3>
<p id="section-10.6-1">The field behavior for this field is different for Uplink and Downlink.
In Uplink, since there is no IP forwarding between the Dev and the SCHC C/D, the value is relatively constant.
On the other hand, the Downlink value depends on Internet routing and can change more frequently.
The DI can be used to distinguish both directions:<a href="#section-10.6-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-10.6-2.1">in an Up Field Descriptor, elide the field: the TV is set to the known constant value, the MO is set to "equal" and the CDA is set to "not-sent".<a href="#section-10.6-2.1" class="pilcrow">¶</a>
</li>
<li id="section-10.6-2.2">in a Dw Field Descriptor, the Hop Limit is elided for transmission and forced to 1 at the receiver, by setting TV to 1, MO to "ignore" and CDA to "not-sent". This prevents any further forwarding.<a href="#section-10.6-2.2" class="pilcrow">¶</a>
</li>
</ul>
</section>
</div>
<div id="ipv6-addresses-fields">
<section id="section-10.7">
<h3 id="name-ipv6-addresses-fields">
<a href="#section-10.7" class="section-number selfRef">10.7. </a><a href="#name-ipv6-addresses-fields" class="section-name selfRef">IPv6 Addresses Fields</a>
</h3>
<p id="section-10.7-1">As in 6LoWPAN <span>[<a href="#RFC4944" class="xref">RFC4944</a>]</span>, IPv6 addresses are split into two 64-bit-long fields; one for the prefix and one for the Interface Identifier (IID). These fields <span class="bcp14">SHOULD</span> be compressed. To allow for a single Rule being used for both directions, these values are identified by their role (Dev or App) and not by their position in the header (source or destination).<a href="#section-10.7-1" class="pilcrow">¶</a></p>
<div id="ipv6-source-and-destination-prefixes">
<section id="section-10.7.1">
<h4 id="name-ipv6-source-and-destination">
<a href="#section-10.7.1" class="section-number selfRef">10.7.1. </a><a href="#name-ipv6-source-and-destination" class="section-name selfRef">IPv6 Source and Destination Prefixes</a>
</h4>
<p id="section-10.7.1-1">Both ends <span class="bcp14">MUST</span> be configured with the appropriate prefixes. For a specific flow, the source and destination prefixes can be unique and stored in the Context.
In that case, the TV for the
source and destination prefixes contain the values, the MO is set to "equal" and the CDA is set to "not-sent".<a href="#section-10.7.1-1" class="pilcrow">¶</a></p>
<p id="section-10.7.1-2">If the Rule is intended to compress packets with different prefix values, match-mapping <span class="bcp14">SHOULD</span> be used. The different prefixes are listed in the TV, the MO is set to "match-mapping" and the CDA is set to "mapping-sent". See <a href="#Fig-fields" class="xref">Figure 26</a>.<a href="#section-10.7.1-2" class="pilcrow">¶</a></p>
<p id="section-10.7.1-3">Otherwise, the TV is not set, the MO is set to "ignore", and the CDA is set to "value-sent".<a href="#section-10.7.1-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="ipv6-source-and-destination-iid">
<section id="section-10.7.2">
<h4 id="name-ipv6-source-and-destination-">
<a href="#section-10.7.2" class="section-number selfRef">10.7.2. </a><a href="#name-ipv6-source-and-destination-" class="section-name selfRef">IPv6 Source and Destination IID</a>
</h4>
<p id="section-10.7.2-1">If the Dev or App IID are based on an L2 address, then the IID can be reconstructed with information coming from the L2 header. In that case, the TV is not set, the MO is set to "ignore" and the CDA is set to "DevIID" or "AppIID".
On LPWAN technologies where the frames carry a single identifier (corresponding to the Dev), AppIID cannot be used.<a href="#section-10.7.2-1" class="pilcrow">¶</a></p>
<p id="section-10.7.2-2">As described in <span>[<a href="#RFC8065" class="xref">RFC8065</a>]</span>, it may be undesirable to build the Dev IPv6 IID out of the Dev address. Another static value is used instead.
In that case, the TV contains the static value, the MO operator is set to "equal" and the CDA is set to "not-sent".<a href="#section-10.7.2-2" class="pilcrow">¶</a></p>
<p id="section-10.7.2-3">If several IIDs are possible, then the TV contains the list of possible IIDs, the MO is set to "match-mapping" and the CDA is set to "mapping-sent".<a href="#section-10.7.2-3" class="pilcrow">¶</a></p>
<p id="section-10.7.2-4">It may also happen that the IID variability only expresses itself on a few bytes. In that case, the TV is set to the stable part of the IID, the MO is set to "MSB" and the CDA is set to "LSB".<a href="#section-10.7.2-4" class="pilcrow">¶</a></p>
<p id="section-10.7.2-5">Finally, the IID can be sent in its entirety on the L2. In that case, the TV is not set, the MO is set to "ignore", and the CDA is set to "value-sent".<a href="#section-10.7.2-5" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="ipv6-extension-headers">
<section id="section-10.8">
<h3 id="name-ipv6-extension-headers">
<a href="#section-10.8" class="section-number selfRef">10.8. </a><a href="#name-ipv6-extension-headers" class="section-name selfRef">IPv6 Extension Headers</a>
</h3>
<p id="section-10.8-1">This document does not provide recommendations on how to compress IPv6 extension headers.<a href="#section-10.8-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="udp-source-and-destination-ports">
<section id="section-10.9">
<h3 id="name-udp-source-and-destination-">
<a href="#section-10.9" class="section-number selfRef">10.9. </a><a href="#name-udp-source-and-destination-" class="section-name selfRef">UDP Source and Destination Ports</a>
</h3>
<p id="section-10.9-1">To allow for a single Rule being used for both directions, the UDP port values are identified by their role (Dev or App) and not by their position in the header (source or destination). The SCHC C/D <span class="bcp14">MUST</span> be aware of the traffic direction (Uplink, Downlink) to select the appropriate field. The following Rules apply for Dev and App port numbers.<a href="#section-10.9-1" class="pilcrow">¶</a></p>
<p id="section-10.9-2">If both ends know the port number, it can be elided. The TV
contains the port number, the MO is set to "equal", and the CDA is set to "not-sent".<a href="#section-10.9-2" class="pilcrow">¶</a></p>
<p id="section-10.9-3">If the port variation is on few bits, the TV contains the stable part of the port number, the MO is set to "MSB", and the CDA is set to "LSB".<a href="#section-10.9-3" class="pilcrow">¶</a></p>
<p id="section-10.9-4">If some well-known values are used, the TV can contain the list of these values, the MO is set to "match-mapping", and the CDA is set to "mapping-sent".<a href="#section-10.9-4" class="pilcrow">¶</a></p>
<p id="section-10.9-5">Otherwise, the port numbers are sent over the L2. The TV is not set, the MO is set to "ignore" and the CDA is set to "value-sent".<a href="#section-10.9-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="udp-length-field">
<section id="section-10.10">
<h3 id="name-udp-length-field">
<a href="#section-10.10" class="section-number selfRef">10.10. </a><a href="#name-udp-length-field" class="section-name selfRef">UDP Length Field</a>
</h3>
<p id="section-10.10-1">The parser MUST NOT label this field unless the UDP Length value
matches the Payload Length value from the IPv6 header.
The TV is not set, the MO is set to "ignore", and the CDA is set to
"compute-*".<a href="#section-10.10-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="UDPchecksum">
<section id="section-10.11">
<h3 id="name-udp-checksum-field">
<a href="#section-10.11" class="section-number selfRef">10.11. </a><a href="#name-udp-checksum-field" class="section-name selfRef">UDP Checksum Field</a>
</h3>
<p id="section-10.11-1">The UDP checksum operation is mandatory with IPv6 for most
packets, but there are exceptions <span>[<a href="#RFC8200" class="xref">RFC8200</a>]</span>.<a href="#section-10.11-1" class="pilcrow">¶</a></p>
<p id="section-10.11-2">For instance, protocols that use UDP as a tunnel encapsulation may
enable zero-checksum mode for a specific port (or set of ports) for
sending and/or receiving. <span>[<a href="#RFC8200" class="xref">RFC8200</a>]</span> requires any node
implementing zero-checksum mode to follow the requirements specified
in "Applicability Statement for the Use of IPv6 UDP Datagrams with
Zero Checksums" <span>[<a href="#RFC6936" class="xref">RFC6936</a>]</span>.<a href="#section-10.11-2" class="pilcrow">¶</a></p>
<p id="section-10.11-3">6LoWPAN Header Compression <span>[<a href="#RFC6282" class="xref">RFC6282</a>]</span> also specifies that a UDP
checksum can be elided by the compressor and recomputed by the decompressor when an upper
layer guarantees the integrity of the UDP payload and pseudo-header.
A specific example of this is
when a message integrity check protects the compressed message
between the compressor that elides the UDP checksum and the decompressor
that computes it,
with a strength that is identical or better to
the UDP checksum.<a href="#section-10.11-3" class="pilcrow">¶</a></p>
<p id="section-10.11-4">Similarly, a SCHC compressor <span class="bcp14">MAY</span>
elide the UDP checksum when another layer guarantees at least equal
integrity protection for the UDP payload and the pseudo-header.
In this case, the TV is not set, the MO is set to "ignore", and the CDA is set to "compute-*".<a href="#section-10.11-4" class="pilcrow">¶</a></p>
<p id="section-10.11-5">In particular, when SCHC fragmentation is used, a fragmentation RCS
of 2 bytes or more provides equal or better protection than the UDP
checksum; in that case, if the compressor is collocated with the
fragmentation point and the decompressor is collocated with the
packet reassembly point,
and if the SCHC Packet is fragmented even when it would fit unfragmented in the L2 MTU,
then the compressor <span class="bcp14">MAY</span> verify and then elide the UDP checksum.
Whether and when the UDP Checksum is elided is to be specified in the
Profile.<a href="#section-10.11-5" class="pilcrow">¶</a></p>
<p id="section-10.11-6">Since the compression happens before the fragmentation, implementers
should understand the risks when dealing with unprotected data below
the transport layer and take special care when manipulating that data.<a href="#section-10.11-6" class="pilcrow">¶</a></p>
<p id="section-10.11-7">In other cases, the checksum <span class="bcp14">SHOULD</span> be explicitly sent. The TV is not set, the MO is set to "ignore" and the CDA is set to "value-sent".<a href="#section-10.11-7" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="iana-considerations">
<section id="section-11">
<h2 id="name-iana-considerations">
<a href="#section-11" class="section-number selfRef">11. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a>
</h2>
<p id="section-11-1">This document has no IANA actions.<a href="#section-11-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="SecConsiderations">
<section id="section-12">
<h2 id="name-security-considerations">
<a href="#section-12" class="section-number selfRef">12. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a>
</h2>
<p id="section-12-1">As explained in <a href="#Overview" class="xref">Section 5</a>, SCHC is expected to be implemented on top of LPWAN technologies,
which are expected to implement security measures.<a href="#section-12-1" class="pilcrow">¶</a></p>
<p id="section-12-2">In this section, we analyze the potential security threats that could be introduced
into an LPWAN by adding the SCHC functionalities.<a href="#section-12-2" class="pilcrow">¶</a></p>
<div id="security-considerations-for-schc-compressiondecompression">
<section id="section-12.1">
<h3 id="name-security-considerations-for">
<a href="#section-12.1" class="section-number selfRef">12.1. </a><a href="#name-security-considerations-for" class="section-name selfRef">Security Considerations for SCHC Compression/Decompression</a>
</h3>
<div id="forged-schc-packet">
<section id="section-12.1.1">
<h4 id="name-forged-schc-packet">
<a href="#section-12.1.1" class="section-number selfRef">12.1.1. </a><a href="#name-forged-schc-packet" class="section-name selfRef">Forged SCHC Packet</a>
</h4>
<p id="section-12.1.1-1">Let's assume that an attacker is able to send a forged SCHC Packet to a SCHC decompressor.<a href="#section-12.1.1-1" class="pilcrow">¶</a></p>
<p id="section-12.1.1-2">Let's first consider the case where the RuleID contained in that forged SCHC Packet does not correspond to a Rule allocated in the Rule table.
An implementation should detect that the RuleID is invalid and should silently drop the offending SCHC Packet.<a href="#section-12.1.1-2" class="pilcrow">¶</a></p>
<p id="section-12.1.1-3">Let's now consider that the RuleID corresponds to a Rule in the table. With the CDAs defined in this document, the reconstructed packet is, at most, a constant number of bits bigger than the SCHC Packet that was received.
This assumes that the compute-* decompression actions produce a bounded number of bits, irrespective of the incoming SCHC Packet. This property is true for IPv6 Length, UDP Length, and UDP Checksum, for which the compute-* CDA is recommended by this document.<a href="#section-12.1.1-3" class="pilcrow">¶</a></p>
<p id="section-12.1.1-4">As a consequence, SCHC decompression does not amplify attacks, beyond adding a bounded number of bits to the SCHC Packet received. This bound is determined by the Rule stored in the receiving device.<a href="#section-12.1.1-4" class="pilcrow">¶</a></p>
<p id="section-12.1.1-5">As a general safety measure, a SCHC decompressor should never reconstruct a packet larger than MAX_PACKET_SIZE (defined in a Profile, with 1500 bytes as generic default).<a href="#section-12.1.1-5" class="pilcrow">¶</a></p>
</section>
</div>
<div id="compressed-packet-size-as-a-side-channel-to-guess-a-secret-token">
<section id="section-12.1.2">
<h4 id="name-compressed-packet-size-as-a">
<a href="#section-12.1.2" class="section-number selfRef">12.1.2. </a><a href="#name-compressed-packet-size-as-a" class="section-name selfRef">Compressed Packet Size as a Side Channel to Guess a Secret Token</a>
</h4>
<p id="section-12.1.2-1">Some packet compression methods are known to be susceptible to attacks, such as BREACH and CRIME.
The attack involves injecting arbitrary data into the packet and observing the resulting compressed packet size. The observed size potentially reflects correlation between the arbitrary data and some content that was meant to remain secret, such as a security token, thereby allowing the attacker to get at the secret.<a href="#section-12.1.2-1" class="pilcrow">¶</a></p>
<p id="section-12.1.2-2">By contrast, SCHC compression takes place header field by header field,
with the SCHC Packet being a mere concatenation of the compression residues of each of the individual field.
Any correlation between header fields does not result in a change in the SCHC Packet size compressed under the same Rule.<a href="#section-12.1.2-2" class="pilcrow">¶</a></p>
<p id="section-12.1.2-3">If SCHC C/D is used to compress packets that include a secret information field, such as a token,
the Rule set should be designed so that the size of the compression residue for the field to remain secret
is the same irrespective of the value of the secret information.
This is achieved by, e.g., sending this field in extenso with the "ignore" MO and the "value-sent" CDA.
This recommendation is disputable if it is ascertained that the Rule set itself will remain secret.<a href="#section-12.1.2-3" class="pilcrow">¶</a></p>
</section>
</div>
<div id="decompressed-packet-different-from-the-original-packet">
<section id="section-12.1.3">
<h4 id="name-decompressed-packet-differe">
<a href="#section-12.1.3" class="section-number selfRef">12.1.3. </a><a href="#name-decompressed-packet-differe" class="section-name selfRef">Decompressed Packet Different from the Original Packet</a>
</h4>
<p id="section-12.1.3-1">As explained in <a href="#PProcessing" class="xref">Section 7.2</a>, using FPs with value 0 in Field Descriptors in a Rule may result in header fields
appearing in the decompressed packet in an order different from that in the original packet.
Likewise, as stated in <a href="#NotSentCDA" class="xref">Section 7.4.3</a>, using an "ignore" MO together with a "not-sent" CDA will
result in the header field taking the TV value, which is likely to be different from the original value.<a href="#section-12.1.3-1" class="pilcrow">¶</a></p>
<p id="section-12.1.3-2">Depending on the protocol, the order of header fields in
the packet may or may not be functionally significant.<a href="#section-12.1.3-2" class="pilcrow">¶</a></p>
<p id="section-12.1.3-3">Furthermore, if the packet is protected by a checksum or a similar integrity protection mechanism,
and if the checksum is transmitted instead of being recomputed as part of the decompression,
these situations may result in the packet being considered corrupt and dropped.<a href="#section-12.1.3-3" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
<div id="security-considerations-for-schc-fragmentationreassembly">
<section id="section-12.2">
<h3 id="name-security-considerations-for-">
<a href="#section-12.2" class="section-number selfRef">12.2. </a><a href="#name-security-considerations-for-" class="section-name selfRef">Security Considerations for SCHC Fragmentation/Reassembly</a>
</h3>
<div id="buffer-reservation-attack">
<section id="section-12.2.1">
<h4 id="name-buffer-reservation-attack">
<a href="#section-12.2.1" class="section-number selfRef">12.2.1. </a><a href="#name-buffer-reservation-attack" class="section-name selfRef">Buffer Reservation Attack</a>
</h4>
<p id="section-12.2.1-1">Let's assume that an attacker is able to send a forged SCHC Fragment to a SCHC reassembler.<a href="#section-12.2.1-1" class="pilcrow">¶</a></p>
<p id="section-12.2.1-2">A node can perform a buffer reservation attack: the receiver will reserve buffer space for the SCHC Packet. If the implementation has only one buffer, other incoming fragmented SCHC Packets will be dropped while the reassembly buffer is occupied during the reassembly timeout. Once that timeout expires, the attacker can repeat the same procedure, and iterate, thus, creating a denial-of-service attack.
An implementation may have multiple reassembly buffers. The cost to mount this attack is linear with the number of buffers at the target node.
Better, the cost for an attacker can be increased if individual
fragments of multiple SCHC Packets can be stored in the reassembly
buffer. The finer grained the reassembly buffer (down to the smallest tile size), the higher the cost of the attack.
If buffer overload does occur, a smart receiver could selectively discard SCHC Packets being reassembled based on the sender behavior, which may help identify which SCHC Fragments have been sent by the attacker.
Another mild countermeasure is for the target to abort the fragmentation/reassembly session as early as it detects a non-identical SCHC Fragment duplicate, anticipating for an eventual corrupt SCHC Packet, so as to save the sender the hassle of sending the rest of the fragments for this SCHC Packet.<a href="#section-12.2.1-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="corrupt-fragment-attack">
<section id="section-12.2.2">
<h4 id="name-corrupt-fragment-attack">
<a href="#section-12.2.2" class="section-number selfRef">12.2.2. </a><a href="#name-corrupt-fragment-attack" class="section-name selfRef">Corrupt Fragment Attack</a>
</h4>
<p id="section-12.2.2-1">Let's assume that an attacker is able to send a forged SCHC Fragment to a SCHC reassembler.
The malicious node is additionally assumed to be able to hear an incoming communication destined to the target node.<a href="#section-12.2.2-1" class="pilcrow">¶</a></p>
<p id="section-12.2.2-2">It can then send a forged SCHC Fragment that looks like it belongs to a SCHC Packet already being reassembled at the target node.
This can cause the SCHC Packet to be considered corrupt and to be dropped by the receiver.
The amplification happens here by a single spoofed SCHC Fragment rendering a full sequence of legitimate SCHC Fragments useless.
If the target uses ACK-Always or ACK-on-Error mode, such a malicious node can also interfere with
the acknowledgement and repetition algorithm of SCHC F/R.
A single spoofed ACK, with all Bitmap bits set to 0, will trigger the repetition of WINDOW_SIZE tiles. This protocol loop amplification depletes the energy source of the target node and consumes the channel bandwidth.
Similarly, a spoofed ACK REQ will trigger the sending of a SCHC ACK,
which may be much larger than the ACK REQ if WINDOW_SIZE is large.
These consequences should be borne in mind when defining profiles for SCHC over specific LPWAN technologies.<a href="#section-12.2.2-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="fragmentation-as-a-way-to-bypass-network-inspection">
<section id="section-12.2.3">
<h4 id="name-fragmentation-as-a-way-to-b">
<a href="#section-12.2.3" class="section-number selfRef">12.2.3. </a><a href="#name-fragmentation-as-a-way-to-b" class="section-name selfRef">Fragmentation as a Way to Bypass Network Inspection</a>
</h4>
<p id="section-12.2.3-1">Fragmentation is known for potentially allowing one to force through a Network Inspection device (e.g., firewall) packets that would be rejected if unfragmented.
This involves sending overlapping fragments to rewrite fields whose initial value led the Network Inspection device to allow the flow to go through.<a href="#section-12.2.3-1" class="pilcrow">¶</a></p>
<p id="section-12.2.3-2">SCHC F/R is expected to be used over one LPWAN link, where no Network Inspection device is expected to sit.
As described in <a href="#FunctionalMapping" class="xref">Section 5.2</a>, even if the SCHC F/R on the Network Infrastructure side is located
in the Internet, a tunnel is to be established between it and the NGW.<a href="#section-12.2.3-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="privacy-issues-associated-with-schc-header-fields">
<section id="section-12.2.4">
<h4 id="name-privacy-issues-associated-w">
<a href="#section-12.2.4" class="section-number selfRef">12.2.4. </a><a href="#name-privacy-issues-associated-w" class="section-name selfRef">Privacy Issues Associated with SCHC Header Fields</a>
</h4>
<p id="section-12.2.4-1">SCHC F/R allocates a DTag value to fragments belonging to the same SCHC Packet.
Concerns were raised that, if DTag is a wide counter that is incremented in a predictable fashion for each new fragmented SCHC Packet,
it might lead to a privacy issue, such as enabling tracking of a device across LPWANs.<a href="#section-12.2.4-1" class="pilcrow">¶</a></p>
<p id="section-12.2.4-2">However, SCHC F/R is expected to be used over exactly one LPWAN link.
As described in <a href="#FunctionalMapping" class="xref">Section 5.2</a>, even if the SCHC F/R on the Network Infrastructure side is located
in the Internet, a tunnel is to be established between it and the NGW.
Therefore, assuming the tunnel provides confidentiality, neither the DTag field nor any other SCHC-introduced field is visible over the Internet.<a href="#section-12.2.4-2" class="pilcrow">¶</a></p>
</section>
</div>
</section>
</div>
</section>
</div>
<section id="section-13">
<h2 id="name-references">
<a href="#section-13" class="section-number selfRef">13. </a><a href="#name-references" class="section-name selfRef">References</a>
</h2>
<section id="section-13.1">
<h3 id="name-normative-references">
<a href="#section-13.1" class="section-number selfRef">13.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a>
</h3>
<dl class="references">
<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">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="RFC6936">[RFC6936]</dt>
<dd>
<span class="refAuthor">Fairhurst, G.</span><span class="refAuthor"> and M. Westerlund</span>, <span class="refTitle">"Applicability Statement for the Use of IPv6 UDP Datagrams with Zero Checksums"</span>, <span class="seriesInfo">RFC 6936</span>, <span class="seriesInfo">DOI 10.17487/RFC6936</span>, <time datetime="2013-04">April 2013</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6936">https://www.rfc-editor.org/info/rfc6936</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">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="RFC8200">[RFC8200]</dt>
<dd>
<span class="refAuthor">Deering, S.</span><span class="refAuthor"> and R. Hinden</span>, <span class="refTitle">"Internet Protocol, Version 6 (IPv6) Specification"</span>, <span class="seriesInfo">STD 86</span>, <span class="seriesInfo">RFC 8200</span>, <span class="seriesInfo">DOI 10.17487/RFC8200</span>, <time datetime="2017-07">July 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8200">https://www.rfc-editor.org/info/rfc8200</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8376">[RFC8376]</dt>
<dd>
<span class="refAuthor">Farrell, S., Ed.</span>, <span class="refTitle">"Low-Power Wide Area Network (LPWAN) Overview"</span>, <span class="seriesInfo">RFC 8376</span>, <span class="seriesInfo">DOI 10.17487/RFC8376</span>, <time datetime="2018-05">May 2018</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8376">https://www.rfc-editor.org/info/rfc8376</a>></span>. </dd>
<dd class="break"></dd>
</dl>
</section>
<section id="section-13.2">
<h3 id="name-informative-references">
<a href="#section-13.2" class="section-number selfRef">13.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a>
</h3>
<dl class="references">
<dt id="ETHERNET">[ETHERNET]</dt>
<dd>
<span class="refAuthor">IEEE</span>, <span class="refTitle">"IEEE Standard for Ethernet"</span>, <span class="seriesInfo">DOI 10.1109/IEEESTD.2012.6419735</span>, <span class="seriesInfo">IEEE Standard 802.3-2012</span>, <time datetime="2012-12">December 2012</time>, <span><<a href="https://ieeexplore.ieee.org/document/6419735">https://ieeexplore.ieee.org/document/6419735</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC4944">[RFC4944]</dt>
<dd>
<span class="refAuthor">Montenegro, G.</span><span class="refAuthor">, Kushalnagar, N.</span><span class="refAuthor">, Hui, J.</span><span class="refAuthor">, and D. Culler</span>, <span class="refTitle">"Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</span>, <span class="seriesInfo">RFC 4944</span>, <span class="seriesInfo">DOI 10.17487/RFC4944</span>, <time datetime="2007-09">September 2007</time>, <span><<a href="https://www.rfc-editor.org/info/rfc4944">https://www.rfc-editor.org/info/rfc4944</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC5795">[RFC5795]</dt>
<dd>
<span class="refAuthor">Sandlund, K.</span><span class="refAuthor">, Pelletier, G.</span><span class="refAuthor">, and L-E. Jonsson</span>, <span class="refTitle">"The RObust Header Compression (ROHC) Framework"</span>, <span class="seriesInfo">RFC 5795</span>, <span class="seriesInfo">DOI 10.17487/RFC5795</span>, <time datetime="2010-03">March 2010</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5795">https://www.rfc-editor.org/info/rfc5795</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6282">[RFC6282]</dt>
<dd>
<span class="refAuthor">Hui, J., Ed.</span><span class="refAuthor"> and P. Thubert</span>, <span class="refTitle">"Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks"</span>, <span class="seriesInfo">RFC 6282</span>, <span class="seriesInfo">DOI 10.17487/RFC6282</span>, <time datetime="2011-09">September 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6282">https://www.rfc-editor.org/info/rfc6282</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC6437">[RFC6437]</dt>
<dd>
<span class="refAuthor">Amante, S.</span><span class="refAuthor">, Carpenter, B.</span><span class="refAuthor">, Jiang, S.</span><span class="refAuthor">, and J. Rajahalme</span>, <span class="refTitle">"IPv6 Flow Label Specification"</span>, <span class="seriesInfo">RFC 6437</span>, <span class="seriesInfo">DOI 10.17487/RFC6437</span>, <time datetime="2011-11">November 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6437">https://www.rfc-editor.org/info/rfc6437</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC7136">[RFC7136]</dt>
<dd>
<span class="refAuthor">Carpenter, B.</span><span class="refAuthor"> and S. Jiang</span>, <span class="refTitle">"Significance of IPv6 Interface Identifiers"</span>, <span class="seriesInfo">RFC 7136</span>, <span class="seriesInfo">DOI 10.17487/RFC7136</span>, <time datetime="2014-02">February 2014</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7136">https://www.rfc-editor.org/info/rfc7136</a>></span>. </dd>
<dd class="break"></dd>
<dt id="RFC8065">[RFC8065]</dt>
<dd>
<span class="refAuthor">Thaler, D.</span>, <span class="refTitle">"Privacy Considerations for IPv6 Adaptation-Layer Mechanisms"</span>, <span class="seriesInfo">RFC 8065</span>, <span class="seriesInfo">DOI 10.17487/RFC8065</span>, <time datetime="2017-02">February 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8065">https://www.rfc-editor.org/info/rfc8065</a>></span>. </dd>
<dd class="break"></dd>
</dl>
</section>
</section>
<div id="compressIPv6">
<section id="section-appendix.a">
<h2 id="name-compression-examples">
<a href="#section-appendix.a" class="section-number selfRef">Appendix A. </a><a href="#name-compression-examples" class="section-name selfRef">Compression Examples</a>
</h2>
<p id="section-appendix.a-1">This section gives some scenarios of the compression mechanism for IPv6/UDP. The goal is to illustrate the behavior of SCHC.<a href="#section-appendix.a-1" class="pilcrow">¶</a></p>
<p id="section-appendix.a-2">The mechanisms defined in this document can be applied to a Dev that embeds some applications running over CoAP. In this example, three flows are considered. The first flow is for the device management based
on CoAP using Link Local IPv6 addresses and UDP ports 123 and 124 for
Dev and App, respectively. The second flow is a CoAP server for measurements done by the Dev (using ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to beta::1/64.
The last flow is for legacy applications using different ports numbers, the destination IPv6 address prefix is gamma::1/64.<a href="#section-appendix.a-2" class="pilcrow">¶</a></p>
<p id="section-appendix.a-3"><a href="#FigStack" class="xref">Figure 25</a> presents the protocol stack. IPv6 and UDP are represented with dotted lines since these protocols are compressed on the radio link.<a href="#section-appendix.a-3" class="pilcrow">¶</a></p>
<span id="name-simplified-protocol-stack-f"></span><div id="FigStack">
<figure id="figure-25">
<div class="artwork art-text alignLeft" id="section-appendix.a-4.1">
<pre>
Management Data
+----------+---------+---------+
| CoAP | CoAP | legacy |
+----||----+---||----+---||----+
. UDP . UDP | UDP |
................................
. IPv6 . IPv6 . IPv6 .
+------------------------------+
| SCHC Header compression |
| and fragmentation |
+------------------------------+
| LPWAN L2 technologies |
+------------------------------+
Dev or NGW</pre>
</div>
<figcaption><a href="#figure-25" class="selfRef">Figure 25</a>:
<a href="#name-simplified-protocol-stack-f" class="selfRef">Simplified Protocol Stack for LP-WAN</a>
</figcaption></figure>
</div>
<span id="name-context-rules-rule-0-and-ru"></span><div id="Fig-fields">
<figure id="figure-26">
<div class="artwork art-text alignLeft" id="section-appendix.a-5.1">
<pre>
Rule 0
Special RuleID used to tag an uncompressed UDP/IPV6 packet.
Rule 1
+----------------+--+--+--+---------+--------+------------++------+
| FID |FL|FP|DI| TV | MO | CDA || Sent |
| | | | | | | ||[bits]|
+----------------+--+--+--+---------+---------------------++------+
|IPv6 Version |4 |1 |Bi|6 | ignore | not-sent || |
|IPv6 Diffserv |8 |1 |Bi|0 | equal | not-sent || |
|IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || |
|IPv6 Length |16|1 |Bi| | ignore | compute-* || |
|IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || |
|IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || |
|IPv6 DevPrefix |64|1 |Bi|FE80::/64| equal | not-sent || |
|IPv6 DevIID |64|1 |Bi| | ignore | DevIID || |
|IPv6 AppPrefix |64|1 |Bi|FE80::/64| equal | not-sent || |
|IPv6 AppIID |64|1 |Bi|::1 | equal | not-sent || |
+================+==+==+==+=========+========+============++======+
|UDP DevPort |16|1 |Bi|123 | equal | not-sent || |
|UDP AppPort |16|1 |Bi|124 | equal | not-sent || |
|UDP Length |16|1 |Bi| | ignore | compute-* || |
|UDP checksum |16|1 |Bi| | ignore | compute-* || |
+================+==+==+==+=========+========+============++======+</pre>
</div>
<figcaption><a href="#figure-26" class="selfRef">Figure 26</a>:
<a href="#name-context-rules-rule-0-and-ru" class="selfRef">Context Rules - Rule 0 and Rule 1</a>
</figcaption></figure>
</div>
<span id="name-context-rules-rule-2"></span><div id="Fig-fields1">
<figure id="figure-27">
<div class="artwork art-text alignLeft" id="section-appendix.a-6.1">
<pre>
Rule 2
+----------------+--+--+--+---------+--------+------------++------+
| FID |FL|FP|DI| TV | MO | CDA || Sent |
| | | | | | | ||[bits]|
+----------------+--+--+--+---------+--------+------------++------+
|IPv6 Version |4 |1 |Bi|6 | ignore | not-sent || |
|IPv6 Diffserv |8 |1 |Bi|0 | equal | not-sent || |
|IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || |
|IPv6 Length |16|1 |Bi| | ignore | compute-* || |
|IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || |
|IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || |
|IPv6 DevPrefix |64|1 |Bi|[alpha/64, match- |mapping-sent|| 1 |
| | | | |fe80::/64] mapping| || |
|IPv6 DevIID |64|1 |Bi| | ignore | DevIID || |
|IPv6 AppPrefix |64|1 |Bi|[beta/64,| match- |mapping-sent|| 2 |
| | | | |alpha/64,| mapping| || |
| | | | |fe80::64]| | || |
|IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || |
+================+==+==+==+=========+========+============++======+
|UDP DevPort |16|1 |Bi|5683 | equal | not-sent || |
|UDP AppPort |16|1 |Bi|5683 | equal | not-sent || |
|UDP Length |16|1 |Bi| | ignore | compute-* || |
|UDP checksum |16|1 |Bi| | ignore | compute-* || |
+================+==+==+==+=========+========+============++======+</pre>
</div>
<figcaption><a href="#figure-27" class="selfRef">Figure 27</a>:
<a href="#name-context-rules-rule-2" class="selfRef">Context Rules - Rule 2</a>
</figcaption></figure>
</div>
<span id="name-context-rules-rule-3"></span><div id="Fig-fields2">
<figure id="figure-28">
<div class="artwork art-text alignLeft" id="section-appendix.a-7.1">
<pre>
Rule 3
+----------------+--+--+--+---------+--------+------------++------+
| FID |FL|FP|DI| TV | MO | CDA || Sent |
| | | | | | | ||[bits]|
+----------------+--+--+--+---------+--------+------------++------+
|IPv6 Version |4 |1 |Bi|6 | ignore | not-sent || |
|IPv6 Diffserv |8 |1 |Bi|0 | equal | not-sent || |
|IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || |
|IPv6 Length |16|1 |Bi| | ignore | compute-* || |
|IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || |
|IPv6 Hop Limit |8 |1 |Up|255 | ignore | not-sent || |
|IPv6 Hop Limit |8 |1 |Dw| | ignore | value-sent || 8 |
|IPv6 DevPrefix |64|1 |Bi|alpha/64 | equal | not-sent || |
|IPv6 DevIID |64|1 |Bi| | ignore | DevIID || |
|IPv6 AppPrefix |64|1 |Bi|gamma/64 | equal | not-sent || |
|IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || |
+================+==+==+==+=========+========+============++======+
|UDP DevPort |16|1 |Bi|8720 | MSB(12)| LSB || 4 |
|UDP AppPort |16|1 |Bi|8720 | MSB(12)| LSB || 4 |
|UDP Length |16|1 |Bi| | ignore | compute-* || |
|UDP checksum |16|1 |Bi| | ignore | compute-* || |
+================+==+==+==+=========+========+============++======+</pre>
</div>
<figcaption><a href="#figure-28" class="selfRef">Figure 28</a>:
<a href="#name-context-rules-rule-3" class="selfRef">Context Rules - Rule 3</a>
</figcaption></figure>
</div>
<p id="section-appendix.a-8">Figures <a href="#Fig-fields" class="xref">26</a> to <a href="#Fig-fields2" class="xref">28</a> describe an example of a Rule set.<a href="#section-appendix.a-8" class="pilcrow">¶</a></p>
<p id="section-appendix.a-9">In this example, 0 was chosen as the special RuleID that tags packets that cannot be compressed with any compression Rule.<a href="#section-appendix.a-9" class="pilcrow">¶</a></p>
<p id="section-appendix.a-10">All the fields described in Rules 1-3 are present in the IPv6 and UDP headers. The DevIID value is inferred from the L2 header.<a href="#section-appendix.a-10" class="pilcrow">¶</a></p>
<p id="section-appendix.a-11">Rules 2-3 use global addresses. The way the Dev learns the prefix is not in the scope of the document.<a href="#section-appendix.a-11" class="pilcrow">¶</a></p>
<p id="section-appendix.a-12">Rule 3 compresses each port number to 4 bits.<a href="#section-appendix.a-12" class="pilcrow">¶</a></p>
</section>
</div>
<div id="FragExamples">
<section id="section-appendix.b">
<h2 id="name-fragmentation-examples">
<a href="#section-appendix.b" class="section-number selfRef">Appendix B. </a><a href="#name-fragmentation-examples" class="section-name selfRef">Fragmentation Examples</a>
</h2>
<p id="section-appendix.b-1">This section provides examples for the various fragment reliability modes specified in this document.
In the drawings, Bitmaps are shown in their uncompressed form.<a href="#section-appendix.b-1" class="pilcrow">¶</a></p>
<p id="section-appendix.b-2"><a href="#Fig-Example-Unreliable" class="xref">Figure 29</a> illustrates the transmission in No-ACK mode of a SCHC Packet that needs 11 SCHC Fragments. FCN is 1 bit wide.<a href="#section-appendix.b-2" class="pilcrow">¶</a></p>
<span id="name-no-ack-mode-11-schc-fragmen"></span><div id="Fig-Example-Unreliable">
<figure id="figure-29">
<div class="artwork art-text alignLeft" id="section-appendix.b-3.1">
<pre>
Sender Receiver
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-------FCN=0-------->|
|-----FCN=1 + RCS --->| Integrity check: success
(End)</pre>
</div>
<figcaption><a href="#figure-29" class="selfRef">Figure 29</a>:
<a href="#name-no-ack-mode-11-schc-fragmen" class="selfRef">No-ACK Mode, 11 SCHC Fragments</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-4">In the following examples, N (the size of the FCN field) is 3 bits. The All-1 FCN value is therefore 7.<a href="#section-appendix.b-4" class="pilcrow">¶</a></p>
<p id="section-appendix.b-5"><a href="#Fig-Example-Win-NoLoss-NACK" class="xref">Figure 30</a> illustrates the transmission in ACK-on-Error mode of a SCHC Packet fragmented in 11 tiles, with one tile per SCHC Fragment, WINDOW_SIZE=7 and no lost SCHC Fragment.<a href="#section-appendix.b-5" class="pilcrow">¶</a></p>
<span id="name-ack-on-error-mode-11-tiles-"></span><div id="Fig-Example-Win-NoLoss-NACK">
<figure id="figure-30">
<div class="artwork art-text alignLeft" id="section-appendix.b-6.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4----->|
|-----W=0, FCN=3----->|
|-----W=0, FCN=2----->|
|-----W=0, FCN=1----->|
|-----W=0, FCN=0----->|
(no ACK)
|-----W=1, FCN=6----->|
|-----W=1, FCN=5----->|
|-----W=1, FCN=4----->|
|--W=1, FCN=7 + RCS-->| Integrity check: success
|<-- ACK, W=1, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-30" class="selfRef">Figure 30</a>:
<a href="#name-ack-on-error-mode-11-tiles-" class="selfRef">ACK-on-Error Mode, 11 Tiles, One Tile per SCHC Fragment, No Lost SCHC Fragment</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-7"><a href="#Fig-Example-Rel-Window-NACK-Loss" class="xref">Figure 31</a> illustrates the transmission in ACK-on-Error mode of a SCHC Packet fragmented in 11 tiles, with one tile per SCHC Fragment, WINDOW_SIZE=7, and three lost SCHC Fragments.<a href="#section-appendix.b-7" class="pilcrow">¶</a></p>
<span id="name-ack-on-error-mode-11-tiles-o"></span><div id="Fig-Example-Rel-Window-NACK-Loss">
<figure id="figure-31">
<div class="artwork art-text alignLeft" id="section-appendix.b-8.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->|
|-----W=0, FCN=3----->|
|-----W=0, FCN=2--X-->|
|-----W=0, FCN=1----->|
|-----W=0, FCN=0----->| 6543210
|<-- ACK, W=0, C=0 ---| Bitmap:1101011
|-----W=0, FCN=4----->|
|-----W=0, FCN=2----->|
(no ACK)
|-----W=1, FCN=6----->|
|-----W=1, FCN=5----->|
|-----W=1, FCN=4--X-->|
|- W=1, FCN=7 + RCS ->| Integrity check: failure
|<-- ACK, W=1, C=0 ---| C=0, Bitmap:1100001
|-----W=1, FCN=4----->| Integrity check: success
|<-- ACK, W=1, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-31" class="selfRef">Figure 31</a>:
<a href="#name-ack-on-error-mode-11-tiles-o" class="selfRef">ACK-on-Error Mode, 11 Tiles, One Tile per SCHC Fragment, Lost SCHC Fragments</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-9"><a href="#Figure-Example-ACK-on-Error-VarMTU" class="xref">Figure 32</a> shows an example of a transmission in ACK-on-Error mode of a SCHC Packet fragmented in
73 tiles, with N=5, WINDOW_SIZE=28, M=2, and three lost SCHC Fragments.<a href="#section-appendix.b-9" class="pilcrow">¶</a></p>
<span id="name-ack-on-error-mode-variable-"></span><div id="Figure-Example-ACK-on-Error-VarMTU">
<figure id="figure-32">
<div class="artwork art-text alignLeft" id="section-appendix.b-10.1">
<pre>
Sender Receiver
|-----W=0, FCN=27----->| 4 tiles sent
|-----W=0, FCN=23----->| 4 tiles sent
|-----W=0, FCN=19----->| 4 tiles sent
|-----W=0, FCN=15--X-->| 4 tiles sent (not received)
|-----W=0, FCN=11----->| 4 tiles sent
|-----W=0, FCN=7 ----->| 4 tiles sent
|-----W=0, FCN=3 ----->| 4 tiles sent
|-----W=1, FCN=27----->| 4 tiles sent
|-----W=1, FCN=23----->| 4 tiles sent
|-----W=1, FCN=19----->| 4 tiles sent
|-----W=1, FCN=15----->| 4 tiles sent
|-----W=1, FCN=11----->| 4 tiles sent
|-----W=1, FCN=7 ----->| 4 tiles sent
|-----W=1, FCN=3 --X-->| 4 tiles sent (not received)
|-----W=2, FCN=27----->| 4 tiles sent
|-----W=2, FCN=23----->| 4 tiles sent
^ |-----W=2, FCN=19----->| 1 tile sent
| |-----W=2, FCN=18----->| 1 tile sent
| |-----W=2, FCN=17----->| 1 tile sent
|-----W=2, FCN=16----->| 1 tile sent
s |-----W=2, FCN=15----->| 1 tile sent
m |-----W=2, FCN=14----->| 1 tile sent
a |-----W=2, FCN=13--X-->| 1 tile sent (not received)
l |-----W=2, FCN=12----->| 1 tile sent
l |---W=2, FCN=31 + RCS->| Integrity check: failure
e |<--- ACK, W=0, C=0 ---| C=0, Bitmap:1111111111110000111111111111
r |-----W=0, FCN=15----->| 1 tile sent
|-----W=0, FCN=14----->| 1 tile sent
L |-----W=0, FCN=13----->| 1 tile sent
2 |-----W=0, FCN=12----->| 1 tile sent
|<--- ACK, W=1, C=0 ---| C=0, Bitmap:1111111111111111111111110000
M |-----W=1, FCN=3 ----->| 1 tile sent
T |-----W=1, FCN=2 ----->| 1 tile sent
U |-----W=1, FCN=1 ----->| 1 tile sent
|-----W=1, FCN=0 ----->| 1 tile sent
| |<--- ACK, W=2, C=0 ---| C=0, Bitmap:1111111111111101000000000001
| |-----W=2, FCN=13----->| Integrity check: success
V |<--- ACK, W=2, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-32" class="selfRef">Figure 32</a>:
<a href="#name-ack-on-error-mode-variable-" class="selfRef">ACK-on-Error Mode, Variable MTU</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-11">In this example, the L2 MTU becomes reduced just before sending the "W=2, FCN=19" fragment, leaving space for only one tile in each forthcoming SCHC Fragment.
Before retransmissions, the 73 tiles are carried by a total of 25 SCHC Fragments, the last nine being of smaller size.<a href="#section-appendix.b-11" class="pilcrow">¶</a></p>
<p id="section-appendix.b-12">Note: other sequences of events (e.g., regarding when ACKs are sent by the Receiver) are also allowed by this specification. Profiles may restrict this flexibility.<a href="#section-appendix.b-12" class="pilcrow">¶</a></p>
<p id="section-appendix.b-13"><a href="#Fig-Example-Rel-Window-ACK-NoLoss" class="xref">Figure 33</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in 11 tiles, with one tile per SCHC Fragment, with N=3, WINDOW_SIZE=7, and no loss.<a href="#section-appendix.b-13" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-11-tiles-on"></span><div id="Fig-Example-Rel-Window-ACK-NoLoss">
<figure id="figure-33">
<div class="artwork art-text alignLeft" id="section-appendix.b-14.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4----->|
|-----W=0, FCN=3----->|
|-----W=0, FCN=2----->|
|-----W=0, FCN=1----->|
|-----W=0, FCN=0----->|
|<-- ACK, W=0, C=0 ---| Bitmap:1111111
|-----W=1, FCN=6----->|
|-----W=1, FCN=5----->|
|-----W=1, FCN=4----->|
|--W=1, FCN=7 + RCS-->| Integrity check: success
|<-- ACK, W=1, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-33" class="selfRef">Figure 33</a>:
<a href="#name-ack-always-mode-11-tiles-on" class="selfRef">ACK-Always Mode, 11 Tiles, One Tile per SCHC Fragment, No Loss</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-15"><a href="#Fig-Example-Rel-Window-ACK-Loss" class="xref">Figure 34</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in 11 tiles, with one tile per SCHC Fragment, N=3, WINDOW_SIZE=7 and three lost SCHC Fragments.<a href="#section-appendix.b-15" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-11-tiles-one"></span><div id="Fig-Example-Rel-Window-ACK-Loss">
<figure id="figure-34">
<div class="artwork art-text alignLeft" id="section-appendix.b-16.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->|
|-----W=0, FCN=3----->|
|-----W=0, FCN=2--X-->|
|-----W=0, FCN=1----->|
|-----W=0, FCN=0----->| 6543210
|<-- ACK, W=0, C=0 ---| Bitmap:1101011
|-----W=0, FCN=4----->|
|-----W=0, FCN=2----->|
|<-- ACK, W=0, C=0 ---| Bitmap:1111111
|-----W=1, FCN=6----->|
|-----W=1, FCN=5----->|
|-----W=1, FCN=4--X-->|
|--W=1, FCN=7 + RCS-->| Integrity check: failure
|<-- ACK, W=1, C=0 ---| C=0, Bitmap:11000001
|-----W=1, FCN=4----->| Integrity check: success
|<-- ACK, W=1, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-34" class="selfRef">Figure 34</a>:
<a href="#name-ack-always-mode-11-tiles-one" class="selfRef">ACK-Always Mode, 11 Tiles, One Tile per SCHC Fragment, Three Lost SCHC Fragments</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-17"><a href="#Fig-Example-Rel-Window-ACK-Loss-Last-A" class="xref">Figure 35</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in six tiles,
with one tile per SCHC Fragment, N=3, WINDOW_SIZE=7, three lost SCHC Fragments, and only one retry needed to recover each lost SCHC Fragment.<a href="#section-appendix.b-17" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-six-tiles-o"></span><div id="Fig-Example-Rel-Window-ACK-Loss-Last-A">
<figure id="figure-35">
<div class="artwork art-text alignLeft" id="section-appendix.b-18.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + RCS-->| Integrity check: failure
|<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001
|-----W=0, FCN=4----->| Integrity check: failure
|-----W=0, FCN=3----->| Integrity check: failure
|-----W=0, FCN=2----->| Integrity check: success
|<-- ACK, W=0, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-35" class="selfRef">Figure 35</a>:
<a href="#name-ack-always-mode-six-tiles-o" class="selfRef">ACK-Always Mode, Six Tiles, One Tile per SCHC Fragment, Three Lost SCHC Fragments</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-19"><a href="#Fig-Example-Rel-Window-ACK-Loss-Last-B" class="xref">Figure 36</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in six tiles,
with one tile per SCHC Fragment, N=3, WINDOW_SIZE=7, three lost SCHC Fragments, and the second SCHC ACK lost.<a href="#section-appendix.b-19" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-six-tiles-on"></span><div id="Fig-Example-Rel-Window-ACK-Loss-Last-B">
<figure id="figure-36">
<div class="artwork art-text alignLeft" id="section-appendix.b-20.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + RCS-->| Integrity check: failure
|<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001
|-----W=0, FCN=4----->| Integrity check: failure
|-----W=0, FCN=3----->| Integrity check: failure
|-----W=0, FCN=2----->| Integrity check: success
|<-X-ACK, W=0, C=1 ---| C=1
timeout | |
|--- W=0, ACK REQ --->| ACK REQ
|<-- ACK, W=0, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-36" class="selfRef">Figure 36</a>:
<a href="#name-ack-always-mode-six-tiles-on" class="selfRef">ACK-Always Mode, Six Tiles, One Tile per SCHC Fragment, SCHC ACK Loss</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-21"><a href="#Fig-Example-Rel-Window-ACK-Loss-Last-C" class="xref">Figure 37</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in six tiles,
with N=3, WINDOW_SIZE=7, with three lost SCHC Fragments, and one retransmitted SCHC Fragment lost again.<a href="#section-appendix.b-21" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-six-tiles-r"></span><div id="Fig-Example-Rel-Window-ACK-Loss-Last-C">
<figure id="figure-37">
<div class="artwork art-text alignLeft" id="section-appendix.b-22.1">
<pre>
Sender Receiver
|-----W=0, FCN=6----->|
|-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + RCS-->| Integrity check: failure
|<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001
|-----W=0, FCN=4----->| Integrity check: failure
|-----W=0, FCN=3----->| Integrity check: failure
|-----W=0, FCN=2--X-->|
timeout| |
|--- W=0, ACK REQ --->| ACK REQ
|<-- ACK, W=0, C=0 ---| C=0, Bitmap: 1111101
|-----W=0, FCN=2----->| Integrity check: success
|<-- ACK, W=0, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-37" class="selfRef">Figure 37</a>:
<a href="#name-ack-always-mode-six-tiles-r" class="selfRef">ACK-Always Mode, Six Tiles, Retransmitted SCHC Fragment Lost Again</a>
</figcaption></figure>
</div>
<p id="section-appendix.b-23"><a href="#Fig-Example-MaxWindFCN" class="xref">Figure 38</a> illustrates the transmission in ACK-Always mode of a SCHC Packet fragmented in 28 tiles,
with one tile per SCHC Fragment, N=5, WINDOW_SIZE=24, and two lost SCHC Fragments.<a href="#section-appendix.b-23" class="pilcrow">¶</a></p>
<span id="name-ack-always-mode-28-tiles-on"></span><div id="Fig-Example-MaxWindFCN">
<figure id="figure-38">
<div class="artwork art-text alignLeft" id="section-appendix.b-24.1">
<pre>
Sender Receiver
|-----W=0, FCN=23----->|
|-----W=0, FCN=22----->|
|-----W=0, FCN=21--X-->|
|-----W=0, FCN=20----->|
|-----W=0, FCN=19----->|
|-----W=0, FCN=18----->|
|-----W=0, FCN=17----->|
|-----W=0, FCN=16----->|
|-----W=0, FCN=15----->|
|-----W=0, FCN=14----->|
|-----W=0, FCN=13----->|
|-----W=0, FCN=12----->|
|-----W=0, FCN=11----->|
|-----W=0, FCN=10--X-->|
|-----W=0, FCN=9 ----->|
|-----W=0, FCN=8 ----->|
|-----W=0, FCN=7 ----->|
|-----W=0, FCN=6 ----->|
|-----W=0, FCN=5 ----->|
|-----W=0, FCN=4 ----->|
|-----W=0, FCN=3 ----->|
|-----W=0, FCN=2 ----->|
|-----W=0, FCN=1 ----->|
|-----W=0, FCN=0 ----->|
| |
|<--- ACK, W=0, C=0 ---| Bitmap:110111111111101111111111
|-----W=0, FCN=21----->|
|-----W=0, FCN=10----->|
|<--- ACK, W=0, C=0 ---| Bitmap:111111111111111111111111
|-----W=1, FCN=23----->|
|-----W=1, FCN=22----->|
|-----W=1, FCN=21----->|
|--W=1, FCN=31 + RCS-->| Integrity check: success
|<--- ACK, W=1, C=1 ---| C=1
(End)</pre>
</div>
<figcaption><a href="#figure-38" class="selfRef">Figure 38</a>:
<a href="#name-ack-always-mode-28-tiles-on" class="selfRef">ACK-Always Mode, 28 Tiles, One Tile per SCHC Fragment, Lost SCHC Fragments</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="FSM">
<section id="section-appendix.c">
<h2 id="name-fragmentation-state-machine">
<a href="#section-appendix.c" class="section-number selfRef">Appendix C. </a><a href="#name-fragmentation-state-machine" class="section-name selfRef">Fragmentation State Machines</a>
</h2>
<p id="section-appendix.c-1">The fragmentation state machines of the sender and the receiver, one for each of the different reliability modes, are described in the following figures:<a href="#section-appendix.c-1" class="pilcrow">¶</a></p>
<span id="name-sender-state-machine-for-th"></span><div id="Fig-NoACKModeSnd">
<figure id="figure-39">
<div class="artwork art-text alignLeft" id="section-appendix.c-2.1">
<pre>
+===========+
+------------+ Init |
| FCN=0 +===========+
| No Window
| No Bitmap
| +-------+
| +========+==+ | More Fragments
| | | <--+ ~~~~~~~~~~~~~~~~~~~~
+--------> | Send | send Fragment (FCN=0)
+===+=======+
| last fragment
| ~~~~~~~~~~~~
| FCN = 1
v send fragment+RCS
+============+
| END |
+============+</pre>
</div>
<figcaption><a href="#figure-39" class="selfRef">Figure 39</a>:
<a href="#name-sender-state-machine-for-th" class="selfRef">Sender State Machine for the No-ACK Mode</a>
</figcaption></figure>
</div>
<span id="name-receiver-state-machine-for-"></span><div id="Fig-NoACKModeRcv">
<figure id="figure-40">
<div class="artwork art-text alignLeft" id="section-appendix.c-3.1">
<pre>
+------+ Not All-1
+==========+=+ | ~~~~~~~~~~~~~~~~~~~
| + <--+ set Inactivity Timer
| RCV Frag +-------+
+=+===+======+ |All-1 &
All-1 & | | |RCS correct
RCS wrong | |Inactivity |
| |Timer Exp. |
v | |
+==========++ | v
| Error |<-+ +========+==+
+===========+ | END |
+===========+</pre>
</div>
<figcaption><a href="#figure-40" class="selfRef">Figure 40</a>:
<a href="#name-receiver-state-machine-for-" class="selfRef">Receiver State Machine for the No-ACK Mode</a>
</figcaption></figure>
</div>
<span id="name-sender-state-machine-for-the"></span><div id="Fig-ACKAlwaysSnd">
<figure id="figure-41">
<div class="artwork art-text alignLeft" id="section-appendix.c-4.1">
<pre>
+=======+
| INIT | FCN!=0 & more frags
| | ~~~~~~~~~~~~~~~~~~~~~~
+======++ +--+ send Window + frag(FCN)
W=0 | | | FCN-
Clear lcl_bm | | v set lcl_bm
FCN=max value | ++==+========+
+> | |
+---------------------> | SEND |
| +==+===+=====+
| FCN==0 & more frags | | last frag
| ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~
| set lcl_bm | | set lcl_bm
| send wnd + frag(all-0) | | send wnd+frag(all-1)+RCS
| set Retrans_Timer | | set Retrans_Timer
| | |
|Recv_wnd == wnd & | |
|lcl_bm==recv_bm & | | +----------------------+
|more frag | | | lcl_bm!=rcv-bm |
|~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~ |
|Stop Retrans_Timer | | | Attempt++ v
|clear lcl_bm v v | +=====+=+
|window=next_window +====+===+==+===+ |Resend |
+---------------------+ | |Missing|
+----+ Wait | |Frag |
not expected wnd | | Bitmap | +=======+
~~~~~~~~~~~~~~~~ +--->+ ++Retrans_Timer Exp |
discard frag +==+=+===+=+==+=+| ~~~~~~~~~~~~~~~~~ |
| | | ^ ^ |reSend(empty)All-* |
| | | | | |Set Retrans_Timer |
| | | | +--+Attempt++ |
C_bit==1 & | | | +-------------------------+
Recv_window==window & | | | all missing frags sent
no more frag| | | ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~| | | Set Retrans_Timer
Stop Retrans_Timer| | |
+=============+ | | |
| END +<--------+ | |
+=============+ | | Attempt > MAX_ACK_REQUESTS
All-1 Window & | | ~~~~~~~~~~~~~~~~~~
C_bit ==0 & | v Send Abort
lcl_bm==recv_bm | +=+===========+
~~~~~~~~~~~~ +>| ERROR |
Send Abort +=============+</pre>
</div>
<figcaption><a href="#figure-41" class="selfRef">Figure 41</a>:
<a href="#name-sender-state-machine-for-the" class="selfRef">Sender State Machine for the ACK-Always Mode</a>
</figcaption></figure>
</div>
<span id="name-receiver-state-machine-for-t"></span><div id="Fig-ACKAlwaysRcv">
<figure id="figure-42">
<div class="artwork art-text alignLeft" id="section-appendix.c-5.1">
<pre>
Not All- & w=expected +---+ +---+w = Not expected
~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~
Set lcl_bm(FCN) | v v |discard
++===+===+===+=+
+---------------------+ Rcv +--->* ABORT
| +------------------+ Window |
| | +=====+==+=====+
| | All-0 & w=expect | ^ w =next & not-All
| | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~
| | set lcl_bm(FCN) | |expected = next window
| | send lcl_bm | |Clear lcl_bm
| | | |
| | w=expected & not-All | |
| | ~~~~~~~~~~~~~~~~~~ | |
| | set lcl_bm(FCN)+-+ | | +--+ w=next & All-0
| | if lcl_bm full | | | | | | ~~~~~~~~~~~~~~~
| | send lcl_bm | | | | | | expected = nxt wnd
| | v | v | | | Clear lcl_bm
| |w=expected& All-1 +=+=+=+==+=++ | set lcl_bm(FCN)
| | ~~~~~~~~~~~ +->+ Wait +<+ send lcl_bm
| | discard +--| Next |
| | All-0 +---------+ Window +--->* ABORT
| | ~~~~~ +-------->+========+=++
| | snd lcl_bm All-1 & w=next| | All-1 & w=nxt
| | & RCS wrong| | & RCS right
| | ~~~~~~~~~~~~~~~~~| | ~~~~~~~~~~~~~~~~~~
| | set lcl_bm(FCN)| |set lcl_bm(FCN)
| | send lcl_bm| |send lcl_bm
| | | +----------------------+
| |All-1 & w=expected | |
| |& RCS wrong v +---+ w=expected & |
| |~~~~~~~~~~~~~~~~~~~~ +====+=====+ | RCS wrong |
| |set lcl_bm(FCN) | +<+ ~~~~~~~~~~~~~~ |
| |send lcl_bm | Wait End | set lcl_bm(FCN)|
| +--------------------->+ +--->* ABORT |
| +===+====+=+-+ All-1&RCS wrong|
| | ^ | ~~~~~~~~~~~~~~~|
| w=expected & RCS right | +---+ send lcl_bm |
| ~~~~~~~~~~~~~~~~~~~~~~ | |
| set lcl_bm(FCN) | +-+ Not All-1 |
| send lcl_bm | | | ~~~~~~~~~ |
| | | | discard |
|All-1&w=expected & RCS right | | | |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v | v +----+All-1 |
|set lcl_bm(FCN) +=+=+=+=+==+ |~~~~~~~~~ |
|send lcl_bm | +<+Send lcl_bm |
+-------------------------->+ END | |
+==========+<---------------+
--->* ABORT
In any state
on receiving a SCHC ACK REQ
Send a SCHC ACK for the current window</pre>
</div>
<figcaption><a href="#figure-42" class="selfRef">Figure 42</a>:
<a href="#name-receiver-state-machine-for-t" class="selfRef">Receiver State Machine for the ACK-Always Mode</a>
</figcaption></figure>
</div>
<span id="name-sender-state-machine-for-the-"></span><div id="Fig-ACKonerrorSnd">
<figure id="figure-43">
<div class="artwork art-text alignLeft" id="section-appendix.c-6.1">
<pre>
+=======+
| |
| INIT |
| | FCN!=0 & more frags
+======++ ~~~~~~~~~~~~~~~~~~~~~~
Frag RuleID trigger | +--+ Send cur_W + frag(FCN);
~~~~~~~~~~~~~~~~~~~ | | | FCN--;
cur_W=0; FCN=max_value;| | | set [cur_W, cur_Bmp]
clear [cur_W, Bmp_n];| | v
clear rcv_Bmp | ++==+==========+ **BACK_TO_SEND
+->+ | cur_W==rcv_W &
**BACK_TO_SEND | SEND | [cur_W,Bmp_n]==rcv_Bmp
+-------------------------->+ | & more frags
| +----------------------->+ | ~~~~~~~~~~~~
| | ++==+==========+ cur_W++;
| | FCN==0 & more frags| |last frag clear [cur_W, Bmp_n]
| | ~~~~~~~~~~~~~~~~~~~~~~~| |~~~~~~~~~
| | set cur_Bmp; | |set [cur_W, Bmp_n];
| |send cur_W + frag(All-0);| |send cur_W + frag(All-1)+RCS;
| | set Retrans_Timer| |set Retrans_Timer
| | | | +---------------------------------+
| | | | |cur_W == |
| |Retrans_Timer expires & | | | rcv_W & [cur_W,Bmp_n]!=rcv_Bmp|
| |more Frags | | | ~~~~~~~~~~~~~~~~~~~ |
| |~~~~~~~~~~~~~~~~~~~~ | | | Attempts++; W=cur_W |
| |stop Retrans_Timer; | | | +--------+ rcv_W==Wn &|
| |[cur_W,Bmp_n]==cur_Bmp; v v | | v [Wn,Bmp_n]!=rcv_Bmp|
| |cur_W++ +=====+==+=+=+==+ +=+=========+ ~~~~~~~~~~~|
| +-------------------+ | | Resend | Attempts++;|
+----------------------+ Wait x ACK | | Missing | W=Wn |
+--------------------->+ | | Frags(W) +<-----------+
| rcv_W==Wn &+-+ | +======+====+
| [Wn,Bmp_n]!=rcv_Bmp| ++=+===+===+==+=+ |
| ~~~~~~~~~~~~~~| ^ | | | ^ |
| send (cur_W,+--+ | | | +------------+
| ALL-0-empty) | | | all missing frag sent(W)
| | | | ~~~~~~~~~~~~~~~~~
| Retrans_Timer expires &| | | set Retrans_Timer
| No more Frags| | |
| ~~~~~~~~~~~~~~| | |
| stop Retrans_Timer;| | |
|(re)send frag(All-1)+RCS | | |
+-------------------------+ | |
cur_W==rcv_W&| |
[cur_W,Bmp_n]==rcv_Bmp&| | Attempts > MAX_ACK_REQUESTS
No more Frags & RCS flag==OK| | ~~~~~~~~~~
~~~~~~~~~~~~~~~~~~| | send Abort
+=========+stop Retrans_Timer| | +===========+
| END +<-----------------+ +->+ ERROR |
+=========+ +===========+</pre>
</div>
<figcaption><a href="#figure-43" class="selfRef">Figure 43</a>:
<a href="#name-sender-state-machine-for-the-" class="selfRef">Sender State Machine for the ACK-on-Error Mode</a>
</figcaption></figure>
</div>
<p id="section-appendix.c-7">This is an example only. It is not normative.
The specification in <a href="#ACK-on-Error-sender" class="xref">Section 8.4.3.1</a> allows for sequences of operations different from the one shown here.<a href="#section-appendix.c-7" class="pilcrow">¶</a></p>
<div class="artwork art-text alignLeft" id="section-appendix.c-8">
<pre>
+=======+ New frag RuleID received
| | ~~~~~~~~~~~~~
| INIT +-------+cur_W=0;clear([cur_W,Bmp_n]);
+=======+ |sync=0
|
Not All* & rcv_W==cur_W+---+ | +--+
~~~~~~~~~~~~~~~~~~~~ | | | | (E)
set[cur_W,Bmp_n(FCN)]| v v v |
++===+=+=+==+=+
+----------------------+ +--+ All-0&Full[cur_W,Bmp_n]
| ABORT *<---+ Rcv Window | | ~~~~~~~~~~
| +-------------------+ +<-+ cur_W++;set Inact_timer;
| | +->+=+=+=+=+=+===+ clear [cur_W,Bmp_n]
| | All-0 empty(Wn)| | | | ^ ^
| | ~~~~~~~~~~~~~~ +----+ | | | |rcv_W==cur_W & sync==0;
| | sendACK([Wn,Bmp_n]) | | | |& Full([cur_W,Bmp_n])
| | | | | |& All* || last_miss_frag
| | | | | |~~~~~~~~~~~~~~~~~~~~~~
| | All* & rcv_W==cur_W|(C)| |sendACK([cur_W,Bmp_n]);
| | & sync==0| | | |cur_W++; clear([cur_W,Bmp_n])
| |&no_full([cur_W,Bmp_n])| |(E)|
| | ~~~~~~~~~~~~~~~~ | | | | +========+
| | sendACK([cur_W,Bmp_n])| | | | | Error/ |
| | | | | | +----+ | Abort |
| | v v | | | | +===+====+
| | +===+=+=+=+===+=+ (D) ^
| | +--+ Wait x | | |
| | All-0 empty(Wn)+->| Missing Frags |<-+ |
| | ~~~~~~~~~~~~~~ +=============+=+ |
| | sendACK([Wn,Bmp_n]) +--------------+
| | *ABORT
v v
(A)(B)
(D) All* || last_miss_frag
(C) All* & sync>0 & rcv_W!=cur_W & sync>0
~~~~~~~~~~~~ & Full([rcv_W,Bmp_n])
Wn=oldest[not full(W)]; ~~~~~~~~~~~~~~~~~~~~
sendACK([Wn,Bmp_n]) Wn=oldest[not full(W)];
sendACK([Wn,Bmp_n]);sync--
ABORT-->* Uplink Only &
Inact_Timer expires
(E) Not All* & rcv_W!=cur_W || Attempts > MAX_ACK_REQUESTS
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
sync++; cur_W=rcv_W; send Abort
set[cur_W,Bmp_n(FCN)]</pre><a href="#section-appendix.c-8" class="pilcrow">¶</a>
</div>
<span id="name-receiver-state-machine-for-th"></span><div id="Fig-ACKonerrorRcv">
<figure id="figure-44">
<div class="artwork art-text alignLeft" id="section-appendix.c-9.1">
<pre>
(A)(B)
| |
| | All-1 & rcv_W==cur_W & RCS!=OK All-0 empty(Wn)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-+ ~~~~~~~~~~
| | sendACK([cur_W,Bmp_n],C=0) | v sendACK([Wn,Bmp_n])
| | +===========+=++
| +--------------------->+ Wait End +-+
| +=====+=+====+=+ | All-1
| rcv_W==cur_W & RCS==OK | | ^ | & rcv_W==cur_W
| ~~~~~~~~~~~~~~~~~~~~~~ | | +---+ & RCS!=OK
| sendACK([cur_W,Bmp_n],C=1) | | ~~~~~~~~~~~~~~~~~~~
| | | sendACK([cur_W,Bmp_n],C=0);
| | | Attempts++
|All-1 & Full([cur_W,Bmp_n]) | |
|& RCS==OK & sync==0 | +-->* ABORT
|~~~~~~~~~~~~~~~~~~~ v
|sendACK([cur_W,Bmp_n],C=1) +=+=========+
+---------------------------->+ END |
+===========+</pre>
</div>
<figcaption><a href="#figure-44" class="selfRef">Figure 44</a>:
<a href="#name-receiver-state-machine-for-th" class="selfRef">Receiver State Machine for the ACK-on-Error Mode</a>
</figcaption></figure>
</div>
</section>
</div>
<div id="SCHCParams">
<section id="section-appendix.d">
<h2 id="name-schc-parameters">
<a href="#section-appendix.d" class="section-number selfRef">Appendix D. </a><a href="#name-schc-parameters" class="section-name selfRef">SCHC Parameters</a>
</h2>
<p id="section-appendix.d-1">This section lists the information that needs to be provided in the LPWAN technology-specific documents.<a href="#section-appendix.d-1" class="pilcrow">¶</a></p>
<ul>
<li id="section-appendix.d-2.1">Most common uses cases, deployment scenarios.<a href="#section-appendix.d-2.1" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-2.2">Mapping of the SCHC architectural elements onto the LPWAN architecture.<a href="#section-appendix.d-2.2" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-2.3">Assessment of LPWAN integrity checking.<a href="#section-appendix.d-2.3" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-2.4">Various potential channel conditions for the technology and the corresponding recommended use of SCHC C/D and SCHC F/R.<a href="#section-appendix.d-2.4" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-appendix.d-3">This section lists the parameters that need to be defined in the Profile.<a href="#section-appendix.d-3" class="pilcrow">¶</a></p>
<ul>
<li id="section-appendix.d-4.1">RuleID numbering scheme, fixed-size or variable-size RuleIDs, number of Rules, the way the RuleID is transmitted.<a href="#section-appendix.d-4.1" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.2">maximum packet size that should ever be reconstructed by SCHC decompression (MAX_PACKET_SIZE). See <a href="#SecConsiderations" class="xref">Section 12</a>.<a href="#section-appendix.d-4.2" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.3">Padding: size of the L2 Word (for most LPWAN technologies, this would be a byte; for some technologies, a bit).<a href="#section-appendix.d-4.3" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4">
<p id="section-appendix.d-4.4.1">Decision to use SCHC fragmentation mechanism or not. If yes, the document must describe:<a href="#section-appendix.d-4.4.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-appendix.d-4.4.2.1">reliability mode(s) used, in which cases (e.g., based on link channel condition).<a href="#section-appendix.d-4.4.2.1" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.2">RuleID values assigned to each mode in use.<a href="#section-appendix.d-4.4.2.2" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.3">presence and number of bits for DTag (T) for each RuleID value, lifetime of DTag at the receiver.<a href="#section-appendix.d-4.4.2.3" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.4">support for interleaved packet transmission, to what extent.<a href="#section-appendix.d-4.4.2.4" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.5">WINDOW_SIZE, for modes that use windows.<a href="#section-appendix.d-4.4.2.5" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.6">number of bits for W (M) for each RuleID value, for modes that use windows.<a href="#section-appendix.d-4.4.2.6" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.7">number of bits for FCN (N) for each RuleID value, meaning of the FCN values.<a href="#section-appendix.d-4.4.2.7" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.8">what makes an All-0 SCHC Fragment and a SCHC ACK REQ distinguishable (see <a href="#NotLastFrag" class="xref">Section 8.3.1.1</a>).<a href="#section-appendix.d-4.4.2.8" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.9">what makes an All-1 SCHC Fragment and a SCHC Sender-Abort distinguishable (see <a href="#LastFrag" class="xref">Section 8.3.1.2</a>).<a href="#section-appendix.d-4.4.2.9" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.10">for RuleIDs that use ACK-on-Error mode: when the last tile of a SCHC Packet is to be sent in a Regular SCHC Fragment, alone in an All-1 SCHC Fragment or with any of these two methods.<a href="#section-appendix.d-4.4.2.10" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.11">for RuleIDs that use ACK-on-Error mode: if the penultimate tile of a SCHC Packet is of the regular size only or if it can also be one L2 Word shorter.<a href="#section-appendix.d-4.4.2.11" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.12">for RuleIDs that use ACK-on-Error mode: times at which the sender must listen for SCHC ACKs.<a href="#section-appendix.d-4.4.2.12" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.13">size of RCS and algorithm for its computation, for each RuleID, if different from the default CRC32. Byte fill-up with zeroes or other mechanism, to be specified. Support for UDP checksum elision.<a href="#section-appendix.d-4.4.2.13" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.14">Retransmission Timer duration for each RuleID value, if applicable to the SCHC F/R mode.<a href="#section-appendix.d-4.4.2.14" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.15">Inactivity Timer duration for each RuleID value, if applicable to the SCHC F/R mode.<a href="#section-appendix.d-4.4.2.15" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-4.4.2.16">MAX_ACK_REQUESTS value for each RuleID value, if applicable to the SCHC F/R mode.<a href="#section-appendix.d-4.4.2.16" class="pilcrow">¶</a>
</li>
</ul>
</li>
<li id="section-appendix.d-4.5">if L2 Word is wider than a bit and SCHC fragmentation is used, value of the padding bits (0 or 1).<a href="#section-appendix.d-4.5" class="pilcrow">¶</a>
</li>
</ul>
<p id="section-appendix.d-5">A Profile may define a delay to be added after each SCHC message transmission for compliance with local regulations or other constraints imposed by the applications.<a href="#section-appendix.d-5" class="pilcrow">¶</a></p>
<ul>
<li id="section-appendix.d-6.1">In some LPWAN technologies, as part of energy-saving techniques,
Downlink transmission is only possible immediately after an Uplink transmission.
In order to avoid potentially high delay in the Downlink transmission of a fragmented SCHC Packet,
the SCHC Fragment receiver may perform an Uplink transmission as soon as possible after reception of a SCHC
Fragment that is not the last one.
Such Uplink transmission may be triggered by the L2 (e.g., an L2 ACK sent in response to a SCHC Fragment encapsulated
in a L2 PDU that requires an L2 ACK) or it may be triggered from an upper layer. See <a href="#AsymLinks" class="xref">Appendix F</a>.<a href="#section-appendix.d-6.1" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-6.2">
<p id="section-appendix.d-6.2.1">the following parameters need to be addressed in documents other than this one but not necessarily in
the LPWAN technology-specific documents:<a href="#section-appendix.d-6.2.1" class="pilcrow">¶</a></p>
<ul>
<li id="section-appendix.d-6.2.2.1">The way the Contexts are provisioned.<a href="#section-appendix.d-6.2.2.1" class="pilcrow">¶</a>
</li>
<li id="section-appendix.d-6.2.2.2">The way the Rules are generated.<a href="#section-appendix.d-6.2.2.2" class="pilcrow">¶</a>
</li>
</ul>
</li>
</ul>
</section>
</div>
<div id="MultWinSizes">
<section id="section-appendix.e">
<h2 id="name-supporting-multiple-window-">
<a href="#section-appendix.e" class="section-number selfRef">Appendix E. </a><a href="#name-supporting-multiple-window-" class="section-name selfRef">Supporting Multiple Window Sizes for Fragmentation</a>
</h2>
<p id="section-appendix.e-1">For ACK-Always or ACK-on-Error, implementers may opt to support a single window size or multiple window sizes. The latter, when feasible, may provide performance optimizations. For example, a large WINDOW_SIZE should be used for packets that need to be split into a large number of tiles. However, when the number of tiles required to carry a packet is low, a smaller WINDOW_SIZE and, thus, a shorter Bitmap, may be sufficient to provide reception status on all tiles. If multiple window sizes are supported, the RuleID signals what WINDOW_SIZE is in use for a specific packet transmission.<a href="#section-appendix.e-1" class="pilcrow">¶</a></p>
</section>
</div>
<div id="AsymLinks">
<section id="section-appendix.f">
<h2 id="name-ack-always-and-ack-on-error">
<a href="#section-appendix.f" class="section-number selfRef">Appendix F. </a><a href="#name-ack-always-and-ack-on-error" class="section-name selfRef">ACK-Always and ACK-on-Error on Quasi-Bidirectional Links</a>
</h2>
<p id="section-appendix.f-1">The ACK-Always and ACK-on-Error modes of SCHC F/R are bidirectional protocols:
they require a feedback path from the reassembler to the fragmenter.<a href="#section-appendix.f-1" class="pilcrow">¶</a></p>
<p id="section-appendix.f-2">Some LPWAN technologies provide quasi-bidirectional connectivity,
whereby a Downlink transmission from the Network Infrastructure can only take place
right after an Uplink transmission by the Dev.<a href="#section-appendix.f-2" class="pilcrow">¶</a></p>
<p id="section-appendix.f-3">When using SCHC F/R to send fragmented SCHC Packets Downlink over these quasi-bidirectional links,
the following situation may arise: if an Uplink SCHC ACK is lost,
the SCHC ACK REQ message by the sender could be stuck indefinitely in the Downlink queue
at the Network Infrastructure, waiting for a transmission opportunity.<a href="#section-appendix.f-3" class="pilcrow">¶</a></p>
<p id="section-appendix.f-4">There are many ways by which this deadlock can be avoided.
The Dev application might be sending recurring Uplink messages such as keep-alive,
or the Dev application stack might be sending other recurring Uplink messages as part of its operation.
However, these are out of the control of this generic SCHC specification.<a href="#section-appendix.f-4" class="pilcrow">¶</a></p>
<p id="section-appendix.f-5">In order to cope with quasi-bidirectional links, a SCHC-over-foo specification may want to amend
the SCHC F/R specification to add a timer-based retransmission of the SCHC ACK.
Below is an example of the suggested behavior for ACK-Always mode.
Because it is an example, <span>[<a href="#RFC2119" class="xref">RFC2119</a>]</span> language is deliberately not used here.<a href="#section-appendix.f-5" class="pilcrow">¶</a></p>
<p id="section-appendix.f-6">For Downlink transmission of a fragmented SCHC Packet in ACK-Always mode, the SCHC Fragment receiver may support timer-based SCHC ACK retransmission. In this mechanism, the SCHC Fragment receiver initializes and starts a timer (the UplinkACK Timer) after the transmission of a SCHC ACK, except when the SCHC ACK is sent in response to the last SCHC Fragment of a packet (All-1 fragment). In the latter case, the SCHC Fragment receiver does not start a timer after transmission of the SCHC ACK.<a href="#section-appendix.f-6" class="pilcrow">¶</a></p>
<p id="section-appendix.f-7">If, after transmission of a SCHC ACK that is not an All-1 fragment, and before expiration of the corresponding UplinkACK timer, the SCHC Fragment receiver receives a SCHC Fragment that belongs to the current window (e.g., a missing SCHC Fragment from the current window) or to the next window, the UplinkACK timer for the SCHC ACK is stopped. However, if the UplinkACK timer expires, the SCHC ACK is resent and the UplinkACK timer is reinitialized and restarted.<a href="#section-appendix.f-7" class="pilcrow">¶</a></p>
<p id="section-appendix.f-8">The default initial value for the UplinkACK Timer, as well as the maximum number of retries for a specific SCHC ACK, denoted MAX_ACK_REQUESTS, is to be defined in a Profile.
The initial value of the UplinkACK timer is expected to be greater than that of the Retransmission timer,
in order to make sure that a (buffered) SCHC Fragment to be retransmitted finds an opportunity for that transmission.
One exception to this recommendation is the special case of the All-1 SCHC Fragment transmission.<a href="#section-appendix.f-8" class="pilcrow">¶</a></p>
<p id="section-appendix.f-9">When the SCHC Fragment sender transmits the All-1 SCHC Fragment,
it starts its Retransmission Timer with a large timeout value (e.g., several times that of the initial UplinkACK Timer).
If a SCHC ACK is received before expiration of this timer,
the SCHC Fragment sender retransmits any lost SCHC Fragments as reported by the SCHC ACK,
or if the SCHC ACK confirms successful reception of all SCHC Fragments of the last window,
the transmission of the fragmented SCHC Packet is considered complete.
If the timer expires, and no SCHC ACK has been received since the start of the timer,
the SCHC Fragment sender assumes that the All-1 SCHC Fragment has been successfully received
(and possibly, the last SCHC ACK has been lost: this mechanism assumes that the Retransmission Timer for the All-1 SCHC Fragment is long enough to allow several SCHC ACK retries if the All-1 SCHC Fragment has not been received by the SCHC Fragment receiver, and it also assumes that it is unlikely that several ACKs become all lost).<a href="#section-appendix.f-9" class="pilcrow">¶</a></p>
</section>
</div>
<div id="acknowledgements">
<section id="section-appendix.g">
<h2 id="name-acknowledgements">
<a href="#name-acknowledgements" class="section-name selfRef">Acknowledgements</a>
</h2>
<p id="section-appendix.g-1">Thanks to (in alphabetical order)
<span class="contact-name">Sergio Aguilar Romero</span>,
<span class="contact-name">David Black</span>,
<span class="contact-name">Carsten Bormann</span>,
<span class="contact-name">Deborah Brungard</span>,
<span class="contact-name">Brian Carpenter</span>,
<span class="contact-name">Philippe Clavier</span>,
<span class="contact-name">Alissa Cooper</span>,
<span class="contact-name">Roman Danyliw</span>,
<span class="contact-name">Daniel Ducuara Beltran</span>,
<span class="contact-name">Diego Dujovne</span>,
<span class="contact-name">Eduardo Ingles Sanchez</span>,
<span class="contact-name">Rahul Jadhav</span>,
<span class="contact-name">Benjamin Kaduk</span>,
<span class="contact-name">Arunprabhu Kandasamy</span>,
<span class="contact-name">Suresh Krishnan</span>,
<span class="contact-name">Mirja Kuehlewind</span>,
<span class="contact-name">Barry Leiba</span>,
<span class="contact-name">Sergio Lopez Bernal</span>,
<span class="contact-name">Antoni Markovski</span>,
<span class="contact-name">Alexey Melnikov</span>,
<span class="contact-name">Georgios Papadopoulos</span>,
<span class="contact-name">Alexander Pelov</span>,
<span class="contact-name">Charles Perkins</span>,
<span class="contact-name">Edgar Ramos</span>,
<span class="contact-name">Alvaro Retana</span>,
<span class="contact-name">Adam Roach</span>,
<span class="contact-name">Shoichi Sakane</span>,
<span class="contact-name">Joseph Salowey</span>,
<span class="contact-name">Pascal Thubert</span>,
and <span class="contact-name">Eric Vyncke</span>
for useful design considerations, reviews and comments.<a href="#section-appendix.g-1" class="pilcrow">¶</a></p>
<p id="section-appendix.g-2"><span class="contact-name">Carles Gomez</span> has been funded in part by the Spanish Government (Ministerio de Educacion, Cultura y Deporte) through the Jose
Castillejo grant CAS15/00336 and by the ERDF and the Spanish Government through project TEC2016-79988-P. Part of his contribution to this work has been carried out during his stay as a visiting scholar at the Computer Laboratory of the University of Cambridge.<a href="#section-appendix.g-2" class="pilcrow">¶</a></p>
</section>
</div>
<div id="authors-addresses">
<section id="section-appendix.h">
<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">Ana Minaburo</span></div>
<div dir="auto" class="left"><span class="org">Acklio</span></div>
<div dir="auto" class="left"><span class="street-address">1137A avenue des Champs Blancs</span></div>
<div dir="auto" class="left"><span class="locality">35510 Cesson-Sevigne Cedex</span></div>
<div dir="auto" class="left"><span class="country-name">France</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:ana@ackl.io" class="email">ana@ackl.io</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Laurent Toutain</span></div>
<div dir="auto" class="left"><span class="org">IMT Atlantique</span></div>
<div dir="auto" class="left"><span class="street-address">2 rue de la Chataigneraie<br>CS 17607</span></div>
<div dir="auto" class="left"><span class="locality">35576 Cesson-Sevigne Cedex</span></div>
<div dir="auto" class="left"><span class="country-name">France</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:Laurent.Toutain@imt-atlantique.fr" class="email">Laurent.Toutain@imt-atlantique.fr</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Carles Gomez</span></div>
<div dir="auto" class="left"><span class="org">Universitat Politecnica de Catalunya</span></div>
<div dir="auto" class="left"><span class="street-address">C/Esteve Terradas, 7<br>08860 Castelldefels</span></div>
<div dir="auto" class="left"><span class="country-name">Spain</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:carlesgo@entel.upc.edu" class="email">carlesgo@entel.upc.edu</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Dominique Barthel</span></div>
<div dir="auto" class="left"><span class="org">Orange Labs</span></div>
<div dir="auto" class="left"><span class="street-address">28 chemin du Vieux Chene<br>38243 Meylan</span></div>
<div dir="auto" class="left"><span class="country-name">France</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:dominique.barthel@orange.com" class="email">dominique.barthel@orange.com</a>
</div>
</address>
<address class="vcard">
<div dir="auto" class="left"><span class="fn nameRole">Juan Carlos Zuniga</span></div>
<div dir="auto" class="left"><span class="org">SIGFOX</span></div>
<div dir="auto" class="left"><span class="street-address">425 rue Jean Rostand<br>31670 Labege</span></div>
<div dir="auto" class="left"><span class="country-name">France</span></div>
<div class="email">
<span>Email:</span>
<a href="mailto:JuanCarlos.Zuniga@sigfox.com" class="email">JuanCarlos.Zuniga@sigfox.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>
|