diff --git a/examples/plugins/altemplate/src/detect.rs b/examples/plugins/altemplate/src/detect.rs index 97b66940ca42..e8ed4f3b15e7 100644 --- a/examples/plugins/altemplate/src/detect.rs +++ b/examples/plugins/altemplate/src/detect.rs @@ -79,7 +79,7 @@ unsafe extern "C" fn template_buffer_get( } #[no_mangle] -pub unsafe extern "C" fn ScDetectTemplateRegister() { +pub unsafe extern "C" fn DetectTemplateRegister() { // TODO create a suricata-verify test // Setup a keyword structure and register it let kw = SCSigTableElmt { diff --git a/examples/plugins/altemplate/src/log.rs b/examples/plugins/altemplate/src/log.rs index 1f09282ce4cb..9bf5c8f8f313 100644 --- a/examples/plugins/altemplate/src/log.rs +++ b/examples/plugins/altemplate/src/log.rs @@ -76,7 +76,7 @@ fn log_template(tx: &TemplateTransaction, js: &mut JsonBuilder) -> Result<(), Js } #[no_mangle] -pub unsafe extern "C" fn rs_template_logger_log( +pub unsafe extern "C" fn template_logger_log( tx: *const std::os::raw::c_void, js: *mut std::os::raw::c_void, ) -> bool { let tx = cast_pointer!(tx, TemplateTransaction); diff --git a/examples/plugins/altemplate/src/plugin.rs b/examples/plugins/altemplate/src/plugin.rs index ff6bd6e503df..7e812af8427d 100644 --- a/examples/plugins/altemplate/src/plugin.rs +++ b/examples/plugins/altemplate/src/plugin.rs @@ -1,6 +1,6 @@ -use super::template::rs_template_register_parser; -use crate::detect::ScDetectTemplateRegister; -use crate::log::rs_template_logger_log; +use super::template::template_register_parser; +use crate::detect::DetectTemplateRegister; +use crate::log::template_logger_log; use suricata::plugin::{ SCAppLayerPlugin, SCPlugin, SCPluginRegisterAppLayer, SC_PLUGIN_API_VERSION, }; @@ -14,9 +14,9 @@ extern "C" fn altemplate_plugin_init() { name: b"altemplate\0".as_ptr() as *const libc::c_char, logname: b"JsonaltemplateLog\0".as_ptr() as *const libc::c_char, confname: b"eve-log.altemplate\0".as_ptr() as *const libc::c_char, - Register: rs_template_register_parser, - Logger: rs_template_logger_log, - KeywordsRegister: ScDetectTemplateRegister, + Register: template_register_parser, + Logger: template_logger_log, + KeywordsRegister: DetectTemplateRegister, }; unsafe { if SCPluginRegisterAppLayer(Box::into_raw(Box::new(plugin))) != 0 { diff --git a/examples/plugins/altemplate/src/template.rs b/examples/plugins/altemplate/src/template.rs index 3b80824a63eb..3473a9e5603d 100644 --- a/examples/plugins/altemplate/src/template.rs +++ b/examples/plugins/altemplate/src/template.rs @@ -374,7 +374,7 @@ export_state_data_get!(rs_template_get_state_data, TemplateState); const PARSER_NAME: &[u8] = b"altemplate\0"; #[no_mangle] -pub unsafe extern "C" fn rs_template_register_parser() { +pub unsafe extern "C" fn template_register_parser() { let default_port = CString::new("[7000]").unwrap(); let parser = RustParser { name: PARSER_NAME.as_ptr() as *const c_char,