Merge branch 'topic/jswaro/feature/HookAddToAnalyzer-tcprs-support' of https://github.com/jswaro/bro

Making two changes here:

    - Renaming the hook to SetupAnalyzerTree.

    - Reverting the reversal of the script load order. Instead, I'm
      adding an additional script that Bro looks for to load first,
      "__preload__.bro". Also extending the plugin docs to cover this.

    - Increasing plugin API version, as I suppose adding a new virtual
      function may invalidate binary compatibility.

* 'topic/jswaro/feature/HookAddToAnalyzer-tcprs-support' of https://github.com/jswaro/bro:
  Add hook 'HookAddToAnalyzerTree' to support TCPRS plugin
This commit is contained in:
Robin Sommer 2015-08-10 14:44:39 -07:00
commit c91792b762
11 changed files with 94 additions and 15 deletions

View file

@ -14,7 +14,7 @@
// We allow to override this externally for testing purposes.
#ifndef BRO_PLUGIN_API_VERSION
#define BRO_PLUGIN_API_VERSION 3
#define BRO_PLUGIN_API_VERSION 4
#endif
class ODesc;
@ -39,6 +39,7 @@ enum HookType {
HOOK_DRAIN_EVENTS, //< Activates Plugin::HookDrainEvents()
HOOK_UPDATE_NETWORK_TIME, //< Activates Plugin::HookUpdateNetworkTime.
HOOK_BRO_OBJ_DTOR, //< Activates Plugin::HookBroObjDtor.
HOOK_SETUP_ANALYZER_TREE, //< Activates Plugin::HookAddToAnalyzerTree
// Meta hooks.
META_HOOK_PRE, //< Activates Plugin::MetaHookPre().
@ -636,6 +637,8 @@ protected:
*/
virtual void HookUpdateNetworkTime(double network_time);
virtual void HookSetupAnalyzerTree(Connection *conn);
/**
* Hook for destruction of objects registered with
* RequestBroObjDtor(). When Bro's reference counting triggers the