0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef __LINUX_CAPI_H__
0014 #define __LINUX_CAPI_H__
0015
0016 #include <linux/types.h>
0017 #include <linux/ioctl.h>
0018 #ifndef __KERNEL__
0019 #include <linux/kernelcapi.h>
0020 #endif
0021
0022
0023
0024
0025
0026 typedef struct capi_register_params {
0027 __u32 level3cnt;
0028 __u32 datablkcnt;
0029 __u32 datablklen;
0030 } capi_register_params;
0031
0032 #define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params)
0033
0034
0035
0036
0037
0038 #define CAPI_MANUFACTURER_LEN 64
0039
0040 #define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int)
0041
0042
0043
0044
0045
0046 typedef struct capi_version {
0047 __u32 majorversion;
0048 __u32 minorversion;
0049 __u32 majormanuversion;
0050 __u32 minormanuversion;
0051 } capi_version;
0052
0053 #define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version)
0054
0055
0056
0057
0058
0059 #define CAPI_SERIAL_LEN 8
0060 #define CAPI_GET_SERIAL _IOWR('C',0x08,int)
0061
0062
0063
0064
0065
0066 typedef struct capi_profile {
0067 __u16 ncontroller;
0068 __u16 nbchannel;
0069 __u32 goptions;
0070 __u32 support1;
0071 __u32 support2;
0072 __u32 support3;
0073 __u32 reserved[6];
0074 __u32 manu[5];
0075 } capi_profile;
0076
0077 #define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile)
0078
0079 typedef struct capi_manufacturer_cmd {
0080 unsigned long cmd;
0081 void __user *data;
0082 } capi_manufacturer_cmd;
0083
0084
0085
0086
0087
0088 #define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd)
0089
0090
0091
0092
0093
0094
0095
0096 #define CAPI_GET_ERRCODE _IOR('C',0x21, __u16)
0097
0098
0099
0100
0101 #define CAPI_INSTALLED _IOR('C',0x22, __u16)
0102
0103
0104
0105
0106
0107
0108
0109 typedef union capi_ioctl_struct {
0110 __u32 contr;
0111 capi_register_params rparams;
0112 __u8 manufacturer[CAPI_MANUFACTURER_LEN];
0113 capi_version version;
0114 __u8 serial[CAPI_SERIAL_LEN];
0115 capi_profile profile;
0116 capi_manufacturer_cmd cmd;
0117 __u16 errcode;
0118 } capi_ioctl_struct;
0119
0120
0121
0122
0123
0124 #define CAPIFLAG_HIGHJACKING 0x0001
0125
0126 #define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
0127 #define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
0128 #define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
0129
0130 #define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
0131
0132 #define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
0133
0134 #endif