Project

General

Profile

Actions

Optimization #3524

closed

Remove unsafe Rust code for ALPROTO_X constants

Added by Philippe Antoine over 4 years ago. Updated over 1 year 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 IDsIn ProgressPhilippe AntoineActions
Actions

Also available in: Atom PDF