Commit Graph

8 Commits (0037f1e0f43e782fc1d198b352f648c49abe3a26)

Author SHA1 Message Date
Jason Ish 1173bb788e .gitignore: globally ignore .la files
With automake and libraries, these files are creeping in.
3 months ago
Jason Ish a3354e55e6 eve/filetypes: use more const 7 months ago
Jason Ish eee9757dba eve/filetype: ThreadDeinit can return void
Change ThreadDeinit to return void instead of an int, there is nothing
to be done on success or failure.
7 months ago
Jason Ish bd55cd4c55 eve/filetypes: common init for threaded and non-threaded
In 7.0 if EVE was non-threaded, the ThreadInit for the filetype was
not called meaning that the filetype author had to handle the threaded
and non-threaded cases.

To simplify this, if non-threaded, still call ThreadInit (and
ThreadDeinit) once with a thread_id of 0. This should simplify
authoring EVE filetype plugins.
7 months ago
Jason Ish ead09c2497 eve/filetypes: remove from plugin context
Remove EVE filetypes from plugin context as they are not only used
from plugins. Plugins allow user code to register filetypes, but we
also have internal file types that use this api including the null
output and syslog.  Additionally library users can use this API to
register filetypes, and they are not plugins.

Ideally this code would go in "output-json.[ch]" as the "primary" eve
API, however there are currently some include circular include issues
there, so start new cleaned up EVE API in "output-eve.[ch]" which is
"clean" with respect to includes, and as we cleanup existing EVE API for
"public" use, it can be moved here.

Ticket: #6838
7 months ago
Jeff Lucovsky 3bf92bb14f example/plugin: Use ThreadId 7 months ago
Jason Ish 6d792f017b examples/plugin: simplify Makefile
Simplify the Makefile by avoiding automake and providing our own
Makefile.in that is suitable for in-tree builds of the plugin and can
also serve as an example for standalone plugins.

But the bigger benefit of this is to allow building the example plugin
even with --disable-shared provided to configure, as this is just a
phony limitation imposed by automake/libtool.
8 months ago
Jason Ish d2b25af3f4 examples: add an example plugin of an eve filetype
This is an example of what adding plugin examples to the Suricata repo
could look like.

This plugin is an example plugin for an EVE filetype. It could be
extended to support outputs like Redis, syslog, etc.

There is one issue with adding plugins like this to an autotools
project, the project can't be built with --disable-shared, which is
more of an autotools limitation, and not really a Suricata issue.
Suricata built with --disable-shared will load plugins just fine.

Note that the examples directory was added as DIST_SUBDIRS as we don't
want normal builds to recurse into it and attempt to build the plugin,
its just an example, but we still need to keep distcheck happy.
11 months ago