blob: 6bb587005b8628c57ac7972fea078d137afa022d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * DSS.1 module definitions
3 *
4 * Copyright (C) 1996 Universidade de Lisboa
5 *
6 * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
7 *
8 * This software may be used and distributed according to the terms of
9 * the GNU General Public License, incorporated herein by reference.
10 */
11
12#ifndef EDSS1_H
13#define EDSS1_H
14
15/* ISDN states */
16
17#define ST_NULL 0
18#define ST_CALL_INIT 1 /* Call initiated */
19#define ST_OVER_SEND 2 /* Overlap sending - Requests More Info 4 call */
20#define ST_CALL_PROC 3 /* Call Proceeding */
21#define ST_CALL_DELV 4
22#define ST_CALL_PRES 6 /* Call Present - Received CONN.IND */
23#define ST_CALL_RECV 7 /* Alerting sent */
24#define ST_CONN_REQ 8 /* Answered - waiting 4 CONN.CONF */
25#define ST_INCM_PROC 9
26#define ST_ACTIVE 10
27#define ST_DISC_REQ 11
28#define ST_DISC_IND 12
29#define ST_SUSP_REQ 15
30#define ST_RESM_REQ 17
31#define ST_RELS_REQ 19
32#define ST_OVER_RECV 25
33
34#define ST_ACTIVE_SELP 26 /* Select protocol on B-Channel */
35#define ST_ACTIVE_ACTV 27 /* Activate B-channel protocol */
36
37#define MAX_STATE ST_ACTIVE_ACTV
38
39#define EV_NULL 0
40#define EV_USR_SETUP_REQ 1
41#define EV_USR_SETUP_RESP 2
42#define EV_USR_PROCED_REQ 3
43#define EV_USR_RELEASE_REQ 4
44#define EV_USR_REJECT_REQ 4
45
46#define EV_NET_SETUP 16
47#define EV_NET_CALL_PROC 17
48#define EV_NET_SETUP_ACK 18
49#define EV_NET_CONN 19
50#define EV_NET_CONN_ACK 20
51
52#define EV_NET_SELP_RESP 21
53#define EV_NET_ACTV_RESP 22
54
55#define EV_NET_DISC 23
56#define EV_NET_RELEASE 24
57#define EV_NET_RELEASE_COMP 25
58
59#define EV_TIMER 26
60#define EV_ERROR 32
61
62/*
63 * Cause values
64 * only the ones we use
65 */
66
67#define CAUSE_NORMAL 0x10U
68#define CAUSE_NOCHAN 0x22U
69
70struct callb_data {
71 unsigned short type;
72 union {
73 struct ConnInfo {
74 char *CalledPN;
75 char *CallingPN;
76 } setup;
77 unsigned short cause;
78 } data;
79};
80
81struct fsm_entry {
82 unsigned short init;
83 unsigned short final;
84 unsigned short event;
85 void (*callb)(struct pcbit_dev *, struct pcbit_chan *, struct callb_data*);
86};
87
88struct fsm_timer_entry {
89 unsigned short init;
90 unsigned long timeout; /* in seconds */
91};
92
93
94extern void pcbit_fsm_event(struct pcbit_dev *, struct pcbit_chan *,
95 unsigned short event, struct callb_data *);
96#endif
97
98
99