1 /* $Id: capilli.h,v 1.1.2.2 2004/01/16 21:09:27 keil Exp $
3 * Kernel CAPI 2.0 Driver Interface for Linux
5 * Copyright 1999 by Carsten Paeth <calle@calle.de>
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.
15 #include <linux/kernel.h>
16 #include <linux/list.h>
17 #include <linux/capi.h>
18 #include <linux/kernelcapi.h>
20 typedef struct capiloaddatapart {
21 int user; /* data in userspace ? */
26 typedef struct capiloaddata {
27 capiloaddatapart firmware;
28 capiloaddatapart configuration;
31 typedef struct capicardparams {
40 /* filled in before calling attach_capi_ctr */
42 void *driverdata; /* driver specific */
43 char name[32]; /* name of controller */
44 char *driver_name; /* name of driver */
45 int (*load_firmware)(struct capi_ctr *, capiloaddata *);
46 void (*reset_ctr)(struct capi_ctr *);
47 void (*register_appl)(struct capi_ctr *, u16 appl,
48 capi_register_params *);
49 void (*release_appl)(struct capi_ctr *, u16 appl);
50 u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb);
52 char *(*procinfo)(struct capi_ctr *);
53 int (*proc_show)(struct seq_file *, void *);
55 /* filled in before calling ready callback */
56 u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */
57 capi_version version; /* CAPI_GET_VERSION */
58 capi_profile profile; /* CAPI_GET_PROFILE */
59 u8 serial[CAPI_SERIAL_LEN]; /* CAPI_GET_SERIAL */
61 /* management information for kcapi */
63 unsigned long nrecvctlpkt;
64 unsigned long nrecvdatapkt;
65 unsigned long nsentctlpkt;
66 unsigned long nsentdatapkt;
68 int cnr; /* controller number */
69 unsigned short state; /* controller state */
70 int blocked; /* output blocked */
71 int traceflag; /* capi trace */
73 struct proc_dir_entry *procent;
77 int attach_capi_ctr(struct capi_ctr *);
78 int detach_capi_ctr(struct capi_ctr *);
80 void capi_ctr_ready(struct capi_ctr * card);
81 void capi_ctr_down(struct capi_ctr * card);
82 void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb);
84 // ---------------------------------------------------------------------------
85 // needed for AVM capi drivers
88 char name[32]; /* driver name */
91 /* management information for kcapi */
92 struct list_head list;
95 #endif /* __CAPILLI_H__ */