]> git.ipfire.org Git - thirdparty/suricata.git/commit
plugins: initial support for a filetype plugin
authorJason Ish <jason.ish@oisf.net>
Fri, 3 Jul 2020 22:33:12 +0000 (16:33 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 6 Aug 2020 15:15:10 +0000 (17:15 +0200)
commit8fb35236e69a8caf3f7a288fcf40a0a46fddba46
tree9d370046e76ff3c550e9bfd5cbd99a7961834835
parentf35c25cef289b426d4fa1715d4ff826580eb2fd9
plugins: initial support for a filetype plugin

A filetype plugin is a plugin that implements an eve filetype. Most
of the current filetypes could likely be implemented as such a plugin.
Such a plugin must implement Open, Close and Write, where Write
is provided the formatted JSON to be logged.

This commit also includes the plumbing for plugin loading. Example
plugin to come.

Plugins are loaded by the "plugin" section in the configuration
file:

  plugins:
    - /path/to/directory/plugins
    - /path/to/plugin_file.so

This can also be done on the command line with:

  --set plugins.0=/path/plugin_file.so
src/Makefile.am
src/output-json.c
src/output-json.h
src/suricata-common.h
src/suricata-plugin.h [new file with mode: 0644]
src/suricata.c
src/util-logopenfile.c
src/util-logopenfile.h
src/util-plugin.c [new file with mode: 0644]
src/util-plugin.h [new file with mode: 0644]