forked from falcosecurity/libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ppm_consumer.h
44 lines (36 loc) · 1.13 KB
/
ppm_consumer.h
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
40
41
42
43
44
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
Copyright (C) 2023 The Falco Authors.
This file is dual licensed under either the MIT or GPL 2. See MIT.txt
or GPL2.txt for full copies of the license.
*/
#ifndef CONSUMER_H_
#define CONSUMER_H_
#include <linux/types.h>
struct ppm_consumer_t {
unsigned int id; // numeric id for the consumer (ie: registration index)
struct task_struct *consumer_id;
#ifdef __percpu
struct ppm_ring_buffer_context __percpu *ring_buffers;
#else
struct ppm_ring_buffer_context *ring_buffers;
#endif
uint32_t snaplen;
uint32_t sampling_ratio;
bool do_dynamic_snaplen;
uint32_t sampling_interval;
int is_dropping;
int dropping_mode;
bool drop_failed;
volatile int need_to_insert_drop_e;
volatile int need_to_insert_drop_x;
struct list_head node;
uint16_t fullcapture_port_range_start;
uint16_t fullcapture_port_range_end;
uint16_t statsd_port;
unsigned long buffer_bytes_dim; /* Every consumer will have its per-CPU buffer dim in bytes. */
DECLARE_BITMAP(syscalls_mask, SYSCALL_TABLE_SIZE);
uint32_t tracepoints_attached;
};
typedef struct ppm_consumer_t ppm_consumer_t;
#endif // CONSUMER_H_