mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Move all base analyzer classes to zeek::analyzer namespace
This commit is contained in:
parent
87054d9d6b
commit
9400b863ea
171 changed files with 516 additions and 486 deletions
|
@ -173,7 +173,7 @@ void HTTP_Entity::Deliver(int len, const char* data, bool trailing_CRLF)
|
|||
DeliverBody(len, data, trailing_CRLF);
|
||||
}
|
||||
|
||||
class HTTP_Entity::UncompressedOutput : public analyzer::OutputHandler {
|
||||
class HTTP_Entity::UncompressedOutput : public zeek::analyzer::OutputHandler {
|
||||
public:
|
||||
UncompressedOutput(HTTP_Entity* e) { entity = e; }
|
||||
void DeliverStream(int len, const u_char* data, bool orig) override
|
||||
|
@ -1712,7 +1712,7 @@ void analyzer::http::escape_URI_char(unsigned char ch, unsigned char*& p)
|
|||
}
|
||||
|
||||
zeek::String* analyzer::http::unescape_URI(const u_char* line, const u_char* line_end,
|
||||
analyzer::Analyzer* analyzer)
|
||||
zeek::analyzer::Analyzer* analyzer)
|
||||
{
|
||||
zeek::byte_vec decoded_URI = new u_char[line_end - line + 1];
|
||||
zeek::byte_vec URI_p = decoded_URI;
|
||||
|
|
|
@ -195,7 +195,7 @@ public:
|
|||
int GetRequestOngoing() { return request_ongoing; };
|
||||
int GetReplyOngoing() { return reply_ongoing; };
|
||||
|
||||
static analyzer::Analyzer* Instantiate(Connection* conn)
|
||||
static zeek::analyzer::Analyzer* Instantiate(Connection* conn)
|
||||
{ return new HTTP_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
|
@ -282,6 +282,6 @@ extern bool is_reserved_URI_char(unsigned char ch);
|
|||
extern bool is_unreserved_URI_char(unsigned char ch);
|
||||
extern void escape_URI_char(unsigned char ch, unsigned char*& p);
|
||||
extern zeek::String* unescape_URI(const u_char* line, const u_char* line_end,
|
||||
analyzer::Analyzer* analyzer);
|
||||
zeek::analyzer::Analyzer* analyzer);
|
||||
|
||||
} } // namespace analyzer::*
|
||||
|
|
|
@ -11,7 +11,7 @@ class Plugin : public zeek::plugin::Plugin {
|
|||
public:
|
||||
zeek::plugin::Configuration Configure() override
|
||||
{
|
||||
AddComponent(new ::analyzer::Component("HTTP", ::analyzer::http::HTTP_Analyzer::Instantiate));
|
||||
AddComponent(new zeek::analyzer::Component("HTTP", ::analyzer::http::HTTP_Analyzer::Instantiate));
|
||||
|
||||
zeek::plugin::Configuration config;
|
||||
config.name = "Zeek::HTTP";
|
||||
|
|
|
@ -15,12 +15,12 @@ function skip_http_entity_data%(c: connection, is_orig: bool%): any
|
|||
analyzer::ID id = mgr.CurrentAnalyzer();
|
||||
if ( id )
|
||||
{
|
||||
analyzer::Analyzer* ha = c->FindAnalyzer(id);
|
||||
zeek::analyzer::Analyzer* ha = c->FindAnalyzer(id);
|
||||
|
||||
if ( ha )
|
||||
{
|
||||
if ( ha->IsAnalyzer("HTTP") )
|
||||
static_cast<analyzer::http::HTTP_Analyzer*>(ha)->SkipEntityData(is_orig);
|
||||
static_cast<::analyzer::http::HTTP_Analyzer*>(ha)->SkipEntityData(is_orig);
|
||||
else
|
||||
reporter->Error("non-HTTP analyzer associated with connection record");
|
||||
}
|
||||
|
@ -52,5 +52,5 @@ function unescape_URI%(URI: string%): string
|
|||
const u_char* line = URI->Bytes();
|
||||
const u_char* const line_end = line + URI->Len();
|
||||
|
||||
return zeek::make_intrusive<zeek::StringVal>(analyzer::http::unescape_URI(line, line_end, 0));
|
||||
return zeek::make_intrusive<zeek::StringVal>(::analyzer::http::unescape_URI(line, line_end, 0));
|
||||
%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue