Branch data Line data Source code
1 : : // $Id: FTP.h 6782 2009-06-28 02:19:03Z vern $
2 : : //
3 : : // See the file "COPYING" in the main distribution directory for copyright.
4 : :
5 : : #ifndef ftp_h
6 : : #define ftp_h
7 : :
8 : : #include "NVT.h"
9 : : #include "TCP.h"
10 : :
11 [ # # ][ # # ]: 0 : class FTP_Analyzer : public TCP_ApplicationAnalyzer {
12 : : public:
13 : : FTP_Analyzer(Connection* conn);
14 : :
15 : : virtual void Done();
16 : : virtual void DeliverStream(int len, const u_char* data, bool orig);
17 : 0 : virtual int RewritingTrace()
18 : : {
19 : : return rewriting_ftp_trace ||
20 [ # # ][ # # ]: 0 : TCP_ApplicationAnalyzer::RewritingTrace();
21 : : }
22 : :
23 : 0 : static Analyzer* InstantiateAnalyzer(Connection* conn)
24 : : {
25 : 0 : return new FTP_Analyzer(conn);
26 : : }
27 : :
28 [ + - ][ - + ]: 1 : static bool Available() { return ftp_request || ftp_reply; }
29 : :
30 : :
31 : : protected:
32 : : FTP_Analyzer() {}
33 : :
34 : : NVT_Analyzer* nvt_orig;
35 : : NVT_Analyzer* nvt_resp;
36 : : uint32 pending_reply; // code associated with multi-line reply, or 0
37 : : string auth_requested; // AUTH method requested
38 : : };
39 : :
40 : : #endif
|