Actions
Optimization #7762
openrust: finish moving extern C definitions to suricata_sys and bindgen
Effort:
Difficulty:
Label:
Actions
Added by Philippe Antoine 7 months ago. Updated 18 days ago.
applayer.rs and frames.rs share the same problem : we want to bindgen a C function like `AppLayerFrameNewByRelativeOffset` which uses as argument of type `StreamSlice` which is defined in rust
This is going to be the difficult part.
There are some easier things to do first
Goal : makegit grep 'extern "C" {' rust/src/
return nothing
AppLayerRegisterParser difficulty is that AppLayerParserFPtr uses StreamSlice as an argument and it is defined in rust...
Philippe Antoine wrote in #note-7:
AppLayerRegisterParser difficulty is that AppLayerParserFPtr uses StreamSlice as an argument and it is defined in rust...
Solutions :
- move StreamSlice definition to C
- Have function prototype use a void*, then cast
@Jason Ish, what do you think about moving definitions to C ?