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);
191 if (exp_list->length == 0) {
193 ExpectationListFree(exp_list);
236 if (GetFlowAddresses(f, &ip_src, &ip_dst) == -1)
250 AppLayerFreeExpectation(last_exp);
258 exp_list =
SCCalloc(1,
sizeof(*exp_list));
259 if (exp_list == NULL)
261 exp_list->length = 0;
267 exp_list->length += 1;
288 return g_flow_expectation_id;
315 if (exp_list == NULL)
320 ((exp->
dp == 0) || (exp->
dp == f->
dp))) {
331 ExpectationDataFree(exp->
data);
339 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
340 if (exp_list == NULL)
346 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
347 if (exp_list == NULL)
372 if (exp_list == NULL)
377 if (exp->
orig_f == (
void *)f) {
378 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
379 if (exp_list == NULL)