suricata icon indicating copy to clipboard operation
suricata copied to clipboard

WIP: Use libhtp-rs.

Open cccs-rtmorti opened this issue 2 years ago • 4 comments

Fixes redmine #2696

Make sure these boxes are signed before submitting your Pull Request -- thank you.

  • [ X] I have read the contributing guide lines at https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Contributing
  • [ X] I have signed the Open Information Security Foundation contribution agreement at https://suricata.io/about/contribution-agreement/
  • [ X] I have updated the user guide (in doc/userguide/) to reflect the changes made (if applicable)

Link to redmine ticket: 2696

Describe changes:

  • Rebased from #6402
  • WIP to use libhtp-rs. For discussion / tracking only.

libhtp-repo: https://github.com/cccs-rtmorti/libhtp-rs libhtp-branch: master

cccs-rtmorti avatar May 30 '22 14:05 cccs-rtmorti

Thanks for working on this :-)

Could you investigate the CI failures ?

Some comments and questions :

  • I think commit message should be prefixed by http
  • There is likely more doc to update ? especially doc/userguide/upgrade.rst
  • Is libhtp-rs used as a crate ? (and thus simplifying the suricata build)

catenacyber avatar May 31 '22 07:05 catenacyber

Could you investigate the CI failures ?

No problem.

* I think commit message should be prefixed by `http`

No problem. Sorry for missing it. I expect this will be rebased a few times before it is ready anyway.

* There is likely more doc to update ? especially doc/userguide/upgrade.rst

I will have a look.

* Is libhtp-rs used as a crate ? (and thus simplifying the suricata build)

No, it is still being built as a shared lib like libhtp. We plan to build it as a crate, just haven't got to it yet.

cccs-rtmorti avatar Jun 01 '22 16:06 cccs-rtmorti

* Is libhtp-rs used as a crate ? (and thus simplifying the suricata build)

No, it is still being built as a shared lib like libhtp. We plan to build it as a crate, just haven't got to it yet.

@jasonish the end goal is to have libhtp as a crate, right ?

catenacyber avatar Jun 01 '22 17:06 catenacyber

@jasonish the end goal is to have libhtp as a crate, right ?

Yes, that would be ideal. Might require some hand maintenance of header files for the C linkage, or some Makefile goo to generate the headers, but I have a prototype for this somewhere I think.

jasonish avatar Jun 02 '22 14:06 jasonish

* Is libhtp-rs used as a crate ? (and thus simplifying the suricata build)

This was committed a little while ago. The commit is here if you wanted to see it before the next version of this PR.

cccs-rtmorti avatar Nov 06 '22 00:11 cccs-rtmorti

Status : waiting for merge of #8154 before getting a new PR with the rebased version

catenacyber avatar Nov 10 '22 07:11 catenacyber

Can you create a new PR with a rebased version now that https://github.com/OISF/suricata/pull/8176 was merged ? Thanks Todd

catenacyber avatar Dec 03 '22 20:12 catenacyber

Updated in #8255 8255

cccs-rtmorti avatar Dec 07 '22 20:12 cccs-rtmorti