1 |
// Copyright (C) 2003 Stephane Thiell |
2 |
// |
3 |
// This file is part of pxyscand (from pxys) |
4 |
// |
5 |
// This program is free software; you can redistribute it and/or |
6 |
// modify it under the terms of the GNU General Public License |
7 |
// as published by the Free Software Foundation; either version 2 |
8 |
// of the License, or (at your option) any later version. |
9 |
// |
10 |
// This program is distributed in the hope that it will be useful, |
11 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
// GNU General Public License for more details. |
14 |
// |
15 |
// You should have received a copy of the GNU General Public License |
16 |
// along with this program; if not, write to the Free Software |
17 |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 |
// |
19 |
// $Id: PXMHttpProxy.h,v 1.1.1.1 2003/12/30 17:09:00 mbuna Exp $ |
20 |
// |
21 |
#ifndef INCLUDED_PXMHTTPPROXY_H_ |
22 |
#define INCLUDED_PXMHTTPPROXY_H_ |
23 |
|
24 |
#include <map> |
25 |
|
26 |
#include "PXScanModule.h" |
27 |
#include "PXMutex.h" |
28 |
|
29 |
#include <peak/peak.h> |
30 |
|
31 |
using std::map; |
32 |
|
33 |
class PXMHttpProxy : public PXScanModule |
34 |
{ |
35 |
public: |
36 |
PXMHttpProxy(PXScan *inScan, int inPort); |
37 |
virtual ~PXMHttpProxy(); |
38 |
|
39 |
void InitModule(); |
40 |
bool StartScan(); |
41 |
|
42 |
protected: |
43 |
void Cleanup(); |
44 |
void SendConnectRequest(peak_stream s); |
45 |
void CommitFound(); |
46 |
void ProcessEvent(peak_stream s, int type); |
47 |
static void EventCallback(peak_stream s, int type, void *context); |
48 |
|
49 |
peak_stream mStream; |
50 |
int mLinesTry; |
51 |
int mPort; |
52 |
bool mIsProxy; |
53 |
PXMutex mLogMutex; |
54 |
|
55 |
static map<uint16_t, uint32_t*> sConnCountMap; |
56 |
static map<uint16_t, uint32_t*> sProxyCountMap; |
57 |
}; |
58 |
|
59 |
#endif // INCLUDED_PXMHTTPPROXY_H_ |