Adding Files::register_for_mime_type() to associate a file analyzer

with a MIME type.

Whenever that MIME is detected, Bro will now automatically activate
the analyzer. The interface mimics how well-known ports are defined
for protocol analyzers.

This isn't actually used by any existing file analyzer (because we
don't have any yet that target a specific file format), but there's a
test making sure it works.
This commit is contained in:
Robin Sommer 2014-07-21 16:31:22 +02:00
parent ab3d214a90
commit c9524757d2
9 changed files with 104 additions and 675 deletions

View file

@ -277,7 +277,7 @@ int BroFunc::IsPure() const
return 1;
}
Val* BroFunc::HandlePluginResult(Val* plugin_resul, tval_list* args)
Val* BroFunc::HandlePluginResult(Val* plugin_result, val_list* args) const
{
// Helper function factoring out this code from BroFunc:Call() for better
// readability.