50 #define PARSE_REGEX "^([!<>]?)\\s*([^\\s]+)$"
56 static void DetectIPProtoRegisterTests(
void);
87 pcre2_match_data *match = NULL;
91 "%" PRId32
", string %s",
94 pcre2_match_data_free(match);
99 char *args[2] = { NULL, NULL };
102 for (
int i = 0; i < 2; i++) {
103 const char *str_ptr = NULL;
104 size_t pcre2_len = 0;
105 int res = pcre2_substring_get_bynumber(match, i + 1, (PCRE2_UCHAR8 **)&str_ptr, &pcre2_len);
107 SCLogError(
"pcre2_substring_get_bynumber failed");
110 args[i] = (
char *)str_ptr;
121 if (*(args[0]) !=
'\0') {
122 data->
op = *(args[0]);
126 if (!isdigit((
unsigned char)*(args[1]))) {
129 SCLogError(
"Unknown protocol name: \"%s\"", args[1]);
136 SCLogError(
"Malformed protocol number: %s", args[1]);
141 for (
int i = 0; i < 2; i++) {
143 pcre2_substring_free((PCRE2_UCHAR8 *)args[i]);
146 pcre2_match_data_free(match);
151 pcre2_match_data_free(match);
153 for (
int i = 0; i < 2; i++) {
155 pcre2_substring_free((PCRE2_UCHAR8 *)args[i]);
163 static int DetectIPProtoTypePresentForOP(
Signature *s, uint8_t op)
217 "ip_proto keyword only when we use alert ip, "
218 "in which case the _ANY flag is set on the sig "
219 "and the if condition should match.");
231 if (eq_set || gt_set || lt_set || not_set) {
233 "ipproto without any operators attached to "
234 "them in the same sig");
241 if (eq_set || gt_set) {
243 "ipproto along with a greater than ipproto in the "
247 if (!lt_set && !not_set) {
249 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
252 }
else if (lt_set && !not_set) {
254 while (temp_sm != NULL) {
258 temp_sm = temp_sm->
next;
260 if (temp_sm != NULL) {
264 "both gt and lt ipprotos, with the lt being "
265 "lower than gt value");
268 for (i = 0; i < (data->
proto / 8); i++) {
272 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
277 }
else if (!lt_set && not_set) {
278 for (i = 0; i < (data->
proto / 8); i++) {
282 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
288 while (temp_sm != NULL) {
293 temp_sm = temp_sm->
next;
295 if (temp_sm != NULL) {
299 "both gt and lt ipprotos, with the lt being "
300 "lower than gt value");
303 for (i = 0; i < (data->
proto / 8); i++) {
307 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
316 if (eq_set || lt_set) {
318 "ipproto with a less than ipproto in the "
322 if (!gt_set && !not_set) {
323 for (i = 0; i < (data->
proto / 8); i++) {
327 (uint8_t)(~(0xff << (data->
proto % 8)));
328 }
else if (gt_set && !not_set) {
330 while (temp_sm != NULL) {
334 temp_sm = temp_sm->
next;
336 if (temp_sm != NULL) {
340 "both gt and lt ipprotos, with the lt being "
341 "lower than gt value");
344 for (i = 0; i < (data->
proto / 8); i++) {
348 for (i = (data->
proto / 8) + 1; i < 256 / 8; i++) {
353 }
else if (!gt_set && not_set) {
354 for (i = 0; i < (data->
proto / 8); i++) {
358 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
364 while (temp_sm != NULL) {
369 temp_sm = temp_sm->
next;
371 if (temp_sm != NULL) {
375 "both gt and lt ipprotos, with the lt being "
376 "lower than gt value");
379 for (i = 0; i < (data->
proto / 8); i++) {
383 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
394 "ipproto along with a not ipproto in the "
398 if (!gt_set && !lt_set && !not_set) {
399 for (i = 0; i < (data->
proto / 8); i++) {
403 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
407 for (i = 0; i < (data->
proto / 8); i++) {
411 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
428 DetectIPProtoFree(
de_ctx, data);
463 static int DetectIPProtoTestParse01(
void)
473 static int DetectIPProtoTestParse02(
void)
483 static int DetectIPProtoTestSetup01(
void)
485 const char *value_str =
"14";
495 DetectIPProtoSetup(NULL, sig, value_str);
496 for (i = 0; i < (value / 8); i++) {
500 for (i = (value / 8) + 1; i < (256 / 8); i++) {
510 static int DetectIPProtoTestSetup02(
void)
514 const char *value_str =
"tcp";
515 struct protoent *pent = getprotobyname(value_str);
519 uint8_t value = (uint8_t)pent->p_proto;
527 DetectIPProtoSetup(NULL, sig, value_str);
528 for (i = 0; i < (value / 8); i++) {
535 for (i = (value / 8) + 1; i < (256 / 8); i++) {
551 static int DetectIPProtoTestSetup03(
void)
555 const char *value_str =
"<14";
564 DetectIPProtoSetup(NULL, sig, value_str);
565 for (i = 0; i < (value / 8); i++) {
572 for (i = (value / 8) + 1; i < (256 / 8); i++) {
587 static int DetectIPProtoTestSetup04(
void)
591 const char *value_str =
">14";
600 DetectIPProtoSetup(NULL, sig, value_str);
601 for (i = 0; i < (value / 8); i++) {
608 for (i = (value / 8) + 1; i < (256 / 8); i++) {
623 static int DetectIPProtoTestSetup05(
void)
627 const char *value_str =
"!14";
636 DetectIPProtoSetup(NULL, sig, value_str);
637 for (i = 0; i < (value / 8); i++) {
644 for (i = (value / 8) + 1; i < (256 / 8); i++) {
659 static int DetectIPProtoTestSetup06(
void)
663 const char *value1_str =
"14";
664 const char *value2_str =
"15";
671 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
673 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
686 static int DetectIPProtoTestSetup07(
void)
690 const char *value1_str =
"14";
691 const char *value2_str =
"<15";
698 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
700 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
713 static int DetectIPProtoTestSetup08(
void)
717 const char *value1_str =
"14";
718 const char *value2_str =
">15";
725 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
727 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
740 static int DetectIPProtoTestSetup09(
void)
744 const char *value1_str =
"14";
745 const char *value2_str =
"!15";
752 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
754 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
767 static int DetectIPProtoTestSetup10(
void)
771 const char *value1_str =
">14";
772 const char *value2_str =
"15";
779 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
781 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
794 static int DetectIPProtoTestSetup11(
void)
798 const char *value1_str =
"<14";
799 const char *value2_str =
"15";
806 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
808 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
821 static int DetectIPProtoTestSetup12(
void)
825 const char *value1_str =
"!14";
826 const char *value2_str =
"15";
833 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
835 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
848 static int DetectIPProtoTestSetup13(
void)
852 const char *value1_str =
">14";
853 const char *value2_str =
">15";
860 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
862 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
872 static int DetectIPProtoTestSetup14(
void)
876 const char *value1_str =
"<14";
877 const char *value2_str =
"<15";
884 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
886 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
896 static int DetectIPProtoTestSetup15(
void)
900 const char *value1_str =
"<14";
902 const char *value2_str =
">34";
910 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
912 for (i = 0; i < (value1 / 8); i++) {
919 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
923 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
933 static int DetectIPProtoTestSetup16(
void)
937 const char *value1_str =
"<14";
938 const char *value2_str =
">34";
947 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
949 for (i = 0; i < (value2 / 8); i++) {
956 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
960 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
970 static int DetectIPProtoTestSetup17(
void)
974 const char *value1_str =
"<11";
976 const char *value2_str =
">13";
984 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
986 for (i = 0; i < (value1 / 8); i++) {
993 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
997 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1007 static int DetectIPProtoTestSetup18(
void)
1011 const char *value1_str =
"<11";
1012 const char *value2_str =
">13";
1021 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1023 for (i = 0; i < (value2 / 8); i++) {
1030 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1034 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1044 static int DetectIPProtoTestSetup19(
void)
1048 const char *value1_str =
"<11";
1050 const char *value2_str =
"!13";
1051 const char *value3_str =
">36";
1059 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1061 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1063 for (i = 0; i < (value1 / 8); i++) {
1070 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1074 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1084 static int DetectIPProtoTestSetup20(
void)
1088 const char *value1_str =
"<11";
1090 const char *value3_str =
">36";
1098 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1100 for (i = 0; i < (value1 / 8); i++) {
1107 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1111 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1121 static int DetectIPProtoTestSetup21(
void)
1125 const char *value1_str =
"<11";
1127 const char *value2_str =
"!13";
1128 const char *value3_str =
">36";
1136 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1138 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1140 for (i = 0; i < (value1 / 8); i++) {
1147 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1151 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1161 static int DetectIPProtoTestSetup22(
void)
1165 const char *value1_str =
"<11";
1166 const char *value2_str =
"!13";
1167 const char *value3_str =
">36";
1176 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1178 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1180 for (i = 0; i < (value3 / 8); i++) {
1187 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1191 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1201 static int DetectIPProtoTestSetup23(
void)
1205 const char *value1_str =
"<11";
1206 const char *value3_str =
">36";
1215 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1217 for (i = 0; i < (value3 / 8); i++) {
1224 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1228 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1238 static int DetectIPProtoTestSetup24(
void)
1242 const char *value1_str =
"<11";
1243 const char *value2_str =
"!13";
1244 const char *value3_str =
">36";
1253 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1255 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1257 for (i = 0; i < (value3 / 8); i++) {
1264 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1268 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1278 static int DetectIPProtoTestSetup33(
void)
1282 const char *value1_str =
"<11";
1284 const char *value2_str =
"!34";
1285 const char *value3_str =
">36";
1293 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1295 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1297 for (i = 0; i < (value1 / 8); i++) {
1304 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1308 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1318 static int DetectIPProtoTestSetup34(
void)
1322 const char *value1_str =
"<11";
1324 const char *value2_str =
"!34";
1325 const char *value3_str =
">36";
1334 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1336 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1338 for (i = 0; i < (value1 / 8); i++) {
1345 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1349 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1359 static int DetectIPProtoTestSetup36(
void)
1363 const char *value1_str =
"<11";
1364 const char *value2_str =
"!34";
1365 const char *value3_str =
">36";
1374 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1376 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1378 for (i = 0; i < (value3 / 8); i++) {
1385 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1389 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1399 static int DetectIPProtoTestSetup43(
void)
1403 const char *value1_str =
"!4";
1405 const char *value2_str =
"<13";
1407 const char *value3_str =
">34";
1415 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1417 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1422 for (i = (value1 / 8) + 1; i < (value2 / 8); i++) {
1429 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1433 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1443 static int DetectIPProtoTestSetup44(
void)
1447 const char *value1_str =
"!4";
1448 const char *value2_str =
"<13";
1449 const char *value3_str =
">34";
1458 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1460 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1462 for (i = 0; i < (value3 / 8); i++) {
1469 for (i = (value3 / 8) + 1; i < 256 / 8; i++) {
1473 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1483 static int DetectIPProtoTestSetup45(
void)
1487 const char *value1_str =
"!4";
1489 const char *value2_str =
"<13";
1491 const char *value3_str =
">34";
1499 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1501 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1506 for (i = (value1 / 8) + 1; i < (value2 / 8); i++) {
1513 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1517 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1527 static int DetectIPProtoTestSetup56(
void)
1531 const char *value1_str =
"<13";
1533 const char *value2_str =
">34";
1534 const char *value3_str =
"!37";
1542 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1544 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1546 for (i = 0; i < (value1 / 8); i++) {
1553 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1557 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1567 static int DetectIPProtoTestSetup75(
void)
1571 const char *value1_str =
"!8";
1572 const char *value2_str =
">10";
1581 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1583 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1585 for (i = 0; i < (value2 / 8); i++) {
1592 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1604 static int DetectIPProtoTestSetup76(
void)
1608 const char *value1_str =
"!8";
1609 const char *value2_str =
">10";
1618 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1620 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1622 for (i = 0; i < (value2 / 8); i++) {
1629 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1641 static int DetectIPProtoTestSetup129(
void)
1645 const char *value1_str =
"<10";
1647 const char *value2_str =
">10";
1655 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1657 for (i = 0; i < (value1 / 8); i++) {
1664 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1668 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1678 static int DetectIPProtoTestSetup130(
void)
1682 const char *value1_str =
"<10";
1683 const char *value2_str =
">10";
1692 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1694 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1696 for (i = 0; i < (value2 / 8); i++) {
1703 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1715 static int DetectIPProtoTestSetup131(
void)
1719 const char *value1_str =
"<10";
1721 const char *value2_str =
"!10";
1729 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1731 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1733 for (i = 0; i < (value1 / 8); i++) {
1740 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1752 static int DetectIPProtoTestSetup132(
void)
1756 const char *value1_str =
"<10";
1758 const char *value2_str =
"!10";
1766 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1768 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1770 for (i = 0; i < (value1 / 8); i++) {
1777 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1789 static int DetectIPProtoTestSetup145(
void)
1793 const char *value1_str =
"!4";
1794 const char *value2_str =
">8";
1795 const char *value3_str =
"!10";
1796 const char *value4_str =
"!14";
1797 const char *value5_str =
"!27";
1798 const char *value6_str =
"!29";
1799 const char *value7_str =
"!30";
1800 const char *value8_str =
"!34";
1801 const char *value9_str =
"<36";
1802 const char *value10_str =
"!38";
1812 if (DetectIPProtoSetup(NULL, sig, value5_str) != 0)
1814 if (DetectIPProtoSetup(NULL, sig, value8_str) != 0)
1816 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1818 if (DetectIPProtoSetup(NULL, sig, value10_str) != 0)
1820 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1822 if (DetectIPProtoSetup(NULL, sig, value6_str) != 0)
1824 if (DetectIPProtoSetup(NULL, sig, value9_str) != 0)
1826 if (DetectIPProtoSetup(NULL, sig, value4_str) != 0)
1828 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1830 if (DetectIPProtoSetup(NULL, sig, value7_str) != 0)
1847 for (i = (value10 / 8) + 1; i < 256 / 8; i++) {
1859 static int DetectIPProtoTestSig1(
void)
1862 uint8_t *buf = (uint8_t *)
1863 "GET /one/ HTTP/1.1\r\n"
1864 "Host: one.example.org\r\n"
1866 uint16_t buflen = strlen((
char *)buf);
1871 const char *sigs[4];
1872 sigs[0] =
"alert ip any any -> any any "
1873 "(msg:\"Not tcp\"; ip_proto:!tcp; content:\"GET \"; sid:1;)";
1874 sigs[1] =
"alert ip any any -> any any "
1875 "(msg:\"Less than 7\"; content:\"GET \"; ip_proto:<7; sid:2;)";
1876 sigs[2] =
"alert ip any any -> any any "
1877 "(msg:\"Greater than 5\"; content:\"GET \"; ip_proto:>5; sid:3;)";
1878 sigs[3] =
"alert ip any any -> any any "
1879 "(msg:\"Equals tcp\"; content:\"GET \"; ip_proto:tcp; sid:4;)";
1882 uint32_t sid[4] = {1, 2, 3, 4};
1884 uint32_t results[4] = {0, 1, 1, 1};
1899 static int DetectIPProtoTestSig2(
void)
1901 uint8_t raw_eth[] = {
1902 0x01, 0x00, 0x5e, 0x00, 0x00, 0x0d, 0x00, 0x26,
1903 0x88, 0x61, 0x3a, 0x80, 0x08, 0x00, 0x45, 0xc0,
1904 0x00, 0x36, 0xe4, 0xcd, 0x00, 0x00, 0x01, 0x67,
1905 0xc7, 0xab, 0xac, 0x1c, 0x7f, 0xfe, 0xe0, 0x00,
1906 0x00, 0x0d, 0x20, 0x00, 0x90, 0x20, 0x00, 0x01,
1907 0x00, 0x02, 0x00, 0x69, 0x00, 0x02, 0x00, 0x04,
1908 0x81, 0xf4, 0x07, 0xd0, 0x00, 0x13, 0x00, 0x04,
1909 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x04,
1910 0x4a, 0xea, 0x7a, 0x8e,
1934 "alert ip any any -> any any (msg:\"Check ipproto usage\"; "
1935 "ip_proto:!103; sid:1;)");
1952 static int DetectIPProtoTestSig3(
void)
1954 uint8_t raw_eth[] = {
1955 0x01, 0x00, 0x5e, 0x00, 0x00, 0x0d, 0x00, 0x26,
1956 0x88, 0x61, 0x3a, 0x80, 0x08, 0x00, 0x45, 0xc0,
1957 0x00, 0x36, 0xe4, 0xcd, 0x00, 0x00, 0x01, 0x67,
1958 0xc7, 0xab, 0xac, 0x1c, 0x7f, 0xfe, 0xe0, 0x00,
1959 0x00, 0x0d, 0x20, 0x00, 0x90, 0x20, 0x00, 0x01,
1960 0x00, 0x02, 0x00, 0x69, 0x00, 0x02, 0x00, 0x04,
1961 0x81, 0xf4, 0x07, 0xd0, 0x00, 0x13, 0x00, 0x04,
1962 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x04,
1963 0x4a, 0xea, 0x7a, 0x8e,
1987 "alert ip any any -> any any (msg:\"Check ipproto usage\"; "
1988 "ip_proto:103; sid:1;)");
2009 static void DetectIPProtoRegisterTests(
void)
2011 UtRegisterTest(
"DetectIPProtoTestParse01", DetectIPProtoTestParse01);
2012 UtRegisterTest(
"DetectIPProtoTestParse02", DetectIPProtoTestParse02);
2013 UtRegisterTest(
"DetectIPProtoTestSetup01", DetectIPProtoTestSetup01);
2014 UtRegisterTest(
"DetectIPProtoTestSetup02", DetectIPProtoTestSetup02);
2015 UtRegisterTest(
"DetectIPProtoTestSetup03", DetectIPProtoTestSetup03);
2016 UtRegisterTest(
"DetectIPProtoTestSetup04", DetectIPProtoTestSetup04);
2017 UtRegisterTest(
"DetectIPProtoTestSetup05", DetectIPProtoTestSetup05);
2018 UtRegisterTest(
"DetectIPProtoTestSetup06", DetectIPProtoTestSetup06);
2019 UtRegisterTest(
"DetectIPProtoTestSetup07", DetectIPProtoTestSetup07);
2020 UtRegisterTest(
"DetectIPProtoTestSetup08", DetectIPProtoTestSetup08);
2021 UtRegisterTest(
"DetectIPProtoTestSetup09", DetectIPProtoTestSetup09);
2022 UtRegisterTest(
"DetectIPProtoTestSetup10", DetectIPProtoTestSetup10);
2023 UtRegisterTest(
"DetectIPProtoTestSetup11", DetectIPProtoTestSetup11);
2024 UtRegisterTest(
"DetectIPProtoTestSetup12", DetectIPProtoTestSetup12);
2025 UtRegisterTest(
"DetectIPProtoTestSetup13", DetectIPProtoTestSetup13);
2026 UtRegisterTest(
"DetectIPProtoTestSetup14", DetectIPProtoTestSetup14);
2027 UtRegisterTest(
"DetectIPProtoTestSetup15", DetectIPProtoTestSetup15);
2028 UtRegisterTest(
"DetectIPProtoTestSetup16", DetectIPProtoTestSetup16);
2029 UtRegisterTest(
"DetectIPProtoTestSetup17", DetectIPProtoTestSetup17);
2030 UtRegisterTest(
"DetectIPProtoTestSetup18", DetectIPProtoTestSetup18);
2031 UtRegisterTest(
"DetectIPProtoTestSetup19", DetectIPProtoTestSetup19);
2032 UtRegisterTest(
"DetectIPProtoTestSetup20", DetectIPProtoTestSetup20);
2033 UtRegisterTest(
"DetectIPProtoTestSetup21", DetectIPProtoTestSetup21);
2034 UtRegisterTest(
"DetectIPProtoTestSetup22", DetectIPProtoTestSetup22);
2035 UtRegisterTest(
"DetectIPProtoTestSetup23", DetectIPProtoTestSetup23);
2036 UtRegisterTest(
"DetectIPProtoTestSetup24", DetectIPProtoTestSetup24);
2037 UtRegisterTest(
"DetectIPProtoTestSetup33", DetectIPProtoTestSetup33);
2038 UtRegisterTest(
"DetectIPProtoTestSetup34", DetectIPProtoTestSetup34);
2039 UtRegisterTest(
"DetectIPProtoTestSetup36", DetectIPProtoTestSetup36);
2040 UtRegisterTest(
"DetectIPProtoTestSetup43", DetectIPProtoTestSetup43);
2041 UtRegisterTest(
"DetectIPProtoTestSetup44", DetectIPProtoTestSetup44);
2042 UtRegisterTest(
"DetectIPProtoTestSetup45", DetectIPProtoTestSetup45);
2043 UtRegisterTest(
"DetectIPProtoTestSetup56", DetectIPProtoTestSetup56);
2044 UtRegisterTest(
"DetectIPProtoTestSetup75", DetectIPProtoTestSetup75);
2045 UtRegisterTest(
"DetectIPProtoTestSetup76", DetectIPProtoTestSetup76);
2046 UtRegisterTest(
"DetectIPProtoTestSetup129", DetectIPProtoTestSetup129);
2047 UtRegisterTest(
"DetectIPProtoTestSetup130", DetectIPProtoTestSetup130);
2048 UtRegisterTest(
"DetectIPProtoTestSetup131", DetectIPProtoTestSetup131);
2049 UtRegisterTest(
"DetectIPProtoTestSetup132", DetectIPProtoTestSetup132);
2050 UtRegisterTest(
"DetectIPProtoTestSetup145", DetectIPProtoTestSetup145);