Optimization #2780
openConvert DNP3 from C to Rust
Description
Convert parser from C to Rust.
Related to https://redmine.openinfosecfoundation.org/issues/2778
Updated by Danny Browning almost 6 years ago
- Related to Task #2778: tracking: port app-layer parsers to Rust added
Updated by Victor Julien almost 6 years ago
- Target version changed from 5.0beta1 to TBD
Updated by Victor Julien almost 6 years ago
- Tracker changed from Bug to Optimization
Updated by Simon Dugas almost 4 years ago
We are working on a rust parser for DNP3 so I wouldn't mind taking on this ticket.
The move/implementation would be similar to modbus (https://github.com/OISF/suricata/pull/5810) once that code review is finalized.
Implementation Steps- Move app-layer parser for DNP3 from C to Rust, leaving C tests as much as possible.
- Move detection module for DNP3 from C to Rust, leaving C tests as much as possible.
- Move tests from C to rust.
Out of Scope
Should we move eve json logging for DNP3 to rust or is this out of scope?
Updated by Jason Ish almost 4 years ago
Once the transaction objects are Rust, I think its only natural to have the logging in Rust as well, otherwise there will be a lot of getter's or unecessary restrictions keeping the structs C compatible. The C code uses the same input to generate the loggers as it does the parser.
Have you taked a look at https://github.com/rust-bakery/nom-derive? I thought something like that, or inspired by it might help with a migration of DNP3 to Rust.
Updated by Simon Dugas almost 4 years ago
Haven't heard of `nom-derive`. Thank you for the info.