use crate::filecontainer::FileContainer;
use crate::flow::Flow;
use std::os::raw::{c_void,c_char,c_int};
-use crate::core::SC;
use std::ffi::CStr;
use crate::core::StreamingBufferConfig;
extern {
pub fn AppLayerRegisterProtocolDetection(parser: *const RustParser, enable_default: c_int) -> AppProto;
pub fn AppLayerRegisterParserAlias(parser_name: *const c_char, alias_name: *const c_char);
+ pub fn AppLayerRegisterParser(parser: *const RustParser, alproto: AppProto) -> c_int;
}
-#[allow(non_snake_case)]
-pub unsafe fn AppLayerRegisterParser(parser: *const RustParser, alproto: AppProto) -> c_int {
- (SC.unwrap().AppLayerRegisterParser)(parser, alproto)
-}
// Defined in app-layer-detect-proto.h
/// cbindgen:ignore
pub FileAppendData: SCFileAppendDataById,
pub FileAppendGAP: SCFileAppendGAPById,
pub FileContainerRecycle: SCFileContainerRecycle,
-
- pub AppLayerRegisterParser: extern fn(parser: *const crate::applayer::RustParser, alproto: AppProto) -> std::os::raw::c_int,
}
#[allow(non_snake_case)]
FileAppendDataById,
FileAppendGAPById,
FileContainerRecycle,
-
- AppLayerRegisterParser,
};
const SuricataContext *SCGetContext(void)
int (*FileAppendGAPById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id,
const uint8_t *data, uint32_t data_len);
void (*FileContainerRecycle)(FileContainer *ffc, const StreamingBufferConfig *);
-
- int (*AppLayerRegisterParser)(const struct AppLayerParser *p, AppProto alproto);
-
} SuricataContext;
extern const SuricataContext suricata_context;