File: /usr/src/linux/drivers/isdn/avmb1/capidrv.h

1     /*
2      * $Id: capidrv.h,v 1.2.8.1 2001/05/17 20:41:51 kai Exp $
3      *
4      * ISDN4Linux Driver, using capi20 interface (kernelcapi)
5      *
6      * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
7      *
8      */
9     #ifndef __CAPIDRV_H__
10     #define __CAPIDRV_H__
11     
12     /*
13      * LISTEN state machine
14      */
15     #define ST_LISTEN_NONE			0	/* L-0 */
16     #define ST_LISTEN_WAIT_CONF		1	/* L-0.1 */
17     #define ST_LISTEN_ACTIVE		2	/* L-1 */
18     #define ST_LISTEN_ACTIVE_WAIT_CONF	3	/* L-1.1 */
19     
20     
21     #define EV_LISTEN_REQ			1	/* L-0 -> L-0.1
22     						   L-1 -> L-1.1 */
23     #define EV_LISTEN_CONF_ERROR		2	/* L-0.1 -> L-0
24     						   L-1.1 -> L-1 */
25     #define EV_LISTEN_CONF_EMPTY		3	/* L-0.1 -> L-0
26     						   L-1.1 -> L-0 */
27     #define EV_LISTEN_CONF_OK		4	/* L-0.1 -> L-1
28     						   L-1.1 -> L.1 */
29     
30     /*
31      * per plci state machine
32      */
33     #define ST_PLCI_NONE			0	/* P-0 */
34     #define ST_PLCI_OUTGOING 		1	/* P-0.1 */
35     #define ST_PLCI_ALLOCATED		2	/* P-1 */
36     #define ST_PLCI_ACTIVE			3	/* P-ACT */
37     #define ST_PLCI_INCOMING		4	/* P-2 */
38     #define ST_PLCI_FACILITY_IND		5	/* P-3 */
39     #define ST_PLCI_ACCEPTING		6	/* P-4 */
40     #define ST_PLCI_DISCONNECTING		7	/* P-5 */
41     #define ST_PLCI_DISCONNECTED		8	/* P-6 */
42     #define ST_PLCI_RESUMEING		9	/* P-0.Res */
43     #define ST_PLCI_RESUME			10	/* P-Res */
44     #define ST_PLCI_HELD			11	/* P-HELD */
45     
46     #define EV_PLCI_CONNECT_REQ		1	/* P-0 -> P-0.1
47                                                      */
48     #define EV_PLCI_CONNECT_CONF_ERROR	2	/* P-0.1 -> P-0
49                                                      */
50     #define EV_PLCI_CONNECT_CONF_OK		3	/* P-0.1 -> P-1
51                                                      */
52     #define EV_PLCI_FACILITY_IND_UP		4	/* P-0 -> P-1
53                                                      */
54     #define EV_PLCI_CONNECT_IND		5	/* P-0 -> P-2
55                                                      */
56     #define EV_PLCI_CONNECT_ACTIVE_IND	6	/* P-1 -> P-ACT
57                                                      */
58     #define EV_PLCI_CONNECT_REJECT		7	/* P-2 -> P-5
59     						   P-3 -> P-5
60     						 */
61     #define EV_PLCI_DISCONNECT_REQ		8	/* P-1 -> P-5
62     						   P-2 -> P-5
63     						   P-3 -> P-5
64     						   P-4 -> P-5
65     						   P-ACT -> P-5
66     						   P-Res -> P-5 (*)
67     						   P-HELD -> P-5 (*)
68     						   */
69     #define EV_PLCI_DISCONNECT_IND		9	/* P-1 -> P-6
70     						   P-2 -> P-6
71     						   P-3 -> P-6
72     						   P-4 -> P-6
73     						   P-5 -> P-6
74     						   P-ACT -> P-6
75     						   P-Res -> P-6 (*)
76     						   P-HELD -> P-6 (*)
77     						   */
78     #define EV_PLCI_FACILITY_IND_DOWN	10	/* P-0.1 -> P-5
79     						   P-1 -> P-5
80     						   P-ACT -> P-5
81     						   P-2 -> P-5
82     						   P-3 -> P-5
83     						   P-4 -> P-5
84     						   */
85     #define EV_PLCI_DISCONNECT_RESP		11	/* P-6 -> P-0
86                                                        */
87     #define EV_PLCI_CONNECT_RESP		12	/* P-6 -> P-0
88                                                        */
89     
90     #define EV_PLCI_RESUME_REQ		13	/* P-0 -> P-0.Res
91                                                      */
92     #define EV_PLCI_RESUME_CONF_OK		14	/* P-0.Res -> P-Res
93                                                      */
94     #define EV_PLCI_RESUME_CONF_ERROR	15	/* P-0.Res -> P-0
95                                                      */
96     #define EV_PLCI_RESUME_IND		16	/* P-Res -> P-ACT
97                                                      */
98     #define EV_PLCI_HOLD_IND		17	/* P-ACT -> P-HELD
99                                                      */
100     #define EV_PLCI_RETRIEVE_IND		18	/* P-HELD -> P-ACT
101                                                      */
102     #define EV_PLCI_SUSPEND_IND		19	/* P-ACT -> P-5
103                                                      */
104     #define EV_PLCI_CD_IND			20	/* P-2 -> P-5
105                                                      */
106     
107     /*
108      * per ncci state machine
109      */
110     #define ST_NCCI_PREVIOUS			-1
111     #define ST_NCCI_NONE				0	/* N-0 */
112     #define ST_NCCI_OUTGOING			1	/* N-0.1 */
113     #define ST_NCCI_INCOMING			2	/* N-1 */
114     #define ST_NCCI_ALLOCATED			3	/* N-2 */
115     #define ST_NCCI_ACTIVE				4	/* N-ACT */
116     #define ST_NCCI_RESETING			5	/* N-3 */
117     #define ST_NCCI_DISCONNECTING			6	/* N-4 */
118     #define ST_NCCI_DISCONNECTED			7	/* N-5 */
119     
120     #define EV_NCCI_CONNECT_B3_REQ			1	/* N-0 -> N-0.1 */
121     #define EV_NCCI_CONNECT_B3_IND			2	/* N-0 -> N.1 */
122     #define EV_NCCI_CONNECT_B3_CONF_OK		3	/* N-0.1 -> N.2 */
123     #define EV_NCCI_CONNECT_B3_CONF_ERROR		4	/* N-0.1 -> N.0 */
124     #define EV_NCCI_CONNECT_B3_REJECT		5	/* N-1 -> N-4 */
125     #define EV_NCCI_CONNECT_B3_RESP			6	/* N-1 -> N-2 */
126     #define EV_NCCI_CONNECT_B3_ACTIVE_IND		7	/* N-2 -> N-ACT */
127     #define EV_NCCI_RESET_B3_REQ			8	/* N-ACT -> N-3 */
128     #define EV_NCCI_RESET_B3_IND			9	/* N-3 -> N-ACT */
129     #define EV_NCCI_DISCONNECT_B3_IND		10	/* N-4 -> N.5 */
130     #define EV_NCCI_DISCONNECT_B3_CONF_ERROR	11	/* N-4 -> previous */
131     #define EV_NCCI_DISCONNECT_B3_REQ		12	/* N-1 -> N-4
132     							   N-2 -> N-4
133     							   N-3 -> N-4
134     							   N-ACT -> N-4 */
135     #define EV_NCCI_DISCONNECT_B3_RESP		13	/* N-5 -> N-0 */
136     
137     #endif				/* __CAPIDRV_H__ */
138