capi.h
001: 
002: 
003: 
004: 
005: calle@calle.in-berlin.de
006: 
007: 
008: 
009: 
010: 
011: 
012: #ifndef __LINUX_CAPI_H__
013: #define __LINUX_CAPI_H__
014: 
015: #include <linux/types.h>
016: #include <linux/ioctl.h>
017: #include <linux/kernelcapi.h>
018: 
019: 
020: 
021: 
022: 
023: typedef struct capi_register_params {   
024:         __u32 level3cnt;        
025:         __u32 datablkcnt;       
026:         __u32 datablklen;       
027: } capi_register_params;
028: 
029: #define CAPI_REGISTER   _IOW('C',0x01,struct capi_register_params)
030: 
031: 
032: 
033: 
034: 
035: #define CAPI_MANUFACTURER_LEN           64
036: 
037: #define CAPI_GET_MANUFACTURER   _IOWR('C',0x06,int)     
038: 
039: 
040: 
041: 
042: 
043: typedef struct capi_version {
044:         __u32 majorversion;
045:         __u32 minorversion;
046:         __u32 majormanuversion;
047:         __u32 minormanuversion;
048: } capi_version;
049: 
050: #define CAPI_GET_VERSION        _IOWR('C',0x07,struct capi_version)
051: 
052: 
053: 
054: 
055: 
056: #define CAPI_SERIAL_LEN         8
057: #define CAPI_GET_SERIAL         _IOWR('C',0x08,int)     
058: 
059: 
060: 
061: 
062: 
063: typedef struct capi_profile {
064:         __u16 ncontroller;      
065:         __u16 nbchannel;        
066:         __u32 goptions;         
067:         __u32 support1;         
068:         __u32 support2;         
069:         __u32 support3;         
070:         __u32 reserved[6];      
071:         __u32 manu[5];          
072: } capi_profile;
073: 
074: #define CAPI_GET_PROFILE        _IOWR('C',0x09,struct capi_profile)
075: 
076: typedef struct capi_manufacturer_cmd {
077:         unsigned long cmd;
078:         void *data;
079: } capi_manufacturer_cmd;
080: 
081: 
082: 
083: 
084: 
085: #define CAPI_MANUFACTURER_CMD   _IOWR('C',0x20, struct capi_manufacturer_cmd)
086: 
087: 
088: 
089: 
090: 
091: 
092: 
093: #define CAPI_GET_ERRCODE        _IOR('C',0x21, __u16)
094: 
095: 
096: 
097: 
098: #define CAPI_INSTALLED          _IOR('C',0x22, __u16)
099: 
100: 
101: 
102: 
103: 
104: 
105: 
106: typedef union capi_ioctl_struct {
107:         __u32 contr;
108:         capi_register_params rparams;
109:         __u8 manufacturer[CAPI_MANUFACTURER_LEN];
110:         capi_version version;
111:         __u8 serial[CAPI_SERIAL_LEN];
112:         capi_profile profile;
113:         capi_manufacturer_cmd cmd;
114:         __u16 errcode;
115: } capi_ioctl_struct;
116: 
117: 
118: 
119: 
120: 
121: #define CAPIFLAG_HIGHJACKING    0x0001
122: 
123: #define CAPI_GET_FLAGS          _IOR('C',0x23, unsigned)
124: #define CAPI_SET_FLAGS          _IOR('C',0x24, unsigned)
125: #define CAPI_CLR_FLAGS          _IOR('C',0x25, unsigned)
126: 
127: #define CAPI_NCCI_OPENCOUNT     _IOR('C',0x26, unsigned)
128: 
129: #define CAPI_NCCI_GETUNIT       _IOR('C',0x27, unsigned)
130: 
131: #endif                          
132: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved