blob: 411b7253e23e1d21d0a8d5514c41c7780332ede1 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPICN_PROC_H
20#define _UAPICN_PROC_H
21#include <linux/types.h>
22enum proc_cn_mcast_op {
Tao Baod7db5942015-01-28 10:07:51 -080023 PROC_CN_MCAST_LISTEN = 1,
24 PROC_CN_MCAST_IGNORE = 2
Ben Cheng655a7c02013-10-16 16:09:24 -070025};
26struct proc_event {
Tao Baod7db5942015-01-28 10:07:51 -080027 enum what {
28 PROC_EVENT_NONE = 0x00000000,
29 PROC_EVENT_FORK = 0x00000001,
30 PROC_EVENT_EXEC = 0x00000002,
Tao Baod7db5942015-01-28 10:07:51 -080031 PROC_EVENT_UID = 0x00000004,
32 PROC_EVENT_GID = 0x00000040,
33 PROC_EVENT_SID = 0x00000080,
34 PROC_EVENT_PTRACE = 0x00000100,
Tao Baod7db5942015-01-28 10:07:51 -080035 PROC_EVENT_COMM = 0x00000200,
36 PROC_EVENT_COREDUMP = 0x40000000,
37 PROC_EVENT_EXIT = 0x80000000
38 } what;
Tao Baod7db5942015-01-28 10:07:51 -080039 __u32 cpu;
40 __u64 __attribute__((aligned(8))) timestamp_ns;
41 union {
42 struct {
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 err;
44 } ack;
45 struct fork_proc_event {
46 __kernel_pid_t parent_pid;
Tao Baod7db5942015-01-28 10:07:51 -080047 __kernel_pid_t parent_tgid;
48 __kernel_pid_t child_pid;
49 __kernel_pid_t child_tgid;
50 } fork;
Tao Baod7db5942015-01-28 10:07:51 -080051 struct exec_proc_event {
52 __kernel_pid_t process_pid;
53 __kernel_pid_t process_tgid;
54 } exec;
Tao Baod7db5942015-01-28 10:07:51 -080055 struct id_proc_event {
56 __kernel_pid_t process_pid;
57 __kernel_pid_t process_tgid;
58 union {
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 ruid;
60 __u32 rgid;
61 } r;
62 union {
Tao Baod7db5942015-01-28 10:07:51 -080063 __u32 euid;
64 __u32 egid;
65 } e;
66 } id;
Tao Baod7db5942015-01-28 10:07:51 -080067 struct sid_proc_event {
68 __kernel_pid_t process_pid;
69 __kernel_pid_t process_tgid;
70 } sid;
Tao Baod7db5942015-01-28 10:07:51 -080071 struct ptrace_proc_event {
72 __kernel_pid_t process_pid;
73 __kernel_pid_t process_tgid;
74 __kernel_pid_t tracer_pid;
Tao Baod7db5942015-01-28 10:07:51 -080075 __kernel_pid_t tracer_tgid;
76 } ptrace;
77 struct comm_proc_event {
78 __kernel_pid_t process_pid;
Tao Baod7db5942015-01-28 10:07:51 -080079 __kernel_pid_t process_tgid;
80 char comm[16];
81 } comm;
82 struct coredump_proc_event {
Tao Baod7db5942015-01-28 10:07:51 -080083 __kernel_pid_t process_pid;
84 __kernel_pid_t process_tgid;
Christopher Ferris9ce28842018-10-25 12:11:39 -070085 __kernel_pid_t parent_pid;
86 __kernel_pid_t parent_tgid;
Tao Baod7db5942015-01-28 10:07:51 -080087 } coredump;
88 struct exit_proc_event {
Tao Baod7db5942015-01-28 10:07:51 -080089 __kernel_pid_t process_pid;
90 __kernel_pid_t process_tgid;
91 __u32 exit_code, exit_signal;
Christopher Ferris9ce28842018-10-25 12:11:39 -070092 __kernel_pid_t parent_pid;
93 __kernel_pid_t parent_tgid;
Tao Baod7db5942015-01-28 10:07:51 -080094 } exit;
Tao Baod7db5942015-01-28 10:07:51 -080095 } event_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070096};
97#endif