execsnoop as library

This commit is contained in:
springzfx
2020-05-25 13:49:40 +08:00
parent f501c7e476
commit 1c72a204a1
6 changed files with 58 additions and 25 deletions

17
src/execsnoop.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef EXECSNOOP_HPP
#define EXECSNOOP_HPP 1
#include <functional>
#include <string>
using namespace std;
namespace CGPROXY::EXESNOOP {
extern const string BPF_PROGRAM;
struct data_t;
extern function<int(int)> callback;
void handle_events(void *cb_cookie, void *data, int data_size);
int execsnoop();
} // namespace CGPROXY::EXESNOOP
#endif