diff --git a/rust/src/applayertemplate/detect.rs b/rust/src/applayertemplate/detect.rs index 9eaf880ed7..47f7f040fb 100644 --- a/rust/src/applayertemplate/detect.rs +++ b/rust/src/applayertemplate/detect.rs @@ -76,7 +76,7 @@ unsafe extern "C" fn template_buffer_get( } #[no_mangle] -pub unsafe extern "C" fn ScDetectTemplateRegister() { +pub unsafe extern "C" fn SCDetectTemplateRegister() { /* TEMPLATE_START_REMOVE */ if conf_get_node("app-layer.protocols.template").is_none() { return; diff --git a/rust/src/enip/detect.rs b/rust/src/enip/detect.rs index c652aa01ca..0e95fdb367 100644 --- a/rust/src/enip/detect.rs +++ b/rust/src/enip/detect.rs @@ -1330,7 +1330,7 @@ unsafe extern "C" fn service_name_get_data( ); } #[no_mangle] -pub unsafe extern "C" fn ScDetectEnipRegister() { +pub unsafe extern "C" fn SCDetectEnipRegister() { let kw = SCSigTableElmt { name: b"cip_service\0".as_ptr() as *const libc::c_char, desc: b"match on CIP Service, and optionnally class and attribute\0".as_ptr() diff --git a/rust/src/ldap/detect.rs b/rust/src/ldap/detect.rs index 3745630bfe..fbd0c56f5a 100644 --- a/rust/src/ldap/detect.rs +++ b/rust/src/ldap/detect.rs @@ -264,7 +264,7 @@ unsafe extern "C" fn ldap_detect_responses_count_free(_de: *mut c_void, ctx: *mu } #[no_mangle] -pub unsafe extern "C" fn ScDetectLdapRegister() { +pub unsafe extern "C" fn SCDetectLdapRegister() { let kw = SCSigTableElmt { name: b"ldap.request.operation\0".as_ptr() as *const libc::c_char, desc: b"match LDAP request operation\0".as_ptr() as *const libc::c_char, diff --git a/rust/src/mqtt/detect.rs b/rust/src/mqtt/detect.rs index 13ad30285f..bbaa3a2c1d 100644 --- a/rust/src/mqtt/detect.rs +++ b/rust/src/mqtt/detect.rs @@ -1099,7 +1099,7 @@ unsafe extern "C" fn mqtt_conn_clientid_get_data( } #[no_mangle] -pub unsafe extern "C" fn ScDetectMqttRegister() { +pub unsafe extern "C" fn SCDetectMqttRegister() { let keyword_name = b"mqtt.unsubscribe.topic\0".as_ptr() as *const libc::c_char; let kw = SCSigTableElmt { name: keyword_name, diff --git a/rust/src/rfb/detect.rs b/rust/src/rfb/detect.rs index 81919330cc..9f724d7cd3 100644 --- a/rust/src/rfb/detect.rs +++ b/rust/src/rfb/detect.rs @@ -187,7 +187,7 @@ unsafe extern "C" fn rfb_sec_result_free(_de: *mut c_void, ctx: *mut c_void) { } #[no_mangle] -pub unsafe extern "C" fn ScDetectRfbRegister() { +pub unsafe extern "C" fn SCDetectRfbRegister() { let kw = SCSigTableElmt { name: b"rfb.name\0".as_ptr() as *const libc::c_char, desc: b"sticky buffer to match on the RFB desktop name\0".as_ptr() as *const libc::c_char, diff --git a/rust/src/sip/detect.rs b/rust/src/sip/detect.rs index ff2ec3e06e..c8f3b92f10 100644 --- a/rust/src/sip/detect.rs +++ b/rust/src/sip/detect.rs @@ -578,7 +578,7 @@ unsafe extern "C" fn sip_content_length_hdr_get_data( return false; } #[no_mangle] -pub unsafe extern "C" fn ScDetectSipRegister() { +pub unsafe extern "C" fn SCDetectSipRegister() { let kw = SCSigTableElmt { name: b"sip.protocol\0".as_ptr() as *const libc::c_char, desc: b"sticky buffer to match on the SIP protocol\0".as_ptr() as *const libc::c_char, diff --git a/rust/src/snmp/detect.rs b/rust/src/snmp/detect.rs index 2f9851bbdf..0c07538c7f 100644 --- a/rust/src/snmp/detect.rs +++ b/rust/src/snmp/detect.rs @@ -183,7 +183,7 @@ pub unsafe extern "C" fn snmp_detect_community_get_data( ); } #[no_mangle] -pub unsafe extern "C" fn ScDetectSNMPRegister() { +pub unsafe extern "C" fn SCDetectSNMPRegister() { let kw = SCSigTableElmt { name: b"snmp.version\0".as_ptr() as *const libc::c_char, desc: b"match SNMP version\0".as_ptr() as *const libc::c_char, diff --git a/rust/src/websocket/detect.rs b/rust/src/websocket/detect.rs index f7f3cc9d46..2d4614ae5a 100644 --- a/rust/src/websocket/detect.rs +++ b/rust/src/websocket/detect.rs @@ -277,7 +277,7 @@ pub unsafe extern "C" fn websocket_detect_payload_get_data( } #[no_mangle] -pub unsafe extern "C" fn ScDetectWebsocketRegister() { +pub unsafe extern "C" fn SCDetectWebsocketRegister() { let kw = SCSigTableElmt { name: b"websocket.opcode\0".as_ptr() as *const libc::c_char, desc: b"match WebSocket opcode\0".as_ptr() as *const libc::c_char, diff --git a/scripts/setup-app-layer.py b/scripts/setup-app-layer.py index f94e68ae7d..ca2ecc5b16 100755 --- a/scripts/setup-app-layer.py +++ b/scripts/setup-app-layer.py @@ -255,10 +255,10 @@ def detect_patch_detect_engine_register_c(protoname): output = io.StringIO() with open(filename) as infile: for line in infile: - if line.find("ScDetect%sRegister" % protoname) > -1: + if line.find("SCDetect%sRegister" % protoname) > -1: # patch already applied return - if line.find("ScDetectTemplateRegister") > -1: + if line.find("SCDetectTemplateRegister") > -1: new = line.replace("Template", "%s" % protoname) output.write(new) output.write(line) diff --git a/src/detect-engine-register.c b/src/detect-engine-register.c index 658c17150a..88b77ec3ce 100644 --- a/src/detect-engine-register.c +++ b/src/detect-engine-register.c @@ -734,15 +734,15 @@ void SigTableSetup(void) DetectVlanLayersRegister(); SCDetectSMTPRegister(); - ScDetectSNMPRegister(); + SCDetectSNMPRegister(); SCDetectDHCPRegister(); - ScDetectWebsocketRegister(); - ScDetectEnipRegister(); - ScDetectMqttRegister(); - ScDetectRfbRegister(); - ScDetectSipRegister(); - ScDetectTemplateRegister(); - ScDetectLdapRegister(); + SCDetectWebsocketRegister(); + SCDetectEnipRegister(); + SCDetectMqttRegister(); + SCDetectRfbRegister(); + SCDetectSipRegister(); + SCDetectTemplateRegister(); + SCDetectLdapRegister(); for (size_t i = 0; i < preregistered_callbacks_nb; i++) { PreregisteredCallbacks[i]();