Small cleanups.

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent 3046cf391d
commit 646262a755

@ -245,7 +245,7 @@ error:
}
/**
* \brief this fucntion is used to add the parsed flowdata into the current signature
* \brief this function is used to add the parsed flowdata into the current signature
*
* \param de_ctx pointer to the Detection Engine Context
* \param s pointer to the Current Signature
@ -321,7 +321,7 @@ int DetectFlowTestParse02 (void) {
if (fd->flags == FLOW_PKT_ESTABLISHED && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -340,7 +340,7 @@ int DetectFlowTestParse03 (void) {
if (fd->flags == FLOW_PKT_STATELESS && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -359,7 +359,7 @@ int DetectFlowTestParse04 (void) {
if (fd->flags == FLOW_PKT_TOCLIENT && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOCLIENT, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOCLIENT, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -378,7 +378,7 @@ int DetectFlowTestParse05 (void) {
if (fd->flags == FLOW_PKT_TOSERVER && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOSERVER, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOSERVER, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -397,7 +397,7 @@ int DetectFlowTestParse06 (void) {
if (fd->flags == FLOW_PKT_TOCLIENT && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOCLIENT, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOCLIENT, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -416,7 +416,7 @@ int DetectFlowTestParse07 (void) {
if (fd->flags == FLOW_PKT_TOSERVER && fd->match_cnt == 1) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOSERVER, 1, fd->flags, fd->match_cnt);
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_TOSERVER, 1, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -435,7 +435,7 @@ int DetectFlowTestParse08 (void) {
if (fd->flags & FLOW_PKT_ESTABLISHED && fd->flags & FLOW_PKT_TOCLIENT && fd->match_cnt == 2) {
result = 1;
} else {
printf("We expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
printf("expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -454,7 +454,7 @@ int DetectFlowTestParse09 (void) {
if (fd->flags & FLOW_PKT_STATELESS && fd->flags & FLOW_PKT_TOCLIENT && fd->match_cnt == 2) {
result = 1;
} else {
printf("We expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
printf("expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -473,7 +473,7 @@ int DetectFlowTestParse10 (void) {
if (fd->flags & FLOW_PKT_STATELESS && fd->flags & FLOW_PKT_TOCLIENT && fd->match_cnt == 2){
result = 1;
} else {
printf("We expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
printf("expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -492,7 +492,7 @@ int DetectFlowTestParse11 (void) {
if (fd->flags & FLOW_PKT_STATELESS && fd->flags & FLOW_PKT_TOCLIENT && fd->match_cnt == 2){
result = 1;
} else {
printf("We expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
printf("expected: 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_STATELESS + FLOW_PKT_TOCLIENT, 2, fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
}
@ -508,7 +508,7 @@ int DetectFlowTestParse12 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("from_server:stateless");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -524,7 +524,7 @@ int DetectFlowTestParse13 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("invalidoptiontest");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -539,7 +539,7 @@ int DetectFlowTestParse14 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -555,7 +555,7 @@ int DetectFlowTestParse15 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("established,stateless");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -571,7 +571,7 @@ int DetectFlowTestParse16 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("to_client,to_server");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -588,7 +588,7 @@ int DetectFlowTestParse17 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("to_client,from_server");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -607,7 +607,7 @@ int DetectFlowTestParse18 (void) {
if (fd->flags & FLOW_PKT_ESTABLISHED && fd->flags & FLOW_PKT_TOCLIENT && fd->flags & FLOW_PKT_STREAMONLY && fd->match_cnt == 3) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT + FLOW_PKT_STREAMONLY, 3,
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT + FLOW_PKT_STREAMONLY, 3,
fd->flags, fd->match_cnt);
}
DetectFlowFree(fd);
@ -624,7 +624,7 @@ int DetectFlowTestParse19 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("from_server,established,stream_only,a");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}
@ -642,7 +642,7 @@ int DetectFlowTestParse20 (void) {
if (fd->flags & FLOW_PKT_ESTABLISHED && fd->flags & FLOW_PKT_TOCLIENT && fd->flags & FLOW_PKT_NOSTREAM && fd->match_cnt == 3) {
result = 1;
} else {
printf("We Expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT + FLOW_PKT_NOSTREAM, 3,
printf("expected 0x%02X cnt %d got 0x%02X cnt %d: ", FLOW_PKT_ESTABLISHED + FLOW_PKT_TOCLIENT + FLOW_PKT_NOSTREAM, 3,
fd->flags, fd->match_cnt);
}
@ -660,7 +660,7 @@ int DetectFlowTestParse21 (void) {
DetectFlowData *fd = NULL;
fd = DetectFlowParse("from_server,a,no_stream");
if (fd != NULL) {
printf("We expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
printf("expected: NULL got 0x%02X %d: ",fd->flags, fd->match_cnt);
result = 0;
DetectFlowFree(fd);
}

Loading…
Cancel
Save