FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_DCERPC;
StreamTcpInitConfig(TRUE);
flow.protoctx = (void *)&ssn;
flow.proto = IPPROTO_TCP;
+ flow.alproto = ALPROTO_DNP3;
StreamTcpInitConfig(TRUE);
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&flow);
- DNP3StateFree(state);
PASS;
}
flow.protoctx = (void *)&ssn;
flow.proto = IPPROTO_TCP;
+ flow.alproto = ALPROTO_DNP3;
StreamTcpInitConfig(TRUE);
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&flow);
- DNP3StateFree(state);
PASS;
}
flow.protoctx = (void *)&ssn;
flow.proto = IPPROTO_TCP;
+ flow.alproto = ALPROTO_DNP3;
StreamTcpInitConfig(TRUE);
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&flow);
- DNP3StateFree(state);
PASS;
}
memset(&ssn, 0, sizeof(ssn));
flow.protoctx = (void *)&ssn;
flow.proto = IPPROTO_TCP;
+ flow.alproto = ALPROTO_DNP3;
StreamTcpInitConfig(TRUE);
/* Pass in the first partial frame. */
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&flow);
- DNP3StateFree(state);
PASS;
}
memset(&ssn, 0, sizeof(ssn));
flow.protoctx = (void *)&ssn;
flow.proto = IPPROTO_TCP;
+ flow.alproto = ALPROTO_DNP3;
StreamTcpInitConfig(TRUE);
SCMutexLock(&flow.m);
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&flow);
- DNP3StateFree(state);
PASS;
}
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_ENIP;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_FTP;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_FTP;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_FTP;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_FTP;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_FTP;
StreamTcpInitConfig(TRUE);
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
return 0;
}
- total_txs = AppLayerParserGetTxCnt(p->flow->proto, ALPROTO_HTTP, htp_state);
+ total_txs = AppLayerParserGetTxCnt(p->flow, htp_state);
if (tx_id >= total_txs)
return 0;
goto end;
}
- total_txs = AppLayerParserGetTxCnt(p->flow->proto, ALPROTO_HTTP, htp_state);
+ total_txs = AppLayerParserGetTxCnt(p->flow, htp_state);
for (; tx_id < total_txs; tx_id++) {
if (HttpXFFGetIPFromTx(p, tx_id, xff_cfg, dstbuf, dstbuflen) == 1)
return 1;
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
-
HTPFreeConfig();
ConfDeInit();
ConfRestoreContextBackup();
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
-
HTPFreeConfig();
ConfDeInit();
ConfRestoreContextBackup();
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
htp_cfg_t *htp = cfglist.cfg;
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
ConfRestoreContextBackup();
HtpConfigRestoreBackup();
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
if (f == NULL)
goto end;
f->protoctx = &ssn;
+ f->alproto = ALPROTO_HTTP;
f->proto = IPPROTO_TCP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
if (httpbuf != NULL)
SCFree(httpbuf);
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
if (httpbuf != NULL)
SCFree(httpbuf);
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
goto end;
f->protoctx = &ssn;
f->proto = IPPROTO_TCP;
+ f->alproto = ALPROTO_HTTP;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (http_state != NULL)
- HTPStateFree(http_state);
UTHFreeFlow(f);
return result;
}
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
f.alproto = ALPROTO_MODBUS;
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
f.flags |= FLOW_IPV4;
p->flow = &f;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_MODBUS;
StreamTcpInitConfig(TRUE);
SCReturnCT(pstate->inspect_id[direction & STREAM_TOSERVER ? 0 : 1], "uint64_t");
}
-void AppLayerParserSetTransactionInspectId(AppLayerParserState *pstate,
- const uint8_t ipproto, const AppProto alproto,
+void AppLayerParserSetTransactionInspectId(const Flow *f, AppLayerParserState *pstate,
void *alstate, const uint8_t flags)
{
SCEnter();
int direction = (flags & STREAM_TOSERVER) ? 0 : 1;
- uint64_t total_txs = AppLayerParserGetTxCnt(ipproto, alproto, alstate);
+ const uint64_t total_txs = AppLayerParserGetTxCnt(f, alstate);
uint64_t idx = AppLayerParserGetTransactionInspectId(pstate, flags);
- int state_done_progress = AppLayerParserGetStateProgressCompletionStatus(alproto, flags);
+ const int state_done_progress = AppLayerParserGetStateProgressCompletionStatus(f->alproto, flags);
void *tx;
int state_progress;
for (; idx < total_txs; idx++) {
- tx = AppLayerParserGetTx(ipproto, alproto, alstate, idx);
+ tx = AppLayerParserGetTx(f->proto, f->alproto, alstate, idx);
if (tx == NULL)
continue;
- state_progress = AppLayerParserGetStateProgress(ipproto, alproto, tx, flags);
+ state_progress = AppLayerParserGetStateProgress(f->proto, f->alproto, tx, flags);
if (state_progress >= state_done_progress)
continue;
else
}
/* logger is disabled, return highest 'complete' tx id */
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, f->alproto, f->alstate);
+ uint64_t total_txs = AppLayerParserGetTxCnt(f, f->alstate);
uint64_t idx = AppLayerParserGetTransactionInspectId(f->alparser, flags);
int state_done_progress = AppLayerParserGetStateProgressCompletionStatus(f->alproto, flags);
void *tx;
SCReturnInt(r);
}
-uint64_t AppLayerParserGetTxCnt(uint8_t ipproto, AppProto alproto, void *alstate)
+uint64_t AppLayerParserGetTxCnt(const Flow *f, void *alstate)
{
SCEnter();
uint64_t r = 0;
- r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
+ r = alp_ctx.ctxs[f->protomap][f->alproto].
StateGetTxCnt(alstate);
SCReturnCT(r, "uint64_t");
}
}
if (AppLayerParserProtocolIsTxAware(f->proto, alproto)) {
- p_tx_cnt = AppLayerParserGetTxCnt(f->proto, alproto, f->alstate);
+ p_tx_cnt = AppLayerParserGetTxCnt(f, f->alstate);
}
/* invoke the recursive parser, but only on data. We may get empty msgs on EOF */
if (AppLayerParserProtocolIsTxAware(f->proto, alproto)) {
if (likely(tv)) {
- uint64_t cur_tx_cnt = AppLayerParserGetTxCnt(f->proto, alproto, f->alstate);
+ uint64_t cur_tx_cnt = AppLayerParserGetTxCnt(f, f->alstate);
if (cur_tx_cnt > p_tx_cnt) {
AppLayerIncTxCounter(tv, f, cur_tx_cnt - p_tx_cnt);
}
} else {
/* check each tx */
tx_id = AppLayerParserGetTransactionInspectId(pstate, flags);
- max_id = AppLayerParserGetTxCnt(f->proto, f->alproto, alstate);
+ max_id = AppLayerParserGetTxCnt(f, alstate);
for ( ; tx_id < max_id; tx_id++) {
decoder_events = AppLayerParserGetEventsByTx(f->proto, f->alproto, alstate, tx_id);
if (decoder_events && decoder_events->cnt)
uint64_t AppLayerParserGetTransactionLogId(AppLayerParserState *pstate);
void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate, uint64_t tx_id);
+
void AppLayerParserSetTxLogged(uint8_t ipproto, AppProto alproto, void *alstate,
void *tx, uint32_t logger);
int AppLayerParserGetTxLogged(uint8_t ipproto, AppProto alproto, void *alstate,
void *tx, uint32_t logger);
+
uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction);
-void AppLayerParserSetTransactionInspectId(AppLayerParserState *pstate,
- const uint8_t ipproto, const AppProto alproto, void *alstate,
- const uint8_t flags);
+void AppLayerParserSetTransactionInspectId(const Flow *f, AppLayerParserState *pstate,
+ void *alstate, const uint8_t flags);
+
AppLayerDecoderEvents *AppLayerParserGetDecoderEvents(AppLayerParserState *pstate);
void AppLayerParserSetDecoderEvents(AppLayerParserState *pstate, AppLayerDecoderEvents *devents);
AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *alstate,
void *alstate, uint8_t direction);
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction);
-uint64_t AppLayerParserGetTxCnt(uint8_t ipproto, AppProto alproto, void *alstate);
+uint64_t AppLayerParserGetTxCnt(const Flow *, void *alstate);
void *AppLayerParserGetTx(uint8_t ipproto, AppProto alproto, void *alstate, uint64_t tx_id);
int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction);
int AppLayerParserGetEventInfo(uint8_t ipproto, AppProto alproto, const char *event_name,
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMB;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_ESTABLISHED;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_ESTABLISHED;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_SMTP;
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_TLS;
StreamTcpInitConfig(TRUE);
void *alstate = p->flow->alstate;
uint64_t idx = AppLayerParserGetTransactionInspectId(p->flow->alparser, flags);
- const uint64_t total_txs = AppLayerParserGetTxCnt(ipproto, alproto, alstate);
+ const uint64_t total_txs = AppLayerParserGetTxCnt(p->flow, alstate);
/* HACK test HTTP state here instead of in each engine */
if (alproto == ALPROTO_HTTP) {
/* if state == 1 we also fall through */
uint64_t inspect_tx_id = AppLayerParserGetTransactionInspectId(f->alparser, flags);
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, alproto, alstate);
+ uint64_t total_txs = AppLayerParserGetTxCnt(f, alstate);
for ( ; inspect_tx_id < total_txs; inspect_tx_id++) {
void *inspect_tx = AppLayerParserGetTx(f->proto, alproto, alstate, inspect_tx_id);
check_before_add = 1;
}
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, alproto, alstate);
+ uint64_t total_txs = AppLayerParserGetTxCnt(f, alstate);
SCLogDebug("total_txs %"PRIu64, total_txs);
SCLogDebug("starting: start tx %u, packet %u", (uint)tx_id, (uint)p->pcap_cnt);
}
inspect_tx_id = AppLayerParserGetTransactionInspectId(f->alparser, flags);
- total_txs = AppLayerParserGetTxCnt(f->proto, alproto, alstate);
+ total_txs = AppLayerParserGetTxCnt(f, alstate);
for ( ; inspect_tx_id < total_txs; inspect_tx_id++) {
int inspect_tx_inprogress = 0;
void DeStateUpdateInspectTransactionId(Flow *f, const uint8_t flags)
{
if (f->alparser && f->alstate) {
- AppLayerParserSetTransactionInspectId(f->alparser, f->proto,
- f->alproto, f->alstate, flags);
+ AppLayerParserSetTransactionInspectId(f, f->alparser,
+ f->alstate, flags);
}
return;
}
uint64_t inspect_tx_id = MIN(inspect_ts, inspect_tc);
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, f->alproto, alstate);
+ uint64_t total_txs = AppLayerParserGetTxCnt(f, alstate);
for ( ; inspect_tx_id < total_txs; inspect_tx_id++) {
void *inspect_tx = AppLayerParserGetTx(f->proto, f->alproto, alstate, inspect_tx_id);
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
}
/* hardcoded check of the transactions and it's client body chunks */
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
goto end;
}
- if (AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2) {
+ if (AppLayerParserGetTxCnt(&f, htp_state) != 2) {
printf("The http app layer doesn't have 2 transactions, but it should: ");
goto end;
}
htp_tx_t *tx = NULL;
uint64_t idx = AppLayerParserGetTransactionInspectId(p->flow->alparser,
STREAM_TOSERVER);
- uint64_t total_txs= AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state);
+ uint64_t total_txs= AppLayerParserGetTxCnt(p->flow, htp_state);
for ( ; idx < total_txs; idx++) {
tx = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, idx);
if (tx == NULL)
FAIL_IF(htp_state == NULL);
/* hardcoded check of the transactions and it's client body chunks */
- FAIL_IF(AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2);
+ FAIL_IF(AppLayerParserGetTxCnt(&f, htp_state) != 2);
htp_tx_t *t1 = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, 0);
htp_tx_t *t2 = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, 1);
FAIL_IF(htp_state == NULL);
/* hardcoded check of the transactions and it's client body chunks */
- FAIL_IF(AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2);
+ FAIL_IF(AppLayerParserGetTxCnt(&f, htp_state) != 2);
htp_tx_t *t1 = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, 0);
htp_tx_t *t2 = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, 1);
HtpState *htp_state = f.alstate;
FAIL_IF(htp_state == NULL);
- FAIL_IF(AppLayerParserGetTxCnt(IPPROTO_TCP, ALPROTO_HTTP, htp_state) != 2);
+ FAIL_IF(AppLayerParserGetTxCnt(&f, htp_state) != 2);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_HTTP;
f.flags |= FLOW_IPV4;
StreamTcpInitConfig(TRUE);
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_HTTP;
f.flags |= FLOW_IPV4;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_HTTP;
f.flags |= FLOW_IPV4;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
FLOW_INITIALIZE(&f);
f.protoctx = (void *)&ssn;
f.proto = IPPROTO_TCP;
+ f.alproto = ALPROTO_HTTP;
f.flags |= FLOW_IPV4;
StreamTcpInitConfig(TRUE);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- if (htp_state != NULL)
- HTPStateFree(htp_state);
FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
if (f->alproto != ALPROTO_UNKNOWN && f->alstate != NULL &&
AppLayerParserProtocolSupportsTxs(f->proto, f->alproto))
{
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, f->alproto, f->alstate);
+ uint64_t total_txs = AppLayerParserGetTxCnt(f, f->alstate);
if (AppLayerParserGetTransactionActive(f, f->alparser, STREAM_TOCLIENT) < total_txs)
{
// for each tx
uint64_t tx_id = 0;
- uint64_t total_txs = AppLayerParserGetTxCnt(f->proto, f->alproto, f->alstate);
+ const uint64_t total_txs = AppLayerParserGetTxCnt(f, f->alstate);
SCLogDebug("s->conn %p", s->conn);
for (tx_id = 0; tx_id < total_txs; tx_id++) { // TODO optimization store log tx
htp_tx_t *tx = AppLayerParserGetTx(f->proto, f->alproto, f->alstate, tx_id);
goto end;
}
- uint64_t total_txs = AppLayerParserGetTxCnt(p->proto, alproto, alstate);
+ const uint64_t total_txs = AppLayerParserGetTxCnt(f, alstate);
uint64_t tx_id = AppLayerParserGetTransactionLogId(f->alparser);
uint64_t max_id = tx_id;
int logged = 0;