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

Libhtp rs v27.1 small step for src #12474

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/2696

Describe changes:

  • prepare libhtp-rs by defining aliases for the new values used by libhtp-rs

This allow to go one small step further

The big libhtp-rs commit will remove app-layer-htp-libhtp.h which defines these aliases

#12442 next round

Draft : I am not sure the const change will please every compiler but it passed locally for me...

git diff libhtp-rs-v27 --name-only -- src/ gives

  • src/Makefile.am : remove libhtp.h 🟢
  • src/app-layer-htp-file.c : to fix in libhtp-rs-v27 still using HTP_OK in one comment 🚧
  • src/app-layer-htp-libhtp.c : removal 🟢
  • src/app-layer-htp-libhtp.h : removal 🟢
  • src/app-layer-htp.c : many changes as expected, and to be worked upon in a next PR 🚧
  • src/app-layer-htp.h : changes will remain until the final PR I think 🟢
  • src/detect-http-headers-stub.h : removal of libhtp.h 🟢
  • src/detect-http-host.c : need to keep NULL check for h, not only htp_header_value(h)
  • src/detect-http-protocol.c : #ifdef removed 🟢
  • src/detect-http-uri.c : uri_normalized access ❔
  • src/log-httplog.c : to be worked upon 🚧
  • src/output-json-http.c : some comment 🟢
  • src/suricata.c : changes will remain until the final PR I guess 🟢
  • src/util-lua-http.c : to be worked upon 🚧

In preparation of libhtp rust
In preparation of libhtp rust
In preparation of libhtp rust
In preparation of libhtp rust
In preparation of libhtp rust
In preparation of libhtp rust

Mainly using htp_header_value_ptr and htp_header_value_len
when possible
In preparation of libhtp rust

Mainly adding some const
In preparation of libhtp rust
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 96.15385% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.53%. Comparing base (d63ad75) to head (d439bc5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12474   +/-   ##
=======================================
  Coverage   80.52%   80.53%           
=======================================
  Files         923      923           
  Lines      259176   259179    +3     
=======================================
+ Hits       208708   208732   +24     
+ Misses      50468    50447   -21     
Flag Coverage Δ
fuzzcorpus 56.06% <90.32%> (+<0.01%) ⬆️
livemode 19.38% <0.00%> (-0.04%) ⬇️
pcap 44.24% <69.35%> (+0.04%) ⬆️
suricata-verify 63.34% <91.93%> (+0.01%) ⬆️
unittests 58.45% <33.33%> (+<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 24362

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