Go to the documentation of this file.
49 for ( ; gv != NULL; gv = gv->
next) {
59 static void FlowBitAdd(
Flow *f, uint32_t idx)
61 FlowBit *fb = FlowBitGet(f, idx);
74 static void FlowBitRemove(
Flow *f, uint32_t idx)
76 FlowBit *fb = FlowBitGet(f, idx);
91 FlowBitRemove(f, idx);
96 FlowBit *fb = FlowBitGet(f, idx);
98 FlowBitRemove(f, idx);
108 FlowBit *fb = FlowBitGet(f, idx);
120 FlowBit *fb = FlowBitGet(f, idx);
139 static int FlowBitTest01 (
void)
144 memset(&f, 0,
sizeof(
Flow));
148 FlowBit *fb = FlowBitGet(&f,0);
156 static int FlowBitTest02 (
void)
161 memset(&f, 0,
sizeof(
Flow));
163 FlowBit *fb = FlowBitGet(&f,0);
171 static int FlowBitTest03 (
void)
176 memset(&f, 0,
sizeof(
Flow));
180 FlowBit *fb = FlowBitGet(&f,0);
182 printf(
"fb == NULL although it was just added: ");
186 FlowBitRemove(&f, 0);
188 fb = FlowBitGet(&f,0);
190 printf(
"fb != NULL although it was just removed: ");
200 static int FlowBitTest04 (
void)
205 memset(&f, 0,
sizeof(
Flow));
212 FlowBit *fb = FlowBitGet(&f,0);
220 static int FlowBitTest05 (
void)
225 memset(&f, 0,
sizeof(
Flow));
232 FlowBit *fb = FlowBitGet(&f,1);
240 static int FlowBitTest06 (
void)
245 memset(&f, 0,
sizeof(
Flow));
252 FlowBit *fb = FlowBitGet(&f,2);
260 static int FlowBitTest07 (
void)
265 memset(&f, 0,
sizeof(
Flow));
272 FlowBit *fb = FlowBitGet(&f,3);
280 static int FlowBitTest08 (
void)
285 memset(&f, 0,
sizeof(
Flow));
292 FlowBit *fb = FlowBitGet(&f,0);
298 fb = FlowBitGet(&f,0);
300 printf(
"fb != NULL even though it was removed: ");
310 static int FlowBitTest09 (
void)
315 memset(&f, 0,
sizeof(
Flow));
322 FlowBit *fb = FlowBitGet(&f,1);
328 fb = FlowBitGet(&f,1);
330 printf(
"fb != NULL even though it was removed: ");
340 static int FlowBitTest10 (
void)
345 memset(&f, 0,
sizeof(
Flow));
352 FlowBit *fb = FlowBitGet(&f,2);
358 fb = FlowBitGet(&f,2);
360 printf(
"fb != NULL even though it was removed: ");
370 static int FlowBitTest11 (
void)
375 memset(&f, 0,
sizeof(
Flow));
382 FlowBit *fb = FlowBitGet(&f,3);
388 fb = FlowBitGet(&f,3);
390 printf(
"fb != NULL even though it was removed: ");
void GenericVarAppend(GenericVar **list, GenericVar *gv)
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
void FlowBitRegisterTests(void)
void FlowBitUnset(Flow *f, uint32_t idx)
struct GenericVar_ * next
void FlowBitSet(Flow *f, uint32_t idx)
void GenericVarRemove(GenericVar **list, GenericVar *gv)
void FlowBitToggle(Flow *f, uint32_t idx)
int FlowBitIsset(Flow *f, uint32_t idx)
void FlowBitFree(FlowBit *fb)
void GenericVarFree(GenericVar *gv)
int FlowBitIsnotset(Flow *f, uint32_t idx)