1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef __LINUX_CAPI_H__
14#define __LINUX_CAPI_H__
15
16#include <linux/types.h>
17#include <linux/ioctl.h>
18#ifndef __KERNEL__
19#include <linux/kernelcapi.h>
20#endif
21
22
23
24
25
26typedef struct capi_register_params {
27 __u32 level3cnt;
28 __u32 datablkcnt;
29 __u32 datablklen;
30} capi_register_params;
31
32#define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params)
33
34
35
36
37
38#define CAPI_MANUFACTURER_LEN 64
39
40#define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int)
41
42
43
44
45
46typedef struct capi_version {
47 __u32 majorversion;
48 __u32 minorversion;
49 __u32 majormanuversion;
50 __u32 minormanuversion;
51} capi_version;
52
53#define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version)
54
55
56
57
58
59#define CAPI_SERIAL_LEN 8
60#define CAPI_GET_SERIAL _IOWR('C',0x08,int)
61
62
63
64
65
66typedef struct capi_profile {
67 __u16 ncontroller;
68 __u16 nbchannel;
69 __u32 goptions;
70 __u32 support1;
71 __u32 support2;
72 __u32 support3;
73 __u32 reserved[6];
74 __u32 manu[5];
75} capi_profile;
76
77#define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile)
78
79typedef struct capi_manufacturer_cmd {
80 unsigned long cmd;
81 void __user *data;
82} capi_manufacturer_cmd;
83
84
85
86
87
88#define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd)
89
90
91
92
93
94
95
96#define CAPI_GET_ERRCODE _IOR('C',0x21, __u16)
97
98
99
100
101#define CAPI_INSTALLED _IOR('C',0x22, __u16)
102
103
104
105
106
107
108
109typedef union capi_ioctl_struct {
110 __u32 contr;
111 capi_register_params rparams;
112 __u8 manufacturer[CAPI_MANUFACTURER_LEN];
113 capi_version version;
114 __u8 serial[CAPI_SERIAL_LEN];
115 capi_profile profile;
116 capi_manufacturer_cmd cmd;
117 __u16 errcode;
118} capi_ioctl_struct;
119
120
121
122
123
124#define CAPIFLAG_HIGHJACKING 0x0001
125
126#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
127#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
128#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
129
130#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
131
132#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
133
134#endif
135