mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Base: Clean up explicit uses of namespaces in places where they're not necessary.
This commit covers all of the common and base classes.
This commit is contained in:
parent
9f802b2a4d
commit
fe0c22c789
240 changed files with 6823 additions and 6787 deletions
|
@ -16,18 +16,18 @@ namespace zeek::detail {
|
|||
|
||||
RuleActionEvent::RuleActionEvent(const char* arg_msg)
|
||||
{
|
||||
msg = zeek::util::copy_string(arg_msg);
|
||||
msg = util::copy_string(arg_msg);
|
||||
}
|
||||
|
||||
void RuleActionEvent::DoAction(const Rule* parent, RuleEndpointState* state,
|
||||
const u_char* data, int len)
|
||||
{
|
||||
if ( signature_match )
|
||||
zeek::event_mgr.Enqueue(
|
||||
event_mgr.Enqueue(
|
||||
signature_match,
|
||||
zeek::IntrusivePtr{zeek::AdoptRef{}, rule_matcher->BuildRuleStateValue(parent, state)},
|
||||
zeek::make_intrusive<zeek::StringVal>(msg),
|
||||
data ? zeek::make_intrusive<zeek::StringVal>(len, (const char*)data) : zeek::val_mgr->EmptyString()
|
||||
IntrusivePtr{AdoptRef{}, rule_matcher->BuildRuleStateValue(parent, state)},
|
||||
make_intrusive<StringVal>(msg),
|
||||
data ? make_intrusive<StringVal>(len, (const char*)data) : val_mgr->EmptyString()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ void RuleActionEvent::PrintDebug()
|
|||
|
||||
RuleActionMIME::RuleActionMIME(const char* arg_mime, int arg_strength)
|
||||
{
|
||||
mime = zeek::util::copy_string(arg_mime);
|
||||
mime = util::copy_string(arg_mime);
|
||||
strength = arg_strength;
|
||||
}
|
||||
|
||||
|
@ -52,31 +52,31 @@ RuleActionAnalyzer::RuleActionAnalyzer(const char* arg_analyzer)
|
|||
string str(arg_analyzer);
|
||||
string::size_type pos = str.find(':');
|
||||
string arg = str.substr(0, pos);
|
||||
analyzer = zeek::analyzer_mgr->GetComponentTag(arg.c_str());
|
||||
analyzer = analyzer_mgr->GetComponentTag(arg.c_str());
|
||||
|
||||
if ( ! analyzer )
|
||||
zeek::reporter->Warning("unknown analyzer '%s' specified in rule", arg.c_str());
|
||||
reporter->Warning("unknown analyzer '%s' specified in rule", arg.c_str());
|
||||
|
||||
if ( pos != string::npos )
|
||||
{
|
||||
arg = str.substr(pos + 1);
|
||||
child_analyzer = zeek::analyzer_mgr->GetComponentTag(arg.c_str());
|
||||
child_analyzer = analyzer_mgr->GetComponentTag(arg.c_str());
|
||||
|
||||
if ( ! child_analyzer )
|
||||
zeek::reporter->Warning("unknown analyzer '%s' specified in rule", arg.c_str());
|
||||
reporter->Warning("unknown analyzer '%s' specified in rule", arg.c_str());
|
||||
}
|
||||
else
|
||||
child_analyzer = zeek::analyzer::Tag();
|
||||
child_analyzer = analyzer::Tag();
|
||||
}
|
||||
|
||||
void RuleActionAnalyzer::PrintDebug()
|
||||
{
|
||||
if ( ! child_analyzer )
|
||||
fprintf(stderr, "|%s|\n", zeek::analyzer_mgr->GetComponentName(analyzer).c_str());
|
||||
fprintf(stderr, "|%s|\n", analyzer_mgr->GetComponentName(analyzer).c_str());
|
||||
else
|
||||
fprintf(stderr, "|%s:%s|\n",
|
||||
zeek::analyzer_mgr->GetComponentName(analyzer).c_str(),
|
||||
zeek::analyzer_mgr->GetComponentName(child_analyzer).c_str());
|
||||
analyzer_mgr->GetComponentName(analyzer).c_str(),
|
||||
analyzer_mgr->GetComponentName(child_analyzer).c_str());
|
||||
}
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ void RuleActionEnable::DoAction(const Rule* parent, RuleEndpointState* state,
|
|||
{
|
||||
if ( ! ChildAnalyzer() )
|
||||
{
|
||||
if ( ! zeek::analyzer_mgr->IsEnabled(Analyzer()) )
|
||||
if ( ! analyzer_mgr->IsEnabled(Analyzer()) )
|
||||
return;
|
||||
|
||||
if ( state->PIA() )
|
||||
|
@ -93,7 +93,7 @@ void RuleActionEnable::DoAction(const Rule* parent, RuleEndpointState* state,
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( ! zeek::analyzer_mgr->IsEnabled(ChildAnalyzer()) )
|
||||
if ( ! analyzer_mgr->IsEnabled(ChildAnalyzer()) )
|
||||
return;
|
||||
|
||||
// This is ugly and works only if there exists only one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue