1 /******************************************************************************
2 
3   FileName:         Q931ie.h
4 
5   Contents:         Header and definition for the ITU-T Q.931 ie
6 					structures and functions
7 
8   License/Copyright:
9 
10   Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved.
11   email:janvb@caselaboratories.com
12 
13   Redistribution and use in source and binary forms, with or without
14   modification, are permitted provided that the following conditions are
15   met:
16 
17     * Redistributions of source code must retain the above copyright notice,
18 	  this list of conditions and the following disclaimer.
19     * Redistributions in binary form must reproduce the above copyright notice,
20 	  this list of conditions and the following disclaimer in the documentation
21 	  and/or other materials provided with the distribution.
22     * Neither the name of the Case Labs, Ltd nor the names of its contributors
23 	  may be used to endorse or promote products derived from this software
24 	  without specific prior written permission.
25 
26   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36   POSSIBILITY OF SUCH DAMAGE.
37 ******************************************************************************/
38 
39 #ifndef _Q931IE_NL
40 #define _Q931IE_NL
41 
42 /* Codesets */
43 
44 typedef enum {
45 
46 	Q931_CODESET_0			= ( 0 ),
47 	Q931_CODESET_1			= ( 1 << 8 ),
48 	Q931_CODESET_2			= ( 2 << 8 ),
49 	Q931_CODESET_3			= ( 3 << 8 ),
50 	Q931_CODESET_4			= ( 4 << 8 ),
51 	Q931_CODESET_5			= ( 5 << 8 ),
52 	Q931_CODESET_6			= ( 6 << 8 ),
53 	Q931_CODESET_7			= ( 7 << 8 )
54 
55 } q931_codeset_t;
56 
57 /* Single octet information elements */
58 #define Q931ie_SHIFT                            0x90 /* 1001 ----       */
59 #define Q931ie_MORE_DATA                        0xa0 /* 1010 ----       */
60 #define Q931ie_SENDING_COMPLETE                 0xa1 /* 1010 0001       */
61 #define Q931ie_CONGESTION_LEVEL                 0xb0 /* 1011 ----       */
62 #define Q931ie_REPEAT_INDICATOR                 0xd0 /* 1101 ----       */
63 
64 /* Variable Length Information Elements */
65 #define Q931ie_SEGMENTED_MESSAGE                0x00 /* 0000 0000       */
66 #define Q931ie_CHANGE_STATUS                    0x01 /* 0000 0001       */
67 #define Q931ie_BEARER_CAPABILITY                0x04 /* 0000 0100       */
68 #define Q931ie_CAUSE                            0x08 /* 0000 1000       */
69 #define Q931ie_CALL_IDENTITY                    0x10 /* 0001 0000       */
70 #define Q931ie_CALL_STATE                       0x14 /* 0001 0100       */
71 #define Q931ie_CHANNEL_IDENTIFICATION           0x18 /* 0001 1000       */
72 #define Q931ie_PROGRESS_INDICATOR               0x1e /* 0001 1110       */
73 #define Q931ie_NETWORK_SPECIFIC_FACILITIES      0x20 /* 0010 0000       */
74 #define Q931ie_NOTIFICATION_INDICATOR           0x27 /* 0010 0111       */
75 #define Q931ie_DISPLAY                          0x28 /* 0010 1000       */
76 #define Q931ie_DATETIME                         0x29 /* 0010 1001       */
77 #define Q931ie_KEYPAD_FACILITY                  0x2c /* 0010 1100       */
78 #define Q931ie_SIGNAL                           0x34 /* 0011 0100       */
79 #define Q931ie_SWITCHOOK                        0x36 /* 0011 0110       */
80 #define Q931ie_FEATURE_ACTIVATION               0x38 /* 0011 1000       */
81 #define Q931ie_FEATURE_INDICATION               0x39 /* 0011 1001       */
82 #define Q931ie_INFORMATION_RATE                 0x40 /* 0100 0000       */
83 #define Q931ie_END_TO_END_TRANSIT_DELAY         0x42 /* 0100 0010       */
84 #define Q931ie_TRANSIT_DELAY_SELECTION_AND_IND  0x43 /* 0100 0011       */
85 #define Q931ie_PACKED_LAYER_BIMARY_PARAMETERS   0x44 /* 0100 0100       */
86 #define Q931ie_PACKED_LAYER_WINDOW_SIZE         0x45 /* 0100 0101       */
87 #define Q931ie_PACKED_SIZE                      0x46 /* 0100 0110       */
88 #define Q931ie_CALLING_PARTY_NUMBER             0x6c /* 0110 1100       */
89 #define Q931ie_CALLING_PARTY_SUBADDRESS         0x6d /* 0110 1101       */
90 #define Q931ie_CALLED_PARTY_NUMBER              0x70 /* 0111 0000       */
91 #define Q931ie_CALLED_PARTY_SUBADDRESS          0x71 /* 0111 0001       */
92 #define Q931ie_REDIRECTING_NUMBER               0x74 /* 0111 0100       */
93 #define Q931ie_TRANSIT_NETWORK_SELECTION        0x78 /* 0111 1000       */
94 #define Q931ie_RESTART_INDICATOR                0x79 /* 0111 1001       */
95 #define Q931ie_LOW_LAYER_COMPATIBILITY          0x7c /* 0111 1100       */
96 #define Q931ie_HIGH_LAYER_COMPATIBILITY         0x7d /* 0111 1101       */
97 #define Q931ie_USER_USER                        0x7e /* 0111 1110       */
98 #define Q931ie_ESCAPE_FOR_EX                    0x7f /* 0111 1111       */
99 
100 /* Variable Length Codeset 6 Information Elements */
101 #define Q931ie_GENERIC_DIGITS                   0x37 /* 0011 0111       */
102 
103 /* Variable Length Information Element to shut up BRI testing */
104 #define Q931ie_CONNECTED_NUMBER                 0x4c /* 0100 1101 */
105 #define Q931ie_FACILITY                         0x1c /* 0001 1101 */
106 
107 
108 /*****************************************************************************
109 
110   Struct:        Q931ie_BearerCap
111 
112   Description:   Bearer Capability Information Element.
113 
114 *****************************************************************************/
115 
116 typedef struct {
117 
118     L3UCHAR IEId;                   /* 00000100 for Bearer Capability       */
119     L3UCHAR Size;                   /* Length of Information Element        */
120 
121     L3UCHAR CodStand;               /* Coding Standard.                     */
122                                     /*  00 - ITU-T                          */
123                                     /*  01 - ISO/IEC                        */
124                                     /*  10 - National standard              */
125                                     /*  11 - Network side spesific          */
126 
127     L3UCHAR ITC;                    /* Information Transfer Capability      */
128                                     /*  00000 - Speech                      */
129                                     /*  01000 - Unrestricted digital info   */
130                                     /*  01001 - Restricted digital info     */
131                                     /*  10000 - 3.1 kHz audio               */
132                                     /*  10001 - Unrestricted with tones     */
133                                     /*  11000 - Video                       */
134 
135     L3UCHAR TransMode;              /* Transfer Mode.                       */
136                                     /*  00 - Circuit mode                   */
137                                     /*  10 - Packet mode                    */
138 
139     L3UCHAR ITR;                    /* Information Transfer Rate.           */
140                                     /*  00000 - Packed mode                 */
141                                     /*  10000 - 64 kbit/s                   */
142                                     /*  10001 - 2 x 64 kbit/s               */
143                                     /*  10011 - 384 kbit/s                  */
144                                     /*  10101 - 1536 kbit/s                 */
145                                     /*  10111 - 1920 kbit/s                 */
146                                     /*  11000 - Multirat (64 kbit/s base)   */
147 
148     L3UCHAR RateMul;                /* Rate Multiplier                      */
149 
150     L3UCHAR Layer1Ident;			/* Layer 1 Ident.						*/
151 
152     L3UCHAR UIL1Prot;               /* User Information Layer 1 Protocol    */
153 									/*	00001 : ITU-T V.110, I.460 and X.30 */
154 									/*  00010 : G.711 my-law				*/
155 									/*  00011 : G.711 A-law					*/
156 									/*  00100 : G.721						*/
157                                     /*  00101 : H.221 and H.242				*/
158 									/*  00110 : H.223 and H.245				*/
159 									/*  00111 : Non ITU-T Standard			*/
160 									/*  01000 : ITU-T V.120					*/
161 									/*  01001 : ITU-T X.31 HDLC flag stuff.	*/
162 
163     L3UCHAR SyncAsync;              /* Sync/Async                           */
164 									/*	0 : Syncronous data					*/
165 									/*	1 : Asyncronous data				*/
166 
167     L3UCHAR Negot;					/* Negotiation							*/
168 									/*	0 : In-band negotiation not possib.	*/
169 									/*  1 : In-band negotiation possible	*/
170 
171     L3UCHAR UserRate;				/* User rate							*/
172 									/*	00000 : I.460, V.110, X,30			*/
173 									/*  00001 : 0.6 kbit/s x.1				*/
174 									/*  00010 : 1.2 kbit/s					*/
175 									/*  00011 : 2.4 kbit/s					*/
176 									/*  00100 : 3.6 kbit/s					*/
177 									/*  00101 : 4.8 kbit/s					*/
178 									/*  00110 : 7.2 kbit/s					*/
179 									/*  00111 : 8 kbit/s I.460				*/
180 									/*  01000 : 9.6 kbit/s					*/
181 									/*  01001 : 14.4 kbit/s					*/
182 									/*  01010 : 16 kbit/s					*/
183 									/*  01011 :	19.2 kbit/s					*/
184 									/*  01100 : 32 kbit/s					*/
185 									/*  01101 : 38.4 kbit/s					*/
186 									/*  01110 : 48 kbit/s					*/
187 									/*  01111 : 56 kbit/s					*/
188 									/*  10000 : 57.6 kbit/s					*/
189 									/*  10010 : 28.8 kbit/s					*/
190 									/*  10100 : 24 kbit/s					*/
191 									/*  10101 : 0.1345 kbit/s				*/
192 									/*  10110 : 0.100 kbit/s				*/
193 									/*  10111 : 0.075/1.2 kbit/s			*/
194 									/*  11000 : 1.2/0.075/kbit/s			*/
195 									/*  11001 : 0.050 kbit/s				*/
196 									/*  11010 : 0.075 kbit/s				*/
197 									/*  11011 : 0.110 kbit/s				*/
198 									/*  11100 : 0.150 kbit/s				*/
199 									/*  11101 : 0.200 kbit/s				*/
200 									/*  11110 : 0.300 kbit/s				*/
201 									/*  11111 : 12 kbit/s					*/
202 
203     L3UCHAR InterRate;              /* Intermediate Rate                    */
204 									/*	00 : Not used						*/
205 									/*  01 : 8 kbit/s						*/
206 									/*  10 : 16 kbit/s						*/
207 									/*  11 : 32 kbit/s						*/
208 
209     L3UCHAR NIConTx;				/* Network Indepentend Clock on transmit*/
210 									/*	0 : Not required to send data  clc  */
211 									/*  1 : Send data w/NIC clc				*/
212 
213     L3UCHAR NIConRx;				/* NIC on Rx							*/
214 									/*	0 : Cannot accept indep. clc		*/
215 									/*  1 : data with indep. clc accepted	*/
216 
217     L3UCHAR FlowCtlTx;              /* Flow control on Tx                   */
218 									/*  0 : Send Flow ctrl not required		*/
219 									/*  1 : Send flow ctrl required			*/
220 
221     L3UCHAR FlowCtlRx;              /* Flow control on Rx                   */
222 									/*  0 : cannot use receive flow ctrl	*/
223 									/*  1 : Receive flow ctrl accepted		*/
224     L3UCHAR HDR;					/* HDR/No HDR							*/
225     L3UCHAR MultiFrame;             /* Multi frame support                  */
226 									/*  0 : multiframe not supported		*/
227 									/*  1 : multiframe supported			*/
228 
229     L3UCHAR Mode;					/* Mode of operation					*/
230 									/*	0 : bit transparent mode of operat.	*/
231 									/*	1 : protocol sesitive mode of op.	*/
232 
233     L3UCHAR LLInegot;				/* Logical link id negotiation (oct. 5b)*/
234 									/*  0 : default LLI=256 only			*/
235 									/*  1 : Full protocol negotiation		*/
236 
237     L3UCHAR Assignor;               /* Assignor/assignee                    */
238 									/*  0 : Default Asignee					*/
239 									/*  1 : Assignor only					*/
240 
241     L3UCHAR InBandNeg;              /* In-band/out-band negot.              */
242 									/*  0 : negot done w/ USER INFO mes		*/
243 									/*  1 : negot done in-band w/link zero	*/
244 
245     L3UCHAR NumStopBits;            /* Number of stop bits					*/
246 									/*  00 : Not used						*/
247 									/*  01 : 1 bit							*/
248 									/*  10 : 1.5 bits						*/
249 									/*  11 : 2 bits							*/
250 
251     L3UCHAR NumDataBits;            /* Number of data bits.                 */
252 									/*  00 : not used						*/
253 									/*  01 : 5 bits							*/
254 									/*  10 : 7 bits							*/
255 									/*  11 : 8 bits							*/
256 
257     L3UCHAR Parity;					/* Parity Information					*/
258 									/*	000 : Odd							*/
259 									/*  010 : Even							*/
260 									/*  011 : None							*/
261 									/*  100 : Forced to 0					*/
262 									/*  101 : Forced to 1					*/
263 
264     L3UCHAR DuplexMode;				/* Mode duplex							*/
265 									/*  0 : Half duplex						*/
266 									/*  1 : Full duplex						*/
267 
268     L3UCHAR ModemType;				/* Modem type, see Q.931 p 64			*/
269 
270     L3UCHAR Layer2Ident;			/* Layer 2 Ident						*/
271 
272     L3UCHAR UIL2Prot;               /* User Information Layer 2 Protocol    */
273 									/*	00010 : Q.921/I.441					*/
274 									/*  00110 : X.25						*/
275 									/*  01100 : LAN logical link			*/
276 
277     L3UCHAR Layer3Ident;            /* Layer 3 ident.						*/
278 
279     L3UCHAR UIL3Prot;               /* User Information Layer 3 Protocol    */
280 									/*	00010 : Q.931						*/
281 									/*  00110 : X.25						*/
282 									/*  01011 : ISO/IEC TR 9577				*/
283 
284     L3UCHAR AL3Info1;				/* additional layer 3 info 1			*/
285 
286     L3UCHAR AL3Info2;				/* additional layer 3 info 2			*/
287 
288 } Q931ie_BearerCap;
289 
290 /*****************************************************************************
291 
292   Struct:       Q931ie_CallID
293 
294 
295 *****************************************************************************/
296 
297 typedef struct {
298 
299     L3UCHAR IEId;                   /* 00010000                             */
300     L3UCHAR Size;                   /* Length of Information Element        */
301     L3UCHAR CallId[1];				/* Call identity                        */
302 
303 } Q931ie_CallID;
304 
305 /*****************************************************************************
306 
307   Struct:       Q931ie_CallState
308 
309 
310 *****************************************************************************/
311 
312 typedef struct {
313 
314     L3UCHAR IEId;                   /* 00010100                             */
315     L3UCHAR Size;                   /* Length of Information Element        */
316     L3UCHAR CodStand;               /* Coding Standard                      */
317     L3UCHAR CallState;              /* Call State Value                     */
318 
319 } Q931ie_CallState;
320 
321 /*****************************************************************************
322 
323   Struct:		Q931ie_Cause
324 
325   Description:	Cause IE as described in Q.850
326 
327 *****************************************************************************/
328 typedef struct {
329 
330     L3UCHAR IEId;                   /* 00010100                             */
331     L3UCHAR Size;                   /* Length of Information Element        */
332     L3UCHAR CodStand;               /* Coding Standard                      */
333 	L3UCHAR Location;				/* Location								*/
334 	L3UCHAR Recom;					/* Recommendation						*/
335 	L3UCHAR Value;					/* Cause Value							*/
336 	L3UCHAR	Diag[1];				/* Optional Diagnostics Field			*/
337 
338 } Q931ie_Cause;
339 
340 /*****************************************************************************
341 
342   Struct:        Q931ie_CalledNum
343 
344 *****************************************************************************/
345 typedef struct {
346 
347     L3UCHAR IEId;                   /* 01110000                             */
348     L3UCHAR Size;                   /* Length of Information Element        */
349     L3UCHAR TypNum;                 /* Type of Number                       */
350     L3UCHAR NumPlanID;              /* Numbering plan identification        */
351     L3UCHAR Digit[1];				/* Digit (IA5)                          */
352 
353 } Q931ie_CalledNum;
354 
355 /*****************************************************************************
356 
357   Struct:       Q931ie_CalledSub
358 
359   Description:  Called party subaddress
360 
361 *****************************************************************************/
362 
363 typedef struct {
364 
365     L3UCHAR IEId;                   /* 01110001                             */
366     L3UCHAR Size;                   /* Length of Information Element        */
367     L3UCHAR TypNum;                 /* Type of subaddress                   */
368     L3UCHAR OddEvenInd;             /* Odd/Even indicator                   */
369     L3UCHAR Digit[1];				/* digits                               */
370 
371 } Q931ie_CalledSub;
372 
373 /*****************************************************************************
374 
375   Struct:       Q931ie_CallingNum
376 
377   Description:  Calling party number
378 
379 *****************************************************************************/
380 
381 typedef struct {
382 
383     L3UCHAR IEId;                   /* 01101100                             */
384     L3UCHAR Size;                   /* Length of Information Element        */
385     L3UCHAR TypNum;                 /* Type of number                       */
386     L3UCHAR NumPlanID;              /* Numbering plan identification        */
387     L3UCHAR PresInd;                /* Presentation indicator               */
388     L3UCHAR ScreenInd;              /* Screening indicator                  */
389     L3UCHAR Digit[1];				/* Number digits (IA5)                  */
390 
391 } Q931ie_CallingNum;
392 
393 /*****************************************************************************
394 
395   Struct:        Q931ie_CallingSub
396 
397   Description:   Calling party subaddress
398 
399 *****************************************************************************/
400 
401 typedef struct {
402 
403     L3UCHAR IEId;                   /* 01101101                             */
404     L3UCHAR Size;                   /* Length of Information Element        */
405     L3UCHAR TypNum;                 /* Type of subaddress                   */
406     L3UCHAR OddEvenInd;             /* Odd/Even indicator                   */
407     L3UCHAR Digit[1];				/* digits                               */
408 
409 } Q931ie_CallingSub;
410 
411 /*****************************************************************************
412 
413   Struct:       Q931ie_ChanID
414 
415   Description:  Channel identification
416 
417 				Channel Identificationis one of the IE elements that differ
418 				between BRI and PRI. IntType = 1 = BRI and ChanSlot is used
419 				for channel number, while InfoChanSel is used for BRI.
420 
421 				ChanID is one of the most important IE as it is passed
422 				either though SETUP or CALL PROCEEDING to select the channel
423 				to be used.
424 
425 *****************************************************************************/
426 
427 typedef struct {
428 
429     L3UCHAR IEId;                   /* 00011000                             */
430     L3UCHAR Size;                   /* Length of Information Element        */
431     L3UCHAR IntIDPresent;           /* Int. id. present                     */
432     L3UCHAR IntType;                /* Interface Type                       */
433 									/*	0 : Basic Interface	(BRI)			*/
434 									/*  1 : Other interfaces, PRI etc.		*/
435 
436     L3UCHAR PrefExcl;               /* Pref./Excl.                          */
437 									/*	0 : Indicated channel is preffered	*/
438 									/*  1 : Exclusive, no other accepted	*/
439 
440     L3UCHAR DChanInd;               /* D-channel ind.                       */
441 									/*  0 : chan is NOT D chan.				*/
442 									/*  1 : chan is D chan					*/
443 
444     L3UCHAR InfoChanSel;            /* Info. channel selection              */
445 									/*  00 : No channel						*/
446 									/*  01 : B1 channel						*/
447 									/*  10 : B2 channel						*/
448 									/*  11 : Any channel					*/
449 
450     L3UCHAR InterfaceID;            /* Interface identifier                 */
451 
452     L3UCHAR CodStand;		        /* Code standard                        */
453 									/*  00 : ITU-T standardization coding	*/
454 									/*  01 : ISO/IEC Standard				*/
455 									/*  10 : National Standard				*/
456 									/*  11 : Standard def. by network.		*/
457 
458     L3UCHAR NumMap;                 /* Number/Map                           */
459 									/*  0 : chan is in following octet		*/
460 									/*  1 : chan is indicated by slot map	*/
461 
462     L3UCHAR ChanMapType;            /* Channel type/Map element type        */
463 									/*  0011 : B Channel units				*/
464 									/*  0110 : H0 channel units				*/
465 									/*  1000 : H11 channel units			*/
466 									/*  1001 : H12 channel units			*/
467 
468     L3UCHAR ChanSlot;               /* Channel number						*/
469 
470 } Q931ie_ChanID;
471 
472 /*****************************************************************************
473 
474   Struct:       Q931ie_DateTime
475 
476   Description:  Date/time
477 
478 *****************************************************************************/
479 
480 typedef struct {
481 
482     L3UCHAR IEId;                   /* 00101001                             */
483     L3UCHAR Size;                   /* Length of Information Element        */
484     L3UCHAR Year;                   /* Year                                 */
485     L3UCHAR Month;                  /* Month                                */
486     L3UCHAR Day;                    /* Day                                  */
487     L3UCHAR Hour;                   /* Hour                                 */
488     L3UCHAR Minute;                 /* Minute                               */
489     L3UCHAR Second;                 /* Second                               */
490 	L3UCHAR Format;					/* Indicate presense of Hour, Min & sec */
491 									/*	0 : Only Date						*/
492 									/*  1 : Hour present					*/
493 									/*  2 : Hour and Minute present			*/
494 									/*  3 : Hour, Minute and Second present	*/
495 } Q931ie_DateTime;
496 
497 /*****************************************************************************
498 
499   Struct:       Q931ie_Display
500 
501   Description:  Display
502 
503 *****************************************************************************/
504 
505 typedef struct {
506 
507     L3UCHAR IEId;                   /* 00101000                             */
508     L3UCHAR Size;                   /* Length of Information Element        */
509     L3UCHAR Display[1];             /* Display information (IA5)            */
510 
511 } Q931ie_Display;
512 
513 /*****************************************************************************
514 
515   Struct:       Q931ie_HLComp
516 
517   Description:  High layer compatibility
518 
519 *****************************************************************************/
520 
521 typedef struct {
522 
523     L3UCHAR IEId;                   /* 01111101                             */
524     L3UCHAR Size;                   /* Length of Information Element        */
525     L3UCHAR CodStand;               /* Coding standard                      */
526     L3UCHAR Interpret;              /* Interpretation                       */
527     L3UCHAR PresMeth;               /* Presentation methor of prot. profile */
528     L3UCHAR HLCharID;               /* High layer characteristics id.       */
529     L3UCHAR EHLCharID;              /* Extended high layer character. id.   */
530     L3UCHAR EVideoTlfCharID;        /* Ext. videotelephony char. id.        */
531 
532 } Q931ie_HLComp;
533 
534 /*****************************************************************************
535 
536   Struct:       Q931ie_KeypadFac
537 
538   Description:  Keypad facility
539 
540 *****************************************************************************/
541 
542 typedef struct {
543     L3UCHAR IEId;                   /* 00101100                             */
544     L3UCHAR Size;                   /* Length of Information Element        */
545     L3UCHAR KeypadFac[1];           /* dynamic buffer                       */
546 
547 } Q931ie_KeypadFac;
548 
549 /*****************************************************************************
550 
551   Struct:       Q931ie_LLComp
552 
553   Description:  Low layer compatibility
554 
555 *****************************************************************************/
556 
557 typedef struct {
558 
559     L3UCHAR IEId;                   /* 01111100                             */
560     L3UCHAR Size;                   /* Length of Information Element        */
561     L3UCHAR CodStand;               /* Coding standard                      */
562                                     /*  00 - ITU-T                          */
563                                     /*  01 - ISO/IEC                        */
564                                     /*  10 - National standard              */
565                                     /*  11 - Network side spesific          */
566 
567     L3UCHAR ITransCap;              /* Information transfer capability      */
568                                     /*  00000 - Speech                      */
569                                     /*  01000 - Unrestricted digital info   */
570                                     /*  01001 - Restricted digital info     */
571                                     /*  10000 - 3.1 kHz audio               */
572                                     /*  10001 - Unrestricted with tones     */
573                                     /*  11000 - Video                       */
574 
575     L3UCHAR NegotInd;               /* Negot indic.                         */
576 									/*	0 : Out-band neg. not possib.       */
577 									/*  1 : Out-band neg. possible	        */
578 
579     L3UCHAR TransMode;              /* Transfer Mode                        */
580                                     /*  00 : Circuit Mode                   */
581                                     /*  10 : Packed Mode                    */
582 
583     L3UCHAR InfoRate;               /* Information transfer rate            */
584                                     /*  00000 - Packed mode                 */
585                                     /*  10000 - 64 kbit/s                   */
586                                     /*  10001 - 2 x 64 kbit/s               */
587                                     /*  10011 - 384 kbit/s                  */
588                                     /*  10101 - 1536 kbit/s                 */
589                                     /*  10111 - 1920 kbit/s                 */
590                                     /*  11000 - Multirat (64 kbit/s base)   */
591 
592     L3UCHAR RateMul;                /* Rate multiplier                      */
593     L3UCHAR Layer1Ident;            /* Layer 1 ident.                       */
594     L3UCHAR UIL1Prot;               /* User information layer 1 protocol    */
595 									/*	00001 : ITU-T V.110, I.460 and X.30 */
596 									/*  00010 : G.711 my-law				*/
597 									/*  00011 : G.711 A-law					*/
598 									/*  00100 : G.721						*/
599                                     /*  00101 : H.221 and H.242				*/
600 									/*  00110 : H.223 and H.245				*/
601 									/*  00111 : Non ITU-T Standard			*/
602 									/*  01000 : ITU-T V.120					*/
603 									/*  01001 : ITU-T X.31 HDLC flag stuff.	*/
604 
605     L3UCHAR SyncAsync;              /* Synch/asynch                         */
606 									/*	0 : Syncronous data					*/
607 									/*	1 : Asyncronous data				*/
608 
609     L3UCHAR Negot;                  /* Negot                                */
610 									/*	0 : In-band negotiation not possib.	*/
611 									/*  1 : In-band negotiation possible	*/
612 
613     L3UCHAR UserRate;               /* User rate                            */
614 									/*	00000 : I.460, V.110, X,30			*/
615 									/*  00001 : 0.6 kbit/s x.1				*/
616 									/*  00010 : 1.2 kbit/s					*/
617 									/*  00011 : 2.4 kbit/s					*/
618 									/*  00100 : 3.6 kbit/s					*/
619 									/*  00101 : 4.8 kbit/s					*/
620 									/*  00110 : 7.2 kbit/s					*/
621 									/*  00111 : 8 kbit/s I.460				*/
622 									/*  01000 : 9.6 kbit/s					*/
623 									/*  01001 : 14.4 kbit/s					*/
624 									/*  01010 : 16 kbit/s					*/
625 									/*  01011 :	19.2 kbit/s					*/
626 									/*  01100 : 32 kbit/s					*/
627 									/*  01101 : 38.4 kbit/s					*/
628 									/*  01110 : 48 kbit/s					*/
629 									/*  01111 : 56 kbit/s					*/
630 									/*  10000 : 57.6 kbit/s					*/
631 									/*  10010 : 28.8 kbit/s					*/
632 									/*  10100 : 24 kbit/s					*/
633 									/*  10101 : 0.1345 kbit/s				*/
634 									/*  10110 : 0.100 kbit/s				*/
635 									/*  10111 : 0.075/1.2 kbit/s			*/
636 									/*  11000 : 1.2/0.075/kbit/s			*/
637 									/*  11001 : 0.050 kbit/s				*/
638 									/*  11010 : 0.075 kbit/s				*/
639 									/*  11011 : 0.110 kbit/s				*/
640 									/*  11100 : 0.150 kbit/s				*/
641 									/*  11101 : 0.200 kbit/s				*/
642 									/*  11110 : 0.300 kbit/s				*/
643 									/*  11111 : 12 kbit/s					*/
644 
645     L3UCHAR InterRate;              /* Intermediate rate                    */
646 									/*	00 : Not used						*/
647 									/*  01 : 8 kbit/s						*/
648 									/*  10 : 16 kbit/s						*/
649 									/*  11 : 32 kbit/s						*/
650 
651     L3UCHAR NIConTx;				/* Network Indepentend Clock on transmit*/
652 									/*	0 : Not required to send data  clc  */
653 									/*  1 : Send data w/NIC clc				*/
654 
655     L3UCHAR NIConRx;				/* NIC on Rx							*/
656 									/*	0 : Cannot accept indep. clc		*/
657 									/*  1 : data with indep. clc accepted	*/
658 
659     L3UCHAR FlowCtlTx;              /* Flow control on Tx                   */
660 									/*  0 : Send Flow ctrl not required		*/
661 									/*  1 : Send flow ctrl required			*/
662 
663     L3UCHAR FlowCtlRx;              /* Flow control on Rx                   */
664 									/*  0 : cannot use receive flow ctrl	*/
665 									/*  1 : Receive flow ctrl accepted		*/
666     L3UCHAR HDR;					/* HDR/No HDR							*/
667     L3UCHAR MultiFrame;             /* Multi frame support                  */
668 									/*  0 : multiframe not supported		*/
669 									/*  1 : multiframe supported			*/
670 
671 	L3UCHAR ModeL1;					/* Mode L1								*/
672 									/*	0 : bit transparent mode of operat.	*/
673 									/*	1 : protocol sesitive mode of op.	*/
674 
675     L3UCHAR NegotLLI;               /* Negot. LLI                           */
676 									/*  0 : default LLI=256 only			*/
677 									/*  1 : Full protocol negotiation		*/
678 
679     L3UCHAR Assignor;               /* Assignor/Assignor ee                 */
680 									/*  0 : Default Asignee					*/
681 									/*  1 : Assignor only					*/
682 
683     L3UCHAR InBandNeg;              /* In-band negot.                       */
684 									/*  0 : negot done w/ USER INFO mes		*/
685 									/*  1 : negot done in-band w/link zero	*/
686 
687     L3UCHAR NumStopBits;            /* Number of stop bits					*/
688 									/*  00 : Not used						*/
689 									/*  01 : 1 bit							*/
690 									/*  10 : 1.5 bits						*/
691 									/*  11 : 2 bits							*/
692 
693     L3UCHAR NumDataBits;            /* Number of data bits.                 */
694 									/*  00 : not used						*/
695 									/*  01 : 5 bits							*/
696 									/*  10 : 7 bits							*/
697 									/*  11 : 8 bits							*/
698 
699     L3UCHAR Parity;					/* Parity Information					*/
700 									/*	000 : Odd							*/
701 									/*  010 : Even							*/
702 									/*  011 : None							*/
703 									/*  100 : Forced to 0					*/
704 									/*  101 : Forced to 1					*/
705 
706     L3UCHAR DuplexMode;				/* Mode duplex							*/
707 									/*  0 : Half duplex						*/
708 									/*  1 : Full duplex						*/
709 
710     L3UCHAR ModemType;				/* Modem type, see Q.931 p 89			*/
711 
712     L3UCHAR Layer2Ident;            /* Layer 2 ident.                       */
713 
714     L3UCHAR UIL2Prot;               /* User information layer 2 protocol    */
715                                     /*  00001 : Basic mode ISO 1745         */
716 									/*	00010 : Q.921/I.441					*/
717 									/*  00110 : X.25 single link			*/
718                                     /*  00111 : X.25 multilink              */
719                                     /*  01000 : Extended LAPB T.71          */
720                                     /*  01001 : HDLC ARM                    */
721                                     /*  01010 : HDLC NRM                    */
722                                     /*  01011 : HDLC ABM                    */
723 									/*  01100 : LAN logical link			*/
724                                     /*  01101 : X.75 SLP                    */
725                                     /*  01110 : Q.922                       */
726                                     /*  01111 : Q.922 core aspect           */
727                                     /*  10000 : User specified              */
728                                     /*  10001 : ISO/IEC 7776 DTE-DCE        */
729 
730     L3UCHAR ModeL2;                 /* Mode                                 */
731 									/*	01 : Normal Mode of operation    	*/
732 									/*	10 : Extended mode of operation  	*/
733 
734     L3UCHAR Q933use;                /* Q.9333 use                           */
735 
736     L3UCHAR UsrSpcL2Prot;           /* User specified layer 2 protocol info */
737 
738     L3UCHAR WindowSize;             /* Window size (k)                      */
739 
740     L3UCHAR Layer3Ident;            /* Layer 3 ident                        */
741 
742     L3UCHAR UIL3Prot;				/* User Information Layer 3 protocol	*/
743 									/*	00010 : Q.931						*/
744 									/*  00110 : X.25						*/
745                                     /*  00111 : 8208                        */
746                                     /*  01000 : X.233 ...                   */
747                                     /*  01001 : 6473                        */
748                                     /*  01010 : T.70                        */
749 									/*  01011 : ISO/IEC TR 9577				*/
750                                     /*  10000 : User specified              */
751     L3UCHAR OptL3Info;              /* Optional Leyer 3 info                */
752 
753     L3UCHAR ModeL3;                 /* Mode of operation                    */
754                                     /*  01 : Normal packed seq. numbering   */
755                                     /*  10 : Extended packed seq. numbering */
756 
757     L3UCHAR DefPackSize;            /* Default packet size                  */
758 
759     L3UCHAR PackWinSize;            /* Packet window size                   */
760 
761     L3UCHAR AddL3Info;              /* Additional Layer 3 protocol info     */
762 
763 } Q931ie_LLComp;
764 
765 /*****************************************************************************
766 
767   Struct:       Q931ie_NetFac;
768 
769   Description:  Network-specific facilities
770 
771 *****************************************************************************/
772 
773 typedef struct {
774 
775     L3UCHAR IEId;                   /* 00100000                             */
776     L3UCHAR Size;                   /* Length of Information Element        */
777     L3UCHAR LenNetID;               /* Length of network facilities id.     */
778     L3UCHAR TypeNetID;              /* Type of network identification       */
779     L3UCHAR NetIDPlan;              /* Network identification plan.         */
780     L3UCHAR NetFac;                 /* Network specific facility spec.      */
781     L3UCHAR NetID[1];               /* Network id. (IA5)                    */
782 
783 } Q931ie_NetFac;
784 
785 /*****************************************************************************
786 
787   Struct:       Q931ie_NotifInd;
788 
789   Description:  Notification Indicator
790 
791 *****************************************************************************/
792 
793 typedef struct {
794 
795     L3UCHAR IEId;                   /* 00100000                             */
796     L3UCHAR Size;                   /* Length of Information Element        */
797 	L3UCHAR Notification;			/* Notification descriptor				*/
798 
799 } Q931ie_NotifInd;
800 
801 /*****************************************************************************
802 
803   Struct:       Q931ie_ProgInd
804 
805   Description:  Progress indicator
806 
807 *****************************************************************************/
808 
809 typedef struct {
810 
811     L3UCHAR IEId;                   /* 00011110                             */
812     L3UCHAR Size;                   /* Length of Information Element        */
813     L3UCHAR CodStand;               /* Coding standard                      */
814     L3UCHAR Location;               /* Location                             */
815     L3UCHAR ProgDesc;               /* Progress description                 */
816 
817 } Q931ie_ProgInd;
818 
819 /*****************************************************************************
820 
821   Struct;       Q931ie_Segment
822 
823   Description:  Segmented message
824 
825 *****************************************************************************/
826 
827 typedef struct {
828 
829     L3UCHAR IEId;                   /* 00000000                             */
830     L3UCHAR Size;                   /* Length of Information Element        */
831     L3UCHAR FSI;                    /* First segment indicator              */
832     L3UCHAR NumSegRem;              /* Number of segments remaining         */
833     L3UCHAR SegType;                /* Segment message type                 */
834 
835 } Q931ie_Segment;
836 
837 
838 typedef struct {
839 
840     L3UCHAR IEId;                   /* 00000000                             */
841     L3UCHAR Size;                   /* Length of Information Element        */
842 
843 } Q931ie_SendComplete;
844 
845 /*****************************************************************************
846 
847   Struct:       Q931ie_Signal
848 
849   Description:  Signal
850 
851 *****************************************************************************/
852 
853 typedef struct {
854 
855     L3UCHAR IEId;                   /* 00000000                             */
856     L3UCHAR Size;                   /* Length of Information Element        */
857     L3UCHAR Signal;                 /* Signal value                         */
858                                     /*  00000000    Dial tone on            */
859                                     /*  00000001    Ring back tone on       */
860                                     /*  00000010    Intercept tone on       */
861                                     /*  00000011    Network congestion on   */
862                                     /*  00000100    Busy tone on            */
863                                     /*  00000101    Confirm tone on         */
864                                     /*  00000110    Answer tone on          */
865                                     /*  00000111    Call waiting tone       */
866                                     /*  00001000    Off-hook warning tone   */
867                                     /*  00001001    Pre-emption tone on     */
868                                     /*  00111111    Tones off               */
869                                     /*  01000000    Alerting on - pattern 0 */
870                                     /*  01000001    Alerting on - pattern 1 */
871                                     /*  01000010    Alerting on - pattern 2 */
872                                     /*  01000011    Alerting on - pattern 3 */
873                                     /*  01000100    Alerting on - pattern 4 */
874                                     /*  01000101    Alerting on - pattern 5 */
875                                     /*  01000110    Alerting on - pattern 6 */
876                                     /*  01000111    Alerting on - pattern 7 */
877                                     /*  01001111    Alerting off            */
878 } Q931ie_Signal;
879 
880 /*****************************************************************************
881 
882   Struct:       Q931ie_TransDelSelInd
883 
884   description:  Transit delay selection and indication
885 
886 *****************************************************************************/
887 #ifdef Q931_X25_SUPPORT
888 typedef struct {
889 
890     L3UCHAR IEId;                   /* 00000000                             */
891     L3UCHAR Size;                   /* Length of Information Element        */
892     L3ULONG TxDSIValue;             /* Trans. delay sel. & ind. value       */
893 
894 } Q931ie_TransDelSelInd;
895 #endif
896 
897 /*****************************************************************************
898 
899   Struct:       Q931ie_TransNetSel
900 
901   Description:  Transit network selection
902 
903 *****************************************************************************/
904 
905 typedef struct {
906 
907     L3UCHAR IEId;                   /* 01111000                             */
908     L3UCHAR Size;                   /* Length of Information Element        */
909     L3UCHAR Type;                   /* Type of network identifier           */
910     L3UCHAR NetIDPlan;              /* Network idetification plan           */
911     L3UCHAR NetID[1];               /* Network identification(IA5)          */
912 
913 } Q931ie_TransNetSel;
914 
915 /*****************************************************************************
916 
917   Struct:       Q931ie_UserUser
918 
919   Description:  User-user
920 
921 *****************************************************************************/
922 
923 typedef struct {
924 
925     L3UCHAR IEId;                   /* 01111110                             */
926     L3UCHAR Size;                   /* Length of Information Element        */
927     L3UCHAR ProtDisc;               /* Protocol discriminator               */
928     L3UCHAR User[1];                /* User information                     */
929 
930 } Q931ie_UserUser;
931 
932 /*****************************************************************************
933 
934   Struct:       Q931ie_ClosedUserGrp
935 
936   Description:  Closed user group
937 
938 *****************************************************************************/
939 #ifdef Q931_X25_SUPPORT
940 typedef struct {
941 
942     L3UCHAR IEId;                   /* 01000111                             */
943     L3UCHAR Size;                   /* Length of Information Element        */
944     L3UCHAR CUGInd;                 /* CUG indication                       */
945     L3UCHAR CUG[1];                 /* CUG index code (IA5)                 */
946 
947 } Q931ie_ClosedUserGrp;
948 #endif
949 
950 /*****************************************************************************
951 
952   Struct:		Q931ie_CongLevel
953 
954   Description:	Congestion Level
955 
956 *****************************************************************************/
957 typedef struct {
958 
959     L3UCHAR IEId;                   /* 01000111                             */
960     L3UCHAR Size;                   /* Length of Information Element        */
961 	L3UCHAR CongLevel;				/* Conguestion Level					*/
962 
963 } Q931ie_CongLevel;
964 
965 /*****************************************************************************
966 
967   Struct:       Q931ie_EndEndTxDelay
968 
969   Description:  End to end transit delay
970 
971 *****************************************************************************/
972 #ifdef Q931_X25_SUPPORT
973 typedef struct {
974 
975     L3UCHAR IEId;                   /* 01000010                             */
976     L3UCHAR Size;                   /* Length of Information Element        */
977     L3ULONG CumTxDelay;             /* Cumulative transit delay value       */
978     L3ULONG ReqTxDelay;             /* Requested end to end transit delay   */
979     L3ULONG MaxTxDelay;             /* Maximum transit delay                */
980 
981 } Q931ie_EndEndTxDelay;
982 #endif
983 
984 /*****************************************************************************
985 
986   Struct:       Q931ie_InfoRate
987 
988   Description:  Information Rate
989 
990 *****************************************************************************/
991 #ifdef Q931_X25_SUPPORT
992 typedef struct {
993 
994     L3UCHAR IEId;                   /* 01100000                             */
995     L3UCHAR Size;                   /* Length of Information Element        */
996     L3UCHAR InInfoRate;             /* Incoming information rate            */
997     L3UCHAR OutInfoRate;            /* Outgoing information rate            */
998     L3UCHAR MinInInfoRate;          /* Minimum incoming information rate    */
999     L3UCHAR MinOutInfoRate;         /* Minimum outgoing information rate    */
1000 
1001 } Q931ie_InfoRate;
1002 #endif
1003 
1004 /*****************************************************************************
1005 
1006   Struct:       Q931ie_PackParam
1007 
1008   Description:  Packed layer binary parameters
1009 
1010 *****************************************************************************/
1011 #ifdef Q931_X25_SUPPORT
1012 typedef struct {
1013 
1014     L3UCHAR IEId;                   /* 01000100                             */
1015     L3UCHAR Size;                   /* Length of Information Element        */
1016     L3UCHAR FastSel;                /* Fast selected                        */
1017     L3UCHAR ExpData;                /* Exp. data                            */
1018     L3UCHAR DelConf;                /* Delivery conf                        */
1019     L3UCHAR Modulus;                /* Modulus                              */
1020 
1021 } Q931ie_PackParam;
1022 #endif
1023 
1024 /*****************************************************************************
1025 
1026   Struct:       Q931ie_PackWinSize
1027 
1028   Description:  Packed window size
1029 
1030 *****************************************************************************/
1031 #ifdef Q931_X25_SUPPORT
1032 typedef struct {
1033 
1034     L3UCHAR IEId;                   /* 01000101                             */
1035     L3UCHAR Size;                   /* Length of Information Element        */
1036     L3UCHAR ForwardValue;           /* Forward value                        */
1037     L3UCHAR BackwardValue;          /* Backward value                       */
1038 
1039 } Q931ie_PackWinSize;
1040 #endif
1041 
1042 /*****************************************************************************
1043 
1044   Struct:       Q931ie_PackSize
1045 
1046   Description:  Packet size
1047 
1048 *****************************************************************************/
1049 #ifdef Q931_X25_SUPPORT
1050 typedef struct {
1051 
1052     L3UCHAR IEId;                   /* 01000110                             */
1053     L3UCHAR Size;                   /* Length of Information Element        */
1054     L3UCHAR ForwardValue;           /* Forward value                        */
1055     L3UCHAR BackwardValue;          /* Backward value                       */
1056 
1057 } Q931ie_PackSize;
1058 #endif
1059 
1060 /*****************************************************************************
1061 
1062   Struct:       Q931ie_RedirNum
1063 
1064   Description:  Redirecting number
1065 
1066 *****************************************************************************/
1067 #ifdef Q931_X25_SUPPORT
1068 typedef struct {
1069 
1070     L3UCHAR IEId;                   /* 01110100                             */
1071     L3UCHAR Size;                   /* Length of Information Element        */
1072     L3UCHAR TypeNum;                /* Type of number                       */
1073     L3UCHAR NumPlanID;              /* Number plan identification           */
1074     L3UCHAR PresInd;                /* Presentation indicator               */
1075     L3UCHAR ScreenInd;              /* Screening indicator                  */
1076     L3UCHAR Reason;                 /* Reason for redirection               */
1077     L3UCHAR Digit[1];               /* Number digits (IA5)                  */
1078 
1079 } Q931ie_RedirNum;
1080 #endif
1081 
1082 typedef struct {
1083 
1084     L3UCHAR IEId;                   /* 01110100                             */
1085     L3UCHAR Size;                   /* Length of Information Element        */
1086     L3UCHAR RepeatInd;              /* 0010 Prioritized list for selecting  */
1087                                     /* one possible.                        */
1088 } Q931ie_RepeatInd;
1089 
1090 typedef struct {
1091 
1092     L3UCHAR IEId;                   /* 01110100                             */
1093     L3UCHAR Size;                   /* Length of Information Element        */
1094     L3UCHAR Spare;                  /* Spare                                */
1095     L3UCHAR Class;                  /* Class                                */
1096                                     /*  000 Indicate channels               */
1097                                     /*  110 Single interface                */
1098                                     /*  111 All interfaces                  */
1099 } Q931ie_RestartInd;
1100 
1101 typedef struct {
1102 
1103     L3UCHAR IEId;                   /* 01110100                             */
1104     L3UCHAR Size;                   /* Length of Information Element        */
1105 	L3UCHAR Preference;             /* Preference 0 = reserved, 1 = channel */
1106 	L3UCHAR Spare;                  /* Spare                                */
1107     L3UCHAR NewStatus;              /* NewStatus                            */
1108                                     /*  000 In service                      */
1109                                     /*  001 Maintenance                     */
1110                                     /*  010 Out of service                  */
1111 } Q931ie_ChangeStatus;
1112 
1113 /*****************************************************************************
1114 
1115   Struct:       Q931ie_GenericDigits
1116 
1117 
1118 *****************************************************************************/
1119 
1120 typedef struct {
1121 
1122     L3UCHAR IEId;                   /* 00110111                             */
1123     L3UCHAR Size;                   /* Length of Information Element        */
1124     L3UCHAR Type;					/* Type of number                       */
1125     L3UCHAR Encoding;				/* Encoding of number                   */
1126     L3UCHAR Digit[1];				/* Number digits (IA5)                  */
1127 
1128 } Q931ie_GenericDigits;
1129 
1130 
1131 /*****************************************************************************
1132 
1133   Q.931 Information Element Pack/Unpack functions. Implemented in Q931ie.c
1134 
1135 *****************************************************************************/
1136 q931pie_func_t Q931Pie_ChangeStatus;
1137 q931pie_func_t Q931Pie_BearerCap;
1138 q931pie_func_t Q931Pie_ChanID;
1139 q931pie_func_t Q931Pie_ProgInd;
1140 q931pie_func_t Q931Pie_Display;
1141 q931pie_func_t Q931Pie_Signal;
1142 q931pie_func_t Q931Pie_HLComp;
1143 q931pie_func_t Q931Pie_Segment;
1144 q931pie_func_t Q931Pie_DateTime;
1145 q931pie_func_t Q931Pie_Cause;
1146 q931pie_func_t Q931Pie_SendComplete;
1147 q931pie_func_t Q931Pie_KeypadFac;
1148 q931pie_func_t Q931Pie_NotifInd;
1149 q931pie_func_t Q931Pie_CallID;
1150 q931pie_func_t Q931Pie_RepeatInd;
1151 q931pie_func_t Q931Pie_NetFac;
1152 q931pie_func_t Q931Pie_CallingNum;
1153 q931pie_func_t Q931Pie_CallingSub;
1154 q931pie_func_t Q931Pie_CalledNum;
1155 q931pie_func_t Q931Pie_CalledSub;
1156 q931pie_func_t Q931Pie_CalledNum;
1157 q931pie_func_t Q931Pie_TransNetSel;
1158 q931pie_func_t Q931Pie_LLComp;
1159 q931pie_func_t Q931Pie_CallState;
1160 q931pie_func_t Q931Pie_RestartInd;
1161 q931pie_func_t Q931Pie_UserUser;
1162 
1163 q931pie_func_t Q931Pie_GenericDigits;
1164 
1165 L3USHORT Q931Uie_CRV(Q931_TrunkInfo_t *pTrunk,L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff);
1166 
1167 q931uie_func_t Q931Uie_ChangeStatus;
1168 q931uie_func_t Q931Uie_BearerCap;
1169 q931uie_func_t Q931Uie_ChanID;
1170 q931uie_func_t Q931Uie_ProgInd;
1171 q931uie_func_t Q931Uie_Display;
1172 q931uie_func_t Q931Uie_Signal;
1173 q931uie_func_t Q931Uie_HLComp;
1174 q931uie_func_t Q931Uie_Segment;
1175 q931uie_func_t Q931Uie_DateTime;
1176 q931uie_func_t Q931Uie_Cause;
1177 q931uie_func_t Q931Uie_SendComplete;
1178 q931uie_func_t Q931Uie_KeypadFac;
1179 q931uie_func_t Q931Uie_NotifInd;
1180 q931uie_func_t Q931Uie_CallID;
1181 q931uie_func_t Q931Uie_RepeatInd;
1182 q931uie_func_t Q931Uie_NetFac;
1183 q931uie_func_t Q931Uie_CallingNum;
1184 q931uie_func_t Q931Uie_CallingSub;
1185 q931uie_func_t Q931Uie_CalledNum;
1186 q931uie_func_t Q931Uie_CalledSub;
1187 q931uie_func_t Q931Uie_TransNetSel;
1188 q931uie_func_t Q931Uie_LLComp;
1189 q931uie_func_t Q931Uie_CallState;
1190 q931uie_func_t Q931Uie_RestartInd;
1191 q931uie_func_t Q931Uie_UserUser;
1192 
1193 q931uie_func_t Q931Uie_GenericDigits;
1194 
1195 
1196 L3INT Q931ReadExt(L3UCHAR * IBuf, L3INT Off);
1197 L3INT Q931Uie_CongLevel(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff);
1198 L3INT Q931Pie_CongLevel(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet);
1199 L3INT Q931Uie_RevChargeInd(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff);
1200 L3INT Q931Pie_RevChargeInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet);
1201 
1202 L3INT Q931Uie_Generic(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff);
1203 L3INT Q931Pie_Generic(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet);
1204 
1205 #endif /* _Q931IE_NL */
1206