• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef __LINUX_CAPI_H__
7 #define __LINUX_CAPI_H__
8 #include <linux/types.h>
9 #include <linux/ioctl.h>
10 #ifndef __KERNEL__
11 #include <linux/kernelcapi.h>
12 #endif
13 typedef struct capi_register_params {
14 	__u32 level3cnt;
15 	__u32 datablkcnt;
16 	__u32 datablklen;
17 } capi_register_params;
18 #define	CAPI_REGISTER	_IOW('C',0x01,struct capi_register_params)
19 #define CAPI_MANUFACTURER_LEN		64
20 #define	CAPI_GET_MANUFACTURER	_IOWR('C',0x06,int)
21 typedef struct capi_version {
22 	__u32 majorversion;
23 	__u32 minorversion;
24 	__u32 majormanuversion;
25 	__u32 minormanuversion;
26 } capi_version;
27 #define CAPI_GET_VERSION	_IOWR('C',0x07,struct capi_version)
28 #define CAPI_SERIAL_LEN		8
29 #define CAPI_GET_SERIAL		_IOWR('C',0x08,int)
30 typedef struct capi_profile {
31 	__u16 ncontroller;
32 	__u16 nbchannel;
33 	__u32 goptions;
34 	__u32 support1;
35 	__u32 support2;
36 	__u32 support3;
37 	__u32 reserved[6];
38 	__u32 manu[5];
39 } capi_profile;
40 #define CAPI_GET_PROFILE	_IOWR('C',0x09,struct capi_profile)
41 typedef struct capi_manufacturer_cmd {
42 	unsigned long cmd;
43 	void __user *data;
44 } capi_manufacturer_cmd;
45 #define CAPI_MANUFACTURER_CMD	_IOWR('C',0x20, struct capi_manufacturer_cmd)
46 #define CAPI_GET_ERRCODE	_IOR('C',0x21, __u16)
47 #define CAPI_INSTALLED		_IOR('C',0x22, __u16)
48 typedef union capi_ioctl_struct {
49 	__u32 contr;
50 	capi_register_params rparams;
51 	__u8 manufacturer[CAPI_MANUFACTURER_LEN];
52 	capi_version version;
53 	__u8 serial[CAPI_SERIAL_LEN];
54 	capi_profile profile;
55 	capi_manufacturer_cmd cmd;
56 	__u16 errcode;
57 } capi_ioctl_struct;
58 #define CAPIFLAG_HIGHJACKING	0x0001
59 #define CAPI_GET_FLAGS		_IOR('C',0x23, unsigned)
60 #define CAPI_SET_FLAGS		_IOR('C',0x24, unsigned)
61 #define CAPI_CLR_FLAGS		_IOR('C',0x25, unsigned)
62 #define CAPI_NCCI_OPENCOUNT	_IOR('C',0x26, unsigned)
63 #define CAPI_NCCI_GETUNIT	_IOR('C',0x27, unsigned)
64 #endif
65