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);
148 g_ippair_expectation_id =
150 g_flow_expectation_id =
157 memset(ip_src, 0,
sizeof(*ip_src));
158 memset(ip_dst, 0,
sizeof(*ip_dst));
174 if (GetFlowAddresses(f, &ip_src, &ip_dst) == -1)
190 AppLayerFreeExpectation(exp);
193 if (exp_list->length == 0) {
195 ExpectationListFree(exp_list);
238 if (GetFlowAddresses(f, &ip_src, &ip_dst) == -1)
252 AppLayerFreeExpectation(last_exp);
260 exp_list =
SCCalloc(1,
sizeof(*exp_list));
261 if (exp_list == NULL)
263 exp_list->length = 0;
269 exp_list->length += 1;
290 return g_flow_expectation_id;
317 if (exp_list == NULL)
322 ((exp->
dp == 0) || (exp->
dp == f->
dp))) {
333 ExpectationDataFree(exp->
data);
341 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
342 if (exp_list == NULL)
348 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
349 if (exp_list == NULL)
374 if (exp_list == NULL)
379 if (exp->
orig_f == (
void *)f) {
380 exp_list = AppLayerExpectationRemove(ipp, exp_list, exp);
381 if (exp_list == NULL)