Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert byte_extract parser to Rust. #10701

Closed
wants to merge 3 commits into from
Closed

Conversation

jlucovsky
Copy link
Contributor

Continuation of #10624

Convert the byte_extract option parser from C to Rust.

Link to redmine ticket: 6873

Describe changes:

  • Refactor code in rust/src/detect to support re-usability
  • Implement the byte_extract parser in Rust, with unittests
  • Modify the existing byte_extract module to use the Rust parser

Updates:

  • Address review comments
  • Use Option for utility functions in mod.rs

Provide values to any of the below to override the defaults.

To use a pull request use a branch name like pr/N where N is the
pull request number.

Alternatively, SV_BRANCH may also be a link to an
OISF/suricata-verify pull-request.

SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Issue: 6873

Refactor the enums for endian and base handling for broader use.
Implement the keyword parser in Rust.

Issue: 6831
This commit uses Option instead of Result.

Issue: 6831
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 97.30942% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 82.69%. Comparing base (f7cde8f) to head (3fb8b57).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10701      +/-   ##
==========================================
+ Coverage   82.66%   82.69%   +0.02%     
==========================================
  Files         926      927       +1     
  Lines      247633   247520     -113     
==========================================
- Hits       204714   204680      -34     
+ Misses      42919    42840      -79     
Flag Coverage Δ
fuzzcorpus 64.03% <77.22%> (+0.05%) ⬆️
suricata-verify 62.00% <60.89%> (+0.01%) ⬆️
unittests 62.19% <95.85%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 19735

@jlucovsky
Copy link
Contributor Author

Continued in #10706

@jlucovsky jlucovsky closed this Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants