File: /usr/src/linux/drivers/isdn/hisax/hisax_if.h

1     #ifndef __HISAX_IF_H__
2     #define __HISAX_IF_H__
3     
4     #include <linux/skbuff.h>
5     
6     #define REQUEST		0
7     #define CONFIRM		1
8     #define INDICATION	2
9     #define RESPONSE	3
10     
11     #define PH_ACTIVATE	0x0100
12     #define PH_DEACTIVATE	0x0110
13     #define PH_DATA		0x0120
14     #define PH_PULL		0x0130
15     #define PH_DATA_E	0x0140
16     
17     #define L1_MODE_NULL	0
18     #define L1_MODE_TRANS	1
19     #define L1_MODE_HDLC	2
20     #define L1_MODE_EXTRN	3
21     #define L1_MODE_HDLC_56K 4
22     #define L1_MODE_MODEM	7
23     #define L1_MODE_V32	8
24     #define L1_MODE_FAX	9
25     
26     struct hisax_if {
27     	void *priv; // private to driver
28     	void (*l1l2)(struct hisax_if *, int pr, void *arg);
29     	void (*l2l1)(struct hisax_if *, int pr, void *arg);
30     };
31     
32     struct hisax_b_if {
33     	struct hisax_if ifc;
34     
35     	// private to hisax
36     	struct BCState *bcs;
37     };
38     
39     struct hisax_d_if {
40     	struct hisax_if ifc;
41     
42     	// private to hisax
43     	struct module *owner;
44     	struct IsdnCardState *cs;
45     	struct hisax_b_if *b_if[2];
46     	struct sk_buff_head erq;
47     	long ph_state;
48     };
49     
50     int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[],
51     		   char *name, int protocol);
52     void hisax_unregister(struct hisax_d_if *hisax_if);
53     
54     #endif
55