zeek/src/Ident.h
Robin Sommer a3a075174b Merging in 'topic/robin/cleanup-rewriter'.
Removing everything related to trace rewriting.

(I wasn't too careful in ensuring that I catch everything in the
scripts; Seth is working on those anyway.)

(Merging by cherry-picking the corresponding commit, as the branch was
accidentally made off of the logging stuff).
2011-04-01 15:23:50 -07:00

40 lines
1,001 B
C++

// $Id: Ident.h 6219 2008-10-01 05:39:07Z vern $
//
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ident_h
#define ident_h
#include "TCP.h"
#include "ContentLine.h"
class Ident_Analyzer : public TCP_ApplicationAnalyzer {
public:
Ident_Analyzer(Connection* conn);
virtual void Done();
virtual void DeliverStream(int length, const u_char* data, bool is_orig);
static Analyzer* InstantiateAnalyzer(Connection* conn)
{ return new Ident_Analyzer(conn); }
static bool Available()
{ return ident_request || ident_reply || ident_error; }
protected:
const char* ParsePair(const char* line, const char* end_of_line,
int& p1, int &p2);
const char* ParsePort(const char* line, const char* end_of_line,
int& pn);
void BadRequest(int length, const char* line);
void BadReply(int length, const char* line);
ContentLine_Analyzer* orig_ident;
ContentLine_Analyzer* resp_ident;
unsigned int did_deliver:1;
unsigned int did_bad_reply:1;
};
#endif