AppLayerParserProtoCtx ctxs[FLOW_PROTO_MAX][ALPROTO_MAX];
} AppLayerParserCtx;
-typedef struct AppLayerParserParserState_ {
+typedef struct AppLayerParserState_ {
uint8_t flags;
/* Indicates the current transaction that is being inspected.
/* Used to store decoder events. */
AppLayerDecoderEvents *decoder_events;
-} AppLayerParserParserState;
+} AppLayerParserState;
/* Static global version of the parser context.
* Post 2.0 let's look at changing this to move it out to app-layer.c. */
{
SCEnter();
- AppLayerParserParserState *parser_state_store = pstate;
+ AppLayerParserState *parser_state_store = pstate;
uint64_t inspect = 0, log = 0;
uint64_t min;
AppLayerParserProtoCtx *ctx = &alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto];
{
SCEnter();
- AppLayerParserParserState *pstate = (AppLayerParserParserState *)SCMalloc(sizeof(*pstate));
+ AppLayerParserState *pstate = (AppLayerParserState *)SCMalloc(sizeof(*pstate));
if (pstate == NULL)
goto end;
memset(pstate, 0, sizeof(*pstate));
{
SCEnter();
- if (((AppLayerParserParserState *)pstate)->decoder_events != NULL)
- AppLayerDecoderEventsFreeEvents(((AppLayerParserParserState *)pstate)->decoder_events);
+ if (((AppLayerParserState *)pstate)->decoder_events != NULL)
+ AppLayerDecoderEventsFreeEvents(((AppLayerParserState *)pstate)->decoder_events);
SCFree(pstate);
SCReturn;
{
SCEnter();
- SCReturnCT(((AppLayerParserParserState *)pstate)->log_id, "uint64_t");
+ SCReturnCT(((AppLayerParserState *)pstate)->log_id, "uint64_t");
}
void AppLayerParserSetTransactionLogId(void *pstate)
{
SCEnter();
- ((AppLayerParserParserState *)pstate)->log_id++;
+ ((AppLayerParserState *)pstate)->log_id++;
SCReturn;
}
{
SCEnter();
- SCReturnCT(((AppLayerParserParserState *)pstate)->
+ SCReturnCT(((AppLayerParserState *)pstate)->
inspect_id[direction & STREAM_TOSERVER ? 0 : 1], "uint64_t");
}
else
break;
}
- ((AppLayerParserParserState *)pstate)->inspect_id[dir] = idx;
+ ((AppLayerParserState *)pstate)->inspect_id[dir] = idx;
SCReturn;
}
{
SCEnter();
- SCReturnPtr(((AppLayerParserParserState *)pstate)->decoder_events,
+ SCReturnPtr(((AppLayerParserState *)pstate)->decoder_events,
"AppLayerDecoderEvents *");
}
void AppLayerParserSetDecoderEvents(void *pstate, AppLayerDecoderEvents *devents)
{
- (((AppLayerParserParserState *)pstate)->decoder_events) = devents;
+ (((AppLayerParserState *)pstate)->decoder_events) = devents;
}
AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint16_t ipproto, AppProto alproto,
uint16_t AppLayerParserGetStateVersion(void *pstate)
{
SCEnter();
- SCReturnCT((pstate == NULL) ? 0 : ((AppLayerParserParserState *)pstate)->version,
+ SCReturnCT((pstate == NULL) ? 0 : ((AppLayerParserState *)pstate)->version,
"uint16_t");
}
{
SCEnter();
- AppLayerParserParserState *state = (AppLayerParserParserState *)pstate;
+ AppLayerParserState *state = (AppLayerParserState *)pstate;
uint64_t active_id;
uint64_t log_id = state->log_id;
{
SCEnter();
- AppLayerParserParserState *pstate = NULL;
+ AppLayerParserState *pstate = NULL;
AppLayerParserProtoCtx *p = &alp_ctx.ctxs[FlowGetProtoMapping(f->proto)][alproto];
TcpSession *ssn = NULL;
void *alstate = NULL;
AppLayerParserParserStateSetFlag(pstate, APP_LAYER_PARSER_EOF);
/* increase version so we will inspect it one more time
* with the EOF flags now set */
- ((AppLayerParserParserState *)pstate)->version++;
+ ((AppLayerParserState *)pstate)->version++;
end:
SCReturn;
void AppLayerParserParserStateSetFlag(void *pstate, uint8_t flag)
{
SCEnter();
- ((AppLayerParserParserState *)pstate)->flags |= flag;
+ ((AppLayerParserState *)pstate)->flags |= flag;
SCReturn;
}
int AppLayerParserParserStateIssetFlag(void *pstate, uint8_t flag)
{
SCEnter();
- SCReturnInt(((AppLayerParserParserState *)pstate)->flags & flag);
+ SCReturnInt(((AppLayerParserState *)pstate)->flags & flag);
}
if (pstate == NULL)
SCReturn;
- AppLayerParserParserState *p = (AppLayerParserParserState *)pstate;
+ AppLayerParserState *p = (AppLayerParserState *)pstate;
SCLogDebug("AppLayerParser parser state information for parser state p(%p). "
"p->inspect_id[0](%"PRIu64"), "
"p->inspect_id[1](%"PRIu64"), "