1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941
|
<pre>Network Working Group G. Pelletier
Request for Comments: 5225 K. Sandlund
Category: Standards Track Ericsson
April 2008
<span class="h1">RObust Header Compression Version 2 (ROHCv2):</span>
<span class="h1">Profiles for RTP, UDP, IP, ESP and UDP-Lite</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This document specifies ROHC (Robust Header Compression) profiles
that efficiently compress RTP/UDP/IP (Real-Time Transport Protocol,
User Datagram Protocol, Internet Protocol), RTP/UDP-Lite/IP (User
Datagram Protocol Lite), UDP/IP, UDP-Lite/IP, IP and ESP/IP
(Encapsulating Security Payload) headers.
This specification defines a second version of the profiles found in
<a href="./rfc3095">RFC 3095</a>, <a href="./rfc3843">RFC 3843</a> and <a href="./rfc4019">RFC 4019</a>; it supersedes their definition, but
does not obsolete them.
The ROHCv2 profiles introduce a number of simplifications to the
rules and algorithms that govern the behavior of the compression
endpoints. It also defines robustness mechanisms that may be used by
a compressor implementation to increase the probability of
decompression success when packets can be lost and/or reordered on
the ROHC channel. Finally, the ROHCv2 profiles define their own
specific set of header formats, using the ROHC formal notation.
<span class="grey">Pelletier & Sandlund Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2">2</a>. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3">3</a>. Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4">4</a>. Background (Informative) . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4.1">4.1</a>. Classification of Header Fields . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4.2">4.2</a>. Improvements of ROHCv2 over <a href="./rfc3095">RFC 3095</a> Profiles . . . . . . <a href="#page-8">8</a>
<a href="#section-4.3">4.3</a>. Operational Characteristics of ROHCv2 Profiles . . . . . <a href="#page-10">10</a>
<a href="#section-5">5</a>. Overview of the ROHCv2 Profiles (Informative) . . . . . . . . <a href="#page-10">10</a>
<a href="#section-5.1">5.1</a>. Compressor Concepts . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-5.1.1">5.1.1</a>. Optimistic Approach . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
5.1.2. Tradeoff between Robustness to Losses and to
Reordering . . . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-5.1.3">5.1.3</a>. Interactions with the Decompressor Context . . . . . <a href="#page-13">13</a>
<a href="#section-5.2">5.2</a>. Decompressor Concepts . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-5.2.1">5.2.1</a>. Decompressor State Machine . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-5.2.2">5.2.2</a>. Decompressor Context Management . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-5.2.3">5.2.3</a>. Feedback Logic . . . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-6">6</a>. ROHCv2 Profiles (Normative) . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-6.1">6.1</a>. Channel Parameters, Segmentation, and Reordering . . . . <a href="#page-19">19</a>
<a href="#section-6.2">6.2</a>. Profile Operation, Per-context . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-6.3">6.3</a>. Control Fields . . . . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-6.3.1">6.3.1</a>. Master Sequence Number (MSN) . . . . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-6.3.2">6.3.2</a>. Reordering Ratio . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-6.3.3">6.3.3</a>. IP-ID Behavior . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-6.3.4">6.3.4</a>. UDP-Lite Coverage Behavior . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-6.3.5">6.3.5</a>. Timestamp Stride . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-6.3.6">6.3.6</a>. Time Stride . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-6.3.7">6.3.7</a>. CRC-3 for Control Fields . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-6.4">6.4</a>. Reconstruction and Verification . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-6.5">6.5</a>. Compressed Header Chains . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-6.6">6.6</a>. Header Formats and Encoding Methods . . . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-6.6.1">6.6.1</a>. baseheader_extension_headers . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-6.6.2">6.6.2</a>. baseheader_outer_headers . . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-6.6.3">6.6.3</a>. inferred_udp_length . . . . . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-6.6.4">6.6.4</a>. inferred_ip_v4_header_checksum . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-6.6.5">6.6.5</a>. inferred_mine_header_checksum . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-6.6.6">6.6.6</a>. inferred_ip_v4_length . . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-6.6.7">6.6.7</a>. inferred_ip_v6_length . . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-6.6.8">6.6.8</a>. Scaled RTP Timestamp Compression . . . . . . . . . . <a href="#page-29">29</a>
<a href="#section-6.6.9">6.6.9</a>. timer_based_lsb . . . . . . . . . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-6.6.10">6.6.10</a>. inferred_scaled_field . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-6.6.11">6.6.11</a>. control_crc3_encoding . . . . . . . . . . . . . . . . <a href="#page-32">32</a>
<a href="#section-6.6.12">6.6.12</a>. inferred_sequential_ip_id . . . . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-6.6.13">6.6.13</a>. list_csrc(cc_value) . . . . . . . . . . . . . . . . . <a href="#page-34">34</a>
6.7. Encoding Methods with External Parameters as Arguments . 38
<a href="#section-6.8">6.8</a>. Header Formats . . . . . . . . . . . . . . . . . . . . . <a href="#page-40">40</a>
<span class="grey">Pelletier & Sandlund Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<a href="#section-6.8.1">6.8.1</a>. Initialization and Refresh Header Format (IR) . . . . <a href="#page-40">40</a>
<a href="#section-6.8.2">6.8.2</a>. Compressed Header Formats (CO) . . . . . . . . . . . <a href="#page-41">41</a>
<a href="#section-6.9">6.9</a>. Feedback Formats and Options . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-6.9.1">6.9.1</a>. Feedback Formats . . . . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-6.9.2">6.9.2</a>. Feedback Options . . . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-7">7</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-104">104</a>
<a href="#section-8">8</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-9">9</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-10">10</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-106">106</a>
<a href="#section-10.1">10.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-106">106</a>
<a href="#section-10.2">10.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-107">107</a>
<a href="#appendix-A">Appendix A</a>. Detailed Classification of Header Fields . . . . . <a href="#page-108">108</a>
<a href="#appendix-A.1">A.1</a>. IPv4 Header Fields . . . . . . . . . . . . . . . . . . . <a href="#page-109">109</a>
<a href="#appendix-A.2">A.2</a>. IPv6 Header Fields . . . . . . . . . . . . . . . . . . . <a href="#page-112">112</a>
<a href="#appendix-A.3">A.3</a>. UDP Header Fields . . . . . . . . . . . . . . . . . . . <a href="#page-113">113</a>
<a href="#appendix-A.4">A.4</a>. UDP-Lite Header Fields . . . . . . . . . . . . . . . . . <a href="#page-114">114</a>
<a href="#appendix-A.5">A.5</a>. RTP Header Fields . . . . . . . . . . . . . . . . . . . . <a href="#page-115">115</a>
<a href="#appendix-A.6">A.6</a>. ESP Header Fields . . . . . . . . . . . . . . . . . . . . <a href="#page-117">117</a>
<a href="#appendix-A.7">A.7</a>. IPv6 Extension Header Fields . . . . . . . . . . . . . . <a href="#page-117">117</a>
<a href="#appendix-A.8">A.8</a>. GRE Header Fields . . . . . . . . . . . . . . . . . . . . <a href="#page-118">118</a>
<a href="#appendix-A.9">A.9</a>. MINE Header Fields . . . . . . . . . . . . . . . . . . . <a href="#page-119">119</a>
<a href="#appendix-A.10">A.10</a>. AH Header Fields . . . . . . . . . . . . . . . . . . . . <a href="#page-120">120</a>
<a href="#appendix-B">Appendix B</a>. Compressor Implementation Guidelines . . . . . . . <a href="#page-121">121</a>
<a href="#appendix-B.1">B.1</a>. Reference Management . . . . . . . . . . . . . . . . . . <a href="#page-121">121</a>
<a href="#appendix-B.2">B.2</a>. Window-based LSB Encoding (W-LSB) . . . . . . . . . . . <a href="#page-121">121</a>
<a href="#appendix-B.3">B.3</a>. W-LSB Encoding and Timer-based Compression . . . . . . . <a href="#page-122">122</a>
<span class="grey">Pelletier & Sandlund Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The ROHC WG has developed a header compression framework on top of
which various profiles can be defined for different protocol sets or
compression requirements. The ROHC framework was first documented in
[<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>], together with profiles for compression of RTP/UDP/IP
(Real-Time Transport Protocol, User Datagram Protocol, Internet
Protocol), UDP/IP, IP and ESP/IP (Encapsulating Security Payload)
headers. Additional profiles for compression of IP headers [<a href="./rfc3843" title=""RObust Header Compression (ROHC): A Compression Profile for IP"">RFC3843</a>]
and UDP-Lite (User Datagram Protocol Lite) headers [<a href="./rfc4019" title=""RObust Header Compression (ROHC): Profiles for User Datagram Protocol (UDP) Lite"">RFC4019</a>] were
later specified to complete the initial set of ROHC profiles.
This document defines an updated version for each of the above
mentioned profiles, and the definitions depend on the ROHC framework
as found in [<a href="./rfc4995" title=""The RObust Header Compression (ROHC) Framework"">RFC4995</a>]. The framework is required reading to
understand the profile definitions, rules, and their role.
Specifically, this document defines header compression schemes for:
o RTP/UDP/IP : profile 0x0101
o UDP/IP : profile 0x0102
o ESP/IP : profile 0x0103
o IP : profile 0x0104
o RTP/UDP-Lite/IP : profile 0x0107
o UDP-Lite/IP : profile 0x0108
Each of the profiles above can compress the following type of
extension headers:
o AH [<a href="./rfc4302" title=""IP Authentication Header"">RFC4302</a>]
o GRE [<a href="./rfc2784" title=""Generic Routing Encapsulation (GRE)"">RFC2784</a>][RFC2890]
o MINE [<a href="./rfc2004" title=""Minimal Encapsulation within IP"">RFC2004</a>]
o IPv6 Destination Options header[RFC2460]
o IPv6 Hop-by-hop Options header[RFC2460]
o IPv6 Routing header [<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>]
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="grey">Pelletier & Sandlund Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
This document is consistent with the terminology found in the ROHC
framework [<a href="./rfc4995" title=""The RObust Header Compression (ROHC) Framework"">RFC4995</a>] and in the formal notation for ROHC [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>].
In addition, this document uses or defines the following terms:
Acknowledgment Number
The Acknowledgment Number identifies what packet is being
acknowledged in the RoHCv2 feedback element (See <a href="#section-6.9">Section 6.9</a>).
The value of this field normally corresponds to the Master
Sequence Number (MSN) of the header that was last successfully
decompressed, for the compression context (CID) for which the
feedback information applies.
Chaining of Items
A chain of items groups fields based on similar characteristics.
ROHCv2 defines chain items for static, dynamic and irregular
fields. Chaining is achieved by appending an item to the chain
for each header in its order of appearance in the uncompressed
packet. Chaining is useful to construct compressed headers from
an arbitrary number of any of the protocol headers for which a
ROHCv2 profile defines a compressed format.
CRC-3 Control Fields Validation
The CRC-3 control fields validation refers to the validation of
the control fields. This validation is performed by the
decompressor when it receives a Compressed (CO) header that
contains a 3-bit Cyclic Redundancy Check (CRC) calculated over
control fields. This 3-bit CRC covers controls fields carried in
the CO header as well as specific control fields in the context.
In the formal definition of the header formats, this 3-bit CRC is
labeled "control_crc3" and uses the control_crc3_encoding (See
also <a href="#section-6.6.11">Section 6.6.11</a>).
Delta
The delta refers to the difference in the absolute value of a
field between two consecutive packets being processed by the same
compression endpoint.
Reordering Depth
The number of packets by which a packet is received late within
its sequence due to reordering between the compressor and the
decompressor, i.e., reordering between packets associated with the
same context (CID). See the definition of sequentially late
packet below.
<span class="grey">Pelletier & Sandlund Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ROHCv2 Header Types
ROHCv2 profiles use two different header types: the Initialization
and Refresh (IR) header type, and the Compressed (CO) header type.
Sequentially Early Packet
A packet that reaches the decompressor before one or several
packets that were delayed over the channel, where all of the said
packets belong to the same header-compressed flow and are
associated to the same compression context (CID). At the time of
the arrival of a sequentially early packet, the packet(s) delayed
on the link cannot be differentiated from lost packet(s).
Sequentially Late Packet
A packet is late within its sequence if it reaches the
decompressor after one or several other packets belonging to the
same CID have been received, although the sequentially late packet
was sent from the compressor before the other packet(s). How the
decompressor detects a sequentially late packet is outside the
scope of this specification, but it can for example use the MSN
for this purpose.
Timestamp Stride (ts_stride)
The timestamp stride (ts_stride) is the expected increase in the
timestamp value between two RTP packets with consecutive sequence
numbers. For example, for a media encoding with a sample rate of
8 kHz producing one frame every 20 ms, the RTP timestamp will
typically increase by n * 160 (= 8000 * 0.02), for some integer n.
Time Stride (time_stride)
The time stride (time_stride) is the time interval equivalent to
one ts_stride, e.g., 20 ms in the example for the RTP timestamp
increment above.
<span class="grey">Pelletier & Sandlund Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Acronyms</span>
This section lists most acronyms used for reference, in addition to
those defined in [<a href="./rfc4995" title=""The RObust Header Compression (ROHC) Framework"">RFC4995</a>].
AH Authentication Header.
ESP Encapsulating Security Payload.
GRE Generic Routing Encapsulation.
FC Full Context state (decompressor).
IP Internet Protocol.
LSB Least Significant Bits.
MINE Minimal Encapsulation in IP.
MSB Most Significant Bits.
MSN Master Sequence Number.
NC No Context state (decompressor).
OA Optimistic Approach.
RC Repair Context state (decompressor).
ROHC Header compression framework (<a href="./rfc4995">RFC 4995</a>).
ROHCv2 Set of header compression profiles defined in this document.
RTP Real-time Transport Protocol.
SSRC Synchronization source. Field in RTP header.
CSRC Contributing source. The RTP header contains an optional
list of contributing sources.
TC Traffic Class. Field in the IPv6 header. See also TOS.
TOS Type Of Service. Field in the IPv4 header. See also TC.
TS RTP Timestamp.
TTL Time to Live. Field in the IPv4 header.
UDP User Datagram Protocol.
UDP-Lite User Datagram Protocol Lite.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Background (Informative)</span>
This section provides background information on the compression
profiles defined in this document. The fundamentals of general
header compression and of the ROHC framework may be found in sections
3 and 4 of [<a href="./rfc4995" title=""The RObust Header Compression (ROHC) Framework"">RFC4995</a>], respectively. The fundamentals of the formal
notation for ROHC are defined in [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>]. [<a href="./rfc4224" title=""RObust Header Compression (ROHC): ROHC over Channels That Can Reorder Packets"">RFC4224</a>] describes the
impacts of out-of-order delivery on profiles based on [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Classification of Header Fields</span>
<a href="./rfc4995#section-3.1">Section 3.1 of [RFC4995]</a> explains that header compression is possible
due to the fact that there is much redundancy between field values
within the headers of a packet, especially between the headers of
consecutive packets.
<a href="#appendix-A">Appendix A</a> lists and classifies in detail all the header fields
relevant to this document. The appendix concludes with
<span class="grey">Pelletier & Sandlund Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
recommendations on how the various fields should be handled by header
compression algorithms.
The main conclusion is that most of the header fields can easily be
compressed away since they never or seldom change. A small number of
fields however need more sophisticated mechanisms.
These fields are:
- IPv4 Identification (16 bits) - IP-ID
- ESP Sequence Number (32 bits) - ESP SN
- UDP Checksum (16 bits) - Checksum
- UDP-Lite Checksum (16 bits) - Checksum
- UDP-Lite Checksum Coverage (16 bits) - CCov
- RTP Marker ( 1 bit ) - M-bit
- RTP Sequence Number (16 bits) - RTP SN
- RTP Timestamp (32 bits) - TS
In particular, for RTP, the analysis in <a href="#appendix-A">Appendix A</a> reveals that the
values of the RTP Timestamp (TS) field usually have a strong
correlation to the RTP Sequence Number (SN), which increments by one
for each packet emitted by an RTP source. The RTP M-bit is expected
to have the same value most of the time, but it needs to be
communicated explicitly on occasion.
For UDP, the Checksum field cannot be inferred or recalculated at the
receiving end without violating its end-to-end properties, and is
thus sent as-is when enabled (mandatory with IPv6). The same applies
to the UDP-Lite Checksum (mandatory with both IPv4 and IPv6), while
the UDP-Lite Checksum Coverage may in some cases be compressible.
For IPv4, a similar correlation as that of the RTP TS to the RTP SN
is often observed between the Identifier field (IP-ID) and the master
sequence number (MSN) used for compression (e.g., the RTP SN when
compressing RTP headers).
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Improvements of ROHCv2 over <a href="./rfc3095">RFC 3095</a> Profiles</span>
The ROHCv2 profiles can achieve compression efficiency and robustness
that are both at least equivalent to <a href="./rfc3095">RFC 3095</a> profiles [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>],
when used under the same operating conditions. In particular, the
size and bit layout of the smallest compressed header (i.e., PT-0
format U/O-0 in <a href="./rfc3095">RFC 3095</a>, and pt_0_crc3 in ROHCv2) are identical.
There are a number of differences and improvements between profiles
defined in this document and their earlier version defined in <a href="./rfc3095">RFC</a>
<a href="./rfc3095">3095</a>. This section provides an overview of some of the most
significant improvements:
<span class="grey">Pelletier & Sandlund Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Tolerance to reordering
Profiles defined in <a href="./rfc3095">RFC 3095</a> require that the channel between
compressor and decompressor provide in-order delivery between
compression endpoints. ROHCv2 profiles, however, can handle
robustly and efficiently a limited amount of reordering after the
compression point as part of the compression algorithm itself. In
addition, this improved support for reordering makes it possible
for ROHCv2 profiles to handle prelink reordering more efficiently.
Operational logic
Profiles in <a href="./rfc3095">RFC 3095</a> define multiple operational modes, each with
different updating logic and compressed header formats. ROHCv2
profiles operate in unidirectional operation until feedback is
first received for a context (CID), at which point bidirectional
operation is used; the formats are independent of what operational
logic is used.
IP extension header
Profiles in <a href="./rfc3095">RFC 3095</a> compress IP Extension headers using list
compression. ROHCv2 profiles instead treat extension headers in
the same manner as other protocol headers, i.e., using the
chaining mechanism; it thus assumes that extension headers are not
added or removed during the lifetime of a context (CID), otherwise
compression has to be restarted for this flow.
IP encapsulation
Profiles in <a href="./rfc3095">RFC 3095</a> can compress at most two levels of IP
headers. ROHCv2 profiles can compress an arbitrary number of IP
headers.
List compression
ROHCv2 profiles do not support reference-based list compression.
Robustness and repairs
ROHCv2 profiles do not define a format for the IR-DYN packet;
instead, each profile defines a compressed header that can be used
to perform a more robust context repair using a 7-bit CRC
verification. This also implies that only the IR header can
change the association between a CID and the profile it uses.
<span class="grey">Pelletier & Sandlund Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Feedback
ROHCv2 profiles mandate a CRC in the format of the FEEDBACK-2,
while this is optional in <a href="./rfc3095">RFC 3095</a>. A different set of feedback
options is also used in ROHCv2 compared to <a href="./rfc3095">RFC 3095</a>.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Operational Characteristics of ROHCv2 Profiles</span>
Robust header compression can be used over different link
technologies. <a href="./rfc4995#section-4.4">Section 4.4 of [RFC4995]</a> lists the operational
characteristics of the ROHC channel. The ROHCv2 profiles address a
wide range of applications, and this section summarizes some of the
operational characteristics that are specific to these profiles.
Packet length
ROHCv2 profiles assume that the lower layer indicates the length
of a compressed packet. ROHCv2 compressed headers do not contain
length information for the payload.
Out-of-order delivery between compression endpoints
The definition of the ROHCv2 profiles places no strict requirement
on the delivery sequence between the compression endpoints, i.e.,
packets may be received in a different order than the compressor
has sent them and still have a fair probability of being
successfully decompressed.
However, frequent out-of-order delivery and/or significant
reordering depth will negatively impact the compression
efficiency. More specifically, if the compressor can operate
using a proper estimate of the reordering characteristics of the
path between the compression endpoints, larger headers can be sent
more often to increase the robustness against decompression
failures due to out-of-order delivery. Otherwise, the compression
efficiency will be impaired from an increase in the frequency of
decompression failures and recovery attempts.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Overview of the ROHCv2 Profiles (Informative)</span>
This section provides an overview of concepts that are important and
useful to the ROHCv2 profiles. These concepts may be used as
guidelines for implementations but they are not part of the normative
definition of the profiles, as these concepts relate to the
compression efficiency of the protocol without impacting the
interoperability characteristics of an implementation.
<span class="grey">Pelletier & Sandlund Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Compressor Concepts</span>
Header compression can be conceptually characterized as the
interaction of a compressor with a decompressor state machine, one
per context. The responsibility of the compressor is to convey the
information needed to successfully decompress a packet, based on a
certain confidence regarding the state of the decompressor context.
This confidence is obtained from the frequency and the type of
information the compressor sends when updating the decompressor
context from the optimistic approach (<a href="#section-5.1.1">Section 5.1.1</a>), and optionally
from feedback messages (See <a href="#section-6.9">Section 6.9</a>), received from the
decompressor.
<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a>. Optimistic Approach</span>
A compressor always uses the optimistic approach when it performs
context updates. The compressor normally repeats the same type of
update until it is fairly confident that the decompressor has
successfully received the information. If the decompressor
successfully receives any of the headers containing this update, the
state will be available for the decompressor to process smaller
compressed headers.
If field X in the uncompressed header changes value, the compressor
uses a header type that contains an encoding of field X until it has
gained confidence that the decompressor has received at least one
packet containing the new value for X. The compressor normally
selects a compressed format with the smallest header that can convey
the changes needed to achieve confidence.
The number of repetitions that is needed to obtain this confidence is
normally related to the packet loss and out-of-order delivery
characteristics of the link where header compression is used; it is
thus not defined in this document. It is outside the scope of this
specification and is left to implementors to decide.
<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a>. Tradeoff between Robustness to Losses and to Reordering</span>
The ability of a header compression algorithm to handle sequentially
late packets is mainly limited by two factors: the interpretation
interval offset of the sliding window used for lsb encoded fields
[<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>], and the optimistic approach (See <a href="#section-5.1.1">Section 5.1.1</a>) for seldom
changing fields.
<span class="grey">Pelletier & Sandlund Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
lsb encoded fields:
The interpretation interval offset specifies an upper limit for
the maximum reordering depth, by which is it possible for the
decompressor to recover the original value of a dynamically
changing (i.e., sequentially incrementing) field that is encoded
using a window-based lsb encoding. Its value is typically bound
to the number of lsb compressed bits in the compressed header
format, and thus grows with the number of bits transmitted.
However, the offset and the lsb encoding only provide robustness
for the field that it compresses, and (implicitly) for other
sequentially changing fields that are derived from that field.
This is shown in the figure below:
<--- interpretation interval (size is 2^k) ---->
|------------------+---------------------------|
v_ref-p v_ref v_ref + (2^k-1) - p
Lower Upper
Bound Bound
<--- reordering --> <--------- losses --------->
where p is the maximum negative delta, corresponding to the
maximum reordering depth for which the lsb encoding can recover
the original value of the field;
where (2^k-1) - p is the maximum positive delta, corresponding
to the maximum number of consecutive losses for which the lsb
encoding can recover the original value of the field;
where v_ref is the reference value, as defined in the lsb
encoding method in [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>].
There is thus a tradeoff between the robustness against reordering
and the robustness against packet losses, with respect to the
number of MSN bits needed and the distribution of the
interpretation interval between negative and positive deltas in
the MSN.
Seldom changing fields
The optimistic approach (<a href="#section-5.1.1">Section 5.1.1</a>) provides the upper limit
for the maximum reordering depth for seldom changing fields.
There is thus a tradeoff between compression efficiency and
robustness. When only information on the MSN needs to be conveyed to
the decompressor, the tradeoff relates to the number of compressed
<span class="grey">Pelletier & Sandlund Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
MSN bits in the compressed header format. Otherwise, the tradeoff
relates to the implementation of the optimistic approach.
In particular, compressor implementations should adjust their
optimistic approach strategy to match both packet loss and reordering
characteristics of the link over which header compression is applied.
For example, the number of repetitions for each update of a non-lsb
encoded field can be increased. The compressor can ensure that each
update is repeated until it is reasonably confident that at least one
packet containing the change has reached the decompressor before the
first packet sent after this sequence.
<span class="h4"><a class="selflink" id="section-5.1.3" href="#section-5.1.3">5.1.3</a>. Interactions with the Decompressor Context</span>
The compressor normally starts compression with the initial
assumption that the decompressor has no useful information to process
the new flow, and sends Initialization and Refresh (IR) packets.
Initially, when sending the first IR packet for a compressed flow,
the compressor does not expect to receive feedback for that flow,
until such feedback is first received. At this point, the compressor
may then assume that the decompressor will continue to send feedback
in order to repair its context when necessary. The former is
referred to as unidirectional operation, while the latter is called
bidirectional operation.
The compressor can then adjust the compression level (i.e., what
header format it selects) based on its confidence that the
decompressor has the necessary information to successfully process
the compressed headers that it selects.
In other words, the responsibilities of the compressor are to ensure
that the decompressor operates with state information that is
sufficient to successfully decompress the type of compressed
header(s) it receives, and to allow the decompressor to successfully
recover that state information as soon as possible otherwise. The
compressor therefore selects the type of compressed header based on
the following factors:
o the outcome of the encoding method applied to each field;
o the optimistic approach, with respect to the characteristics of
the channel;
o the type of operation (unidirectional or bidirectional), and if in
bidirectional operation, feedback received from the decompressor
(ACKs, NACKs, STATIC-NACK, and options).
<span class="grey">Pelletier & Sandlund Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Encoding methods normally use previous value(s) from a history of
packets whose headers it has previously compressed. The optimistic
approach is meant to ensure that at least one compressed header
containing the information to update the state for a field is
received. Finally, feedback indicates what actions the decompressor
has taken with respect to its assumptions regarding the validity of
its context (<a href="#section-5.2.2">Section 5.2.2</a>); it indicates what type of compressed
header the decompressor can or cannot decompress.
The decompressor has the means to detect decompression failures for
any compressed (CO) header format, using the CRC verification.
Depending on the frequency and/or on the type of the failure, it
might send a negative acknowledgement (NACK) or an explicit request
for a complete context update (STATIC-NACK). However, the
decompressor does not have the means to identify the cause of the
failure, and in particular the decompression of what field(s) is
responsible for the failure. The compressor is thus always
responsible for determining the most suitable response to a negative
acknowledgement, using the confidence it has in the state of the
decompressor context, when selecting the type of compressed header it
will use when compressing a header.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Decompressor Concepts</span>
The decompressor normally uses the last received and successfully
validated (IR packets) or verified (CO packets) header as the
reference for future decompression.
The decompressor is responsible for verifying the outcome of every
decompression attempt, to update its context when successful, and
finally to request context repairs by making coherent usage of
feedback once it has started using feedback.
Specifically, the outcome of every decompression attempt is verified
using the CRC present in the compressed header; the decompressor
updates the context information when this outcome is successfully
verified; finally, if the decompressor uses feedback once for a
compressed flow, then it will continue to do so for as long as the
corresponding context is associated with the same profile.
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Decompressor State Machine</span>
The decompressor operation may be represented as a state machine
defining three states: No Context (NC), Repair Context (RC), and Full
Context (FC).
The decompressor starts without a valid context, the NC state. Upon
receiving an IR packet, the decompressor validates the integrity of
<span class="grey">Pelletier & Sandlund Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
its header using the CRC-8 validation. If the IR header is
successfully validated, the decompressor updates the context and uses
this header as the reference header, and moves to the FC state. Once
the decompressor state machine has entered the FC state, it does not
normally leave; only repeated decompression failures will force the
decompressor to transit downwards to a lower state. When context
damage is detected, the decompressor moves to the repair context (RC)
state, where it stays until it successfully verifies a decompression
attempt for a compressed header with a 7-bit CRC or until it
successfully validates an IR header. When static context damage is
detected, the decompressor moves back to the NC state.
Below is the state machine for the decompressor. Details of the
transitions between states and decompression logic are given in the
sub-sections following the figure.
CRC-8(IR) Validation
+----->----->----->----->----->----->----->----->----->----->----+
| CRC-8(IR) |
| !CRC-8(IR) or CRC-7(CO) or or CRC-7(CO) |
| PT not allowed CRC-8(IR) or CRC-3(CO) |
| +--->---+ +--->----->----->----->---+ +--->---->---+ |
| | | | | | | |
| | v | v | v v
+-----------------+ +----------------------+ +--------------------+
| No Context (NC) | | Repair Context (RC) | | Full Context (FC) |
+-----------------+ +----------------------+ +--------------------+
^ ^ Static Context | ^ !CRC-7(CO) or | ^ Context Damage | |
| | Damage Detected | | PT not allowed | | Detected | |
| +--<-----<-----<--+ +----<------<----+ +--<-----<-----<--+ |
| |
| Static Context Damage Detected |
+--<-----<-----<-----<-----<-----<-----<-----<-----<---------+
where:
CRC-8(IR) : Successful CRC-8 validation for the IR header.
!CRC-8(IR) : Unsuccessful CRC-8 validation for the IR header.
CRC-7(CO) and/or
CRC-3(CO) : Successful CRC verification for the decompression
of a CO header, based on the number of CRC bits
carried in the CO header.
!CRC-7(CO) : Failure to CRC verify the decompression of a CO
header carrying a 7-bit CRC.
PT not allowed : The decompressor has received a packet type (PT)
for which the decompressor's current context does
not provide enough valid state information to
decompress the packet.
<span class="grey">Pelletier & Sandlund Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Static Context Damage Detected: See definition in <a href="#section-5.2.2">Section 5.2.2</a>.
Context Damage Detected: See definition in <a href="#section-5.2.2">Section 5.2.2</a>.
<span class="h5"><a class="selflink" id="section-5.2.1.1" href="#section-5.2.1.1">5.2.1.1</a>. No Context (NC) State</span>
Initially, while working in the No Context (NC) state, the
decompressor has not yet successfully validated an IR header.
Attempting decompression:
In the NC state, only packets carrying sufficient information on
the static fields (i.e., IR packets) can be decompressed.
Upward transition:
The decompressor can move to the Full Context (FC) state when the
CRC validation of an 8-bit CRC in an IR header is successful.
Feedback logic:
In the NC state, the decompressor should send a STATIC-NACK if a
packet of a type other than IR is received, or if an IR header has
failed the CRC-8 validation, subject to the feedback rate
limitation as described in <a href="#section-5.2.3">Section 5.2.3</a>.
<span class="h5"><a class="selflink" id="section-5.2.1.2" href="#section-5.2.1.2">5.2.1.2</a>. Repair Context (RC) State</span>
In the Repair Context (RC) state, the decompressor has successfully
decompressed packets for this context, but does not have confidence
that the entire context is valid.
Attempting decompression:
In the RC state, only headers covered by an 8-bit CRC (i.e., IR)
or CO headers carrying a 7-bit CRC can be decompressed.
Upward transition:
The decompressor can move to the Full Context (FC) state when the
CRC verification succeeds for a CO header carrying a 7-bit CRC or
when validation of an 8-bit CRC in an IR header succeeds.
Downward transition:
The decompressor moves back to the NC state if it assumes static
context damage.
<span class="grey">Pelletier & Sandlund Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Feedback logic:
In the RC state, the decompressor should send a STATIC-NACK when
CRC-8 validation of an IR header fails, or when a CO header
carrying a 7-bit CRC fails and static context damage is assumed,
subject to the feedback rate limitation as described in
<a href="#section-5.2.3">Section 5.2.3</a>. If any other packet type is received, the
decompressor should treat it as a CRC verification failure to
determine if NACK is to be sent.
<span class="h5"><a class="selflink" id="section-5.2.1.3" href="#section-5.2.1.3">5.2.1.3</a>. Full Context (FC) State</span>
In the Full Context (FC) state, the decompressor assumes that its
entire context is valid.
Attempting decompression:
In the FC state, decompression can be attempted regardless of the
type of packet received.
Downward transition:
The decompressor moves back to the RC state if it assumes context
damage. If the decompressor assumes static context damage, it
moves directly to the NC state.
Feedback logic:
In the FC state, the decompressor should send a NACK when CRC-8
validation or CRC verification of any header type fails and if
context damage is assumed, or it should send a STATIC-NACK if
static context damage is assumed; this is subject to the feedback
rate limitation described in <a href="#section-5.2.3">Section 5.2.3</a>.
<span class="h4"><a class="selflink" id="section-5.2.2" href="#section-5.2.2">5.2.2</a>. Decompressor Context Management</span>
All header formats carry a CRC and are context updating. A packet
for which the CRC succeeds updates the reference values of all header
fields, either explicitly (from the information about a field carried
within the compressed header) or implicitly (fields inferred from
other fields).
The decompressor may assume that some or the entire context is
invalid, when it fails to validate or to verify one or more headers
using the CRC. Because the decompressor cannot know the exact
<span class="grey">Pelletier & Sandlund Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
reason(s) for a CRC failure or what field caused it, the validity of
the context hence does not refer to what specific part(s) of the
context is deemed valid or not.
Validity of the context rather relates to the detection of a problem
with the context. The decompressor first assumes that the type of
information that most likely caused the failure(s) is the state that
normally changes for each packet, i.e., context damage of the dynamic
part of the context. Upon repeated decompression failures and
unsuccessful repairs, the decompressor then assumes that the entire
context, including the static part, needs to be repaired, i.e.,
static context damage. Failure to validate the 3-bit CRC that
protects control fields should be treated as a decompression failure
when the decompressor asserts the validity of its context.
Context Damage Detection
The assumption of context damage means that the decompressor will
not attempt decompression of a CO header that carries only a 3-bit
CRC, and will only attempt decompression of IR headers or CO
headers protected by a CRC-7.
Static Context Damage Detection
The assumption of static context damage means that the
decompressor refrains from attempting decompression of any type of
header other than the IR header.
How these assumptions are made, i.e., how context damage is detected,
is open to implementations. It can be based on the residual error
rate, where a low error rate makes the decompressor assume damage
more often than on a high rate link.
The decompressor implements these assumptions by selecting the type
of compressed header for which it will attempt decompression. In
other words, validity of the context refers to the ability of a
decompressor to attempt (or not) decompression of specific packet
types.
When ROHCv2 profiles are used over a channel that cannot guarantee
in-order delivery, the decompressor may refrain from updating its
context with the content of a sequentially late packet that is
successfully decompressed. This is to avoid updating the context
with information that is older than what the decompressor already has
in its context.
<span class="grey">Pelletier & Sandlund Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h4"><a class="selflink" id="section-5.2.3" href="#section-5.2.3">5.2.3</a>. Feedback Logic</span>
ROHCv2 profiles may be used in environments with or without feedback
capabilities from decompressor to compressor. ROHCv2 however assumes
that if a ROHC feedback channel is available and if this channel is
used at least once by the decompressor for a specific context, this
channel will be used during the entire compression operation for that
context (i.e., bidirectional operation).
The ROHC framework defines 3 types of feedback messages: ACKs, NACKs,
and STATIC-NACKs. The semantics of each message is defined in
<a href="./rfc4995#section-5.2.4.1">Section 5.2.4.1. of [RFC4995]</a>. What feedback to send is coupled with
the context management of the decompressor, i.e., with the
implementation of the context damage detection algorithms as
described in <a href="#section-5.2.2">Section 5.2.2</a>.
The decompressor should send a NACK when it assumes context damage,
and it should send a STATIC-NACK when it assumes static context
damage. The decompressor is not strictly expected to send ACK
feedback upon successful decompression, other than for the purpose of
improving compression efficiency.
When ROHCv2 profiles are used over a channel that cannot guarantee
in-order delivery, the decompressor may refrain from sending ACK
feedback for a sequentially late packet that is successfully
decompressed.
The decompressor should limit the rate at which it sends feedback,
for both ACKs and STATIC-NACK/NACKs, and should avoid sending
unnecessary duplicates of the same type of feedback message that may
be associated with the same event.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. ROHCv2 Profiles (Normative)</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Channel Parameters, Segmentation, and Reordering</span>
The compressor MUST NOT use ROHC segmentation (see <a href="./rfc4995#section-5.2.5">Section 5.2.5 of
[RFC4995]</a>), i.e., the Maximum Reconstructed Reception Unit (MRRU)
MUST be set to 0, if the configuration of the ROHC channel contains
at least one ROHCv2 profile in the list of supported profiles (i.e.,
the PROFILES parameter) and if the channel cannot guarantee in-order
delivery of packets between compression endpoints.
<span class="grey">Pelletier & Sandlund Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Profile Operation, Per-context</span>
ROHCv2 profiles operate differently, per context, depending on how
the decompressor makes use of the feedback channel, if any. Once the
decompressor uses the feedback channel for a context, it establishes
the feedback channel for that CID.
The compressor always starts with the assumption that the
decompressor will not send feedback when it initializes a new context
(see also the definition of a new context in <a href="./rfc4995#section-5.1.1">Section 5.1.1. of
[RFC4995]</a>, i.e., there is no established feedback channel for the new
context. At this point, despite the use of the optimistic approach,
decompression failure is still possible because the decompressor may
not have received sufficient information to correctly decompress the
packets; therefore, until the decompressor has established a feedback
channel, the compressor SHOULD periodically send IR packets. The
periodicity can be based on timeouts, on the number of compressed
packets sent for the flow, or any other strategy the implementer
chooses.
The reception of either positive feedback (ACKs) or negative feedback
(NACKs or STATIC-NACKs) from the decompressor establishes the
feedback channel for the context (CID) for which the feedback was
received. Once there is an established feedback channel for a
specific context, the compressor can make use of this feedback to
estimate the current state of the decompressor. This helps to
increase the compression efficiency by providing the information
needed for the compressor to achieve the necessary confidence level.
When the feedback channel is established, it becomes superfluous for
the compressor to send periodic refreshes, and instead it can rely
entirely on the optimistic approach and feedback from the
decompressor.
The decompressor MAY send positive feedback (ACKs) to initially
establish the feedback channel for a particular flow. Either
positive feedback (ACKs) or negative feedback (NACKs or STATIC-NACKs)
establishes this channel. Once it has established a feedback channel
for a CID, the decompressor is REQUIRED to continue sending feedback
for the lifetime of the context (i.e., until it receives an IR packet
that associates the CID to a different profile), to send error
recovery requests and (optionally) acknowledgments of significant
context updates.
Compression without an established feedback channel will be less
efficient, because of the periodic refreshes and the lack of feedback
to trigger error recovery; there will also be a slightly higher
probability of loss propagation compared to the case where the
decompressor uses feedback.
<span class="grey">Pelletier & Sandlund Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. Control Fields</span>
ROHCv2 defines a number of control fields that are used by the
decompressor in its interpretation of the header formats received
from the compressor. The control fields listed in the following
subsections are defined using the formal notation [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>] in
<a href="#section-6.8.2.4">Section 6.8.2.4</a> of this document.
<span class="h4"><a class="selflink" id="section-6.3.1" href="#section-6.3.1">6.3.1</a>. Master Sequence Number (MSN)</span>
The Master Sequence Number (MSN) field is either taken from a field
that already exists in one of the headers of the protocol that the
profile compresses (e.g., RTP SN), or alternatively it is created at
the compressor. There is one MSN space per context.
The MSN field has the following two functions:
o Differentiating between reference headers when receiving feedback
data;
o Inferring the value of incrementing fields (e.g., IPv4
Identifier).
There is one MSN field in every ROHCv2 header, i.e., the MSN is
always present in each header type sent by the compressor. The MSN
is sent in full in IR headers, while it can be lsb encoded within CO
header formats. The decompressor always includes LSBs of the MSN in
the Acknowledgment Number field in feedback (see <a href="#section-6.9">Section 6.9</a>). The
compressor can later use this field to infer what packet the
decompressor is acknowledging.
For profiles for which the MSN is created by the compressor (i.e.,
0x0102, 0x0104, and 0x0108), the following applies:
o The compressor only initializes the MSN for a context when that
context is first created or when the profile associated with a
context changes;
o When the MSN is initialized, it is initialized to a random value;
o The value of the MSN SHOULD be incremented by one for each packet
that the compressor sends for a specific CID.
<span class="h4"><a class="selflink" id="section-6.3.2" href="#section-6.3.2">6.3.2</a>. Reordering Ratio</span>
The control field reorder_ratio specifies how much reordering is
handled by the lsb encoding of the MSN. This is useful when header
compression is performed over links with varying reordering
<span class="grey">Pelletier & Sandlund Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
characteristics. The reorder_ratio control field provides the means
for the compressor to adjust the robustness characteristics of the
lsb encoding method with respect to reordering and consecutive
losses, as described in <a href="#section-5.1.2">Section 5.1.2</a>.
<span class="h4"><a class="selflink" id="section-6.3.3" href="#section-6.3.3">6.3.3</a>. IP-ID Behavior</span>
The IP-ID field of the IPv4 header can have different change
patterns: sequential in network byte order, sequential byte-swapped,
random or constant (a constant value of zero, although not conformant
with [<a href="./rfc0791" title=""Internet Protocol"">RFC0791</a>], has been observed in practice). There is one IP-ID
behavior control field per IP header. The control field for the
IP-ID behavior of the innermost IP header determines which set of
header formats is used. The IP-ID behavior control field is also
used to determine the contents of the irregular chain item, for each
IP header.
ROHCv2 profiles MUST NOT assign a sequential behavior (network byte
order or byte-swapped) to any IP-ID but the one in the innermost IP
header when compressing more than one level of IP headers. This is
because only the IP-ID of the innermost IP header is likely to have a
sufficiently close correlation with the MSN to compress it as a
sequentially changing field. Therefore, a compressor MUST assign
either the constant zero IP-ID or the random IP-ID behavior to
tunneling headers.
<span class="h4"><a class="selflink" id="section-6.3.4" href="#section-6.3.4">6.3.4</a>. UDP-Lite Coverage Behavior</span>
The control field coverage_behavior specifies how the checksum
coverage field of the UDP-Lite header is compressed with RoHCv2. It
can indicate one of the following encoding methods: irregular,
static, or inferred encoding.
<span class="h4"><a class="selflink" id="section-6.3.5" href="#section-6.3.5">6.3.5</a>. Timestamp Stride</span>
The ts_stride control field is used in scaled RTP timestamp encoding
(see <a href="#section-6.6.8">Section 6.6.8</a>). It defines the expected increase in the RTP
timestamp between consecutive RTP sequence numbers.
<span class="h4"><a class="selflink" id="section-6.3.6" href="#section-6.3.6">6.3.6</a>. Time Stride</span>
The time_stride control field is used in timer-based compression
encoding (see <a href="#section-6.6.9">Section 6.6.9</a>). When timer-based compression is used,
time_stride should be set to the expected difference in arrival time
between consecutive RTP packets.
<span class="grey">Pelletier & Sandlund Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h4"><a class="selflink" id="section-6.3.7" href="#section-6.3.7">6.3.7</a>. CRC-3 for Control Fields</span>
ROHCv2 profiles define a CRC-3 calculated over a number of control
fields. This 3-bit CRC protecting the control fields is present in
the header format for the co_common and co_repair header types.
The decompressor MUST always validate the integrity of the control
fields covered by this 3-bit CRC when processing a co_common or a
co_repair compressed header.
Failure to validate the control fields using this CRC should be
considered as a decompression failure by the decompressor in the
algorithm that assesses the validity of the context. However, if the
decompression attempt can be verified using either the CRC-3 or the
CRC-7 calculated over the uncompressed header, the decompressor MAY
still forward the decompressed header to upper layers. This is
because the protected control fields are not always used to
decompress the header (i.e., co_common or co_repair) that updates
their respective value.
The CRC polynomial and coverage of this CRC-3 is defined in
<a href="#section-6.6.11">Section 6.6.11</a>.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. Reconstruction and Verification</span>
Validation of the IR header (8-bit CRC)
The decompressor MUST always validate the integrity of the IR
header using the 8-bit CRC carried within the IR header. When the
header is validated, the decompressor updates the context with the
information in the IR header. Otherwise, if the IR cannot be
validated, the context MUST NOT be updated and the IR header MUST
NOT be delivered to upper layers.
Verification of CO headers (3-bit CRC or 7-bit CRC)
The decompressor MUST always verify the decompression of a CO
header using the CRC carried within the compressed header. When
the decompression is verified and successful, the decompressor
updates the context with the information received in the CO
header; otherwise, if the reconstructed header fails the CRC
verification, these updates MUST NOT be performed.
A packet for which the decompression attempt cannot be verified
using the CRC MUST NOT be delivered to upper layers.
<span class="grey">Pelletier & Sandlund Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Decompressor implementations may attempt corrective or repair
measures on CO headers prior to performing the above actions, and
the result of any decompression attempt MUST be verified using the
CRC.
<span class="h3"><a class="selflink" id="section-6.5" href="#section-6.5">6.5</a>. Compressed Header Chains</span>
Some header types use one or more chains containing sub-header
information. The function of a chain is to group fields based on
similar characteristics, such as static, dynamic, or irregular
fields.
Chaining is done by appending an item for each header to the chain in
their order of appearance in the uncompressed packet, starting from
the fields in the outermost header.
In the text below, the term <protocol_name> is used to identify
formal notation names corresponding to different protocol headers.
The mapping between these is defined in the following table:
+----------------------------------+---------------+
| Protocol | protocol_name |
+----------------------------------+---------------+
| IPv4 <a href="./rfc0791">RFC 0791</a> | ipv4 |
| IPv6 <a href="./rfc2460">RFC 2460</a> | ipv6 |
| UDP <a href="./rfc0768">RFC 0768</a> | udp |
| RTP <a href="./rfc3550">RFC 3550</a> | rtp |
| ESP <a href="./rfc4303">RFC 4303</a> | esp |
| UDP-Lite <a href="./rfc3828">RFC 3828</a> | udp_lite |
| AH <a href="./rfc4302">RFC 4302</a> | ah |
| GRE <a href="./rfc2784">RFC 2784</a>, <a href="./rfc2890">RFC 2890</a> | gre |
| MINE <a href="./rfc2004">RFC 2004</a> | mine |
| IPv6 Destination Option <a href="./rfc2460">RFC 2460</a> | dest_opt |
| IPv6 Hop-by-hop Options <a href="./rfc2460">RFC 2460</a> | hop_opt |
| IPv6 Routing Header <a href="./rfc2460">RFC 2460</a> | rout_opt |
+----------------------------------+---------------+
Static chain:
The static chain consists of one item for each header of the chain
of protocol headers that is compressed, starting from the
outermost IP header. In the formal description of the header
formats, this static chain item for each header type is labeled
<protocol_name>_static. The static chain is only used in the IR
header format.
<span class="grey">Pelletier & Sandlund Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Dynamic chain:
The dynamic chain consists of one item for each header of the
chain of protocol headers that is compressed, starting from the
outermost IP header. In the formal description of the header
formats, the dynamic chain item for each header type is labeled
<protocol_name>_dynamic. The dynamic chain is only used in the IR
and co_repair header formats.
Irregular chain:
The structure of the irregular chain is analogous to the structure
of the static chain. For each compressed header that uses the
general format of <a href="#section-6.8">Section 6.8</a>, the irregular chain is appended at
a specific location in the general format of the compressed
headers. In the formal description of the header formats, the
irregular chain item for each header type is a format whose name
is suffixed by "_irregular". The irregular chain is used in all
CO headers, except for the co_repair format.
The format of the irregular chain for the innermost IP header
differs from the format used for the outer IP headers, because the
innermost IP header is part of the compressed base header. In the
definition of the header formats using the formal notation, the
argument "is_innermost", which is passed to the corresponding
encoding method (ipv4 or ipv6), determines what irregular chain
items to use. The format of the irregular chain item for the
outer IP headers is also determined using one flag for TTL/Hop
Limit and TOS/TC. This flag is defined in the format of some of
the compressed base headers.
ROHCv2 profiles compress extension headers as other headers, and thus
extension headers have a static chain, a dynamic chain, and an
irregular chain.
ROHCv2 profiles define chains for all headers that can be compressed,
i.e., RTP [<a href="./rfc3550" title=""RTP: A Transport Protocol for Real-Time Applications"">RFC3550</a>], UDP [<a href="./rfc0768" title=""User Datagram Protocol"">RFC0768</a>], ESP [<a href="./rfc4303" title=""IP Encapsulating Security Payload (ESP)"">RFC4303</a>], UDP-Lite
[<a href="./rfc3828" title=""The Lightweight User Datagram Protocol (UDP-Lite)"">RFC3828</a>], IPv4 [<a href="./rfc0791" title=""Internet Protocol"">RFC0791</a>], IPv6 [<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>], AH [<a href="./rfc4302" title=""IP Authentication Header"">RFC4302</a>], GRE
[<a href="./rfc2784" title=""Generic Routing Encapsulation (GRE)"">RFC2784</a>][RFC2890], MINE [<a href="./rfc2004" title=""Minimal Encapsulation within IP"">RFC2004</a>], IPv6 Destination Options header
[<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>], IPv6 Hop-by-hop Options header [<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>], and IPv6 Routing
header [<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>].
<span class="h3"><a class="selflink" id="section-6.6" href="#section-6.6">6.6</a>. Header Formats and Encoding Methods</span>
The header formats are defined using the ROHC formal notation. Some
of the encoding methods used in the header formats are defined in
[<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>], while other methods are defined in this section.
<span class="grey">Pelletier & Sandlund Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h4"><a class="selflink" id="section-6.6.1" href="#section-6.6.1">6.6.1</a>. baseheader_extension_headers</span>
The baseheader_extension_headers encoding method skips over all
fields of the extension headers of the innermost IP header, without
encoding any of them. Fields in these extension headers are instead
encoded in the irregular chain.
This encoding is used in CO headers (see <a href="#section-6.8.2">Section 6.8.2</a>). The
innermost IP header is combined with other header(s) (i.e., UDP, UDP-
Lite, RTP) to create the compressed base header. In this case, there
may be a number of extension headers between the IP headers and the
other headers.
The base header defines a representation of the extension headers, to
comply with the syntax of the formal notation; this encoding method
provides this representation.
<span class="h4"><a class="selflink" id="section-6.6.2" href="#section-6.6.2">6.6.2</a>. baseheader_outer_headers</span>
The baseheader_outer_headers encoding method skips over all the
fields of the extension header(s) that do not belong to the innermost
IP header, without encoding any of them. Changing fields in outer
headers are instead handled by the irregular chain.
This encoding method, similarly to the baseheader_extension_headers
encoding method above, is necessary to keep the definition of the
header formats syntactically correct. It describes tunneling IP
headers and their respective extension headers (i.e., all headers
located before the innermost IP header) for CO headers (see
<a href="#section-6.8.2">Section 6.8.2</a>).
<span class="h4"><a class="selflink" id="section-6.6.3" href="#section-6.6.3">6.6.3</a>. inferred_udp_length</span>
The decompressor infers the value of the UDP length field as being
the sum of the UDP header length and the UDP payload length. The
compressor must therefore ensure that the UDP length field is
consistent with the length field(s) of preceding subheaders, i.e.,
there must not be any padding after the UDP payload that is covered
by the IP Length.
This encoding method is also used for the UDP-Lite Checksum Coverage
field when it behaves in the same manner as the UDP length field
(i.e., when the checksum always covers the entire UDP-Lite payload).
<span class="h4"><a class="selflink" id="section-6.6.4" href="#section-6.6.4">6.6.4</a>. inferred_ip_v4_header_checksum</span>
This encoding method compresses the header checksum field of the IPv4
header. This checksum is defined in <a href="./rfc791">RFC 791</a> [<a href="./rfc0791" title=""Internet Protocol"">RFC0791</a>] as follows:
<span class="grey">Pelletier & Sandlund Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Header Checksum: 16 bits
A checksum on the header only. Since some header fields change
(e.g., time to live), this is recomputed and verified at each
point that the internet header is processed.
The checksum algorithm is:
The checksum field is the 16 bit one's complement of the one's
complement sum of all 16 bit words in the header. For purposes
of computing the checksum, the value of the checksum field is
zero.
As described above, the header checksum protects individual hops from
processing a corrupted header. As the data that this checksum
protects is mostly compressed away and is instead taken from state
stored in the context, this checksum becomes cumulative to the ROHC
CRC. When using this encoding method, the checksum is recomputed by
the decompressor.
The inferred_ip_v4_header_checksum encoding method thus compresses
the header checksum field of the IPv4 header down to a size of zero
bits, i.e., no bits are transmitted in compressed headers for this
field. Using this encoding method, the decompressor infers the value
of this field using the computation above.
The compressor MAY use the header checksum to validate the
correctness of the header before compressing it, to avoid processing
a corrupted header.
<span class="h4"><a class="selflink" id="section-6.6.5" href="#section-6.6.5">6.6.5</a>. inferred_mine_header_checksum</span>
This encoding method compresses the minimal encapsulation header
checksum. This checksum is defined in <a href="./rfc2004">RFC 2004</a> [<a href="./rfc2004" title=""Minimal Encapsulation within IP"">RFC2004</a>] as follows:
Header Checksum
The 16-bit one's complement of the one's complement sum of all
16-bit words in the minimal forwarding header. For purposes of
computing the checksum, the value of the checksum field is 0.
The IP header and IP payload (after the minimal forwarding
header) are not included in this checksum computation.
The inferred_mine_header_checksum encoding method compresses the
minimal encapsulation header checksum down to a size of zero bits,
i.e., no bits are transmitted in compressed headers for this field.
Using this encoding method, the decompressor infers the value of this
field using the above computation.
<span class="grey">Pelletier & Sandlund Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The motivations for inferring this checksum are similar to the ones
explained above in <a href="#section-6.6.4">Section 6.6.4</a>.
The compressor MAY use the minimal encapsulation header checksum to
validate the correctness of the header before compressing it, to
avoid processing a corrupted header.
<span class="h4"><a class="selflink" id="section-6.6.6" href="#section-6.6.6">6.6.6</a>. inferred_ip_v4_length</span>
This encoding method compresses the total length field of the IPv4
header. The total length field of the IPv4 header is defined in <a href="./rfc791">RFC</a>
<a href="./rfc791">791</a> [<a href="./rfc0791" title=""Internet Protocol"">RFC0791</a>] as follows:
Total Length: 16 bits
Total Length is the length of the datagram, measured in octets,
including internet header and data. This field allows the
length of a datagram to be up to 65,535 octets.
The inferred_ip_v4_length encoding method compresses the IPv4 header
checksum down to a size of zero bits, i.e., no bits are transmitted
in compressed headers for this field. Using this encoding method,
the decompressor infers the value of this field by counting in octets
the length of the entire packet after decompression.
<span class="h4"><a class="selflink" id="section-6.6.7" href="#section-6.6.7">6.6.7</a>. inferred_ip_v6_length</span>
This encoding method compresses the payload length field in the IPv6
header. This length field is defined in <a href="./rfc2460">RFC 2460</a> [<a href="./rfc2460" title=""Internet Protocol, Version 6 (IPv6) Specification"">RFC2460</a>] as
follows:
Payload Length: 16-bit unsigned integer
Length of the IPv6 payload, i.e., the rest of the packet
following this IPv6 header, in octets. (Note that any
extension headers present are considered part of the payload,
i.e., included in the length count.)
The "inferred_ip_v6_length" encoding method compresses the payload
length field of the IPv6 header down to a size of zero bits, i.e., no
bits are transmitted in compressed headers for this field. Using
this encoding method, the decompressor infers the value of this field
by counting in octets the length of the entire packet after
decompression.
IPv6 headers using the jumbo payload option of <a href="./rfc2675">RFC 2675</a> [<a href="./rfc2675" title=""IPv6 Jumbograms"">RFC2675</a>]
will not be compressible with this encoding method since the value of
the payload length field does not match the length of the packet.
<span class="grey">Pelletier & Sandlund Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h4"><a class="selflink" id="section-6.6.8" href="#section-6.6.8">6.6.8</a>. Scaled RTP Timestamp Compression</span>
This section provides additional details on encodings used to scale
the RTP timestamp, as defined in the formal notation in
<a href="#section-6.8.2.4">Section 6.8.2.4</a>.
The RTP timestamp (TS) usually increases by a multiple of the RTP
Sequence Number's (SN's) increase and is therefore a suitable
candidate for scaled encoding. This scaling factor is labeled
ts_stride in the definition of the profile in the formal notation.
The compressor sets the scaling factor based on the change in TS with
respect to the change in the RTP SN.
The default value of the scaling factor ts_stride is 160, as defined
in <a href="#section-6.8.2.4">Section 6.8.2.4</a>. To use a different value for ts_stride, the
compressor explicitly updates the value of ts_stride to the
decompressor using one of the header formats that can carry this
information.
When the compressor uses a scaling factor that is different than the
default value of ts_stride, it can only use the new scaling factor
once it has enough confidence that the decompressor has successfully
calculated the residue (ts_offset) of the scaling function for the
timestamp. The compressor achieves this by sending unscaled
timestamp values, to allow the decompressor to establish the residue
based on the current ts_stride. The compressor MAY send the unscaled
timestamp in the same compressed header(s) used to establish the
value of ts_stride.
Once the compressor has gained enough confidence that both the value
of the scaling factor and the value of the residue have been
established in the decompressor, the compressor can start compressing
packets using the new scaling factor.
When the compressor detects that the residue (ts_offset) value has
changed, it MUST NOT select a compressed header format that uses the
scaled timestamp encoding before it has re-established the residue as
described above.
When the value of the timestamp field wraps around, the value of the
residue of the scaling function is likely to change. When this
occurs, the compressor re-establishes the new residue value as
described above.
If the decompressor receives a compressed header containing scaled
timestamp bits while the ts_stride equals zero, it MUST NOT deliver
the packet to upper layers and it SHOULD treat this as a CRC
verification failure.
<span class="grey">Pelletier & Sandlund Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Whether or not the scaling is applied to the RTP TS field is up to
the compressor implementation (i.e., the use of scaling is OPTIONAL),
and is indicated by the tsc_indicator control field. In case scaling
is applied to the RTP TS field, the value of ts_stride used by the
compressor is up to the implementation. A value of ts_stride that is
set to the expected increase in the RTP timestamp between consecutive
unit increases of the RTP SN will provide the most gain for the
scaled encoding. Other values may provide the same gain in some
situations, but may reduce the gain in others.
When scaled timestamp encoding is used for header formats that do not
transmit any lsb-encoded timestamp bits at all, the
inferred_scaled_field encoding of <a href="#section-6.6.10">Section 6.6.10</a> is used for encoding
the timestamp.
<span class="h4"><a class="selflink" id="section-6.6.9" href="#section-6.6.9">6.6.9</a>. timer_based_lsb</span>
The timer-based compression encoding method, timer_based_lsb,
compresses a field whose change pattern approximates a linear
function of the time of day.
This encoding uses the local clock to obtain an approximation of the
value that it encodes. The approximated value is then used as a
reference value together with the num_lsbs_param least-significant
bits received as the encoded value, where num_lsbs_param represents a
number of bits that is sufficient to uniquely represent the encoded
value in the presence of jitter between compression endpoints.
ts_scaled =:= timer_based_lsb(<time_stride_param>,
<num_lsbs_param>, <offset_param>)
The parameters "num_lsbs_param" and "offset_param" are the parameters
to use for the lsb encoding, i.e., the number of least significant
bits and the interpretation interval offset, respectively. The
parameter "time_stride_param" represents the context value of the
control field time_stride.
This encoding method always uses a scaled version of the field it
compresses.
The value of the field is decoded by calculating an approximation of
the scaled value, using:
tsc_ref_advanced = tsc_ref + (a_n - a_ref) / time_stride.
<span class="grey">Pelletier & Sandlund Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
where:
- tsc_ref is a reference value of the scaled representation
of the field.
- a_n is the arrival time associated with the value to decode.
- a_ref is the arrival time associated with the reference header.
- tsc_ref_advanced is an approximation of the scaled value
of the field.
The lsb encoding is then applied using the num_lsbs_param bits
received in the compressed header and the tsc_ref_advanced as
"ref_value" (as per <a href="./rfc4997#section-4.11.5">Section 4.11.5 of [RFC4997]</a>).
<a href="#appendix-B.3">Appendix B.3</a> provides an example of how the compressor can calculate
jitter.
The control field time_stride controls whether or not the
timer_based_lsb method is used in the CO header. The decompressor
SHOULD send the CLOCK_RESOLUTION option with a zero value, if:
o it receives a non-zero time_stride value, and
o it has not previously sent a CLOCK_RESOLUTION feedback with a non-
zero value.
This is to allow compression to recover from the case where a
compressor erroneously activates timer-based compression.
The support and usage of timer-based compression is OPTIONAL for both
the compressor and the decompressor; the compressor is not required
to set the time_stride control field to a non-zero value when it has
received a non-zero value for the CLOCK_RESOLUTION option.
<span class="h4"><a class="selflink" id="section-6.6.10" href="#section-6.6.10">6.6.10</a>. inferred_scaled_field</span>
The inferred_scaled_field encoding method encodes a field that is
defined as changing in relation to the MSN, and for which the
increase with respect to the MSN can be scaled by some scaling
factor. This encoding method is used in compressed header formats
that do not contain any bits for the scaled field. In this case, the
decompressor infers the unscaled value of the scaled field from the
MSN field. The unscaled value is calculated according to the
following formula:
unscaled_value = delta_msn * stride + reference_unscaled_value
where "delta_msn" is the difference in MSN between the reference
value of the MSN in the context and the value of the MSN decompressed
<span class="grey">Pelletier & Sandlund Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
from this packet, "reference_unscaled_value" is the value of the
field being scaled in the context, and "stride" is the scaling value
for this field.
For example, when this encoding method is applied to the RTP
timestamp in the RTP profile, the calculation above becomes:
timestamp = delta_msn * ts_stride + reference_timestamp
<span class="h4"><a class="selflink" id="section-6.6.11" href="#section-6.6.11">6.6.11</a>. control_crc3_encoding</span>
The control_crc3_encoding method provides a CRC calculated over a
number of control fields. The definition of this encoding method is
the same as for the "crc" encoding method specified in <a href="./rfc4997#section-4.11.6">Section 4.11.6
of [RFC4997]</a>, with the difference being that the data covered by the
CRC is given by a concatenated list of control fields.
In other words, the definition of the control_crc3_encoding method is
equivalent to the following definition:
control_crc_encoding(ctrl_data_value, ctrl_data_length)
{
UNCOMPRESSED {
}
COMPRESSED {
control_crc3 =:=
crc(3, 0x06, 0x07, ctrl_data_value, ctrl_data_length) [ 3 ];
}
}
where the parameter "ctrl_data_value" binds to the concatenated
values of the following control fields, in the order listed below:
o reorder_ratio, 2 bits padded with 6 MSB of zeroes
o ts_stride, 32 bits (only for profiles 0x0101 and 0x0107)
o time_stride, 32 bits (only for profiles 0x0101 and 0x0107)
o msn, 16 bits (not applicable for profiles 0x0101, 0x0103, and
0x0107)
o coverage_behavior, 2 bits padded with 6 MSB of zeroes (only for
profiles 0x0107 and 0x0108)
<span class="grey">Pelletier & Sandlund Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
o ip_id_behavior, one octet for each IP header in the compressible
header chain starting from the outermost header. Each octet
consists of 2 bits padded with 6 MSBs of zeroes.
The "ctrl_data_length" binds to the sum of the length of the control
field(s) that are applicable to the specific profile.
The decompressor uses the resulting 3-bit CRC to validate the control
fields that are updated by the co_common and co_repair header
formats; this CRC cannot be used to verify the outcome of a
decompression attempt.
This CRC protects the update of control fields, as the updated values
are not always used to decompress the header that carries them and
thus are not protected by the CRC-7 verification. This prevents
impairments that could occur if the decompression of a co_common or
of a co_repair succeeds and the decompressor sends positive feedback,
while for some reason the control fields are incorrectly updated.
<span class="h4"><a class="selflink" id="section-6.6.12" href="#section-6.6.12">6.6.12</a>. inferred_sequential_ip_id</span>
This encoding method is used with a sequential IP-ID behavior
(sequential or sequential byte-swapped) and when there are no coded
IP-ID bits in the compressed header. In this case, the IP-ID offset
from the MSN is constant, and the IP-ID increases by the same amount
as the MSN (similar to the inferred_scaled_field encoding method).
The decompressor calculates the value for the IP-ID according to the
following formula:
IP-ID = delta_msn + reference_IP_ID_value
where "delta_msn" is the difference between the reference value of
the MSN in the context and the uncompressed value of the MSN
associated to the compressed header, and where
"reference_IP_ID_value" is the value of the IP-ID in the context.
For swapped IP-ID behavior (i.e., when ip_id_behavior_innermost is
set to IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED), "reference_IP_ID_value"
and "IP-ID" are byte-swapped with regard to the corresponding fields
in the context.
If the IP-ID behavior is random or zero, this encoding method does
not update any fields.
<span class="grey">Pelletier & Sandlund Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h4"><a class="selflink" id="section-6.6.13" href="#section-6.6.13">6.6.13</a>. list_csrc(cc_value)</span>
This encoding method compresses the list of RTP CSRC identifiers
using list compression. This encoding establishes a content for the
different CSRC identifiers (items) and a list describing the order in
which they appear.
The compressor passes an argument (cc_value) to this encoding method:
this is the value of the CC field taken from the RTP header. The
decompressor is required to bind the value of this argument to the
number of items in the list, which will allow the decompressor to
correctly reconstruct the CC field.
<span class="h5"><a class="selflink" id="section-6.6.13.1" href="#section-6.6.13.1">6.6.13.1</a>. List Compression</span>
The CSRC identifiers in the uncompressed packet can be represented as
an ordered list, whose order and presence are usually constant
between packets. The generic structure of such a list is as follows:
+--------+--------+--...--+--------+
list: | item 1 | item 2 | | item n |
+--------+--------+--...--+--------+
When performing list compression on a CSRC list, each item is the
uncompressed value of one CSRC identifier.
The basic principles of list-based compression are the following:
When initializing the context:
1) The complete representation of the list of CSRC identifiers is
transmitted.
Then, once the context has been initialized:
2) When the list is unchanged, a compressed header that does not
contain information about the list can be used.
3) When the list changes, a compressed list is sent in the compressed
header, including a representation of its structure and order.
Previously unknown items are sent uncompressed in the list, while
previously known items are only represented by an index pointing
to the item stored in the context.
<span class="grey">Pelletier & Sandlund Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h5"><a class="selflink" id="section-6.6.13.2" href="#section-6.6.13.2">6.6.13.2</a>. Table-based Item Compression</span>
The table-based item compression compresses individual items sent in
compressed lists. The compressor assigns a unique identifier,
"Index", to each item "Item" of a list.
Compressor Logic
The compressor conceptually maintains an item table containing all
items, indexed using "Index". The (Index, Item) pair is sent
together in compressed lists until the compressor gains enough
confidence that the decompressor has observed the mapping between
items and their respective index. Confidence is obtained from the
reception of an acknowledgment from the decompressor, or by
sending (Index, Item) pairs using the optimistic approach. Once
confidence is obtained, the index alone is sent in compressed
lists to indicate the presence of the item corresponding to this
index.
The compressor MAY reset its item table upon receiving a negative
acknowledgement.
The compressor MAY reassign an existing index to a new item by re-
establishing the mapping using the procedure described above.
Decompressor Logic
The decompressor conceptually maintains an item table that
contains all (Index, Item) pairs received. The item table is
updated whenever an (Index, Item) pair is received and
decompression is successful (CRC verification, or CRC-8
validation). The decompressor retrieves the item from the table
whenever an Index is received without an accompanying Item.
If an index is received without an accompanying Item and the
decompressor does not have any context for this index, the
decompressor MUST NOT deliver the packet to upper layers.
<span class="h5"><a class="selflink" id="section-6.6.13.3" href="#section-6.6.13.3">6.6.13.3</a>. Encoding of Compressed Lists</span>
Each item present in a compressed list is represented by:
o an Index into the table of items, and a presence bit indicating if
a compressed representation of the item is present in the list.
o an item (if the presence bit is set).
<span class="grey">Pelletier & Sandlund Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
If the presence bit is not set, the item must already be known by the
decompressor.
A compressed list of items uses the following encoding:
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Reserved |PS | m |
+---+---+---+---+---+---+---+---+
| XI_1, ..., XI_m | m octets, or m * 4 bits
/ --- --- --- ---/
| : Padding : if PS = 0 and m is odd
+---+---+---+---+---+---+---+---+
| |
/ Item_1, ..., Item_n / variable
| |
+---+---+---+---+---+---+---+---+
Reserved: MUST be set to zero; otherwise, the decompressor MUST
discard the packet.
PS: Indicates size of XI fields:
PS = 0 indicates 4-bit XI fields;
PS = 1 indicates 8-bit XI fields.
m: Number of XI item(s) in the compressed list. Also, the value
of the cc_value argument of the list_csrc encoding (see
<a href="#section-6.6.13">Section 6.6.13</a>).
XI_1, ..., XI_m: m XI items. Each XI represents one item in the
list of items of the uncompressed header, in the same order as
they appear in the uncompressed header.
The format of an XI item is as follows:
0 1 2 3
+---+---+---+---+
PS = 0: | X | Index |
+---+---+---+---+
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
PS = 1: | X | Reserved | Index |
+---+---+---+---+---+---+---+---+
X: Indicates whether the item is present in the list:
<span class="grey">Pelletier & Sandlund Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
X = 1 indicates that the item corresponding to the Index is
sent in the Item_1, ..., Item_n list;
X = 0 indicates that the item corresponding to the Index is
not sent.
Reserved: MUST be set to zero; otherwise, the decompressor MUST
discard the packet.
Index: An index into the item table. See <a href="#section-6.6.13.4">Section 6.6.13.4</a>
When 4-bit XI items are used, the XI items are placed in octets
in the following manner:
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| XI_k | XI_k + 1 |
+---+---+---+---+---+---+---+---+
Padding: A 4-bit Padding field is present when PS = 0 and the
number of XIs is odd. The Padding field MUST be set to zero;
otherwise, the decompressor MUST discard the packet.
Item 1, ..., item n: Each item corresponds to an XI with X = 1 in
XI 1, ..., XI m. Each entry in the Item list is the uncompressed
representation of one CSRC identifier.
<span class="h5"><a class="selflink" id="section-6.6.13.4" href="#section-6.6.13.4">6.6.13.4</a>. Item Table Mappings</span>
The item table for list compression is limited to 16 different items,
since the RTP header can only carry at most 15 simultaneous CSRC
identifiers. The effect of having more than 16 items in the item
table will only cause a slight overhead to the compressor when items
are swapped in/out of the item table.
<span class="h5"><a class="selflink" id="section-6.6.13.5" href="#section-6.6.13.5">6.6.13.5</a>. Compressed Lists in Dynamic Chain</span>
A compressed list that is part of the dynamic chain must have all of
its list items present, i.e., all X-bits in the XI list MUST be set.
All items previously established in the item table that are not
present in the list decompressed from this packet MUST also be
retained in the decompressor context.
<span class="grey">Pelletier & Sandlund Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="section-6.7" href="#section-6.7">6.7</a>. Encoding Methods with External Parameters as Arguments</span>
A number of encoding methods in <a href="#section-6.8.2.4">Section 6.8.2.4</a> have one or more
arguments for which the derivation of the parameter's value is
outside the scope of the ROHC-FN [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>] specification of the
header formats.
The following is a list of encoding methods with external parameters
as arguments, from <a href="#section-6.8.2.4">Section 6.8.2.4</a>:
o udp(profile_value, reorder_ratio_value)
o udp_lite(profile_value, reorder_ratio_value,
coverage_behavior_value)
o esp(profile_value, reorder_ratio_value)
o rtp(profile_value, ts_stride_value, time_stride_value,
reorder_ratio_value)
o ipv4(profile_value, is_innermost, outer_ip_flag,
ip_id_behavior_value, reorder_ratio_value))
o ipv6(profile_value, is_innermost, outer_ip_flag,
reorder_ratio_value))
o iponly_baseheader(profile_value, outer_ip_flag,
ip_id_behavior_value, reorder_ratio_value)
o udp_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o udplite_baseheader(profile_value, outer_ip_flag,
ip_id_behavior_value, reorder_ratio_value)
o esp_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o rtp_baseheader(profile_value, ts_stride_value, time_stride_value,
outer_ip_flag, ip_id_behavior_value, reorder_ratio_value)
o udplite_rtp_baseheader(profile_value, ts_stride_value,
time_stride_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value, coverage_behavior_value)
The following applies for all parameters listed below: At the
compressor, the value of the parameter is set according to the
recommendations for each parameter. At the decompressor, the value
<span class="grey">Pelletier & Sandlund Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
of the parameter is set to undefined and will get bound by encoding
methods, except where otherwise noted.
The following is a list of external arguments with their respective
definition:
o profile_value:
Set to the 16-bit number that identifies the profile used to
compress this packet. When processing the static chain at the
decompressor, this parameter is set to the value of the profile
field in the IR header (see <a href="#section-6.8.1">Section 6.8.1</a>).
o reorder_ratio_value:
Set to a 2-bit integer value, using one of the constants whose
name begins with the prefix REORDERING_ and as defined in
<a href="#section-6.8.2.4">Section 6.8.2.4</a>.
o ip_id_behavior_value:
Set to a 2-bit integer value, using one of the constants whose
name begins with the prefix IP_ID_BEHAVIOR_ and as defined in
<a href="#section-6.8.2.4">Section 6.8.2.4</a>.
o coverage_behavior_value:
Set to a 2-bit integer value, using one of the constants whose
name begins with the prefix UDP_LITE_COVERAGE_ and as defined
in <a href="#section-6.8.2.4">Section 6.8.2.4</a>.
o outer_ip_flag:
This parameter is set to 1 if at least one of the TOS/TC or
TTL/Hop Limit fields in outer IP headers has changed compared
to their reference values in the context; otherwise, it is set
to 0. This flag may only be set to 1 for the "co_common"
header format in the different profiles.
o is_innermost:
This boolean flag is set to 1 when processing the innermost of
the compressible IP headers; otherwise, it is set to 0.
<span class="grey">Pelletier & Sandlund Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
o ts_stride_value
The value of this parameter should be set to the expected
increase in the RTP Timestamp between consecutive RTP sequence
numbers. The value selected is implementation-specific. See
also <a href="#section-6.6.8">Section 6.6.8</a>.
o time_stride_value
The value of this parameter should be set to the expected
inter-arrival time between consecutive packets for the flow.
The value selected is implementation-specific. This parameter
MUST be set to zero, unless the compressor has received a
feedback message with the CLOCK_RESOLUTION option set to a non-
zero value. See also <a href="#section-6.6.9">Section 6.6.9</a>.
<span class="h3"><a class="selflink" id="section-6.8" href="#section-6.8">6.8</a>. Header Formats</span>
ROHCv2 profiles use two different header types: the Initialization
and Refresh (IR) header type, and the Compressed header type (CO).
The CO header type defines a number of header formats: there are two
sets of base header formats, with a few additional formats that are
common to both sets.
<span class="h4"><a class="selflink" id="section-6.8.1" href="#section-6.8.1">6.8.1</a>. Initialization and Refresh Header Format (IR)</span>
The IR header format uses the structure of the ROHC IR header as
defined in <a href="./rfc4995#section-5.2.2.1">Section 5.2.2.1 of [RFC4995]</a>.
Header type: IR
This header format communicates the static part and the dynamic
part of the context.
<span class="grey">Pelletier & Sandlund Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The ROHCv2 IR header has the following format:
0 1 2 3 4 5 6 7
--- --- --- --- --- --- --- ---
: Add-CID octet : if for small CIDs and (CID != 0)
+---+---+---+---+---+---+---+---+
| 1 1 1 1 1 1 0 1 | IR type octet
+---+---+---+---+---+---+---+---+
: :
/ 0-2 octets of CID / 1-2 octets if for large CIDs
: :
+---+---+---+---+---+---+---+---+
| Profile | 1 octet
+---+---+---+---+---+---+---+---+
| CRC | 1 octet
+---+---+---+---+---+---+---+---+
| |
/ Static chain / variable length
| |
- - - - - - - - - - - - - - - -
| |
/ Dynamic chain / variable length
| |
- - - - - - - - - - - - - - - -
CRC: 8-bit CRC over the entire IR-header, including any CID fields
and up until the end of the dynamic chain, using the polynomial
defined in [<a href="./rfc4995" title=""The RObust Header Compression (ROHC) Framework"">RFC4995</a>]. For purposes of computing the CRC, the CRC
field is zero.
Static chain: See <a href="#section-6.5">Section 6.5</a>.
Dynamic chain: See <a href="#section-6.5">Section 6.5</a>.
<span class="h4"><a class="selflink" id="section-6.8.2" href="#section-6.8.2">6.8.2</a>. Compressed Header Formats (CO)</span>
<span class="h5"><a class="selflink" id="section-6.8.2.1" href="#section-6.8.2.1">6.8.2.1</a>. Design Rationale for Compressed Base Headers</span>
The compressed header formats are defined as two separate sets for
each profile: one set for the headers where the innermost IP header
contains a sequential IP-ID (either network byte order or byte-
swapped), and one set for the headers without sequential IP-ID
(either random, zero, or no IP-ID). There are also a number of
common header formats shared between both sets. In the description
below, the naming convention used for header formats that belong to
the sequential set is to include "seq" in the name of the format,
while similarly "rnd" is used for those that belong to the non-
sequential set.
<span class="grey">Pelletier & Sandlund Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The design of the header formats is derived from the field behavior
analysis found in <a href="#appendix-A">Appendix A</a>.
All of the compressed base headers transmit lsb-encoded MSN bits and
a CRC.
The following header formats exist for all profiles defined in this
document, and are common to both the sequential and the random header
format sets:
o co_common: This format can be used to update the context when the
established change pattern of a dynamic field changes, for any of
the dynamic fields. However, not all dynamic fields are updated
by conveying their uncompressed value; some fields can only be
transmitted using a compressed representation. This format is
especially useful when a rarely changing field needs to be
updated. This format contains a set of flags to indicate what
fields are present in the header, and its size can vary
accordingly. This format is protected by a 7-bit CRC. It can
update control fields, and it thus also carries a 3-bit CRC to
protect those fields. This format is similar in purpose to the
UOR-2-extension 3 format of [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o co_repair: This format can be used to update the context of all
the dynamic fields by conveying their uncompressed value. This is
especially useful when context damage is assumed (e.g., from the
reception of a NACK) and a context repair is performed. This
format is protected by a 7-bit CRC. It also carries a 3-bit CRC
over the control fields that it can update. This format is
similar in purpose to the IR-DYN format of [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>] when
performing context repairs.
o pt_0_crc3: This format conveys only the MSN; it can therefore only
update the MSN and fields that are derived from the MSN, such as
IP-ID and the RTP Timestamp (for applicable profiles). It is
protected by a 3-bit CRC. This format is equivalent to the UO-0
header format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_0_crc7: This format has the same properties as pt_0_crc3, but
is instead protected by a 7-bit CRC and contains a larger amount
of lsb-encoded MSN bits. This format is useful in environments
where a high amount of reordering or a high-residual error rate
can occur.
<span class="grey">Pelletier & Sandlund Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The following header format descriptions apply to profiles 0x0101 and
0x0107.
o pt_1_rnd: This format can convey changes to the MSN and to the RTP
Marker bit, and it can update the RTP timestamp using scaled
timestamp encoding. It is protected by a 3-bit CRC. It is
similar in purpose to the UO-1 format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_1_seq_id: This format can convey changes to the MSN and to the
IP-ID. It is protected by a 3-bit CRC. It is similar in purpose
to the UO-1-ID format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_1_seq_ts: This format can convey changes to the MSN and to the
RTP Marker bit, and it can update the RTP Timestamp using scaled
timestamp encoding. It is protected by a 3-bit CRC. It is
similar in purpose to the UO-1-TS format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_2_rnd: This format can convey changes to the MSN, to the RTP
Marker bit, and to the RTP Timestamp. It is protected by a 7-bit
CRC. It is similar in purpose to the UOR-2 format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_2_seq_id: This format can convey changes to the MSN and to the
IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
to the UO-2-ID format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_2_seq_ts: This format can convey changes to the MSN, to the RTP
Marker bit and it can update the RTP Timestamp using scaled
timestamp encoding. It is protected by a 7-bit CRC. It is
similar in purpose to the UO-2-TS format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_2_seq_both: This format can convey changes to both the RTP
Timestamp and the IP-ID, in addition to the MSN and to the Marker
bit. It is protected by a 7-bit CRC. It is similar in purpose to
the UOR-2-ID extension 1 format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
The following header format descriptions apply to profiles 0x0102,
0x0103, 0x0104, and 0x0108.
o pt_1_seq_id: This format can convey changes to the MSN and to the
IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
to the UO-1-ID format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
o pt_2_seq_id: This format can convey changes to the MSN and to the
IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
to the UO-2-ID format in [<a href="./rfc3095" title=""RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed"">RFC3095</a>].
<span class="grey">Pelletier & Sandlund Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h5"><a class="selflink" id="section-6.8.2.2" href="#section-6.8.2.2">6.8.2.2</a>. co_repair Header Format</span>
The ROHCv2 co_repair header has the following format:
0 1 2 3 4 5 6 7
--- --- --- --- --- --- --- ---
: Add-CID octet : if for small CIDs and CID 1-15
+---+---+---+---+---+---+---+---+
| 1 1 1 1 1 0 1 1 | discriminator
+---+---+---+---+---+---+---+---+
: :
/ 0, 1, or 2 octets of CID / 1-2 octets if large CIDs
: :
+---+---+---+---+---+---+---+---+
|r1 | CRC-7 |
+---+---+---+---+---+---+---+---+
| r2 | CRC-3 |
+---+---+---+---+---+---+---+---+
| |
/ Dynamic chain / variable length
| |
- - - - - - - - - - - - - - - -
r1: MUST be set to zero; otherwise, the decompressor MUST discard
the packet.
CRC-7: A 7-bit CRC over the entire uncompressed header, computed
using the crc7 (data_value, data_length) encoding method defined
in <a href="#section-6.8.2.4">Section 6.8.2.4</a>, where data_value corresponds to the entire
uncompressed header chain and where data_length corresponds to the
length of this header chain.
r2: MUST be set to zero; otherwise, the decompressor MUST discard
the packet.
CRC-3: Encoded using the control_crc3_encoding method defined in
<a href="#section-6.6.11">Section 6.6.11</a>.
Dynamic chain: See <a href="#section-6.5">Section 6.5</a>.
<span class="h5"><a class="selflink" id="section-6.8.2.3" href="#section-6.8.2.3">6.8.2.3</a>. General CO Header Format</span>
The CO header format communicates irregularities in the packet
header. All CO formats carry a CRC and can update the context. All
CO header formats use the general format defined in this section,
with the exception of the co_repair format, which is defined in
<a href="#section-6.8.2.2">Section 6.8.2.2</a>.
<span class="grey">Pelletier & Sandlund Standards Track [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The general format for a compressed header is as follows:
0 1 2 3 4 5 6 7
--- --- --- --- --- --- --- ---
: Add-CID octet : if for small CIDs and CID 1-15
+---+---+---+---+---+---+---+---+
| first octet of base header | (with type indication)
+---+---+---+---+---+---+---+---+
: :
/ 0, 1, or 2 octets of CID / 1-2 octets if large CIDs
: :
+---+---+---+---+---+---+---+---+
/ remainder of base header / variable length
+---+---+---+---+---+---+---+---+
: :
/ Irregular Chain / variable length
: :
--- --- --- --- --- --- --- ---
The base header in the figure above is the compressed representation
of the innermost IP header and other header(s), if any, in the
uncompressed packet. The base header formats are defined in
<a href="#section-6.8.2.4">Section 6.8.2.4</a>. In the formal description of the header formats,
the base header for each profile is labeled
<profile_name>_baseheader, where <profile_name> is defined in the
following table:
+------------------+----------------+
| Profile number | profile_name |
+------------------+----------------+
| 0x0101 | rtp |
| 0x0102 | udp |
| 0x0103 | esp |
| 0x0104 | ip |
| 0x0107 | udplite_rtp |
| 0x0108 | udplite |
+------------------+----------------+
<span class="h5"><a class="selflink" id="section-6.8.2.4" href="#section-6.8.2.4">6.8.2.4</a>. Header Formats in ROHC-FN</span>
This section defines the complete set of base header formats for
ROHCv2 profiles. The base header formats are defined using the ROHC
Formal Notation [<a href="./rfc4997" title=""Formal Notation for RObust Header Compression (ROHC-FN)"">RFC4997</a>].
<span class="grey">Pelletier & Sandlund Standards Track [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
// NOTE: The irregular, static, and dynamic chains (see <a href="#section-6.5">Section 6.5</a>)
// are defined across multiple encoding methods and are embodied
// in the correspondingly named formats within those encoding
// methods. In particular, note that the static and dynamic
// chains ordinarily go together. The uncompressed fields are
// defined across these two formats combined, rather than in one
// or the other of them. The irregular chain items are likewise
// combined with a baseheader format.
////////////////////////////////////////////
// Constants
////////////////////////////////////////////
// IP-ID behavior constants
IP_ID_BEHAVIOR_SEQUENTIAL = 0;
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED = 1;
IP_ID_BEHAVIOR_RANDOM = 2;
IP_ID_BEHAVIOR_ZERO = 3;
// UDP-lite checksum coverage behavior constants
UDP_LITE_COVERAGE_INFERRED = 0;
UDP_LITE_COVERAGE_STATIC = 1;
UDP_LITE_COVERAGE_IRREGULAR = 2;
// The value 3 is reserved and cannot be used for coverage behavior
// Variable reordering offset
REORDERING_NONE = 0;
REORDERING_QUARTER = 1;
REORDERING_HALF = 2;
REORDERING_THREEQUARTERS = 3;
// Profile names and versions
PROFILE_RTP_0101 = 0x0101;
PROFILE_UDP_0102 = 0x0102;
PROFILE_ESP_0103 = 0x0103;
PROFILE_IP_0104 = 0x0104;
PROFILE_RTP_0107 = 0x0107; // With UDP-LITE
PROFILE_UDPLITE_0108 = 0x0108; // Without RTP
// Default values for RTP timestamp encoding
TS_STRIDE_DEFAULT = 160;
TIME_STRIDE_DEFAULT = 0;
////////////////////////////////////////////
// Global control fields
////////////////////////////////////////////
CONTROL {
<span class="grey">Pelletier & Sandlund Standards Track [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
profile [ 16 ];
msn [ 16 ];
reorder_ratio [ 2 ];
// ip_id fields are for innermost IP header only
ip_id_offset [ 16 ];
ip_id_behavior_innermost [ 2 ];
// The following are only used in RTP-based profiles
ts_stride [ 32 ];
time_stride [ 32 ];
ts_scaled [ 32 ];
ts_offset [ 32 ];
// UDP-lite-based profiles only
coverage_behavior [ 2 ];
}
///////////////////////////////////////////////
// Encoding methods not specified in FN syntax:
///////////////////////////////////////////////
baseheader_extension_headers "defined in <a href="#section-6.6.1">Section 6.6.1</a>";
baseheader_outer_headers "defined in <a href="#section-6.6.2">Section 6.6.2</a>";
control_crc3_encoding "defined in <a href="#section-6.6.11">Section 6.6.11</a>";
inferred_ip_v4_header_checksum "defined in <a href="#section-6.6.4">Section 6.6.4</a>";
inferred_ip_v4_length "defined in <a href="#section-6.6.6">Section 6.6.6</a>";
inferred_ip_v6_length "defined in <a href="#section-6.6.7">Section 6.6.7</a>";
inferred_mine_header_checksum "defined in <a href="#section-6.6.5">Section 6.6.5</a>";
inferred_scaled_field "defined in <a href="#section-6.6.10">Section 6.6.10</a>";
inferred_sequential_ip_id "defined in <a href="#section-6.6.12">Section 6.6.12</a>";
inferred_udp_length "defined in <a href="#section-6.6.3">Section 6.6.3</a>";
list_csrc(cc_value) "defined in <a href="#section-6.6.13">Section 6.6.13</a>";
timer_based_lsb(time_stride, k, p) "defined in <a href="#section-6.6.9">Section 6.6.9</a>";
////////////////////////////////////////////
// General encoding methods
////////////////////////////////////////////
static_or_irreg(flag, width)
{
UNCOMPRESSED {
field [ width ];
}
COMPRESSED irreg_enc {
ENFORCE(flag == 1);
field =:= irregular(width) [ width ];
}
COMPRESSED static_enc {
<span class="grey">Pelletier & Sandlund Standards Track [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(flag == 0);
field =:= static [ 0 ];
}
}
optional_32(flag)
{
UNCOMPRESSED {
item [ 0, 32 ];
}
COMPRESSED present {
ENFORCE(flag == 1);
item =:= irregular(32) [ 32 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
item =:= compressed_value(0, 0) [ 0 ];
}
}
// Send the entire value, or keep previous value
sdvl_or_static(flag)
{
UNCOMPRESSED {
field [ 32 ];
}
COMPRESSED present_7bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^7);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '0' [ 1 ];
field [ 7 ];
}
COMPRESSED present_14bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^14);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '10' [ 2 ];
field [ 14 ];
}
COMPRESSED present_21bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^21);
<span class="grey">Pelletier & Sandlund Standards Track [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '110' [ 3 ];
field [ 21 ];
}
COMPRESSED present_28bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^28);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '1110' [ 4 ];
field [ 28 ];
}
COMPRESSED present_32bit {
ENFORCE(flag == 1);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '11111111' [ 8 ];
field [ 32 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
field =:= static;
}
}
// Send the entire value, or revert to default value
sdvl_or_default(flag, default_value)
{
UNCOMPRESSED {
field [ 32 ];
}
COMPRESSED present_7bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^7);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '0' [ 1 ];
field [ 7 ];
}
COMPRESSED present_14bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^14);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '10' [ 2 ];
field [ 14 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED present_21bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^21);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '110' [ 3 ];
field [ 21 ];
}
COMPRESSED present_28bit {
ENFORCE(flag == 1);
ENFORCE(field.UVALUE < 2^28);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '1110' [ 4 ];
field [ 28 ];
}
COMPRESSED present_32bit {
ENFORCE(flag == 1);
ENFORCE(field.CVALUE == field.UVALUE);
discriminator =:= '11111111' [ 8 ];
field [ 32 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
field =:= uncompressed_value(32, default_value);
}
}
lsb_7_or_31
{
UNCOMPRESSED {
item [ 32 ];
}
COMPRESSED lsb_7 {
discriminator =:= '0' [ 1 ];
item =:= lsb(7, ((2^7) / 4) - 1) [ 7 ];
}
COMPRESSED lsb_31 {
discriminator =:= '1' [ 1 ];
item =:= lsb(31, ((2^31) / 4) - 1) [ 31 ];
}
}
crc3(data_value, data_length)
{
<span class="grey">Pelletier & Sandlund Standards Track [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
UNCOMPRESSED {
}
COMPRESSED {
crc_value =:= crc(3, 0x06, 0x07, data_value, data_length) [ 3 ];
}
}
crc7(data_value, data_length)
{
UNCOMPRESSED {
}
COMPRESSED {
crc_value =:= crc(7, 0x79, 0x7f, data_value, data_length) [ 7 ];
}
}
// Encoding method for updating a scaled field and its associated
// control fields. Should be used both when the value is scaled
// or unscaled in a compressed format.
// Does not have an uncompressed side.
field_scaling(stride_value, scaled_value, unscaled_value, residue_value)
{
UNCOMPRESSED {
// Nothing
}
COMPRESSED no_scaling {
ENFORCE(stride_value == 0);
ENFORCE(residue_value == unscaled_value);
ENFORCE(scaled_value == 0);
}
COMPRESSED scaling_used {
ENFORCE(stride_value != 0);
ENFORCE(residue_value == (unscaled_value % stride_value));
ENFORCE(unscaled_value ==
scaled_value * stride_value + residue_value);
}
}
////////////////////////////////////////////
// IPv6 Destination options header
////////////////////////////////////////////
ip_dest_opt
{
UNCOMPRESSED {
<span class="grey">Pelletier & Sandlund Standards Track [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
next_header [ 8 ];
length [ 8 ];
value [ length.UVALUE * 64 + 48 ];
}
DEFAULT {
length =:= static;
next_header =:= static;
value =:= static;
}
COMPRESSED dest_opt_static {
next_header =:= irregular(8) [ 8 ];
length =:= irregular(8) [ 8 ];
}
COMPRESSED dest_opt_dynamic {
value =:=
irregular(length.UVALUE * 64 + 48) [ length.UVALUE * 64 + 48 ];
}
COMPRESSED dest_opt_irregular {
}
}
////////////////////////////////////////////
// IPv6 Hop-by-Hop options header
////////////////////////////////////////////
ip_hop_opt
{
UNCOMPRESSED {
next_header [ 8 ];
length [ 8 ];
value [ length.UVALUE * 64 + 48 ];
}
DEFAULT {
length =:= static;
next_header =:= static;
value =:= static;
}
COMPRESSED hop_opt_static {
next_header =:= irregular(8) [ 8 ];
length =:= irregular(8) [ 8 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED hop_opt_dynamic {
value =:=
irregular(length.UVALUE*64+48) [ length.UVALUE * 64 + 48 ];
}
COMPRESSED hop_opt_irregular {
}
}
////////////////////////////////////////////
// IPv6 Routing header
////////////////////////////////////////////
ip_rout_opt
{
UNCOMPRESSED {
next_header [ 8 ];
length [ 8 ];
value [ length.UVALUE * 64 + 48 ];
}
DEFAULT {
length =:= static;
next_header =:= static;
value =:= static;
}
COMPRESSED rout_opt_static {
next_header =:= irregular(8) [ 8 ];
length =:= irregular(8) [ 8 ];
value =:=
irregular(length.UVALUE*64+48) [ length.UVALUE * 64 + 48 ];
}
COMPRESSED rout_opt_dynamic {
}
COMPRESSED rout_opt_irregular {
}
}
////////////////////////////////////////////
// GRE Header
////////////////////////////////////////////
optional_lsb_7_or_31(flag)
{
<span class="grey">Pelletier & Sandlund Standards Track [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
UNCOMPRESSED {
item [ 0, 32 ];
}
COMPRESSED present {
ENFORCE(flag == 1);
item =:= lsb_7_or_31 [ 8, 32 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
item =:= compressed_value(0, 0) [ 0 ];
}
}
optional_checksum(flag_value)
{
UNCOMPRESSED {
value [ 0, 16 ];
reserved1 [ 0, 16 ];
}
COMPRESSED cs_present {
ENFORCE(flag_value == 1);
value =:= irregular(16) [ 16 ];
reserved1 =:= uncompressed_value(16, 0) [ 0 ];
}
COMPRESSED not_present {
ENFORCE(flag_value == 0);
value =:= compressed_value(0, 0) [ 0 ];
reserved1 =:= compressed_value(0, 0) [ 0 ];
}
}
gre_proto
{
UNCOMPRESSED {
protocol [ 16 ];
}
COMPRESSED ether_v4 {
discriminator =:= '0' [ 1 ];
protocol =:= uncompressed_value(16, 0x0800) [ 0 ];
}
COMPRESSED ether_v6 {
discriminator =:= '1' [ 1 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
protocol =:= uncompressed_value(16, 0x86DD) [ 0 ];
}
}
gre
{
UNCOMPRESSED {
c_flag [ 1 ];
r_flag =:= uncompressed_value(1, 0) [ 1 ];
k_flag [ 1 ];
s_flag [ 1 ];
reserved0 =:= uncompressed_value(9, 0) [ 9 ];
version =:= uncompressed_value(3, 0) [ 3 ];
protocol [ 16 ];
checksum_and_res [ 0, 32 ];
key [ 0, 32 ];
sequence_number [ 0, 32 ];
}
DEFAULT {
c_flag =:= static;
k_flag =:= static;
s_flag =:= static;
protocol =:= static;
key =:= static;
sequence_number =:= static;
}
COMPRESSED gre_static {
ENFORCE((c_flag.UVALUE == 1 && checksum_and_res.ULENGTH == 32)
|| checksum_and_res.ULENGTH == 0);
ENFORCE((s_flag.UVALUE == 1 && sequence_number.ULENGTH == 32)
|| sequence_number.ULENGTH == 0);
protocol =:= gre_proto [ 1 ];
c_flag =:= irregular(1) [ 1 ];
k_flag =:= irregular(1) [ 1 ];
s_flag =:= irregular(1) [ 1 ];
padding =:= compressed_value(4, 0) [ 4 ];
key =:= optional_32(k_flag.UVALUE) [ 0, 32 ];
}
COMPRESSED gre_dynamic {
checksum_and_res =:=
optional_checksum(c_flag.UVALUE) [ 0, 16 ];
sequence_number =:= optional_32(s_flag.UVALUE) [ 0, 32 ];
}
COMPRESSED gre_irregular {
<span class="grey">Pelletier & Sandlund Standards Track [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
checksum_and_res =:= optional_checksum(c_flag.UVALUE) [ 0, 16 ];
sequence_number =:=
optional_lsb_7_or_31(s_flag.UVALUE) [ 0, 8, 32 ];
}
}
/////////////////////////////////////////////
// MINE header
/////////////////////////////////////////////
mine
{
UNCOMPRESSED {
next_header [ 8 ];
s_bit [ 1 ];
res_bits [ 7 ];
checksum [ 16 ];
orig_dest [ 32 ];
orig_src [ 0, 32 ];
}
DEFAULT {
next_header =:= static;
s_bit =:= static;
res_bits =:= static;
checksum =:= inferred_mine_header_checksum;
orig_dest =:= static;
orig_src =:= static;
}
COMPRESSED mine_static {
next_header =:= irregular(8) [ 8 ];
s_bit =:= irregular(1) [ 1 ];
// Reserved bits are included to achieve byte-alignment
res_bits =:= irregular(7) [ 7 ];
orig_dest =:= irregular(32) [ 32 ];
orig_src =:= optional_32(s_bit.UVALUE) [ 0, 32 ];
}
COMPRESSED mine_dynamic {
}
COMPRESSED mine_irregular {
}
}
/////////////////////////////////////////////
<span class="grey">Pelletier & Sandlund Standards Track [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
// Authentication Header (AH)
/////////////////////////////////////////////
ah
{
UNCOMPRESSED {
next_header [ 8 ];
length [ 8 ];
res_bits =:= uncompressed_value(16, 0) [ 16 ];
spi [ 32 ];
sequence_number [ 32 ];
icv [ length.UVALUE*32-32 ];
}
DEFAULT {
next_header =:= static;
length =:= static;
spi =:= static;
sequence_number =:= static;
}
COMPRESSED ah_static {
next_header =:= irregular(8) [ 8 ];
length =:= irregular(8) [ 8 ];
spi =:= irregular(32) [ 32 ];
}
COMPRESSED ah_dynamic {
sequence_number =:= irregular(32) [ 32 ];
icv =:=
irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ];
}
COMPRESSED ah_irregular {
sequence_number =:= lsb_7_or_31 [ 8, 32 ];
icv =:=
irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ];
}
}
/////////////////////////////////////////////
// IPv6 Header
/////////////////////////////////////////////
fl_enc
{
UNCOMPRESSED {
<span class="grey">Pelletier & Sandlund Standards Track [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
flow_label [ 20 ];
}
COMPRESSED fl_zero {
discriminator =:= '0' [ 1 ];
flow_label =:= uncompressed_value(20, 0) [ 0 ];
reserved =:= '0000' [ 4 ];
}
COMPRESSED fl_non_zero {
discriminator =:= '1' [ 1 ];
flow_label =:= irregular(20) [ 20 ];
}
}
ipv6(profile_value, is_innermost, outer_ip_flag, reorder_ratio_value)
{
UNCOMPRESSED {
version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dst_addr [ 128 ];
}
CONTROL {
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(innermost_ip.UVALUE == is_innermost);
innermost_ip [ 1 ];
}
DEFAULT {
tos_tc =:= static;
flow_label =:= static;
payload_length =:= inferred_ip_v6_length;
next_header =:= static;
ttl_hopl =:= static;
src_addr =:= static;
dst_addr =:= static;
}
COMPRESSED ipv6_static {
version_flag =:= '1' [ 1 ];
innermost_ip =:= irregular(1) [ 1 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
reserved =:= '0' [ 1 ];
flow_label =:= fl_enc [ 5, 21 ];
next_header =:= irregular(8) [ 8 ];
src_addr =:= irregular(128) [ 128 ];
dst_addr =:= irregular(128) [ 128 ];
}
COMPRESSED ipv6_endpoint_dynamic {
ENFORCE((is_innermost == 1) &&
(profile_value == PROFILE_IP_0104));
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= irregular(2) [ 2 ];
msn =:= irregular(16) [ 16 ];
}
COMPRESSED ipv6_regular_dynamic {
ENFORCE((is_innermost == 0) ||
(profile_value != PROFILE_IP_0104));
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
}
COMPRESSED ipv6_outer_irregular {
ENFORCE(is_innermost == 0);
tos_tc =:=
static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
ttl_hopl =:=
static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
}
COMPRESSED ipv6_innermost_irregular {
ENFORCE(is_innermost == 1);
}
}
/////////////////////////////////////////////
// IPv4 Header
/////////////////////////////////////////////
ip_id_enc_dyn(behavior)
{
UNCOMPRESSED {
ip_id [ 16 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED ip_id_seq {
ENFORCE((behavior == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
ENFORCE(ip_id_offset.UVALUE == ip_id.UVALUE - msn.UVALUE);
ip_id =:= irregular(16) [ 16 ];
}
COMPRESSED ip_id_random {
ENFORCE(behavior == IP_ID_BEHAVIOR_RANDOM);
ip_id =:= irregular(16) [ 16 ];
}
COMPRESSED ip_id_zero {
ENFORCE(behavior == IP_ID_BEHAVIOR_ZERO);
ip_id =:= uncompressed_value(16, 0) [ 0 ];
}
}
ip_id_enc_irreg(behavior)
{
UNCOMPRESSED {
ip_id [ 16 ];
}
COMPRESSED ip_id_seq {
ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL);
}
COMPRESSED ip_id_seq_swapped {
ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED);
}
COMPRESSED ip_id_rand {
ENFORCE(behavior == IP_ID_BEHAVIOR_RANDOM);
ip_id =:= irregular(16) [ 16 ];
}
COMPRESSED ip_id_zero {
ENFORCE(behavior == IP_ID_BEHAVIOR_ZERO);
ip_id =:= uncompressed_value(16, 0) [ 0 ];
}
}
ipv4(profile_value, is_innermost, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{
UNCOMPRESSED {
version =:= uncompressed_value(4, 4) [ 4 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
hdr_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
protocol [ 8 ];
checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dst_addr [ 32 ];
}
CONTROL {
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(innermost_ip.UVALUE == is_innermost);
ip_id_behavior_outer [ 2 ];
innermost_ip [ 1 ];
}
DEFAULT {
tos_tc =:= static;
df =:= static;
ttl_hopl =:= static;
protocol =:= static;
src_addr =:= static;
dst_addr =:= static;
ip_id_behavior_outer =:= static;
}
COMPRESSED ipv4_static {
version_flag =:= '0' [ 1 ];
innermost_ip =:= irregular(1) [ 1 ];
reserved =:= '000000' [ 6 ];
protocol =:= irregular(8) [ 8 ];
src_addr =:= irregular(32) [ 32 ];
dst_addr =:= irregular(32) [ 32 ];
}
COMPRESSED ipv4_endpoint_innermost_dynamic {
ENFORCE((is_innermost == 1) && (profile_value == PROFILE_IP_0104));
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
reserved =:= '000' [ 3 ];
reorder_ratio =:= irregular(2) [ 2 ];
df =:= irregular(1) [ 1 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ip_id_behavior_innermost =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior_innermost.UVALUE) [ 0, 16 ];
msn =:= irregular(16) [ 16 ];
}
COMPRESSED ipv4_regular_innermost_dynamic {
ENFORCE((is_innermost == 1) && (profile_value != PROFILE_IP_0104));
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
reserved =:= '00000' [ 5 ];
df =:= irregular(1) [ 1 ];
ip_id_behavior_innermost =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior_innermost.UVALUE) [ 0, 16 ];
}
COMPRESSED ipv4_outer_dynamic {
ENFORCE(is_innermost == 0);
ENFORCE(ip_id_behavior_outer.UVALUE == ip_id_behavior_value);
reserved =:= '00000' [ 5 ];
df =:= irregular(1) [ 1 ];
ip_id_behavior_outer =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior_outer.UVALUE) [ 0, 16 ];
}
COMPRESSED ipv4_outer_irregular {
ENFORCE(is_innermost == 0);
ip_id =:=
ip_id_enc_irreg(ip_id_behavior_outer.UVALUE) [ 0, 16 ];
tos_tc =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
}
COMPRESSED ipv4_innermost_irregular {
ENFORCE(is_innermost == 1);
ip_id =:=
ip_id_enc_irreg(ip_id_behavior_innermost.UVALUE) [ 0, 16 ];
}
}
/////////////////////////////////////////////
// UDP Header
/////////////////////////////////////////////
<span class="grey">Pelletier & Sandlund Standards Track [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
udp(profile_value, reorder_ratio_value)
{
UNCOMPRESSED {
ENFORCE((profile_value == PROFILE_RTP_0101) ||
(profile_value == PROFILE_UDP_0102));
src_port [ 16 ];
dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ];
checksum [ 16 ];
}
CONTROL {
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
checksum_used [ 1 ];
}
DEFAULT {
src_port =:= static;
dst_port =:= static;
checksum_used =:= static;
}
COMPRESSED udp_static {
src_port =:= irregular(16) [ 16 ];
dst_port =:= irregular(16) [ 16 ];
}
COMPRESSED udp_endpoint_dynamic {
ENFORCE(profile_value == PROFILE_UDP_0102);
ENFORCE(profile == PROFILE_UDP_0102);
ENFORCE(checksum_used.UVALUE == (checksum.UVALUE != 0));
checksum =:= irregular(16) [ 16 ];
msn =:= irregular(16) [ 16 ];
reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= irregular(2) [ 2 ];
}
COMPRESSED udp_regular_dynamic {
ENFORCE(profile_value == PROFILE_RTP_0101);
ENFORCE(checksum_used.UVALUE == (checksum.UVALUE != 0));
checksum =:= irregular(16) [ 16 ];
}
COMPRESSED udp_zero_checksum_irregular {
ENFORCE(checksum_used.UVALUE == 0);
checksum =:= uncompressed_value(16, 0) [ 0 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED udp_with_checksum_irregular {
ENFORCE(checksum_used.UVALUE == 1);
checksum =:= irregular(16) [ 16 ];
}
}
/////////////////////////////////////////////
// RTP Header
/////////////////////////////////////////////
csrc_list_dynchain(presence, cc_value)
{
UNCOMPRESSED {
csrc_list;
}
COMPRESSED no_list {
ENFORCE(cc_value == 0);
ENFORCE(presence == 0);
csrc_list =:= uncompressed_value(0, 0) [ 0 ];
}
COMPRESSED list_present {
ENFORCE(presence == 1);
csrc_list =:= list_csrc(cc_value) [ VARIABLE ];
}
}
rtp(profile_value, ts_stride_value, time_stride_value,
reorder_ratio_value)
{
UNCOMPRESSED {
ENFORCE((profile_value == PROFILE_RTP_0101) ||
(profile_value == PROFILE_RTP_0107));
rtp_version =:= uncompressed_value(2, 0) [ 2 ];
pad_bit [ 1 ];
extension [ 1 ];
cc [ 4 ];
marker [ 1 ];
payload_type [ 7 ];
sequence_number [ 16 ];
timestamp [ 32 ];
ssrc [ 32 ];
csrc_list [ cc.UVALUE * 32 ];
}
CONTROL {
<span class="grey">Pelletier & Sandlund Standards Track [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(time_stride_value == time_stride.UVALUE);
ENFORCE(ts_stride_value == ts_stride.UVALUE);
dummy_field =:= field_scaling(ts_stride.UVALUE,
ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
}
INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
}
DEFAULT {
ENFORCE(msn.UVALUE == sequence_number.UVALUE);
pad_bit =:= static;
extension =:= static;
cc =:= static;
marker =:= static;
payload_type =:= static;
sequence_number =:= static;
timestamp =:= static;
ssrc =:= static;
csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
}
COMPRESSED rtp_static {
ssrc =:= irregular(32) [ 32 ];
}
COMPRESSED rtp_dynamic {
reserved =:= compressed_value(1, 0) [ 1 ];
reorder_ratio =:= irregular(2) [ 2 ];
list_present =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ];
tis_indicator =:= irregular(1) [ 1 ];
pad_bit =:= irregular(1) [ 1 ];
extension =:= irregular(1) [ 1 ];
marker =:= irregular(1) [ 1 ];
payload_type =:= irregular(7) [ 7 ];
sequence_number =:= irregular(16) [ 16 ];
timestamp =:= irregular(32) [ 32 ];
ts_stride =:= sdvl_or_default(tss_indicator.CVALUE,
TS_STRIDE_DEFAULT) [ VARIABLE ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
time_stride =:= sdvl_or_default(tis_indicator.CVALUE,
TIME_STRIDE_DEFAULT) [ VARIABLE ];
csrc_list =:= csrc_list_dynchain(list_present.CVALUE,
cc.UVALUE) [ VARIABLE ];
}
COMPRESSED rtp_irregular {
}
}
/////////////////////////////////////////////
// UDP-Lite Header
/////////////////////////////////////////////
checksum_coverage_dynchain(behavior)
{
UNCOMPRESSED {
checksum_coverage [ 16 ];
}
COMPRESSED inferred_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_INFERRED);
checksum_coverage =:= inferred_udp_length [ 0 ];
}
COMPRESSED static_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_STATIC);
checksum_coverage =:= irregular(16) [ 16 ];
}
COMPRESSED irregular_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_IRREGULAR);
checksum_coverage =:= irregular(16) [ 16 ];
}
}
checksum_coverage_irregular(behavior)
{
UNCOMPRESSED {
checksum_coverage [ 16 ];
}
COMPRESSED inferred_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_INFERRED);
checksum_coverage =:= inferred_udp_length [ 0 ];
}
COMPRESSED static_coverage {
<span class="grey">Pelletier & Sandlund Standards Track [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(behavior == UDP_LITE_COVERAGE_STATIC);
checksum_coverage =:= static [ 0 ];
}
COMPRESSED irregular_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_IRREGULAR);
checksum_coverage =:= irregular(16) [ 16 ];
}
}
udp_lite(profile_value, reorder_ratio_value, coverage_behavior_value)
{
UNCOMPRESSED {
ENFORCE((profile_value == PROFILE_RTP_0107) ||
(profile_value == PROFILE_UDPLITE_0108));
src_port [ 16 ];
dst_port [ 16 ];
checksum_coverage [ 16 ];
checksum [ 16 ];
}
CONTROL {
ENFORCE(profile == profile_value);
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
}
DEFAULT {
src_port =:= static;
dst_port =:= static;
coverage_behavior =:= static;
}
COMPRESSED udp_lite_static {
src_port =:= irregular(16) [ 16 ];
dst_port =:= irregular(16) [ 16 ];
}
COMPRESSED udp_lite_endpoint_dynamic {
ENFORCE(profile_value == PROFILE_UDPLITE_0108);
reserved =:= compressed_value(4, 0) [ 4 ];
coverage_behavior =:= irregular(2) [ 2 ];
reorder_ratio =:= irregular(2) [ 2 ];
checksum_coverage =:=
checksum_coverage_dynchain(coverage_behavior.UVALUE) [ 16 ];
checksum =:= irregular(16) [ 16 ];
msn =:= irregular(16) [ 16 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED udp_lite_regular_dynamic {
ENFORCE(profile_value == PROFILE_RTP_0107);
coverage_behavior =:= irregular(2) [ 2 ];
reserved =:= compressed_value(6, 0) [ 6 ];
checksum_coverage =:=
checksum_coverage_dynchain(coverage_behavior.UVALUE) [ 16 ];
checksum =:= irregular(16) [ 16 ];
}
COMPRESSED udp_lite_irregular {
checksum_coverage =:=
checksum_coverage_irregular(coverage_behavior.UVALUE) [ 0, 16 ];
checksum =:= irregular(16) [ 16 ];
}
}
/////////////////////////////////////////////
// ESP Header
/////////////////////////////////////////////
esp(profile_value, reorder_ratio_value)
{
UNCOMPRESSED {
ENFORCE(profile_value == PROFILE_ESP_0103);
ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536);
spi [ 32 ];
sequence_number [ 32 ];
}
CONTROL {
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
}
DEFAULT {
spi =:= static;
sequence_number =:= static;
}
COMPRESSED esp_static {
spi =:= irregular(32) [ 32 ];
}
COMPRESSED esp_dynamic {
sequence_number =:= irregular(32) [ 32 ];
reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= irregular(2) [ 2 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED esp_irregular {
}
}
///////////////////////////////////////////////////
// Encoding methods used in the profiles' CO headers
///////////////////////////////////////////////////
// Variable reordering offset used for MSN
msn_lsb(k)
{
UNCOMPRESSED {
master [ VARIABLE ];
}
COMPRESSED none {
ENFORCE(reorder_ratio.UVALUE == REORDERING_NONE);
master =:= lsb(k, 1);
}
COMPRESSED quarter {
ENFORCE(reorder_ratio.UVALUE == REORDERING_QUARTER);
master =:= lsb(k, ((2^k) / 4) - 1);
}
COMPRESSED half {
ENFORCE(reorder_ratio.UVALUE == REORDERING_HALF);
master =:= lsb(k, ((2^k) / 2) - 1);
}
COMPRESSED threequarters {
ENFORCE(reorder_ratio.UVALUE == REORDERING_THREEQUARTERS);
master =:= lsb(k, (((2^k) * 3) / 4) - 1);
}
}
ip_id_lsb(behavior, k)
{
UNCOMPRESSED {
ip_id [ 16 ];
}
CONTROL {
ip_id_nbo [ 16 ];
}
COMPRESSED nbo {
ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL);
<span class="grey">Pelletier & Sandlund Standards Track [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(ip_id_offset.UVALUE == ip_id.UVALUE - msn.UVALUE);
ip_id_offset =:= lsb(k, ((2^k) / 4) - 1) [ k ];
}
COMPRESSED non_nbo {
ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED);
ENFORCE(ip_id_nbo.UVALUE ==
(ip_id.UVALUE / 256) + (ip_id.UVALUE % 256) * 256);
ENFORCE(ip_id_nbo.ULENGTH == 16);
ENFORCE(ip_id_offset.UVALUE == ip_id_nbo.UVALUE - msn.UVALUE);
ip_id_offset =:= lsb(k, ((2^k) / 4) - 1) [ k ];
}
}
ip_id_sequential_variable(behavior, indicator)
{
UNCOMPRESSED {
ip_id [ 16 ];
}
COMPRESSED short {
ENFORCE((behavior == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
ENFORCE(indicator == 0);
ip_id =:= ip_id_lsb(behavior, 8) [ 8 ];
}
COMPRESSED long {
ENFORCE((behavior == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
ENFORCE(indicator == 1);
ENFORCE(ip_id_offset.UVALUE == ip_id.UVALUE - msn.UVALUE);
ip_id =:= irregular(16) [ 16 ];
}
COMPRESSED not_present {
ENFORCE((behavior == IP_ID_BEHAVIOR_RANDOM) ||
(behavior == IP_ID_BEHAVIOR_ZERO));
}
}
dont_fragment(version)
{
UNCOMPRESSED {
df [ 0, 1 ];
}
COMPRESSED v4 {
<span class="grey">Pelletier & Sandlund Standards Track [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(version == 4);
df =:= irregular(1) [ 1 ];
}
COMPRESSED v6 {
ENFORCE(version == 6);
unused =:= compressed_value(1, 0) [ 1 ];
}
}
pt_irr_or_static(flag)
{
UNCOMPRESSED {
payload_type [ 7 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
payload_type =:= static [ 0 ];
}
COMPRESSED present {
ENFORCE(flag == 1);
reserved =:= compressed_value(1, 0) [ 1 ];
payload_type =:= irregular(7) [ 7 ];
}
}
csrc_list_presence(presence, cc_value)
{
UNCOMPRESSED {
csrc_list;
}
COMPRESSED no_list {
ENFORCE(presence == 0);
csrc_list =:= static [ 0 ];
}
COMPRESSED list_present {
ENFORCE(presence == 1);
csrc_list =:= list_csrc(cc_value) [ VARIABLE ];
}
}
scaled_ts_lsb(time_stride_value, k)
{
UNCOMPRESSED {
<span class="grey">Pelletier & Sandlund Standards Track [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
timestamp [ 32 ];
}
COMPRESSED timerbased {
ENFORCE(time_stride_value != 0);
timestamp =:= timer_based_lsb(time_stride_value, k,
((2^k) / 2) - 1);
}
COMPRESSED regular {
ENFORCE(time_stride_value == 0);
timestamp =:= lsb(k, ((2^k) / 4) - 1);
}
}
// Self-describing variable length encoding with reordering offset
sdvl_sn_lsb(field_width)
{
UNCOMPRESSED {
field [ field_width ];
}
COMPRESSED lsb7 {
discriminator =:= '0' [ 1 ];
field =:= msn_lsb(7) [ 7 ];
}
COMPRESSED lsb14 {
discriminator =:= '10' [ 2 ];
field =:= msn_lsb(14) [ 14 ];
}
COMPRESSED lsb21 {
discriminator =:= '110' [ 3 ];
field =:= msn_lsb(21) [ 21 ];
}
COMPRESSED lsb28 {
discriminator =:= '1110' [ 4 ];
field =:= msn_lsb(28) [ 28 ];
}
COMPRESSED lsb32 {
discriminator =:= '11111111' [ 8 ];
field =:= irregular(field_width) [ field_width ];
}
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
// Self-describing variable length encoding
sdvl_lsb(field_width)
{
UNCOMPRESSED {
field [ field_width ];
}
COMPRESSED lsb7 {
discriminator =:= '0' [ 1 ];
field =:= lsb(7, ((2^7) / 4) - 1) [ 7 ];
}
COMPRESSED lsb14 {
discriminator =:= '10' [ 2 ];
field =:= lsb(14, ((2^14) / 4) - 1) [ 14 ];
}
COMPRESSED lsb21 {
discriminator =:= '110' [ 3 ];
field =:= lsb(21, ((2^21) / 4) - 1) [ 21 ];
}
COMPRESSED lsb28 {
discriminator =:= '1110' [ 4 ];
field =:= lsb(28, ((2^28) / 4) - 1) [ 28 ];
}
COMPRESSED lsb32 {
discriminator =:= '11111111' [ 8 ];
field =:= irregular(field_width) [ field_width ];
}
}
sdvl_scaled_ts_lsb(time_stride)
{
UNCOMPRESSED {
field [ 32 ];
}
COMPRESSED lsb7 {
discriminator =:= '0' [ 1 ];
field =:= scaled_ts_lsb(time_stride, 7) [ 7 ];
}
COMPRESSED lsb14 {
discriminator =:= '10' [ 2 ];
field =:= scaled_ts_lsb(time_stride, 14) [ 14 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 73]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
COMPRESSED lsb21 {
discriminator =:= '110' [ 3 ];
field =:= scaled_ts_lsb(time_stride, 21) [ 21 ];
}
COMPRESSED lsb28 {
discriminator =:= '1110' [ 4 ];
field =:= scaled_ts_lsb(time_stride, 28) [ 28 ];
}
COMPRESSED lsb32 {
discriminator =:= '11111111' [ 8 ];
field =:= irregular(32) [ 32 ];
}
}
variable_scaled_timestamp(tss_flag, tsc_flag, ts_stride, time_stride)
{
UNCOMPRESSED {
scaled_value [ 32 ];
}
COMPRESSED present {
ENFORCE((tss_flag == 0) && (tsc_flag == 1));
ENFORCE(ts_stride != 0);
scaled_value =:= sdvl_scaled_ts_lsb(time_stride) [ VARIABLE ];
}
COMPRESSED not_present {
ENFORCE(((tss_flag == 1) && (tsc_flag == 0)) ||
((tss_flag == 0) && (tsc_flag == 0)));
}
}
variable_unscaled_timestamp(tss_flag, tsc_flag)
{
UNCOMPRESSED {
timestamp [ 32 ];
}
COMPRESSED present {
ENFORCE(((tss_flag == 1) && (tsc_flag == 0)) ||
((tss_flag == 0) && (tsc_flag == 0)));
timestamp =:= sdvl_lsb(32);
}
COMPRESSED not_present {
ENFORCE((tss_flag == 0) && (tsc_flag == 1));
<span class="grey">Pelletier & Sandlund Standards Track [Page 74]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
}
}
profile_1_7_flags1_enc(flag, ip_version)
{
UNCOMPRESSED {
ip_outer_indicator [ 1 ];
ttl_hopl_indicator [ 1 ];
tos_tc_indicator [ 1 ];
df [ 0, 1 ];
ip_id_behavior [ 2 ];
reorder_ratio [ 2 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
ENFORCE(ip_outer_indicator.CVALUE == 0);
ENFORCE(ttl_hopl_indicator.CVALUE == 0);
ENFORCE(tos_tc_indicator.CVALUE == 0);
df =:= static;
ip_id_behavior =:= static;
reorder_ratio =:= static;
}
COMPRESSED present {
ENFORCE(flag == 1);
ip_outer_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= irregular(2) [ 2 ];
reorder_ratio =:= irregular(2) [ 2 ];
}
}
profile_1_flags2_enc(flag)
{
UNCOMPRESSED {
list_indicator [ 1 ];
pt_indicator [ 1 ];
time_stride_indicator [ 1 ];
pad_bit [ 1 ];
extension [ 1 ];
}
COMPRESSED not_present{
ENFORCE(flag == 0);
ENFORCE(list_indicator.UVALUE == 0);
<span class="grey">Pelletier & Sandlund Standards Track [Page 75]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(pt_indicator.UVALUE == 0);
ENFORCE(time_stride_indicator.UVALUE == 0);
pad_bit =:= static;
extension =:= static;
}
COMPRESSED present {
ENFORCE(flag == 1);
list_indicator =:= irregular(1) [ 1 ];
pt_indicator =:= irregular(1) [ 1 ];
time_stride_indicator =:= irregular(1) [ 1 ];
pad_bit =:= irregular(1) [ 1 ];
extension =:= irregular(1) [ 1 ];
reserved =:= compressed_value(3, 0) [ 3 ];
}
}
profile_2_3_4_flags_enc(flag, ip_version)
{
UNCOMPRESSED {
ip_outer_indicator [ 1 ];
df [ 0, 1 ];
ip_id_behavior [ 2 ];
}
COMPRESSED not_present {
ENFORCE(flag == 0);
ENFORCE(ip_outer_indicator.CVALUE == 0);
df =:= static;
ip_id_behavior =:= static;
}
COMPRESSED present {
ENFORCE(flag == 1);
ip_outer_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= irregular(2) [ 2 ];
reserved =:= compressed_value(4, 0) [ 4 ];
}
}
profile_8_flags_enc(flag, ip_version)
{
UNCOMPRESSED {
ip_outer_indicator [ 1 ];
df [ 0, 1 ];
ip_id_behavior [ 2 ];
coverage_behavior [ 2 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 76]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
}
COMPRESSED not_present {
ENFORCE(flag == 0);
ENFORCE(ip_outer_indicator.CVALUE == 0);
df =:= static;
ip_id_behavior =:= static;
coverage_behavior =:= static;
}
COMPRESSED present {
ENFORCE(flag == 1);
reserved =:= compressed_value(2, 0) [ 2 ];
ip_outer_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= irregular(2) [ 2 ];
coverage_behavior =:= irregular(2) [ 2 ];
}
}
profile_7_flags2_enc(flag)
{
UNCOMPRESSED {
list_indicator [ 1 ];
pt_indicator [ 1 ];
time_stride_indicator [ 1 ];
pad_bit [ 1 ];
extension [ 1 ];
coverage_behavior [ 2 ];
}
COMPRESSED not_present{
ENFORCE(flag == 0);
ENFORCE(list_indicator.CVALUE == 0);
ENFORCE(pt_indicator.CVALUE == 0);
ENFORCE(time_stride_indicator.CVALUE == 0);
pad_bit =:= static;
extension =:= static;
coverage_behavior =:= static;
}
COMPRESSED present {
ENFORCE(flag == 1);
reserved =:= compressed_value(1, 0) [ 1 ];
list_indicator =:= irregular(1) [ 1 ];
pt_indicator =:= irregular(1) [ 1 ];
time_stride_indicator =:= irregular(1) [ 1 ];
pad_bit =:= irregular(1) [ 1 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 77]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
extension =:= irregular(1) [ 1 ];
coverage_behavior =:= irregular(2) [ 2 ];
}
}
////////////////////////////////////////////
// RTP profile
////////////////////////////////////////////
rtp_baseheader(profile_value, ts_stride_value, time_stride_value,
outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{
UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ];
udp_checksum [ 16 ];
rtp_version =:= uncompressed_value(2, 2) [ 2 ];
pad_bit [ 1 ];
extension [ 1 ];
cc [ 4 ];
marker [ 1 ];
payload_type [ 7 ];
sequence_number [ 16 ];
timestamp [ 32 ];
ssrc [ 32 ];
csrc_list [ VARIABLE ];
}
UNCOMPRESSED v6 {
<span class="grey">Pelletier & Sandlund Standards Track [Page 78]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_RANDOM);
ENFORCE(msn.UVALUE == sequence_number.UVALUE);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ];
udp_checksum [ 16 ];
rtp_version =:= uncompressed_value(2, 2) [ 2 ];
pad_bit [ 1 ];
extension [ 1 ];
cc [ 4 ];
marker [ 1 ];
payload_type [ 7 ];
sequence_number [ 16 ];
timestamp [ 32 ];
ssrc [ 32 ];
csrc_list [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_RTP_0101);
ENFORCE(profile == profile_value);
ENFORCE(time_stride.UVALUE == time_stride_value);
ENFORCE(ts_stride.UVALUE == ts_stride_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
dummy_field =:= field_scaling(ts_stride.UVALUE,
ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
}
INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
}
DEFAULT {
ENFORCE(outer_ip_flag == 0);
<span class="grey">Pelletier & Sandlund Standards Track [Page 79]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
tos_tc =:= static;
dest_addr =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
src_port =:= static;
dst_port =:= static;
pad_bit =:= static;
extension =:= static;
cc =:= static;
// When marker not present in packets, it is assumed 0
marker =:= uncompressed_value(1, 0);
payload_type =:= static;
sequence_number =:= static;
timestamp =:= static;
ssrc =:= static;
csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags1_indicator =:= irregular(1) [ 1 ];
flags2_indicator =:= irregular(1) [ 1 ];
tsc_indicator =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ];
ip_id_indicator =:= irregular(1) [ 1 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : ttl_hopl_indicator :
tos_tc_indicator : df : ip_id_behavior_innermost : reorder_ratio
=:= profile_1_7_flags1_enc(flags1_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ];
list_indicator : pt_indicator : tis_indicator : pad_bit :
extension =:= profile_1_flags2_enc(
flags2_indicator.CVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 80]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-81" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ];
payload_type =:= pt_irr_or_static(pt_indicator) [ 0, 8 ];
sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
ip_id =:= ip_id_sequential_variable(
ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE, ts_stride.UVALUE,
time_stride.UVALUE) [ VARIABLE ];
timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE) [ VARIABLE ];
ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ];
time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ];
csrc_list =:= csrc_list_presence(list_indicator.CVALUE,
cc.UVALUE) [ VARIABLE ];
}
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
timestamp =:= inferred_scaled_field [ 0 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
discriminator =:= '1000' [ 4 ];
msn =:= msn_lsb(5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
timestamp =:= inferred_scaled_field [ 0 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1 replacement
COMPRESSED pt_1_rnd {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '101' [ 3 ];
marker =:= irregular(1) [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 81]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-82" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
}
// UO-1-ID replacement
COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1001' [ 4 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
msn =:= msn_lsb(5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
timestamp =:= inferred_scaled_field [ 0 ];
}
// UO-1-TS replacement
COMPRESSED pt_1_seq_ts {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
marker =:= irregular(1) [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 6) [ 6 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
<span class="grey">Pelletier & Sandlund Standards Track [Page 82]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-83" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11000' [ 5 ];
msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
timestamp =:= inferred_scaled_field [ 0 ];
}
// UOR-2-ID-ext1 replacement (both TS and IP-ID)
COMPRESSED pt_2_seq_both {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11001' [ 5 ];
msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 7) [ 7 ];
marker =:= irregular(1) [ 1 ];
}
// UOR-2-TS replacement
COMPRESSED pt_2_seq_ts {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
}
////////////////////////////////////////////
// UDP profile
////////////////////////////////////////////
udp_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{
UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 83]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-84" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ];
udp_checksum [ 16 ];
}
UNCOMPRESSED v6 {
ENFORCE(ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ];
udp_checksum [ 16 ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_UDP_0102);
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 84]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-85" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
DEFAULT {
ENFORCE(outer_ip_flag == 0);
tos_tc =:= static;
dest_addr =:= static;
ip_version =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
src_port =:= static;
dst_port =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior_innermost =:=
profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
}
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
<span class="grey">Pelletier & Sandlund Standards Track [Page 85]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-86" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
discriminator =:= '100' [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ];
}
}
////////////////////////////////////////////
// ESP profile
////////////////////////////////////////////
esp_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{
UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 86]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-87" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
spi [ 32 ];
sequence_number [ 32 ];
}
UNCOMPRESSED v6 {
ENFORCE(msn.UVALUE == (sequence_number.UVALUE % 65536));
ENFORCE(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_RANDOM);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
spi [ 32 ];
sequence_number [ 32 ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_ESP_0103);
ENFORCE(profile == profile_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
}
DEFAULT {
ENFORCE(outer_ip_flag == 0);
tos_tc =:= static;
dest_addr =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
spi =:= static;
<span class="grey">Pelletier & Sandlund Standards Track [Page 87]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-88" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
sequence_number =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior_innermost =:=
profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ];
sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
}
// Sequence number sent instead of MSN due to field length
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
sequence_number =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
discriminator =:= '100' [ 3 ];
sequence_number =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id {
<span class="grey">Pelletier & Sandlund Standards Track [Page 88]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-89" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
sequence_number =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
sequence_number =:= msn_lsb(8) [ 8 ];
}
}
////////////////////////////////////////////
// IP-only profile
////////////////////////////////////////////
iponly_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{
UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 89]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-90" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
UNCOMPRESSED v6 {
ENFORCE(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_RANDOM);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_IP_0104);
ENFORCE(profile == profile_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
}
DEFAULT {
ENFORCE(outer_ip_flag == 0);
tos_tc =:= static;
dest_addr =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior_innermost =:=
<span class="grey">Pelletier & Sandlund Standards Track [Page 90]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-91" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
}
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
discriminator =:= '100' [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 91]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-92" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
}
}
////////////////////////////////////////////
// UDP-lite/RTP profile
////////////////////////////////////////////
udplite_rtp_baseheader(profile_value, ts_stride_value,
time_stride_value, outer_ip_flag,
ip_id_behavior_value, reorder_ratio_value,
coverage_behavior_value)
{
UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
checksum_coverage [ 16 ];
udp_checksum [ 16 ];
rtp_version =:= uncompressed_value(2, 2) [ 2 ];
pad_bit [ 1 ];
extension [ 1 ];
cc [ 4 ];
marker [ 1 ];
payload_type [ 7 ];
sequence_number [ 16 ];
timestamp [ 32 ];
ssrc [ 32 ];
csrc_list [ VARIABLE ];
}
UNCOMPRESSED v6 {
ENFORCE(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_RANDOM);
<span class="grey">Pelletier & Sandlund Standards Track [Page 92]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-93" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
checksum_coverage [ 16 ];
udp_checksum [ 16 ];
rtp_version =:= uncompressed_value(2, 2) [ 2 ];
pad_bit [ 1 ];
extension [ 1 ];
cc [ 4 ];
marker [ 1 ];
payload_type [ 7 ];
sequence_number [ 16 ];
timestamp [ 32 ];
ssrc [ 32 ];
csrc_list [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_RTP_0107);
ENFORCE(profile == profile_value);
ENFORCE(time_stride.UVALUE == time_stride_value);
ENFORCE(ts_stride.UVALUE == ts_stride_value);
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
dummy_field =:= field_scaling(ts_stride.UVALUE,
ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
}
INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
}
DEFAULT {
ENFORCE(outer_ip_flag == 0);
tos_tc =:= static;
<span class="grey">Pelletier & Sandlund Standards Track [Page 93]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-94" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
dest_addr =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
src_port =:= static;
dst_port =:= static;
pad_bit =:= static;
extension =:= static;
cc =:= static;
// When marker not present in packets, it is assumed 0
marker =:= uncompressed_value(1, 0);
payload_type =:= static;
sequence_number =:= static;
timestamp =:= static;
ssrc =:= static;
csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags1_indicator =:= irregular(1) [ 1 ];
flags2_indicator =:= irregular(1) [ 1 ];
tsc_indicator =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ];
ip_id_indicator =:= irregular(1) [ 1 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : ttl_hopl_indicator :
tos_tc_indicator : df : ip_id_behavior_innermost : reorder_ratio
=:= profile_1_7_flags1_enc(flags1_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ];
list_indicator : pt_indicator : tis_indicator : pad_bit :
extension : coverage_behavior =:=
profile_7_flags2_enc(flags2_indicator.CVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:=
<span class="grey">Pelletier & Sandlund Standards Track [Page 94]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-95" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
static_or_irreg(ttl_hopl_indicator.CVALUE, 8) [ 0, 8 ];
payload_type =:= pt_irr_or_static(pt_indicator.CVALUE) [ 0, 8 ];
sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE, ts_stride.UVALUE,
time_stride.UVALUE) [ VARIABLE ];
timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE) [ VARIABLE ];
ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ];
time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ];
csrc_list =:=
csrc_list_presence(list_indicator.CVALUE,
cc.UVALUE) [ VARIABLE ];
}
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
timestamp =:= inferred_scaled_field [ 0 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
discriminator =:= '1000' [ 4 ];
msn =:= msn_lsb(5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
timestamp =:= inferred_scaled_field [ 0 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1 replacement
COMPRESSED pt_1_rnd {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '101' [ 3 ];
marker =:= irregular(1) [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
}
<span class="grey">Pelletier & Sandlund Standards Track [Page 95]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-96" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
// UO-1-ID replacement
COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1001' [ 4 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
msn =:= msn_lsb(5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
timestamp =:= inferred_scaled_field [ 0 ];
}
// UO-1-TS replacement
COMPRESSED pt_1_seq_ts {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
marker =:= irregular(1) [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 6) [ 6 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11000' [ 5 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 96]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-97" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
timestamp =:= inferred_scaled_field [ 0 ];
}
// UOR-2-ID-ext1 replacement (both TS and IP-ID)
COMPRESSED pt_2_seq_both {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11001' [ 5 ];
msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 7) [ 7 ];
marker =:= irregular(1) [ 1 ];
}
// UOR-2-TS replacement
COMPRESSED pt_2_seq_ts {
ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
}
////////////////////////////////////////////
// UDP-lite profile
////////////////////////////////////////////
udplite_baseheader(profile_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value, coverage_behavior_value)
{
UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 97]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-98" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ];
next_header [ 8 ];
ip_checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ];
dest_addr [ 32 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
checksum_coverage [ 16 ];
udp_checksum [ 16 ];
}
UNCOMPRESSED v6 {
ENFORCE(ip_id_behavior_innermost.UVALUE == IP_ID_BEHAVIOR_RANDOM);
outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ];
flow_label [ 20 ];
payload_length =:= inferred_ip_v6_length [ 16 ];
next_header [ 8 ];
ttl_hopl [ 8 ];
src_addr [ 128 ];
dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ];
dst_port [ 16 ];
checksum_coverage [ 16 ];
udp_checksum [ 16 ];
df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ];
}
CONTROL {
ENFORCE(profile_value == PROFILE_UDPLITE_0108);
ENFORCE(profile == profile_value);
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior_innermost.UVALUE == ip_id_behavior_value);
}
DEFAULT {
<span class="grey">Pelletier & Sandlund Standards Track [Page 98]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-99" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
ENFORCE(outer_ip_flag == 0);
tos_tc =:= static;
dest_addr =:= static;
ttl_hopl =:= static;
src_addr =:= static;
df =:= static;
flow_label =:= static;
next_header =:= static;
src_port =:= static;
dst_port =:= static;
reorder_ratio =:= static;
ip_id_behavior_innermost =:= static;
}
// Replacement for UOR-2-ext3
COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior_innermost :
coverage_behavior =:=
profile_8_flags_enc(flags_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior_innermost.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ];
}
// UO-0
COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 {
discriminator =:= '100' [ 3 ];
<span class="grey">Pelletier & Sandlund Standards Track [Page 99]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-100" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ];
}
// UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 4) [ 4 ];
}
// UOR-2-ID replacement
COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior_innermost.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior_innermost.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ];
}
}
<span class="h3"><a class="selflink" id="section-6.9" href="#section-6.9">6.9</a>. Feedback Formats and Options</span>
<span class="h4"><a class="selflink" id="section-6.9.1" href="#section-6.9.1">6.9.1</a>. Feedback Formats</span>
This section describes the feedback format for ROHCv2 profiles, using
the formats described in <a href="./rfc4995#section-5.2.3">Section 5.2.3 of [RFC4995]</a>.
The Acknowledgment Number field of the feedback formats contains the
least significant bits of the MSN (see <a href="#section-6.3.1">Section 6.3.1</a>) that
corresponds to the reference header that is being acknowledged. A
reference header is a header that has been successfully CRC-8
validated or CRC verified. If there is no reference header
available, the feedback MUST carry an ACKNUMBER-NOT-VALID option.
FEEDBACK-1
<span class="grey">Pelletier & Sandlund Standards Track [Page 100]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-101" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Acknowledgment Number |
+---+---+---+---+---+---+---+---+
Acknowledgment Number: The eight least significant bits of the
MSN.
A FEEDBACK-1 is an ACK. In order to send a NACK or a STATIC-NACK,
FEEDBACK-2 must be used.
FEEDBACK-2
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
|Acktype| Acknowledgment Number |
+---+---+---+---+---+---+---+---+
| Acknowledgment Number |
+---+---+---+---+---+---+---+---+
| CRC |
+---+---+---+---+---+---+---+---+
/ Feedback options /
+---+---+---+---+---+---+---+---+
Acktype:
0 = ACK
1 = NACK
2 = STATIC-NACK
3 is reserved (MUST NOT be used for parsability)
Acknowledgment Number: The least significant bits of the MSN.
CRC: 8-bit CRC computed over the entire feedback payload including
any CID fields but excluding the feedback type, the 'Size' field,
and the 'Code' octet, using the polynomial defined in <a href="./rfc4995#section-5.3.1.1">Section</a>
<a href="./rfc4995#section-5.3.1.1">5.3.1.1 of [RFC4995]</a>. If the CID is given with an Add-CID octet,
the Add-CID octet immediately precedes the FEEDBACK-1 or
FEEDBACK-2 format. For purposes of computing the CRC, the CRC
field is zero.
Feedback options: A variable number of feedback options, see
<a href="#section-6.9.2">Section 6.9.2</a>. Options may appear in any order.
<span class="grey">Pelletier & Sandlund Standards Track [Page 101]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-102" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
A FEEDBACK-2 of type NACK or STATIC-NACK is always implicitly an
acknowledgment for a successfully decompressed packet, which
corresponds to a packet whose LSBs match the Acknowledgment Number of
the feedback element, unless the ACKNUMBER-NOT-VALID option (see
<a href="#section-6.9.2.2">Section 6.9.2.2</a>) appears in the feedback element.
The FEEDBACK-2 format always carries a CRC and is thus more robust
than the FEEDBACK-1 format. When receiving FEEDBACK-2, the
compressor MUST verify the information by computing the CRC and
comparing the result with the CRC carried in the feedback format. If
the two are not identical, the feedback element MUST be discarded.
<span class="h4"><a class="selflink" id="section-6.9.2" href="#section-6.9.2">6.9.2</a>. Feedback Options</span>
A feedback option has variable length and the following general
format:
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Opt Type | Opt Len |
+---+---+---+---+---+---+---+---+
/ Option Data / Opt Len (octets)
+---+---+---+---+---+---+---+---+
Opt Type: Unsigned integer that represents the type of the
feedback option. <a href="#section-6.9.2.1">Section 6.9.2.1</a> through <a href="#section-6.9.2.4">Section 6.9.2.4</a>
describes the ROHCv2 feedback options.
Opt Len: Unsigned integer that represents the length of the Option
Data field, in octets.
Option Data: Feedback type specific data. Present if the value of
the Opt Len field is set to a non-zero value.
<span class="h5"><a class="selflink" id="section-6.9.2.1" href="#section-6.9.2.1">6.9.2.1</a>. The REJECT Option</span>
The REJECT option informs the compressor that the decompressor does
not have sufficient resources to handle the flow.
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Opt Type = 2 | Opt Len = 0 |
+---+---+---+---+---+---+---+---+
When receiving a REJECT option, the compressor MUST stop compressing
the packet flow, and SHOULD refrain from attempting to increase the
number of compressed packet flows for some time. The REJECT option
<span class="grey">Pelletier & Sandlund Standards Track [Page 102]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-103" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
MUST NOT appear more than once in the FEEDBACK-2 format; otherwise,
the compressor MUST discard the entire feedback element.
<span class="h5"><a class="selflink" id="section-6.9.2.2" href="#section-6.9.2.2">6.9.2.2</a>. The ACKNUMBER-NOT-VALID Option</span>
The ACKNUMBER-NOT-VALID option indicates that the Acknowledgment
Number field of the feedback is not valid.
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Opt Type = 3 | Opt Len = 0 |
+---+---+---+---+---+---+---+---+
A compressor MUST NOT use the Acknowledgment Number of the feedback
to find the corresponding sent header when this option is present.
When this option is used, the Acknowledgment Number field of the
FEEDBACK-2 format is set to zero. Consequently, a NACK or a STATIC-
NACK feedback type sent with the ACKNUMBER-NOT-VALID option is
equivalent to a STATIC-NACK with respect to the type of context
repair requested by the decompressor.
The ACKNUMBER-NOT-VALID option MUST NOT appear more than once in the
FEEDBACK-2 format; otherwise, the compressor MUST discard the entire
feedback element.
<span class="h5"><a class="selflink" id="section-6.9.2.3" href="#section-6.9.2.3">6.9.2.3</a>. The CONTEXT_MEMORY Option</span>
The CONTEXT_MEMORY option informs the compressor that the
decompressor does not have sufficient memory resources to handle the
context of the packet flow, as the flow is currently compressed.
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Opt Type = 9 | Opt Len = 0 |
+---+---+---+---+---+---+---+---+
When receiving a CONTEXT_MEMORY option, the compressor SHOULD take
actions to compress the packet flow in a way that requires less
decompressor memory resources or stop compressing the packet flow.
The CONTEXT_MEMORY option MUST NOT appear more than once in the
FEEDBACK-2 format; otherwise, the compressor MUST discard the entire
feedback element.
<span class="h5"><a class="selflink" id="section-6.9.2.4" href="#section-6.9.2.4">6.9.2.4</a>. The CLOCK_RESOLUTION Option</span>
The CLOCK_RESOLUTION option informs the compressor of the clock
resolution of the decompressor. It also informs whether or not the
decompressor supports timer-based compression of the RTP TS timestamp
<span class="grey">Pelletier & Sandlund Standards Track [Page 103]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-104" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
(see <a href="#section-6.6.9">Section 6.6.9</a>). The CLOCK_RESOLUTION option is applicable per
channel, i.e., it applies to any context associated with a profile
for which the option is relevant between a compressor and
decompressor pair.
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| Opt Type = 10 | Opt Len = 1 |
+---+---+---+---+---+---+---+---+
| Clock resolution (ms) |
+---+---+---+---+---+---+---+---+
Clock resolution: Unsigned integer that represents the clock
resolution of the decompressor expressed in milliseconds.
The smallest clock resolution that can be indicated is 1 millisecond.
The value zero has a special meaning: it indicates that the
decompressor cannot do timer-based compression of the RTP Timestamp.
The CLOCK_RESOLUTION option MUST NOT appear more than once in the
FEEDBACK-2 format; otherwise, the compressor MUST discard the entire
feedback element.
<span class="h5"><a class="selflink" id="section-6.9.2.5" href="#section-6.9.2.5">6.9.2.5</a>. Unknown Option Types</span>
If an option type other than those defined in this document is
encountered, the compressor MUST discard the entire feedback element.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
Impairments such as bit errors on the received compressed headers,
missing packets, and reordering between packets could cause the
header decompressor to reconstitute erroneous packets, i.e., packets
that do not match the original packet, but still have a valid IP, UDP
(or UDP-Lite), and RTP headers, and possibly also valid UDP (or UDP-
Lite) checksums.
The header compression profiles defined herein use an internal
checksum for verification of reconstructed headers. This reduces the
probability that a header decompressor delivers erroneous packets to
upper layers without the error being noticed. In particular, the
probability that consecutive erroneous packets are not detected by
the internal checksum is close to zero.
This small but non-zero probability remains unchanged when integrity
protection is applied after compression and verified before
decompression, in the case where an attacker could discard or reorder
packets between the compression endpoints.
<span class="grey">Pelletier & Sandlund Standards Track [Page 104]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-105" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
The impairments mentioned above could be caused by a malfunctioning
or malicious header compressor. Such corruption may be detected with
end-to-end integrity mechanisms that will not be affected by the
compression. Moreover, the internal checksum can also be useful in
the case of malfunctioning compressors.
Denial-of-service attacks are possible if an intruder can introduce
(for example) bogus IR or FEEDBACK packets onto the link and thereby
cause compression efficiency to be reduced. However, an intruder
having the ability to inject arbitrary packets at the link layer in
this manner raises additional security issues that dwarf those
related to the use of header compression.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. IANA Considerations</span>
The following ROHC profile identifiers have been assigned by the IANA
for the profiles defined in this document:
Identifier Profile
---------- -------
0x0101 ROHCv2 RTP
0x0102 ROHCv2 UDP
0x0103 ROHCv2 ESP
0x0104 ROHCv2 IP
0x0107 ROHCv2 RTP/UDP-Lite
0x0108 ROHCv2 UDP-Lite
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Acknowledgements</span>
The authors would like to thank Mark West, Robert Finking, Haipeng
Jin, and Rohit Kapoor for serving as committed document reviewers,
and also for constructive discussions during the development of this
document. Thanks to Carl Knutsson for his extensive contribution to
this specification, as well as to Jani Juvan and Anders Edqvist for
useful comments and feedback. Thanks also to Elwyn Davies for his
review as the General Area Review Team (Gen-ART) reviewer, and to
Stephen Kent for his review on behalf of the IETF security
directorate, during IETF last-call. Finally, thanks to the many
people who have contributed to previous ROHC specifications and
supported this effort.
<span class="grey">Pelletier & Sandlund Standards Track [Page 105]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-106" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Normative References</span>
[<a id="ref-RFC0768">RFC0768</a>] Postel, J., "User Datagram Protocol", STD 6, <a href="./rfc768">RFC 768</a>,
August 1980.
[<a id="ref-RFC0791">RFC0791</a>] Postel, J., "Internet Protocol", STD 5, <a href="./rfc791">RFC 791</a>,
September 1981.
[<a id="ref-RFC2004">RFC2004</a>] Perkins, C., "Minimal Encapsulation within IP", <a href="./rfc2004">RFC 2004</a>,
October 1996.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC2460">RFC2460</a>] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", <a href="./rfc2460">RFC 2460</a>, December 1998.
[<a id="ref-RFC2784">RFC2784</a>] Farinacci, D., Li, T., Hanks, S., Meyer, D., and P.
Traina, "Generic Routing Encapsulation (GRE)", <a href="./rfc2784">RFC 2784</a>,
March 2000.
[<a id="ref-RFC2890">RFC2890</a>] Dommety, G., "Key and Sequence Number Extensions to GRE",
<a href="./rfc2890">RFC 2890</a>, September 2000.
[<a id="ref-RFC3550">RFC3550</a>] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, <a href="./rfc3550">RFC 3550</a>, July 2003.
[<a id="ref-RFC3828">RFC3828</a>] Larzon, L-A., Degermark, M., Pink, S., Jonsson, L-E., and
G. Fairhurst, "The Lightweight User Datagram Protocol
(UDP-Lite)", <a href="./rfc3828">RFC 3828</a>, July 2004.
[<a id="ref-RFC4019">RFC4019</a>] Pelletier, G., "RObust Header Compression (ROHC): Profiles
for User Datagram Protocol (UDP) Lite", <a href="./rfc4019">RFC 4019</a>,
April 2005.
[<a id="ref-RFC4302">RFC4302</a>] Kent, S., "IP Authentication Header", <a href="./rfc4302">RFC 4302</a>,
December 2005.
[<a id="ref-RFC4303">RFC4303</a>] Kent, S., "IP Encapsulating Security Payload (ESP)",
<a href="./rfc4303">RFC 4303</a>, December 2005.
[<a id="ref-RFC4995">RFC4995</a>] Jonsson, L-E., Pelletier, G., and K. Sandlund, "The RObust
Header Compression (ROHC) Framework", <a href="./rfc4995">RFC 4995</a>, July 2007.
<span class="grey">Pelletier & Sandlund Standards Track [Page 106]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-107" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
[<a id="ref-RFC4997">RFC4997</a>] Finking, R. and G. Pelletier, "Formal Notation for RObust
Header Compression (ROHC-FN)", <a href="./rfc4997">RFC 4997</a>, July 2007.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Informative References</span>
[<a id="ref-RFC2675">RFC2675</a>] Borman, D., Deering, S., and R. Hinden, "IPv6 Jumbograms",
<a href="./rfc2675">RFC 2675</a>, August 1999.
[<a id="ref-RFC3095">RFC3095</a>] Bormann, C., Burmeister, C., Degermark, M., Fukushima, H.,
Hannu, H., Jonsson, L-E., Hakenberg, R., Koren, T., Le,
K., Liu, Z., Martensson, A., Miyazaki, A., Svanbro, K.,
Wiebke, T., Yoshimura, T., and H. Zheng, "RObust Header
Compression (ROHC): Framework and four profiles: RTP, UDP,
ESP, and uncompressed", <a href="./rfc3095">RFC 3095</a>, July 2001.
[<a id="ref-RFC3843">RFC3843</a>] Jonsson, L-E. and G. Pelletier, "RObust Header Compression
(ROHC): A Compression Profile for IP", <a href="./rfc3843">RFC 3843</a>,
June 2004.
[<a id="ref-RFC4224">RFC4224</a>] Pelletier, G., Jonsson, L-E., and K. Sandlund, "RObust
Header Compression (ROHC): ROHC over Channels That Can
Reorder Packets", <a href="./rfc4224">RFC 4224</a>, January 2006.
<span class="grey">Pelletier & Sandlund Standards Track [Page 107]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-108" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Detailed Classification of Header Fields</span>
Header compression is possible due to the fact that most header
fields do not vary randomly from packet to packet. Many of the
fields exhibit static behavior or change in a more or less
predictable way. When designing a header compression scheme, it is
of fundamental importance to understand the behavior of the fields in
detail.
In this appendix, all fields in the headers compressible by these
profiles are classified and analyzed. The analysis is based on
behavior for the types of traffic that are expected to be the most
frequently compressed (e.g., RTP field behavior is based on voice
and/or video traffic behavior).
Fields are classified as belonging to one of the following classes:
INFERRED - These fields contain values that can be inferred from
other values, for example the size of the frame carrying the packet,
and thus do not have to be included in compressed packets.
STATIC - These fields are expected to be constant throughout the
lifetime of the flow; in general, it is sufficient to design a
compressed format so that these fields are only updated by IR
packets.
STATIC-DEF - These fields are expected to be constant throughout the
lifetime of the flow and their values can be used to define a flow.
They are only sent in IR packets.
STATIC-KNOWN - These fields are expected to have well-known values
and therefore do not need to be communicated at all.
SEMISTATIC - These fields are unchanged most of the time. However,
occasionally the value changes but will revert to its original value.
For ROHCv2, the values of such fields do not need to be possible to
change with the smallest compressed packet formats, but should be
possible to change via slightly larger compressed packets.
RARELY CHANGING (RACH) - These are fields that change their values
occasionally and then keep their new values. For ROHCv2, the values
of such fields do not need to be possible to change with the smallest
compressed packet formats, but should be possible to change via
slightly larger compressed packets.
IRREGULAR - These are the fields for which no useful change pattern
can be identified and should be transmitted uncompressed in all
compressed packets.
<span class="grey">Pelletier & Sandlund Standards Track [Page 108]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-109" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
PATTERN - These are fields that change between each packet, but
change in a predictable pattern.
<span class="h3"><a class="selflink" id="appendix-A.1" href="#appendix-A.1">A.1</a>. IPv4 Header Fields</span>
+------------------------+----------------+
| Field | Class |
+------------------------+----------------+
| Version | STATIC-KNOWN |
| Header Length | STATIC-KNOWN |
| Type Of Service | RACH |
| Packet Length | INFERRED |
| Identification | |
| Sequential | PATTERN |
| Seq. swap | PATTERN |
| Random | IRREGULAR |
| Zero | STATIC |
| Reserved flag | STATIC-KNOWN |
| Don't Fragment flag | RACH |
| More Fragments flag | STATIC-KNOWN |
| Fragment Offset | STATIC-KNOWN |
| Time To Live | RACH |
| Protocol | STATIC-DEF |
| Header Checksum | INFERRED |
| Source Address | STATIC-DEF |
| Destination Address | STATIC-DEF |
+------------------------+----------------+
Version
The version field states which IP version is used and is set to
the value four.
Header Length
As long as no options are present in the IP header, the header
length is constant with the value five. If there are options, the
field could be RACH or STATIC-DEF, but only option-less headers
are compressed by ROHCv2 profiles. The field is therefore
classified as STATIC-KNOWN.
Type Of Service
For the type of flows compressed by the ROHCv2 profiles, the DSCP
(Differentiated Services Code Point) and ECN (Explicit Congestion
Notification) fields are expected to change relatively seldom.
<span class="grey">Pelletier & Sandlund Standards Track [Page 109]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-110" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Packet Length
Information about packet length is expected to be provided by the
link layer. The field is therefore classified as INFERRED.
IPv4 Identification
The Identification field (IP-ID) is used to identify what
fragments constitute a datagram when reassembling fragmented
datagrams. The IPv4 specification does not specify exactly how
this field is to be assigned values, only that each packet should
get an IP-ID that is unique for the source-destination pair and
protocol for the time the datagram (or any of its fragments) could
be alive in the network. This means that assignment of IP-ID
values can be done in various ways, but the expected behaviors
have been separated into four classes.
Sequential
In this behavior, the IP-ID is expected to increment by one for
most packets, but may increment by a value larger than one,
depending on the behavior of the transmitting IPv4 stack.
Sequential Swapped
When using this behavior, the IP-ID behaves as in the
Sequential behavior, but the two bytes of IP-ID are byte-
swapped. Therefore, the IP-ID can be swapped before
compression to make it behave exactly as the Sequential
behavior.
Random
Some IP stacks assign IP-ID values using a pseudo-random number
generator. There is thus no correlation between the ID values
of subsequent datagrams, and therefore there is no way to
predict the IP-ID value for the next datagram. For header
compression purposes, this means that the IP-ID field needs to
be sent uncompressed with each datagram, resulting in two extra
octets of header.
Zero
This behavior, although not a legal implementation of IPv4, is
sometimes seen in existing IPv4 stacks. When this behavior is
used, all IP packets have the IP-ID value set to zero.
<span class="grey">Pelletier & Sandlund Standards Track [Page 110]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-111" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Flags
The Reserved flag must be set to zero and is therefore classified
as STATIC-KNOWN. The Don't Fragment (DF) flag changes rarely and
is therefore classified as RACH. Finally, the More Fragments (MF)
flag is expected to be zero because IP fragments will not be
compressed by ROHC and is therefore classified as STATIC-KNOWN.
Fragment Offset
Under the assumption that no fragmentation occurs, the fragment
offset is always zero and is therefore classified as STATIC-KNOWN.
Time To Live
The Time To Live field is expected to be constant during the
lifetime of a flow or to alternate between a limited number of
values due to route changes.
Protocol
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
Header Checksum
The header checksum protects individual hops from processing a
corrupted header. When almost all IP header information is
compressed away, there is no point in having this additional
checksum; instead, it can be regenerated at the decompressor side.
The field is therefore classified as INFERRED.
Source and Destination addresses
These fields are part of the definition of a flow and must thus be
constant for all packets in the flow.
<span class="grey">Pelletier & Sandlund Standards Track [Page 111]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-112" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="appendix-A.2" href="#appendix-A.2">A.2</a>. IPv6 Header Fields</span>
+----------------------+----------------+
| Field | Class |
+----------------------+----------------+
| Version | STATIC-KNOWN |
| Traffic Class | RACH |
| Flow Label | STATIC-DEF |
| Payload Length | INFERRED |
| Next Header | STATIC-DEF |
| Hop Limit | RACH |
| Source Address | STATIC-DEF |
| Destination Address | STATIC-DEF |
+----------------------+----------------+
Version
The version field states which IP version is used and is set to
the value six.
Traffic Class
For the type of flows compressed by the ROHCv2 profiles, the DSCP
and ECN fields are expected to change relatively seldom.
Flow Label
This field may be used to identify packets belonging to a specific
flow. If it is not used, the value should be set to zero.
Otherwise, all packets belonging to the same flow must have the
same value in this field. The field is therefore classified as
STATIC-DEF.
Payload Length
Information about packet length (and, consequently, payload
length) is expected to be provided by the link layer. The field
is therefore classified as INFERRED.
Next Header
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
<span class="grey">Pelletier & Sandlund Standards Track [Page 112]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-113" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Hop Limit
The Hop Limit field is expected to be constant during the lifetime
of a flow or to alternate between a limited number of values due
to route changes.
Source and Destination addresses
These fields are part of the definition of a flow and must thus be
constant for all packets in the flow. The fields are therefore
classified as STATIC-DEF.
<span class="h3"><a class="selflink" id="appendix-A.3" href="#appendix-A.3">A.3</a>. UDP Header Fields</span>
+------------------+-------------+
| Field | Class |
+------------------+-------------+
| Source Port | STATIC-DEF |
| Destination Port | STATIC-DEF |
| Length | INFERRED |
| Checksum | |
| Disabled | STATIC |
| Enabled | IRREGULAR |
+------------------+-------------+
Source and Destination ports
These fields are part of the definition of a flow and must thus be
constant for all packets in the flow.
Length
Information about packet length is expected to be provided by the
link layer. The field is therefore classified as INFERRED.
Checksum
The checksum can be optional. If disabled, its value is
constantly zero and can be compressed away. If enabled, its value
depends on the payload, which for compression purposes is
equivalent to it changing randomly with every packet.
<span class="grey">Pelletier & Sandlund Standards Track [Page 113]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-114" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="appendix-A.4" href="#appendix-A.4">A.4</a>. UDP-Lite Header Fields</span>
+--------------------+-------------+
| Field | Class |
+--------------------+-------------+
| Source Port | STATIC-DEF |
| Destination Port | STATIC-DEF |
| Checksum Coverage | |
| Zero | STATIC-DEF |
| Constant | INFERRED |
| Variable | IRREGULAR |
| Checksum | IRREGULAR |
+--------------------+-------------+
Source and Destination Port
These fields are part of the definition of a flow and must thus be
constant for all packets in the flow.
Checksum Coverage
The Checksum Coverage field may behave in different ways: it may
have a value of zero, it may be equal to the datagram length, or
it may have any value between eight octets and the length of the
datagram. From a compression perspective, this field is expected
to either be entirely predictable (for the cases where it follows
the same behavior as the UDP Length field or where it takes on a
constant value) or to change randomly for each packet (making the
value unpredictable from a header-compression perspective). For
all cases, the behavior itself is not expected to change for this
field during the lifetime of a packet flow, or to change
relatively seldom.
Checksum
The information used for the calculation of the UDP-Lite checksum
is governed by the value of the checksum coverage and minimally
includes the UDP-Lite header. The checksum is a changing field
that must always be sent as-is.
<span class="grey">Pelletier & Sandlund Standards Track [Page 114]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-115" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
<span class="h3"><a class="selflink" id="appendix-A.5" href="#appendix-A.5">A.5</a>. RTP Header Fields</span>
+----------------+----------------+
| Field | Class |
+----------------+----------------+
| Version | STATIC-KNOWN |
| Padding | RACH |
| Extension | RACH |
| CSRC Counter | RACH |
| Marker | SEMISTATIC |
| Payload Type | RACH |
| Sequence Number| PATTERN |
| Timestamp | PATTERN |
| SSRC | STATIC-DEF |
| CSRC | RACH |
+----------------+----------------+
Version
This field is expected to have the value two and the field is
therefore classified as STATIC-KNOWN.
Padding
The use of this field is application-dependent, but when payload
padding is used, it is likely to be present in most or all
packets. The field is classified as RACH to allow for the case
where the value of this field changes.
Extension
If RTP extensions are used by the application, these extensions
are often present in all packets, although the use of extensions
is infrequent. To allow efficient compression of a flow using
extensions in only a few packets, this field is classified as
RACH.
CSRC Count
This field indicates the number of CSRC items present in the CSRC
list. This number is expected to be mostly constant on a packet-
to-packet basis and when it changes, change by small amounts. As
long as no RTP mixer is used, the value of this field will be
zero.
<span class="grey">Pelletier & Sandlund Standards Track [Page 115]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-116" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Marker
For audio, the marker bit should be set only in the first packet
of a talkspurt, while for video, it should be set in the last
packet of every picture. This means that in both cases the RTP
marker is classified as SEMISTATIC.
Payload Type
Applications could adapt to congestion by changing payload type
and/or frame sizes, but that is not expected to happen frequently,
so this field is classified as RACH.
RTP Sequence Number
The RTP Sequence Number will be incremented by one for each packet
sent.
Timestamp
In the audio case:
As long as there are no pauses in the audio stream, the RTP
Timestamp will be incremented by a constant value, which
corresponds to the number of samples in the speech frame. It
will thus mostly follow the RTP Sequence Number. When there
has been a silent period and a new talkspurt begins, the
timestamp will jump in proportion to the length of the silent
period. However, the increment will probably be within a
relatively limited range.
In the video case:
Between two consecutive packets, the timestamp will either be
unchanged or increase by a multiple of a fixed value
corresponding to the picture clock frequency. The timestamp
can also decrease by a multiple of the fixed value for certain
coding schemes. The change in timestamp value, expressed as a
multiple of the picture clock frequency, is in most cases
within a limited range.
SSRC
This field is part of the definition of a flow and must thus be
constant for all packets in the flow. The field is therefore
classified as STATIC-DEF.
<span class="grey">Pelletier & Sandlund Standards Track [Page 116]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-117" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Contributing Sources (CSRC)
The participants in a session, who are identified by the CSRC
fields, are usually expected to be unchanged on a packet-to-packet
basis, but will infrequently change by a few additions and/or
removals.
<span class="h3"><a class="selflink" id="appendix-A.6" href="#appendix-A.6">A.6</a>. ESP Header Fields</span>
+------------------+-------------+
| Field | Class |
+------------------+-------------+
| SPI | STATIC-DEF |
| Sequence Number | PATTERN |
+------------------+-------------+
SPI
This field is used to identify a distinct flow between two IPsec
peers and it changes rarely; therefore, it is classified as
STATIC-DEF.
ESP Sequence Number
The ESP Sequence Number will be incremented by one for each packet
sent.
<span class="h3"><a class="selflink" id="appendix-A.7" href="#appendix-A.7">A.7</a>. IPv6 Extension Header Fields</span>
+-----------------------+---------------+
| Field | Class |
+-----------------------+---------------+
| Next Header | STATIC-DEF |
| Ext Hdr Len | |
| Routing | STATIC-DEF |
| Hop-by-hop | STATIC |
| Destination | STATIC |
| Options | |
| Routing | STATIC-DEF |
| Hop-by-hop | RACH |
| Destination | RACH |
+-----------------------+---------------+
Next Header
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
<span class="grey">Pelletier & Sandlund Standards Track [Page 117]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-118" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Ext Hdr Len
For the Routing header, it is expected that the length will remain
constant for the duration of the flow, and that a change in the
length should be classified as a new flow by the ROHC compressor.
For Hop-by-hop and Destination options headers, the length is
expected to remain static, but can be updated by an IR packet.
Options
For the Routing header, it is expected that the option content
will remain constant for the duration of the flow, and that a
change in the routing information should be classified as a new
flow by the ROHC compressor. For Hop-by-hop and Destination
options headers, the options are expected to remain static, but
can be updated by an IR packet.
<span class="h3"><a class="selflink" id="appendix-A.8" href="#appendix-A.8">A.8</a>. GRE Header Fields</span>
+--------------------+---------------+
| Field | Class |
+--------------------+---------------+
| C flag | STATIC |
| K flag | STATIC |
| S flag | STATIC |
| R flag | STATIC-KNOWN |
| Reserved0, Version | STATIC-KNOWN |
| Protocol | STATIC-DEF |
| Checksum | IRREGULAR |
| Reserved | STATIC-KNOWN |
| Sequence Number | PATTERN |
| Key | STATIC-DEF |
+--------------------+---------------+
Flags
The four flag bits are not expected to change for the duration of
the flow, and the R flag is expected to always be set to zero.
Reserved0, Version
Both of these fields are expected to be set to zero for the
duration of any flow.
Protocol
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
<span class="grey">Pelletier & Sandlund Standards Track [Page 118]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-119" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Checksum
When the checksum field is present, it is expected to behave
unpredictably.
Reserved
When present, this field is expected to be set to zero.
Sequence Number
When present, the Sequence Number increases by one for each
packet.
Key
When present, the Key field is used to define the flow and does
not change.
<span class="h3"><a class="selflink" id="appendix-A.9" href="#appendix-A.9">A.9</a>. MINE Header Fields</span>
+---------------------+----------------+
| Field | Class |
+---------------------+----------------+
| Protocol | STATIC-DEF |
| S bit | STATIC-DEF |
| Reserved | STATIC-KNOWN |
| Checksum | INFERRED |
| Source Address | STATIC-DEF |
| Destination Address | STATIC-DEF |
+---------------------+----------------+
Protocol
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
S bit
The S bit is not expected to change during a flow.
Reserved
The reserved field is expected to be set to zero.
<span class="grey">Pelletier & Sandlund Standards Track [Page 119]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-120" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Checksum
The header checksum protects individual routing hops from
processing a corrupted header. Since all fields of this header
are compressed away, there is no need to include this checksum in
compressed packets and it can be regenerated at the decompressor
side.
Source and Destination Addresses
These fields can be used to define the flow and are not expected
to change.
<span class="h3"><a class="selflink" id="appendix-A.10" href="#appendix-A.10">A.10</a>. AH Header Fields</span>
+---------------------+----------------+
| Field | Class |
+---------------------+----------------+
| Next Header | STATIC-DEF |
| Payload Length | STATIC |
| Reserved | STATIC-KNOWN |
| SPI | STATIC-DEF |
| Sequence Number | PATTERN |
| ICV | IRREGULAR |
+---------------------+----------------+
Next Header
This field will have the same value in all packets of a flow and
is therefore classified as STATIC-DEF.
Payload Length
It is expected that the length of the header is constant for the
duration of the flow.
Reserved
The value of this field will be set to zero.
SPI
This field is used to identify a specific flow and only changes
when the sequence number wraps around, and is therefore classified
as STATIC-DEF.
<span class="grey">Pelletier & Sandlund Standards Track [Page 120]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-121" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Sequence Number
The Sequence Number will be incremented by one for each packet
sent.
ICV
The ICV is expected to behave unpredictably and is therefore
classified as IRREGULAR.
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Compressor Implementation Guidelines</span>
This section describes some guiding principles for implementing a
ROHCv2 compressor with focus on how to efficiently select appropriate
packet formats. The text in this appendix should be considered
guidelines; it does not define any normative requirement on how
ROHCv2 profiles are implemented.
<span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. Reference Management</span>
The compressor usually maintains a sliding window of reference
headers, which contains as many references as needed for the
optimistic approach. Each reference contains a description of which
changes occurred in the flow between two consecutive headers in the
flow, and a new reference is inserted into the window each time a
packet is compressed by this context. A reference may for example be
implemented as a stored copy of the uncompressed header being
represented. When the compressor is confident that a specific
reference is no longer used by the decompressor (for example by using
the optimistic approach or feedback received), the reference is
removed from the sliding window.
<span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Window-based LSB Encoding (W-LSB)</span>
<a href="#section-5.1.1">Section 5.1.1</a> describes how the optimistic approach impacts the
packet format selection for the compressor. Exactly how the
compressor selects a packet format is up to the implementation to
decide, but the following is an example of how this process can be
performed for lsb-encoded fields through the use of Window-based LSB
encoding (W-LSB).
With W-LSB encoding, the compressor uses a number of references (a
window) from its context. What references to use is determined by
its optimistic approach. The compressor extracts the value of the
field to be W-LSB encoded from each reference in the window, and
finds the maximum and minimum values. Once it determines these
values, the compressor uses the assumption that the decompressor has
a value for this field within the range given by these boundaries
<span class="grey">Pelletier & Sandlund Standards Track [Page 121]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-122" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
(inclusively) as its reference. The compressor can then select a
number of LSBs from the value to be compressed, so that the LSBs can
be decompressed regardless of whether the decompressor uses the
minimum value, the maximum value or any other value in the range of
possible references.
<span class="h3"><a class="selflink" id="appendix-B.3" href="#appendix-B.3">B.3</a>. W-LSB Encoding and Timer-based Compression</span>
<a href="#section-6.6.9">Section 6.6.9</a> defines decompressor behavior for timer-based RTP
timestamp compression. This section gives guidelines on how the
compressor should determine the number of LSB bits it should send for
the timestamp field. When using timer-based compression, this number
depends on the sum of the jitter before the compressor and the jitter
between the compressor and decompressor.
The jitter before the compressor can be estimated using the following
computation:
Max_Jitter_BC =
max {|(T_n - T_j) - ((a_n - a_j) / time_stride)|,
for all headers j in the sliding window}
where (T_n - T_j) is the difference in the timestamp between the
currently compressed header and a reference header and (a_n - a_j) is
the difference in arrival time between those same two headers.
In addition to this, the compressor needs to estimate an upper bound
for the jitter between the compressor and decompressor
(Max_Jitter_CD). This information may for example come from lower
layers.
A compressor implementation can determine whether the difference in
clock resolution between the compressor and decompressor induces an
error when performing integer arithmetics; it can then treat this
error as additional jitter.
After obtaining estimates for the jitters, the number of bits needed
to transmit is obtained using the following calculation:
ceiling(log2(2 * (Max_Jitter_BC + Max_Jitter_CD + 2) + 1))
This number is then used to select a packet format that contains at
least this many scaled timestamp bits.
<span class="grey">Pelletier & Sandlund Standards Track [Page 122]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-123" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Authors' Addresses
Ghyslain Pelletier
Ericsson
Box 920
Lulea SE-971 28
Sweden
Phone: +46 (0) 8 404 29 43
EMail: ghyslain.pelletier@ericsson.com
Kristofer Sandlund
Ericsson
Box 920
Lulea SE-971 28
Sweden
Phone: +46 (0) 8 404 41 58
EMail: kristofer.sandlund@ericsson.com
<span class="grey">Pelletier & Sandlund Standards Track [Page 123]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-124" ></span>
<span class="grey"><a href="./rfc5225">RFC 5225</a> ROHCv2 Profiles April 2008</span>
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Pelletier & Sandlund Standards Track [Page 124]
</pre>
|