Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wynyibo committed Jan 16, 2025
1 parent 831787d commit 711b05b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions MagicEyes/src/backend/net/net_watcher/include/net_watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,9 @@ struct tcp_args_s {
u64 sample_period;
};

struct ring_buffer_info
{
struct ring_buffer *rb;
const char *name;
};
#endif /* __NET_WATCHER_H */
8 changes: 1 addition & 7 deletions MagicEyes/src/backend/net/net_watcher/src/net_watcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
static volatile bool exiting = false;
struct packet_count proto_stats[256] = {0};
static struct reset_event_t event_store[MAX_EVENTS];
int event_count = 0, num_symbols = 0, cache_size = 0, map_fd;
int event_count = 0, num_symbols = 0, cache_size = 0, map_fd,count[NUM_LAYERS] = {0};
static u64 sample_period = TIME_THRESHOLD_NS, rst_count = 0;
static char binary_path[64] = "", *dst_ip = NULL, *src_ip = NULL;
static int sport = 0, dport = 0; // for filter
Expand All @@ -50,13 +50,7 @@ static int all_conn = 0, err_packet = 0, extra_conn_info = 0, layer_time = 0,
struct SymbolEntry symbols[300000];
struct SymbolEntry cache[CACHEMAXSIZE];
float ewma_values[NUM_LAYERS] = {0};
int count[NUM_LAYERS] = {0};

struct ring_buffer_info
{
struct ring_buffer *rb;
const char *name;
};

// 定义一个数组存储所有的 ring_buffer 信息
struct ring_buffer_info ring_buffers[] = {
Expand Down

0 comments on commit 711b05b

Please sign in to comment.