Commit Graph

16269 Commits (599a451e44131e8c52a74eb175fb143e7db2ef6b)
 

Author SHA1 Message Date
Shivani Bhardwaj 599a451e44 rust: update Cargo.lock.in
to include the latest packages available.
1 year ago
dependabot[bot] 0037f1e0f4 github-actions: bump github/codeql-action from 3.25.15 to 3.26.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.15 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.25.15...v3.26.6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot] aef10c735c github-actions: bump actions/upload-artifact from 4.3.4 to 4.4.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...50769540e7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Jason Ish 685baa9680 output-filedata: rename and document registration function
Prefix registration function and pointer function type with SC, as
well as document.

Ticket: #7227
1 year ago
Jason Ish b51eeb3ab5 output-file: rename and document registration function
Rename OutputRegisterFileLogger to SCOutputRegisterFileLogger, add
function documentation and include in userguide.

Ticket: #7227
1 year ago
Jason Ish 14b648f286 output-streaming: rename and document registration
Prefix the registration function and types with "SC", and add function
documentation.

Ticket: #7227
1 year ago
Jason Ish cba8527f75 output-file: use void *initdata instead of OutputCtx
Avoids leaking a higher level abstraction into a low level logger.

Ticket: #7227
1 year ago
Jason Ish 80d395efbb output-filedata: use void *initdata instead of OutputCtx
Avoids leaking a higher level abstraction into a low level logger.

Ticket: #7227
1 year ago
Jason Ish c02e7099b7 output-streaming: use void *initdata instead of OutputCtx
Using OutputCtx leaks a higher level abstraction into the low level
logger.

Ticket: #7227
1 year ago
Jason Ish fe69dd972a output: remove remaining ThreadExitPrintStats callbacks
Not used in output modules.

Ticket: #7227
1 year ago
Jason Ish d88d8fc4f0 output-stats: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
1 year ago
Jason Ish 07d4d08665 output-streaming: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
1 year ago
Jason Ish a93bd8a387 output-filedata: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
1 year ago
Jason Ish 16125013db output-file: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
1 year ago
Jason Ish 1ebf33b3c9 output-tx: rename and document transaction logger registration
Rename OutputRegisterTxLogger to SCOutputRegisterTxLogger to make it
part of the public API as well as document.

Ticket: #7227
1 year ago
Jason Ish ee07855891 output-tx.h: include tm-threads.h
Required to properly resolve the types in the header without depending
on includes coming before it in C files.

Ticket: #7227
1 year ago
Jason Ish 1f63e7b7c0 examples: add tx logger to custom logger example
However, its disabled due to issue
https://redmine.openinfosecfoundation.org/issues/7236.

Ticket: #7227
1 year ago
Jason Ish 7397b7a00f output-tx: remove ThreadExitPrintStats callback
After removing the exit stats function from log-tlslog, this callback
is no longer used.

Ticket: #7227
1 year ago
Jason Ish 0f7eac62f5 log-tlslog: remove unneeded includes
Ticket: #7227
1 year ago
Jason Ish 6e660bd9bc log-tlslog: remove ThreadExitPrintStats callback
Remove the ThreadExitPrintStats callback, this is the only logger that
was actually using it, and this logger is marked for deprecation. This
allows us to remove the callback from the registration signature.

Ticket: #7227
1 year ago
Jason Ish 594cca77ce tlsstore: remove ThreadExitPrintStats callback
Remove the callback to print stats on thread exit.  The counter value
was never being used and this helps us get rid of this callback
altogether as their is only one other usage of it.

Ticket: #7227
1 year ago
Jason Ish 32e2225b7d output-tx: use void * instead of OutputCtx
Using OutputCtx results in the low level output-tx packet logger being
aware of Suricata's higher level loggers that use OutputCtx, for the
low level logger this is purely opaque data that may not be an
OutputCtx for custom loggers.

Ticket: #7227
1 year ago
Jason Ish bb128e3959 devguide: more on low level logging
Use the extending/output section to introduce the low level logging
API.

Ticket: #7227
1 year ago
Jason Ish a2779ac916 output-flow: rename register function and document
Rename OutputRegisterFlowLogger to SCOutputRegisterFlowLogger and
document in the header file.

Mark other functions in the header file as part of the internal API.

Ticket: #7227
1 year ago
Jason Ish 7b4271c309 output-packet: rename register function and document
Rename OutputRegisterPacketLogger to SCOutputRegisterPacketLogger as
its part of the public API and document its parameters.

Comment on the other functions in the header that they are part of the
internal API.

Ticket: #7227
1 year ago
Jason Ish 8735c02995 packet-logger: remove ThreadExitPrintStats
The ThreadExitPrintStats callback was never being used, remove.

Ticket: #7227
1 year ago
Jason Ish cdcb395142 examples: add custom logging plugin
Add an example custom logger that hooks into the low level packet and
flow logging callbacks.

Ticket: #7227
1 year ago
Jason Ish 3d2820ba39 profiling: create a LOGGER_USER id
Loggers need an ID uniquely identify them for profiling. To help with
loggers registered at runtime (library, plugins), provide a
LOGGER_USER that can be used. It won't provide per-logger details if
they have more than one, but will provide a total for all their
registered loggers.

Ticket: #7227
1 year ago
Jason Ish cc89d35256 output-packet.h: include tm-threads.h and decode.h
This allows the header to be used without including other headers this
one depends on.

