Commit graph

81 commits

Author SHA1 Message Date
Daniel Thayer
a4e5591e18 Fix some failing plugin tests on OS X 10.11
By default, OS X 10.11 does not include openssl headers.
Since building a Bro plugin #includes Bro headers, which #include openssl
headers, we need to tell cmake to find these so that the compiler
can use them.
2016-05-12 15:58:09 -05:00
Daniel Thayer
8a16145e31 Remove unnecessary use of TEST_DIFF_CANONIFIER
Removed a TEST_DIFF_CANONIFIER from a test, because it is already
set in btest.cfg, and this one also doesn't actually specify the
path to the script.
2015-09-18 17:32:30 -05:00
Robin Sommer
c72d191ab5 Refactoring L2 parsing code to reside in the Packet class.
That way it can be reused more easily. This also avoid having to
change the serialization structure for packets, which is a problem as
external sources of packets (via Broccoli) wouldn't have the new
attributes available to send.

Also moving Packet.{h,cc} and Layer2.{h,cc} into iosource/, and
removing header size from properties that packet sources have to
provide, as we can now compute that easily from the link type.

Plus some more cleanup.
2015-07-20 16:21:34 -07:00
Jeff Barber
30fdc37479 Refactor to make bro use a common Packet object.
Do a better job of parsing layer 2 and keeping track of layer 3 proto.
Add support for raw packet event, including Layer2 headers.
2015-05-29 10:37:39 -04:00
Robin Sommer
6fa03abdbc Merge remote-tracking branch 'origin/topic/gilbert/plugin-api-tweak'
* origin/topic/gilbert/plugin-api-tweak:
  Updating plugin.hooks baseline so that test succeeds
  Revert spacing change that shouldn't have been included with the previous changeset ... should fix all of the plugin tests save hooks, which needs to be updated.
  More small fixes
  Small fixes
  Incremental
  Re-updating plugin.hooks test to include new argument output (after merge).
  Fixing logic errors in HandlePluginResult
  Updating tests and tweaking HookArgument to include Frame support.
  Incremental commit: implementing a wrapper for the Val class.
  Reverting change to const status of network_time.  Also, see FIXME: in Func.cc / HandlePluginResult ...
  Tweaks to result handling to make things a little more sane.
  Plugin API: minor change (adding parent frame) to support calling methods from hook.  Also declare network time update argument to be const because good practice.

BIT-1270 #merged

Conflicts:
	testing/btest/Baseline/plugins.hooks/output
2015-03-02 18:17:52 -08:00
Gilbert Clark
d3a5440cff Merge branch 'master' into topic/gilbert/plugin-api-tweak 2015-02-23 13:22:47 -05:00
Robin Sommer
b6bbf90643 Updating plugin tests.
The init-plugin scripts now expects a destination directory. Normally
that would be a new subdirectory, but for the tests to keep working we
can also put it right into the current directory.
2015-02-16 20:26:26 -08:00
Gilbert Clark
7eadcad674 Merge branch 'master' into topic/gilbert/plugin-api-tweak
Conflicts:
	testing/btest/Baseline/plugins.api-version-mismatch/output
	testing/btest/Baseline/plugins.hooks/output
	testing/btest/plugins/api-version-mismatch.sh
2014-11-24 16:21:23 -05:00
Robin Sommer
3e508d316a Plugins: Change order in which plugins' scripts are loaded at startup.
We now load the top-level  __init__.bro before the internal bif.bro so
that the former can define types used by the latter.
2014-10-23 14:22:26 -07:00
Robin Sommer
f4f5cfd321 Further baseline normalization for plugin test portability. 2014-10-08 08:16:31 -07:00
Robin Sommer
81933d25a8 Fix for test portability. 2014-10-07 20:18:31 -07:00
Gilbert Clark
17e1d2a809 Merge branch 'master' into topic/gilbert/plugin-api-tweak
Conflicts:
	testing/btest/Baseline/plugins.hooks/output
2014-10-07 21:57:13 -04:00
Robin Sommer
91c218d44a Include plugin unit tests into the top-level btest configuration.
Turns out they weren't part of it yet. Comes with some baseline updates.
2014-10-07 15:33:18 -07:00
Gilbert Clark
70c7258dfa Updating tests and tweaking HookArgument to include Frame support.
* Add frame support to HookArgument, since it's a new argument to HookCallFunction
* Fix test in api-version-mismatch to remove absolute paths from output
* Update test plugin to use new HookCallFunction interface
2014-10-02 19:23:59 -04:00
Gilbert Clark
0104d7147d Merging master into branch.
Merge branch 'master' into topic/gilbert/plugin-api-tweak
2014-10-01 21:19:02 -04:00
Gilbert Clark
d639488d36 Incremental commit: implementing a wrapper for the Val class.
Just a checkpoint: need to add / update tests to make sure things work as expected.  Should build / pass core btests, though.
2014-09-27 08:03:30 -04:00
Robin Sommer
cce09b75de Changing prefix for packet sources/dumper from ':' to '%'.
Addresses BIT-1249.
2014-09-25 17:54:36 -07:00
Robin Sommer
042afd2feb Fixing remaining tests. 2014-09-04 20:55:44 -07:00
Robin Sommer
6e33c92cf0 Adding test for dynamic packet dumper plugin. 2014-09-04 20:30:28 -07:00
Robin Sommer
b813b6f83b Test updates. 2014-09-04 16:08:14 -07:00
Robin Sommer
5e4f498083 Adding test creating a dynamic pktsrc plugin. 2014-08-28 00:53:15 -04:00
Robin Sommer
0ba4b768cd Merge remote-tracking branch 'origin/master' into topic/robin/reader-writer-plugins 2014-07-31 14:45:38 -07:00
Robin Sommer
3d1442e86b Test case for a dynamic input reader. 2014-07-31 12:07:34 -07:00
Robin Sommer
f45526f373 Test case for a dynamic log writer. 2014-07-31 11:40:25 -07:00
Robin Sommer
382b946098 Adding missing check that a plugin's API version matches what Bro defines. 2014-07-31 10:09:03 -07:00
Robin Sommer
e3adce83ee Adding a plugin test that checks that "make install" works. 2014-07-22 20:25:31 -07:00
Robin Sommer
ca1b882761 Adapting plugin tests to use the new split Plugin.{h,cc} structure
that init-plugin now generates.

Also adding new test that makes sure the the skeleton created by
init-plugin compiles on its own withoyt any further changes.
2014-07-21 22:55:57 +02:00
Robin Sommer
38c69f9cd0 Allow to activate plugins from the command line by specifying their
fully-qualified name.
2014-07-21 16:58:10 +02:00
Robin Sommer
62d07a3fc4 Merge branch 'topic/robin/dynamic-plugins-2.3' of git.bro.org:bro into topic/robin/dynamic-plugins-2.3 2014-06-18 14:44:26 -07:00
Robin Sommer
1c71832db1 Updating plugin hook test. 2014-06-18 14:33:42 -07:00
Robin Sommer
c24bb9cacd Adding a test building a file analyzer plugin.
Also cleaning up, and moving, the other plugin tests.
2014-06-18 14:33:42 -07:00