rust/ffi: bindgen flow storage

Ticket: #8447
This commit is contained in:
Jason Ish 2026-05-22 16:58:23 -06:00
parent c0bd47e37a
commit 333f4f686c
3 changed files with 35 additions and 0 deletions

View file

@ -1846,6 +1846,38 @@ extern "C" {
#[doc = " \\internal\n\n Run all registered flow init callbacks."]
pub fn SCFlowRunFinishCallbacks(tv: *mut ThreadVars, f: *mut Flow);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
pub struct SCFlowStorageId {
pub id: ::std::os::raw::c_int,
}
extern "C" {
pub fn SCFlowStorageSize() -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn SCFlowGetStorageById(h: *const Flow, id: SCFlowStorageId)
-> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn SCFlowSetStorageById(
h: *mut Flow, id: SCFlowStorageId, ptr: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn SCFlowFreeStorageById(h: *mut Flow, id: SCFlowStorageId);
}
extern "C" {
pub fn SCFlowFreeStorage(h: *mut Flow);
}
extern "C" {
pub fn SCRegisterFlowStorageTests();
}
extern "C" {
pub fn SCFlowStorageRegister(
name: *const ::std::os::raw::c_char,
Free: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
) -> SCFlowStorageId;
}
extern "C" {
pub fn SCSRepCatGetByShortname(shortname: *const ::std::os::raw::c_char) -> u8;
}

View file

@ -63,6 +63,7 @@
#include "flow-bindgen.h"
#include "flow-callbacks.h"
#include "flow-storage.h"
#include "reputation.h"
#include "feature.h"

View file

@ -26,7 +26,9 @@
#ifndef SURICATA_FLOW_STORAGE_H
#define SURICATA_FLOW_STORAGE_H
#ifndef SURICATA_BINDGEN_H
#include "flow.h"
#endif
typedef struct SCFlowStorageId {
int id;