mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Rename analyzer/protocols -> analyzer/protocol
This commit is contained in:
parent
f7a10d915b
commit
4bc2ba60c9
279 changed files with 114 additions and 116 deletions
|
@ -1,67 +0,0 @@
|
|||
// An IRC analyzer contributed by Roland Gruber.
|
||||
|
||||
#ifndef ANALYZER_PROTOCOL_IRC_IRC_H
|
||||
#define ANALYZER_PROTOCOL_IRC_IRC_H
|
||||
#include "analyzer/protocols/tcp/TCP.h"
|
||||
|
||||
namespace analyzer { namespace irc {
|
||||
|
||||
/**
|
||||
* \brief Main class for analyzing IRC traffic.
|
||||
*/
|
||||
class IRC_Analyzer : public tcp::TCP_ApplicationAnalyzer {
|
||||
enum { WAIT_FOR_REGISTRATION, REGISTERED, };
|
||||
enum { NO_ZIP, ACCEPT_ZIP, ZIP_LOADED, };
|
||||
public:
|
||||
/**
|
||||
* \brief Constructor, builds a new analyzer object.
|
||||
*/
|
||||
IRC_Analyzer(Connection* conn);
|
||||
|
||||
/**
|
||||
* \brief Called when connection is closed.
|
||||
*/
|
||||
virtual void Done();
|
||||
|
||||
/**
|
||||
* \brief New input line in network stream.
|
||||
*
|
||||
* \param len the line length
|
||||
* \param data pointer to line start
|
||||
* \param orig was this data sent from connection originator?
|
||||
*/
|
||||
virtual void DeliverStream(int len, const u_char* data, bool orig);
|
||||
|
||||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{
|
||||
return new IRC_Analyzer(conn);
|
||||
}
|
||||
|
||||
protected:
|
||||
int orig_status;
|
||||
int orig_zip_status;
|
||||
int resp_status;
|
||||
int resp_zip_status;
|
||||
|
||||
private:
|
||||
/** \brief counts number of invalid IRC messages */
|
||||
int invalid_msg_count;
|
||||
|
||||
/** \brief maximum count of invalid IRC messages */
|
||||
int invalid_msg_max_count;
|
||||
|
||||
/**
|
||||
* \brief Splits a string into its words which are separated by
|
||||
* the split character.
|
||||
*
|
||||
* \param input string which will be splitted
|
||||
* \param split character which separates the words
|
||||
* \return vector containing words
|
||||
*/
|
||||
vector<string> SplitWords(const string input, const char split);
|
||||
|
||||
};
|
||||
|
||||
} } // namespace analyzer::*
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue