File: /usr/src/linux/drivers/isdn/eicon/constant.h

1     
2     /*
3      *
4      * Copyright (C) Eicon Technology Corporation, 2000.
5      *
6      * Eicon File Revision :    1.0  
7      *
8      * This program is free software; you can redistribute it and/or modify
9      * it under the terms of the GNU General Public License as published by
10      * the Free Software Foundation; either version 2, or (at your option)
11      * any later version.
12      *
13      * This program is distributed in the hope that it will be useful,
14      * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
15      * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
16      * See the GNU General Public License for more details.
17      *
18      * You should have received a copy of the GNU General Public License
19      * along with this program; if not, write to the Free Software
20      * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21      *
22      */
23     
24     
25     
26     /*------------------------------------------------------------------*/
27     /* Q.931 information elements maximum length                        */
28     /* excluding the identifier, including the length field             */
29     /*------------------------------------------------------------------*/
30     
31     #define MAX_LEN_BC      13
32     #define MAX_LEN_LLC     19 /* ctr3 */
33     #define MAX_LEN_HLC     6  /* ctr3 */
34     #define MAX_LEN_UUI     200 /* Hicom USBS req */
35     #define MAX_LEN_NUM     24
36     #define MAX_LEN_DSP     83 /* ctr3 */
37     #define MAX_LEN_NI      4
38     #define MAX_LEN_PI      5
39     #define MAX_LEN_SIN     3
40     #define MAX_LEN_CST     4
41     #define MAX_LEN_SIG     2
42     #define MAX_LEN_SPID    32
43     #define MAX_LEN_EID     3
44     #define MAX_LEN_CHI     35  /* ctr3 */
45     #define MAX_LEN_CAU     33
46     #define MAX_LEN_FTY     130
47     #define MAX_LEN_KEY     83  /* ctr3 */
48     #define MAX_LEN_RSI     4
49     #define MAX_LEN_CAI     11
50     #define MAX_NUM_SPID    4
51     #define MAX_LEN_USERID  9
52     #define MAX_LEN_APPLID  5
53     #define MAX_LEN_NTTCIF  15
54     
55     /*------------------------------------------------------------------*/
56     /* decision return values                                           */
57     /*------------------------------------------------------------------*/
58     
59     #define YES             1
60     #define NO              0
61     
62     
63     /*-------------------------------------------------------------------*/
64     /* w element coding                                                  */
65     /*-------------------------------------------------------------------*/
66     
67     #define NTTCIF          0x01
68     #define BC              0x04
69     #define CAU             0x08
70     #define CAD             0x0c
71     #define CAI             0x10
72     #define CST             0x14
73     #define CHI             0x18
74     #define LLI             0x19
75     #define CHA             0x1a
76     #define FTY             0x1c
77     #define PI              0x1e
78     #define NFAC            0x20
79     #define TC              0x24
80     #define ATT_EID         0x26
81     #define NI              0x27
82     #define DSP             0x28
83     #define DT              0x29
84     #define KEY             0x2c
85     #define KP              0x2c
86     #define UID             0x2d
87     #define SIG             0x34
88     #define FI              0x39
89     #define SPID            0x3a
90     #define EID             0x3b
91     #define DSPF            0x3c
92     #define ECAD            0x4c
93     #define OAD             0x6c
94     #define OSA             0x6d
95     #define DAD             0x70
96     #define CPN             0x70
97     #define DSA             0x71
98     #define RDX             0x73
99     #define RAD             0x74
100     #define RDN             0x74
101     #define RSI             0x79
102     #define SCR             0x7A   /* internal unscreened CPN          */
103     #define MIE             0x7a   /* internal management info element */
104     #define LLC             0x7c
105     #define HLC             0x7d
106     #define UUI             0x7e
107     #define ESC             0x7f
108     
109     #define SHIFT           0x90
110     #define MORE            0xa0
111     #define CL              0xb0
112     
113     /* information elements used on the spid interface */
114     #define SPID_CMD        0xc0
115     #define SPID_LINK       0x10
116     #define SPID_DN         0x70
117     #define SPID_BC         0x04
118     #define SPID_SWITCH     0x11
119     
120     /*------------------------------------------------------------------*/
121     /* global configuration parameters, defined in exec.c               */
122     /* these parameters are configured with program loading             */
123     /*------------------------------------------------------------------*/
124     
125     #define PROT_1TR6       0
126     #define PROT_ETSI       1
127     #define PROT_FRANC      2
128     #define PROT_BELG       3
129     #define PROT_SWED       4
130     #define PROT_NI         5
131     #define PROT_5ESS       6
132     #define PROT_JAPAN      7
133     #define PROT_ATEL       8
134     #define PROT_US         9
135     #define PROT_ITALY      10
136     #define PROT_TWAN       11
137     #define PROT_AUSTRAL    12
138     
139     #define INIT_PROT_1TR6    0x80|PROT_1TR6
140     #define INIT_PROT_ETSI    0x80|PROT_ETSI
141     #define INIT_PROT_FRANC   0x80|PROT_FRANC
142     #define INIT_PROT_BELG    0x80|PROT_BELG
143     #define INIT_PROT_SWED    0x80|PROT_SWED
144     #define INIT_PROT_NI      0x80|PROT_NI
145     #define INIT_PROT_5ESS    0x80|PROT_5ESS
146     #define INIT_PROT_JAPAN   0x80|PROT_JAPAN
147     #define INIT_PROT_ATEL    0x80|PROT_ATEL
148     #define INIT_PROT_ITALY   0x80|PROT_ITALY
149     #define INIT_PROT_TWAN    0x80|PROT_TWAN
150     #define INIT_PROT_AUSTRAL 0x80|PROT_AUSTRAL
151     
152     
153     /* -----------------------------------------------------------**
154     ** The PROTOCOL_FEATURE_STRING in feature.h (included         **
155     ** in prstart.sx and astart.sx) defines capabilities and      **
156     ** features of the actual protocol code. It's used as a bit   **
157     ** mask.                                                      **
158     ** The following Bits are defined:                            **
159     ** -----------------------------------------------------------*/
160                                                
161     #define PROTCAP_TELINDUS  0x0001  /* Telindus Variant of protocol code   */
162     #define PROTCAP_MANIF     0x0002  /* Management interface implemented    */
163     #define PROTCAP_V_42      0x0004  /* V42 implemented                     */
164     #define PROTCAP_V90D      0x0008  /* V.90D (implies up to 384k DSP code) */
165     #define PROTCAP_EXTD_FAX  0x0010  /* Extended FAX (ECM, 2D, T6, Polling) */
166     #define PROTCAP_FREE4     0x0020  /* not used                            */
167     #define PROTCAP_FREE5     0x0040  /* not used                            */
168     #define PROTCAP_FREE6     0x0080  /* not used                            */
169     #define PROTCAP_FREE7     0x0100  /* not used                            */
170     #define PROTCAP_FREE8     0x0200  /* not used                            */
171     #define PROTCAP_FREE9     0x0400  /* not used                            */
172     #define PROTCAP_FREE10    0x0800  /* not used                            */
173     #define PROTCAP_FREE11    0x1000  /* not used                            */
174     #define PROTCAP_FREE12    0x2000  /* not used                            */
175     #define PROTCAP_FREE13    0x4000  /* not used                            */
176     #define PROTCAP_EXTENSION 0x8000  /* used for future extentions          */
177