mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTableWidget>
#include <QPixmap>
#include "sniffer.h"
#include <QThread>
#include <QWaitCondition>
#include <QMutex>
#include <string>
#include <QStringList>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QUrl>
#include <QListWidgetItem>
#include <QIcon>
#include "imagepacket.h"
using namespace std ;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_capture_clicked();
void on_packetDisplay_itemClicked(QTableWidgetItem *item);
void on_resetButton_clicked();
public slots:
void handleResults(unsigned long index) ;
void slot_netwManagerFinished(QNetworkReply *reply) ;
private:
Ui::MainWindow *ui;
Sniffer *sniff ;
QThread sniff_thread ;
QWaitCondition wait_pause ;
int pause ;
QMutex mutex ;
QStringList imageList ;
QNetworkAccessManager *netManager ;
};
#endif // MAINWINDOW_H
MainWindow::wait_pause
QWaitCondition wait_pause
Definition: mainwindow.h:105
Ui
Definition: mainwindow.h:22
std
MainWindow::mutex
QMutex mutex
Definition: mainwindow.h:107
MainWindow::netManager
QNetworkAccessManager * netManager
Definition: mainwindow.h:109
MainWindow::sniff
Sniffer * sniff
Definition: mainwindow.h:103
MainWindow::sniff_thread
QThread sniff_thread
Definition: mainwindow.h:104
MainWindow
Definition: mainwindow.h:26
MainWindow::pause
int pause
Definition: mainwindow.h:106
Sniffer
The Sniffer class is the one that use the pcap library to extract the packet information. It discards any packet that is not Ethernet->IP->(TCP|UDP), and pass up to the GUI the packets that are Ethernet->IP->(TCP|UDP).
Definition: sniffer.h:40
MainWindow::imageList
QStringList imageList
Definition: mainwindow.h:108