de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:0;)");
+ "content:\"test2\"; content:\"test3\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:1;)");
+ "content:\"test2\"; content:\"test3\"; sid:2;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:2;)");
+ "content:\"test2\"; content:\"test3\"; sid:3;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:3;)");
+ "content:\"test2\"; content:\"test3\"; sid:4;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:4;)");
+ "content:\"test2\"; content:\"test3\"; sid:5;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
SigGroupHeadSetSigCnt(sh, 4);
result &= (sh->sig_cnt == 3);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 0) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 1) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 2) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 3) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 4) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 1) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 2) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 3) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 4) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 5) == 1);
SigGroupHeadFree(sh);
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:0;)");
+ "content:\"test2\"; content:\"test3\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:1;)");
+ "content:\"test2\"; content:\"test3\"; sid:2;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:2;)");
+ "content:\"test2\"; content:\"test3\"; sid:3;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:3;)");
+ "content:\"test2\"; content:\"test3\"; sid:4;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:4;)");
+ "content:\"test2\"; content:\"test3\"; sid:5;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
SigGroupHeadSetSigCnt(sh, 4);
result &= (sh->sig_cnt == 3);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 0) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 1) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 2) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 3) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 4) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 1) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 2) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 3) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 4) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 5) == 1);
SigGroupHeadClearSigs(sh);
result &= (sh->sig_cnt == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, sh, 0) == 0);
result &= (SigGroupHeadContainsSigId(de_ctx, sh, 1) == 0);
result &= (SigGroupHeadContainsSigId(de_ctx, sh, 2) == 0);
result &= (SigGroupHeadContainsSigId(de_ctx, sh, 3) == 0);
result &= (SigGroupHeadContainsSigId(de_ctx, sh, 4) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, sh, 5) == 0);
SigGroupHeadFree(sh);
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:0;)");
+ "content:\"test2\"; content:\"test3\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:1;)");
+ "content:\"test2\"; content:\"test3\"; sid:2;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:2;)");
+ "content:\"test2\"; content:\"test3\"; sid:3;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:3;)");
+ "content:\"test2\"; content:\"test3\"; sid:4;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:4;)");
+ "content:\"test2\"; content:\"test3\"; sid:5;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
SigGroupHeadSetSigCnt(src_sh, 4);
result &= (src_sh->sig_cnt == 3);
- result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 0) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 1) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 2) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 3) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 4) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 1) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 2) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 3) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 4) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, src_sh, 5) == 1);
SigGroupHeadCopySigs(de_ctx, src_sh, &dst_sh);
SigGroupHeadSetSigCnt(dst_sh, 4);
result &= (dst_sh->sig_cnt == 3);
- result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 0) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 1) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 2) == 1);
- result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 3) == 0);
- result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 4) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 1) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 2) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 3) == 1);
+ result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 4) == 0);
+ result &= (SigGroupHeadContainsSigId(de_ctx, dst_sh, 5) == 1);
SigGroupHeadFree(src_sh);
SigGroupHeadFree(dst_sh);
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:0;)");
+ "content:\"test2\"; content:\"test3\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:1;)");
+ "content:\"test2\"; content:\"test3\"; sid:2;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:2;)");
+ "content:\"test2\"; content:\"test3\"; sid:3;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:3;)");
+ "content:\"test2\"; content:\"test3\"; sid:4;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;
prev_sig->next = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"SigGroupHead tests\"; content:\"test1\"; "
- "content:\"test2\"; content:\"test3\"; sid:4;)");
+ "content:\"test2\"; content:\"test3\"; sid:5;)");
if (prev_sig->next == NULL) {
result = 0;
goto end;