Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
kernelcapi.h
Go to the documentation of this file.
1 /*
2  * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
3  *
4  * Kernel CAPI 2.0 Interface for Linux
5  *
6  * (c) Copyright 1997 by Carsten Paeth ([email protected])
7  *
8  */
9 #ifndef __KERNELCAPI_H__
10 #define __KERNELCAPI_H__
11 
12 
13 #include <linux/list.h>
14 #include <linux/skbuff.h>
15 #include <linux/workqueue.h>
16 #include <linux/notifier.h>
17 #include <uapi/linux/kernelcapi.h>
18 
19 struct capi20_appl {
22  void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb);
23  void *private;
24 
25  /* internal to kernelcapi.o */
26  unsigned long nrecvctlpkt;
27  unsigned long nrecvdatapkt;
28  unsigned long nsentctlpkt;
29  unsigned long nsentdatapkt;
30  struct mutex recv_mtx;
34 };
35 
37 u16 capi20_register(struct capi20_appl *ap);
38 u16 capi20_release(struct capi20_appl *ap);
39 u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
41 u16 capi20_get_version(u32 contr, struct capi_version *verp);
43 u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
44 int capi20_manufacturer(unsigned int cmd, void __user *data);
45 
46 #define CAPICTR_UP 0
47 #define CAPICTR_DOWN 1
48 
51 
52 #define CAPI_NOERROR 0x0000
53 
54 #define CAPI_TOOMANYAPPLS 0x1001
55 #define CAPI_LOGBLKSIZETOSMALL 0x1002
56 #define CAPI_BUFFEXECEEDS64K 0x1003
57 #define CAPI_MSGBUFSIZETOOSMALL 0x1004
58 #define CAPI_ANZLOGCONNNOTSUPPORTED 0x1005
59 #define CAPI_REGRESERVED 0x1006
60 #define CAPI_REGBUSY 0x1007
61 #define CAPI_REGOSRESOURCEERR 0x1008
62 #define CAPI_REGNOTINSTALLED 0x1009
63 #define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP 0x100a
64 #define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x100b
65 
66 #define CAPI_ILLAPPNR 0x1101
67 #define CAPI_ILLCMDORSUBCMDORMSGTOSMALL 0x1102
68 #define CAPI_SENDQUEUEFULL 0x1103
69 #define CAPI_RECEIVEQUEUEEMPTY 0x1104
70 #define CAPI_RECEIVEOVERFLOW 0x1105
71 #define CAPI_UNKNOWNNOTPAR 0x1106
72 #define CAPI_MSGBUSY 0x1107
73 #define CAPI_MSGOSRESOURCEERR 0x1108
74 #define CAPI_MSGNOTINSTALLED 0x1109
75 #define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP 0x110a
76 #define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b
77 
78 typedef enum {
87 
88 typedef enum {
104 
105 typedef enum {
106  CapiSuccess = 0x0000,
110 
111 typedef enum {
115  CapiTimeOut = 0x3303, // SuppServiceReason
117 } CAPI_REASON;
118 
119 #endif /* __KERNELCAPI_H__ */