1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __LINUX_CAPI_H__
8 #define __LINUX_CAPI_H__
9 #include <linux/types.h>
10 #include <linux/ioctl.h>
11 #include <linux/kernelcapi.h>
12 typedef struct capi_register_params {
13   __u32 level3cnt;
14   __u32 datablkcnt;
15   __u32 datablklen;
16 } capi_register_params;
17 #define CAPI_REGISTER _IOW('C', 0x01, struct capi_register_params)
18 #define CAPI_MANUFACTURER_LEN 64
19 #define CAPI_GET_MANUFACTURER _IOWR('C', 0x06, int)
20 typedef struct capi_version {
21   __u32 majorversion;
22   __u32 minorversion;
23   __u32 majormanuversion;
24   __u32 minormanuversion;
25 } capi_version;
26 #define CAPI_GET_VERSION _IOWR('C', 0x07, struct capi_version)
27 #define CAPI_SERIAL_LEN 8
28 #define CAPI_GET_SERIAL _IOWR('C', 0x08, int)
29 typedef struct capi_profile {
30   __u16 ncontroller;
31   __u16 nbchannel;
32   __u32 goptions;
33   __u32 support1;
34   __u32 support2;
35   __u32 support3;
36   __u32 reserved[6];
37   __u32 manu[5];
38 } capi_profile;
39 #define CAPI_GET_PROFILE _IOWR('C', 0x09, struct capi_profile)
40 typedef struct capi_manufacturer_cmd {
41   unsigned long cmd;
42   void  * data;
43 } capi_manufacturer_cmd;
44 #define CAPI_MANUFACTURER_CMD _IOWR('C', 0x20, struct capi_manufacturer_cmd)
45 #define CAPI_GET_ERRCODE _IOR('C', 0x21, __u16)
46 #define CAPI_INSTALLED _IOR('C', 0x22, __u16)
47 typedef union capi_ioctl_struct {
48   __u32 contr;
49   capi_register_params rparams;
50   __u8 manufacturer[CAPI_MANUFACTURER_LEN];
51   capi_version version;
52   __u8 serial[CAPI_SERIAL_LEN];
53   capi_profile profile;
54   capi_manufacturer_cmd cmd;
55   __u16 errcode;
56 } capi_ioctl_struct;
57 #define CAPIFLAG_HIGHJACKING 0x0001
58 #define CAPI_GET_FLAGS _IOR('C', 0x23, unsigned)
59 #define CAPI_SET_FLAGS _IOR('C', 0x24, unsigned)
60 #define CAPI_CLR_FLAGS _IOR('C', 0x25, unsigned)
61 #define CAPI_NCCI_OPENCOUNT _IOR('C', 0x26, unsigned)
62 #define CAPI_NCCI_GETUNIT _IOR('C', 0x27, unsigned)
63 #endif
64