xref: /aosp_15_r20/system/libhwbinder/binder_kernel.h (revision 77b80299c8bdfeca3ae6d0ce27ae1ad3db289be3)
1*77b80299SAndroid Build Coastguard Worker /*
2*77b80299SAndroid Build Coastguard Worker  * Copyright (C) 2016 The Android Open Source Project
3*77b80299SAndroid Build Coastguard Worker  *
4*77b80299SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*77b80299SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*77b80299SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*77b80299SAndroid Build Coastguard Worker  *
8*77b80299SAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
9*77b80299SAndroid Build Coastguard Worker  *
10*77b80299SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*77b80299SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*77b80299SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*77b80299SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*77b80299SAndroid Build Coastguard Worker  * limitations under the License.
15*77b80299SAndroid Build Coastguard Worker  */
16*77b80299SAndroid Build Coastguard Worker 
17*77b80299SAndroid Build Coastguard Worker #ifndef ANDROID_HARDWARE_BINDER_KERNEL_H
18*77b80299SAndroid Build Coastguard Worker #define ANDROID_HARDWARE_BINDER_KERNEL_H
19*77b80299SAndroid Build Coastguard Worker 
20*77b80299SAndroid Build Coastguard Worker // TODO(b/31559095): bionic on host
21*77b80299SAndroid Build Coastguard Worker #ifndef __ANDROID__
22*77b80299SAndroid Build Coastguard Worker #define __packed __attribute__((__packed__))
23*77b80299SAndroid Build Coastguard Worker #endif
24*77b80299SAndroid Build Coastguard Worker 
25*77b80299SAndroid Build Coastguard Worker #include <sys/ioctl.h>
26*77b80299SAndroid Build Coastguard Worker #include <linux/android/binder.h>
27*77b80299SAndroid Build Coastguard Worker 
28*77b80299SAndroid Build Coastguard Worker #ifndef BR_ONEWAY_SPAM_SUSPECT
29*77b80299SAndroid Build Coastguard Worker // Temporary definition of BR_ONEWAY_SPAM_SUSPECT. For production
30*77b80299SAndroid Build Coastguard Worker // this will come from UAPI binder.h
31*77b80299SAndroid Build Coastguard Worker #define BR_ONEWAY_SPAM_SUSPECT _IO('r', 19)
32*77b80299SAndroid Build Coastguard Worker #endif //BR_ONEWAY_SPAM_SUSPECT
33*77b80299SAndroid Build Coastguard Worker 
34*77b80299SAndroid Build Coastguard Worker #ifndef BINDER_ENABLE_ONEWAY_SPAM_DETECTION
35*77b80299SAndroid Build Coastguard Worker /*
36*77b80299SAndroid Build Coastguard Worker  * Temporary definitions for oneway spam detection support. For the final version
37*77b80299SAndroid Build Coastguard Worker  * these will be defined in the UAPI binder.h file from upstream kernel.
38*77b80299SAndroid Build Coastguard Worker  */
39*77b80299SAndroid Build Coastguard Worker #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
40*77b80299SAndroid Build Coastguard Worker #endif //BINDER_ENABLE_ONEWAY_SPAM_DETECTION
41*77b80299SAndroid Build Coastguard Worker 
42*77b80299SAndroid Build Coastguard Worker #ifndef BR_TRANSACTION_PENDING_FROZEN
43*77b80299SAndroid Build Coastguard Worker // Temporary definition of BR_TRANSACTION_PENDING_FROZEN until UAPI binder.h includes it.
44*77b80299SAndroid Build Coastguard Worker #define BR_TRANSACTION_PENDING_FROZEN _IO('r', 20)
45*77b80299SAndroid Build Coastguard Worker #endif // BR_TRANSACTION_PENDING_FROZEN
46*77b80299SAndroid Build Coastguard Worker 
47*77b80299SAndroid Build Coastguard Worker #endif // ANDROID_HARDWARE_BINDER_KERNEL_H
48