-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathfilterthread.h
More file actions
39 lines (34 loc) · 837 Bytes
/
Copy pathfilterthread.h
File metadata and controls
39 lines (34 loc) · 837 Bytes
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
// ---------------------------------------------
// 过滤抓包单线程
// ---------------------------------------------
#ifndef FILTERTHREAD_H
#define FILTERTHREAD_H
#include <QByteArray>
#include <QThread>
#include "tcpipcommon.h"
#include "tcpipprotocol.h"
#include "pcap.h"
class FilterThread : public QThread
{
Q_OBJECT
public:
FilterThread();
FilterThread(HostInfo *hostInfo,const char*dev,QString filter);
void quitThread();
private:
bool init();
void filterStart();
void run();
private:
pcap_t * handle;
HostInfo *hostInfo;
QString filter;
bool quitFg;
YEthernetPacket * ethernetPacket;
YArpPacket *arppacket;
YIPHeaderPacket *eippacket;
signals:
void filterUpdateDataSig(QString data);
void filterStatusSig(int num,QString msg);
};
#endif // FILTERTHREAD_H