Commit Graph

32 Commits (5e0abf1572b6bddd06a5e30233e90f25e0874dc1)

Author SHA1 Message Date
Jason Ish c689af0bbb rust/ffi: bindgen thread lifecycle callbacks
Ticket: #8605
5 months ago
Jason Ish d4dc8be3b2 rust: bindgen flow lifecycle callbacks
Ticket: #8446
6 months ago
Jason Ish f6b11ac855 output-eve: finish exposing to bindgen
As all out output-eve.h is now exposed, merge output-eve.h and
output-eve-bindgen.h back into one file, output-eve.h.
9 months ago
Jason Ish f79158ae55 rust/sys: generate jsonbuilder bindings in sys
Bindgen the Rust bindings to the C JsonBuilder API along with the rest
of the Rust bindings to C. Breaking it out was probably the wrong
idea.

This should make it easier, and more correct to bindgen C functions
that use SCJsonBuilder types.
9 months ago
Jason Ish 1b182025bc output-eve: expose SCEveFileType to Rust with bindgen
There is an unfortunate side-affect that one has to read
output-eve-bindgen.h for the documentation on this type, however, I
think we can resolve that in time.
9 months ago
Philippe Antoine cba13ed9b1 rust: bindgen functions needed for datasets
Ticket: 7762
12 months ago
Philippe Antoine 12892ba010 rust: bindgen functions neede for features
Ticket: 7762
12 months ago
Philippe Antoine 439f96dea7 rust: bindgen frames functions
Ticket: 7667
12 months ago
Philippe Antoine 92c7be1cb6 rust: bindgen SCSRepCatGetByShortname
Ticket: 7667
12 months ago
Philippe Antoine 842352c190 rust: bindgen SCHttpRangeFreeBlock
Ticket: 7667
1 year ago
Philippe Antoine 93785ae357 rust: bindgen SCHTTP2MimicHttp1Request
Ticket: 7667
1 year ago
Philippe Antoine 958344787f rust: bindgen FileAppendData
Ticket: 7667
1 year ago
Philippe Antoine 811d28cc6b rust: bindgen util-spm-bs.h
for SCBasicSearchNocaseIndex

Ticket: 7667
1 year ago
Philippe Antoine cc845dccdb rust: bindgen GenericVarFree
Ticket: 7667
1 year ago
Philippe Antoine c52121586a rust: move AppLayerEvents funcs out of RustContext
Ticket: 7667

just use it directly, with bindgen, and cfg not test
1 year ago
Philippe Antoine bf6b8510fe rust: move DetectEngineStateFree out of RustContext
Ticket: 7667

just use it directly, with bindgen, and cfg not test
1 year ago
Philippe Antoine 573dd2367e rust: bindgen SCFileFlowFlagsToFlags
Ticket: 7667
1 year ago
Philippe Antoine b59086210f rust: bindgen flow ffi API
Ticket: 7667
1 year ago
Philippe Antoine bbf1424371 rust: bindgen MpmAddPatternCI
Ticket: 7667
1 year ago
Philippe Antoine c391451f19 rust: begin to bindgen app-layer-register.h
Ticket: 7667
1 year ago
Philippe Antoine 6d56beffef rust: bindgen AppLayerParserStateSetFlag
Ticket: 7667
1 year ago
Philippe Antoine 7bb0c94ae9 rust: bindgen app-layer-detect-proto.h
Ticket: 7667
1 year ago
Philippe Antoine 6bc86230a5 rust: bindgen part of util-debug.h
Ticket: 7667

Especially SCLogLevel whose enum redef is removed in rust
1 year ago
Philippe Antoine b1ef498a81 rust: bindgen detect-parse.h
Ticket: 7667

Currently no functions are exported.

DetectFile* struct are moved to detect-file-data.h where
they make more sense.

ifndef SURICATA_BINDGEN_H is used for bindgen to exclude
pcre2 related code
1 year ago
Philippe Antoine fd7bd9c200 src: new file detect-engine-inspect-buffer.h
For InspectionBuffer structure and related functions

Bindgen it for rust, especially transforms

Ticket: 7667
1 year ago
Philippe Antoine cf336396c3 rust: bindgen detect-engine-helper.h
Ticket: 7667

Begin by focusing on transforms
1 year ago
Philippe Antoine dadf9012fc rust: bindgen detect-engine-buffer.h
Ticket: 7667

And prefix SCDetectBufferSetActiveList to be exported

Allows less use of suricata crate in plugin as we get the functions
prototypes from suricata_sys and they are more correct.
2 years ago
Philippe Antoine 3b271b3f5b detect: rename with prefix SCSigTablePreRegister
to make it available to rust via bindgen
2 years 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
2 years ago
Jason Ish 813eb27b95 rust/conf: use generated bindings to SCConf API 2 years 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
2 years 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
2 years ago