Ticket: #7227
1 year ago
Jason Ish 080681aff5 pgsql: don't expose PgsqlTransactionState to C
PgsqlTransactionState has a variant named "Init" which is a little too
generic to export to C. Fortunately this method doesn't need to be
exposed to C, instead remove it as it was only called by
rs_pgsql_tx_get_alstate_progress which also doesn't need to be public
or expose to C.

Ticket: #7227
1 year ago
Jason Ish 203ddb2709 output-packet: use void * instead of OutputCtx * for initdata
The use of OutputCtx as the data type for initdata was leaking Eve
submodule logic into the low level packet logger. Instead use void *,
as the packet logging module is not concerned with the type of data
here.

Also document this initdata parameter.

Ticket: #7227
1 year ago
Jason Ish e5ac439226 output-flow.h: include flow.h and decode.h
A library/plugin user wanting to register a custom flow logger must
include "output-flow.h", however that depends on some other includes.
One train of thought with respect to include files in libraries, is
that they should include all their dependencies on behalf of the
user. To make a custom flow logger just a little easier, include
"flow.h" and "decode.h".

Ticket: #7227
1 year ago
Jason Ish 0d16ce2af4 output-flow: remove ThreadExitPrintStats callback
The callback, ThreadExitPrintStats is not used in the flow loggers.

Ticket: #7227
1 year ago
Jason Ish 0506043dea output-flow: use void * instead of OutputCtx * for initdata
The use of OutputCtx as the data type for initdata was leaking Eve
submodule logic into the low level flow logger. Instead use void *, as
the flow logging module is not concerned with the type of data here.

Also document this initdata parameter.

Ticket: #7227
1 year ago
Jason Ish bd81f9f4d3 output-flow: document the name field as for debugging only
Ticket: #7227
1 year ago
Jason Ish afcf591719 output-flow: remove unused initdata argument
The initdata argument to OutputFlowThreadInit was always NULL, remove
it. Internally the ThreadInit functions still get initdata, but this
is the data provided when that logging instance was registered.

Ticket: #7227
1 year ago
Juliana Fajardini d4e4ab5736 github/pr-template: update contribution checks
We have different types of checks, all in a single list.
Adding a title of sorts to each group in the hopes of highlighting
their purposes.

When we add new items to the json schema, many times we don't add their
descriptions, while this would be the perfect time to also do that.
1 year ago
Juliana Fajardini f3e1095244 userguide: update Security Onion docs reference
They have updated their docs domain, leading to the link we had
returning a 404.

Also checked the other links. Although some seem to only contain old
traffic, they all still work.
1 year ago
Sascha Steinbiss cb14e44780 userguide: fix spelling of `security_result` EVE field
This ensures that the correct spelling of the `security_result` EVE
field for RFB (as opposed to `security-result`) is also reflected in the
documentation.

Ticket: #7210
1 year ago
Shivani Bhardwaj 1345c6d1cb doc/file-extraction: fix highlight syntax 1 year ago
Juliana Fajardini 682b199ea0 userguide: expand documentation for rule profiling
The page about performance and rule profiling showed the table generated
by rules profiling but didn't inform how to achieve nor find it.

Task #4359
1 year ago
Jason Ish 15fe844ae7 syslog: deprecate
The standalone syslog output is now deprecated for Suricata 8. Display
a warning on use and add notes to the userguide.

Ticket: #6544
1 year ago
Jason Ish 5853fb922d tls-log: deprecate
tls-log is now deprecated and will be removed in Suricata 9.0. Display
a deprecation notice on use, and add notes to the user guide.

Ticket: #6542
1 year ago
Jason Ish ab26323a96 http-log: deprecate
http-log is now deprecated and will be removed in Suricata
9.0. Display a deprecation notice on use, and add notes to the
userguide.

Issue: #6543
1 year ago
Jason Ish d7e33a51bc arp: profiling logger id must come before LOGGER_SIZE
Also added comment to make this more clear.
1 year ago
Philippe Antoine 629873c2bc datasets: test unix socket ipv6 operations
Ticket: 6969
1 year ago
Eric Leblond 4668c95513 datasets: fix parsing of ip4 in ip6
The lookup function was not taking into account that we can have
an IPv4 or an IPv6 address as parameters and that this addresses
need to be converted to Suricata internal storage.
By using the already defined dedicated parsing function, we are
fixing the issue.

Issue: #6969
1 year ago
Lukas Sismis a32b68985f profiling: use correct conditional on packet profiling data dump
Ticket: #7218
1 year ago
Victor Julien cff82f16b3 pcap-file: limit setvbuf to linux
As it fails to work correctly on FreeBSD and OpenBSD.

On FreeBSD, these are the errors:

Info: pcap: Pcap-file will use 4096 buffer size [PcapFileGlobalInit:source-pcap-file.c:159]
Error: pcap: failed to get first packet timestamp. pcap_next_ex(): -2 [PeekFirstPacketTimestamp:source-pcap-file-helper.c:186]
Warning: pcap: Failed to init pcap file input.pcap, skipping [ReceivePcapFileThreadInit:source-pcap-file.c:299]
Error: pcap: pcap file reader thread failed to initialize [ReceivePcapFileLoop:source-pcap-file.c:185]
1 year ago
Victor Julien 688bd538cf pcap: implement pcap-file-buffer-size option
Allows easy specification of buffer size on the commandline.

Ticket: #7155.
1 year ago