pre-2.3.4..
[davej-history.git] / drivers / isdn / avmb1 / capidrv.h
blob2e5abf04b8cbc12657cafcd02e4385db8bfbbd55
1 /*
2 * $Id: capidrv.h,v 1.2 1998/03/29 16:06:06 calle Exp $
4 * ISDN4Linux Driver, using capi20 interface (kernelcapi)
6 * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
8 * $Log: capidrv.h,v $
9 * Revision 1.2 1998/03/29 16:06:06 calle
10 * changes from 2.0 tree merged.
12 * Revision 1.1.2.1 1998/03/20 14:38:28 calle
13 * capidrv: prepared state machines for suspend/resume/hold
14 * capidrv: fix bug in state machine if B1/T1 is out of nccis
15 * b1capi: changed some errno returns.
16 * b1capi: detect if you try to add same T1 to different io address.
17 * b1capi: change number of nccis depending on number of channels.
18 * b1lli: cosmetics
20 * Revision 1.1 1997/03/04 21:50:33 calle
21 * Frirst version in isdn4linux
23 * Revision 2.2 1997/02/12 09:31:39 calle
24 * new version
26 * Revision 1.1 1997/01/31 10:32:20 calle
27 * Initial revision
30 #ifndef __CAPIDRV_H__
31 #define __CAPIDRV_H__
34 * LISTEN state machine
36 #define ST_LISTEN_NONE 0 /* L-0 */
37 #define ST_LISTEN_WAIT_CONF 1 /* L-0.1 */
38 #define ST_LISTEN_ACTIVE 2 /* L-1 */
39 #define ST_LISTEN_ACTIVE_WAIT_CONF 3 /* L-1.1 */
42 #define EV_LISTEN_REQ 1 /* L-0 -> L-0.1
43 L-1 -> L-1.1 */
44 #define EV_LISTEN_CONF_ERROR 2 /* L-0.1 -> L-0
45 L-1.1 -> L-1 */
46 #define EV_LISTEN_CONF_EMPTY 3 /* L-0.1 -> L-0
47 L-1.1 -> L-0 */
48 #define EV_LISTEN_CONF_OK 4 /* L-0.1 -> L-1
49 L-1.1 -> L.1 */
52 * per plci state machine
54 #define ST_PLCI_NONE 0 /* P-0 */
55 #define ST_PLCI_OUTGOING 1 /* P-0.1 */
56 #define ST_PLCI_ALLOCATED 2 /* P-1 */
57 #define ST_PLCI_ACTIVE 3 /* P-ACT */
58 #define ST_PLCI_INCOMING 4 /* P-2 */
59 #define ST_PLCI_FACILITY_IND 5 /* P-3 */
60 #define ST_PLCI_ACCEPTING 6 /* P-4 */
61 #define ST_PLCI_DISCONNECTING 7 /* P-5 */
62 #define ST_PLCI_DISCONNECTED 8 /* P-6 */
63 #define ST_PLCI_RESUMEING 9 /* P-0.Res */
64 #define ST_PLCI_RESUME 10 /* P-Res */
65 #define ST_PLCI_HELD 11 /* P-HELD */
67 #define EV_PLCI_CONNECT_REQ 1 /* P-0 -> P-0.1
69 #define EV_PLCI_CONNECT_CONF_ERROR 2 /* P-0.1 -> P-0
71 #define EV_PLCI_CONNECT_CONF_OK 3 /* P-0.1 -> P-1
73 #define EV_PLCI_FACILITY_IND_UP 4 /* P-0 -> P-1
75 #define EV_PLCI_CONNECT_IND 5 /* P-0 -> P-2
77 #define EV_PLCI_CONNECT_ACTIVE_IND 6 /* P-1 -> P-ACT
79 #define EV_PLCI_CONNECT_REJECT 7 /* P-2 -> P-5
80 P-3 -> P-5
82 #define EV_PLCI_DISCONNECT_REQ 8 /* P-1 -> P-5
83 P-2 -> P-5
84 P-3 -> P-5
85 P-4 -> P-5
86 P-ACT -> P-5
87 P-Res -> P-5 (*)
88 P-HELD -> P-5 (*)
90 #define EV_PLCI_DISCONNECT_IND 9 /* P-1 -> P-6
91 P-2 -> P-6
92 P-3 -> P-6
93 P-4 -> P-6
94 P-5 -> P-6
95 P-ACT -> P-6
96 P-Res -> P-6 (*)
97 P-HELD -> P-6 (*)
99 #define EV_PLCI_FACILITY_IND_DOWN 10 /* P-0.1 -> P-5
100 P-1 -> P-5
101 P-ACT -> P-5
102 P-2 -> P-5
103 P-3 -> P-5
104 P-4 -> P-5
106 #define EV_PLCI_DISCONNECT_RESP 11 /* P-6 -> P-0
108 #define EV_PLCI_CONNECT_RESP 12 /* P-6 -> P-0
111 #define EV_PLCI_RESUME_REQ 13 /* P-0 -> P-0.Res
113 #define EV_PLCI_RESUME_CONF_OK 14 /* P-0.Res -> P-Res
115 #define EV_PLCI_RESUME_CONF_ERROR 15 /* P-0.Res -> P-0
117 #define EV_PLCI_RESUME_IND 16 /* P-Res -> P-ACT
119 #define EV_PLCI_HOLD_IND 17 /* P-ACT -> P-HELD
121 #define EV_PLCI_RETRIEVE_IND 18 /* P-HELD -> P-ACT
123 #define EV_PLCI_SUSPEND_IND 19 /* P-ACT -> P-5
125 #define EV_PLCI_CD_IND 20 /* P-2 -> P-5
129 * per ncci state machine
131 #define ST_NCCI_PREVIOUS -1
132 #define ST_NCCI_NONE 0 /* N-0 */
133 #define ST_NCCI_OUTGOING 1 /* N-0.1 */
134 #define ST_NCCI_INCOMING 2 /* N-1 */
135 #define ST_NCCI_ALLOCATED 3 /* N-2 */
136 #define ST_NCCI_ACTIVE 4 /* N-ACT */
137 #define ST_NCCI_RESETING 5 /* N-3 */
138 #define ST_NCCI_DISCONNECTING 6 /* N-4 */
139 #define ST_NCCI_DISCONNECTED 7 /* N-5 */
141 #define EV_NCCI_CONNECT_B3_REQ 1 /* N-0 -> N-0.1 */
142 #define EV_NCCI_CONNECT_B3_IND 2 /* N-0 -> N.1 */
143 #define EV_NCCI_CONNECT_B3_CONF_OK 3 /* N-0.1 -> N.2 */
144 #define EV_NCCI_CONNECT_B3_CONF_ERROR 4 /* N-0.1 -> N.0 */
145 #define EV_NCCI_CONNECT_B3_REJECT 5 /* N-1 -> N-4 */
146 #define EV_NCCI_CONNECT_B3_RESP 6 /* N-1 -> N-2 */
147 #define EV_NCCI_CONNECT_B3_ACTIVE_IND 7 /* N-2 -> N-ACT */
148 #define EV_NCCI_RESET_B3_REQ 8 /* N-ACT -> N-3 */
149 #define EV_NCCI_RESET_B3_IND 9 /* N-3 -> N-ACT */
150 #define EV_NCCI_DISCONNECT_B3_IND 10 /* N-4 -> N.5 */
151 #define EV_NCCI_DISCONNECT_B3_CONF_ERROR 11 /* N-4 -> previous */
152 #define EV_NCCI_DISCONNECT_B3_REQ 12 /* N-1 -> N-4
153 N-2 -> N-4
154 N-3 -> N-4
155 N-ACT -> N-4 */
156 #define EV_NCCI_DISCONNECT_B3_RESP 13 /* N-5 -> N-0 */
158 #endif /* __CAPIDRV_H__ */