ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / isdn / hardware / eicon / pc.h
1
2 /*
3  *
4   Copyright (c) Eicon Networks, 2002.
5  *
6   This source file is supplied for the use with
7   Eicon Networks range of DIVA Server Adapters.
8  *
9   Eicon File Revision :    2.1
10  *
11   This program is free software; you can redistribute it and/or modify
12   it under the terms of the GNU General Public License as published by
13   the Free Software Foundation; either version 2, or (at your option)
14   any later version.
15  *
16   This program is distributed in the hope that it will be useful,
17   but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
18   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19   See the GNU General Public License for more details.
20  *
21   You should have received a copy of the GNU General Public License
22   along with this program; if not, write to the Free Software
23   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  */
26 #ifndef PC_H_INCLUDED  /* { */
27 #define PC_H_INCLUDED
28 /*------------------------------------------------------------------*/
29 /* buffer definition                                                */
30 /*------------------------------------------------------------------*/
31 typedef struct {
32   word length;          /* length of data/parameter field           */
33   byte P[270];          /* data/parameter field                     */
34 } PBUFFER;
35 /*------------------------------------------------------------------*/
36 /* dual port ram structure                                          */
37 /*------------------------------------------------------------------*/
38 struct dual
39 {
40   byte Req;             /* request register                         */
41   byte ReqId;           /* request task/entity identification       */
42   byte Rc;              /* return code register                     */
43   byte RcId;            /* return code task/entity identification   */
44   byte Ind;             /* Indication register                      */
45   byte IndId;           /* Indication task/entity identification    */
46   byte IMask;           /* Interrupt Mask Flag                      */
47   byte RNR;             /* Receiver Not Ready (set by PC)           */
48   byte XLock;           /* XBuffer locked Flag                      */
49   byte Int;             /* ISDN-S interrupt                         */
50   byte ReqCh;           /* Channel field for layer-3 Requests       */
51   byte RcCh;            /* Channel field for layer-3 Returncodes    */
52   byte IndCh;           /* Channel field for layer-3 Indications    */
53   byte MInd;            /* more data indication field               */
54   word MLength;         /* more data total packet length            */
55   byte ReadyInt;        /* request field for ready interrupt        */
56   byte SWReg;           /* Software register for special purposes   */
57   byte Reserved[11];    /* reserved space                           */
58   byte InterfaceType;   /* interface type 1=16K interface           */
59   word Signature;       /* ISDN-S adapter Signature (GD)            */
60   PBUFFER XBuffer;      /* Transmit Buffer                          */
61   PBUFFER RBuffer;      /* Receive Buffer                           */
62 };
63 /*------------------------------------------------------------------*/
64 /* SWReg Values (0 means no command)                                */
65 /*------------------------------------------------------------------*/
66 #define SWREG_DIE_WITH_LEDON  0x01
67 #define SWREG_HALT_CPU        0x02 /* Push CPU into a while(1) loop */
68 /*------------------------------------------------------------------*/
69 /* Id Fields Coding                                                 */
70 /*------------------------------------------------------------------*/
71 #define ID_MASK 0xe0    /* Mask for the ID field                    */
72 #define GL_ERR_ID 0x1f  /* ID for error reporting on global requests*/
73 #define DSIG_ID  0x00   /* ID for D-channel signaling               */
74 #define NL_ID    0x20   /* ID for network-layer access (B or D)     */
75 #define BLLC_ID  0x60   /* ID for B-channel link level access       */
76 #define TASK_ID  0x80   /* ID for dynamic user tasks                */
77 #define TIMER_ID 0xa0   /* ID for timer task                        */
78 #define TEL_ID   0xc0   /* ID for telephone support                 */
79 #define MAN_ID   0xe0   /* ID for management                        */
80 /*------------------------------------------------------------------*/
81 /* ASSIGN and REMOVE requests are the same for all entities         */
82 /*------------------------------------------------------------------*/
83 #define ASSIGN  0x01
84 #define UREMOVE 0xfe /* without return code */
85 #define REMOVE  0xff
86 /*------------------------------------------------------------------*/
87 /* Timer Interrupt Task Interface                                   */
88 /*------------------------------------------------------------------*/
89 #define ASSIGN_TIM 0x01
90 #define REMOVE_TIM 0xff
91 /*------------------------------------------------------------------*/
92 /* dynamic user task interface                                      */
93 /*------------------------------------------------------------------*/
94 #define ASSIGN_TSK 0x01
95 #define REMOVE_TSK 0xff
96 #define LOAD 0xf0
97 #define RELOCATE 0xf1
98 #define START 0xf2
99 #define LOAD2 0xf3
100 #define RELOCATE2 0xf4
101 /*------------------------------------------------------------------*/
102 /* dynamic user task messages                                       */
103 /*------------------------------------------------------------------*/
104 #define TSK_B2          0x0000
105 #define TSK_WAKEUP      0x2000
106 #define TSK_TIMER       0x4000
107 #define TSK_TSK         0x6000
108 #define TSK_PC          0xe000
109 /*------------------------------------------------------------------*/
110 /* LL management primitives                                         */
111 /*------------------------------------------------------------------*/
112 #define ASSIGN_LL 1     /* assign logical link                      */
113 #define REMOVE_LL 0xff  /* remove logical link                      */
114 /*------------------------------------------------------------------*/
115 /* LL service primitives                                            */
116 /*------------------------------------------------------------------*/
117 #define LL_UDATA 1      /* link unit data request/indication        */
118 #define LL_ESTABLISH 2  /* link establish request/indication        */
119 #define LL_RELEASE 3    /* link release request/indication          */
120 #define LL_DATA 4       /* data request/indication                  */
121 #define LL_LOCAL 5      /* switch to local operation (COM only)     */
122 #define LL_DATA_PEND 5  /* data pending indication (SDLC SHM only)  */
123 #define LL_REMOTE 6     /* switch to remote operation (COM only)    */
124 #define LL_TEST 8       /* link test request                        */
125 #define LL_MDATA 9      /* more data request/indication             */
126 #define LL_BUDATA 10    /* broadcast unit data request/indication   */
127 #define LL_XID 12       /* XID command request/indication           */
128 #define LL_XID_R 13     /* XID response request/indication          */
129 /*------------------------------------------------------------------*/
130 /* NL service primitives                                            */
131 /*------------------------------------------------------------------*/
132 #define N_MDATA         1       /* more data to come REQ/IND        */
133 #define N_CONNECT       2       /* OSI N-CONNECT REQ/IND            */
134 #define N_CONNECT_ACK   3       /* OSI N-CONNECT CON/RES            */
135 #define N_DISC          4       /* OSI N-DISC REQ/IND               */
136 #define N_DISC_ACK      5       /* OSI N-DISC CON/RES               */
137 #define N_RESET         6       /* OSI N-RESET REQ/IND              */
138 #define N_RESET_ACK     7       /* OSI N-RESET CON/RES              */
139 #define N_DATA          8       /* OSI N-DATA REQ/IND               */
140 #define N_EDATA         9       /* OSI N-EXPEDITED DATA REQ/IND     */
141 #define N_UDATA         10      /* OSI D-UNIT-DATA REQ/IND          */
142 #define N_BDATA         11      /* BROADCAST-DATA REQ/IND           */
143 #define N_DATA_ACK      12      /* data ack ind for D-bit procedure */
144 #define N_EDATA_ACK     13      /* data ack ind for INTERRUPT       */
145 #define N_XON           15      /* clear RNR state */
146 #define N_Q_BIT         0x10    /* Q-bit for req/ind                */
147 #define N_M_BIT         0x20    /* M-bit for req/ind                */
148 #define N_D_BIT         0x40    /* D-bit for req/ind                */
149 /*------------------------------------------------------------------*/
150 /* Signaling management primitives                                  */
151 /*------------------------------------------------------------------*/
152 #define ASSIGN_SIG  1    /* assign signaling task                    */
153 #define UREMOVE_SIG 0xfe /* remove signaling task without return code*/
154 #define REMOVE_SIG  0xff /* remove signaling task                    */
155 /*------------------------------------------------------------------*/
156 /* Signaling service primitives                                     */
157 /*------------------------------------------------------------------*/
158 #define CALL_REQ 1      /* call request                             */
159 #define CALL_CON 1      /* call confirmation                        */
160 #define CALL_IND 2      /* incoming call connected                  */
161 #define LISTEN_REQ 2    /* listen request                           */
162 #define HANGUP 3        /* hangup request/indication                */
163 #define SUSPEND 4       /* call suspend request/confirm             */
164 #define RESUME 5        /* call resume request/confirm              */
165 #define SUSPEND_REJ 6   /* suspend rejected indication              */
166 #define USER_DATA 8     /* user data for user to user signaling     */
167 #define CONGESTION 9    /* network congestion indication            */
168 #define INDICATE_REQ 10 /* request to indicate an incoming call     */
169 #define INDICATE_IND 10 /* indicates that there is an incoming call */
170 #define CALL_RES 11     /* accept an incoming call                  */
171 #define CALL_ALERT 12   /* send ALERT for incoming call             */
172 #define INFO_REQ 13     /* INFO request                             */
173 #define INFO_IND 13     /* INFO indication                          */
174 #define REJECT 14       /* reject an incoming call                  */
175 #define RESOURCES 15    /* reserve B-Channel hardware resources     */
176 #define HW_CTRL 16      /* B-Channel hardware IOCTL req/ind         */
177 #define TEL_CTRL 16     /* Telephone control request/indication     */
178 #define STATUS_REQ 17   /* Request D-State (returned in INFO_IND)   */
179 #define FAC_REG_REQ 18  /* 1TR6 connection independent fac reg      */
180 #define FAC_REG_ACK 19  /* 1TR6 fac registration acknowledge        */
181 #define FAC_REG_REJ 20  /* 1TR6 fac registration reject             */
182 #define CALL_COMPLETE 21/* send a CALL_PROC for incoming call       */
183 #define SW_CTRL 22      /* extended software features               */
184 #define REGISTER_REQ 23 /* Q.931 connection independent reg req     */
185 #define REGISTER_IND 24 /* Q.931 connection independent reg ind     */
186 #define FACILITY_REQ 25 /* Q.931 connection independent fac req     */
187 #define FACILITY_IND 26 /* Q.931 connection independent fac ind     */
188 #define NCR_INFO_REQ 27 /* INFO_REQ with NULL CR                    */
189 #define GCR_MIM_REQ 28  /* MANAGEMENT_INFO_REQ with global CR       */
190 #define SIG_CTRL    29  /* Control for Signalling Hardware          */
191 #define DSP_CTRL    30  /* Control for DSPs                         */
192 #define LAW_REQ      31 /* Law config request for (returns info_i)  */
193 #define SPID_CTRL    32 /* Request/indication SPID related          */
194 #define NCR_FACILITY 33 /* Request/indication with NULL/DUMMY CR    */
195 #define CALL_HOLD    34 /* Request/indication to hold a CALL        */
196 #define CALL_RETRIEVE 35 /* Request/indication to retrieve a CALL   */
197 #define CALL_HOLD_ACK 36 /* OK of                hold a CALL        */
198 #define CALL_RETRIEVE_ACK 37 /* OK of             retrieve a CALL   */
199 #define CALL_HOLD_REJ 38 /* Reject of            hold a CALL        */
200 #define CALL_RETRIEVE_REJ 39 /* Reject of         retrieve a call   */
201 #define GCR_RESTART   40 /* Send/Receive Restart message            */
202 #define S_SERVICE     41 /* Send/Receive Supplementary Service      */
203 #define S_SERVICE_REJ 42 /* Reject Supplementary Service indication */
204 #define S_SUPPORTED   43 /* Req/Ind to get Supported Services       */
205 #define STATUS_ENQ    44 /* Req to send the D-ch request if !state0 */
206 #define CALL_GUARD    45 /* Req/Ind to use the FLAGS_CALL_OUTCHECK  */
207 #define CALL_GUARD_HP 46 /* Call Guard function to reject a call    */
208 #define CALL_GUARD_IF 47 /* Call Guard function, inform the appl    */
209 #define SSEXT_REQ     48 /* Supplem.Serv./QSIG specific request     */
210 #define SSEXT_IND     49 /* Supplem.Serv./QSIG specific indication  */
211 /* reserved commands for the US protocols */
212 #define INT_3PTY_NIND 50 /* US       specific indication            */
213 #define INT_CF_NIND   51 /* US       specific indication            */
214 #define INT_3PTY_DROP 52 /* US       specific indication            */
215 #define INT_MOVE_CONF 53 /* US       specific indication            */
216 #define INT_MOVE_RC   54 /* US       specific indication            */
217 #define INT_MOVE_FLIPPED_CONF 55 /* US specific indication          */
218 #define INT_X5NI_OK   56 /* internal transfer OK indication         */
219 #define INT_XDMS_START 57 /* internal transfer OK indication        */
220 #define INT_XDMS_STOP 58 /* internal transfer finish indication     */
221 #define INT_XDMS_STOP2 59 /* internal transfer send FA              */
222 #define INT_CUSTCONF_REJ 60 /* internal conference reject           */
223 #define INT_CUSTXFER 61 /* internal transfer request                */
224 #define INT_CUSTX_NIND 62 /* internal transfer ack                  */
225 #define INT_CUSTXREJ_NIND 63 /* internal transfer rej               */
226 #define INT_X5NI_CF_XFER  64 /* internal transfer OK indication     */
227 #define VSWITCH_REQ 65        /* communication between protocol and */
228 #define VSWITCH_IND 66        /* capifunctions for D-CH-switching   */
229 #define MWI_POLL 67     /* Message Waiting Status Request fkt */
230 #define CALL_PEND_NOTIFY 68 /* notify capi to set new listen        */
231 /*------------------------------------------------------------------*/
232 /* management service primitives                                    */
233 /*------------------------------------------------------------------*/
234 #define MAN_READ        2
235 #define MAN_WRITE       3
236 #define MAN_EXECUTE     4
237 #define MAN_EVENT_ON    5
238 #define MAN_EVENT_OFF   6
239 #define MAN_LOCK        7
240 #define MAN_UNLOCK      8
241 #define MAN_INFO_IND    2
242 #define MAN_EVENT_IND   3
243 #define MAN_TRACE_IND   4
244 #define MAN_ESC         0x80
245 /*------------------------------------------------------------------*/
246 /* return code coding                                               */
247 /*------------------------------------------------------------------*/
248 #define UNKNOWN_COMMAND         0x01    /* unknown command          */
249 #define WRONG_COMMAND           0x02    /* wrong command            */
250 #define WRONG_ID                0x03    /* unknown task/entity id   */
251 #define WRONG_CH                0x04    /* wrong task/entity id     */
252 #define UNKNOWN_IE              0x05    /* unknown information el.  */
253 #define WRONG_IE                0x06    /* wrong information el.    */
254 #define OUT_OF_RESOURCES        0x07    /* ISDN-S card out of res.  */
255 #define ISDN_GUARD_REJ          0x09    /* ISDN-Guard SuppServ rej  */
256 #define N_FLOW_CONTROL          0x10    /* Flow-Control, retry      */
257 #define ASSIGN_RC               0xe0    /* ASSIGN acknowledgement   */
258 #define ASSIGN_OK               0xef    /* ASSIGN OK                */
259 #define OK_FC                   0xfc    /* Flow-Control RC          */
260 #define READY_INT               0xfd    /* Ready interrupt          */
261 #define TIMER_INT               0xfe    /* timer interrupt          */
262 #define OK                      0xff    /* command accepted         */
263 /*------------------------------------------------------------------*/
264 /* information elements                                             */
265 /*------------------------------------------------------------------*/
266 #define SHIFT 0x90              /* codeset shift                    */
267 #define MORE 0xa0               /* more data                        */
268 #define CL 0xb0                 /* congestion level                 */
269         /* codeset 0                                                */
270 #define SMSG 0x00               /* segmented message                */
271 #define BC  0x04                /* Bearer Capability                */
272 #define CAU 0x08                /* cause                            */
273 #define CAD 0x0c                /* Connected address                */
274 #define CAI 0x10                /* call identity                    */
275 #define CHI 0x18                /* channel identification           */
276 #define LLI 0x19                /* logical link id                  */
277 #define CHA 0x1a                /* charge advice                    */
278 #define FTY 0x1c                /* Facility                         */
279 #define DT  0x29                /* ETSI date/time                   */
280 #define KEY 0x2c                /* keypad information element       */
281 #define UID 0x2d                /* User id information element      */
282 #define DSP 0x28                /* display                          */
283 #define SIG 0x34                /* signalling hardware control      */
284 #define OAD 0x6c                /* origination address              */
285 #define OSA 0x6d                /* origination sub-address          */
286 #define CPN 0x70                /* called party number              */
287 #define DSA 0x71                /* destination sub-address          */
288 #define RDX 0x73                /* redirecting number extended      */
289 #define RDN 0x74                /* redirecting number               */
290 #define RIN 0x76                /* redirection number               */
291 #define RI  0x79                /* restart indicator                */
292 #define MIE 0x7a                /* management info element          */
293 #define LLC 0x7c                /* low layer compatibility          */
294 #define HLC 0x7d                /* high layer compatibility         */
295 #define UUI 0x7e                /* user user information            */
296 #define ESC 0x7f                /* escape extension                 */
297 #define DLC 0x20                /* data link layer configuration    */
298 #define NLC 0x21                /* network layer configuration      */
299         /* codeset 6                                                */
300 #define SIN 0x01                /* service indicator                */
301 #define CIF 0x02                /* charging information             */
302 #define DATE 0x03               /* date                             */
303 #define CPS 0x07                /* called party status              */
304 /*------------------------------------------------------------------*/
305 /* ESC information elements                                         */
306 /*------------------------------------------------------------------*/
307 #define MSGTYPEIE        0x7a   /* Messagetype info element         */
308 #define CRIE             0x7b   /* INFO info element                */
309 #define VSWITCHIE        0xed   /* VSwitch info element             */
310 #define SSEXTIE          0xee   /* Supplem. Service info element    */
311 #define PROFILEIE        0xef   /* Profile info element             */
312 /*------------------------------------------------------------------*/
313 /* TEL_CTRL contents                                                */
314 /*------------------------------------------------------------------*/
315 #define RING_ON         0x01
316 #define RING_OFF        0x02
317 #define HANDS_FREE_ON   0x03
318 #define HANDS_FREE_OFF  0x04
319 #define ON_HOOK         0x80
320 #define OFF_HOOK        0x90
321 /* operation values used by ETSI supplementary services */
322 #define THREE_PTY_BEGIN           0x04
323 #define THREE_PTY_END             0x05
324 #define ECT_EXECUTE               0x06
325 #define ACTIVATION_DIVERSION      0x07
326 #define DEACTIVATION_DIVERSION    0x08
327 #define CALL_DEFLECTION           0x0D
328 #define INTERROGATION_DIVERSION   0x0B
329 #define INTERROGATION_SERV_USR_NR 0x11
330 #define ACTIVATION_MWI            0x20
331 #define DEACTIVATION_MWI          0x21
332 #define MWI_INDICATION            0x22
333 #define MWI_RESPONSE              0x23
334 #define CONF_BEGIN                0x28
335 #define CONF_ADD                  0x29
336 #define CONF_SPLIT                0x2a
337 #define CONF_DROP                 0x2b
338 #define CONF_ISOLATE              0x2c
339 #define CONF_REATTACH             0x2d
340 #define CONF_PARTYDISC            0x2e
341 #define CCBS_INFO_RETAIN          0x2f
342 #define CCBS_ERASECALLLINKAGEID   0x30
343 #define CCBS_STOP_ALERTING        0x31
344 #define CCBS_REQUEST              0x32
345 #define CCBS_DEACTIVATE           0x33
346 #define CCBS_INTERROGATE          0x34
347 #define GET_SUPPORTED_SERVICES    0xff
348 #define DIVERSION_PROCEDURE_CFU     0x70
349 #define DIVERSION_PROCEDURE_CFB     0x71
350 #define DIVERSION_PROCEDURE_CFNR    0x72
351 #define DIVERSION_DEACTIVATION_CFU  0x80
352 #define DIVERSION_DEACTIVATION_CFB  0x81
353 #define DIVERSION_DEACTIVATION_CFNR 0x82
354 #define DIVERSION_INTERROGATE_NUM   0x11
355 #define DIVERSION_INTERROGATE_CFU   0x60
356 #define DIVERSION_INTERROGATE_CFB   0x61
357 #define DIVERSION_INTERROGATE_CFNR  0x62
358 /* Service Masks */
359 #define SMASK_HOLD_RETRIEVE        0x00000001
360 #define SMASK_TERMINAL_PORTABILITY 0x00000002
361 #define SMASK_ECT                  0x00000004
362 #define SMASK_3PTY                 0x00000008
363 #define SMASK_CALL_FORWARDING      0x00000010
364 #define SMASK_CALL_DEFLECTION      0x00000020
365 #define SMASK_CCBS                 0x00000080
366 #define SMASK_MWI                  0x00000100
367 #define SMASK_CCNR                 0x00000200
368 #define SMASK_CONF                 0x00000400
369 /* ----------------------------------------------
370     Types of transfers used to transfer the
371     information in the 'struct RC->Reserved2[8]'
372     The information is transferred as 2 dwords
373     (2 4Byte unsigned values)
374     First of them is the transfer type.
375     2^32-1 possible messages are possible in this way.
376     The context of the second one had no meaning
377    ---------------------------------------------- */
378 #define DIVA_RC_TYPE_NONE              0x00000000
379 #define DIVA_RC_TYPE_REMOVE_COMPLETE   0x00000008
380 #define DIVA_RC_TYPE_STREAM_PTR        0x00000009
381 #define DIVA_RC_TYPE_CMA_PTR           0x0000000a
382 #define DIVA_RC_TYPE_OK_FC             0x0000000b
383 #define DIVA_RC_TYPE_RX_DMA            0x0000000c
384 /* ------------------------------------------------------
385       IO Control codes for IN BAND SIGNALING
386    ------------------------------------------------------ */
387 #define CTRL_L1_SET_SIG_ID        5
388 #define CTRL_L1_SET_DAD           6
389 #define CTRL_L1_RESOURCES         7
390 /* ------------------------------------------------------ */
391 /* ------------------------------------------------------
392       Layer 2 types
393    ------------------------------------------------------ */
394 #define X75T            1       /* x.75 for ttx                     */
395 #define TRF             2       /* transparent with hdlc framing    */
396 #define TRF_IN          3       /* transparent with hdlc fr. inc.   */
397 #define SDLC            4       /* sdlc, sna layer-2                */
398 #define X75             5       /* x.75 for btx                     */
399 #define LAPD            6       /* lapd (Q.921)                     */
400 #define X25_L2          7       /* x.25 layer-2                     */
401 #define V120_L2         8       /* V.120 layer-2 protocol           */
402 #define V42_IN          9       /* V.42 layer-2 protocol, incomming */
403 #define V42            10       /* V.42 layer-2 protocol            */
404 #define MDM_ATP        11       /* AT Parser built in the L2        */
405 #define X75_V42BIS     12       /* x.75 with V.42bis                */
406 #define RTPL2_IN       13       /* RTP layer-2 protocol, incomming  */
407 #define RTPL2          14       /* RTP layer-2 protocol             */
408 #define V120_V42BIS    15       /* V.120 asynchronous mode supporting V.42bis compression */
409 #define PIAFS_CRC      29       /* PIAFS Layer 2 with CRC calculation at L2 */
410 /* ------------------------------------------------------
411    PIAFS DLC DEFINITIONS
412    ------------------------------------------------------ */
413 #define PIAFS_64K            0x01
414 #define PIAFS_VARIABLE_SPEED 0x02
415 #define PIAFS_CHINESE_SPEED    0x04
416 #define PIAFS_UDATA_ABILITY_ID    0x80
417 #define PIAFS_UDATA_ABILITY_DCDON 0x01
418 #define PIAFS_UDATA_ABILITY_DDI   0x80
419 /*
420 DLC of PIAFS :
421 Byte | 8 7 6 5 4 3 2 1
422 -----+--------------------------------------------------------
423    0 | 0 0 1 0 0 0 0 0  Data Link Configuration
424    1 | X X X X X X X X  Length of IE (at least 15 Bytes)
425    2 | 0 0 0 0 0 0 0 0  max. information field, LOW  byte (not used, fix 73 Bytes)
426    3 | 0 0 0 0 0 0 0 0  max. information field, HIGH byte (not used, fix 73 Bytes)
427    4 | 0 0 0 0 0 0 0 0  address A (not used)
428    5 | 0 0 0 0 0 0 0 0  address B (not used)
429    6 | 0 0 0 0 0 0 0 0  Mode (not used, fix 128)
430    7 | 0 0 0 0 0 0 0 0  Window Size (not used, fix 127)
431    8 | X X X X X X X X  XID Length, Low Byte (at least 7 Bytes)
432    9 | X X X X X X X X  XID Length, High Byte
433   10 | 0 0 0 0 0 C V S  PIAFS Protocol Speed configuration -> Note(1)
434      |                  S = 0 -> Protocol Speed is 32K
435      |                  S = 1 -> Protocol Speed is 64K
436      |                  V = 0 -> Protocol Speed is fixed
437      |                  V = 1 -> Protocol Speed is variable
438      |                  C = 0 -> speed setting according to standard
439      |                  C = 1 -> speed setting for chinese implementation
440   11 | 0 0 0 0 0 0 R T  P0 - V42bis Compression enable/disable, Low Byte
441      |                  T = 0 -> Transmit Direction enable
442      |                  T = 1 -> Transmit Direction disable
443      |                  R = 0 -> Receive  Direction enable
444      |                  R = 1 -> Receive  Direction disable
445   13 | 0 0 0 0 0 0 0 0  P0 - V42bis Compression enable/disable, High Byte
446   14 | X X X X X X X X  P1 - V42bis Dictionary Size, Low Byte
447   15 | X X X X X X X X  P1 - V42bis Dictionary Size, High Byte
448   16 | X X X X X X X X  P2 - V42bis String Length, Low Byte
449   17 | X X X X X X X X  P2 - V42bis String Length, High Byte
450   18 | X X X X X X X X  PIAFS extension length
451   19 | 1 0 0 0 0 0 0 0  PIAFS extension Id (0x80) - UDATA abilities
452   20 | U 0 0 0 0 0 0 D  UDATA abilities -> Note (2)
453      |                  up to now the following Bits are defined:
454      |                  D - signal DCD ON
455      |                  U - use extensive UDATA control communication
456      |                      for DDI test application
457 + Note (1): ----------+------+-----------------------------------------+
458 | PIAFS Protocol      | Bit  |                                         |
459 | Speed configuration |    S | Bit 1 - Protocol Speed                  |
460 |                     |      |         0 - 32K                         |
461 |                     |      |         1 - 64K (default)               |
462 |                     |    V | Bit 2 - Variable Protocol Speed         |
463 |                     |      |         0 - Speed is fix                |
464 |                     |      |         1 - Speed is variable (default) |
465 |                     |      |             OVERWRITES 32k Bit 1        |
466 |                     |    C | Bit 3   0 - Speed Settings according to |
467 |                     |      |             PIAFS specification         |
468 |                     |      |         1 - Speed setting for chinese   |
469 |                     |      |             PIAFS implementation        |
470 |                     |      | Explanation for chinese speed settings: |
471 |                     |      |         if Bit 3 is set the following   |
472 |                     |      |         rules apply:                    |
473 |                     |      |         Bit1=0 Bit2=0: 32k fix          |
474 |                     |      |         Bit1=1 Bit2=0: 64k fix          |
475 |                     |      |         Bit1=0 Bit2=1: PIAFS is trying  |
476 |                     |      |             to negotiate 32k is that is |
477 |                     |      |             not possible it tries to    |
478 |                     |      |             negotiate 64k               |
479 |                     |      |         Bit1=1 Bit2=1: PIAFS is trying  |
480 |                     |      |             to negotiate 64k is that is |
481 |                     |      |             not possible it tries to    |
482 |                     |      |             negotiate 32k               |
483 + Note (2): ----------+------+-----------------------------------------+
484 | PIAFS               | Bit  | this byte defines the usage of UDATA    |
485 | Implementation      |      | control communication                   |
486 | UDATA usage         |    D | Bit 1 - DCD-ON signalling               |
487 |                     |      |         0 - no DCD-ON is signalled      |
488 |                     |      |             (default)                   |
489 |                     |      |         1 - DCD-ON will be signalled    |
490 |                     |    U | Bit 8 - DDI test application UDATA      |
491 |                     |      |         control communication           |
492 |                     |      |         0 - no UDATA control            |
493 |                     |      |             communication (default)     |
494 |                     |      |             sets as well the DCD-ON     |
495 |                     |      |             signalling                  |
496 |                     |      |         1 - UDATA control communication |
497 |                     |      |             ATTENTION: Do not use these |
498 |                     |      |                        setting if you   |
499 |                     |      |                        are not really   |
500 |                     |      |                        that you need it |
501 |                     |      |                        and you know     |
502 |                     |      |                        exactly what you |
503 |                     |      |                        are doing.       |
504 |                     |      |                        You can easily   |
505 |                     |      |                        disable any      |
506 |                     |      |                        data transfer.   |
507 +---------------------+------+-----------------------------------------+
508 */
509 /*------------------------------------------------------------------*/
510 /* CAPI-like profile to indicate features on LAW_REQ                */
511 /*------------------------------------------------------------------*/
512 #define GL_INTERNAL_CONTROLLER_SUPPORTED     0x00000001L
513 #define GL_EXTERNAL_EQUIPMENT_SUPPORTED      0x00000002L
514 #define GL_HANDSET_SUPPORTED                 0x00000004L
515 #define GL_DTMF_SUPPORTED                    0x00000008L
516 #define GL_SUPPLEMENTARY_SERVICES_SUPPORTED  0x00000010L
517 #define GL_CHANNEL_ALLOCATION_SUPPORTED      0x00000020L
518 #define GL_BCHANNEL_OPERATION_SUPPORTED      0x00000040L
519 #define GL_LINE_INTERCONNECT_SUPPORTED       0x00000080L
520 #define B1_HDLC_SUPPORTED                    0x00000001L
521 #define B1_TRANSPARENT_SUPPORTED             0x00000002L
522 #define B1_V110_ASYNC_SUPPORTED              0x00000004L
523 #define B1_V110_SYNC_SUPPORTED               0x00000008L
524 #define B1_T30_SUPPORTED                     0x00000010L
525 #define B1_HDLC_INVERTED_SUPPORTED           0x00000020L
526 #define B1_TRANSPARENT_R_SUPPORTED           0x00000040L
527 #define B1_MODEM_ALL_NEGOTIATE_SUPPORTED     0x00000080L
528 #define B1_MODEM_ASYNC_SUPPORTED             0x00000100L
529 #define B1_MODEM_SYNC_HDLC_SUPPORTED         0x00000200L
530 #define B2_X75_SUPPORTED                     0x00000001L
531 #define B2_TRANSPARENT_SUPPORTED             0x00000002L
532 #define B2_SDLC_SUPPORTED                    0x00000004L
533 #define B2_LAPD_SUPPORTED                    0x00000008L
534 #define B2_T30_SUPPORTED                     0x00000010L
535 #define B2_PPP_SUPPORTED                     0x00000020L
536 #define B2_TRANSPARENT_NO_CRC_SUPPORTED      0x00000040L
537 #define B2_MODEM_EC_COMPRESSION_SUPPORTED    0x00000080L
538 #define B2_X75_V42BIS_SUPPORTED              0x00000100L
539 #define B2_V120_ASYNC_SUPPORTED              0x00000200L
540 #define B2_V120_ASYNC_V42BIS_SUPPORTED       0x00000400L
541 #define B2_V120_BIT_TRANSPARENT_SUPPORTED    0x00000800L
542 #define B2_LAPD_FREE_SAPI_SEL_SUPPORTED      0x00001000L
543 #define B3_TRANSPARENT_SUPPORTED             0x00000001L
544 #define B3_T90NL_SUPPORTED                   0x00000002L
545 #define B3_ISO8208_SUPPORTED                 0x00000004L
546 #define B3_X25_DCE_SUPPORTED                 0x00000008L
547 #define B3_T30_SUPPORTED                     0x00000010L
548 #define B3_T30_WITH_EXTENSIONS_SUPPORTED     0x00000020L
549 #define B3_RESERVED_SUPPORTED                0x00000040L
550 #define B3_MODEM_SUPPORTED                   0x00000080L
551 #define MANUFACTURER_FEATURE_SLAVE_CODEC          0x00000001L
552 #define MANUFACTURER_FEATURE_FAX_MORE_DOCUMENTS   0x00000002L
553 #define MANUFACTURER_FEATURE_HARDDTMF             0x00000004L
554 #define MANUFACTURER_FEATURE_SOFTDTMF_SEND        0x00000008L
555 #define MANUFACTURER_FEATURE_DTMF_PARAMETERS      0x00000010L
556 #define MANUFACTURER_FEATURE_SOFTDTMF_RECEIVE     0x00000020L
557 #define MANUFACTURER_FEATURE_FAX_SUB_SEP_PWD      0x00000040L
558 #define MANUFACTURER_FEATURE_V18                  0x00000080L
559 #define MANUFACTURER_FEATURE_MIXER_CH_CH          0x00000100L
560 #define MANUFACTURER_FEATURE_MIXER_CH_PC          0x00000200L
561 #define MANUFACTURER_FEATURE_MIXER_PC_CH          0x00000400L
562 #define MANUFACTURER_FEATURE_MIXER_PC_PC          0x00000800L
563 #define MANUFACTURER_FEATURE_ECHO_CANCELLER       0x00001000L
564 #define MANUFACTURER_FEATURE_RTP                  0x00002000L
565 #define MANUFACTURER_FEATURE_T38                  0x00004000L
566 #define MANUFACTURER_FEATURE_TRANSP_DELIVERY_CONF 0x00008000L
567 #define MANUFACTURER_FEATURE_XONOFF_FLOW_CONTROL  0x00010000L
568 #define MANUFACTURER_FEATURE_OOB_CHANNEL          0x00020000L
569 #define MANUFACTURER_FEATURE_IN_BAND_CHANNEL      0x00040000L
570 #define MANUFACTURER_FEATURE_IN_BAND_FEATURE      0x00080000L
571 #define MANUFACTURER_FEATURE_PIAFS                0x00100000L
572 #define MANUFACTURER_FEATURE_DTMF_TONE            0x00200000L
573 #define MANUFACTURER_FEATURE_FAX_PAPER_FORMATS    0x00400000L
574 #define MANUFACTURER_FEATURE_OK_FC_LABEL          0x00800000L
575 #define MANUFACTURER_FEATURE_VOWN                 0x01000000L
576 #define MANUFACTURER_FEATURE_XCONNECT             0x02000000L
577 #define MANUFACTURER_FEATURE_DMACONNECT           0x04000000L
578 #define MANUFACTURER_FEATURE_AUDIO_TAP            0x08000000L
579 #define MANUFACTURER_FEATURE_FAX_NONSTANDARD      0x10000000L
580 #define RTP_PRIM_PAYLOAD_PCMU_8000     0
581 #define RTP_PRIM_PAYLOAD_1016_8000     1
582 #define RTP_PRIM_PAYLOAD_G726_32_8000  2
583 #define RTP_PRIM_PAYLOAD_GSM_8000      3
584 #define RTP_PRIM_PAYLOAD_G723_8000     4
585 #define RTP_PRIM_PAYLOAD_DVI4_8000     5
586 #define RTP_PRIM_PAYLOAD_DVI4_16000    6
587 #define RTP_PRIM_PAYLOAD_LPC_8000      7
588 #define RTP_PRIM_PAYLOAD_PCMA_8000     8
589 #define RTP_PRIM_PAYLOAD_G722_16000    9
590 #define RTP_PRIM_PAYLOAD_QCELP_8000    12
591 #define RTP_PRIM_PAYLOAD_G728_8000     14
592 #define RTP_PRIM_PAYLOAD_G729_8000     18
593 #define RTP_PRIM_PAYLOAD_GSM_HR_8000   30
594 #define RTP_PRIM_PAYLOAD_GSM_EFR_8000  31
595 #define RTP_ADD_PAYLOAD_BASE           32
596 #define RTP_ADD_PAYLOAD_RED            32
597 #define RTP_ADD_PAYLOAD_CN_8000        33
598 #define RTP_ADD_PAYLOAD_DTMF           34
599 #define RTP_PRIM_PAYLOAD_PCMU_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_PCMU_8000)
600 #define RTP_PRIM_PAYLOAD_1016_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_1016_8000)
601 #define RTP_PRIM_PAYLOAD_G726_32_8000_SUPPORTED  (1L << RTP_PRIM_PAYLOAD_G726_32_8000)
602 #define RTP_PRIM_PAYLOAD_GSM_8000_SUPPORTED      (1L << RTP_PRIM_PAYLOAD_GSM_8000)
603 #define RTP_PRIM_PAYLOAD_G723_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_G723_8000)
604 #define RTP_PRIM_PAYLOAD_DVI4_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_DVI4_8000)
605 #define RTP_PRIM_PAYLOAD_DVI4_16000_SUPPORTED    (1L << RTP_PRIM_PAYLOAD_DVI4_16000)
606 #define RTP_PRIM_PAYLOAD_LPC_8000_SUPPORTED      (1L << RTP_PRIM_PAYLOAD_LPC_8000)
607 #define RTP_PRIM_PAYLOAD_PCMA_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_PCMA_8000)
608 #define RTP_PRIM_PAYLOAD_G722_16000_SUPPORTED    (1L << RTP_PRIM_PAYLOAD_G722_16000)
609 #define RTP_PRIM_PAYLOAD_QCELP_8000_SUPPORTED    (1L << RTP_PRIM_PAYLOAD_QCELP_8000)
610 #define RTP_PRIM_PAYLOAD_G728_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_G728_8000)
611 #define RTP_PRIM_PAYLOAD_G729_8000_SUPPORTED     (1L << RTP_PRIM_PAYLOAD_G729_8000)
612 #define RTP_PRIM_PAYLOAD_GSM_HR_8000_SUPPORTED   (1L << RTP_PRIM_PAYLOAD_GSM_HR_8000)
613 #define RTP_PRIM_PAYLOAD_GSM_EFR_8000_SUPPORTED  (1L << RTP_PRIM_PAYLOAD_GSM_EFR_8000)
614 #define RTP_ADD_PAYLOAD_RED_SUPPORTED            (1L << (RTP_ADD_PAYLOAD_RED - RTP_ADD_PAYLOAD_BASE))
615 #define RTP_ADD_PAYLOAD_CN_8000_SUPPORTED        (1L << (RTP_ADD_PAYLOAD_CN_8000 - RTP_ADD_PAYLOAD_BASE))
616 #define RTP_ADD_PAYLOAD_DTMF_SUPPORTED           (1L << (RTP_ADD_PAYLOAD_DTMF - RTP_ADD_PAYLOAD_BASE))
617 /* virtual switching definitions */
618 #define VSJOIN         1
619 #define VSTRANSPORT    2
620 #define VSGETPARAMS    3
621 #define VSCAD          1
622 #define VSRXCPNAME     2
623 #define VSCALLSTAT     3
624 #define VSINVOKEID    4
625 #define VSCLMRKS       5
626 #define VSTBCTIDENT    6
627 /* -----------------------------------------------------------**
628 ** The PROTOCOL_FEATURE_STRING in feature.h (included         **
629 ** in prstart.sx and astart.sx) defines capabilities and      **
630 ** features of the actual protocol code. It's used as a bit   **
631 ** mask.                                                      **
632 ** The following Bits are defined:                            **
633 ** -----------------------------------------------------------*/
634 #define PROTCAP_TELINDUS  0x0001  /* Telindus Variant of protocol code   */
635 #define PROTCAP_MAN_IF    0x0002  /* Management interface implemented    */
636 #define PROTCAP_V_42      0x0004  /* V42 implemented                     */
637 #define PROTCAP_V90D      0x0008  /* V.90D (implies up to 384k DSP code) */
638 #define PROTCAP_EXTD_FAX  0x0010  /* Extended FAX (ECM, 2D, T6, Polling) */
639 #define PROTCAP_EXTD_RXFC 0x0020  /* RxFC (Extd Flow Control), OOB Chnl  */
640 #define PROTCAP_VOIP      0x0040  /* VoIP (implies up to 512k DSP code)  */
641 #define PROTCAP_CMA_ALLPR 0x0080  /* CMA support for all NL primitives   */
642 #define PROTCAP_FREE8     0x0100  /* not used                            */
643 #define PROTCAP_FREE9     0x0200  /* not used                            */
644 #define PROTCAP_FREE10    0x0400  /* not used                            */
645 #define PROTCAP_FREE11    0x0800  /* not used                            */
646 #define PROTCAP_FREE12    0x1000  /* not used                            */
647 #define PROTCAP_FREE13    0x2000  /* not used                            */
648 #define PROTCAP_FREE14    0x4000  /* not used                            */
649 #define PROTCAP_EXTENSION 0x8000  /* used for future extentions          */
650 #else
651 #endif /* PC_H_INCLUDED  } */