Branch data Line data Source code
1 : : // $Id: Ident.h 6219 2008-10-01 05:39:07Z vern $
2 : : //
3 : : // See the file "COPYING" in the main distribution directory for copyright.
4 : :
5 : : #ifndef ident_h
6 : : #define ident_h
7 : :
8 : : #include "TCP.h"
9 : : #include "ContentLine.h"
10 : :
11 [ # # ][ # # ]: 0 : class Ident_Analyzer : public TCP_ApplicationAnalyzer {
12 : : public:
13 : : Ident_Analyzer(Connection* conn);
14 : : virtual void Done();
15 : :
16 : : virtual void DeliverStream(int length, const u_char* data, bool is_orig);
17 : 0 : virtual int RewritingTrace()
18 : : {
19 : : return rewriting_ident_trace ||
20 [ # # ][ # # ]: 0 : TCP_ApplicationAnalyzer::RewritingTrace();
21 : : }
22 : :
23 : 0 : static Analyzer* InstantiateAnalyzer(Connection* conn)
24 : 0 : { return new Ident_Analyzer(conn); }
25 : :
26 : 1 : static bool Available()
27 [ + - ][ + - ]: 1 : { return ident_request || ident_reply || ident_error; }
[ - + ]
28 : :
29 : : protected:
30 : : const char* ParsePair(const char* line, const char* end_of_line,
31 : : int& p1, int &p2);
32 : : const char* ParsePort(const char* line, const char* end_of_line,
33 : : int& pn);
34 : :
35 : : void BadRequest(int length, const char* line);
36 : : void BadReply(int length, const char* line);
37 : :
38 : : ContentLine_Analyzer* orig_ident;
39 : : ContentLine_Analyzer* resp_ident;
40 : :
41 : : unsigned int did_deliver:1;
42 : : unsigned int did_bad_reply:1;
43 : : };
44 : :
45 : : #endif
|