rust/ffi: bindgen flow storage

Ticket: #8447
pull/16053/head
Jason Ish 3 months ago committed by Victor Julien
parent 8cf5d4d770
commit f3332694e3

@ -1919,6 +1919,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;
}
#[doc = " \\brief Function type for thread intialization callbacks.\n\n Once registered by SCThreadRegisterInitCallback, this function will\n be called for every thread being initialized during Suricata\n startup.\n\n \\param tv The ThreadVars struct that has just been initialized.\n \\param user The user data provided when registering the callback."]
pub type SCThreadInitCallbackFn = ::std::option::Option<
unsafe extern "C" fn(tv: *mut ThreadVars, user: *mut ::std::os::raw::c_void),

@ -62,6 +62,7 @@
#include "flow-bindgen.h"
#include "flow-callbacks.h"
#include "flow-storage.h"
#include "thread-callbacks.h"
#include "thread-storage.h"

@ -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;

Loading…
Cancel
Save