This is a partial backport of:
ac3cf6ff75a3e5be39867bba1830076ac43e9f50
detect/config: set config for special cases
Allow app-layer to declare the txs are uni-directional and special
care is needed for applying config.
pub const APP_LAYER_EVENT_TYPE_TRANSACTION : i32 = 1;
pub const APP_LAYER_EVENT_TYPE_PACKET : i32 = 2;
+pub const APP_LAYER_PARSER_OPT_UNIDIR_TXS: u32 = 2;
+
// From stream.h.
pub const STREAM_START: u8 = 0x01;
pub const STREAM_EOF: u8 = 0x02;
SCReturn;
}
+uint32_t AppLayerParserGetOptionFlags(uint8_t protomap, AppProto alproto)
+{
+ SCEnter();
+ SCReturnUInt(alp_ctx.ctxs[protomap][alproto].option_flags);
+}
+
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto,
void *(*StateAlloc)(void),
void (*StateFree)(void *))
/* Flags for AppLayerParserProtoCtx. */
#define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U32(0)
+#define APP_LAYER_PARSER_OPT_UNIDIR_TXS BIT_U32(1)
#define APP_LAYER_PARSER_INT_STREAM_DEPTH_SET BIT_U32(0)
/***** Get and transaction functions *****/
+uint32_t AppLayerParserGetOptionFlags(uint8_t protomap, AppProto alproto);
AppLayerGetTxIteratorFunc AppLayerGetTxIterator(const uint8_t ipproto,
const AppProto alproto);