Project

General

Profile

Actions

Optimization #3524

closed

Remove unsafe Rust code for ALPROTO_X constants

Added by Philippe Antoine about 4 years ago. Updated 11 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Effort:
Difficulty:
Label:

Description

Now, these constants are defined in C enumeration `AppProtoEnum`

In Rust, we use a global variable ('`static mut`) whose value we get as a return of a C function call.
As a global variable, we must use `unsafe` every time we read it

We should either :
- export these from C to Rust with bindgen
- move this enum to Rust and export it to C with cbindgen (cbindgen is already used)


Related issues 1 (1 open0 closed)

Related to Suricata - Task #5053: app-layer: dynamic alproto IDsNewOISF DevActions
Actions

Also available in: Atom PDF