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

Applayer plugin 5053 v9 #12465

Closed
wants to merge 7 commits into from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/4102 with all 6 subtickets

Describe changes:

  • add app-layer plugin example with template protocol
  • document app-layer plugins

@jufajardini what do you think about the doc ?

#12455 rebased without restricting JsonBuilder being pub, but warning in the doc about the non intuitive way that must be used in plugins

I think this is not a draft, but it can benefit from one part of #12461 with the suricata-sys crate
There is also #12420 that can be merged first, which will require a rebase of this one

cc @jasonish

We can still do a cleanup of rust pub pub(crate) and pub(super) but it is not the matter here...

and use generic logger callback prototype with later cast

and do some other small modifications so that the plugin
has less diff
Just use a regular compile time rust export, instead of having
a runtime definition through the SuricataContext structure
so that it can be used by plugins

Avoid export by cbindgen as this constant is also defined in C
so that it can be used by plugins that want to call SCLogError
and such
so that they can be used by rust plugins
Ticket: 7151
Ticket: 7152
Ticket: 7154
Ticket: 7149
Ticket: 7150
Ticket: 7153
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.67%. Comparing base (5d9fad5) to head (62e2bb1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12465      +/-   ##
==========================================
+ Coverage   80.63%   80.67%   +0.03%     
==========================================
  Files         920      920              
  Lines      258739   259102     +363     
==========================================
+ Hits       208643   209036     +393     
+ Misses      50096    50066      -30     
Flag Coverage Δ
fuzzcorpus 56.93% <89.74%> (+0.11%) ⬆️
livemode 19.35% <5.12%> (-0.05%) ⬇️
pcap 44.36% <48.71%> (+0.08%) ⬆️
suricata-verify 63.29% <94.59%> (+0.05%) ⬆️
unittests 58.45% <33.33%> (-0.08%) ⬇️

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 24341

@catenacyber
Copy link
Contributor Author

Next in #12467

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