]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/iprep: update function naming
authorVictor Julien <vjulien@oisf.net>
Thu, 6 Jun 2024 15:24:20 +0000 (17:24 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 15 Jun 2024 13:43:28 +0000 (15:43 +0200)
Bring in line with new Rust code naming for FFI functions.

rust/src/detect/iprep.rs
src/detect-iprep.c

index 6604628edd13404f471eeaca09016e5068ce5aa9..f4082683c384c1651d85cde93eb97a255d3c4e71 100644 (file)
@@ -147,7 +147,7 @@ pub fn detect_parse_iprep(i: &str) -> IResult<&str, DetectIPRepData, RuleParseEr
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_iprep_parse(
+pub unsafe extern "C" fn SCDetectIPRepParse(
     ustr: *const std::os::raw::c_char,
 ) -> *mut DetectIPRepData {
     let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe
@@ -161,7 +161,7 @@ pub unsafe extern "C" fn rs_detect_iprep_parse(
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn rs_detect_iprep_free(ctx: &mut DetectIPRepData) {
+pub unsafe extern "C" fn SCDetectIPRepFree(ctx: &mut DetectIPRepData) {
     // Just unbox...
     std::mem::drop(Box::from_raw(ctx));
 }
index 93cf5b8b0e8957aa7bc7990b99ea84be35dff388..d4ba6ced55af34bc4bfe4c7d8d91718c27716894 100644 (file)
@@ -257,7 +257,7 @@ static int DetectIPRepMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
 
 int DetectIPRepSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawstr)
 {
-    DetectIPRepData *cd = rs_detect_iprep_parse(rawstr);
+    DetectIPRepData *cd = SCDetectIPRepParse(rawstr);
     if (cd == NULL) {
         SCLogError("\"%s\" is not a valid setting for iprep", rawstr);
         goto error;
@@ -287,7 +287,7 @@ void DetectIPRepFree (DetectEngineCtx *de_ctx, void *ptr)
     if (fd == NULL)
         return;
 
-    rs_detect_iprep_free(fd);
+    SCDetectIPRepFree(fd);
 }
 
 #ifdef UNITTESTS