optee_utee_sys/tee_internal_api_extensions.rs
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18#[cfg_attr(feature = "mock", mockall::automock)]
19pub mod api {
20 use crate::*;
21 use core::ffi::*;
22
23 unsafe extern "C" {
24 /// tee_invoke_supp_plugin() - invoke a tee-supplicant's plugin
25 /// @uuid: uuid of the plugin
26 /// @cmd: command for the plugin
27 /// @sub_cmd: subcommand for the plugin
28 /// @buf: data [for/from] the plugin [in/out]
29 /// @len: length of the input buf
30 /// @outlen: pointer to length of the output data (if they will be used)
31 /// Return TEE_SUCCESS on success or TEE_ERRROR_* on failure.
32 pub fn tee_invoke_supp_plugin(
33 uuid: *const TEE_UUID,
34 cmd: u32,
35 sub_cmd: u32,
36 buf: *mut c_void,
37 len: usize,
38 outlen: *mut usize,
39 ) -> TEE_Result;
40
41 }
42}