Commit Graph

21 Commits (9ed5b4c0022fc803cd3fd8f7d6ec779800143cd9)

Author SHA1 Message Date
Alice Akaki 7b350e9933 misc: fix name prefix in detect register functions 1 week ago
Philippe Antoine ae1a4ef757 app-layer: make number of alprotos dynamic
Ticket: 5053

The names are now dynamically registered at runtime.
The AppProto alproto enum identifiers are still static for now.

This is the final step before app-layer plugins.
2 months ago
Philippe Antoine 96c8470cdd template: move detect keywords to pure rust
Ticket: 3195

Also remove unused src/tests/detect-template-buffer.c

Completes commit 4a7567b3f0
to remove references to template-rust
5 months ago
Philippe Antoine 3643b6ed4b output: generic simple tx json logger
Ticket: 3827
11 months ago
Philippe Antoine 0b6b015e26 output/alert: rewrite code for app-layer properties
Especially fix setup-app-layer script to not forget this part

This allows, for simple loggers, to have a unique definition
of the actual logging function with the jsonbuilder.
This way, alerts, files, and app-layer event can share the code
to output the same data.

Ticket: #3827
1 year ago
Philippe Antoine 6b9fce7728 app-layer: shorter code for proto string helpers 2 years ago
Philippe Antoine e1046239ea scripts: fix setup app layer for output
using rust nowadays.

Also remove useless code about files that do not need changes
anymore
2 years ago
Philippe Antoine 5b2605bdfe debug: use AppProtoToString
instead of recoding it.
This way, setup-app-layer.py needs to patch one file less
2 years ago
Shivani Bhardwaj 21edf136a5 scripts: fix app-layer-protos.c setup
After the changes in the script in 05e16820de, the file
app-layer-protos.c was to be modified properly iff it was left unformatted.
However, the file was also formatted as a part of the same commit making
the lines split which broke the output of the script. Fix that by
looking for another pattern and changing the lines following that.
2 years ago
Jason Ish 0bb4546af4 setup-app-layer: rustfmt new rust files 2 years ago
Jason Ish 0b2d0324e5 setup-app-layer: set copyright year to current year
Ticket: 4939
2 years ago
Jason Ish 05e16820de templates: clang format cleanups
Cleanup the trivial clang-formatting issues in templates.  Length of
protocol names may require clang-format after new protocol generation.
2 years ago
Jason Ish 712d80107f setup-app-layer: remove generator for C parsers
Ticket: 4939
2 years ago
Jason Ish 50a787a9a3 app-layer-template-rust: remove C app-layer stub
Remove the app-layer-PROTO stub for Rust based parsers.  It is no longer
needed as Rust parsers now contain the registration function in Rust.

Ticket: 4939
2 years ago
Juliana Fajardini c6a35d09b7 templates: fix typos
- *template*files[ch][rs]: fix typos
- scripts/setup-app-layer: fix typos
4 years ago
Juliana Fajardini 4748826dc7 scripts/setup-app-layer: fix Makefile.am patch
adjust lines for patching /src/Makefile.am, as current generated
Makefile wasn't building Suricata.
Add suggestion to run "./configure" before running "make".
Add --logger and --parser options to examples.
4 years ago
Jason Ish 13049ae09d scripts/setup-app-layer: fix rust generation
Fix Rust app-layer generation. Main parser file was being named
gopher.rs instead of the name of the protocol.
4 years ago
Victor Julien 0b5a2ab49b setup-app-layer: support tests in tests/ 7 years ago
Jason Ish 7ec7d85ecc setup-app-layer.py: integrate detect buffer setup
Add --detect to setup a detect buffer.

Obsoletes setup-app-layer-detect.sh.
7 years ago
Jason Ish 15922dcd8c setup-app-layer.py: attempt to cd into correct directory
- If in src, cd to ..
- Error out early if the current directory does not look like a
  Suricata source directory.
7 years ago
Jason Ish e232fcc415 setup-app-layer: rewrite script in Python
The idea being that it is easier to read and maintain than
wrapping ed commands.

This script also merges the parser and logger setup into a single
script, but still allows just the parser, or just the logger
to be generated with flags, --logger and --parser.
7 years ago