Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 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 _UAPI_LINUX_BINDER_H |
| 20 | #define _UAPI_LINUX_BINDER_H |
| 21 | #include <linux/ioctl.h> |
| 22 | #define B_PACK_CHARS(c1, c2, c3, c4) ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4)) |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | #define B_TYPE_LARGE 0x85 |
| 25 | enum { |
| 26 | BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE), |
| 27 | BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE), |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), |
| 30 | BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), |
| 31 | BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), |
| 32 | }; |
| 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 34 | enum { |
| 35 | FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff, |
| 36 | FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, |
| 37 | }; |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | struct flat_binder_object { |
| 40 | unsigned long type; |
| 41 | unsigned long flags; |
| 42 | union { |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | void __user *binder; |
| 45 | signed long handle; |
| 46 | }; |
| 47 | void __user *cookie; |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | }; |
| 50 | struct binder_write_read { |
| 51 | signed long write_size; |
| 52 | signed long write_consumed; |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | unsigned long write_buffer; |
| 55 | signed long read_size; |
| 56 | signed long read_consumed; |
| 57 | unsigned long read_buffer; |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | }; |
| 60 | struct binder_version { |
| 61 | signed long protocol_version; |
| 62 | }; |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | #define BINDER_CURRENT_PROTOCOL_VERSION 7 |
| 65 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 66 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 67 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, size_t) |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | #define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) |
| 70 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) |
| 71 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 72 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | enum transaction_flags { |
| 75 | TF_ONE_WAY = 0x01, |
| 76 | TF_ROOT_OBJECT = 0x04, |
| 77 | TF_STATUS_CODE = 0x08, |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | TF_ACCEPT_FDS = 0x10, |
| 80 | }; |
| 81 | struct binder_transaction_data { |
| 82 | union { |
| 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 84 | size_t handle; |
| 85 | void *ptr; |
| 86 | } target; |
| 87 | void *cookie; |
| 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 89 | unsigned int code; |
| 90 | unsigned int flags; |
| 91 | pid_t sender_pid; |
| 92 | uid_t sender_euid; |
| 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 94 | size_t data_size; |
| 95 | size_t offsets_size; |
| 96 | union { |
| 97 | struct { |
| 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 99 | const void __user *buffer; |
| 100 | const void __user *offsets; |
| 101 | } ptr; |
| 102 | uint8_t buf[8]; |
| 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 104 | } data; |
| 105 | }; |
| 106 | struct binder_ptr_cookie { |
| 107 | void *ptr; |
| 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 109 | void *cookie; |
| 110 | }; |
| 111 | struct binder_pri_desc { |
| 112 | int priority; |
| 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 114 | int desc; |
| 115 | }; |
| 116 | struct binder_pri_ptr_cookie { |
| 117 | int priority; |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | void *ptr; |
| 120 | void *cookie; |
| 121 | }; |
| 122 | enum binder_driver_return_protocol { |
| 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 124 | BR_ERROR = _IOR('r', 0, int), |
| 125 | BR_OK = _IO('r', 1), |
| 126 | BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data), |
| 127 | BR_REPLY = _IOR('r', 3, struct binder_transaction_data), |
| 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 129 | BR_ACQUIRE_RESULT = _IOR('r', 4, int), |
| 130 | BR_DEAD_REPLY = _IO('r', 5), |
| 131 | BR_TRANSACTION_COMPLETE = _IO('r', 6), |
| 132 | BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie), |
| 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 134 | BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie), |
| 135 | BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie), |
| 136 | BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie), |
| 137 | BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie), |
| 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 139 | BR_NOOP = _IO('r', 12), |
| 140 | BR_SPAWN_LOOPER = _IO('r', 13), |
| 141 | BR_FINISHED = _IO('r', 14), |
| 142 | BR_DEAD_BINDER = _IOR('r', 15, void *), |
| 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 144 | BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, void *), |
| 145 | BR_FAILED_REPLY = _IO('r', 17), |
| 146 | }; |
| 147 | enum binder_driver_command_protocol { |
| 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 149 | BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data), |
| 150 | BC_REPLY = _IOW('c', 1, struct binder_transaction_data), |
| 151 | BC_ACQUIRE_RESULT = _IOW('c', 2, int), |
| 152 | BC_FREE_BUFFER = _IOW('c', 3, int), |
| 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 154 | BC_INCREFS = _IOW('c', 4, int), |
| 155 | BC_ACQUIRE = _IOW('c', 5, int), |
| 156 | BC_RELEASE = _IOW('c', 6, int), |
| 157 | BC_DECREFS = _IOW('c', 7, int), |
| 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 159 | BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie), |
| 160 | BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie), |
| 161 | BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc), |
| 162 | BC_REGISTER_LOOPER = _IO('c', 11), |
| 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 164 | BC_ENTER_LOOPER = _IO('c', 12), |
| 165 | BC_EXIT_LOOPER = _IO('c', 13), |
| 166 | BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_ptr_cookie), |
| 167 | BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_ptr_cookie), |
| 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 169 | BC_DEAD_BINDER_DONE = _IOW('c', 16, void *), |
| 170 | }; |
| 171 | #endif |