More smaller cleanup.

This commit is contained in:
Robin Sommer 2013-06-02 17:54:43 -07:00
parent 2fd0b36057
commit c6ad731562
13 changed files with 50 additions and 65 deletions

View file

@ -45,12 +45,6 @@ macro(REST_TARGET srcDir broInput)
set(sumTextSrc ${absSrcPath})
set(ogSourceFile ${absSrcPath})
if (${extension} STREQUAL ".bif.bro")
# set(ogSourceFile ${BIF_SRC_DIR}/${basename})
# the summary text is taken at configure time, but .bif.bro files
# may not have been generated yet, so read .bif file instead
set(sumTextSrc ${ogSourceFile})
endif ()
if (NOT relDstDir)
set(docName "${basename}")

View file

@ -58,7 +58,7 @@ global example_ports = {
event bro_init()
{
# Registering a well-known port is self-documenting and
# go into the generated doc's "Port Analysis" section
# goes into the generated doc's "Port Analysis" section.
Analyzer::register_for_ports(Analyzer::ANALYZER_SSL, example_ports);
}

View file

@ -7,8 +7,8 @@
##! Protocol analyzers are identified by unique tags of type
##! :bro:type:`Analyzer::Tag`, such as :bro:enum:`Analyzer::ANALYZER_HTTP` and
##! :bro:enum:`Analyzer::ANALYZER_HTTP`. These tags are defined internally by the
##! analyzers themselves, and documented in their analyzer-specific description along with the
##! events that they generate.
##! analyzers themselves, and documented in their analyzer-specific description
##! along with the events that they generate.
##!
##! .. todo: ``The ANALYZER_*`` are in fact not yet documented, we need to add that
##! to Broxygen.
@ -49,8 +49,8 @@ export {
## Registers an individual well-known port for an analyzer. If a future connection
## on this ports is seen, the analyzer will be automatically assigned to parsing
## it. The function *adds* to all ports already registered, it doesn't
## replace them .
## it. The function *adds* to all ports already registered, it doesn't replace
## them.
##
## tag: The tag of the analyzer.
##
@ -73,7 +73,7 @@ export {
## registered for it.
global all_registered_ports: function() : table[Analyzer::Tag] of set[port];
## Translates an analyzer type to a string with the analyzer's.
## Translates an analyzer type to a string with the analyzer's name.
##
## tag: The analyzer tag.
##
@ -99,8 +99,8 @@ export {
global schedule_analyzer: function(orig: addr, resp: addr, resp_p: port,
analyzer: Analyzer::Tag, tout: interval) : bool;
## A set of analyzers to disable by at startup. The default set
## contains legacy analyzers that are no longer supported.
## A set of analyzers to disable by default at startup. The default set contains
## legacy analyzers that are no longer supported.
global disabled_analyzers: set[Analyzer::Tag] = {
ANALYZER_INTERCONN,
ANALYZER_STEPPINGSTONE,
@ -115,7 +115,7 @@ export {
global ports: table[Analyzer::Tag] of set[port];
event bro_init() &priority=-5
event bro_init() &priority=5
{
if ( disable_all )
__disable_all_analyzers();

View file

@ -43,11 +43,6 @@ event bro_init() &priority=5
Log::create_stream(DPD::LOG, [$columns=Info]);
}
function foo() : string
{
return "HTTP";
}
event protocol_confirmation(c: connection, atype: Analyzer::Tag, aid: count) &priority=10
{
local analyzer = Analyzer::name(atype);

View file

@ -3065,12 +3065,12 @@ module GLOBAL;
## Number of bytes per packet to capture from live interfaces.
const snaplen = 8192 &redef;
# Load these frameworks here because it uses fairly deep integration with
# Load these frameworks here because they use fairly deep integration with
# BiFs and script-land defined types.
@load base/frameworks/logging
@load base/frameworks/input
@load base/frameworks/analyzer
@load base/frameworks/file-analysis
# Load BiF defined by plugins.
# Load BiFs defined by plugins.
@load base/bif/plugins

View file

@ -175,7 +175,7 @@ event irc_dcc_message(c: connection, is_orig: bool,
c$irc$dcc_file_name = argument;
c$irc$dcc_file_size = size;
local p = count_to_port(dest_port, tcp);
Analyzer::schedule_analyzer(to_addr("0.0.0.0"), address, p, Analyzer::ANALYZER_IRC_DATA, 5 min);
Analyzer::schedule_analyzer(0.0.0.0, address, p, Analyzer::ANALYZER_IRC_DATA, 5 min);
dcc_expected_transfers[address, p] = c$irc;
}

View file

@ -82,8 +82,6 @@ int* Base64Converter::InitBase64Table(const string& alphabet)
return base64_table;
}
Base64Converter::Base64Converter(analyzer::Analyzer* arg_analyzer, const string& arg_alphabet)
{
if ( arg_alphabet.size() > 0 )

View file

@ -375,6 +375,7 @@ install(TARGETS bro DESTINATION bin)
set(BRO_EXE bro
CACHE STRING "Bro executable binary" FORCE)
# Target to create all the autogenerated files.
add_custom_target(generate_outputs DEPENDS ${bro_ALL_GENERATED_OUTPUTS})
# Build __load__.bro files for plugins/*.bif.bro.

View file

@ -50,8 +50,6 @@ public:
analyzer::Tag ChildAnalyzer() const { return child_analyzer; }
private:
// FIXME: This is in fact an analyzer::ID but we can't include "analyzer/Analyzer.h"
// at this point due to circular dependenides. Fix that!
analyzer::Tag analyzer;
analyzer::Tag child_analyzer;
};

View file

@ -14,7 +14,7 @@ class Manager;
class Component;
/**
* Class to identify an analyzdr type.
* Class to identify an analyzer type.
*
* Each analyzer type gets a tag consisting of a main type and subtype. The
* former is an identifier that's unique all analyzer classes. The latter is

View file

@ -1,4 +1,4 @@
##! Internal functions and types used by the logging framework.
##! Internal functions and types used by the analyzer framework.
module Analyzer;

View file

@ -1,6 +1,5 @@
// See the file "COPYING" in the main distribution directory for copyright.
#include "ARP.h"
#include "Event.h"
#include "Reporter.h"

View file

@ -16,8 +16,8 @@
#define BRO_PLUGIN_VERSION_BUILTIN -1
/**
* The current plugin API version. Plugins that won't match this versions
* will be rejected.
* The current plugin API version. Plugins that won't match this version will
* be rejected.
*/
#define BRO_PLUGIN_API_VERSION 1