00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef DETECTOR_H
00019 #define DETECTOR_H
00020
00021 #include <cc++/thread.h>
00022
00028 class Detector;
00029
00030 #include "collector.h"
00031 #include "timeslot.h"
00032 #include "timestamp.h"
00033 #include "ifpair.h"
00034 #include "peerconnect.h"
00035
00036 #include <string>
00037 #include <map>
00038
00039 class Detector : public Thread {
00040 public:
00041 Detector(TimeSlot *, Collector *, float&, float&, string, string, Mutex *);
00042 virtual ~Detector();
00043 virtual void run();
00044
00045 private:
00046 TimeSlot *procts;
00047 Mutex *mtx;
00048 float increase, percentage;
00049 Collector *cl;
00050 string owner, cmd;
00051
00052 virtual void final();
00053 void LogAttackStart(uint16_t, uint16_t, InetHostAddress, InetHostAddress, uint32_t, uint32_t);
00054 void LogAttackStop(uint16_t, uint16_t, InetHostAddress, uint32_t, uint32_t);
00055 };
00056
00057 #endif