blob: 4466b2e0176dc561f0edd75cdb93a1b017f6791b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* $Id: capidrv.h,v 1.2.8.2 2001/09/23 22:24:33 kai Exp $
2 *
3 * ISDN4Linux Driver, using capi20 interface (kernelcapi)
4 *
5 * Copyright 1997 by Carsten Paeth <calle@calle.de>
6 *
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.
9 *
10 */
11
12#ifndef __CAPIDRV_H__
13#define __CAPIDRV_H__
14
15/*
16 * LISTEN state machine
17 */
18#define ST_LISTEN_NONE 0 /* L-0 */
19#define ST_LISTEN_WAIT_CONF 1 /* L-0.1 */
20#define ST_LISTEN_ACTIVE 2 /* L-1 */
21#define ST_LISTEN_ACTIVE_WAIT_CONF 3 /* L-1.1 */
22
23
24#define EV_LISTEN_REQ 1 /* L-0 -> L-0.1
25 L-1 -> L-1.1 */
26#define EV_LISTEN_CONF_ERROR 2 /* L-0.1 -> L-0
27 L-1.1 -> L-1 */
28#define EV_LISTEN_CONF_EMPTY 3 /* L-0.1 -> L-0
29 L-1.1 -> L-0 */
30#define EV_LISTEN_CONF_OK 4 /* L-0.1 -> L-1
31 L-1.1 -> L.1 */
32
33/*
34 * per plci state machine
35 */
36#define ST_PLCI_NONE 0 /* P-0 */
Joe Perches475be4d2012-02-19 19:52:38 -080037#define ST_PLCI_OUTGOING 1 /* P-0.1 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#define ST_PLCI_ALLOCATED 2 /* P-1 */
39#define ST_PLCI_ACTIVE 3 /* P-ACT */
40#define ST_PLCI_INCOMING 4 /* P-2 */
41#define ST_PLCI_FACILITY_IND 5 /* P-3 */
42#define ST_PLCI_ACCEPTING 6 /* P-4 */
43#define ST_PLCI_DISCONNECTING 7 /* P-5 */
44#define ST_PLCI_DISCONNECTED 8 /* P-6 */
45#define ST_PLCI_RESUMEING 9 /* P-0.Res */
46#define ST_PLCI_RESUME 10 /* P-Res */
47#define ST_PLCI_HELD 11 /* P-HELD */
48
49#define EV_PLCI_CONNECT_REQ 1 /* P-0 -> P-0.1
Joe Perches475be4d2012-02-19 19:52:38 -080050 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070051#define EV_PLCI_CONNECT_CONF_ERROR 2 /* P-0.1 -> P-0
Joe Perches475be4d2012-02-19 19:52:38 -080052 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070053#define EV_PLCI_CONNECT_CONF_OK 3 /* P-0.1 -> P-1
Joe Perches475be4d2012-02-19 19:52:38 -080054 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055#define EV_PLCI_FACILITY_IND_UP 4 /* P-0 -> P-1
Joe Perches475be4d2012-02-19 19:52:38 -080056 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070057#define EV_PLCI_CONNECT_IND 5 /* P-0 -> P-2
Joe Perches475be4d2012-02-19 19:52:38 -080058 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070059#define EV_PLCI_CONNECT_ACTIVE_IND 6 /* P-1 -> P-ACT
Joe Perches475be4d2012-02-19 19:52:38 -080060 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070061#define EV_PLCI_CONNECT_REJECT 7 /* P-2 -> P-5
62 P-3 -> P-5
Joe Perches475be4d2012-02-19 19:52:38 -080063 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070064#define EV_PLCI_DISCONNECT_REQ 8 /* P-1 -> P-5
65 P-2 -> P-5
66 P-3 -> P-5
67 P-4 -> P-5
68 P-ACT -> P-5
69 P-Res -> P-5 (*)
70 P-HELD -> P-5 (*)
Joe Perches475be4d2012-02-19 19:52:38 -080071 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070072#define EV_PLCI_DISCONNECT_IND 9 /* P-1 -> P-6
73 P-2 -> P-6
74 P-3 -> P-6
75 P-4 -> P-6
76 P-5 -> P-6
77 P-ACT -> P-6
78 P-Res -> P-6 (*)
79 P-HELD -> P-6 (*)
Joe Perches475be4d2012-02-19 19:52:38 -080080 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070081#define EV_PLCI_FACILITY_IND_DOWN 10 /* P-0.1 -> P-5
82 P-1 -> P-5
83 P-ACT -> P-5
84 P-2 -> P-5
85 P-3 -> P-5
86 P-4 -> P-5
Joe Perches475be4d2012-02-19 19:52:38 -080087 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070088#define EV_PLCI_DISCONNECT_RESP 11 /* P-6 -> P-0
Joe Perches475be4d2012-02-19 19:52:38 -080089 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070090#define EV_PLCI_CONNECT_RESP 12 /* P-6 -> P-0
Joe Perches475be4d2012-02-19 19:52:38 -080091 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
93#define EV_PLCI_RESUME_REQ 13 /* P-0 -> P-0.Res
Joe Perches475be4d2012-02-19 19:52:38 -080094 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070095#define EV_PLCI_RESUME_CONF_OK 14 /* P-0.Res -> P-Res
Joe Perches475be4d2012-02-19 19:52:38 -080096 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070097#define EV_PLCI_RESUME_CONF_ERROR 15 /* P-0.Res -> P-0
Joe Perches475be4d2012-02-19 19:52:38 -080098 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070099#define EV_PLCI_RESUME_IND 16 /* P-Res -> P-ACT
Joe Perches475be4d2012-02-19 19:52:38 -0800100 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101#define EV_PLCI_HOLD_IND 17 /* P-ACT -> P-HELD
Joe Perches475be4d2012-02-19 19:52:38 -0800102 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103#define EV_PLCI_RETRIEVE_IND 18 /* P-HELD -> P-ACT
Joe Perches475be4d2012-02-19 19:52:38 -0800104 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105#define EV_PLCI_SUSPEND_IND 19 /* P-ACT -> P-5
Joe Perches475be4d2012-02-19 19:52:38 -0800106 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107#define EV_PLCI_CD_IND 20 /* P-2 -> P-5
Joe Perches475be4d2012-02-19 19:52:38 -0800108 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109
110/*
111 * per ncci state machine
112 */
113#define ST_NCCI_PREVIOUS -1
114#define ST_NCCI_NONE 0 /* N-0 */
115#define ST_NCCI_OUTGOING 1 /* N-0.1 */
116#define ST_NCCI_INCOMING 2 /* N-1 */
117#define ST_NCCI_ALLOCATED 3 /* N-2 */
118#define ST_NCCI_ACTIVE 4 /* N-ACT */
119#define ST_NCCI_RESETING 5 /* N-3 */
120#define ST_NCCI_DISCONNECTING 6 /* N-4 */
121#define ST_NCCI_DISCONNECTED 7 /* N-5 */
122
123#define EV_NCCI_CONNECT_B3_REQ 1 /* N-0 -> N-0.1 */
124#define EV_NCCI_CONNECT_B3_IND 2 /* N-0 -> N.1 */
125#define EV_NCCI_CONNECT_B3_CONF_OK 3 /* N-0.1 -> N.2 */
126#define EV_NCCI_CONNECT_B3_CONF_ERROR 4 /* N-0.1 -> N.0 */
127#define EV_NCCI_CONNECT_B3_REJECT 5 /* N-1 -> N-4 */
128#define EV_NCCI_CONNECT_B3_RESP 6 /* N-1 -> N-2 */
129#define EV_NCCI_CONNECT_B3_ACTIVE_IND 7 /* N-2 -> N-ACT */
130#define EV_NCCI_RESET_B3_REQ 8 /* N-ACT -> N-3 */
131#define EV_NCCI_RESET_B3_IND 9 /* N-3 -> N-ACT */
132#define EV_NCCI_DISCONNECT_B3_IND 10 /* N-4 -> N.5 */
133#define EV_NCCI_DISCONNECT_B3_CONF_ERROR 11 /* N-4 -> previous */
134#define EV_NCCI_DISCONNECT_B3_REQ 12 /* N-1 -> N-4
135 N-2 -> N-4
136 N-3 -> N-4
137 N-ACT -> N-4 */
138#define EV_NCCI_DISCONNECT_B3_RESP 13 /* N-5 -> N-0 */
139
140#endif /* __CAPIDRV_H__ */