diff --git a/rust/src/detect/transforms/casechange.rs b/rust/src/detect/transforms/casechange.rs index c719ef1546..f081aa2d9a 100644 --- a/rust/src/detect/transforms/casechange.rs +++ b/rust/src/detect/transforms/casechange.rs @@ -27,7 +27,6 @@ use std::ptr; static mut G_TRANSFORM_TOLOWER_ID: c_int = 0; static mut G_TRANSFORM_TOUPPER_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn tolower_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -40,7 +39,6 @@ fn tolower_transform_do(input: &[u8], output: &mut [u8]) { } } -#[no_mangle] unsafe extern "C" fn tolower_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -61,7 +59,6 @@ unsafe extern "C" fn tolower_transform(buffer: *mut c_void, _ctx: *mut c_void) { InspectionBufferTruncate(buffer, input_len); } -#[no_mangle] unsafe extern "C" fn tolower_validate(content: *const u8, len: u16, _ctx: *mut c_void) -> bool { let input = build_slice!(content, len as usize); for &c in input { @@ -90,7 +87,6 @@ pub unsafe extern "C" fn DetectTransformToLowerRegister() { } } -#[no_mangle] unsafe extern "C" fn toupper_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -103,7 +99,6 @@ fn toupper_transform_do(input: &[u8], output: &mut [u8]) { } } -#[no_mangle] unsafe extern "C" fn toupper_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -124,7 +119,6 @@ unsafe extern "C" fn toupper_transform(buffer: *mut c_void, _ctx: *mut c_void) { InspectionBufferTruncate(buffer, input_len); } -#[no_mangle] unsafe extern "C" fn toupper_validate(content: *const u8, len: u16, _ctx: *mut c_void) -> bool { let input = build_slice!(content, len as usize); for &c in input { diff --git a/rust/src/detect/transforms/compress_whitespace.rs b/rust/src/detect/transforms/compress_whitespace.rs index 3e97e46c18..d985fa4319 100644 --- a/rust/src/detect/transforms/compress_whitespace.rs +++ b/rust/src/detect/transforms/compress_whitespace.rs @@ -26,7 +26,6 @@ use std::ptr; static mut G_TRANSFORM_COMPRESS_WHITESPACE_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn compress_whitespace_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -50,7 +49,6 @@ fn compress_whitespace_transform_do(input: &[u8], output: &mut [u8]) -> u32 { return nb as u32; } -#[no_mangle] unsafe extern "C" fn compress_whitespace_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -86,7 +84,6 @@ fn compress_whitespace_validate_do(input: &[u8]) -> bool { return true; } -#[no_mangle] unsafe extern "C" fn compress_whitespace_validate( content: *const u8, len: u16, _ctx: *mut c_void, ) -> bool { diff --git a/rust/src/detect/transforms/dotprefix.rs b/rust/src/detect/transforms/dotprefix.rs index 56e927226e..60cbf8859d 100644 --- a/rust/src/detect/transforms/dotprefix.rs +++ b/rust/src/detect/transforms/dotprefix.rs @@ -26,7 +26,6 @@ use std::ptr; static mut G_TRANSFORM_DOT_PREFIX_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn dot_prefix_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -42,7 +41,6 @@ fn dot_prefix_transform_do(input: &[u8], output: &mut [u8]) { output[0] = b'.'; } -#[no_mangle] unsafe extern "C" fn dot_prefix_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input_len = InspectionBufferLength(buffer); if input_len == 0 { diff --git a/rust/src/detect/transforms/hash.rs b/rust/src/detect/transforms/hash.rs index 1b94717803..d040258a65 100644 --- a/rust/src/detect/transforms/hash.rs +++ b/rust/src/detect/transforms/hash.rs @@ -35,7 +35,6 @@ static mut G_TRANSFORM_SHA256_ID: c_int = 0; const SC_MD5_LEN: usize = 16; -#[no_mangle] unsafe extern "C" fn md5_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -50,7 +49,6 @@ fn md5_transform_do(input: &[u8], output: &mut [u8]) { Md5::new().chain(input).finalize_into(output.into()); } -#[no_mangle] unsafe extern "C" fn md5_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -89,7 +87,6 @@ pub unsafe extern "C" fn DetectTransformMd5Register() { } } -#[no_mangle] unsafe extern "C" fn sha1_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -104,7 +101,6 @@ fn sha1_transform_do(input: &[u8], output: &mut [u8]) { Sha1::new().chain(input).finalize_into(output.into()); } -#[no_mangle] unsafe extern "C" fn sha1_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -143,7 +139,6 @@ pub unsafe extern "C" fn DetectTransformSha1Register() { } } -#[no_mangle] unsafe extern "C" fn sha256_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -158,7 +153,6 @@ fn sha256_transform_do(input: &[u8], output: &mut [u8]) { Sha256::new().chain(input).finalize_into(output.into()); } -#[no_mangle] unsafe extern "C" fn sha256_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); diff --git a/rust/src/detect/transforms/http_headers.rs b/rust/src/detect/transforms/http_headers.rs index de40c83198..77fa17a0d4 100644 --- a/rust/src/detect/transforms/http_headers.rs +++ b/rust/src/detect/transforms/http_headers.rs @@ -27,7 +27,6 @@ use std::ptr; static mut G_TRANSFORM_HEADER_LOWER_ID: c_int = 0; static mut G_TRANSFORM_STRIP_PSEUDO_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn header_lowersetup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -53,7 +52,6 @@ fn header_lowertransform_do(input: &[u8], output: &mut [u8]) { } } -#[no_mangle] unsafe extern "C" fn header_lowertransform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -92,7 +90,6 @@ pub unsafe extern "C" fn DetectTransformHeaderLowercaseRegister() { } } -#[no_mangle] unsafe extern "C" fn strip_pseudo_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -117,7 +114,6 @@ fn strip_pseudo_transform_do(input: &[u8], output: &mut [u8]) -> u32 { return nb as u32; } -#[no_mangle] unsafe extern "C" fn strip_pseudo_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); diff --git a/rust/src/detect/transforms/strip_whitespace.rs b/rust/src/detect/transforms/strip_whitespace.rs index bb8c095cae..79d9373b7f 100644 --- a/rust/src/detect/transforms/strip_whitespace.rs +++ b/rust/src/detect/transforms/strip_whitespace.rs @@ -26,7 +26,6 @@ use std::ptr; static mut G_TRANSFORM_STRIP_WHITESPACE_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn strip_whitespace_setup( _de: *mut c_void, s: *mut c_void, _raw: *const std::os::raw::c_char, ) -> c_int { @@ -47,7 +46,6 @@ fn strip_whitespace_transform_do(input: &[u8], output: &mut [u8]) -> u32 { return nb as u32; } -#[no_mangle] unsafe extern "C" fn strip_whitespace_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); @@ -68,7 +66,6 @@ unsafe extern "C" fn strip_whitespace_transform(buffer: *mut c_void, _ctx: *mut InspectionBufferTruncate(buffer, output_len); } -#[no_mangle] unsafe extern "C" fn strip_whitespace_validate( content: *const u8, len: u16, _ctx: *mut c_void, ) -> bool { diff --git a/rust/src/detect/transforms/urldecode.rs b/rust/src/detect/transforms/urldecode.rs index 6359382d72..82c1a307bd 100644 --- a/rust/src/detect/transforms/urldecode.rs +++ b/rust/src/detect/transforms/urldecode.rs @@ -26,7 +26,6 @@ use std::ptr; static mut G_TRANSFORM_URL_DECODE_ID: c_int = 0; -#[no_mangle] unsafe extern "C" fn url_decode_setup( _de: *mut c_void, s: *mut c_void, _opt: *const std::os::raw::c_char, ) -> c_int { @@ -87,7 +86,6 @@ fn url_decode_transform_do(input: &[u8], output: &mut [u8]) -> u32 { return nb as u32; } -#[no_mangle] unsafe extern "C" fn url_decode_transform(buffer: *mut c_void, _ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer); diff --git a/rust/src/detect/transforms/xor.rs b/rust/src/detect/transforms/xor.rs index 6fae23e8f6..a9e204551a 100644 --- a/rust/src/detect/transforms/xor.rs +++ b/rust/src/detect/transforms/xor.rs @@ -58,7 +58,6 @@ unsafe fn xor_parse(raw: *const std::os::raw::c_char) -> *mut c_void { return std::ptr::null_mut(); } -#[no_mangle] unsafe extern "C" fn xor_setup( de: *mut c_void, s: *mut c_void, opt_str: *const std::os::raw::c_char, ) -> c_int { @@ -81,7 +80,6 @@ fn xor_transform_do(input: &[u8], output: &mut [u8], ctx: &DetectTransformXorDat } } -#[no_mangle] unsafe extern "C" fn xor_transform(buffer: *mut c_void, ctx: *mut c_void) { let input = InspectionBufferPtr(buffer); let input_len = InspectionBufferLength(buffer);