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