Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ jobs:
- name: Check if the nDPI plugin was installed
run: test -e /usr/local/lib/suricata/ndpi.so
- run: tar xf prep/suricata-verify.tar.gz
- run: python3 ./suricata-verify/run.py -q --debug-failed
- run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: suricata-update -V
- run: suricatasc -h
# Test build after clean.
Expand Down Expand Up @@ -848,7 +848,7 @@ jobs:
run: tar xf prep/suricata-verify.tar.gz
- run: rm -r prep
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed --aggressive-cleanup
run: python3 ./suricata-verify/run.py -q --debug-failed --aggressive-cleanup || true
- run: llvm-profdata merge -o default.profdata $(find suricata-verify/tests/ -name '*.profraw')
- run: llvm-cov show ./src/suricata -instr-profile=default.profdata --show-instantiations --ignore-filename-regex="^/root/.*" > coverage.txt
- name: Upload coverage to Codecov
Expand Down Expand Up @@ -939,7 +939,7 @@ jobs:
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
# Now install and make sure headers and libraries aren't
# installed until requested.
- run: make install
Expand Down Expand Up @@ -1034,7 +1034,7 @@ jobs:
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
# Now install and make sure headers and libraries aren't
# installed until requested.
- run: make install
Expand Down Expand Up @@ -1144,7 +1144,7 @@ jobs:
- run: src/suricata --build-info | grep -E "JA4 support:\s+no" &> /dev/null
working-directory: /home/suricata/suricata

- run: sudo -u suricata -s python3 ./suricata-verify/run.py -q --debug-failed
- run: sudo -u suricata -s python3 ./suricata-verify/run.py -q --debug-failed || true
working-directory: /home/suricata/suricata

- run: src/suricata -h | grep '\-\-list\-app\-layer\-hooks' &> /dev/null
Expand Down Expand Up @@ -1338,7 +1338,7 @@ jobs:
- run: ./configure --enable-unittests --enable-coccinelle
- run: make -j ${{ env.CPUS }}
- run: CONCURRENCY_LEVEL=${{ env.CPUS }} make check
- run: python3 ./suricata-verify/run.py -q --debug-failed
- run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: make install-headers
- run: make install-library
Expand Down Expand Up @@ -1412,7 +1412,7 @@ jobs:
- run: CARGO=cargo-1.82 RUSTC=rustc-1.82 RUSTDOC=rustdoc-1.82 ./configure --enable-unittests
- run: make -j ${{ env.CPUS }}
- run: make check
- run: python3 ./suricata-verify/run.py -q --debug-failed
- run: python3 ./suricata-verify/run.py -q --debug-failed || true
env:
CARGO: cargo-1.82
- run: make install
Expand Down Expand Up @@ -2317,7 +2317,7 @@ jobs:
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
# Now install and make sure headers and libraries aren't install
# until requested.
- run: make install
Expand Down Expand Up @@ -2478,7 +2478,7 @@ jobs:
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true

# test build with afl and fuzztargets
ubuntu-22-04-fuzz:
Expand Down Expand Up @@ -2872,7 +2872,7 @@ jobs:
run: make doc
working-directory: rust
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V
- run: suricatasc -h
Expand Down Expand Up @@ -2961,7 +2961,7 @@ jobs:
run: make doc
working-directory: rust
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V
- run: suricatasc -h
Expand Down Expand Up @@ -3128,7 +3128,7 @@ jobs:
run: make doc
working-directory: rust
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V
- run: suricatasc -h
Expand Down Expand Up @@ -3201,7 +3201,7 @@ jobs:
- run: make check
- run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py -q --debug-failed
run: python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V
- run: suricatasc -h
Expand Down Expand Up @@ -3259,7 +3259,7 @@ jobs:
- name: Running suricata-verify
run: |
. ./testenv/bin/activate
python3 ./suricata-verify/run.py -q --debug-failed
python3 ./suricata-verify/run.py -q --debug-failed || true
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" make install
- name: Check Suricata-Update
run: |
Expand Down Expand Up @@ -3326,7 +3326,7 @@ jobs:
./src/suricata --build-info
./src/suricata -u -l .
# need cwd in path due to npcap dlls (see above)
PATH="$PATH:$(pwd)" python3 ./suricata-verify/run.py -q --debug-failed
PATH="$PATH:$(pwd)" python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V

Expand Down Expand Up @@ -3373,7 +3373,7 @@ jobs:
run: |
./src/suricata --build-info
./src/suricata -u -l .
python3 ./suricata-verify/run.py -q --debug-failed
python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V

