49 #define PARSE_REGEX "^([!<>]?)\\s*([^\\s]+)$"
55 static void DetectIPProtoRegisterTests(
void);
86 pcre2_match_data *match = NULL;
90 "%" PRId32
", string %s",
93 pcre2_match_data_free(match);
98 char *args[2] = { NULL, NULL };
101 for (
int i = 0; i < 2; i++) {
102 const char *str_ptr = NULL;
103 size_t pcre2_len = 0;
104 int res = pcre2_substring_get_bynumber(match, i + 1, (PCRE2_UCHAR8 **)&str_ptr, &pcre2_len);
106 SCLogError(
"pcre2_substring_get_bynumber failed");
109 args[i] = (
char *)str_ptr;
120 if (*(args[0]) !=
'\0') {
121 data->
op = *(args[0]);
125 if (!isdigit((
unsigned char)*(args[1]))) {
128 SCLogError(
"Unknown protocol name: \"%s\"", args[1]);
135 SCLogError(
"Malformed protocol number: %s", args[1]);
140 for (
int i = 0; i < 2; i++) {
142 pcre2_substring_free((PCRE2_UCHAR8 *)args[i]);
145 pcre2_match_data_free(match);
150 pcre2_match_data_free(match);
152 for (
int i = 0; i < 2; i++) {
154 pcre2_substring_free((PCRE2_UCHAR8 *)args[i]);
162 static int DetectIPProtoTypePresentForOP(
Signature *s, uint8_t op)
212 "ip_proto keyword only when we use alert ip, "
213 "in which case the _ANY flag is set on the sig "
214 "and the if condition should match.");
226 if (eq_set || gt_set || lt_set || not_set) {
228 "ipproto without any operators attached to "
229 "them in the same sig");
236 if (eq_set || gt_set) {
238 "ipproto along with a greater than ipproto in the "
242 if (!lt_set && !not_set) {
244 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
247 }
else if (lt_set && !not_set) {
249 while (temp_sm != NULL) {
253 temp_sm = temp_sm->
next;
255 if (temp_sm != NULL) {
259 "both gt and lt ipprotos, with the lt being "
260 "lower than gt value");
263 for (i = 0; i < (data->
proto / 8); i++) {
267 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
272 }
else if (!lt_set && not_set) {
273 for (i = 0; i < (data->
proto / 8); i++) {
277 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
283 while (temp_sm != NULL) {
288 temp_sm = temp_sm->
next;
290 if (temp_sm != NULL) {
294 "both gt and lt ipprotos, with the lt being "
295 "lower than gt value");
298 for (i = 0; i < (data->
proto / 8); i++) {
302 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
311 if (eq_set || lt_set) {
313 "ipproto with a less than ipproto in the "
317 if (!gt_set && !not_set) {
318 for (i = 0; i < (data->
proto / 8); i++) {
322 (uint8_t)(~(0xff << (data->
proto % 8)));
323 }
else if (gt_set && !not_set) {
325 while (temp_sm != NULL) {
329 temp_sm = temp_sm->
next;
331 if (temp_sm != NULL) {
335 "both gt and lt ipprotos, with the lt being "
336 "lower than gt value");
339 for (i = 0; i < (data->
proto / 8); i++) {
343 for (i = (data->
proto / 8) + 1; i < 256 / 8; i++) {
348 }
else if (!gt_set && not_set) {
349 for (i = 0; i < (data->
proto / 8); i++) {
353 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
359 while (temp_sm != NULL) {
364 temp_sm = temp_sm->
next;
366 if (temp_sm != NULL) {
370 "both gt and lt ipprotos, with the lt being "
371 "lower than gt value");
374 for (i = 0; i < (data->
proto / 8); i++) {
378 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
389 "ipproto along with a not ipproto in the "
393 if (!gt_set && !lt_set && !not_set) {
394 for (i = 0; i < (data->
proto / 8); i++) {
398 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
402 for (i = 0; i < (data->
proto / 8); i++) {
406 for (i = (data->
proto / 8) + 1; i < (256 / 8); i++) {
423 DetectIPProtoFree(
de_ctx, data);
458 static int DetectIPProtoTestParse01(
void)
468 static int DetectIPProtoTestParse02(
void)
478 static int DetectIPProtoTestSetup01(
void)
480 const char *value_str =
"14";
490 DetectIPProtoSetup(NULL, sig, value_str);
491 for (i = 0; i < (value / 8); i++) {
495 for (i = (value / 8) + 1; i < (256 / 8); i++) {
505 static int DetectIPProtoTestSetup02(
void)
509 const char *value_str =
"tcp";
510 struct protoent *pent = getprotobyname(value_str);
514 uint8_t value = (uint8_t)pent->p_proto;
522 DetectIPProtoSetup(NULL, sig, value_str);
523 for (i = 0; i < (value / 8); i++) {
530 for (i = (value / 8) + 1; i < (256 / 8); i++) {
546 static int DetectIPProtoTestSetup03(
void)
550 const char *value_str =
"<14";
559 DetectIPProtoSetup(NULL, sig, value_str);
560 for (i = 0; i < (value / 8); i++) {
567 for (i = (value / 8) + 1; i < (256 / 8); i++) {
582 static int DetectIPProtoTestSetup04(
void)
586 const char *value_str =
">14";
595 DetectIPProtoSetup(NULL, sig, value_str);
596 for (i = 0; i < (value / 8); i++) {
603 for (i = (value / 8) + 1; i < (256 / 8); i++) {
618 static int DetectIPProtoTestSetup05(
void)
622 const char *value_str =
"!14";
631 DetectIPProtoSetup(NULL, sig, value_str);
632 for (i = 0; i < (value / 8); i++) {
639 for (i = (value / 8) + 1; i < (256 / 8); i++) {
654 static int DetectIPProtoTestSetup06(
void)
658 const char *value1_str =
"14";
659 const char *value2_str =
"15";
666 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
668 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
681 static int DetectIPProtoTestSetup07(
void)
685 const char *value1_str =
"14";
686 const char *value2_str =
"<15";
693 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
695 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
708 static int DetectIPProtoTestSetup08(
void)
712 const char *value1_str =
"14";
713 const char *value2_str =
">15";
720 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
722 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
735 static int DetectIPProtoTestSetup09(
void)
739 const char *value1_str =
"14";
740 const char *value2_str =
"!15";
747 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
749 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
762 static int DetectIPProtoTestSetup10(
void)
766 const char *value1_str =
">14";
767 const char *value2_str =
"15";
774 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
776 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
789 static int DetectIPProtoTestSetup11(
void)
793 const char *value1_str =
"<14";
794 const char *value2_str =
"15";
801 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
803 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
816 static int DetectIPProtoTestSetup12(
void)
820 const char *value1_str =
"!14";
821 const char *value2_str =
"15";
828 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
830 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
843 static int DetectIPProtoTestSetup13(
void)
847 const char *value1_str =
">14";
848 const char *value2_str =
">15";
855 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
857 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
867 static int DetectIPProtoTestSetup14(
void)
871 const char *value1_str =
"<14";
872 const char *value2_str =
"<15";
879 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
881 if (DetectIPProtoSetup(NULL, sig, value2_str) != -1)
891 static int DetectIPProtoTestSetup15(
void)
895 const char *value1_str =
"<14";
897 const char *value2_str =
">34";
905 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
907 for (i = 0; i < (value1 / 8); i++) {
914 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
918 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
928 static int DetectIPProtoTestSetup16(
void)
932 const char *value1_str =
"<14";
933 const char *value2_str =
">34";
942 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
944 for (i = 0; i < (value2 / 8); i++) {
951 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
955 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
965 static int DetectIPProtoTestSetup17(
void)
969 const char *value1_str =
"<11";
971 const char *value2_str =
">13";
979 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
981 for (i = 0; i < (value1 / 8); i++) {
988 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
992 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1002 static int DetectIPProtoTestSetup18(
void)
1006 const char *value1_str =
"<11";
1007 const char *value2_str =
">13";
1016 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1018 for (i = 0; i < (value2 / 8); i++) {
1025 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1029 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1039 static int DetectIPProtoTestSetup19(
void)
1043 const char *value1_str =
"<11";
1045 const char *value2_str =
"!13";
1046 const char *value3_str =
">36";
1054 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1056 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1058 for (i = 0; i < (value1 / 8); i++) {
1065 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1069 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1079 static int DetectIPProtoTestSetup20(
void)
1083 const char *value1_str =
"<11";
1085 const char *value3_str =
">36";
1093 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1095 for (i = 0; i < (value1 / 8); i++) {
1102 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1106 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1116 static int DetectIPProtoTestSetup21(
void)
1120 const char *value1_str =
"<11";
1122 const char *value2_str =
"!13";
1123 const char *value3_str =
">36";
1131 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1133 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1135 for (i = 0; i < (value1 / 8); i++) {
1142 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1146 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1156 static int DetectIPProtoTestSetup22(
void)
1160 const char *value1_str =
"<11";
1161 const char *value2_str =
"!13";
1162 const char *value3_str =
">36";
1171 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1173 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1175 for (i = 0; i < (value3 / 8); i++) {
1182 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1186 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1196 static int DetectIPProtoTestSetup23(
void)
1200 const char *value1_str =
"<11";
1201 const char *value3_str =
">36";
1210 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1212 for (i = 0; i < (value3 / 8); i++) {
1219 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1223 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1233 static int DetectIPProtoTestSetup24(
void)
1237 const char *value1_str =
"<11";
1238 const char *value2_str =
"!13";
1239 const char *value3_str =
">36";
1248 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1250 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1252 for (i = 0; i < (value3 / 8); i++) {
1259 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1263 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1273 static int DetectIPProtoTestSetup33(
void)
1277 const char *value1_str =
"<11";
1279 const char *value2_str =
"!34";
1280 const char *value3_str =
">36";
1288 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1290 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1292 for (i = 0; i < (value1 / 8); i++) {
1299 for (i = (value1 / 8) + 1; i < (256 / 8); i++) {
1303 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1313 static int DetectIPProtoTestSetup34(
void)
1317 const char *value1_str =
"<11";
1319 const char *value2_str =
"!34";
1320 const char *value3_str =
">36";
1329 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1331 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1333 for (i = 0; i < (value1 / 8); i++) {
1340 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1344 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1354 static int DetectIPProtoTestSetup36(
void)
1358 const char *value1_str =
"<11";
1359 const char *value2_str =
"!34";
1360 const char *value3_str =
">36";
1369 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1371 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1373 for (i = 0; i < (value3 / 8); i++) {
1380 for (i = (value3 / 8) + 1; i < (256 / 8); i++) {
1384 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1394 static int DetectIPProtoTestSetup43(
void)
1398 const char *value1_str =
"!4";
1400 const char *value2_str =
"<13";
1402 const char *value3_str =
">34";
1410 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1412 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1417 for (i = (value1 / 8) + 1; i < (value2 / 8); i++) {
1424 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1428 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1438 static int DetectIPProtoTestSetup44(
void)
1442 const char *value1_str =
"!4";
1443 const char *value2_str =
"<13";
1444 const char *value3_str =
">34";
1453 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1455 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1457 for (i = 0; i < (value3 / 8); i++) {
1464 for (i = (value3 / 8) + 1; i < 256 / 8; i++) {
1468 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1478 static int DetectIPProtoTestSetup45(
void)
1482 const char *value1_str =
"!4";
1484 const char *value2_str =
"<13";
1486 const char *value3_str =
">34";
1494 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1496 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1501 for (i = (value1 / 8) + 1; i < (value2 / 8); i++) {
1508 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1512 if (DetectIPProtoSetup(NULL, sig, value3_str) == 0)
1522 static int DetectIPProtoTestSetup56(
void)
1526 const char *value1_str =
"<13";
1528 const char *value2_str =
">34";
1529 const char *value3_str =
"!37";
1537 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1539 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1541 for (i = 0; i < (value1 / 8); i++) {
1548 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1552 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1562 static int DetectIPProtoTestSetup75(
void)
1566 const char *value1_str =
"!8";
1567 const char *value2_str =
">10";
1576 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1578 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1580 for (i = 0; i < (value2 / 8); i++) {
1587 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1599 static int DetectIPProtoTestSetup76(
void)
1603 const char *value1_str =
"!8";
1604 const char *value2_str =
">10";
1613 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1615 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1617 for (i = 0; i < (value2 / 8); i++) {
1624 for (i = (value2 / 8) + 1; i < (256 / 8); i++) {
1636 static int DetectIPProtoTestSetup129(
void)
1640 const char *value1_str =
"<10";
1642 const char *value2_str =
">10";
1650 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1652 for (i = 0; i < (value1 / 8); i++) {
1659 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1663 if (DetectIPProtoSetup(NULL, sig, value2_str) == 0)
1673 static int DetectIPProtoTestSetup130(
void)
1677 const char *value1_str =
"<10";
1678 const char *value2_str =
">10";
1687 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1689 if (DetectIPProtoSetup(NULL, sig, value1_str) == 0)
1691 for (i = 0; i < (value2 / 8); i++) {
1698 for (i = (value2 / 8) + 1; i < 256 / 8; i++) {
1710 static int DetectIPProtoTestSetup131(
void)
1714 const char *value1_str =
"<10";
1716 const char *value2_str =
"!10";
1724 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1726 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1728 for (i = 0; i < (value1 / 8); i++) {
1735 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1747 static int DetectIPProtoTestSetup132(
void)
1751 const char *value1_str =
"<10";
1753 const char *value2_str =
"!10";
1761 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1763 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1765 for (i = 0; i < (value1 / 8); i++) {
1772 for (i = (value1 / 8) + 1; i < 256 / 8; i++) {
1784 static int DetectIPProtoTestSetup145(
void)
1788 const char *value1_str =
"!4";
1789 const char *value2_str =
">8";
1790 const char *value3_str =
"!10";
1791 const char *value4_str =
"!14";
1792 const char *value5_str =
"!27";
1793 const char *value6_str =
"!29";
1794 const char *value7_str =
"!30";
1795 const char *value8_str =
"!34";
1796 const char *value9_str =
"<36";
1797 const char *value10_str =
"!38";
1807 if (DetectIPProtoSetup(NULL, sig, value5_str) != 0)
1809 if (DetectIPProtoSetup(NULL, sig, value8_str) != 0)
1811 if (DetectIPProtoSetup(NULL, sig, value2_str) != 0)
1813 if (DetectIPProtoSetup(NULL, sig, value10_str) != 0)
1815 if (DetectIPProtoSetup(NULL, sig, value1_str) != 0)
1817 if (DetectIPProtoSetup(NULL, sig, value6_str) != 0)
1819 if (DetectIPProtoSetup(NULL, sig, value9_str) != 0)
1821 if (DetectIPProtoSetup(NULL, sig, value4_str) != 0)
1823 if (DetectIPProtoSetup(NULL, sig, value3_str) != 0)
1825 if (DetectIPProtoSetup(NULL, sig, value7_str) != 0)
1842 for (i = (value10 / 8) + 1; i < 256 / 8; i++) {
1854 static int DetectIPProtoTestSig1(
void)
1857 uint8_t *buf = (uint8_t *)
1858 "GET /one/ HTTP/1.1\r\n"
1859 "Host: one.example.org\r\n"
1861 uint16_t buflen = strlen((
char *)buf);
1866 const char *sigs[4];
1867 sigs[0] =
"alert ip any any -> any any "
1868 "(msg:\"Not tcp\"; ip_proto:!tcp; content:\"GET \"; sid:1;)";
1869 sigs[1] =
"alert ip any any -> any any "
1870 "(msg:\"Less than 7\"; content:\"GET \"; ip_proto:<7; sid:2;)";
1871 sigs[2] =
"alert ip any any -> any any "
1872 "(msg:\"Greater than 5\"; content:\"GET \"; ip_proto:>5; sid:3;)";
1873 sigs[3] =
"alert ip any any -> any any "
1874 "(msg:\"Equals tcp\"; content:\"GET \"; ip_proto:tcp; sid:4;)";
1877 uint32_t sid[4] = {1, 2, 3, 4};
1879 uint32_t results[4] = {0, 1, 1, 1};
1894 static int DetectIPProtoTestSig2(
void)
1896 uint8_t raw_eth[] = {
1897 0x01, 0x00, 0x5e, 0x00, 0x00, 0x0d, 0x00, 0x26,
1898 0x88, 0x61, 0x3a, 0x80, 0x08, 0x00, 0x45, 0xc0,
1899 0x00, 0x36, 0xe4, 0xcd, 0x00, 0x00, 0x01, 0x67,
1900 0xc7, 0xab, 0xac, 0x1c, 0x7f, 0xfe, 0xe0, 0x00,
1901 0x00, 0x0d, 0x20, 0x00, 0x90, 0x20, 0x00, 0x01,
1902 0x00, 0x02, 0x00, 0x69, 0x00, 0x02, 0x00, 0x04,
1903 0x81, 0xf4, 0x07, 0xd0, 0x00, 0x13, 0x00, 0x04,
1904 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x04,
1905 0x4a, 0xea, 0x7a, 0x8e,
1929 "alert ip any any -> any any (msg:\"Check ipproto usage\"; "
1930 "ip_proto:!103; sid:1;)");
1947 static int DetectIPProtoTestSig3(
void)
1949 uint8_t raw_eth[] = {
1950 0x01, 0x00, 0x5e, 0x00, 0x00, 0x0d, 0x00, 0x26,
1951 0x88, 0x61, 0x3a, 0x80, 0x08, 0x00, 0x45, 0xc0,
1952 0x00, 0x36, 0xe4, 0xcd, 0x00, 0x00, 0x01, 0x67,
1953 0xc7, 0xab, 0xac, 0x1c, 0x7f, 0xfe, 0xe0, 0x00,
1954 0x00, 0x0d, 0x20, 0x00, 0x90, 0x20, 0x00, 0x01,
1955 0x00, 0x02, 0x00, 0x69, 0x00, 0x02, 0x00, 0x04,
1956 0x81, 0xf4, 0x07, 0xd0, 0x00, 0x13, 0x00, 0x04,
1957 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x04,
1958 0x4a, 0xea, 0x7a, 0x8e,
1982 "alert ip any any -> any any (msg:\"Check ipproto usage\"; "
1983 "ip_proto:103; sid:1;)");
2004 static void DetectIPProtoRegisterTests(
void)
2006 UtRegisterTest(
"DetectIPProtoTestParse01", DetectIPProtoTestParse01);
2007 UtRegisterTest(
"DetectIPProtoTestParse02", DetectIPProtoTestParse02);
2008 UtRegisterTest(
"DetectIPProtoTestSetup01", DetectIPProtoTestSetup01);
2009 UtRegisterTest(
"DetectIPProtoTestSetup02", DetectIPProtoTestSetup02);
2010 UtRegisterTest(
"DetectIPProtoTestSetup03", DetectIPProtoTestSetup03);
2011 UtRegisterTest(
"DetectIPProtoTestSetup04", DetectIPProtoTestSetup04);
2012 UtRegisterTest(
"DetectIPProtoTestSetup05", DetectIPProtoTestSetup05);
2013 UtRegisterTest(
"DetectIPProtoTestSetup06", DetectIPProtoTestSetup06);
2014 UtRegisterTest(
"DetectIPProtoTestSetup07", DetectIPProtoTestSetup07);
2015 UtRegisterTest(
"DetectIPProtoTestSetup08", DetectIPProtoTestSetup08);
2016 UtRegisterTest(
"DetectIPProtoTestSetup09", DetectIPProtoTestSetup09);
2017 UtRegisterTest(
"DetectIPProtoTestSetup10", DetectIPProtoTestSetup10);
2018 UtRegisterTest(
"DetectIPProtoTestSetup11", DetectIPProtoTestSetup11);
2019 UtRegisterTest(
"DetectIPProtoTestSetup12", DetectIPProtoTestSetup12);
2020 UtRegisterTest(
"DetectIPProtoTestSetup13", DetectIPProtoTestSetup13);
2021 UtRegisterTest(
"DetectIPProtoTestSetup14", DetectIPProtoTestSetup14);
2022 UtRegisterTest(
"DetectIPProtoTestSetup15", DetectIPProtoTestSetup15);
2023 UtRegisterTest(
"DetectIPProtoTestSetup16", DetectIPProtoTestSetup16);
2024 UtRegisterTest(
"DetectIPProtoTestSetup17", DetectIPProtoTestSetup17);
2025 UtRegisterTest(
"DetectIPProtoTestSetup18", DetectIPProtoTestSetup18);
2026 UtRegisterTest(
"DetectIPProtoTestSetup19", DetectIPProtoTestSetup19);
2027 UtRegisterTest(
"DetectIPProtoTestSetup20", DetectIPProtoTestSetup20);
2028 UtRegisterTest(
"DetectIPProtoTestSetup21", DetectIPProtoTestSetup21);
2029 UtRegisterTest(
"DetectIPProtoTestSetup22", DetectIPProtoTestSetup22);
2030 UtRegisterTest(
"DetectIPProtoTestSetup23", DetectIPProtoTestSetup23);
2031 UtRegisterTest(
"DetectIPProtoTestSetup24", DetectIPProtoTestSetup24);
2032 UtRegisterTest(
"DetectIPProtoTestSetup33", DetectIPProtoTestSetup33);
2033 UtRegisterTest(
"DetectIPProtoTestSetup34", DetectIPProtoTestSetup34);
2034 UtRegisterTest(
"DetectIPProtoTestSetup36", DetectIPProtoTestSetup36);
2035 UtRegisterTest(
"DetectIPProtoTestSetup43", DetectIPProtoTestSetup43);
2036 UtRegisterTest(
"DetectIPProtoTestSetup44", DetectIPProtoTestSetup44);
2037 UtRegisterTest(
"DetectIPProtoTestSetup45", DetectIPProtoTestSetup45);
2038 UtRegisterTest(
"DetectIPProtoTestSetup56", DetectIPProtoTestSetup56);
2039 UtRegisterTest(
"DetectIPProtoTestSetup75", DetectIPProtoTestSetup75);
2040 UtRegisterTest(
"DetectIPProtoTestSetup76", DetectIPProtoTestSetup76);
2041 UtRegisterTest(
"DetectIPProtoTestSetup129", DetectIPProtoTestSetup129);
2042 UtRegisterTest(
"DetectIPProtoTestSetup130", DetectIPProtoTestSetup130);
2043 UtRegisterTest(
"DetectIPProtoTestSetup131", DetectIPProtoTestSetup131);
2044 UtRegisterTest(
"DetectIPProtoTestSetup132", DetectIPProtoTestSetup132);
2045 UtRegisterTest(
"DetectIPProtoTestSetup145", DetectIPProtoTestSetup145);