2013-11-21 22:43:23 +01:00
|
|
|
/****************************************************************************
|
|
|
|
****************************************************************************
|
|
|
|
***
|
|
|
|
*** This header was automatically generated from a Linux kernel header
|
|
|
|
*** of the same name, to make information necessary for userspace to
|
|
|
|
*** call into the kernel available to libc. It contains only constants,
|
|
|
|
*** structures, and macros generated from the original header, and thus,
|
|
|
|
*** contains no copyrightable information.
|
|
|
|
***
|
|
|
|
*** To edit the content of this header, modify the corresponding
|
|
|
|
*** source file (e.g. under external/kernel-headers/original/) then
|
|
|
|
*** run bionic/libc/kernel/tools/update_all.py
|
|
|
|
***
|
|
|
|
*** Any manual change here will be lost the next time this script will
|
|
|
|
*** be run. You've been warned!
|
|
|
|
***
|
|
|
|
****************************************************************************
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _UAPI_LINUX_BINDER_H
|
|
|
|
#define _UAPI_LINUX_BINDER_H
|
|
|
|
#include <linux/ioctl.h>
|
|
|
|
#define B_PACK_CHARS(c1, c2, c3, c4) ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4))
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
#define B_TYPE_LARGE 0x85
|
|
|
|
enum {
|
|
|
|
BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE),
|
|
|
|
BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE),
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE),
|
|
|
|
BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE),
|
|
|
|
BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE),
|
|
|
|
};
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
enum {
|
|
|
|
FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
|
|
|
|
FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
|
|
|
|
};
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
#ifdef BINDER_IPC_32BIT
|
|
|
|
typedef __u32 binder_size_t;
|
|
|
|
typedef __u32 binder_uintptr_t;
|
|
|
|
#else
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
typedef __u64 binder_size_t;
|
|
|
|
typedef __u64 binder_uintptr_t;
|
|
|
|
#endif
|
2013-11-21 22:43:23 +01:00
|
|
|
struct flat_binder_object {
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
__u32 type;
|
|
|
|
__u32 flags;
|
2013-11-21 22:43:23 +01:00
|
|
|
union {
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t binder;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
__u32 handle;
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t cookie;
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
struct binder_write_read {
|
|
|
|
binder_size_t write_size;
|
|
|
|
binder_size_t write_consumed;
|
|
|
|
binder_uintptr_t write_buffer;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_size_t read_size;
|
|
|
|
binder_size_t read_consumed;
|
|
|
|
binder_uintptr_t read_buffer;
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
struct binder_version {
|
2014-01-29 04:27:17 +01:00
|
|
|
__s32 protocol_version;
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
2014-01-29 04:27:17 +01:00
|
|
|
#ifdef BINDER_IPC_32BIT
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
#define BINDER_CURRENT_PROTOCOL_VERSION 7
|
2014-01-29 04:27:17 +01:00
|
|
|
#else
|
|
|
|
#define BINDER_CURRENT_PROTOCOL_VERSION 8
|
|
|
|
#endif
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
|
|
|
|
#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
|
2014-01-29 04:27:17 +01:00
|
|
|
#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
|
2013-11-21 22:43:23 +01:00
|
|
|
#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32)
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32)
|
|
|
|
#define BINDER_THREAD_EXIT _IOW('b', 8, __s32)
|
|
|
|
#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
|
|
|
|
enum transaction_flags {
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
TF_ONE_WAY = 0x01,
|
|
|
|
TF_ROOT_OBJECT = 0x04,
|
|
|
|
TF_STATUS_CODE = 0x08,
|
|
|
|
TF_ACCEPT_FDS = 0x10,
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
|
|
|
struct binder_transaction_data {
|
|
|
|
union {
|
2014-01-29 04:27:17 +01:00
|
|
|
__u32 handle;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t ptr;
|
2013-11-21 22:43:23 +01:00
|
|
|
} target;
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t cookie;
|
|
|
|
__u32 code;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
__u32 flags;
|
2013-11-21 22:43:23 +01:00
|
|
|
pid_t sender_pid;
|
|
|
|
uid_t sender_euid;
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_size_t data_size;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_size_t offsets_size;
|
2013-11-21 22:43:23 +01:00
|
|
|
union {
|
|
|
|
struct {
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t buffer;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t offsets;
|
2013-11-21 22:43:23 +01:00
|
|
|
} ptr;
|
2014-01-29 04:27:17 +01:00
|
|
|
__u8 buf[8];
|
2013-11-21 22:43:23 +01:00
|
|
|
} data;
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
|
|
|
struct binder_ptr_cookie {
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t ptr;
|
|
|
|
binder_uintptr_t cookie;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
};
|
2014-01-29 04:27:17 +01:00
|
|
|
struct binder_handle_cookie {
|
|
|
|
__u32 handle;
|
|
|
|
binder_uintptr_t cookie;
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
} __attribute__((packed));
|
2013-11-21 22:43:23 +01:00
|
|
|
struct binder_pri_desc {
|
2014-01-29 04:27:17 +01:00
|
|
|
__s32 priority;
|
|
|
|
__u32 desc;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
};
|
|
|
|
struct binder_pri_ptr_cookie {
|
2014-01-29 04:27:17 +01:00
|
|
|
__s32 priority;
|
|
|
|
binder_uintptr_t ptr;
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
binder_uintptr_t cookie;
|
2013-11-21 22:43:23 +01:00
|
|
|
};
|
|
|
|
enum binder_driver_return_protocol {
|
2014-01-29 04:27:17 +01:00
|
|
|
BR_ERROR = _IOR('r', 0, __s32),
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
BR_OK = _IO('r', 1),
|
|
|
|
BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data),
|
|
|
|
BR_REPLY = _IOR('r', 3, struct binder_transaction_data),
|
2014-01-29 04:27:17 +01:00
|
|
|
BR_ACQUIRE_RESULT = _IOR('r', 4, __s32),
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
BR_DEAD_REPLY = _IO('r', 5),
|
|
|
|
BR_TRANSACTION_COMPLETE = _IO('r', 6),
|
|
|
|
BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie),
|
|
|
|
BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie),
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie),
|
|
|
|
BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie),
|
|
|
|
BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie),
|
|
|
|
BR_NOOP = _IO('r', 12),
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
BR_SPAWN_LOOPER = _IO('r', 13),
|
|
|
|
BR_FINISHED = _IO('r', 14),
|
2014-01-29 04:27:17 +01:00
|
|
|
BR_DEAD_BINDER = _IOR('r', 15, binder_uintptr_t),
|
|
|
|
BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, binder_uintptr_t),
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
BR_FAILED_REPLY = _IO('r', 17),
|
|
|
|
};
|
|
|
|
enum binder_driver_command_protocol {
|
|
|
|
BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data),
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
BC_REPLY = _IOW('c', 1, struct binder_transaction_data),
|
|
|
|
BC_ACQUIRE_RESULT = _IOW('c', 2, __s32),
|
|
|
|
BC_FREE_BUFFER = _IOW('c', 3, binder_uintptr_t),
|
|
|
|
BC_INCREFS = _IOW('c', 4, __u32),
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2014-01-29 04:27:17 +01:00
|
|
|
BC_ACQUIRE = _IOW('c', 5, __u32),
|
|
|
|
BC_RELEASE = _IOW('c', 6, __u32),
|
|
|
|
BC_DECREFS = _IOW('c', 7, __u32),
|
2013-11-21 22:43:23 +01:00
|
|
|
BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie),
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie),
|
|
|
|
BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc),
|
|
|
|
BC_REGISTER_LOOPER = _IO('c', 11),
|
|
|
|
BC_ENTER_LOOPER = _IO('c', 12),
|
2014-01-29 04:27:17 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-11-21 22:43:23 +01:00
|
|
|
BC_EXIT_LOOPER = _IO('c', 13),
|
2014-01-29 04:27:17 +01:00
|
|
|
BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie),
|
|
|
|
BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie),
|
|
|
|
BC_DEAD_BINDER_DONE = _IOW('c', 16, binder_uintptr_t),
|
2013-11-21 22:43:23 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
};
|
|
|
|
#endif
|