Commit Graph

16 Commits (16f74c68aaa976eaef70b840b72e3039f7d0508d)

Author SHA1 Message Date
Jason Ish 8b2fafcfa2 version: start development towards 8.0.0-rc1 3 months ago
Philippe Antoine 51859050cb rust: export jsonbuilder API in sys crate
using cbindgen + bindgen
3 months ago
Philippe Antoine 3b271b3f5b detect: rename with prefix SCSigTablePreRegister
to make it available to rust via bindgen
3 months ago
Philippe Antoine d24a3eb5f6 snmp: register protocol dynamically
Ticket: 4103
3 months ago
Philippe Antoine 924129b185 output: public header for use in rust
Ticket: 5053

Move enum OutputJsonLogDirection and struct
EveJsonTxLoggerRegistrationData to a public header user by rust
thanks to bindgen

Rename to use SC prefix on the way

And make EveJsonSimpleTxLogFunc use a const pointer to transaction
3 months ago
Philippe Antoine 243d14cda2 output: plugins can log flow or packet direction 3 months ago
Philippe Antoine 850bd72399 app-layer: helper function AppProtoNewProtoFromString
So that we do not have to know g_alproto_max to register
dynamically a new protocol from its name
3 months ago
Philippe Antoine 30af626a92 conf: extend API for rust
Will allow rust to list the values of an array such as
dns.types for outputs
3 months ago
Jason Ish 813eb27b95 rust/conf: use generated bindings to SCConf API 3 months ago
Philippe Antoine c164cfcf6b plugins: check version for all plugins 3 months ago
Philippe Antoine 5742df3783 plugins: bind constant SC_PLUGIN_API_VERSION 3 months ago
Philippe Antoine 52862e50be plugin: constify some fields
including the tx parameter to the logger function
3 months ago
Jason Ish 10ede91536 rust: add bindings to SCPlugin.* to sys crate
Also disable bindgen's generated layout tests.  They are valid for the
platform generating the tests, but may not be valid for other
platforms. For example, if the tests are generated on a 64 bit
platform the tests will not be valid when run on a 32 bit platform as
pointers are a different size.

However, the generating bindings are valid for both platform.

Ticket: #7341
5 months ago
Jason Ish 9b73de6f6d rust: add auto-generated header to sys.rs
We don't keep bindgen's autogenerated do not edit line as it contains
the bindgen version which could break the CI check for out of date
bindings. So add our own do not edit line.

Ticket: #7341
5 months ago
Jason Ish 21ccc4f307 rust: integrate bindgen to generate Rust bindings to C
Bindgen works by processing a header file which includes all other
header files it should generate bindings for. For this I've created
bindgen.h which just includes app-layer-protos.h for now as an
example.

These bindings are then generated and saved in the "suricata-sys"
crate and become availale as "suricata_sys::sys".

Ticket: #7341
5 months ago
Jason Ish 8f22e55678 rust/sys: stub in suricata-sys crate for Rust bindings to C
Follow Rust convention of using a "sys" crate for bindings to C
functions. The bindings don't exist yet, but will be generated by
bindgen and put into this crate.

Ticket: #7341
5 months ago