Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

wellenreiter.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer.  All rights reserved.
00003 **
00004 ** This file may be distributed and/or modified under the terms of the
00005 ** GNU General Public License version 2 as published by the Free Software
00006 ** Foundation and appearing in the file LICENSE.GPL included in the
00007 ** packaging of this file.
00008 **
00009 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00010 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00011 **
00012 **********************************************************************/
00013 
00014 #ifndef WELLENREITER_H
00015 #define WELLENREITER_H
00016 
00017 #include "wellenreiterbase.h"
00018 
00019 #ifdef QWS
00020 #include <opie2/odevice.h>
00021 #endif
00022 
00023 #include <signal.h>
00024 
00025 class QTimerEvent;
00026 class QPixmap;
00027 namespace Opie {namespace Net {class OPacket;}}
00028 namespace Opie {namespace Net {class OWaveLanManagementPacket;}}
00029 namespace Opie {namespace Net {class OWaveLanControlPacket;}}
00030 namespace Opie {namespace Net {class OWaveLanDataPacket;}}
00031 namespace Opie {namespace Net {class OEthernetPacket;}}
00032 namespace Opie {namespace Net {class OARPPacket;}}
00033 namespace Opie {namespace Net {class OMacAddress;}}
00034 namespace Opie {namespace Net {class OIPPacket;}}
00035 namespace Opie {namespace Net {class OPacket;}}
00036 namespace Opie {namespace Net {class OWirelessNetworkInterface;}}
00037 namespace Opie {namespace Net {class OPacketCapturer;}}
00038 class PacketView;
00039 class WellenreiterConfigWindow;
00040 class MLogWindow;
00041 class GPS;
00042 
00043 class Wellenreiter : public WellenreiterBase {
00044     Q_OBJECT
00045 
00046   public:
00047     Wellenreiter( QWidget* parent = 0 );
00048     ~Wellenreiter();
00049 
00050     void setConfigWindow( WellenreiterConfigWindow* cw );
00051     MScanListView* netView() const { return netview; };
00052     MLogWindow* logWindow() const { return logwindow; };
00053     PacketView* hexWindow() const { return hexwindow; };
00054     bool isDaemonRunning() const { return sniffing; };
00055     QString captureFileName() const { return dumpname; };
00056 
00057   public:
00058     QString dumpname;
00059     bool sniffing;
00060     static Wellenreiter* instance;
00061     static void signalHandler( int sig );
00062 
00063   protected:
00064     virtual void timerEvent( QTimerEvent* );
00065 
00066   public slots:
00067     void initialTimer();
00068 
00069     void channelHopped(int);
00070     void receivePacket(Opie::Net::OPacket*);
00071     void startClicked();
00072     void stopClicked();
00073 
00074   signals:
00075     void startedSniffing();
00076     void stoppedSniffing();
00077 
00078   private:
00079     void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
00080     void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
00081     void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
00082     void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
00083     void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control );
00084     void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
00085     void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
00086     void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
00087     void handleIPData( Opie::Net::OPacket* p, Opie::Net::OIPPacket* ip, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
00088     void handleNotification( Opie::Net::OPacket* p );
00089     void doAction( const QString& action, const QString& protocol, Opie::Net::OPacket* p );
00090     QObject* childIfToParse( Opie::Net::OPacket* p, const QString& protocol );
00091     bool checkDumpPacket( Opie::Net::OPacket* p );
00092     void registerSignalHandler();
00093 
00094   private slots:
00095     void slotTabChanged( QWidget* );
00096 
00097   private:
00098     void updateStatistics();
00099 
00100     #ifdef QWS
00101     Opie::Core::OSystem _system;                // Opie Operating System identifier
00102     #endif
00103 
00104     Opie::Net::OWirelessNetworkInterface* iface;
00105     Opie::Net::OPacketCapturer* pcap;
00106     WellenreiterConfigWindow* configwindow;
00107     GPS* gps;
00108 
00109     //void readConfig();
00110     //void writeConfig();
00111 };
00112 
00113 
00114 
00115 #endif

Generated on Sat Nov 5 16:17:45 2005 for OPIE by  doxygen 1.4.2