Lines Matching refs:pkt
48 const uint8_t *pkt, unsigned int wirelen, unsigned int buflen)
52 args.pkt = pkt;
88 uint8_t pkt[1]; /* the program doesn't read any data */
97 ATF_CHECK(jitcall(code, pkt, 1, 1) == 17);
116 uint8_t pkt[1]; /* the program doesn't read any data */
134 ATF_CHECK(jitcall(code, pkt, 1, 1) == 13);
155 uint8_t pkt[1]; /* the program doesn't read any data */
164 ATF_CHECK(jitcall(code, pkt, 1, 1) == 5);
185 uint8_t pkt[1]; /* the program doesn't read any data */
194 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
215 uint8_t pkt[1]; /* the program doesn't read any data */
224 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0xfffffffd));
244 uint8_t pkt[1]; /* the program doesn't read any data */
253 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
274 uint8_t pkt[1]; /* the program doesn't read any data */
283 ATF_CHECK(jitcall(code, pkt, 1, 1) == 7);
304 uint8_t pkt[1]; /* the program doesn't read any data */
313 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3);
334 uint8_t pkt[1]; /* the program doesn't read any data */
343 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x3fffffff));
364 uint8_t pkt[1]; /* the program doesn't read any data */
373 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(429484384));
394 uint8_t pkt[1]; /* the program doesn't read any data */
403 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(429484));
424 uint8_t pkt[1]; /* the program doesn't read any data */
433 ATF_CHECK(jitcall(code, pkt, 1, 1) == 564);
454 uint8_t pkt[1]; /* the program doesn't read any data */
463 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
483 uint8_t pkt[1]; /* the program doesn't read any data */
492 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
513 uint8_t pkt[1]; /* the program doesn't read any data */
522 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
543 uint8_t pkt[1]; /* the program doesn't read any data */
552 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
573 uint8_t pkt[1]; /* the program doesn't read any data */
582 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3);
603 uint8_t pkt[1]; /* the program doesn't read any data */
612 ATF_CHECK(jitcall(code, pkt, 1, 1) == 9);
633 uint8_t pkt[1]; /* the program doesn't read any data */
642 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3849);
663 uint8_t pkt[1]; /* the program doesn't read any data */
672 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(3039531));
693 uint8_t pkt[1]; /* the program doesn't read any data */
702 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x7fffffde));
723 uint8_t pkt[1]; /* the program doesn't read any data */
732 ATF_CHECK(jitcall(code, pkt, 1, 1) == (0xdead&0xbeef));
753 uint8_t pkt[1]; /* the program doesn't read any data */
762 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
783 uint8_t pkt[1]; /* the program doesn't read any data */
792 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
813 uint8_t pkt[1]; /* the program doesn't read any data */
822 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xbeef0000);
843 uint8_t pkt[1]; /* the program doesn't read any data */
852 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
873 uint8_t pkt[1]; /* the program doesn't read any data */
882 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0x0000dead);
903 uint8_t pkt[1]; /* the program doesn't read any data */
912 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
965 uint8_t pkt[1]; /* the program doesn't read any data */
974 ATF_CHECK(jitcall(code, pkt, 1, 1) != UINT32_C(0x71cbbbc3));
975 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x0000a994));
998 uint8_t pkt[1]; /* the program doesn't read any data */
1007 ATF_CHECK(jitcall(code, pkt, 1, 1) == 5);
1029 uint8_t pkt[1]; /* the program doesn't read any data */
1038 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
1060 uint8_t pkt[1]; /* the program doesn't read any data */
1069 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0xfffffffd));
1090 uint8_t pkt[1]; /* the program doesn't read any data */
1099 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
1121 uint8_t pkt[1]; /* the program doesn't read any data */
1130 ATF_CHECK(jitcall(code, pkt, 1, 1) == 7);
1152 uint8_t pkt[1]; /* the program doesn't read any data */
1161 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3);
1183 uint8_t pkt[1]; /* the program doesn't read any data */
1192 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x3fffffff));
1214 uint8_t pkt[1]; /* the program doesn't read any data */
1223 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(429484384));
1245 uint8_t pkt[1]; /* the program doesn't read any data */
1254 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(429484));
1276 uint8_t pkt[1]; /* the program doesn't read any data */
1285 ATF_CHECK(jitcall(code, pkt, 1, 1) == 564);
1307 uint8_t pkt[1]; /* the program doesn't read any data */
1316 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
1337 uint8_t pkt[1]; /* the program doesn't read any data */
1346 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
1368 uint8_t pkt[1]; /* the program doesn't read any data */
1377 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
1399 uint8_t pkt[1]; /* the program doesn't read any data */
1408 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
1430 uint8_t pkt[1]; /* the program doesn't read any data */
1439 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3);
1461 uint8_t pkt[1]; /* the program doesn't read any data */
1470 ATF_CHECK(jitcall(code, pkt, 1, 1) == 9);
1492 uint8_t pkt[1]; /* the program doesn't read any data */
1501 ATF_CHECK(jitcall(code, pkt, 1, 1) == 3849);
1523 uint8_t pkt[1]; /* the program doesn't read any data */
1532 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(3039531));
1554 uint8_t pkt[1]; /* the program doesn't read any data */
1563 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x7fffffde));
1585 uint8_t pkt[1]; /* the program doesn't read any data */
1594 ATF_CHECK(jitcall(code, pkt, 1, 1) == (0xdead&0xbeef));
1616 uint8_t pkt[1]; /* the program doesn't read any data */
1625 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
1647 uint8_t pkt[1]; /* the program doesn't read any data */
1656 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
1678 uint8_t pkt[1]; /* the program doesn't read any data */
1687 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xbeef0000);
1709 uint8_t pkt[1]; /* the program doesn't read any data */
1718 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
1740 uint8_t pkt[1]; /* the program doesn't read any data */
1749 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0x0000dead);
1771 uint8_t pkt[1]; /* the program doesn't read any data */
1780 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0xdeadbeef);
1842 uint8_t pkt[1]; /* the program doesn't read any data */
1851 ATF_CHECK(jitcall(code, pkt, 1, 1) != UINT32_C(0x71cbbbc3));
1852 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_C(0x0000a994));
1874 uint8_t pkt[1]; /* the program doesn't read any data */
1883 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0u-777u);
1907 uint8_t pkt[1]; /* the program doesn't read any data */
1916 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
1999 uint8_t pkt[8]; /* the program doesn't read any data */
2008 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2009 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2010 ATF_CHECK(jitcall(code, pkt, 3, 3) == 7);
2011 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2012 ATF_CHECK(jitcall(code, pkt, 5, 5) == 7);
2013 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2014 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2015 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2050 uint8_t pkt[8]; /* the program doesn't read any data */
2059 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2060 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2061 ATF_CHECK(jitcall(code, pkt, 3, 3) == 7);
2062 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2063 ATF_CHECK(jitcall(code, pkt, 5, 5) == 7);
2064 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2065 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2066 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2101 uint8_t pkt[8]; /* the program doesn't read any data */
2110 ATF_CHECK(jitcall(code, pkt, 1, 1) == 7);
2111 ATF_CHECK(jitcall(code, pkt, 2, 2) == 7);
2112 ATF_CHECK(jitcall(code, pkt, 3, 3) == 1);
2113 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2114 ATF_CHECK(jitcall(code, pkt, 5, 5) == 7);
2115 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2116 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2117 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2152 uint8_t pkt[8]; /* the program doesn't read any data */
2161 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2162 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2163 ATF_CHECK(jitcall(code, pkt, 3, 3) == 1);
2164 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2165 ATF_CHECK(jitcall(code, pkt, 5, 5) == 5);
2166 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2167 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2168 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2214 uint8_t pkt[1]; /* the program doesn't read any data */
2223 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
2265 uint8_t pkt[8]; /* the program doesn't read any data */
2274 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2275 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2276 ATF_CHECK(jitcall(code, pkt, 3, 3) == 7);
2277 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2278 ATF_CHECK(jitcall(code, pkt, 5, 5) == 7);
2279 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2280 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2281 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2323 uint8_t pkt[8]; /* the program doesn't read any data */
2332 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2333 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2334 ATF_CHECK(jitcall(code, pkt, 3, 3) == 7);
2335 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2336 ATF_CHECK(jitcall(code, pkt, 5, 5) == 7);
2337 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2338 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2339 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2380 uint8_t pkt[8]; /* the program doesn't read any data */
2389 ATF_CHECK(jitcall(code, pkt, 1, 1) == 8);
2390 ATF_CHECK(jitcall(code, pkt, 2, 2) == 8);
2391 ATF_CHECK(jitcall(code, pkt, 3, 3) == 2);
2392 ATF_CHECK(jitcall(code, pkt, 4, 4) == 8);
2393 ATF_CHECK(jitcall(code, pkt, 5, 5) == 3);
2394 ATF_CHECK(jitcall(code, pkt, 6, 6) == 9);
2395 ATF_CHECK(jitcall(code, pkt, 7, 7) == 6);
2396 ATF_CHECK(jitcall(code, pkt, 8, 8) == 1);
2437 uint8_t pkt[8]; /* the program doesn't read any data */
2446 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
2447 ATF_CHECK(jitcall(code, pkt, 2, 2) == 1);
2448 ATF_CHECK(jitcall(code, pkt, 3, 3) == 1);
2449 ATF_CHECK(jitcall(code, pkt, 4, 4) == 7);
2450 ATF_CHECK(jitcall(code, pkt, 5, 5) == 5);
2451 ATF_CHECK(jitcall(code, pkt, 6, 6) == 8);
2452 ATF_CHECK(jitcall(code, pkt, 7, 7) == 5);
2453 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2474 uint8_t pkt[8]; /* the program doesn't read any data */
2483 ATF_CHECK(jitcall(code, pkt, 1, 1) == 10);
2505 uint8_t pkt[8]; /* the program doesn't read any data */
2514 ATF_CHECK(jitcall(code, pkt, 1, 1) == 11);
2536 uint8_t pkt[8]; /* the program doesn't read any data */
2545 ATF_CHECK(jitcall(code, pkt, 1, 1) == 11);
2601 uint8_t pkt[1]; /* the program doesn't read any data */
2610 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
2643 uint8_t *pkt = deadbeef_at_5;
2657 ATF_CHECK(jitcall(code, pkt, l, l) == 0);
2658 ATF_CHECK(jitcall(code, pkt, pktsize, l) == 0);
2662 ATF_CHECK(jitcall(code, pkt, l, l) == expected[i]);
2663 ATF_CHECK(jitcall(code, pkt, pktsize, l) == expected[i]);
2666 ATF_CHECK(jitcall(code, pkt, l, l) == expected[i]);
2745 uint8_t pkt[8] = { 0 };
2757 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2813 uint8_t *pkt = deadbeef_at_5;
2827 ATF_CHECK(jitcall(code, pkt, l, l) == 0);
2828 ATF_CHECK(jitcall(code, pkt, pktsize, l) == 0);
2832 ATF_CHECK(jitcall(code, pkt, l, l) == expected[i]);
2833 ATF_CHECK(jitcall(code, pkt, pktsize, l) == expected[i]);
2836 ATF_CHECK(jitcall(code, pkt, l, l) == expected[i]);
2915 uint8_t pkt[8] = { 0 };
2927 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
2952 uint8_t pkt[8] = { 10, 20, 30, 40, 50, 60, 70, 80 };
2961 for (i = 1; i <= sizeof(pkt); i++) {
2962 ATF_CHECK(bpf_filter(insns, pkt, i, i) == 10 * i);
2963 ATF_CHECK(jitcall(code, pkt, i, i) == 10 * i);
2989 uint8_t pkt[8] = { 10, 20, 30, 40, 50, 60, 70, 80 };
2998 for (i = 1; i <= sizeof(pkt); i++) {
2999 ATF_CHECK(bpf_filter(insns, pkt, i, i) == 10 * i);
3000 ATF_CHECK(jitcall(code, pkt, i, i) == 10 * i);
3022 uint8_t pkt[32]; /* the program doesn't read any data */
3031 for (i = 0; i < sizeof(pkt); i++)
3032 ATF_CHECK(jitcall(code, pkt, i, 1) == i);
3052 uint8_t pkt[1]; /* the program doesn't read any data */
3061 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
3082 uint8_t pkt[1]; /* the program doesn't read any data */
3091 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX - 5);
3114 uint8_t pkt[1]; /* the program doesn't read any data */
3123 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
3145 uint8_t pkt[5]; /* the program doesn't read any data */
3154 for (i = 1; i < sizeof(pkt); i++) {
3155 ATF_CHECK(jitcall(code, pkt, i, 1) == i);
3156 ATF_CHECK(jitcall(code, pkt, i + 1, i) == i + 1);
3180 uint8_t pkt[5]; /* the program doesn't read any data */
3189 ATF_CHECK(jitcall(code, pkt, 5, 1) == UINT32_MAX);
3190 ATF_CHECK(jitcall(code, pkt, 6, 5) == 7);
3211 uint8_t pkt[2] = { 0, 0x7a };
3220 ATF_CHECK(jitcall(code, pkt, 2, 2) == 40);
3242 uint8_t pkt[] = { 0, 11, 22, 33, 44, 55 };
3251 ATF_CHECK(jitcall(code, pkt, sizeof(pkt), sizeof(pkt)) == 55);
3272 uint8_t pkt[1]; /* the program doesn't read any data */
3281 ATF_CHECK(jitcall(code, pkt, 1, 1) == 391);
3305 uint8_t pkt[16]; /* the program doesn't read any data */
3314 for (i = 1; i <= sizeof(pkt); i++)
3315 ATF_CHECK(jitcall(code, pkt, i, sizeof(pkt)) == i);
3337 uint8_t pkt[1]; /* the program doesn't read any data */
3346 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
3374 uint8_t pkt[2]; /* the program doesn't read any data */
3385 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
3386 ATF_CHECK(jitcall(code, pkt, 2, 2) == 102);
3414 uint8_t pkt[2]; /* the program doesn't read any data */
3425 ATF_CHECK(jitcall(code, pkt, 1, 1) == 1);
3426 ATF_CHECK(jitcall(code, pkt, 2, 2) == 102);
3445 uint8_t pkt[BPF_MEMWORDS]; /* the program doesn't read any data */
3480 for (k = 1; k <= sizeof(pkt); k++)
3481 ATF_CHECK(jitcall(code, pkt, k, k) == 3*(k-1));
3505 uint8_t pkt[16]; /* the program doesn't read any data */
3514 for (i = 1; i <= sizeof(pkt); i++)
3515 ATF_CHECK(jitcall(code, pkt, i, sizeof(pkt)) == i);
3538 uint8_t pkt[1]; /* the program doesn't read any data */
3547 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
3581 uint8_t pkt[16]; /* the program doesn't read any data */
3590 for (i = 1; i <= sizeof(pkt); i++)
3591 ATF_CHECK(jitcall(code, pkt, i, sizeof(pkt)) == 3 * i);
3610 uint8_t pkt[BPF_MEMWORDS]; /* the program doesn't read any data */
3645 for (k = 1; k <= sizeof(pkt); k++)
3646 ATF_CHECK(jitcall(code, pkt, k, k) == 3*(k-1));
3677 uint8_t pkt[2][34] = {
3700 for (j = 1; j < sizeof(pkt[i]); j++)
3701 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3702 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
3734 uint8_t pkt[2][34] = {
3757 for (j = 1; j < sizeof(pkt[i]); j++)
3758 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3759 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
3791 uint8_t pkt[2][34] = {
3814 for (j = 1; j < sizeof(pkt[i]); j++)
3815 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3816 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
3849 uint8_t pkt[2][34] = {
3872 for (j = 1; j < sizeof(pkt[i]); j++)
3873 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3874 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
3907 uint8_t pkt[2][34] = {
3930 for (j = 1; j < sizeof(pkt[i]); j++)
3931 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3932 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
3966 uint8_t pkt[2][34] = {
3989 for (j = 1; j < sizeof(pkt[i]); j++)
3990 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
3991 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
4025 uint8_t pkt[2][34] = {
4048 for (j = 1; j < sizeof(pkt[i]); j++)
4049 ATF_CHECK(jitcall(code, pkt[i], j, j) == 0);
4050 ATF_CHECK(jitcall(code, pkt[i], j, j) == UINT32_MAX);
4080 uint8_t pkt[6] = {0, 0, /* UINT32_MAX: */ 255, 255, 255, 255};
4089 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4090 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4091 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4092 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4093 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4094 ATF_CHECK(jitcall(code, pkt, 6, 6) == UINT32_MAX);
4122 uint8_t pkt[1]; /* the program doesn't read any data */
4131 ATF_CHECK(jitcall(code, pkt, 1, 1) == UINT32_MAX);
4158 uint8_t pkt[10] = {};
4168 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4169 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4170 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4172 /* !(pkt[3] == 8) => return 123456789 */
4173 ATF_CHECK(jitcall(code, pkt, 4, 4) == 123456789);
4174 ATF_CHECK(jitcall(code, pkt, 5, 5) == 123456789);
4175 ATF_CHECK(jitcall(code, pkt, 6, 6) == 123456789);
4176 ATF_CHECK(jitcall(code, pkt, 7, 7) == 123456789);
4177 ATF_CHECK(jitcall(code, pkt, 8, 8) == 123456789);
4178 ATF_CHECK(jitcall(code, pkt, 9, 9) == 123456789);
4180 /* !(pkt[4:2] >= 7) => too short or return 123456789 */
4181 pkt[3] = 8;
4182 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4183 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4184 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4185 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4186 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4187 ATF_CHECK(jitcall(code, pkt, 6, 6) == 123456789);
4188 ATF_CHECK(jitcall(code, pkt, 9, 9) == 123456789);
4190 /* !(pkt[6:4] > 6) => too short or return 987654321 */
4191 pkt[4] = pkt[5] = 1;
4192 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4193 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4194 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4195 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4196 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4197 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4198 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4199 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4200 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4201 ATF_CHECK(jitcall(code, pkt, 10, 10) == 987654321);
4203 /* (pkt[6:4] > 6) => too short or return 123456789 */
4204 pkt[6] = pkt[7] = pkt[8] = pkt[9] = 1;
4205 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4206 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4207 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4208 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4209 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4210 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4211 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4212 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4213 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4214 ATF_CHECK(jitcall(code, pkt, 10, 10) == 123456789);
4243 uint8_t pkt[22] = {};
4253 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4254 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4255 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4256 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4257 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4258 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4259 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4260 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4261 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4262 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4263 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4264 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4265 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4266 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4267 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4268 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4269 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4270 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4271 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4272 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4273 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4276 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4279 pkt[12] = 0x80; pkt[13] = 0x35;
4280 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4283 pkt[21] = 3;
4284 ATF_CHECK(jitcall(code, pkt, 22, 22) == 42);
4287 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4288 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4289 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4290 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4291 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4292 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4293 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4294 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4295 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4296 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4297 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4298 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4299 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4300 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4301 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4302 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4303 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4304 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4305 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4306 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4307 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4310 pkt[20] = 3;
4311 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4345 uint8_t pkt[34] = {};
4355 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4356 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4357 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4358 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4359 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4360 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4361 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4362 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4363 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4364 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4365 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4366 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4367 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4368 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4369 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4370 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4371 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4372 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4373 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4374 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4375 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4376 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4377 ATF_CHECK(jitcall(code, pkt, 23, 23) == 0);
4378 ATF_CHECK(jitcall(code, pkt, 24, 24) == 0);
4379 ATF_CHECK(jitcall(code, pkt, 25, 25) == 0);
4380 ATF_CHECK(jitcall(code, pkt, 26, 26) == 0);
4381 ATF_CHECK(jitcall(code, pkt, 27, 27) == 0);
4382 ATF_CHECK(jitcall(code, pkt, 28, 28) == 0);
4383 ATF_CHECK(jitcall(code, pkt, 29, 29) == 0);
4384 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4385 ATF_CHECK(jitcall(code, pkt, 31, 31) == 0);
4386 ATF_CHECK(jitcall(code, pkt, 32, 32) == 0);
4387 ATF_CHECK(jitcall(code, pkt, 33, 33) == 0);
4390 ATF_CHECK(jitcall(code, pkt, 34, 34) == 0);
4393 pkt[12] = 8;
4394 ATF_CHECK(jitcall(code, pkt, 34, 34) == 0);
4396 pkt[26] = 128; pkt[27] = 3; pkt[28] = 112; pkt[29] = 15;
4397 ATF_CHECK(jitcall(code, pkt, 34, 34) == 0);
4399 pkt[30] = 128; pkt[31] = 3; pkt[32] = 112; pkt[33] = 35;
4400 ATF_CHECK(jitcall(code, pkt, 34, 34) == UINT32_MAX);
4403 pkt[26] = 128; pkt[27] = 3; pkt[28] = 112; pkt[29] = 35;
4404 ATF_CHECK(jitcall(code, pkt, 34, 34) == 0);
4406 pkt[30] = 128; pkt[31] = 3; pkt[32] = 112; pkt[33] = 15;
4407 ATF_CHECK(jitcall(code, pkt, 34, 34) == UINT32_MAX);
4410 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4411 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4412 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4413 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4414 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4415 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4416 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4417 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4418 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4419 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4420 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4421 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4422 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4423 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4424 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4425 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4426 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4427 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4428 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4429 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4430 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4431 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4432 ATF_CHECK(jitcall(code, pkt, 23, 23) == 0);
4433 ATF_CHECK(jitcall(code, pkt, 24, 24) == 0);
4434 ATF_CHECK(jitcall(code, pkt, 25, 25) == 0);
4435 ATF_CHECK(jitcall(code, pkt, 26, 26) == 0);
4436 ATF_CHECK(jitcall(code, pkt, 27, 27) == 0);
4437 ATF_CHECK(jitcall(code, pkt, 28, 28) == 0);
4438 ATF_CHECK(jitcall(code, pkt, 29, 29) == 0);
4439 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4440 ATF_CHECK(jitcall(code, pkt, 31, 31) == 0);
4441 ATF_CHECK(jitcall(code, pkt, 32, 32) == 0);
4442 ATF_CHECK(jitcall(code, pkt, 33, 33) == 0);
4445 pkt[13] = 8;
4446 ATF_CHECK(jitcall(code, pkt, 34, 34) == 0);
4481 uint8_t pkt[30] = {};
4484 pkt[20] = 1; pkt[21] = 1;
4494 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4495 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4496 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4497 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4498 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4499 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4500 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4501 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4502 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4503 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4504 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4505 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4506 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4507 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4508 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4509 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4510 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4511 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4512 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4513 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4514 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4515 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4516 ATF_CHECK(jitcall(code, pkt, 23, 23) == 0);
4517 ATF_CHECK(jitcall(code, pkt, 24, 24) == 0);
4518 ATF_CHECK(jitcall(code, pkt, 25, 25) == 0);
4519 ATF_CHECK(jitcall(code, pkt, 26, 26) == 0);
4520 ATF_CHECK(jitcall(code, pkt, 27, 27) == 0);
4521 ATF_CHECK(jitcall(code, pkt, 28, 28) == 0);
4522 ATF_CHECK(jitcall(code, pkt, 29, 29) == 0);
4525 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4528 pkt[12] = 8;
4529 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4532 pkt[23] = 6;
4533 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4536 pkt[20] = 0x20; pkt[21] = 0;
4537 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4540 pkt[14] = 0xd3;
4541 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);
4544 pkt[27] = 79;
4545 ATF_CHECK(jitcall(code, pkt, 30, 30) == UINT32_MAX);
4548 pkt[29] = 79; pkt[27] = 0;
4549 ATF_CHECK(jitcall(code, pkt, 30, 30) == UINT32_MAX);
4552 ATF_CHECK(jitcall(code, pkt, 1, 1) == 0);
4553 ATF_CHECK(jitcall(code, pkt, 2, 2) == 0);
4554 ATF_CHECK(jitcall(code, pkt, 3, 3) == 0);
4555 ATF_CHECK(jitcall(code, pkt, 4, 4) == 0);
4556 ATF_CHECK(jitcall(code, pkt, 5, 5) == 0);
4557 ATF_CHECK(jitcall(code, pkt, 6, 6) == 0);
4558 ATF_CHECK(jitcall(code, pkt, 7, 7) == 0);
4559 ATF_CHECK(jitcall(code, pkt, 8, 8) == 0);
4560 ATF_CHECK(jitcall(code, pkt, 9, 9) == 0);
4561 ATF_CHECK(jitcall(code, pkt, 10, 10) == 0);
4562 ATF_CHECK(jitcall(code, pkt, 11, 11) == 0);
4563 ATF_CHECK(jitcall(code, pkt, 12, 12) == 0);
4564 ATF_CHECK(jitcall(code, pkt, 13, 13) == 0);
4565 ATF_CHECK(jitcall(code, pkt, 14, 14) == 0);
4566 ATF_CHECK(jitcall(code, pkt, 15, 15) == 0);
4567 ATF_CHECK(jitcall(code, pkt, 16, 16) == 0);
4568 ATF_CHECK(jitcall(code, pkt, 17, 17) == 0);
4569 ATF_CHECK(jitcall(code, pkt, 18, 18) == 0);
4570 ATF_CHECK(jitcall(code, pkt, 19, 19) == 0);
4571 ATF_CHECK(jitcall(code, pkt, 20, 20) == 0);
4572 ATF_CHECK(jitcall(code, pkt, 21, 21) == 0);
4573 ATF_CHECK(jitcall(code, pkt, 22, 22) == 0);
4574 ATF_CHECK(jitcall(code, pkt, 23, 23) == 0);
4575 ATF_CHECK(jitcall(code, pkt, 24, 24) == 0);
4576 ATF_CHECK(jitcall(code, pkt, 25, 25) == 0);
4577 ATF_CHECK(jitcall(code, pkt, 26, 26) == 0);
4578 ATF_CHECK(jitcall(code, pkt, 27, 27) == 0);
4579 ATF_CHECK(jitcall(code, pkt, 28, 28) == 0);
4580 ATF_CHECK(jitcall(code, pkt, 29, 29) == 0);
4583 pkt[14] = 4;
4584 ATF_CHECK(jitcall(code, pkt, 30, 30) == 0);