]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: SC prefix for extern pub Rust functions
authorJason Ish <jason.ish@oisf.net>
Mon, 31 Mar 2025 15:59:16 +0000 (09:59 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 31 Mar 2025 17:16:53 +0000 (19:16 +0200)
Ticket: #7498

30 files changed:
rust/src/detect/uint.rs
rust/src/dhcp/detect.rs
rust/src/enip/detect.rs
rust/src/ldap/detect.rs
rust/src/mqtt/detect.rs
rust/src/rfb/detect.rs
rust/src/snmp/detect.rs
rust/src/websocket/detect.rs
src/detect-bsize.c
src/detect-dns-opcode.c
src/detect-dns-rcode.c
src/detect-dns-rrtype.c
src/detect-dsize.c
src/detect-engine-uint.c
src/detect-filesize.c
src/detect-flow-age.c
src/detect-http2.c
src/detect-icmpv6-mtu.c
src/detect-icode.c
src/detect-ike-exch-type.c
src/detect-ike-key-exchange-payload-length.c
src/detect-ike-nonce-payload-length.c
src/detect-itype.c
src/detect-nfs-procedure.c
src/detect-nfs-version.c
src/detect-tcpmss.c
src/detect-template2.c
src/detect-tls-certs.c
src/detect-ttl.c
src/detect-vlan.c

index e844b965cf2098026f46a7fafdcb72c9590b6156..083ad284491e084cddf2810b11c462d8a15d857d 100644 (file)
@@ -384,7 +384,7 @@ pub fn detect_parse_uint_inclusive<T: DetectIntType>(i: &str) -> IResult<&str, D
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u64_parse(
+pub unsafe extern "C" fn SCDetectU64Parse(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectUintData<u64> {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -398,7 +398,7 @@ pub unsafe extern "C" fn rs_detect_u64_parse(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u64_match(
+pub unsafe extern "C" fn SCDetectU64Match(
     arg: u64, ctx: &DetectUintData<u64>,
 ) -> std::os::raw::c_int {
     if detect_match_uint(ctx, arg) {
@@ -408,13 +408,13 @@ pub unsafe extern "C" fn rs_detect_u64_match(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u64_free(ctx: &mut DetectUintData<u64>) {
+pub unsafe extern "C" fn SCDetectU64Free(ctx: &mut DetectUintData<u64>) {
     // Just unbox...
     std::mem::drop(Box::from_raw(ctx));
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u32_parse(
+pub unsafe extern "C" fn SCDetectU32Parse(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectUintData<u32> {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -428,7 +428,7 @@ pub unsafe extern "C" fn rs_detect_u32_parse(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u32_parse_inclusive(
+pub unsafe extern "C" fn SCDetectU32ParseInclusive(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectUintData<u32> {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -442,7 +442,7 @@ pub unsafe extern "C" fn rs_detect_u32_parse_inclusive(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u32_match(
+pub unsafe extern "C" fn SCDetectU32Match(
     arg: u32, ctx: &DetectUintData<u32>,
 ) -> std::os::raw::c_int {
     if detect_match_uint(ctx, arg) {
@@ -452,13 +452,13 @@ pub unsafe extern "C" fn rs_detect_u32_match(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u32_free(ctx: &mut DetectUintData<u32>) {
+pub unsafe extern "C" fn SCDetectU32Free(ctx: &mut DetectUintData<u32>) {
     // Just unbox...
     std::mem::drop(Box::from_raw(ctx));
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u8_parse(
+pub unsafe extern "C" fn SCDetectU8Parse(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectUintData<u8> {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -472,7 +472,7 @@ pub unsafe extern "C" fn rs_detect_u8_parse(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u8_match(
+pub unsafe extern "C" fn SCDetectU8Match(
     arg: u8, ctx: &DetectUintData<u8>,
 ) -> std::os::raw::c_int {
     if detect_match_uint(ctx, arg) {
@@ -482,13 +482,13 @@ pub unsafe extern "C" fn rs_detect_u8_match(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u8_free(ctx: &mut DetectUintData<u8>) {
+pub unsafe extern "C" fn SCDetectU8Free(ctx: &mut DetectUintData<u8>) {
     // Just unbox...
     std::mem::drop(Box::from_raw(ctx));
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u16_parse(
+pub unsafe extern "C" fn SCDetectU16Parse(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectUintData<u16> {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -502,7 +502,7 @@ pub unsafe extern "C" fn rs_detect_u16_parse(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u16_match(
+pub unsafe extern "C" fn SCDetectU16Match(
     arg: u16, ctx: &DetectUintData<u16>,
 ) -> std::os::raw::c_int {
     if detect_match_uint(ctx, arg) {
@@ -512,7 +512,7 @@ pub unsafe extern "C" fn rs_detect_u16_match(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_u16_free(ctx: &mut DetectUintData<u16>) {
+pub unsafe extern "C" fn SCDetectU16Free(ctx: &mut DetectUintData<u16>) {
     // Just unbox...
     std::mem::drop(Box::from_raw(ctx));
 }
index 9c8fe581d47b1c622151d07d2a8ee0dd1bb2c7bd..362ae0bd6e0137a39e857148950b42b9d9fd5b25 100644 (file)
@@ -21,7 +21,7 @@ use super::dhcp::{
 };
 use super::parser::DHCPOptionWrapper;
 use crate::detect::uint::{
-    rs_detect_u64_free, rs_detect_u64_match, rs_detect_u64_parse, DetectUintData,
+    SCDetectU64Free, SCDetectU64Match, SCDetectU64Parse, DetectUintData,
 };
 use crate::detect::{
     DetectHelperBufferRegister, DetectHelperKeywordRegister, DetectSignatureSetAppProto,
@@ -53,7 +53,7 @@ unsafe extern "C" fn dhcp_detect_leasetime_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_DHCP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u64_parse(raw) as *mut c_void;
+    let ctx = SCDetectU64Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -79,7 +79,7 @@ unsafe extern "C" fn dhcp_detect_leasetime_match(
     let tx = cast_pointer!(tx, DHCPTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u64>);
     if let Some(val) = dhcp_tx_get_time(tx, DHCP_OPT_ADDRESS_TIME) {
-        return rs_detect_u64_match(val, ctx);
+        return SCDetectU64Match(val, ctx);
     }
     return 0;
 }
@@ -87,7 +87,7 @@ unsafe extern "C" fn dhcp_detect_leasetime_match(
 unsafe extern "C" fn dhcp_detect_time_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u64>);
-    rs_detect_u64_free(ctx);
+    SCDetectU64Free(ctx);
 }
 
 unsafe extern "C" fn dhcp_detect_rebindingtime_setup(
@@ -96,7 +96,7 @@ unsafe extern "C" fn dhcp_detect_rebindingtime_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_DHCP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u64_parse(raw) as *mut c_void;
+    let ctx = SCDetectU64Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -122,7 +122,7 @@ unsafe extern "C" fn dhcp_detect_rebindingtime_match(
     let tx = cast_pointer!(tx, DHCPTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u64>);
     if let Some(val) = dhcp_tx_get_time(tx, DHCP_OPT_REBINDING_TIME) {
-        return rs_detect_u64_match(val, ctx);
+        return SCDetectU64Match(val, ctx);
     }
     return 0;
 }
@@ -133,7 +133,7 @@ unsafe extern "C" fn dhcp_detect_renewaltime_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_DHCP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u64_parse(raw) as *mut c_void;
+    let ctx = SCDetectU64Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -159,7 +159,7 @@ unsafe extern "C" fn dhcp_detect_renewaltime_match(
     let tx = cast_pointer!(tx, DHCPTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u64>);
     if let Some(val) = dhcp_tx_get_time(tx, DHCP_OPT_RENEWAL_TIME) {
-        return rs_detect_u64_match(val, ctx);
+        return SCDetectU64Match(val, ctx);
     }
     return 0;
 }
index 375836d5f5a0a4ac55c93960a82577ae4285d8be..b1217e84c60ee9a03a3a85f0927da4dd430e0b15 100644 (file)
@@ -30,9 +30,9 @@ use super::parser::{
 };
 
 use crate::detect::uint::{
-    detect_match_uint, detect_parse_uint_enum, rs_detect_u16_free, rs_detect_u16_match,
-    rs_detect_u16_parse, rs_detect_u32_free, rs_detect_u32_match, rs_detect_u32_parse,
-    rs_detect_u8_free, rs_detect_u8_match, rs_detect_u8_parse, DetectUintData,
+    detect_match_uint, detect_parse_uint_enum, SCDetectU16Free, SCDetectU16Match,
+    SCDetectU16Parse, SCDetectU32Free, SCDetectU32Match, SCDetectU32Parse,
+    SCDetectU8Free, SCDetectU8Match, SCDetectU8Parse, DetectUintData,
 };
 use crate::detect::{
     DetectBufferSetActiveList, DetectHelperBufferMpmRegister, DetectHelperBufferRegister,
@@ -490,7 +490,7 @@ unsafe extern "C" fn capabilities_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -529,7 +529,7 @@ unsafe extern "C" fn capabilities_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(v) = tx_get_capabilities(tx) {
-        return rs_detect_u16_match(v, ctx);
+        return SCDetectU16Match(v, ctx);
     }
     return 0;
 }
@@ -537,7 +537,7 @@ unsafe extern "C" fn capabilities_match(
 unsafe extern "C" fn capabilities_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn cip_attribute_setup(
@@ -546,7 +546,7 @@ unsafe extern "C" fn cip_attribute_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -577,7 +577,7 @@ unsafe extern "C" fn cip_attribute_match(
 unsafe extern "C" fn cip_attribute_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn cip_class_setup(
@@ -586,7 +586,7 @@ unsafe extern "C" fn cip_class_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -617,7 +617,7 @@ unsafe extern "C" fn cip_class_match(
 unsafe extern "C" fn cip_class_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn vendor_id_setup(
@@ -626,7 +626,7 @@ unsafe extern "C" fn vendor_id_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -665,7 +665,7 @@ unsafe extern "C" fn vendor_id_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(val) = tx_get_vendor_id(tx) {
-        return rs_detect_u16_match(val, ctx);
+        return SCDetectU16Match(val, ctx);
     }
     return 0;
 }
@@ -673,7 +673,7 @@ unsafe extern "C" fn vendor_id_match(
 unsafe extern "C" fn vendor_id_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn status_setup(
@@ -700,7 +700,7 @@ unsafe extern "C" fn status_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
     if let Some(x) = enip_get_status(tx, flags.into()) {
-        return rs_detect_u32_match(x, ctx);
+        return SCDetectU32Match(x, ctx);
     }
     return 0;
 }
@@ -708,7 +708,7 @@ unsafe extern "C" fn status_match(
 unsafe extern "C" fn status_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn state_setup(
@@ -717,7 +717,7 @@ unsafe extern "C" fn state_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u8_parse(raw) as *mut c_void;
+    let ctx = SCDetectU8Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -748,7 +748,7 @@ unsafe extern "C" fn state_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
     if let Some(val) = tx_get_state(tx) {
-        return rs_detect_u8_match(val, ctx);
+        return SCDetectU8Match(val, ctx);
     }
     return 0;
 }
@@ -756,7 +756,7 @@ unsafe extern "C" fn state_match(
 unsafe extern "C" fn state_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn serial_setup(
@@ -765,7 +765,7 @@ unsafe extern "C" fn serial_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -796,7 +796,7 @@ unsafe extern "C" fn serial_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
     if let Some(val) = tx_get_serial(tx) {
-        return rs_detect_u32_match(val, ctx);
+        return SCDetectU32Match(val, ctx);
     }
     return 0;
 }
@@ -804,7 +804,7 @@ unsafe extern "C" fn serial_match(
 unsafe extern "C" fn serial_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn revision_setup(
@@ -813,7 +813,7 @@ unsafe extern "C" fn revision_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -846,7 +846,7 @@ unsafe extern "C" fn revision_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(val) = tx_get_revision(tx) {
-        return rs_detect_u16_match(val, ctx);
+        return SCDetectU16Match(val, ctx);
     }
     return 0;
 }
@@ -854,7 +854,7 @@ unsafe extern "C" fn revision_match(
 unsafe extern "C" fn revision_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn protocol_version_setup(
@@ -863,7 +863,7 @@ unsafe extern "C" fn protocol_version_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -889,7 +889,7 @@ unsafe extern "C" fn protocol_version_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(val) = tx_get_protocol_version(tx, flags.into()) {
-        return rs_detect_u16_match(val, ctx);
+        return SCDetectU16Match(val, ctx);
     }
     return 0;
 }
@@ -897,7 +897,7 @@ unsafe extern "C" fn protocol_version_match(
 unsafe extern "C" fn protocol_version_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn product_code_setup(
@@ -906,7 +906,7 @@ unsafe extern "C" fn product_code_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -945,7 +945,7 @@ unsafe extern "C" fn product_code_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(v) = tx_get_product_code(tx) {
-        return rs_detect_u16_match(v, ctx);
+        return SCDetectU16Match(v, ctx);
     }
     return 0;
 }
@@ -953,7 +953,7 @@ unsafe extern "C" fn product_code_match(
 unsafe extern "C" fn product_code_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn identity_status_setup(
@@ -962,7 +962,7 @@ unsafe extern "C" fn identity_status_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -1001,7 +1001,7 @@ unsafe extern "C" fn identity_status_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(v) = tx_get_identity_status(tx) {
-        return rs_detect_u16_match(v, ctx);
+        return SCDetectU16Match(v, ctx);
     }
     return 0;
 }
@@ -1009,7 +1009,7 @@ unsafe extern "C" fn identity_status_match(
 unsafe extern "C" fn identity_status_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn device_type_setup(
@@ -1018,7 +1018,7 @@ unsafe extern "C" fn device_type_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -1057,7 +1057,7 @@ unsafe extern "C" fn device_type_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(v) = tx_get_device_type(tx) {
-        return rs_detect_u16_match(v, ctx);
+        return SCDetectU16Match(v, ctx);
     }
     return 0;
 }
@@ -1065,7 +1065,7 @@ unsafe extern "C" fn device_type_match(
 unsafe extern "C" fn device_type_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn command_setup(
@@ -1105,7 +1105,7 @@ unsafe extern "C" fn command_match(
     let tx = cast_pointer!(tx, EnipTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
     if let Some(v) = tx_get_command(tx, flags) {
-        return rs_detect_u16_match(v, ctx);
+        return SCDetectU16Match(v, ctx);
     }
     return 0;
 }
@@ -1113,7 +1113,7 @@ unsafe extern "C" fn command_match(
 unsafe extern "C" fn command_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 unsafe extern "C" fn cip_status_setup(
@@ -1122,7 +1122,7 @@ unsafe extern "C" fn cip_status_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u8_parse(raw) as *mut c_void;
+    let ctx = SCDetectU8Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -1153,7 +1153,7 @@ unsafe extern "C" fn cip_status_match(
 unsafe extern "C" fn cip_status_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn cip_instance_setup(
@@ -1162,7 +1162,7 @@ unsafe extern "C" fn cip_instance_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -1193,7 +1193,7 @@ unsafe extern "C" fn cip_instance_match(
 unsafe extern "C" fn cip_instance_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn cip_extendedstatus_setup(
@@ -1202,7 +1202,7 @@ unsafe extern "C" fn cip_extendedstatus_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_ENIP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u16_parse(raw) as *mut c_void;
+    let ctx = SCDetectU16Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -1233,7 +1233,7 @@ unsafe extern "C" fn cip_extendedstatus_match(
 unsafe extern "C" fn cip_extendedstatus_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u16>);
-    rs_detect_u16_free(ctx);
+    SCDetectU16Free(ctx);
 }
 
 pub unsafe extern "C" fn product_name_setup(
index bf49edd37b1ddf7b1b1eb00e33ef89bebf9e0fe0..0ec2e20401280c93fa6f40c239deb68bed309a7a 100644 (file)
@@ -17,8 +17,8 @@
 
 use super::ldap::{LdapTransaction, ALPROTO_LDAP};
 use crate::detect::uint::{
-    detect_match_uint, detect_parse_uint_enum, rs_detect_u32_free, rs_detect_u32_parse,
-    rs_detect_u8_free, DetectUintData,
+    detect_match_uint, detect_parse_uint_enum, SCDetectU32Free, SCDetectU32Parse,
+    SCDetectU8Free, DetectUintData,
 };
 use crate::detect::{
     DetectBufferSetActiveList, DetectHelperBufferMpmRegister, DetectHelperBufferRegister,
@@ -125,7 +125,7 @@ unsafe extern "C" fn ldap_detect_request_operation_match(
 unsafe extern "C" fn ldap_detect_request_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 fn parse_ldap_index(parts: &[&str]) -> Option<LdapIndex> {
@@ -265,7 +265,7 @@ unsafe extern "C" fn ldap_detect_responses_count_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_LDAP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -297,7 +297,7 @@ unsafe extern "C" fn ldap_detect_responses_count_match(
 unsafe extern "C" fn ldap_detect_responses_count_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn ldap_detect_request_dn_setup(
index a305941f327ba49f8f994e83ae40c0b74938959c..647699e937a6694e954041bf6e404fc86f3845a6 100644 (file)
@@ -18,8 +18,8 @@
 // written by Sascha Steinbiss <sascha@steinbiss.name>
 
 use crate::detect::uint::{
-    detect_match_uint, detect_parse_uint, detect_parse_uint_enum, rs_detect_u8_free,
-    rs_detect_u8_parse, DetectUintData, DetectUintMode,
+    detect_match_uint, detect_parse_uint, detect_parse_uint_enum, SCDetectU8Free,
+    SCDetectU8Parse, DetectUintData, DetectUintMode,
 };
 use crate::detect::{
     DetectBufferSetActiveList, DetectHelperBufferMpmRegister, DetectHelperBufferRegister,
@@ -450,7 +450,7 @@ unsafe extern "C" fn mqtt_type_match(
 unsafe extern "C" fn mqtt_type_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn mqtt_reason_code_setup(
@@ -459,7 +459,7 @@ unsafe extern "C" fn mqtt_reason_code_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_MQTT) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u8_parse(raw) as *mut c_void;
+    let ctx = SCDetectU8Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -495,7 +495,7 @@ unsafe extern "C" fn mqtt_reason_code_match(
 unsafe extern "C" fn mqtt_reason_code_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn mqtt_parse_qos(ustr: *const std::os::raw::c_char) -> *mut u8 {
@@ -672,7 +672,7 @@ unsafe extern "C" fn mqtt_protocol_version_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_MQTT) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u8_parse(raw) as *mut c_void;
+    let ctx = SCDetectU8Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -705,7 +705,7 @@ unsafe extern "C" fn mqtt_protocol_version_match(
 
 unsafe extern "C" fn mqtt_protocol_version_free(_de: *mut c_void, ctx: *mut c_void) {
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 // maybe to factor with websocket.flags
@@ -817,7 +817,7 @@ unsafe extern "C" fn mqtt_flags_match(
 
 unsafe extern "C" fn mqtt_flags_free(_de: *mut c_void, ctx: *mut c_void) {
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 fn parse_conn_flag_list_item(s: &str) -> IResult<&str, MqttParsedFlagItem> {
@@ -933,7 +933,7 @@ unsafe extern "C" fn mqtt_conn_flags_match(
 
 unsafe extern "C" fn mqtt_conn_flags_free(_de: *mut c_void, ctx: *mut c_void) {
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn mqtt_conn_willtopic_setup(
index 9f724d7cd3052a0a5edcf9cb26a8e6d07e874ebc..bbbb81f0c7fedacec9c3d6c7a3e59311d710e583 100644 (file)
@@ -20,7 +20,7 @@
 use super::parser::RFBSecurityResultStatus;
 use super::rfb::{RFBTransaction, ALPROTO_RFB};
 use crate::detect::uint::{
-    detect_match_uint, detect_parse_uint_enum, rs_detect_u32_free, rs_detect_u32_parse,
+    detect_match_uint, detect_parse_uint_enum, SCDetectU32Free, SCDetectU32Parse,
     DetectUintData,
 };
 use crate::detect::{
@@ -89,7 +89,7 @@ unsafe extern "C" fn rfb_sec_type_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_RFB) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -121,7 +121,7 @@ unsafe extern "C" fn rfb_sec_type_match(
 
 unsafe extern "C" fn rfb_sec_type_free(_de: *mut c_void, ctx: *mut c_void) {
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn rfb_parse_sec_result(
@@ -183,7 +183,7 @@ unsafe extern "C" fn rfb_sec_result_match(
 unsafe extern "C" fn rfb_sec_result_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 #[no_mangle]
index 0c07538c7fe2d3ae137b5953c7740a18d208de0a..2bd2315ab5e3674f2fd6a1b125a21366c3abb132 100644 (file)
@@ -19,7 +19,7 @@
 
 use super::snmp::{SNMPTransaction, ALPROTO_SNMP};
 use crate::detect::uint::{
-    rs_detect_u32_free, rs_detect_u32_match, rs_detect_u32_parse, DetectUintData,
+    SCDetectU32Free, SCDetectU32Match, SCDetectU32Parse, DetectUintData,
 };
 use crate::detect::{
     DetectBufferSetActiveList, DetectHelperBufferMpmRegister, DetectHelperBufferRegister,
@@ -41,7 +41,7 @@ unsafe extern "C" fn snmp_detect_version_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_SNMP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -59,13 +59,13 @@ unsafe extern "C" fn snmp_detect_version_match(
 ) -> c_int {
     let tx = cast_pointer!(tx, SNMPTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    return rs_detect_u32_match(tx.version, ctx);
+    return SCDetectU32Match(tx.version, ctx);
 }
 
 unsafe extern "C" fn snmp_detect_version_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn snmp_detect_pdutype_setup(
@@ -74,7 +74,7 @@ unsafe extern "C" fn snmp_detect_pdutype_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_SNMP) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -94,7 +94,7 @@ unsafe extern "C" fn snmp_detect_pdutype_match(
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
     if let Some(ref info) = tx.info {
         let pdu_type = info.pdu_type.0;
-        return rs_detect_u32_match(pdu_type, ctx);
+        return SCDetectU32Match(pdu_type, ctx);
     }
     return 0;
 }
@@ -102,7 +102,7 @@ unsafe extern "C" fn snmp_detect_pdutype_match(
 unsafe extern "C" fn snmp_detect_pdutype_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 pub unsafe extern "C" fn snmp_detect_usm_setup(
index 2d4614ae5ac023e9383b1652d011c467c0f219c2..908e4fb6a59b2afaad07afb3e58aa84bba5c2bb5 100644 (file)
@@ -17,8 +17,8 @@
 
 use super::websocket::{WebSocketTransaction, ALPROTO_WEBSOCKET};
 use crate::detect::uint::{
-    detect_parse_uint, detect_parse_uint_enum, rs_detect_u32_free, rs_detect_u32_match,
-    rs_detect_u32_parse, rs_detect_u8_free, rs_detect_u8_match, DetectUintData, DetectUintMode,
+    detect_parse_uint, detect_parse_uint_enum, SCDetectU32Free, SCDetectU32Match,
+    SCDetectU32Parse, SCDetectU8Free, SCDetectU8Match, DetectUintData, DetectUintMode,
 };
 use crate::detect::{
     DetectBufferSetActiveList, DetectHelperBufferMpmRegister, DetectHelperBufferRegister,
@@ -148,13 +148,13 @@ unsafe extern "C" fn websocket_detect_opcode_match(
 ) -> c_int {
     let tx = cast_pointer!(tx, WebSocketTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    return rs_detect_u8_match(tx.pdu.opcode, ctx);
+    return SCDetectU8Match(tx.pdu.opcode, ctx);
 }
 
 unsafe extern "C" fn websocket_detect_opcode_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 unsafe extern "C" fn websocket_detect_mask_setup(
@@ -163,7 +163,7 @@ unsafe extern "C" fn websocket_detect_mask_setup(
     if DetectSignatureSetAppProto(s, ALPROTO_WEBSOCKET) != 0 {
         return -1;
     }
-    let ctx = rs_detect_u32_parse(raw) as *mut c_void;
+    let ctx = SCDetectU32Parse(raw) as *mut c_void;
     if ctx.is_null() {
         return -1;
     }
@@ -189,7 +189,7 @@ unsafe extern "C" fn websocket_detect_mask_match(
     let tx = cast_pointer!(tx, WebSocketTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
     if let Some(xorkey) = tx.pdu.mask {
-        return rs_detect_u32_match(xorkey, ctx);
+        return SCDetectU32Match(xorkey, ctx);
     }
     return 0;
 }
@@ -197,7 +197,7 @@ unsafe extern "C" fn websocket_detect_mask_match(
 unsafe extern "C" fn websocket_detect_mask_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u32>);
-    rs_detect_u32_free(ctx);
+    SCDetectU32Free(ctx);
 }
 
 unsafe extern "C" fn websocket_detect_flags_setup(
@@ -231,13 +231,13 @@ unsafe extern "C" fn websocket_detect_flags_match(
 ) -> c_int {
     let tx = cast_pointer!(tx, WebSocketTransaction);
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    return rs_detect_u8_match(tx.pdu.flags, ctx);
+    return SCDetectU8Match(tx.pdu.flags, ctx);
 }
 
 unsafe extern "C" fn websocket_detect_flags_free(_de: *mut c_void, ctx: *mut c_void) {
     // Just unbox...
     let ctx = cast_pointer!(ctx, DetectUintData<u8>);
-    rs_detect_u8_free(ctx);
+    SCDetectU8Free(ctx);
 }
 
 pub unsafe extern "C" fn websocket_detect_payload_setup(
index 3b544b487d255028381f66d9d3bd366770872421..2fea92abbcf81cfec2ee8b66fc537dfe8870f8cb 100644 (file)
@@ -219,7 +219,7 @@ void DetectBsizeFree(DetectEngineCtx *de_ctx, void *ptr)
         return;
 
     DetectU64Data *bsz = (DetectU64Data *)ptr;
-    rs_detect_u64_free(bsz);
+    SCDetectU64Free(bsz);
 }
 
 #ifdef UNITTESTS
index 6e9f819fc217347c4472511467d22537047e2461..4db35d508beb905731c192a88f3f71d1d410074e 100644 (file)
@@ -58,7 +58,7 @@ static void DetectDnsOpcodeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     SCEnter();
     if (ptr != NULL) {
-        rs_detect_u8_free(ptr);
+        SCDetectU8Free(ptr);
     }
     SCReturn;
 }
index b6505b7c61be295850098b8fc5f6eee41a8665fd..2f4412d8950faafb34cd2b73158e6360e2ab7c56 100644 (file)
@@ -54,7 +54,7 @@ static void DetectDnsRcodeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     SCEnter();
     if (ptr != NULL) {
-        rs_detect_u8_free(ptr);
+        SCDetectU8Free(ptr);
     }
     SCReturn;
 }
index abfe9c7d5e736bb0bea787b634cd2e52b5dfcc35..0c554126380935721b2f72dfb0310d24feb6f6a2 100644 (file)
@@ -54,7 +54,7 @@ static void DetectDnsRrtypeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     SCEnter();
     if (ptr != NULL) {
-        rs_detect_u16_free(ptr);
+        SCDetectU16Free(ptr);
     }
     SCReturn;
 }
index 12d4da3e10651bcfe029b3c33eb61e25dd62ad83..15859ff1f39599fdfededc741add92fc6c6ec428 100644 (file)
@@ -137,7 +137,7 @@ static int DetectDsizeSetup (DetectEngineCtx *de_ctx, Signature *s, const char *
     SigMatch *sm = SigMatchAppendSMToList(
             de_ctx, s, DETECT_DSIZE, (SigMatchCtx *)dd, DETECT_SM_LIST_MATCH);
     if (sm == NULL) {
-        rs_detect_u16_free(dd);
+        SCDetectU16Free(dd);
         return -1;
     }
 
@@ -162,7 +162,7 @@ static int DetectDsizeSetup (DetectEngineCtx *de_ctx, Signature *s, const char *
  */
 void DetectDsizeFree(DetectEngineCtx *de_ctx, void *de_ptr)
 {
-    rs_detect_u16_free(de_ptr);
+    SCDetectU16Free(de_ptr);
 }
 
 /* prefilter code */
index a02552bcd9dec983230f3b535722078f8c54aed7..c8149dc2fc4b1e579aa3f6b34789bcef11d37466 100644 (file)
@@ -30,7 +30,7 @@
 
 int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
 {
-    return rs_detect_u32_match(parg, du32);
+    return SCDetectU32Match(parg, du32);
 }
 
 /**
@@ -44,7 +44,7 @@ int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
 
 DetectUintData_u32 *DetectU32Parse(const char *u32str)
 {
-    return rs_detect_u32_parse(u32str);
+    return SCDetectU32Parse(u32str);
 }
 
 void
@@ -70,7 +70,7 @@ PrefilterPacketU32Compare(PrefilterPacketHeaderValue v, void *smctx)
 //same as u32 but with u8
 int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
 {
-    return rs_detect_u8_match(parg, du8);
+    return SCDetectU8Match(parg, du8);
 }
 
 /**
@@ -84,7 +84,7 @@ int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
 
 DetectUintData_u8 *DetectU8Parse(const char *u8str)
 {
-    return rs_detect_u8_parse(u8str);
+    return SCDetectU8Parse(u8str);
 }
 
 void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
@@ -106,7 +106,7 @@ bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
 // same as u32 but with u16
 int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
 {
-    return rs_detect_u16_match(parg, du16);
+    return SCDetectU16Match(parg, du16);
 }
 
 /**
@@ -120,7 +120,7 @@ int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
 
 DetectUintData_u16 *DetectU16Parse(const char *u16str)
 {
-    return rs_detect_u16_parse(u16str);
+    return SCDetectU16Parse(u16str);
 }
 
 void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx)
@@ -141,10 +141,10 @@ bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx)
 
 int DetectU64Match(const uint64_t parg, const DetectUintData_u64 *du64)
 {
-    return rs_detect_u64_match(parg, du64);
+    return SCDetectU64Match(parg, du64);
 }
 
 DetectUintData_u64 *DetectU64Parse(const char *u64str)
 {
-    return rs_detect_u64_parse(u64str);
+    return SCDetectU64Parse(u64str);
 }
index f021dd6e5edaac0ba241f85c321b04a4e5b07a58..e0b430bbfd877c2be27bbd9e39df78ca2da1afa6 100644 (file)
@@ -143,7 +143,7 @@ static int DetectFilesizeSetup (DetectEngineCtx *de_ctx, Signature *s, const cha
  */
 static void DetectFilesizeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u64_free(ptr);
+    SCDetectU64Free(ptr);
 }
 
 #ifdef UNITTESTS
index a9ec15b3ff6340d76ea4ab854c07052b6bb2f762..04854831d66d7082620b80e0a1a6bbd96b97e08c 100644 (file)
@@ -37,7 +37,7 @@ static int DetectFlowAgeMatch(
 
 static void DetectFlowAgeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
 
 static int DetectFlowAgeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr)
index 4d954a5ac96ae0206e6f08d5c5db6217c5a55164..ab64e5e5f4e7e4453806fc9f65f034d41f990215 100644 (file)
@@ -402,7 +402,7 @@ static int DetectHTTP2prioritySetup (DetectEngineCtx *de_ctx, Signature *s, cons
 
     if (SigMatchAppendSMToList(de_ctx, s, DETECT_HTTP2_PRIORITY, (SigMatchCtx *)prio,
                 g_http2_match_buffer_id) == NULL) {
-        rs_detect_u8_free(prio);
+        SCDetectU8Free(prio);
         return -1;
     }
 
@@ -416,7 +416,7 @@ static int DetectHTTP2prioritySetup (DetectEngineCtx *de_ctx, Signature *s, cons
  */
 void DetectHTTP2priorityFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
 
 /**
@@ -464,7 +464,7 @@ static int DetectHTTP2windowSetup (DetectEngineCtx *de_ctx, Signature *s, const
 
     if (SigMatchAppendSMToList(de_ctx, s, DETECT_HTTP2_WINDOW, (SigMatchCtx *)wu,
                 g_http2_match_buffer_id) == NULL) {
-        rs_detect_u32_free(wu);
+        SCDetectU32Free(wu);
         return -1;
     }
 
@@ -478,7 +478,7 @@ static int DetectHTTP2windowSetup (DetectEngineCtx *de_ctx, Signature *s, const
  */
 void DetectHTTP2windowFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
 
 /**
@@ -510,7 +510,7 @@ static int DetectHTTP2sizeUpdateSetup (DetectEngineCtx *de_ctx, Signature *s, co
     if (DetectSignatureSetAppProto(s, ALPROTO_HTTP2) != 0)
         return -1;
 
-    void *su = rs_detect_u64_parse(str);
+    void *su = SCDetectU64Parse(str);
     if (su == NULL)
         return -1;
 
@@ -530,7 +530,7 @@ static int DetectHTTP2sizeUpdateSetup (DetectEngineCtx *de_ctx, Signature *s, co
  */
 void DetectHTTP2sizeUpdateFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u64_free(ptr);
+    SCDetectU64Free(ptr);
 }
 
 /**
index 0d6724b1a6b288f271df53b51dcef1b051b2f4b4..864efee515a16bc62e6d69104eaabf105c174d17 100644 (file)
@@ -134,7 +134,7 @@ static int DetectICMPv6mtuSetup (DetectEngineCtx *de_ctx, Signature *s, const ch
  */
 void DetectICMPv6mtuFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
 
 /* prefilter code */
index 33c48582ae1c394067dc53d4eb0408943cb52107..494bec4fa7da0a0f9e0069984a59c148d7f284d2 100644 (file)
@@ -125,7 +125,7 @@ static int DetectICodeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *i
 
     if (SigMatchAppendSMToList(de_ctx, s, DETECT_ICODE, (SigMatchCtx *)icd, DETECT_SM_LIST_MATCH) ==
             NULL) {
-        rs_detect_u8_free(icd);
+        SCDetectU8Free(icd);
         return -1;
     }
     s->flags |= SIG_FLAG_REQUIRE_PACKET;
@@ -140,7 +140,7 @@ static int DetectICodeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *i
  */
 void DetectICodeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
 
 /* prefilter code */
index 887557990d4c9b9ca72ec4e6fd4f462c03233d4f..c72ae12914995c1a110424b63573013f6b7ea7fc 100644 (file)
@@ -135,5 +135,5 @@ error:
  */
 static void DetectIkeExchTypeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
index 23224443cc3ac72a5117021ddb2dd678300dca00..3740b7797447a50aa777d687d24d6734e1d5fe0a 100644 (file)
@@ -141,5 +141,5 @@ error:
  */
 static void DetectIkeKeyExchangePayloadLengthFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
index df6dd5d773707e874d6383594e72e17baeba953b..4cab7513d5547182cb3c402441daa1f6cf84bec8 100644 (file)
@@ -136,5 +136,5 @@ error:
  */
 static void DetectIkeNoncePayloadLengthFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
index 66920d5511c133f8eeb49a589c028ad6a24ec105..28dcfa5f8464c14a440b3ebedf8f081f96f2bee2 100644 (file)
@@ -138,7 +138,7 @@ static int DetectITypeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *i
 void DetectITypeFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     DetectU8Data *itd = (DetectU8Data *)ptr;
-    rs_detect_u8_free(itd);
+    SCDetectU8Free(itd);
 }
 
 /* prefilter code
index fb63eafa5f2206dac60807cb5729dfe53394ae78..1483234f0400f96571bf109e7601b1f01b595903 100644 (file)
@@ -133,7 +133,7 @@ static int DetectNfsProcedureMatch (DetectEngineThreadCtx *det_ctx,
  */
 static DetectU32Data *DetectNfsProcedureParse(const char *rawstr)
 {
-    return rs_detect_u32_parse_inclusive(rawstr);
+    return SCDetectU32ParseInclusive(rawstr);
 }
 
 
@@ -185,7 +185,7 @@ static int DetectNfsProcedureSetup (DetectEngineCtx *de_ctx, Signature *s,
  */
 void DetectNfsProcedureFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
 
 #ifdef UNITTESTS
index d9c18075d94a2be9b2270cecfd07fbf63ef7618f..207bc6f13ee3d30d081f6859af8d967cedc5fb41 100644 (file)
@@ -118,7 +118,7 @@ static int DetectNfsVersionMatch (DetectEngineThreadCtx *det_ctx,
  */
 static DetectU32Data *DetectNfsVersionParse(const char *rawstr)
 {
-    return rs_detect_u32_parse_inclusive(rawstr);
+    return SCDetectU32ParseInclusive(rawstr);
 }
 
 
@@ -171,5 +171,5 @@ error:
  */
 void DetectNfsVersionFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
index e4bf4aac93f10a4b3be110f7c0bf4daafef24722..b1b504960d1358f9f7d74262bbd9e25be2180f09 100644 (file)
@@ -121,7 +121,7 @@ static int DetectTcpmssSetup (DetectEngineCtx *de_ctx, Signature *s, const char
  */
 void DetectTcpmssFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u16_free(ptr);
+    SCDetectU16Free(ptr);
 }
 
 /* prefilter code */
index da640064d401e3fa6707ff89ce7b4cf65f20ffe6..2dbe684f186306a51cf7322f6ea47b73270285ab 100644 (file)
@@ -127,7 +127,7 @@ static int DetectTemplate2Setup (DetectEngineCtx *de_ctx, Signature *s, const ch
  */
 void DetectTemplate2Free(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
 
 /* prefilter code */
index a626769994ed12a9faf0025ba9ac30023540ba3d..a45bb775d9dbba5642da8820c9b3b8c028646e04 100644 (file)
@@ -210,7 +210,7 @@ static int DetectTLSCertChainLenMatch(DetectEngineThreadCtx *det_ctx, Flow *f, u
  */
 static void DetectTLSCertChainLenFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u32_free(ptr);
+    SCDetectU32Free(ptr);
 }
 
 /**
@@ -237,7 +237,7 @@ static int DetectTLSCertChainLenSetup(DetectEngineCtx *de_ctx, Signature *s, con
 
     if (SigMatchAppendSMToList(de_ctx, s, KEYWORD_ID, (SigMatchCtx *)dd, g_tls_cert_buffer_id) ==
             NULL) {
-        rs_detect_u32_free(dd);
+        SCDetectU32Free(dd);
         return -1;
     }
     return 0;
index 3c7f60eb0f6bd361695df3ffeedca279ebe0dffa..3190179ee809c5390748724b91f9e6e89e40c20d 100644 (file)
@@ -131,7 +131,7 @@ static int DetectTtlSetup (DetectEngineCtx *de_ctx, Signature *s, const char *tt
  */
 void DetectTtlFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
 
 /* prefilter code */
index 9b9e085bf9b954505528d71011b9efce0169599e..d938030eb945193891d709366209dec123c612bf 100644 (file)
@@ -152,7 +152,7 @@ static int DetectVlanLayersMatch(
 
 static void DetectVlanLayersFree(DetectEngineCtx *de_ctx, void *ptr)
 {
-    rs_detect_u8_free(ptr);
+    SCDetectU8Free(ptr);
 }
 
 static int DetectVlanLayersSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr)