uint8_t first_data_dir;
/* Option flags such as supporting gaps or not. */
- uint64_t flags;
+ uint32_t option_flags;
+
+ uint32_t internal_flags;
#ifdef UNITTESTS
void (*RegisterUnittests)(void);
/* lets set a default value for stream_depth */
for (flow_proto = 0; flow_proto < FLOW_PROTO_DEFAULT; flow_proto++) {
for (alproto = 0; alproto < ALPROTO_MAX; alproto++) {
- if (!(alp_ctx.ctxs[flow_proto][alproto].flags &
- APP_LAYER_PARSER_OPT_STREAM_DEPTH_SET)) {
+ if (!(alp_ctx.ctxs[flow_proto][alproto].internal_flags &
+ APP_LAYER_PARSER_INT_STREAM_DEPTH_SET)) {
alp_ctx.ctxs[flow_proto][alproto].stream_depth =
stream_config.reassembly_depth;
}
}
void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto,
- uint64_t flags)
+ uint32_t flags)
{
SCEnter();
- alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].flags |= flags;
+ alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].option_flags |= flags;
SCReturn;
}
goto end;
if (flags & STREAM_GAP) {
- if (!(p->flags & APP_LAYER_PARSER_OPT_ACCEPT_GAPS)) {
+ if (!(p->option_flags & APP_LAYER_PARSER_OPT_ACCEPT_GAPS)) {
SCLogDebug("app-layer parser does not accept gaps");
if (f->alstate != NULL) {
AppLayerParserStreamTruncated(f->proto, alproto, f->alstate,
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].stream_depth = stream_depth;
- alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].flags |=
- APP_LAYER_PARSER_OPT_STREAM_DEPTH_SET;
+ alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].internal_flags |=
+ APP_LAYER_PARSER_INT_STREAM_DEPTH_SET;
SCReturn;
}
const AppLayerParserProtoCtx *ctx_def = &alp_ctx.ctxs[FLOW_PROTO_DEFAULT][alproto];
printf("ERROR: incomplete app-layer registration\n");
printf("AppLayer protocol %s ipproto %u\n", AppProtoToString(alproto), ipproto);
- printf("- flags %"PRIx64"\n", ctx->flags);
+ printf("- option flags %"PRIx32"\n", ctx->option_flags);
printf("- first_data_dir %"PRIx8"\n", ctx->first_data_dir);
printf("Mandatory:\n");
printf("- Parser[0] %p Parser[1] %p\n", ctx->Parser[0], ctx->Parser[1]);
#define APP_LAYER_PARSER_BYPASS_READY BIT_U8(4)
/* Flags for AppLayerParserProtoCtx. */
-#define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U64(0)
-#define APP_LAYER_PARSER_OPT_STREAM_DEPTH_SET BIT_U64(1)
+#define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U32(0)
+
+#define APP_LAYER_PARSER_INT_STREAM_DEPTH_SET BIT_U32(0)
/* applies to DetectFlags uint64_t field */
AppProto alproto,
uint8_t direction);
void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto,
- uint64_t flags);
+ uint32_t flags);
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto,
void *(*StateAlloc)(void),
void (*StateFree)(void *));