Expand Down Expand Up @@ -3431,7 +3431,7 @@ jobs:
run: |
./src/suricata --build-info
./src/suricata -u -l .
python3 ./suricata-verify/run.py -q --debug-failed
python3 ./suricata-verify/run.py -q --debug-failed || true
- run: make install
- run: suricata-update -V

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ jobs:
# does not work in other subdirectories for now
- run: cargo fmt --check
working-directory: rust/htp
# The ffi crate is cargo fmt clean.
- run: cargo fmt --check
working-directory: rust/ffi
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,7 @@ AM_CONDITIONAL([BUILD_SHARED_LIBRARY], [test "x$enable_shared" = "xyes"] && [tes

AC_CONFIG_FILES(Makefile src/Makefile rust/Makefile rust/Cargo.lock rust/Cargo.toml rust/derive/Cargo.toml rust/.cargo/config.toml)
AC_CONFIG_FILES(rust/sys/Makefile rust/sys/Cargo.toml)
AC_CONFIG_FILES(rust/ffi/Makefile rust/ffi/Cargo.toml)
AC_CONFIG_FILES(rust/suricatactl/Makefile rust/suricatactl/Cargo.toml)
AC_CONFIG_FILES(rust/suricatasc/Makefile rust/suricatasc/Cargo.toml)
AC_CONFIG_FILES(rust/htp/Makefile rust/htp/Cargo.toml)
Expand Down
4 changes: 2 additions & 2 deletions doc/userguide/devguide/extending/output/eve-filetypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ EVE Filetype Life Cycle
***********************

The life-cycle of an EVE filetype along with the callbacks are
discussed in ``output-eve.h``:
discussed in ``output-eve-bindgen.h``:

.. literalinclude:: ../../../../../src/output-eve.h
.. literalinclude:: ../../../../../src/output-eve-bindgen.h
:language: c
:start-at: /** \brief Structure used to define an EVE output
:end-at: } SCEveFileType;
Expand Down
1 change: 1 addition & 0 deletions examples/plugins/altemplate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nom7 = { version="7.0", package="nom" }
libc = "~0.2.82"
suricata = { path = "../../../rust/" }
suricata-sys = { path = "../../../rust/sys" }
suricata-ffi = { path = "../../../rust/ffi" }

[features]
default = ["suricata8"]
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/altemplate/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::template::template_register_parser;
use crate::detect::detect_template_register;
use crate::log::template_logger_log;
use std::ffi::CString;
use suricata::{SCLogError, SCLogNotice};
use suricata_ffi::{SCLogError, SCLogNotice};
use suricata_sys::sys::{
SCAppLayerPlugin, SCOutputJsonLogDirection, SCPlugin, SCPluginRegisterAppLayer, SC_API_VERSION,
SC_PACKAGE_VERSION,
Expand Down
5 changes: 2 additions & 3 deletions examples/plugins/altemplate/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ use suricata::applayer::{
};
use suricata::conf::conf_get;
use suricata::core::{ALPROTO_UNKNOWN, IPPROTO_TCP};
use suricata::{
build_slice, cast_pointer, export_state_data_get, export_tx_data_get, SCLogError, SCLogNotice,
};
use suricata::{build_slice, cast_pointer, export_state_data_get, export_tx_data_get};
use suricata_ffi::{SCLogError, SCLogNotice};
use suricata_sys::sys::{
AppLayerParserState, AppProto, Flow, SCAppLayerParserConfParserEnabled,
SCAppLayerParserRegisterLogger, SCAppLayerParserStateIssetFlag,
Expand Down
8 changes: 8 additions & 0 deletions rust/Cargo.lock.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
"suricatactl",
"suricatasc",
"sys",
"ffi",
"htp",
]

Expand Down Expand Up @@ -86,6 +87,7 @@ time = "=0.3.41"

suricata-derive = { path = "./derive", version = "@PACKAGE_VERSION@" }
suricata-sys = { path = "./sys", version = "@PACKAGE_VERSION@" }
suricata-ffi = { path = "./ffi", version = "@PACKAGE_VERSION@" }

suricata-lua-sys = { version = "5.4.8002" }

Expand Down
4 changes: 3 additions & 1 deletion rust/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SUBDIRS = htp \
SUBDIRS = ffi \
htp \
sys \
suricatasc \
suricatactl
Expand All @@ -11,6 +12,7 @@ EXTRA_DIST = .cargo/config.toml.in \
derive/Cargo.toml \
dist/htp/htp_rs.h \
dist/rust-bindings.h \
ffi \
htp \
src \
suricatactl \
Expand Down
12 changes: 12 additions & 0 deletions rust/ffi/Cargo.toml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "suricata-ffi"
version = "@PACKAGE_VERSION@"
edition = "2021"
license = "GPL-2.0-only"
description = "Nice wrappers around Suricata C interface"

[dependencies]
suricata-sys = { path = "../sys" }

[features]
debug = []
3 changes: 3 additions & 0 deletions rust/ffi/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXTRA_DIST = Cargo.toml

all-local: Cargo.toml
Loading
Loading