• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPICN_PROC_H
8 #define _UAPICN_PROC_H
9 #include <linux/types.h>
10 enum proc_cn_mcast_op {
11   PROC_CN_MCAST_LISTEN = 1,
12   PROC_CN_MCAST_IGNORE = 2
13 };
14 #define PROC_EVENT_ALL (PROC_EVENT_FORK | PROC_EVENT_EXEC | PROC_EVENT_UID | PROC_EVENT_GID | PROC_EVENT_SID | PROC_EVENT_PTRACE | PROC_EVENT_COMM | PROC_EVENT_NONZERO_EXIT | PROC_EVENT_COREDUMP | PROC_EVENT_EXIT)
15 enum proc_cn_event {
16   PROC_EVENT_NONE = 0x00000000,
17   PROC_EVENT_FORK = 0x00000001,
18   PROC_EVENT_EXEC = 0x00000002,
19   PROC_EVENT_UID = 0x00000004,
20   PROC_EVENT_GID = 0x00000040,
21   PROC_EVENT_SID = 0x00000080,
22   PROC_EVENT_PTRACE = 0x00000100,
23   PROC_EVENT_COMM = 0x00000200,
24   PROC_EVENT_NONZERO_EXIT = 0x20000000,
25   PROC_EVENT_COREDUMP = 0x40000000,
26   PROC_EVENT_EXIT = 0x80000000
27 };
28 struct proc_input {
29   enum proc_cn_mcast_op mcast_op;
30   enum proc_cn_event event_type;
31 };
32 struct proc_event {
33   enum proc_cn_event what;
34   __u32 cpu;
35   __u64 __attribute__((aligned(8))) timestamp_ns;
36   union {
37     struct {
38       __u32 err;
39     } ack;
40     struct fork_proc_event {
41       __kernel_pid_t parent_pid;
42       __kernel_pid_t parent_tgid;
43       __kernel_pid_t child_pid;
44       __kernel_pid_t child_tgid;
45     } fork;
46     struct exec_proc_event {
47       __kernel_pid_t process_pid;
48       __kernel_pid_t process_tgid;
49     } exec;
50     struct id_proc_event {
51       __kernel_pid_t process_pid;
52       __kernel_pid_t process_tgid;
53       union {
54         __u32 ruid;
55         __u32 rgid;
56       } r;
57       union {
58         __u32 euid;
59         __u32 egid;
60       } e;
61     } id;
62     struct sid_proc_event {
63       __kernel_pid_t process_pid;
64       __kernel_pid_t process_tgid;
65     } sid;
66     struct ptrace_proc_event {
67       __kernel_pid_t process_pid;
68       __kernel_pid_t process_tgid;
69       __kernel_pid_t tracer_pid;
70       __kernel_pid_t tracer_tgid;
71     } ptrace;
72     struct comm_proc_event {
73       __kernel_pid_t process_pid;
74       __kernel_pid_t process_tgid;
75       char comm[16];
76     } comm;
77     struct coredump_proc_event {
78       __kernel_pid_t process_pid;
79       __kernel_pid_t process_tgid;
80       __kernel_pid_t parent_pid;
81       __kernel_pid_t parent_tgid;
82     } coredump;
83     struct exit_proc_event {
84       __kernel_pid_t process_pid;
85       __kernel_pid_t process_tgid;
86       __u32 exit_code, exit_signal;
87       __kernel_pid_t parent_pid;
88       __kernel_pid_t parent_tgid;
89     } exit;
90   } event_data;
91 };
92 #endif
93