70 #define EXPECTATION_TIMEOUT 30
71 #define EXPECTATION_MAX_LEVEL 10
96 static void ExpectationDataFree(
void *e)
110 static void AppLayerFreeExpectation(
Expectation *exp)
114 if (expdata->
DFree) {
123 static void ExpectationListFree(
void *el)
126 if (exp_list == NULL)
129 if (exp_list->length > 0) {
134 AppLayerFreeExpectation(exp);
155 memset(ip_src, 0,
sizeof(*ip_src));
156 memset(ip_dst, 0,
sizeof(*ip_dst));
172 if (GetFlowAddresses(f, &ip_src, &ip_dst) == -1)
188 AppLayerFreeExpectation(exp);
192 if (exp_list->length == 0) {
194 ExpectationListFree(exp_list);
237 if (GetFlowAddresses(f, &ip_src, &ip_dst) == -1)
251 AppLayerFreeExpectation(last_exp);
259 exp_list =
SCCalloc(1,
sizeof(*exp_list));
260 if (exp_list == NULL)
262 exp_list->length = 0;
268 exp_list->length += 1;
289 return g_flow_expectation_id;
316 if (exp_list == NULL)
321 ((exp->
dp == 0) || (exp->
dp == f->
dp))) {
332 ExpectationDataFree(exp->
data);
340 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
341 if (exp_list == NULL)
347 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
348 if (exp_list == NULL)
373 if (exp_list == NULL)
378 if (exp->
orig_f == (
void *)f) {
379 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
380 if (exp_list == NULL)