diff --git a/src/Reporter.cc b/src/Reporter.cc index 80907e5696..9002633b10 100644 --- a/src/Reporter.cc +++ b/src/Reporter.cc @@ -137,7 +137,7 @@ void Reporter::InternalError(const char* fmt, ...) abort(); } -void Reporter::InternalAnalyzerError(analyzer::Analyzer* a, const char* fmt, +void Reporter::AnalyzerError(analyzer::Analyzer* a, const char* fmt, ...) { if ( a ) diff --git a/src/Reporter.h b/src/Reporter.h index 82e6cb575f..e477ad8934 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -92,9 +92,9 @@ public: // dump after the message has been reported. void InternalError(const char* fmt, ...) FMT_ATTR; - // Report an internal analyzer error. That analyzer will not process + // Report an analyzer error. That analyzer will be set to not process // any further input, but Bro otherwise continues normally. - void InternalAnalyzerError(analyzer::Analyzer* a, const char* fmt, ...); + void AnalyzerError(analyzer::Analyzer* a, const char* fmt, ...); // Toggle whether non-fatal messages should be reported through the // scripting layer rather on standard output. Fatal errors are always diff --git a/src/analyzer/protocol/http/HTTP.cc b/src/analyzer/protocol/http/HTTP.cc index 5544bac2f6..ffdcad226f 100644 --- a/src/analyzer/protocol/http/HTTP.cc +++ b/src/analyzer/protocol/http/HTTP.cc @@ -699,7 +699,7 @@ void HTTP_Message::SubmitData(int len, const char* buf) if ( buf != (const char*) data_buffer->Bytes() + buffer_offset || buffer_offset + len > buffer_size ) { - reporter->InternalAnalyzerError(MyHTTP_Analyzer(), + reporter->AnalyzerError(MyHTTP_Analyzer(), "HTTP message buffer misalignment"); return; } @@ -747,7 +747,7 @@ void HTTP_Message::SubmitEvent(int event_type, const char* detail) break; default: - reporter->InternalAnalyzerError(MyHTTP_Analyzer(), + reporter->AnalyzerError(MyHTTP_Analyzer(), "unrecognized HTTP message event"); return; } @@ -1239,7 +1239,7 @@ int HTTP_Analyzer::HTTP_RequestLine(const char* line, const char* end_of_line) if ( ! ParseRequest(rest, end_of_line) ) { - reporter->InternalAnalyzerError(this, "HTTP ParseRequest failed"); + reporter->AnalyzerError(this, "HTTP ParseRequest failed"); return -1; } diff --git a/src/analyzer/protocol/icmp/ICMP.cc b/src/analyzer/protocol/icmp/ICMP.cc index 6aa535fe95..510d3b3a80 100644 --- a/src/analyzer/protocol/icmp/ICMP.cc +++ b/src/analyzer/protocol/icmp/ICMP.cc @@ -60,7 +60,7 @@ void ICMP_Analyzer::DeliverPacket(int len, const u_char* data, break; default: - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "unexpected IP proto in ICMP analyzer: %d", ip->NextProto()); return; } @@ -100,7 +100,7 @@ void ICMP_Analyzer::DeliverPacket(int len, const u_char* data, NextICMP6(current_timestamp, icmpp, len, caplen, data, ip); else { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "expected ICMP as IP packet's protocol, got %d", ip->NextProto()); return; } diff --git a/src/analyzer/protocol/login/Login.cc b/src/analyzer/protocol/login/Login.cc index f9e72db87d..8dcb7dba55 100644 --- a/src/analyzer/protocol/login/Login.cc +++ b/src/analyzer/protocol/login/Login.cc @@ -118,7 +118,7 @@ void Login_Analyzer::NewLine(bool orig, char* line) if ( state != LOGIN_STATE_CONFUSED ) { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "bad state in Login_Analyzer::NewLine"); return; } @@ -582,7 +582,7 @@ char* Login_Analyzer::PeekUserText() { if ( num_user_text <= 0 ) { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "underflow in Login_Analyzer::PeekUserText()"); return 0; } diff --git a/src/analyzer/protocol/login/NVT.cc b/src/analyzer/protocol/login/NVT.cc index e365306a56..7cb99b1950 100644 --- a/src/analyzer/protocol/login/NVT.cc +++ b/src/analyzer/protocol/login/NVT.cc @@ -42,7 +42,7 @@ void TelnetOption::RecvOption(unsigned int type) if ( ! peer ) { - reporter->InternalAnalyzerError(endp, + reporter->AnalyzerError(endp, "option peer missing in TelnetOption::RecvOption"); return; } @@ -90,7 +90,7 @@ void TelnetOption::RecvOption(unsigned int type) break; default: - reporter->InternalAnalyzerError(endp, + reporter->AnalyzerError(endp, "bad option type in TelnetOption::RecvOption"); return; } @@ -173,7 +173,7 @@ void TelnetEncryptOption::RecvSubOption(u_char* data, int len) if ( ! peer ) { - reporter->InternalAnalyzerError(endp, + reporter->AnalyzerError(endp, "option peer missing in TelnetEncryptOption::RecvSubOption"); return; } @@ -213,7 +213,7 @@ void TelnetAuthenticateOption::RecvSubOption(u_char* data, int len) if ( ! peer ) { - reporter->InternalAnalyzerError(endp, + reporter->AnalyzerError(endp, "option peer missing in TelnetAuthenticateOption::RecvSubOption"); } diff --git a/src/analyzer/protocol/login/RSH.cc b/src/analyzer/protocol/login/RSH.cc index 44fc9f1e5f..f768f4bdc2 100644 --- a/src/analyzer/protocol/login/RSH.cc +++ b/src/analyzer/protocol/login/RSH.cc @@ -131,7 +131,7 @@ void Contents_Rsh_Analyzer::DoDeliver(int len, const u_char* data) break; default: - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "bad state in Contents_Rsh_Analyzer::DoDeliver"); break; } @@ -188,7 +188,7 @@ void Rsh_Analyzer::ClientUserName(const char* s) { if ( client_name ) { - reporter->InternalAnalyzerError(this, "multiple rsh client names"); + reporter->AnalyzerError(this, "multiple rsh client names"); return; } @@ -199,7 +199,7 @@ void Rsh_Analyzer::ServerUserName(const char* s) { if ( username ) { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "multiple rsh initial client names"); return; } diff --git a/src/analyzer/protocol/login/Rlogin.cc b/src/analyzer/protocol/login/Rlogin.cc index c418047239..d90c9be123 100644 --- a/src/analyzer/protocol/login/Rlogin.cc +++ b/src/analyzer/protocol/login/Rlogin.cc @@ -193,7 +193,7 @@ void Contents_Rlogin_Analyzer::DoDeliver(int len, const u_char* data) break; default: - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "bad state in Contents_Rlogin_Analyzer::DoDeliver"); break; } @@ -226,7 +226,7 @@ void Rlogin_Analyzer::ClientUserName(const char* s) { if ( client_name ) { - reporter->InternalAnalyzerError(this, "multiple rlogin client names"); + reporter->AnalyzerError(this, "multiple rlogin client names"); return; } diff --git a/src/analyzer/protocol/mime/MIME.cc b/src/analyzer/protocol/mime/MIME.cc index 2128453b4c..f4e7d3981f 100644 --- a/src/analyzer/protocol/mime/MIME.cc +++ b/src/analyzer/protocol/mime/MIME.cc @@ -1391,7 +1391,7 @@ void MIME_Mail::SubmitData(int len, const char* buf) { if ( buf != (char*) data_buffer->Bytes() + buffer_start ) { - reporter->InternalAnalyzerError(GetAnalyzer(), + reporter->AnalyzerError(GetAnalyzer(), "MIME buffer misalignment"); return; } @@ -1487,7 +1487,7 @@ void MIME_Mail::SubmitEvent(int event_type, const char* detail) break; default: - reporter->InternalAnalyzerError(GetAnalyzer(), + reporter->AnalyzerError(GetAnalyzer(), "unrecognized MIME_Mail event"); return; } diff --git a/src/analyzer/protocol/mime/MIME.h b/src/analyzer/protocol/mime/MIME.h index e337d24f13..2b2f88105d 100644 --- a/src/analyzer/protocol/mime/MIME.h +++ b/src/analyzer/protocol/mime/MIME.h @@ -193,7 +193,7 @@ public: virtual ~MIME_Message() { if ( ! finished ) - reporter->InternalAnalyzerError(analyzer, + reporter->AnalyzerError(analyzer, "missing MIME_Message::Done() call"); } diff --git a/src/analyzer/protocol/pop3/POP3.cc b/src/analyzer/protocol/pop3/POP3.cc index 8164b927a8..7768e2599f 100644 --- a/src/analyzer/protocol/pop3/POP3.cc +++ b/src/analyzer/protocol/pop3/POP3.cc @@ -209,7 +209,7 @@ void POP3_Analyzer::ProcessRequest(int length, const char* line) break; default: - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "unexpected POP3 authorization state"); return; } @@ -567,7 +567,7 @@ void POP3_Analyzer::ProcessClientCmd() break; default: - reporter->InternalAnalyzerError(this, "unknown POP3 command"); + reporter->AnalyzerError(this, "unknown POP3 command"); return; } } diff --git a/src/analyzer/protocol/rpc/RPC.cc b/src/analyzer/protocol/rpc/RPC.cc index 1c4cc46249..1ffc7dd26e 100644 --- a/src/analyzer/protocol/rpc/RPC.cc +++ b/src/analyzer/protocol/rpc/RPC.cc @@ -266,7 +266,7 @@ int RPC_Interpreter::DeliverRPC(const u_char* buf, int n, int rpclen, else if ( n < 0 ) { - reporter->InternalAnalyzerError(analyzer, "RPC underflow"); + reporter->AnalyzerError(analyzer, "RPC underflow"); return 0; } @@ -479,7 +479,7 @@ bool Contents_RPC::CheckResync(int& len, const u_char*& data, bool orig) if ( resync_toskip != 0 ) { // Should never happen. - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "RPC resync: skipping over data failed"); return false; } @@ -633,7 +633,7 @@ void Contents_RPC::DeliverStream(int len, const u_char* data, bool orig) if ( ! dummy_p ) { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "inconsistent RPC record marker extraction"); return; } diff --git a/src/analyzer/protocol/smb/SMB.cc b/src/analyzer/protocol/smb/SMB.cc index 12b3fc4287..8a5665515b 100644 --- a/src/analyzer/protocol/smb/SMB.cc +++ b/src/analyzer/protocol/smb/SMB.cc @@ -738,7 +738,7 @@ int SMB_Session::ParseTransaction(int is_orig, int cmd, break; default: - reporter->InternalAnalyzerError(analyzer, + reporter->AnalyzerError(analyzer, "command mismatch for SMB_Session::ParseTransaction"); return 0; } diff --git a/src/analyzer/protocol/tcp/ContentLine.cc b/src/analyzer/protocol/tcp/ContentLine.cc index 44051ee1d1..63a3c07f00 100644 --- a/src/analyzer/protocol/tcp/ContentLine.cc +++ b/src/analyzer/protocol/tcp/ContentLine.cc @@ -124,7 +124,7 @@ void ContentLine_Analyzer::SetPlainDelivery(int64_t length) { if ( length < 0 ) { - reporter->InternalAnalyzerError(this, + reporter->AnalyzerError(this, "negative length for plain delivery"); return; }