2 * $Id: kernelcapi.h,v 1.1 1997/03/04 21:27:33 calle Exp $
4 * Kernel CAPI 2.0 Interface for Linux
6 * (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
8 * $Log: kernelcapi.h,v $
9 * Revision 1.1 1997/03/04 21:27:33 calle
10 * First version in isdn4linux
12 * Revision 2.2 1997/02/12 09:31:39 calle
15 * Revision 1.1 1997/01/31 10:32:20 calle
20 #ifndef __KERNEL_CAPI_H__
21 #define __KERNEL_CAPI_H__
23 #define CAPI_MAXAPPL 20 /*
24 * maximum number of applications
26 #define CAPI_MAXCONTR 4 /*
27 * maximum number of controller
29 #define CAPI_MAXDATAWINDOW 8
33 struct capi_interface
{
34 int (*capi_installed
) (void);
36 __u16(*capi_register
) (capi_register_params
* rparam
, __u16
* applidp
);
37 __u16(*capi_release
) (__u16 applid
);
38 __u16(*capi_put_message
) (__u16 applid
, struct sk_buff
* msg
);
39 __u16(*capi_get_message
) (__u16 applid
, struct sk_buff
** msgp
);
40 __u16(*capi_set_signal
) (__u16 applid
,
41 void (*signal
) (__u16 applid
, __u32 param
),
43 __u16(*capi_get_manufacturer
) (__u16 contr
, __u8 buf
[CAPI_MANUFACTURER_LEN
]);
44 __u16(*capi_get_version
) (__u16 contr
, struct capi_version
* verp
);
45 __u16(*capi_get_serial
) (__u16 contr
, __u8 serial
[CAPI_SERIAL_LEN
]);
46 __u16(*capi_get_profile
) (__u16 contr
, struct capi_profile
* profp
);
49 * to init controllers, data is always in user memory
51 int (*capi_manufacturer
) (unsigned int cmd
, void *data
);
56 #define KCI_CONTRDOWN 1
58 struct capi_interface_user
{
60 void (*callback
) (unsigned int cmd
, __u16 contr
, void *data
);
61 struct capi_interface_user
*next
;
64 struct capi_interface
*attach_capi_interface(struct capi_interface_user
*);
65 int detach_capi_interface(struct capi_interface_user
*);
68 #define CAPI_NOERROR 0x0000
70 #define CAPI_TOOMANYAPPLS 0x1001
71 #define CAPI_LOGBLKSIZETOSMALL 0x1002
72 #define CAPI_BUFFEXECEEDS64K 0x1003
73 #define CAPI_MSGBUFSIZETOOSMALL 0x1004
74 #define CAPI_ANZLOGCONNNOTSUPPORTED 0x1005
75 #define CAPI_REGRESERVED 0x1006
76 #define CAPI_REGBUSY 0x1007
77 #define CAPI_REGOSRESOURCEERR 0x1008
78 #define CAPI_REGNOTINSTALLED 0x1009
79 #define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP 0x100a
80 #define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x100b
82 #define CAPI_ILLAPPNR 0x1101
83 #define CAPI_ILLCMDORSUBCMDORMSGTOSMALL 0x1102
84 #define CAPI_SENDQUEUEFULL 0x1103
85 #define CAPI_RECEIVEQUEUEEMPTY 0x1104
86 #define CAPI_RECEIVEOVERFLOW 0x1105
87 #define CAPI_UNKNOWNNOTPAR 0x1106
88 #define CAPI_MSGBUSY 0x1107
89 #define CAPI_MSGOSRESOURCEERR 0x1108
90 #define CAPI_MSGNOTINSTALLED 0x1109
91 #define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP 0x110a
92 #define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b
94 #endif /* __KERNEL__ */
96 #endif /* __KERNEL_CAPI_H__ */