1 /**************************************************************************** 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> 22 enum proc_cn_mcast_op { 23 PROC_CN_MCAST_LISTEN = 1, 24 PROC_CN_MCAST_IGNORE = 2 25 }; 26 struct proc_event { 27 enum what { 28 PROC_EVENT_NONE = 0x00000000, 29 PROC_EVENT_FORK = 0x00000001, 30 PROC_EVENT_EXEC = 0x00000002, 31 PROC_EVENT_UID = 0x00000004, 32 PROC_EVENT_GID = 0x00000040, 33 PROC_EVENT_SID = 0x00000080, 34 PROC_EVENT_PTRACE = 0x00000100, 35 PROC_EVENT_COMM = 0x00000200, 36 PROC_EVENT_COREDUMP = 0x40000000, 37 PROC_EVENT_EXIT = 0x80000000 38 } what; 39 __u32 cpu; 40 __u64 __attribute__((aligned(8))) timestamp_ns; 41 union { 42 struct { 43 __u32 err; 44 } ack; 45 struct fork_proc_event { 46 __kernel_pid_t parent_pid; 47 __kernel_pid_t parent_tgid; 48 __kernel_pid_t child_pid; 49 __kernel_pid_t child_tgid; 50 } fork; 51 struct exec_proc_event { 52 __kernel_pid_t process_pid; 53 __kernel_pid_t process_tgid; 54 } exec; 55 struct id_proc_event { 56 __kernel_pid_t process_pid; 57 __kernel_pid_t process_tgid; 58 union { 59 __u32 ruid; 60 __u32 rgid; 61 } r; 62 union { 63 __u32 euid; 64 __u32 egid; 65 } e; 66 } id; 67 struct sid_proc_event { 68 __kernel_pid_t process_pid; 69 __kernel_pid_t process_tgid; 70 } sid; 71 struct ptrace_proc_event { 72 __kernel_pid_t process_pid; 73 __kernel_pid_t process_tgid; 74 __kernel_pid_t tracer_pid; 75 __kernel_pid_t tracer_tgid; 76 } ptrace; 77 struct comm_proc_event { 78 __kernel_pid_t process_pid; 79 __kernel_pid_t process_tgid; 80 char comm[16]; 81 } comm; 82 struct coredump_proc_event { 83 __kernel_pid_t process_pid; 84 __kernel_pid_t process_tgid; 85 __kernel_pid_t parent_pid; 86 __kernel_pid_t parent_tgid; 87 } coredump; 88 struct exit_proc_event { 89 __kernel_pid_t process_pid; 90 __kernel_pid_t process_tgid; 91 __u32 exit_code, exit_signal; 92 __kernel_pid_t parent_pid; 93 __kernel_pid_t parent_tgid; 94 } exit; 95 } event_data; 96 }; 97 #endif 98