-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
68 lines (52 loc) · 1.86 KB
/
mainwindow.h
File metadata and controls
68 lines (52 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QThread>
#include <QStandardItemModel>
#include "ui_mainwindow.h"
#include "pcap.h"
#define HAVE_REMOTE
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
QStandardItemModel *packet_model;
void setNetPort();
~MainWindow();
private slots:
void on_analysisButton_clicked();
void on_netportSelectButton_clicked();
void on_packetTable_doubleClicked(const QModelIndex &index);
void on_tcpBox_clicked(bool checked);
void on_udpBox_clicked(bool checked);
void on_icmpBox_clicked(bool checked);
void on_deveiveStartButton_clicked();
void on_applicationBox_clicked(bool checked);
private:
Ui::MainWindow *ui;
pcap_if_t *alldevs,*currentDev;
//QStandardItemModel *packet_model;
//QList<QString> storePacket;
int currentDevIndex;
pcap_t *curhandle;
void setFilterRule(QString rule);
void packetTableInit();
void deeperArpAnalyze(QByteArray data,QTreeWidgetItem *arpRoot);
void deeperIPAnalyze(QByteArray data,QTreeWidgetItem *ipRoot,QTreeWidgetItem *transRoot);
//void deeperTransAnalyze(QByteArray transData,QTreeWidgetItem *transRoot);
void deeperTCPAnalyze(QByteArray transData,QTreeWidgetItem *transRoot);
void deeperUDPAnalyze(QByteArray transdata,QTreeWidgetItem *transRoot);
void deeperICMPAnalyze(QByteArray transdata,QTreeWidgetItem *transRoot);
void deeperDNSAnalyze(QByteArray appdata);
void deeperDHCPAnalyze(QByteArray appdata);
void showPacketContent(QByteArray packetContent);
QByteArray Mac2char(QString HexString);
QByteArray IP2char(QString sourceStr);
QTreeWidgetItem *appRoot;
boolean isApp;
};
#endif // MAINWINDOW_H