rust: bindgen SCDetectHelperKeywordAliasRegister

Ticket: 7667
pull/13230/head
Philippe Antoine 4 months ago committed by Victor Julien
parent a7448a0c16
commit f909bbba68

@ -35,7 +35,7 @@ pub mod tojson;
pub mod vlan;
pub mod datasets;
use std::os::raw::{c_char, c_int, c_void};
use std::os::raw::{c_int, c_void};
use std::ffi::CString;
use suricata_sys::sys::{AppProto, DetectEngineCtx, Signature};
@ -169,7 +169,6 @@ extern "C" {
) -> *mut c_void,
) -> c_int;
pub fn DetectHelperKeywordRegister(kw: *const SCSigTableAppLiteElmt) -> c_int;
pub fn DetectHelperKeywordAliasRegister(kwid: c_int, alias: *const c_char);
pub fn DetectSignatureSetAppProto(s: *mut Signature, alproto: AppProto) -> c_int;
pub fn SigMatchAppendSMToList(
de: *mut DetectEngineCtx, s: *mut Signature, kwid: c_int, ctx: *const c_void, bufid: c_int,

@ -22,16 +22,16 @@ use crate::detect::uint::{
SCDetectU8Parse,
};
use crate::detect::{
helper_keyword_register_sticky_buffer, DetectHelperKeywordAliasRegister,
DetectHelperKeywordRegister, DetectSignatureSetAppProto, SCSigTableAppLiteElmt,
SigMatchAppendSMToList, SigTableElmtStickyBuffer,
helper_keyword_register_sticky_buffer, DetectHelperKeywordRegister, DetectSignatureSetAppProto,
SCSigTableAppLiteElmt, SigMatchAppendSMToList, SigTableElmtStickyBuffer,
};
use crate::direction::Direction;
use std::ffi::CStr;
use std::os::raw::{c_int, c_void};
use suricata_sys::sys::{
DetectEngineCtx, DetectEngineThreadCtx, SCDetectBufferSetActiveList,
SCDetectHelperBufferRegister, SCDetectHelperMultiBufferProgressMpmRegister, Signature,
SCDetectHelperBufferRegister, SCDetectHelperKeywordAliasRegister,
SCDetectHelperMultiBufferProgressMpmRegister, Signature,
};
/// Perform the DNS opcode match.
@ -411,7 +411,7 @@ pub unsafe extern "C" fn SCDetectDNSRegister() {
setup: dns_detect_query_setup,
};
let g_dns_query_name_kw_id = helper_keyword_register_sticky_buffer(&kw);
DetectHelperKeywordAliasRegister(
SCDetectHelperKeywordAliasRegister(
g_dns_query_name_kw_id,
b"dns_query\0".as_ptr() as *const libc::c_char,
);

@ -326,6 +326,11 @@ pub struct SCTransformTableElmt {
extern "C" {
pub fn SCDetectHelperNewKeywordId() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn SCDetectHelperKeywordAliasRegister(
kwid: ::std::os::raw::c_int, alias: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn SCDetectHelperBufferRegister(
name: *const ::std::os::raw::c_char, alproto: AppProto, direction: u8,

@ -139,7 +139,7 @@ int DetectHelperKeywordRegister(const SCSigTableAppLiteElmt *kw)
return keyword_id;
}
void DetectHelperKeywordAliasRegister(int kwid, const char *alias)
void SCDetectHelperKeywordAliasRegister(int kwid, const char *alias)
{
sigmatch_table[kwid].alias = alias;
}

@ -76,7 +76,7 @@ typedef struct SCTransformTableElmt {
int SCDetectHelperNewKeywordId(void);
int DetectHelperKeywordRegister(const SCSigTableAppLiteElmt *kw);
void DetectHelperKeywordAliasRegister(int kwid, const char *alias);
void SCDetectHelperKeywordAliasRegister(int kwid, const char *alias);
int SCDetectHelperBufferRegister(const char *name, AppProto alproto, uint8_t direction);
typedef bool (*SimpleGetTxBuffer)(void *, uint8_t, const uint8_t **, uint32_t *);

Loading…
Cancel
Save