Lines Matching +full:0 +full:xa000000

85 # define	PAUSE() ts.tv_sec = 0; ts.tv_nsec = 10000000; \
88 # define PAUSE() tv.tv_sec = 0; tv.tv_usec = 10000; \
89 (void) select(0, NULL, NULL, NULL, &tv)
102 int nfd, i = 0, len, id = getpid(); in ip_test1()
106 ip->ip_tos = 0; in ip_test1()
107 ip->ip_off = 0; in ip_test1()
110 ip->ip_sum = 0; in ip_test1()
114 u->uh_sum = 0; in ip_test1()
127 ip->ip_id = 0; in ip_test1()
129 for (i = 0; i < ((sizeof(*ip) + ntohs(u->uh_ulen)) >> 2); i++) { in ip_test1()
143 ip->ip_id = 0; in ip_test1()
159 ip->ip_id = 0; in ip_test1()
162 for (i = 0; i < 4; i++) { in ip_test1()
176 ip->ip_id = 0; in ip_test1()
192 ip->ip_id = 0; in ip_test1()
195 printf("1.5.0 ip_len < packet size (size++, long packets)\n"); in ip_test1()
198 ip->ip_sum = 0; in ip_test1()
207 for (i = len; i > 0; i--) { in ip_test1()
210 ip->ip_sum = 0; in ip_test1()
224 ip->ip_id = 0; in ip_test1()
225 printf("1.6.0 ip_len > packet size (increase ip_len)\n"); in ip_test1()
229 ip->ip_sum = 0; in ip_test1()
239 for (i = len; i > 0; i--) { in ip_test1()
241 ip->ip_sum = 0; in ip_test1()
253 * Part7: 0 length fragment in ip_test1()
255 printf("1.7.0 Zero length fragments (ip_off = 0x2000)\n"); in ip_test1()
256 ip->ip_id = 0; in ip_test1()
263 printf("1.7.1 Zero length fragments (ip_off = 0x3000)\n"); in ip_test1()
264 ip->ip_id = 0; in ip_test1()
271 printf("1.7.2 Zero length fragments (ip_off = 0xa000)\n"); in ip_test1()
272 ip->ip_id = 0; in ip_test1()
274 ip->ip_off = htons(0xa000); in ip_test1()
279 printf("1.7.3 Zero length fragments (ip_off = 0x0100)\n"); in ip_test1()
280 ip->ip_id = 0; in ip_test1()
282 ip->ip_off = htons(0x0100); in ip_test1()
294 * Part8.1: 63k packet + 1k fragment at offset 0x1ffe in ip_test1()
303 printf("1.8.1 63k packet + 1k fragment at offset 0x1ffe\n"); in ip_test1()
325 * Part8.2: 63k packet + 1k fragment at offset 0x1ffe in ip_test1()
334 printf("1.8.2 63k packet + 1k fragment at offset 0x1ffe\n"); in ip_test1()
336 if ((rand() & 0x1f) != 0) { in ip_test1()
340 printf("skip 0\n"); in ip_test1()
346 if ((rand() & 0x1f) != 0) { in ip_test1()
356 if ((rand() & 0x1f) != 0) { in ip_test1()
397 ip->ip_off = 0; in ip_test1()
400 * Part9: off & 0x8000 == 0x8000 in ip_test1()
402 ip->ip_id = 0; in ip_test1()
403 ip->ip_off = htons(0x8000); in ip_test1()
404 printf("1.9. ip_off & 0x8000 == 0x8000\n"); in ip_test1()
410 ip->ip_off = 0; in ip_test1()
416 ip->ip_id = 0; in ip_test1()
418 printf("1.10.0 ip_ttl = 255\n"); in ip_test1()
429 ip->ip_ttl = 0; in ip_test1()
430 printf("1.10.2 ip_ttl = 0\n"); in ip_test1()
484 * Test 2: options have length = 0
486 printf("2.2.1 option length = 0, RR\n");
488 s[IPOPT_OLEN] = 0;
493 printf("2.2.2 option length = 0, TS\n");
495 s[IPOPT_OLEN] = 0;
500 printf("2.2.3 option length = 0, SECURITY\n");
502 s[IPOPT_OLEN] = 0;
507 printf("2.2.4 option length = 0, LSRR\n");
509 s[IPOPT_OLEN] = 0;
514 printf("2.2.5 option length = 0, SATID\n");
516 s[IPOPT_OLEN] = 0;
521 printf("2.2.6 option length = 0, SSRR\n");
523 s[IPOPT_OLEN] = 0;
539 static int ict1[10] = { 8, 9, 10, 13, 14, 15, 16, 17, 18, 0 }; in ip_test3()
540 static int ict2[8] = { 3, 9, 10, 13, 14, 17, 18, 0 }; in ip_test3()
551 ip->ip_tos = 0; in ip_test3()
552 ip->ip_off = 0; in ip_test3()
555 ip->ip_sum = 0; in ip_test3()
565 * Type 0 - 31, 255, code = 0 in ip_test3()
568 for (i = 0; i < 32; i++) { in ip_test3()
572 printf("3.1.%d ICMP type %d code 0 (all 0's)\r", i, i); in ip_test3()
577 printf("3.1.%d ICMP type %d code 0 (all 0's)\r", i, 255); in ip_test3()
583 * Type 3, code = 0 - 31 in ip_test3()
586 for (i = 0; i < 32; i++) { in ip_test3()
590 printf("3.2.%d ICMP type 3 code %d (all 0's)\r", i, i); in ip_test3()
596 * Type 4, code = 0,127,128,255 in ip_test3()
599 icp->icmp_code = 0; in ip_test3()
602 printf("3.3.1 ICMP type 4 code 0 (all 0's)\r"); in ip_test3()
606 printf("3.3.2 ICMP type 4 code 127 (all 0's)\r"); in ip_test3()
610 printf("3.3.3 ICMP type 4 code 128 (all 0's)\r"); in ip_test3()
614 printf("3.3.4 ICMP type 4 code 255 (all 0's)\r"); in ip_test3()
619 * Type 5, code = 0,127,128,255 in ip_test3()
622 icp->icmp_code = 0; in ip_test3()
625 printf("3.4.1 ICMP type 5 code 0 (all 0's)\r"); in ip_test3()
629 printf("3.4.2 ICMP type 5 code 127 (all 0's)\r"); in ip_test3()
633 printf("3.4.3 ICMP type 5 code 128 (all 0's)\r"); in ip_test3()
637 printf("3.4.4 ICMP type 5 code 255 (all 0's)\r"); in ip_test3()
642 * Type 8-10;13-18, code - 0,127,128,255 in ip_test3()
644 for (i = 0; ict1[i]; i++) { in ip_test3()
646 icp->icmp_code = 0; in ip_test3()
649 printf("3.5.%d ICMP type 5 code 0 (all 0's)\r", in ip_test3()
654 printf("3.5.%d ICMP type 5 code 127 (all 0's)\r", in ip_test3()
659 printf("3.5.%d ICMP type 5 code 128 (all 0's)\r", in ip_test3()
664 printf("3.5.%d ICMP type 5 code 255 (all 0's)\r", in ip_test3()
672 * Type 12, code - 0,127,128,129,255 in ip_test3()
675 icp->icmp_code = 0; in ip_test3()
678 printf("3.6.1 ICMP type 12 code 0 (all 0's)\r"); in ip_test3()
682 printf("3.6.2 ICMP type 12 code 127 (all 0's)\r"); in ip_test3()
686 printf("3.6.3 ICMP type 12 code 128 (all 0's)\r"); in ip_test3()
690 printf("3.6.4 ICMP type 12 code 129 (all 0's)\r"); in ip_test3()
694 printf("3.6.5 ICMP type 12 code 255 (all 0's)\r"); in ip_test3()
703 for (i = 0; ict2[i]; i++) { in ip_test3()
705 icp->icmp_code = 0; in ip_test3()
708 printf("3.5.%d ICMP type %d code 0 (all 0's)\r", in ip_test3()
713 printf("3.5.%d ICMP type %d code 127 (all 0's)\r", in ip_test3()
718 printf("3.5.%d ICMP type %d code 128 (all 0's)\r", in ip_test3()
723 printf("3.5.%d ICMP type %d code 127 (all 0's)\r", in ip_test3()
747 ip->ip_tos = 0; in ip_test4()
748 ip->ip_off = 0; in ip_test4()
751 ip->ip_sum = 0; in ip_test4()
797 * Test 3: sport = 0, sport = 1, sport = 32767 in ip_test4()
802 printf("4.3.1 UDP sport = 0\n"); in ip_test4()
803 u->uh_sport = 0; in ip_test4()
805 printf("0\n"); in ip_test4()
837 * Test 4: dport = 0, dport = 1, dport = 32767 in ip_test4()
843 printf("4.4.1 UDP dport = 0\n"); in ip_test4()
844 u->uh_dport = 0; in ip_test4()
846 printf("0\n"); in ip_test4()
906 TCP_OFF_A(t, 0); in ip_test5()
910 t->th_urp = 0; in ip_test5()
911 t->th_sum = 0; in ip_test5()
913 t->th_ack = 0; in ip_test5()
922 * Test 1: flags variations, 0 - 1ff in ip_test5()
926 for (i = 0; i <= TH_FLAGS; i++) { in ip_test5()
939 * Test 2: seq = 0, seq = 1, seq = 0x7fffffff, seq=0x80000000, in ip_test5()
940 * seq = 0xa000000, seq = 0xffffffff in ip_test5()
942 printf("5.2.1 TCP seq = 0\n"); in ip_test5()
943 t->th_seq = htonl(0); in ip_test5()
954 printf("5.2.3 TCP seq = 0x7fffffff\n"); in ip_test5()
955 t->th_seq = htonl(0x7fffffff); in ip_test5()
960 printf("5.2.4 TCP seq = 0x80000000\n"); in ip_test5()
961 t->th_seq = htonl(0x80000000); in ip_test5()
966 printf("5.2.5 TCP seq = 0xc0000000\n"); in ip_test5()
967 t->th_seq = htonl(0xc0000000); in ip_test5()
972 printf("5.2.6 TCP seq = 0xffffffff\n"); in ip_test5()
973 t->th_seq = htonl(0xffffffff); in ip_test5()
982 * Test 3: ack = 0, ack = 1, ack = 0x7fffffff, ack = 0x8000000 in ip_test5()
983 * ack = 0xa000000, ack = 0xffffffff in ip_test5()
985 printf("5.3.1 TCP ack = 0\n"); in ip_test5()
986 t->th_ack = 0; in ip_test5()
997 printf("5.3.3 TCP ack = 0x7fffffff\n"); in ip_test5()
998 t->th_ack = htonl(0x7fffffff); in ip_test5()
1003 printf("5.3.4 TCP ack = 0x80000000\n"); in ip_test5()
1004 t->th_ack = htonl(0x80000000); in ip_test5()
1009 printf("5.3.5 TCP ack = 0xc0000000\n"); in ip_test5()
1010 t->th_ack = htonl(0xc0000000); in ip_test5()
1015 printf("5.3.6 TCP ack = 0xffffffff\n"); in ip_test5()
1016 t->th_ack = htonl(0xffffffff); in ip_test5()
1025 * Test 4: win = 0, win = 32768, win = 65535 in ip_test5()
1027 printf("5.4.1 TCP win = 0\n"); in ip_test5()
1028 t->th_seq = htonl(0); in ip_test5()
1034 t->th_seq = htonl(0x7fff); in ip_test5()
1040 t->th_win = htons(0xffff); in ip_test5()
1058 fd = socket(AF_INET, SOCK_STREAM, 0); in ip_test5()
1102 t->th_urp = htons(0x7fff); in ip_test5()
1105 t->th_urp = htons(0x8000); in ip_test5()
1108 t->th_urp = htons(0xffff); in ip_test5()
1111 t->th_urp = 0; in ip_test5()
1118 * Test 6: data offset, off = 0, off is inside, off is outside in ip_test5()
1139 TCP_OFF_A(t, 0); in ip_test5()
1144 * Test 7: sport = 0, sport = 1, sport = 32767 in ip_test5()
1147 printf("5.7.1 TCP sport = 0\n"); in ip_test5()
1148 t->th_sport = 0; in ip_test5()
1182 * Test 8: dport = 0, dport = 1, dport = 32767 in ip_test5()
1185 printf("5.8.1 TCP dport = 0\n"); in ip_test5()
1186 t->th_dport = 0; in ip_test5()
1230 /* 0 length options, etc */ in ip_test5()
1248 ip->ip_tos = 0; in ip_test6()
1249 ip->ip_off = 0; in ip_test6()
1252 ip->ip_sum = 0; in ip_test6()
1256 u->uh_sum = 0; in ip_test6()
1267 for (i = 0; i < 128; i++) { in ip_test6()
1275 printf("%d %d\r", i, 0); in ip_test6()
1284 printf("%d %d\r", i, 0); in ip_test6()
1336 for (i = 0; i < 512; i++) { in ip_test7()
1337 for (s = (u_char *)pip, j = 0; j < sizeof(tbuf); j++, s++) in ip_test7()
1338 *s = (rand() >> 13) & 0xff; in ip_test7()
1342 pip->ip_sum = 0; in ip_test7()
1343 pip->ip_len &= 0xff; in ip_test7()
1344 (void) send_ip(nfd, mtu, pip, gwip, 0); in ip_test7()
1351 for (i = 0; i < 512; i++) { in ip_test7()
1352 for (s = (u_char *)pip, j = 0; j < sizeof(tbuf); j++, s++) in ip_test7()
1353 *s = (rand() >> 13) & 0xff; in ip_test7()
1355 pip->ip_off &= htons(0xc000); in ip_test7()
1358 pip->ip_sum = 0; in ip_test7()
1359 pip->ip_len &= 0xff; in ip_test7()
1360 (void) send_ip(nfd, mtu, pip, gwip, 0); in ip_test7()