aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/android/binder.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/android/binder.h')
-rw-r--r--include/uapi/linux/android/binder.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index 41420e341e75..f67c2b1c0713 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -48,6 +48,14 @@ typedef __u64 binder_size_t;
48typedef __u64 binder_uintptr_t; 48typedef __u64 binder_uintptr_t;
49#endif 49#endif
50 50
51/**
52 * struct binder_object_header - header shared by all binder metadata objects.
53 * @type: type of the object
54 */
55struct binder_object_header {
56 __u32 type;
57};
58
51/* 59/*
52 * This is the flattened representation of a Binder object for transfer 60 * This is the flattened representation of a Binder object for transfer
53 * between processes. The 'offsets' supplied as part of a binder transaction 61 * between processes. The 'offsets' supplied as part of a binder transaction
@@ -56,9 +64,8 @@ typedef __u64 binder_uintptr_t;
56 * between processes. 64 * between processes.
57 */ 65 */
58struct flat_binder_object { 66struct flat_binder_object {
59 /* 8 bytes for large_flat_header. */ 67 struct binder_object_header hdr;
60 __u32 type; 68 __u32 flags;
61 __u32 flags;
62 69
63 /* 8 bytes of data. */ 70 /* 8 bytes of data. */
64 union { 71 union {
@@ -70,6 +77,24 @@ struct flat_binder_object {
70 binder_uintptr_t cookie; 77 binder_uintptr_t cookie;
71}; 78};
72 79
80/**
81 * struct binder_fd_object - describes a filedescriptor to be fixed up.
82 * @hdr: common header structure
83 * @pad_flags: padding to remain compatible with old userspace code
84 * @pad_binder: padding to remain compatible with old userspace code
85 * @fd: file descriptor
86 * @cookie: opaque data, used by user-space
87 */
88struct binder_fd_object {
89 struct binder_object_header hdr;
90 __u32 pad_flags;
91 union {
92 binder_uintptr_t pad_binder;
93 __u32 fd;
94 };
95
96 binder_uintptr_t cookie;
97};
73/* 98/*
74 * On 64-bit platforms where user code may run in 32-bits the driver must 99 * On 64-bit platforms where user code may run in 32-bits the driver must
75 * translate the buffer (and local binder) addresses appropriately. 100 * translate the buffer (and local binder) addresses appropriately.