}
// Defined in app-layer-parser.h
-pub const APP_LAYER_PARSER_EOF_TS : u8 = BIT_U8!(5);
-pub const APP_LAYER_PARSER_EOF_TC : u8 = BIT_U8!(6);
-pub const APP_LAYER_PARSER_NO_INSPECTION : u8 = BIT_U8!(1);
-pub const APP_LAYER_PARSER_NO_REASSEMBLY : u8 = BIT_U8!(2);
-pub const APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD : u8 = BIT_U8!(3);
-pub const APP_LAYER_PARSER_BYPASS_READY : u8 = BIT_U8!(4);
+pub const APP_LAYER_PARSER_NO_INSPECTION : u16 = BIT_U16!(1);
+pub const APP_LAYER_PARSER_NO_REASSEMBLY : u16 = BIT_U16!(2);
+pub const APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD : u16 = BIT_U16!(3);
+pub const APP_LAYER_PARSER_BYPASS_READY : u16 = BIT_U16!(4);
+pub const APP_LAYER_PARSER_EOF_TS : u16 = BIT_U16!(5);
+pub const APP_LAYER_PARSER_EOF_TC : u16 = BIT_U16!(6);
pub const APP_LAYER_PARSER_OPT_ACCEPT_GAPS: u32 = BIT_U32!(0);
pub const APP_LAYER_PARSER_OPT_UNIDIR_TXS: u32 = BIT_U32!(1);
istate: &mut u64) -> applayer::AppLayerGetTxIterTuple;
extern {
- pub fn AppLayerParserStateSetFlag(state: *mut c_void, flag: u8);
- pub fn AppLayerParserStateIssetFlag(state: *mut c_void, flag: u8) -> c_int;
+ pub fn AppLayerParserStateSetFlag(state: *mut c_void, flag: u16);
+ pub fn AppLayerParserStateIssetFlag(state: *mut c_void, flag: u16) -> u16;
pub fn AppLayerParserSetStreamDepth(ipproto: u8, alproto: AppProto, stream_depth: u32);
pub fn AppLayerParserConfParserEnabled(ipproto: *const c_char, proto: *const c_char) -> c_int;
pub fn AppLayerParserRegisterGetTxIterator(ipproto: u8, alproto: AppProto, fun: AppLayerGetTxIteratorFn);
struct AppLayerParserState_ {
/* coccinelle: AppLayerParserState:flags:APP_LAYER_PARSER_ */
- uint8_t flags;
+ uint16_t flags;
/* Indicates the current transaction that is being inspected.
* We have a var per direction. */
/* coccinelle: AppLayerParserStateSetFlag():2,2:APP_LAYER_PARSER_ */
-void AppLayerParserStateSetFlag(AppLayerParserState *pstate, uint8_t flag)
+void AppLayerParserStateSetFlag(AppLayerParserState *pstate, uint16_t flag)
{
SCEnter();
pstate->flags |= flag;
}
/* coccinelle: AppLayerParserStateIssetFlag():2,2:APP_LAYER_PARSER_ */
-int AppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint8_t flag)
+uint16_t AppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint16_t flag)
{
SCEnter();
- SCReturnInt(pstate->flags & flag);
+ SCReturnUInt(pstate->flags & flag);
}
#include "util-config.h"
/* Flags for AppLayerParserState. */
-// flag available BIT_U8(0)
-#define APP_LAYER_PARSER_NO_INSPECTION BIT_U8(1)
-#define APP_LAYER_PARSER_NO_REASSEMBLY BIT_U8(2)
-#define APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD BIT_U8(3)
-#define APP_LAYER_PARSER_BYPASS_READY BIT_U8(4)
-#define APP_LAYER_PARSER_EOF_TS BIT_U8(5)
-#define APP_LAYER_PARSER_EOF_TC BIT_U8(6)
+// flag available BIT_U16(0)
+#define APP_LAYER_PARSER_NO_INSPECTION BIT_U16(1)
+#define APP_LAYER_PARSER_NO_REASSEMBLY BIT_U16(2)
+#define APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD BIT_U16(3)
+#define APP_LAYER_PARSER_BYPASS_READY BIT_U16(4)
+#define APP_LAYER_PARSER_EOF_TS BIT_U16(5)
+#define APP_LAYER_PARSER_EOF_TC BIT_U16(6)
/* Flags for AppLayerParserProtoCtx. */
#define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U32(0)
void AppLayerParserRegisterProtocolParsers(void);
-
-void AppLayerParserStateSetFlag(AppLayerParserState *pstate, uint8_t flag);
-int AppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint8_t flag);
+void AppLayerParserStateSetFlag(AppLayerParserState *pstate, uint16_t flag);
+uint16_t AppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint16_t flag);
void AppLayerParserStreamTruncated(uint8_t ipproto, AppProto alproto, void *alstate,
uint8_t direction);
-
-
AppLayerParserState *AppLayerParserStateAlloc(void);
void AppLayerParserStateFree(AppLayerParserState *pstate);