xref: /aosp_15_r20/external/bcc/libbpf-tools/capable.h (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
2 //
3 // Copyright 2022 Sony Group Corporation
4 
5 #ifndef __CAPABLE_H
6 #define __CAPABLE_H
7 
8 #define TASK_COMM_LEN	16
9 
10 struct cap_event {
11 	__u32	pid;
12 	__u32	cap;
13 	gid_t	tgid;
14 	uid_t	uid;
15 	int	audit;
16 	int	insetid;
17 	int	ret;
18 	char	task[TASK_COMM_LEN];
19 };
20 
21 struct key_t {
22 	__u32	pid;
23 	__u32	tgid;
24 	int	user_stack_id;
25 	int	kern_stack_id;
26 };
27 
28 enum uniqueness {
29 	UNQ_OFF, UNQ_PID, UNQ_CGROUP
30 };
31 
32 #endif /* __CAPABLE_H */
33