#ifndef MAINWIN_H #define MAINWIN_H #include "basewin.h" #define HAVE_REMOTE #include "pcapthread.h" #include "table.h" class MainPcapThread : public QThread { Q_OBJECT public: explicit MainPcapThread(pcap *pcap); ~MainPcapThread() { pcap_close(pcap); } pcap *pcap; std::atomic status{0}; protected: void run(); signals: void onMsg(const u_char *data,int len); void onError(char *); }; class MainWin : public BaseWin { Q_OBJECT public: MainWin(); QWidget *win{0}; QByteArray net_name; pcap_t *pcapRe{0}; pcap_t *pcapSend{0}; MainPcapThread *thd{0}; Table *table = nullptr; protected slots: void ProNetData(const u_char *data,int len); }; #endif // MAINWIN_H