|
|
|
|
@ -58,6 +58,7 @@
|
|
|
|
|
#include "util-debug.h"
|
|
|
|
|
#include "decode-events.h"
|
|
|
|
|
#include "util-unittest-helper.h"
|
|
|
|
|
#include "util-validate.h"
|
|
|
|
|
|
|
|
|
|
static AppLayerProto al_proto_table[ALPROTO_MAX]; /**< Application layer protocol
|
|
|
|
|
table mapped to their
|
|
|
|
|
@ -842,6 +843,8 @@ int AppLayerParse(void *local_data, Flow *f, uint8_t proto,
|
|
|
|
|
{
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
uint16_t parser_idx = 0;
|
|
|
|
|
AppLayerProto *p = &al_proto_table[proto];
|
|
|
|
|
TcpSession *ssn = NULL;
|
|
|
|
|
@ -1034,6 +1037,8 @@ error:
|
|
|
|
|
int AppLayerTransactionGetInspectId(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
AppLayerParserStateStore *parser_state_store =
|
|
|
|
|
(AppLayerParserStateStore *)f->alparser;
|
|
|
|
|
|
|
|
|
|
@ -1051,6 +1056,8 @@ error:
|
|
|
|
|
uint16_t AppLayerTransactionGetAvailId(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
AppLayerParserStateStore *parser_state_store =
|
|
|
|
|
(AppLayerParserStateStore *)f->alparser;
|
|
|
|
|
|
|
|
|
|
@ -1066,6 +1073,8 @@ uint16_t AppLayerTransactionGetAvailId(Flow *f) {
|
|
|
|
|
int AppLayerTransactionGetLoggableId(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
AppLayerParserStateStore *parser_state_store =
|
|
|
|
|
(AppLayerParserStateStore *)f->alparser;
|
|
|
|
|
|
|
|
|
|
@ -1093,6 +1102,8 @@ error:
|
|
|
|
|
void AppLayerTransactionUpdateLoggedId(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
AppLayerParserStateStore *parser_state_store =
|
|
|
|
|
(AppLayerParserStateStore *)f->alparser;
|
|
|
|
|
|
|
|
|
|
@ -1111,6 +1122,8 @@ error:
|
|
|
|
|
int AppLayerTransactionGetLoggedId(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
AppLayerParserStateStore *parser_state_store =
|
|
|
|
|
(AppLayerParserStateStore *)f->alparser;
|
|
|
|
|
|
|
|
|
|
@ -1133,6 +1146,9 @@ error:
|
|
|
|
|
*/
|
|
|
|
|
uint16_t AppLayerGetStateVersion(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
uint16_t version = 0;
|
|
|
|
|
AppLayerParserStateStore *parser_state_store = NULL;
|
|
|
|
|
|
|
|
|
|
@ -1156,6 +1172,8 @@ int AppLayerTransactionUpdateInspectId(Flow *f, char direction)
|
|
|
|
|
{
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
int r = 0;
|
|
|
|
|
AppLayerParserStateStore *parser_state_store = NULL;
|
|
|
|
|
|
|
|
|
|
@ -1206,6 +1224,8 @@ int AppLayerTransactionUpdateInspectId(Flow *f, char direction)
|
|
|
|
|
|
|
|
|
|
AppLayerDecoderEvents *AppLayerGetDecoderEventsForFlow(Flow *f)
|
|
|
|
|
{
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
/* Get the parser state (if any) */
|
|
|
|
|
AppLayerParserStateStore *parser_state_store = NULL;
|
|
|
|
|
|
|
|
|
|
@ -1233,6 +1253,8 @@ AppLayerDecoderEvents *AppLayerGetDecoderEventsForFlow(Flow *f)
|
|
|
|
|
void AppLayerTriggerRawStreamReassembly(Flow *f) {
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
DEBUG_ASSERT_FLOW_LOCKED(f);
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
BUG_ON(f == NULL);
|
|
|
|
|
#endif
|
|
|
|
|
|