pub enum BinderRequest {
SetVmo {
vmo: Vmo,
mapped_address: u64,
control_handle: BinderControlHandle,
},
MapVmo {
vmo: Vmo,
mapped_address: u64,
responder: BinderMapVmoResponder,
},
Ioctl {
tid: u64,
request: u32,
arg: u64,
vmo: Vmo,
ioctl_reads: Vec<IoctlReadWrite>,
files: Vec<FileHandle>,
responder: BinderIoctlResponder,
},
RegisterThreadChannel {
server_end: ServerEnd<BinderThreadMarker>,
responder: BinderRegisterThreadChannelResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: BinderControlHandle,
method_type: MethodType,
},
}Expand description
An opened connection to a binder driver.
Variants§
SetVmo
Set the VMO to used as a share resource between the driver and the
client. mapped_address is the address where the vmo is mapped in the
client address space.
The driver handles the other requests of the client concurrently, so it
can handle an ioctl before the VMO is mapped. Clients should use
MapVmo instead.
MapVmo
Maps the VMO used as a shared resource between the driver and the
client. mapped_address is the address where the VMO is mapped in the
client address space.
Responds once the VMO is mapped. The driver handles the other requests of the client concurrently, so the client must wait for the response before sending any ioctl that needs the VMO.
Ioctl
Processes a Binder ioctl. This message returns writes for the calling thread that must be processed to correctly handle the ioctl.
RegisterThreadChannel
Registers a dedicated 1:1 channel for synchronous Binder transactions.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: BinderControlHandlemethod_type: MethodTypeImplementations§
Source§impl BinderRequest
impl BinderRequest
pub fn into_set_vmo(self) -> Option<(Vmo, u64, BinderControlHandle)>
pub fn into_map_vmo(self) -> Option<(Vmo, u64, BinderMapVmoResponder)>
pub fn into_ioctl( self, ) -> Option<(u64, u32, u64, Vmo, Vec<IoctlReadWrite>, Vec<FileHandle>, BinderIoctlResponder)>
pub fn into_register_thread_channel( self, ) -> Option<(ServerEnd<BinderThreadMarker>, BinderRegisterThreadChannelResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL