#include <string>
#include <vector>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <jthread.hpp>
+#pragma GCC diagnostic pop
#include <cstdint>
-#include <pthread.h>
#include <sys/poll.h>
#define BUFF_LEN (128)
BPF_CAP(const BPF_CAP & rvalue);
BPF_CAP & operator=(const BPF_CAP & rvalue);
- static void * Run(void *);
+ void Run(std::stop_token token);
int BPFCapOpen();
int BPFCapOpen(BPF_DATA * bd);
int BPFCapClose();
std::vector<BPF_DATA> bpfData;
std::vector<pollfd> polld;
- pthread_t thread;
- bool nonstop;
+ std::jthread m_thread;
bool isRunning;
int capSock;
STG::ModuleSettings settings;