Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

client.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           peer.h  -  description
00003                              -------------------
00004     begin                : Fri Nov 2 2001
00005     copyright            : (C) 2001 by Constantinos A. Kotsokalis
00006     email                : ckotso@netmode.ntua.gr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CLIENT_H
00019 #define CLIENT_H
00020 
00027 class Client;
00028 
00029 // Common C++ headers
00030 #include <cc++/socket.h>
00031 #include <cc++/thread.h>
00032 #include <cc++/misc.h>
00033 
00034 #ifdef  CCXX_NAMESPACES
00035 using namespace std;
00036 using namespace ost;
00037 #endif
00038 
00039 // Custom project headers
00040 #include "common.h"
00041 #include "peerconnect.h"
00042 
00043 // Standard C headers
00044 #include <stdio.h>
00045 
00046 // Standard C++ Library templates)
00047 #include <string>
00048 #include <map>
00049 #include <vector>
00050 
00051 // This class is derived from TCPSession (available through CommonC++).
00052 // It handles connections from remote detectors.
00053 class Client : public TCPSession {
00054 private:
00055     // The detector that provided us with data, if any
00056     InetHostAddress prevdetector;
00057     Collector *cl;
00058     Mutex *mtx;
00059     // Returns the logical interface for the detector that provided us with attack info
00060     uint16_t getOutput(string);
00061 
00062     virtual void final();
00063 
00064 public:
00065     // Class constructor
00066     Client(TCPSocket&, Collector *, Mutex *);
00067     virtual ~Client();
00068     virtual void run();
00069 };
00070 
00071 
00072 #endif

Generated on Thu Jun 26 00:23:12 2003 for Panoptis by doxygen1.2.18