tee/
tee_client_api.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#![allow(non_camel_case_types)]
6#![allow(non_snake_case)]
7#![allow(non_upper_case_globals)]
8#![allow(dead_code)]
9
10/* automatically generated by rust-bindgen 0.72.0 */
11
12#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
13#[repr(C, align(8))]
14pub struct __BindgenOpaqueArray8<T>(pub T);
15impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
16    fn default() -> Self {
17        Self([<T as Default>::default(); N])
18    }
19}
20pub const _STDINT_H: u32 = 1;
21pub const _FEATURES_H: u32 = 1;
22pub const _DEFAULT_SOURCE: u32 = 1;
23pub const __GLIBC_USE_ISOC2Y: u32 = 0;
24pub const __GLIBC_USE_ISOC23: u32 = 0;
25pub const __USE_ISOC11: u32 = 1;
26pub const __USE_ISOC99: u32 = 1;
27pub const __USE_ISOC95: u32 = 1;
28pub const __USE_POSIX_IMPLICITLY: u32 = 1;
29pub const _POSIX_SOURCE: u32 = 1;
30pub const _POSIX_C_SOURCE: u32 = 200809;
31pub const __USE_POSIX: u32 = 1;
32pub const __USE_POSIX2: u32 = 1;
33pub const __USE_POSIX199309: u32 = 1;
34pub const __USE_POSIX199506: u32 = 1;
35pub const __USE_XOPEN2K: u32 = 1;
36pub const __USE_XOPEN2K8: u32 = 1;
37pub const _ATFILE_SOURCE: u32 = 1;
38pub const __WORDSIZE: u32 = 64;
39pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
40pub const __SYSCALL_WORDSIZE: u32 = 64;
41pub const __TIMESIZE: u32 = 64;
42pub const __USE_TIME_BITS64: u32 = 1;
43pub const __USE_MISC: u32 = 1;
44pub const __USE_ATFILE: u32 = 1;
45pub const __USE_FORTIFY_LEVEL: u32 = 0;
46pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
47pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
48pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
49pub const _STDC_PREDEF_H: u32 = 1;
50pub const __STDC_IEC_559__: u32 = 1;
51pub const __STDC_IEC_60559_BFP__: u32 = 201404;
52pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
53pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
54pub const __STDC_ISO_10646__: u32 = 201706;
55pub const __GNU_LIBRARY__: u32 = 6;
56pub const __GLIBC__: u32 = 2;
57pub const __GLIBC_MINOR__: u32 = 41;
58pub const _SYS_CDEFS_H: u32 = 1;
59pub const __glibc_c99_flexarr_available: u32 = 1;
60pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
61pub const __HAVE_GENERIC_SELECTION: u32 = 1;
62pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
63pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
64pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
65pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
66pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
67pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
68pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
69pub const _BITS_TYPES_H: u32 = 1;
70pub const _BITS_TYPESIZES_H: u32 = 1;
71pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
72pub const __INO_T_MATCHES_INO64_T: u32 = 1;
73pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
74pub const __STATFS_MATCHES_STATFS64: u32 = 1;
75pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
76pub const __FD_SETSIZE: u32 = 1024;
77pub const _BITS_TIME64_H: u32 = 1;
78pub const _BITS_WCHAR_H: u32 = 1;
79pub const _BITS_STDINT_INTN_H: u32 = 1;
80pub const _BITS_STDINT_UINTN_H: u32 = 1;
81pub const _BITS_STDINT_LEAST_H: u32 = 1;
82pub const INT8_MIN: i32 = -128;
83pub const INT16_MIN: i32 = -32768;
84pub const INT32_MIN: i32 = -2147483648;
85pub const INT8_MAX: u32 = 127;
86pub const INT16_MAX: u32 = 32767;
87pub const INT32_MAX: u32 = 2147483647;
88pub const UINT8_MAX: u32 = 255;
89pub const UINT16_MAX: u32 = 65535;
90pub const UINT32_MAX: u32 = 4294967295;
91pub const INT_LEAST8_MIN: i32 = -128;
92pub const INT_LEAST16_MIN: i32 = -32768;
93pub const INT_LEAST32_MIN: i32 = -2147483648;
94pub const INT_LEAST8_MAX: u32 = 127;
95pub const INT_LEAST16_MAX: u32 = 32767;
96pub const INT_LEAST32_MAX: u32 = 2147483647;
97pub const UINT_LEAST8_MAX: u32 = 255;
98pub const UINT_LEAST16_MAX: u32 = 65535;
99pub const UINT_LEAST32_MAX: u32 = 4294967295;
100pub const INT_FAST8_MIN: i32 = -128;
101pub const INT_FAST16_MIN: i64 = -9223372036854775808;
102pub const INT_FAST32_MIN: i64 = -9223372036854775808;
103pub const INT_FAST8_MAX: u32 = 127;
104pub const INT_FAST16_MAX: u64 = 9223372036854775807;
105pub const INT_FAST32_MAX: u64 = 9223372036854775807;
106pub const UINT_FAST8_MAX: u32 = 255;
107pub const UINT_FAST16_MAX: i32 = -1;
108pub const UINT_FAST32_MAX: i32 = -1;
109pub const INTPTR_MIN: i64 = -9223372036854775808;
110pub const INTPTR_MAX: u64 = 9223372036854775807;
111pub const UINTPTR_MAX: i32 = -1;
112pub const PTRDIFF_MIN: i64 = -9223372036854775808;
113pub const PTRDIFF_MAX: u64 = 9223372036854775807;
114pub const SIG_ATOMIC_MIN: i32 = -2147483648;
115pub const SIG_ATOMIC_MAX: u32 = 2147483647;
116pub const SIZE_MAX: i32 = -1;
117pub const WINT_MIN: u32 = 0;
118pub const WINT_MAX: u32 = 4294967295;
119pub const __bool_true_false_are_defined: u32 = 1;
120pub const true_: u32 = 1;
121pub const false_: u32 = 0;
122pub const ZX_OK: u32 = 0;
123pub const ZX_ERR_INTERNAL: i32 = -1;
124pub const ZX_ERR_NOT_SUPPORTED: i32 = -2;
125pub const ZX_ERR_NO_RESOURCES: i32 = -3;
126pub const ZX_ERR_NO_MEMORY: i32 = -4;
127pub const ZX_ERR_INTERNAL_INTR_RETRY: i32 = -6;
128pub const ZX_ERR_INVALID_ARGS: i32 = -10;
129pub const ZX_ERR_BAD_HANDLE: i32 = -11;
130pub const ZX_ERR_WRONG_TYPE: i32 = -12;
131pub const ZX_ERR_BAD_SYSCALL: i32 = -13;
132pub const ZX_ERR_OUT_OF_RANGE: i32 = -14;
133pub const ZX_ERR_BUFFER_TOO_SMALL: i32 = -15;
134pub const ZX_ERR_BAD_STATE: i32 = -20;
135pub const ZX_ERR_TIMED_OUT: i32 = -21;
136pub const ZX_ERR_SHOULD_WAIT: i32 = -22;
137pub const ZX_ERR_CANCELED: i32 = -23;
138pub const ZX_ERR_PEER_CLOSED: i32 = -24;
139pub const ZX_ERR_NOT_FOUND: i32 = -25;
140pub const ZX_ERR_ALREADY_EXISTS: i32 = -26;
141pub const ZX_ERR_ALREADY_BOUND: i32 = -27;
142pub const ZX_ERR_UNAVAILABLE: i32 = -28;
143pub const ZX_ERR_ACCESS_DENIED: i32 = -30;
144pub const ZX_ERR_IO: i32 = -40;
145pub const ZX_ERR_IO_REFUSED: i32 = -41;
146pub const ZX_ERR_IO_DATA_INTEGRITY: i32 = -42;
147pub const ZX_ERR_IO_DATA_LOSS: i32 = -43;
148pub const ZX_ERR_IO_NOT_PRESENT: i32 = -44;
149pub const ZX_ERR_IO_OVERRUN: i32 = -45;
150pub const ZX_ERR_IO_MISSED_DEADLINE: i32 = -46;
151pub const ZX_ERR_IO_INVALID: i32 = -47;
152pub const ZX_ERR_BAD_PATH: i32 = -50;
153pub const ZX_ERR_NOT_DIR: i32 = -51;
154pub const ZX_ERR_NOT_FILE: i32 = -52;
155pub const ZX_ERR_FILE_BIG: i32 = -53;
156pub const ZX_ERR_NO_SPACE: i32 = -54;
157pub const ZX_ERR_NOT_EMPTY: i32 = -55;
158pub const ZX_ERR_STOP: i32 = -60;
159pub const ZX_ERR_NEXT: i32 = -61;
160pub const ZX_ERR_ASYNC: i32 = -62;
161pub const ZX_ERR_PROTOCOL_NOT_SUPPORTED: i32 = -70;
162pub const ZX_ERR_ADDRESS_UNREACHABLE: i32 = -71;
163pub const ZX_ERR_ADDRESS_IN_USE: i32 = -72;
164pub const ZX_ERR_NOT_CONNECTED: i32 = -73;
165pub const ZX_ERR_CONNECTION_REFUSED: i32 = -74;
166pub const ZX_ERR_CONNECTION_RESET: i32 = -75;
167pub const ZX_ERR_CONNECTION_ABORTED: i32 = -76;
168pub const ZX_ERR_INTERNAL_INTR_KILLED: i32 = -502;
169pub const ZX_MIN_PAGE_SHIFT: u32 = 12;
170pub const ZX_MAX_PAGE_SHIFT: u32 = 21;
171pub const ZX_MIN_PAGE_SIZE: u32 = 4096;
172pub const ZX_MAX_PAGE_SIZE: u32 = 2097152;
173pub const _TIME_H: u32 = 1;
174pub const _BITS_TIME_H: u32 = 1;
175pub const CLOCK_REALTIME: u32 = 0;
176pub const CLOCK_MONOTONIC: u32 = 1;
177pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2;
178pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3;
179pub const CLOCK_MONOTONIC_RAW: u32 = 4;
180pub const CLOCK_REALTIME_COARSE: u32 = 5;
181pub const CLOCK_MONOTONIC_COARSE: u32 = 6;
182pub const CLOCK_BOOTTIME: u32 = 7;
183pub const CLOCK_REALTIME_ALARM: u32 = 8;
184pub const CLOCK_BOOTTIME_ALARM: u32 = 9;
185pub const CLOCK_TAI: u32 = 11;
186pub const TIMER_ABSTIME: u32 = 1;
187pub const __clock_t_defined: u32 = 1;
188pub const __time_t_defined: u32 = 1;
189pub const __struct_tm_defined: u32 = 1;
190pub const _STRUCT_TIMESPEC: u32 = 1;
191pub const _BITS_ENDIAN_H: u32 = 1;
192pub const __LITTLE_ENDIAN: u32 = 1234;
193pub const __BIG_ENDIAN: u32 = 4321;
194pub const __PDP_ENDIAN: u32 = 3412;
195pub const _BITS_ENDIANNESS_H: u32 = 1;
196pub const __BYTE_ORDER: u32 = 1234;
197pub const __FLOAT_WORD_ORDER: u32 = 1234;
198pub const __clockid_t_defined: u32 = 1;
199pub const __timer_t_defined: u32 = 1;
200pub const __itimerspec_defined: u32 = 1;
201pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
202pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
203pub const TIME_UTC: u32 = 1;
204pub const ZX_VM_ALIGN_BASE: u32 = 24;
205pub const ZX_CPU_SET_MAX_CPUS: u32 = 512;
206pub const ZX_CPU_SET_BITS_PER_WORD: u32 = 64;
207pub const TEEC_NUM_PARAMS_MAX: u32 = 4;
208pub const TEEC_SUCCESS: u32 = 0;
209pub const TEEC_ERROR_GENERIC: u32 = 4294901760;
210pub const TEEC_ERROR_ACCESS_DENIED: u32 = 4294901761;
211pub const TEEC_ERROR_CANCEL: u32 = 4294901762;
212pub const TEEC_ERROR_ACCESS_CONFLICT: u32 = 4294901763;
213pub const TEEC_ERROR_EXCESS_DATA: u32 = 4294901764;
214pub const TEEC_ERROR_BAD_FORMAT: u32 = 4294901765;
215pub const TEEC_ERROR_BAD_PARAMETERS: u32 = 4294901766;
216pub const TEEC_ERROR_BAD_STATE: u32 = 4294901767;
217pub const TEEC_ERROR_ITEM_NOT_FOUND: u32 = 4294901768;
218pub const TEEC_ERROR_NOT_IMPLEMENTED: u32 = 4294901769;
219pub const TEEC_ERROR_NOT_SUPPORTED: u32 = 4294901770;
220pub const TEEC_ERROR_NO_DATA: u32 = 4294901771;
221pub const TEEC_ERROR_OUT_OF_MEMORY: u32 = 4294901772;
222pub const TEEC_ERROR_BUSY: u32 = 4294901773;
223pub const TEEC_ERROR_COMMUNICATION: u32 = 4294901774;
224pub const TEEC_ERROR_SECURITY: u32 = 4294901775;
225pub const TEEC_ERROR_SHORT_BUFFER: u32 = 4294901776;
226pub const TEE_ERROR_EXTERNAL_CANCEL: u32 = 4294901777;
227pub const TEE_ERROR_OVERFLOW: u32 = 4294914063;
228pub const TEE_ERROR_TARGET_DEAD: u32 = 4294914084;
229pub const TEEC_ERROR_TARGET_DEAD: u32 = 4294914084;
230pub const TEE_ERROR_STORAGE_NO_SPACE: u32 = 4294914113;
231pub const TEEC_ORIGIN_API: u32 = 1;
232pub const TEEC_ORIGIN_COMMS: u32 = 2;
233pub const TEEC_ORIGIN_TEE: u32 = 3;
234pub const TEEC_ORIGIN_TRUSTED_APP: u32 = 4;
235pub const TEEC_MEM_INPUT: u32 = 1;
236pub const TEEC_MEM_OUTPUT: u32 = 2;
237pub const TEEC_NONE: u32 = 0;
238pub const TEEC_VALUE_INPUT: u32 = 1;
239pub const TEEC_VALUE_OUTPUT: u32 = 2;
240pub const TEEC_VALUE_INOUT: u32 = 3;
241pub const TEEC_MEMREF_TEMP_INPUT: u32 = 5;
242pub const TEEC_MEMREF_TEMP_OUTPUT: u32 = 6;
243pub const TEEC_MEMREF_TEMP_INOUT: u32 = 7;
244pub const TEEC_MEMREF_WHOLE: u32 = 12;
245pub const TEEC_MEMREF_PARTIAL_INPUT: u32 = 13;
246pub const TEEC_MEMREF_PARTIAL_OUTPUT: u32 = 14;
247pub const TEEC_MEMREF_PARTIAL_INOUT: u32 = 15;
248pub const TEEC_LOGIN_PUBLIC: u32 = 0;
249pub const TEEC_LOGIN_USER: u32 = 1;
250pub const TEEC_LOGIN_GROUP: u32 = 2;
251pub const TEEC_LOGIN_APPLICATION: u32 = 4;
252pub const TEEC_LOGIN_USER_APPLICATION: u32 = 5;
253pub const TEEC_LOGIN_GROUP_APPLICATION: u32 = 6;
254pub type wchar_t = ::std::os::raw::c_int;
255#[repr(C)]
256#[repr(align(16))]
257#[derive(Debug, Copy, Clone)]
258pub struct max_align_t {
259    pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
260    pub __bindgen_padding_0: __BindgenOpaqueArray8<[u8; 8usize]>,
261    pub __clang_max_align_nonce2: u128,
262}
263pub type __u_char = ::std::os::raw::c_uchar;
264pub type __u_short = ::std::os::raw::c_ushort;
265pub type __u_int = ::std::os::raw::c_uint;
266pub type __u_long = ::std::os::raw::c_ulong;
267pub type __int8_t = ::std::os::raw::c_schar;
268pub type __uint8_t = ::std::os::raw::c_uchar;
269pub type __int16_t = ::std::os::raw::c_short;
270pub type __uint16_t = ::std::os::raw::c_ushort;
271pub type __int32_t = ::std::os::raw::c_int;
272pub type __uint32_t = ::std::os::raw::c_uint;
273pub type __int64_t = ::std::os::raw::c_long;
274pub type __uint64_t = ::std::os::raw::c_ulong;
275pub type __int_least8_t = __int8_t;
276pub type __uint_least8_t = __uint8_t;
277pub type __int_least16_t = __int16_t;
278pub type __uint_least16_t = __uint16_t;
279pub type __int_least32_t = __int32_t;
280pub type __uint_least32_t = __uint32_t;
281pub type __int_least64_t = __int64_t;
282pub type __uint_least64_t = __uint64_t;
283pub type __quad_t = ::std::os::raw::c_long;
284pub type __u_quad_t = ::std::os::raw::c_ulong;
285pub type __intmax_t = ::std::os::raw::c_long;
286pub type __uintmax_t = ::std::os::raw::c_ulong;
287pub type __dev_t = ::std::os::raw::c_ulong;
288pub type __uid_t = ::std::os::raw::c_uint;
289pub type __gid_t = ::std::os::raw::c_uint;
290pub type __ino_t = ::std::os::raw::c_ulong;
291pub type __ino64_t = ::std::os::raw::c_ulong;
292pub type __mode_t = ::std::os::raw::c_uint;
293pub type __nlink_t = ::std::os::raw::c_ulong;
294pub type __off_t = ::std::os::raw::c_long;
295pub type __off64_t = ::std::os::raw::c_long;
296pub type __pid_t = ::std::os::raw::c_int;
297#[repr(C)]
298#[derive(Debug, Copy, Clone)]
299pub struct __fsid_t {
300    pub __val: [::std::os::raw::c_int; 2usize],
301}
302pub type __clock_t = ::std::os::raw::c_long;
303pub type __rlim_t = ::std::os::raw::c_ulong;
304pub type __rlim64_t = ::std::os::raw::c_ulong;
305pub type __id_t = ::std::os::raw::c_uint;
306pub type __time_t = ::std::os::raw::c_long;
307pub type __useconds_t = ::std::os::raw::c_uint;
308pub type __suseconds_t = ::std::os::raw::c_long;
309pub type __suseconds64_t = ::std::os::raw::c_long;
310pub type __daddr_t = ::std::os::raw::c_int;
311pub type __key_t = ::std::os::raw::c_int;
312pub type __clockid_t = ::std::os::raw::c_int;
313pub type __timer_t = *mut ::std::os::raw::c_void;
314pub type __blksize_t = ::std::os::raw::c_long;
315pub type __blkcnt_t = ::std::os::raw::c_long;
316pub type __blkcnt64_t = ::std::os::raw::c_long;
317pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
318pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
319pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
320pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
321pub type __fsword_t = ::std::os::raw::c_long;
322pub type __ssize_t = ::std::os::raw::c_long;
323pub type __syscall_slong_t = ::std::os::raw::c_long;
324pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
325pub type __loff_t = __off64_t;
326pub type __caddr_t = *mut ::std::os::raw::c_char;
327pub type __intptr_t = ::std::os::raw::c_long;
328pub type __socklen_t = ::std::os::raw::c_uint;
329pub type __sig_atomic_t = ::std::os::raw::c_int;
330pub type int_least8_t = __int_least8_t;
331pub type int_least16_t = __int_least16_t;
332pub type int_least32_t = __int_least32_t;
333pub type int_least64_t = __int_least64_t;
334pub type uint_least8_t = __uint_least8_t;
335pub type uint_least16_t = __uint_least16_t;
336pub type uint_least32_t = __uint_least32_t;
337pub type uint_least64_t = __uint_least64_t;
338pub type int_fast8_t = ::std::os::raw::c_schar;
339pub type int_fast16_t = ::std::os::raw::c_long;
340pub type int_fast32_t = ::std::os::raw::c_long;
341pub type int_fast64_t = ::std::os::raw::c_long;
342pub type uint_fast8_t = ::std::os::raw::c_uchar;
343pub type uint_fast16_t = ::std::os::raw::c_ulong;
344pub type uint_fast32_t = ::std::os::raw::c_ulong;
345pub type uint_fast64_t = ::std::os::raw::c_ulong;
346pub type intmax_t = __intmax_t;
347pub type uintmax_t = __uintmax_t;
348pub type zx_rights_t = u32;
349pub type clock_t = __clock_t;
350pub type time_t = __time_t;
351#[repr(C)]
352#[derive(Debug, Copy, Clone)]
353pub struct tm {
354    pub tm_sec: ::std::os::raw::c_int,
355    pub tm_min: ::std::os::raw::c_int,
356    pub tm_hour: ::std::os::raw::c_int,
357    pub tm_mday: ::std::os::raw::c_int,
358    pub tm_mon: ::std::os::raw::c_int,
359    pub tm_year: ::std::os::raw::c_int,
360    pub tm_wday: ::std::os::raw::c_int,
361    pub tm_yday: ::std::os::raw::c_int,
362    pub tm_isdst: ::std::os::raw::c_int,
363    pub tm_gmtoff: ::std::os::raw::c_long,
364    pub tm_zone: *const ::std::os::raw::c_char,
365}
366#[repr(C)]
367#[derive(Debug, Copy, Clone)]
368pub struct timespec {
369    pub tv_sec: __time_t,
370    pub tv_nsec: __syscall_slong_t,
371}
372pub type clockid_t = __clockid_t;
373pub type timer_t = __timer_t;
374#[repr(C)]
375#[derive(Debug, Copy, Clone)]
376pub struct itimerspec {
377    pub it_interval: timespec,
378    pub it_value: timespec,
379}
380#[repr(C)]
381#[derive(Debug, Copy, Clone)]
382pub struct sigevent {
383    _unused: [u8; 0],
384}
385pub type pid_t = __pid_t;
386#[repr(C)]
387#[derive(Debug, Copy, Clone)]
388pub struct __locale_struct {
389    pub __locales: [*mut __locale_data; 13usize],
390    pub __ctype_b: *const ::std::os::raw::c_ushort,
391    pub __ctype_tolower: *const ::std::os::raw::c_int,
392    pub __ctype_toupper: *const ::std::os::raw::c_int,
393    pub __names: [*const ::std::os::raw::c_char; 13usize],
394}
395pub type __locale_t = *mut __locale_struct;
396pub type locale_t = __locale_t;
397unsafe extern "C" {
398    pub fn clock() -> clock_t;
399}
400unsafe extern "C" {
401    pub fn time(__timer: *mut time_t) -> time_t;
402}
403unsafe extern "C" {
404    pub fn difftime(__time1: time_t, __time0: time_t) -> f64;
405}
406unsafe extern "C" {
407    pub fn mktime(__tp: *mut tm) -> time_t;
408}
409unsafe extern "C" {
410    pub fn strftime(
411        __s: *mut ::std::os::raw::c_char,
412        __maxsize: usize,
413        __format: *const ::std::os::raw::c_char,
414        __tp: *const tm,
415    ) -> usize;
416}
417unsafe extern "C" {
418    pub fn strftime_l(
419        __s: *mut ::std::os::raw::c_char,
420        __maxsize: usize,
421        __format: *const ::std::os::raw::c_char,
422        __tp: *const tm,
423        __loc: locale_t,
424    ) -> usize;
425}
426unsafe extern "C" {
427    pub fn gmtime(__timer: *const time_t) -> *mut tm;
428}
429unsafe extern "C" {
430    pub fn localtime(__timer: *const time_t) -> *mut tm;
431}
432unsafe extern "C" {
433    pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
434}
435unsafe extern "C" {
436    pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
437}
438unsafe extern "C" {
439    pub fn asctime(__tp: *const tm) -> *mut ::std::os::raw::c_char;
440}
441unsafe extern "C" {
442    pub fn ctime(__timer: *const time_t) -> *mut ::std::os::raw::c_char;
443}
444unsafe extern "C" {
445    pub fn asctime_r(
446        __tp: *const tm,
447        __buf: *mut ::std::os::raw::c_char,
448    ) -> *mut ::std::os::raw::c_char;
449}
450unsafe extern "C" {
451    pub fn ctime_r(
452        __timer: *const time_t,
453        __buf: *mut ::std::os::raw::c_char,
454    ) -> *mut ::std::os::raw::c_char;
455}
456unsafe extern "C" {
457    pub static mut __tzname: [*mut ::std::os::raw::c_char; 2usize];
458}
459unsafe extern "C" {
460    pub static mut __daylight: ::std::os::raw::c_int;
461}
462unsafe extern "C" {
463    pub static mut __timezone: ::std::os::raw::c_long;
464}
465unsafe extern "C" {
466    pub static mut tzname: [*mut ::std::os::raw::c_char; 2usize];
467}
468unsafe extern "C" {
469    pub fn tzset();
470}
471unsafe extern "C" {
472    pub static mut daylight: ::std::os::raw::c_int;
473}
474unsafe extern "C" {
475    pub static mut timezone: ::std::os::raw::c_long;
476}
477unsafe extern "C" {
478    pub fn timegm(__tp: *mut tm) -> time_t;
479}
480unsafe extern "C" {
481    pub fn timelocal(__tp: *mut tm) -> time_t;
482}
483unsafe extern "C" {
484    pub fn dysize(__year: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
485}
486unsafe extern "C" {
487    pub fn nanosleep(
488        __requested_time: *const timespec,
489        __remaining: *mut timespec,
490    ) -> ::std::os::raw::c_int;
491}
492unsafe extern "C" {
493    pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int;
494}
495unsafe extern "C" {
496    pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int;
497}
498unsafe extern "C" {
499    pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int;
500}
501unsafe extern "C" {
502    pub fn clock_nanosleep(
503        __clock_id: clockid_t,
504        __flags: ::std::os::raw::c_int,
505        __req: *const timespec,
506        __rem: *mut timespec,
507    ) -> ::std::os::raw::c_int;
508}
509unsafe extern "C" {
510    pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::std::os::raw::c_int;
511}
512unsafe extern "C" {
513    pub fn timer_create(
514        __clock_id: clockid_t,
515        __evp: *mut sigevent,
516        __timerid: *mut timer_t,
517    ) -> ::std::os::raw::c_int;
518}
519unsafe extern "C" {
520    pub fn timer_delete(__timerid: timer_t) -> ::std::os::raw::c_int;
521}
522unsafe extern "C" {
523    pub fn timer_settime(
524        __timerid: timer_t,
525        __flags: ::std::os::raw::c_int,
526        __value: *const itimerspec,
527        __ovalue: *mut itimerspec,
528    ) -> ::std::os::raw::c_int;
529}
530unsafe extern "C" {
531    pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::std::os::raw::c_int;
532}
533unsafe extern "C" {
534    pub fn timer_getoverrun(__timerid: timer_t) -> ::std::os::raw::c_int;
535}
536unsafe extern "C" {
537    pub fn timespec_get(
538        __ts: *mut timespec,
539        __base: ::std::os::raw::c_int,
540    ) -> ::std::os::raw::c_int;
541}
542pub type zx_instant_mono_t = i64;
543pub type zx_instant_mono_ticks_t = i64;
544pub type zx_duration_mono_t = i64;
545pub type zx_duration_mono_ticks_t = i64;
546pub type zx_instant_boot_t = i64;
547pub type zx_instant_boot_ticks_t = i64;
548pub type zx_duration_boot_t = i64;
549pub type zx_duration_boot_ticks_t = i64;
550pub type zx_time_t = i64;
551pub type zx_duration_t = i64;
552pub type zx_ticks_t = i64;
553pub const memory_order_memory_order_relaxed: memory_order = 0;
554pub const memory_order_memory_order_consume: memory_order = 1;
555pub const memory_order_memory_order_acquire: memory_order = 2;
556pub const memory_order_memory_order_release: memory_order = 3;
557pub const memory_order_memory_order_acq_rel: memory_order = 4;
558pub const memory_order_memory_order_seq_cst: memory_order = 5;
559pub type memory_order = ::std::os::raw::c_uint;
560unsafe extern "C" {
561    pub fn atomic_thread_fence(arg1: memory_order);
562}
563unsafe extern "C" {
564    pub fn atomic_signal_fence(arg1: memory_order);
565}
566pub type atomic_bool = bool;
567pub type atomic_char = ::std::os::raw::c_char;
568pub type atomic_schar = ::std::os::raw::c_schar;
569pub type atomic_uchar = ::std::os::raw::c_uchar;
570pub type atomic_short = ::std::os::raw::c_short;
571pub type atomic_ushort = ::std::os::raw::c_ushort;
572pub type atomic_int = ::std::os::raw::c_int;
573pub type atomic_uint = ::std::os::raw::c_uint;
574pub type atomic_long = ::std::os::raw::c_long;
575pub type atomic_ulong = ::std::os::raw::c_ulong;
576pub type atomic_llong = ::std::os::raw::c_longlong;
577pub type atomic_ullong = ::std::os::raw::c_ulonglong;
578pub type atomic_char16_t = uint_least16_t;
579pub type atomic_char32_t = uint_least32_t;
580pub type atomic_wchar_t = wchar_t;
581pub type atomic_int_least8_t = int_least8_t;
582pub type atomic_uint_least8_t = uint_least8_t;
583pub type atomic_int_least16_t = int_least16_t;
584pub type atomic_uint_least16_t = uint_least16_t;
585pub type atomic_int_least32_t = int_least32_t;
586pub type atomic_uint_least32_t = uint_least32_t;
587pub type atomic_int_least64_t = int_least64_t;
588pub type atomic_uint_least64_t = uint_least64_t;
589pub type atomic_int_fast8_t = int_fast8_t;
590pub type atomic_uint_fast8_t = uint_fast8_t;
591pub type atomic_int_fast16_t = int_fast16_t;
592pub type atomic_uint_fast16_t = uint_fast16_t;
593pub type atomic_int_fast32_t = int_fast32_t;
594pub type atomic_uint_fast32_t = uint_fast32_t;
595pub type atomic_int_fast64_t = int_fast64_t;
596pub type atomic_uint_fast64_t = uint_fast64_t;
597pub type atomic_intptr_t = isize;
598pub type atomic_uintptr_t = usize;
599pub type atomic_size_t = usize;
600pub type atomic_ptrdiff_t = isize;
601pub type atomic_intmax_t = intmax_t;
602pub type atomic_uintmax_t = uintmax_t;
603#[repr(C)]
604#[derive(Debug, Copy, Clone)]
605pub struct atomic_flag {
606    pub _Value: atomic_bool,
607}
608unsafe extern "C" {
609    pub fn atomic_flag_test_and_set(arg1: *mut atomic_flag) -> bool;
610}
611unsafe extern "C" {
612    pub fn atomic_flag_test_and_set_explicit(arg1: *mut atomic_flag, arg2: memory_order) -> bool;
613}
614unsafe extern "C" {
615    pub fn atomic_flag_clear(arg1: *mut atomic_flag);
616}
617unsafe extern "C" {
618    pub fn atomic_flag_clear_explicit(arg1: *mut atomic_flag, arg2: memory_order);
619}
620pub type zx_handle_t = u32;
621pub type zx_status_t = i32;
622pub type zx_clock_t = u32;
623pub type zx_signals_t = u32;
624pub type zx_koid_t = u64;
625#[repr(C)]
626#[derive(Debug, Copy, Clone)]
627pub struct zx_wait_item {
628    pub handle: zx_handle_t,
629    pub waitfor: zx_signals_t,
630    pub pending: zx_signals_t,
631}
632pub type zx_wait_item_t = zx_wait_item;
633#[repr(C)]
634#[derive(Debug, Copy, Clone)]
635pub struct zx_vmo_lock_state {
636    pub offset: u64,
637    pub size: u64,
638    pub discarded_offset: u64,
639    pub discarded_size: u64,
640}
641pub type zx_vmo_lock_state_t = zx_vmo_lock_state;
642#[repr(C)]
643#[derive(Debug, Copy, Clone)]
644pub struct zx_pager_vmo_stats {
645    pub modified: u32,
646}
647pub type zx_pager_vmo_stats_t = zx_pager_vmo_stats;
648pub type zx_vm_option_t = u32;
649pub type zx_vaddr_t = usize;
650pub type zx_paddr_t = usize;
651pub type zx_gpaddr_t = usize;
652pub type zx_off_t = u64;
653#[repr(C)]
654#[derive(Debug, Copy, Clone)]
655pub struct zx_iovec {
656    pub buffer: *mut ::std::os::raw::c_void,
657    pub capacity: usize,
658}
659pub type zx_iovec_t = zx_iovec;
660pub type zx_stream_seek_origin_t = u32;
661pub type zx_obj_type_t = u32;
662pub type zx_system_event_type_t = u32;
663pub type zx_system_memory_stall_type_t = u32;
664#[repr(C)]
665#[derive(Debug, Copy, Clone)]
666pub struct zx_handle_info {
667    pub handle: zx_handle_t,
668    pub type_: zx_obj_type_t,
669    pub rights: zx_rights_t,
670    pub unused: u32,
671}
672pub type zx_handle_info_t = zx_handle_info;
673pub type zx_handle_op_t = u32;
674#[repr(C)]
675#[derive(Debug, Copy, Clone)]
676pub struct zx_handle_disposition {
677    pub operation: zx_handle_op_t,
678    pub handle: zx_handle_t,
679    pub type_: zx_obj_type_t,
680    pub rights: zx_rights_t,
681    pub result: zx_status_t,
682}
683pub type zx_handle_disposition_t = zx_handle_disposition;
684pub type zx_txid_t = u32;
685#[repr(C)]
686#[derive(Debug, Copy, Clone)]
687pub struct zx_channel_call_args {
688    pub wr_bytes: *const ::std::os::raw::c_void,
689    pub wr_handles: *const zx_handle_t,
690    pub rd_bytes: *mut ::std::os::raw::c_void,
691    pub rd_handles: *mut zx_handle_t,
692    pub wr_num_bytes: u32,
693    pub wr_num_handles: u32,
694    pub rd_num_bytes: u32,
695    pub rd_num_handles: u32,
696}
697pub type zx_channel_call_args_t = zx_channel_call_args;
698#[repr(C)]
699#[derive(Debug, Copy, Clone)]
700pub struct zx_channel_call_etc_args {
701    pub wr_bytes: *const ::std::os::raw::c_void,
702    pub wr_handles: *mut zx_handle_disposition_t,
703    pub rd_bytes: *mut ::std::os::raw::c_void,
704    pub rd_handles: *mut zx_handle_info_t,
705    pub wr_num_bytes: u32,
706    pub wr_num_handles: u32,
707    pub rd_num_bytes: u32,
708    pub rd_num_handles: u32,
709}
710pub type zx_channel_call_etc_args_t = zx_channel_call_etc_args;
711#[repr(C)]
712#[derive(Debug, Copy, Clone)]
713pub struct zx_channel_iovec {
714    pub buffer: *const ::std::os::raw::c_void,
715    pub capacity: u32,
716    pub reserved: u32,
717}
718pub type zx_channel_iovec_t = zx_channel_iovec;
719#[repr(C)]
720#[derive(Debug, Copy, Clone)]
721pub struct zx_cpu_set {
722    pub mask: [u64; 8usize],
723}
724pub type zx_cpu_set_t = zx_cpu_set;
725pub type zx_futex_t = atomic_int;
726pub type zx_futex_storage_t = ::std::os::raw::c_int;
727#[repr(C)]
728#[derive(Debug, Copy, Clone)]
729pub struct teec_context_impl {
730    pub device_connector_channel: zx_handle_t,
731    pub uuid_to_channel: *mut ::std::os::raw::c_void,
732}
733pub type teec_context_impl_t = teec_context_impl;
734#[repr(C)]
735#[derive(Debug, Copy, Clone)]
736pub struct teec_session_impl {
737    pub session_id: u32,
738    pub application_channel: zx_handle_t,
739}
740pub type teec_session_impl_t = teec_session_impl;
741#[repr(C)]
742#[derive(Debug, Copy, Clone)]
743pub struct teec_shared_memory_impl {
744    pub vmo: zx_handle_t,
745    pub mapped_addr: zx_vaddr_t,
746    pub mapped_size: usize,
747}
748pub type teec_shared_memory_impl_t = teec_shared_memory_impl;
749#[repr(C)]
750#[derive(Debug, Copy, Clone)]
751pub struct teec_operation_impl {
752    pub reserved: ::std::os::raw::c_char,
753}
754pub type teec_operation_impl_t = teec_operation_impl;
755#[doc = " Data Types *"]
756pub type TEEC_Result = u32;
757#[repr(C)]
758#[derive(Debug, Copy, Clone)]
759pub struct TEEC_UUID {
760    pub timeLow: u32,
761    pub timeMid: u16,
762    pub timeHiAndVersion: u16,
763    pub clockSeqAndNode: [u8; 8usize],
764}
765#[repr(C)]
766#[derive(Debug, Copy, Clone)]
767pub struct TEEC_Context {
768    pub imp: teec_context_impl_t,
769}
770#[repr(C)]
771#[derive(Debug, Copy, Clone)]
772pub struct TEEC_Session {
773    pub imp: teec_session_impl_t,
774}
775#[repr(C)]
776#[derive(Debug, Copy, Clone)]
777pub struct TEEC_SharedMemory {
778    pub buffer: *mut ::std::os::raw::c_void,
779    pub size: usize,
780    pub flags: u32,
781    pub imp: teec_shared_memory_impl_t,
782}
783#[repr(C)]
784#[derive(Debug, Copy, Clone)]
785pub struct TEEC_TempMemoryReference {
786    pub buffer: *mut ::std::os::raw::c_void,
787    pub size: usize,
788}
789#[repr(C)]
790#[derive(Debug, Copy, Clone)]
791pub struct TEEC_RegisteredMemoryReference {
792    pub parent: *mut TEEC_SharedMemory,
793    pub size: usize,
794    pub offset: usize,
795}
796#[repr(C)]
797#[derive(Debug, Copy, Clone)]
798pub struct TEEC_Value {
799    pub a: u32,
800    pub b: u32,
801}
802#[repr(C)]
803#[derive(Copy, Clone)]
804pub union TEEC_Parameter {
805    pub tmpref: TEEC_TempMemoryReference,
806    pub memref: TEEC_RegisteredMemoryReference,
807    pub value: TEEC_Value,
808}
809#[repr(C)]
810#[derive(Copy, Clone)]
811pub struct TEEC_Operation {
812    pub started: u32,
813    pub paramTypes: u32,
814    pub params: [TEEC_Parameter; 4usize],
815    pub imp: teec_operation_impl_t,
816}
817unsafe extern "C" {
818    #[doc = " Functions *"]
819    pub fn TEEC_InitializeContext(
820        name: *const ::std::os::raw::c_char,
821        context: *mut TEEC_Context,
822    ) -> TEEC_Result;
823}
824unsafe extern "C" {
825    pub fn TEEC_FinalizeContext(context: *mut TEEC_Context);
826}
827unsafe extern "C" {
828    pub fn TEEC_RegisterSharedMemory(
829        context: *mut TEEC_Context,
830        sharedMem: *mut TEEC_SharedMemory,
831    ) -> TEEC_Result;
832}
833unsafe extern "C" {
834    pub fn TEEC_AllocateSharedMemory(
835        context: *mut TEEC_Context,
836        sharedMem: *mut TEEC_SharedMemory,
837    ) -> TEEC_Result;
838}
839unsafe extern "C" {
840    pub fn TEEC_ReleaseSharedMemory(sharedMem: *mut TEEC_SharedMemory);
841}
842unsafe extern "C" {
843    pub fn TEEC_OpenSession(
844        context: *mut TEEC_Context,
845        session: *mut TEEC_Session,
846        destination: *const TEEC_UUID,
847        connectionMethod: u32,
848        connectionData: *const ::std::os::raw::c_void,
849        operation: *mut TEEC_Operation,
850        returnOrigin: *mut u32,
851    ) -> TEEC_Result;
852}
853unsafe extern "C" {
854    pub fn TEEC_CloseSession(session: *mut TEEC_Session);
855}
856unsafe extern "C" {
857    pub fn TEEC_InvokeCommand(
858        session: *mut TEEC_Session,
859        commandID: u32,
860        operation: *mut TEEC_Operation,
861        returnOrigin: *mut u32,
862    ) -> TEEC_Result;
863}
864unsafe extern "C" {
865    pub fn TEEC_RequestCancellation(operation: *mut TEEC_Operation);
866}
867#[repr(C)]
868#[derive(Debug, Copy, Clone)]
869pub struct __locale_data {
870    pub _address: u8,
871}