Debian Codegraph @

addons/ooh323c/src/h323/H323-MESSAGESDec.c

raw symbols SCIP
1 /*
2 * Copyright (C) 2004-2005 by Objective Systems, Inc.
3 *
4 * This software is furnished under an open source license and may be
5 * used and copied only in accordance with the terms of this license.
6 * The text of the license may generally be found in the root
7 * directory of this installation in the COPYING file. It
8 * can also be viewed online at the following URL:
9 *
10 * http://www.obj-sys.com/open/license.html
11 *
12 * Any redistributions of this file including modified versions must
13 * maintain this copyright notice.
14 *
15 *****************************************************************************/
16
17 #include "ooasn1.h"
18 #include "H323-MESSAGES.h"
19 #include "eventHandler.h"
20
21 /**************************************************************/
22 /* */
23 /* ScreeningIndicator */
24 /* */
25 /**************************************************************/
26
27 EXTERN int asn1PD_H225ScreeningIndicator (OOCTXT* pctxt, H225ScreeningIndicator* pvalue)
28 {
29 int stat = ASN_OK;
30 ASN1UINT ui;
31 ASN1BOOL extbit = 0;
32
33 /* extension bit */
34
35 DECODEBIT (pctxt, &extbit);
36
37 if (extbit) {
38 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
39 if (stat != ASN_OK) return stat;
40
41 *pvalue = ui;
42 }
43 else {
44 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
45 if (stat != ASN_OK) return stat;
46
47 switch (ui) {
48 case 0: *pvalue = userProvidedNotScreened; break;
49 case 1: *pvalue = userProvidedVerifiedAndPassed; break;
50 case 2: *pvalue = userProvidedVerifiedAndFailed; break;
51 case 3: *pvalue = networkProvided; break;
52 default: return ASN_E_INVENUM;
53 }
54 }
55 invokeUIntValue (pctxt, *pvalue);
56
57 return (stat);
58 }
59
60 /**************************************************************/
61 /* */
62 /* NumberDigits */
63 /* */
64 /**************************************************************/
65
66 extern EXTERN const char* gs_H323_MESSAGES_NumberDigits_CharSet;
67
68 EXTERN int asn1PD_H225NumberDigits (OOCTXT* pctxt, H225NumberDigits* pvalue)
69 {
70 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
71 int stat = ASN_OK;
72
73 addSizeConstraint (pctxt, &lsize1);
74
75 stat = decodeConstrainedStringEx (pctxt, pvalue, gs_H323_MESSAGES_NumberDigits_CharSet, 4, 4, 7);
76 if (stat != ASN_OK) return stat;
77 invokeCharStrValue (pctxt, *pvalue);
78
79 return (stat);
80 }
81
82 /**************************************************************/
83 /* */
84 /* TBCD_STRING */
85 /* */
86 /**************************************************************/
87
88 extern EXTERN const char* gs_H323_MESSAGES_TBCD_STRING_CharSet;
89
90 EXTERN int asn1PD_H225TBCD_STRING (OOCTXT* pctxt, H225TBCD_STRING* pvalue)
91 {
92 int stat = ASN_OK;
93
94 stat = decodeConstrainedStringEx (pctxt, pvalue, gs_H323_MESSAGES_TBCD_STRING_CharSet, 4, 4, 7);
95 if (stat != ASN_OK) return stat;
96 invokeCharStrValue (pctxt, *pvalue);
97
98 return (stat);
99 }
100
101 /**************************************************************/
102 /* */
103 /* GloballyUniqueID */
104 /* */
105 /**************************************************************/
106
107 EXTERN int asn1PD_H225GloballyUniqueID (OOCTXT* pctxt, H225GloballyUniqueID* pvalue)
108 {
109 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
110 int stat = ASN_OK;
111
112 addSizeConstraint (pctxt, &lsize1);
113
114 stat = decodeOctetString (pctxt,
115 &pvalue->numocts,
116 pvalue->data,
117 sizeof(pvalue->data));
118 if (stat != ASN_OK) return stat;
119 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
120
121 return (stat);
122 }
123
124 /**************************************************************/
125 /* */
126 /* ConferenceIdentifier */
127 /* */
128 /**************************************************************/
129
130 EXTERN int asn1PD_H225ConferenceIdentifier (OOCTXT* pctxt, H225ConferenceIdentifier* pvalue)
131 {
132 int stat = ASN_OK;
133
134 stat = asn1PD_H225GloballyUniqueID (pctxt, pvalue);
135 if (stat != ASN_OK) return stat;
136
137 return (stat);
138 }
139
140 /**************************************************************/
141 /* */
142 /* RequestSeqNum */
143 /* */
144 /**************************************************************/
145
146 EXTERN int asn1PD_H225RequestSeqNum (OOCTXT* pctxt, H225RequestSeqNum* pvalue)
147 {
148 int stat = ASN_OK;
149
150 stat = decodeConsUInt16 (pctxt, pvalue, 1U, 65535U);
151 if (stat != ASN_OK) return stat;
152 invokeUIntValue (pctxt, *pvalue);
153
154 return (stat);
155 }
156
157 /**************************************************************/
158 /* */
159 /* GatekeeperIdentifier */
160 /* */
161 /**************************************************************/
162
163 EXTERN int asn1PD_H225GatekeeperIdentifier (OOCTXT* pctxt, H225GatekeeperIdentifier* pvalue)
164 {
165 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
166 int stat = ASN_OK;
167
168 addSizeConstraint (pctxt, &lsize1);
169
170 stat = decodeBMPString (pctxt, pvalue, 0);
171 if (stat != ASN_OK) return stat;
172 invokeCharStr16BitValue (pctxt, pvalue->nchars, pvalue->data);
173
174 return (stat);
175 }
176
177 /**************************************************************/
178 /* */
179 /* BandWidth */
180 /* */
181 /**************************************************************/
182
183 EXTERN int asn1PD_H225BandWidth (OOCTXT* pctxt, H225BandWidth* pvalue)
184 {
185 int stat = ASN_OK;
186
187 stat = decodeConsUnsigned (pctxt, pvalue, 0U, ASN1UINT_MAX);
188 if (stat != ASN_OK) return stat;
189 invokeUIntValue (pctxt, *pvalue);
190
191 return (stat);
192 }
193
194 /**************************************************************/
195 /* */
196 /* CallReferenceValue */
197 /* */
198 /**************************************************************/
199
200 EXTERN int asn1PD_H225CallReferenceValue (OOCTXT* pctxt, H225CallReferenceValue* pvalue)
201 {
202 int stat = ASN_OK;
203
204 stat = decodeConsUInt16 (pctxt, pvalue, 0U, 65535U);
205 if (stat != ASN_OK) return stat;
206 invokeUIntValue (pctxt, *pvalue);
207
208 return (stat);
209 }
210
211 /**************************************************************/
212 /* */
213 /* EndpointIdentifier */
214 /* */
215 /**************************************************************/
216
217 EXTERN int asn1PD_H225EndpointIdentifier (OOCTXT* pctxt, H225EndpointIdentifier* pvalue)
218 {
219 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
220 int stat = ASN_OK;
221
222 addSizeConstraint (pctxt, &lsize1);
223
224 stat = decodeBMPString (pctxt, pvalue, 0);
225 if (stat != ASN_OK) return stat;
226 invokeCharStr16BitValue (pctxt, pvalue->nchars, pvalue->data);
227
228 return (stat);
229 }
230
231 /**************************************************************/
232 /* */
233 /* ProtocolIdentifier */
234 /* */
235 /**************************************************************/
236
237 EXTERN int asn1PD_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* pvalue)
238 {
239 int stat = ASN_OK;
240
241 stat = decodeObjectIdentifier (pctxt, pvalue);
242 if (stat != ASN_OK) return stat;
243 invokeOidValue (pctxt, pvalue->numids, pvalue->subid);
244
245 return (stat);
246 }
247
248 /**************************************************************/
249 /* */
250 /* TimeToLive */
251 /* */
252 /**************************************************************/
253
254 EXTERN int asn1PD_H225TimeToLive (OOCTXT* pctxt, H225TimeToLive* pvalue)
255 {
256 int stat = ASN_OK;
257
258 stat = decodeConsUnsigned (pctxt, pvalue, 1U, ASN1UINT_MAX);
259 if (stat != ASN_OK) return stat;
260 invokeUIntValue (pctxt, *pvalue);
261
262 return (stat);
263 }
264
265 /**************************************************************/
266 /* */
267 /* H248PackagesDescriptor */
268 /* */
269 /**************************************************************/
270
271 EXTERN int asn1PD_H225H248PackagesDescriptor (OOCTXT* pctxt, H225H248PackagesDescriptor* pvalue)
272 {
273 int stat = ASN_OK;
274
275 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)pvalue);
276 if (stat != ASN_OK) return stat;
277 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
278
279 return (stat);
280 }
281
282 /**************************************************************/
283 /* */
284 /* H248SignalsDescriptor */
285 /* */
286 /**************************************************************/
287
288 EXTERN int asn1PD_H225H248SignalsDescriptor (OOCTXT* pctxt, H225H248SignalsDescriptor* pvalue)
289 {
290 int stat = ASN_OK;
291
292 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)pvalue);
293 if (stat != ASN_OK) return stat;
294 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
295
296 return (stat);
297 }
298
299 /**************************************************************/
300 /* */
301 /* GenericIdentifier */
302 /* */
303 /**************************************************************/
304
305 EXTERN int asn1PD_H225GenericIdentifier (OOCTXT* pctxt, H225GenericIdentifier* pvalue)
306 {
307 int stat = ASN_OK;
308 ASN1UINT ui;
309 ASN1OpenType openType;
310 ASN1BOOL extbit = 0;
311
312 /* extension bit */
313
314 DECODEBIT (pctxt, &extbit);
315
316 if (!extbit) {
317 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
318 if (stat != ASN_OK) return stat;
319 else pvalue->t = ui + 1;
320
321 switch (ui) {
322 /* standard */
323 case 0:
324 invokeStartElement (pctxt, "standard", -1);
325
326 /* extension bit */
327
328 DECODEBIT (pctxt, &extbit);
329
330 if (extbit == 0) {
331 stat = decodeConsInteger (pctxt, &pvalue->u.standard, 0, 16383);
332 if (stat != ASN_OK) return stat;
333 }
334 else {
335 stat = decodeUnconsInteger (pctxt, &pvalue->u.standard);
336 if (stat != ASN_OK) return stat;
337 }
338 invokeIntValue (pctxt, pvalue->u.standard);
339
340 invokeEndElement (pctxt, "standard", -1);
341
342 break;
343
344 /* oid */
345 case 1:
346 invokeStartElement (pctxt, "oid", -1);
347
348 pvalue->u.oid = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
349
350 stat = decodeObjectIdentifier (pctxt, pvalue->u.oid);
351 if (stat != ASN_OK) return stat;
352 invokeOidValue (pctxt, pvalue->u.oid->numids, pvalue->u.oid->subid);
353
354 invokeEndElement (pctxt, "oid", -1);
355
356 break;
357
358 /* nonStandard */
359 case 2:
360 invokeStartElement (pctxt, "nonStandard", -1);
361
362 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225GloballyUniqueID);
363
364 stat = asn1PD_H225GloballyUniqueID (pctxt, pvalue->u.nonStandard);
365 if (stat != ASN_OK) return stat;
366
367 invokeEndElement (pctxt, "nonStandard", -1);
368
369 break;
370
371 default:
372 return ASN_E_INVOPT;
373 }
374 }
375 else {
376 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
377 if (stat != ASN_OK) return stat;
378 else pvalue->t = ui + 4;
379
380 stat = decodeByteAlign (pctxt);
381 if (stat != ASN_OK) return stat;
382
383 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
384 if (stat != ASN_OK) return stat;
385
386 }
387
388 return (stat);
389 }
390
391 /**************************************************************/
392 /* */
393 /* TransportAddress_ipAddress_ip */
394 /* */
395 /**************************************************************/
396
397 EXTERN int asn1PD_H225TransportAddress_ipAddress_ip (OOCTXT* pctxt, H225TransportAddress_ipAddress_ip* pvalue)
398 {
399 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
400 int stat = ASN_OK;
401
402 addSizeConstraint (pctxt, &lsize1);
403
404 stat = decodeOctetString (pctxt,
405 &pvalue->numocts,
406 pvalue->data,
407 sizeof(pvalue->data));
408 if (stat != ASN_OK) return stat;
409 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
410
411 return (stat);
412 }
413
414 /**************************************************************/
415 /* */
416 /* TransportAddress_ipAddress */
417 /* */
418 /**************************************************************/
419
420 EXTERN int asn1PD_H225TransportAddress_ipAddress (OOCTXT* pctxt, H225TransportAddress_ipAddress* pvalue)
421 {
422 int stat = ASN_OK;
423
424 /* decode ip */
425
426 invokeStartElement (pctxt, "ip", -1);
427
428 stat = asn1PD_H225TransportAddress_ipAddress_ip (pctxt, &pvalue->ip);
429 if (stat != ASN_OK) return stat;
430
431 invokeEndElement (pctxt, "ip", -1);
432
433 /* decode port */
434
435 invokeStartElement (pctxt, "port", -1);
436
437 stat = decodeConsUInt16 (pctxt, &pvalue->port, 0U, 65535U);
438 if (stat != ASN_OK) return stat;
439 invokeUIntValue (pctxt, pvalue->port);
440
441 invokeEndElement (pctxt, "port", -1);
442
443 return (stat);
444 }
445
446 /**************************************************************/
447 /* */
448 /* TransportAddress_ipSourceRoute_ip */
449 /* */
450 /**************************************************************/
451
452 EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_ip (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_ip* pvalue)
453 {
454 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
455 int stat = ASN_OK;
456
457 addSizeConstraint (pctxt, &lsize1);
458
459 stat = decodeOctetString (pctxt,
460 &pvalue->numocts,
461 pvalue->data,
462 sizeof(pvalue->data));
463 if (stat != ASN_OK) return stat;
464 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
465
466 return (stat);
467 }
468
469 /**************************************************************/
470 /* */
471 /* TransportAddress_ipSourceRoute_route_element */
472 /* */
473 /**************************************************************/
474
475 EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_route_element* pvalue)
476 {
477 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
478 int stat = ASN_OK;
479
480 addSizeConstraint (pctxt, &lsize1);
481
482 stat = decodeOctetString (pctxt,
483 &pvalue->numocts,
484 pvalue->data,
485 sizeof(pvalue->data));
486 if (stat != ASN_OK) return stat;
487 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
488
489 return (stat);
490 }
491
492 /**************************************************************/
493 /* */
494 /* _SeqOfH225TransportAddress_ipSourceRoute_route_element */
495 /* */
496 /**************************************************************/
497
498 EXTERN int asn1PD_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225_SeqOfH225TransportAddress_ipSourceRoute_route_element* pvalue)
499 {
500 int stat = ASN_OK;
501 ASN1UINT xx1;
502
503 /* decode length determinant */
504
505 stat = decodeLength (pctxt, &pvalue->n);
506 if (stat != ASN_OK) return stat;
507
508 /* decode elements */
509
510 ALLOC_ASN1ARRAY (pctxt, pvalue, H225TransportAddress_ipSourceRoute_route_element);
511
512 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
513 invokeStartElement (pctxt, "elem", xx1);
514
515 stat = asn1PD_H225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->elem[xx1]);
516 if (stat != ASN_OK) return stat;
517 invokeEndElement (pctxt, "elem", xx1);
518
519 }
520
521 return (stat);
522 }
523
524 /**************************************************************/
525 /* */
526 /* TransportAddress_ipSourceRoute_routing */
527 /* */
528 /**************************************************************/
529
530 EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_routing (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_routing* pvalue)
531 {
532 int stat = ASN_OK;
533 ASN1UINT ui;
534 ASN1OpenType openType;
535 ASN1BOOL extbit = 0;
536
537 /* extension bit */
538
539 DECODEBIT (pctxt, &extbit);
540
541 if (!extbit) {
542 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
543 if (stat != ASN_OK) return stat;
544 else pvalue->t = ui + 1;
545
546 switch (ui) {
547 /* strict */
548 case 0:
549 invokeStartElement (pctxt, "strict", -1);
550
551 /* NULL */
552 invokeNullValue (pctxt);
553
554 invokeEndElement (pctxt, "strict", -1);
555
556 break;
557
558 /* loose */
559 case 1:
560 invokeStartElement (pctxt, "loose", -1);
561
562 /* NULL */
563 invokeNullValue (pctxt);
564
565 invokeEndElement (pctxt, "loose", -1);
566
567 break;
568
569 default:
570 return ASN_E_INVOPT;
571 }
572 }
573 else {
574 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
575 if (stat != ASN_OK) return stat;
576 else pvalue->t = ui + 3;
577
578 stat = decodeByteAlign (pctxt);
579 if (stat != ASN_OK) return stat;
580
581 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
582 if (stat != ASN_OK) return stat;
583
584 }
585
586 return (stat);
587 }
588
589 /**************************************************************/
590 /* */
591 /* TransportAddress_ipSourceRoute */
592 /* */
593 /**************************************************************/
594
595 EXTERN int asn1PD_H225TransportAddress_ipSourceRoute (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute* pvalue)
596 {
597 int stat = ASN_OK;
598 OOCTXT lctxt;
599 ASN1OpenType openType;
600 ASN1UINT bitcnt;
601 ASN1UINT i;
602 ASN1BOOL optbit = 0;
603 ASN1BOOL extbit = 0;
604
605 /* extension bit */
606
607 DECODEBIT (pctxt, &extbit);
608
609 /* decode ip */
610
611 invokeStartElement (pctxt, "ip", -1);
612
613 stat = asn1PD_H225TransportAddress_ipSourceRoute_ip (pctxt, &pvalue->ip);
614 if (stat != ASN_OK) return stat;
615
616 invokeEndElement (pctxt, "ip", -1);
617
618 /* decode port */
619
620 invokeStartElement (pctxt, "port", -1);
621
622 stat = decodeConsUInt16 (pctxt, &pvalue->port, 0U, 65535U);
623 if (stat != ASN_OK) return stat;
624 invokeUIntValue (pctxt, pvalue->port);
625
626 invokeEndElement (pctxt, "port", -1);
627
628 /* decode route */
629
630 invokeStartElement (pctxt, "route", -1);
631
632 stat = asn1PD_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->route);
633 if (stat != ASN_OK) return stat;
634
635 invokeEndElement (pctxt, "route", -1);
636
637 /* decode routing */
638
639 invokeStartElement (pctxt, "routing", -1);
640
641 stat = asn1PD_H225TransportAddress_ipSourceRoute_routing (pctxt, &pvalue->routing);
642 if (stat != ASN_OK) return stat;
643
644 invokeEndElement (pctxt, "routing", -1);
645
646 if (extbit) {
647
648 /* decode extension optional bits length */
649
650 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
651 if (stat != ASN_OK) return stat;
652
653 bitcnt += 1;
654
655 ZEROCONTEXT (&lctxt);
656 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
657 if (stat != ASN_OK) return stat;
658
659 stat = moveBitCursor (pctxt, bitcnt);
660 if (stat != ASN_OK) return stat;
661
662 for (i = 0; i < bitcnt; i++) {
663 DECODEBIT (&lctxt, &optbit);
664
665 if (optbit) {
666 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
667 if (stat != ASN_OK) return stat;
668
669 pctxt->buffer.byteIndex += openType.numocts;
670 }
671 }
672 }
673
674 return (stat);
675 }
676
677 /**************************************************************/
678 /* */
679 /* TransportAddress_ipxAddress_node */
680 /* */
681 /**************************************************************/
682
683 EXTERN int asn1PD_H225TransportAddress_ipxAddress_node (OOCTXT* pctxt, H225TransportAddress_ipxAddress_node* pvalue)
684 {
685 static Asn1SizeCnst lsize1 = { 0, 6, 6, 0 };
686 int stat = ASN_OK;
687
688 addSizeConstraint (pctxt, &lsize1);
689
690 stat = decodeOctetString (pctxt,
691 &pvalue->numocts,
692 pvalue->data,
693 sizeof(pvalue->data));
694 if (stat != ASN_OK) return stat;
695 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
696
697 return (stat);
698 }
699
700 /**************************************************************/
701 /* */
702 /* TransportAddress_ipxAddress_netnum */
703 /* */
704 /**************************************************************/
705
706 EXTERN int asn1PD_H225TransportAddress_ipxAddress_netnum (OOCTXT* pctxt, H225TransportAddress_ipxAddress_netnum* pvalue)
707 {
708 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
709 int stat = ASN_OK;
710
711 addSizeConstraint (pctxt, &lsize1);
712
713 stat = decodeOctetString (pctxt,
714 &pvalue->numocts,
715 pvalue->data,
716 sizeof(pvalue->data));
717 if (stat != ASN_OK) return stat;
718 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
719
720 return (stat);
721 }
722
723 /**************************************************************/
724 /* */
725 /* TransportAddress_ipxAddress_port */
726 /* */
727 /**************************************************************/
728
729 EXTERN int asn1PD_H225TransportAddress_ipxAddress_port (OOCTXT* pctxt, H225TransportAddress_ipxAddress_port* pvalue)
730 {
731 static Asn1SizeCnst lsize1 = { 0, 2, 2, 0 };
732 int stat = ASN_OK;
733
734 addSizeConstraint (pctxt, &lsize1);
735
736 stat = decodeOctetString (pctxt,
737 &pvalue->numocts,
738 pvalue->data,
739 sizeof(pvalue->data));
740 if (stat != ASN_OK) return stat;
741 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
742
743 return (stat);
744 }
745
746 /**************************************************************/
747 /* */
748 /* TransportAddress_ipxAddress */
749 /* */
750 /**************************************************************/
751
752 EXTERN int asn1PD_H225TransportAddress_ipxAddress (OOCTXT* pctxt, H225TransportAddress_ipxAddress* pvalue)
753 {
754 int stat = ASN_OK;
755
756 /* decode node */
757
758 invokeStartElement (pctxt, "node", -1);
759
760 stat = asn1PD_H225TransportAddress_ipxAddress_node (pctxt, &pvalue->node);
761 if (stat != ASN_OK) return stat;
762
763 invokeEndElement (pctxt, "node", -1);
764
765 /* decode netnum */
766
767 invokeStartElement (pctxt, "netnum", -1);
768
769 stat = asn1PD_H225TransportAddress_ipxAddress_netnum (pctxt, &pvalue->netnum);
770 if (stat != ASN_OK) return stat;
771
772 invokeEndElement (pctxt, "netnum", -1);
773
774 /* decode port */
775
776 invokeStartElement (pctxt, "port", -1);
777
778 stat = asn1PD_H225TransportAddress_ipxAddress_port (pctxt, &pvalue->port);
779 if (stat != ASN_OK) return stat;
780
781 invokeEndElement (pctxt, "port", -1);
782
783 return (stat);
784 }
785
786 /**************************************************************/
787 /* */
788 /* TransportAddress_ip6Address_ip */
789 /* */
790 /**************************************************************/
791
792 EXTERN int asn1PD_H225TransportAddress_ip6Address_ip (OOCTXT* pctxt, H225TransportAddress_ip6Address_ip* pvalue)
793 {
794 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
795 int stat = ASN_OK;
796
797 addSizeConstraint (pctxt, &lsize1);
798
799 stat = decodeOctetString (pctxt,
800 &pvalue->numocts,
801 pvalue->data,
802 sizeof(pvalue->data));
803 if (stat != ASN_OK) return stat;
804 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
805
806 return (stat);
807 }
808
809 /**************************************************************/
810 /* */
811 /* TransportAddress_ip6Address */
812 /* */
813 /**************************************************************/
814
815 EXTERN int asn1PD_H225TransportAddress_ip6Address (OOCTXT* pctxt, H225TransportAddress_ip6Address* pvalue)
816 {
817 int stat = ASN_OK;
818 OOCTXT lctxt;
819 ASN1OpenType openType;
820 ASN1UINT bitcnt;
821 ASN1UINT i;
822 ASN1BOOL optbit = 0;
823 ASN1BOOL extbit = 0;
824
825 /* extension bit */
826
827 DECODEBIT (pctxt, &extbit);
828
829 /* decode ip */
830
831 invokeStartElement (pctxt, "ip", -1);
832
833 stat = asn1PD_H225TransportAddress_ip6Address_ip (pctxt, &pvalue->ip);
834 if (stat != ASN_OK) return stat;
835
836 invokeEndElement (pctxt, "ip", -1);
837
838 /* decode port */
839
840 invokeStartElement (pctxt, "port", -1);
841
842 stat = decodeConsUInt16 (pctxt, &pvalue->port, 0U, 65535U);
843 if (stat != ASN_OK) return stat;
844 invokeUIntValue (pctxt, pvalue->port);
845
846 invokeEndElement (pctxt, "port", -1);
847
848 if (extbit) {
849
850 /* decode extension optional bits length */
851
852 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
853 if (stat != ASN_OK) return stat;
854
855 bitcnt += 1;
856
857 ZEROCONTEXT (&lctxt);
858 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
859 if (stat != ASN_OK) return stat;
860
861 stat = moveBitCursor (pctxt, bitcnt);
862 if (stat != ASN_OK) return stat;
863
864 for (i = 0; i < bitcnt; i++) {
865 DECODEBIT (&lctxt, &optbit);
866
867 if (optbit) {
868 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
869 if (stat != ASN_OK) return stat;
870
871 pctxt->buffer.byteIndex += openType.numocts;
872 }
873 }
874 }
875
876 return (stat);
877 }
878
879 /**************************************************************/
880 /* */
881 /* TransportAddress_netBios */
882 /* */
883 /**************************************************************/
884
885 EXTERN int asn1PD_H225TransportAddress_netBios (OOCTXT* pctxt, H225TransportAddress_netBios* pvalue)
886 {
887 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
888 int stat = ASN_OK;
889
890 addSizeConstraint (pctxt, &lsize1);
891
892 stat = decodeOctetString (pctxt,
893 &pvalue->numocts,
894 pvalue->data,
895 sizeof(pvalue->data));
896 if (stat != ASN_OK) return stat;
897 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
898
899 return (stat);
900 }
901
902 /**************************************************************/
903 /* */
904 /* TransportAddress_nsap */
905 /* */
906 /**************************************************************/
907
908 EXTERN int asn1PD_H225TransportAddress_nsap (OOCTXT* pctxt, H225TransportAddress_nsap* pvalue)
909 {
910 static Asn1SizeCnst lsize1 = { 0, 1, 20, 0 };
911 int stat = ASN_OK;
912
913 addSizeConstraint (pctxt, &lsize1);
914
915 stat = decodeOctetString (pctxt,
916 &pvalue->numocts,
917 pvalue->data,
918 sizeof(pvalue->data));
919 if (stat != ASN_OK) return stat;
920 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
921
922 return (stat);
923 }
924
925 /**************************************************************/
926 /* */
927 /* H221NonStandard */
928 /* */
929 /**************************************************************/
930
931 EXTERN int asn1PD_H225H221NonStandard (OOCTXT* pctxt, H225H221NonStandard* pvalue)
932 {
933 int stat = ASN_OK;
934 OOCTXT lctxt;
935 ASN1OpenType openType;
936 ASN1UINT bitcnt;
937 ASN1UINT i;
938 ASN1BOOL optbit = 0;
939 ASN1BOOL extbit = 0;
940
941 /* extension bit */
942
943 DECODEBIT (pctxt, &extbit);
944
945 /* decode t35CountryCode */
946
947 invokeStartElement (pctxt, "t35CountryCode", -1);
948
949 stat = decodeConsUInt8 (pctxt, &pvalue->t35CountryCode, 0U, 255U);
950 if (stat != ASN_OK) return stat;
951 invokeUIntValue (pctxt, pvalue->t35CountryCode);
952
953 invokeEndElement (pctxt, "t35CountryCode", -1);
954
955 /* decode t35Extension */
956
957 invokeStartElement (pctxt, "t35Extension", -1);
958
959 stat = decodeConsUInt8 (pctxt, &pvalue->t35Extension, 0U, 255U);
960 if (stat != ASN_OK) return stat;
961 invokeUIntValue (pctxt, pvalue->t35Extension);
962
963 invokeEndElement (pctxt, "t35Extension", -1);
964
965 /* decode manufacturerCode */
966
967 invokeStartElement (pctxt, "manufacturerCode", -1);
968
969 stat = decodeConsUInt16 (pctxt, &pvalue->manufacturerCode, 0U, 65535U);
970 if (stat != ASN_OK) return stat;
971 invokeUIntValue (pctxt, pvalue->manufacturerCode);
972
973 invokeEndElement (pctxt, "manufacturerCode", -1);
974
975 if (extbit) {
976
977 /* decode extension optional bits length */
978
979 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
980 if (stat != ASN_OK) return stat;
981
982 bitcnt += 1;
983
984 ZEROCONTEXT (&lctxt);
985 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
986 if (stat != ASN_OK) return stat;
987
988 stat = moveBitCursor (pctxt, bitcnt);
989 if (stat != ASN_OK) return stat;
990
991 for (i = 0; i < bitcnt; i++) {
992 DECODEBIT (&lctxt, &optbit);
993
994 if (optbit) {
995 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
996 if (stat != ASN_OK) return stat;
997
998 pctxt->buffer.byteIndex += openType.numocts;
999 }
1000 }
1001 }
1002
1003 return (stat);
1004 }
1005
1006 /**************************************************************/
1007 /* */
1008 /* NonStandardIdentifier */
1009 /* */
1010 /**************************************************************/
1011
1012 EXTERN int asn1PD_H225NonStandardIdentifier (OOCTXT* pctxt, H225NonStandardIdentifier* pvalue)
1013 {
1014 int stat = ASN_OK;
1015 ASN1UINT ui;
1016 ASN1OpenType openType;
1017 ASN1BOOL extbit = 0;
1018
1019 /* extension bit */
1020
1021 DECODEBIT (pctxt, &extbit);
1022
1023 if (!extbit) {
1024 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
1025 if (stat != ASN_OK) return stat;
1026 else pvalue->t = ui + 1;
1027
1028 switch (ui) {
1029 /* object */
1030 case 0:
1031 invokeStartElement (pctxt, "object", -1);
1032
1033 pvalue->u.object = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
1034
1035 stat = decodeObjectIdentifier (pctxt, pvalue->u.object);
1036 if (stat != ASN_OK) return stat;
1037 invokeOidValue (pctxt, pvalue->u.object->numids, pvalue->u.object->subid);
1038
1039 invokeEndElement (pctxt, "object", -1);
1040
1041 break;
1042
1043 /* h221NonStandard */
1044 case 1:
1045 invokeStartElement (pctxt, "h221NonStandard", -1);
1046
1047 pvalue->u.h221NonStandard = ALLOC_ASN1ELEM (pctxt, H225H221NonStandard);
1048
1049 stat = asn1PD_H225H221NonStandard (pctxt, pvalue->u.h221NonStandard);
1050 if (stat != ASN_OK) return stat;
1051
1052 invokeEndElement (pctxt, "h221NonStandard", -1);
1053
1054 break;
1055
1056 default:
1057 return ASN_E_INVOPT;
1058 }
1059 }
1060 else {
1061 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1062 if (stat != ASN_OK) return stat;
1063 else pvalue->t = ui + 3;
1064
1065 stat = decodeByteAlign (pctxt);
1066 if (stat != ASN_OK) return stat;
1067
1068 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1069 if (stat != ASN_OK) return stat;
1070
1071 }
1072
1073 return (stat);
1074 }
1075
1076 /**************************************************************/
1077 /* */
1078 /* NonStandardParameter */
1079 /* */
1080 /**************************************************************/
1081
1082 EXTERN int asn1PD_H225NonStandardParameter (OOCTXT* pctxt, H225NonStandardParameter* pvalue)
1083 {
1084 int stat = ASN_OK;
1085
1086 /* decode nonStandardIdentifier */
1087
1088 invokeStartElement (pctxt, "nonStandardIdentifier", -1);
1089
1090 stat = asn1PD_H225NonStandardIdentifier (pctxt, &pvalue->nonStandardIdentifier);
1091 if (stat != ASN_OK) return stat;
1092
1093 invokeEndElement (pctxt, "nonStandardIdentifier", -1);
1094
1095 /* decode data */
1096
1097 invokeStartElement (pctxt, "data", -1);
1098
1099 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->data);
1100 if (stat != ASN_OK) return stat;
1101 invokeOctStrValue (pctxt, pvalue->data.numocts, pvalue->data.data);
1102
1103 invokeEndElement (pctxt, "data", -1);
1104
1105 return (stat);
1106 }
1107
1108 /**************************************************************/
1109 /* */
1110 /* TransportAddress */
1111 /* */
1112 /**************************************************************/
1113
1114 EXTERN int asn1PD_H225TransportAddress (OOCTXT* pctxt, H225TransportAddress* pvalue)
1115 {
1116 int stat = ASN_OK;
1117 ASN1UINT ui;
1118 ASN1OpenType openType;
1119 ASN1BOOL extbit = 0;
1120
1121 /* extension bit */
1122
1123 DECODEBIT (pctxt, &extbit);
1124
1125 if (!extbit) {
1126 stat = decodeConsUnsigned (pctxt, &ui, 0, 6);
1127 if (stat != ASN_OK) return stat;
1128 else pvalue->t = ui + 1;
1129
1130 switch (ui) {
1131 /* ipAddress */
1132 case 0:
1133 invokeStartElement (pctxt, "ipAddress", -1);
1134
1135 pvalue->u.ipAddress = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_ipAddress);
1136
1137 stat = asn1PD_H225TransportAddress_ipAddress (pctxt, pvalue->u.ipAddress);
1138 if (stat != ASN_OK) return stat;
1139
1140 invokeEndElement (pctxt, "ipAddress", -1);
1141
1142 break;
1143
1144 /* ipSourceRoute */
1145 case 1:
1146 invokeStartElement (pctxt, "ipSourceRoute", -1);
1147
1148 pvalue->u.ipSourceRoute = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_ipSourceRoute);
1149
1150 stat = asn1PD_H225TransportAddress_ipSourceRoute (pctxt, pvalue->u.ipSourceRoute);
1151 if (stat != ASN_OK) return stat;
1152
1153 invokeEndElement (pctxt, "ipSourceRoute", -1);
1154
1155 break;
1156
1157 /* ipxAddress */
1158 case 2:
1159 invokeStartElement (pctxt, "ipxAddress", -1);
1160
1161 pvalue->u.ipxAddress = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_ipxAddress);
1162
1163 stat = asn1PD_H225TransportAddress_ipxAddress (pctxt, pvalue->u.ipxAddress);
1164 if (stat != ASN_OK) return stat;
1165
1166 invokeEndElement (pctxt, "ipxAddress", -1);
1167
1168 break;
1169
1170 /* ip6Address */
1171 case 3:
1172 invokeStartElement (pctxt, "ip6Address", -1);
1173
1174 pvalue->u.ip6Address = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_ip6Address);
1175
1176 stat = asn1PD_H225TransportAddress_ip6Address (pctxt, pvalue->u.ip6Address);
1177 if (stat != ASN_OK) return stat;
1178
1179 invokeEndElement (pctxt, "ip6Address", -1);
1180
1181 break;
1182
1183 /* netBios */
1184 case 4:
1185 invokeStartElement (pctxt, "netBios", -1);
1186
1187 pvalue->u.netBios = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_netBios);
1188
1189 stat = asn1PD_H225TransportAddress_netBios (pctxt, pvalue->u.netBios);
1190 if (stat != ASN_OK) return stat;
1191
1192 invokeEndElement (pctxt, "netBios", -1);
1193
1194 break;
1195
1196 /* nsap */
1197 case 5:
1198 invokeStartElement (pctxt, "nsap", -1);
1199
1200 pvalue->u.nsap = ALLOC_ASN1ELEM (pctxt, H225TransportAddress_nsap);
1201
1202 stat = asn1PD_H225TransportAddress_nsap (pctxt, pvalue->u.nsap);
1203 if (stat != ASN_OK) return stat;
1204
1205 invokeEndElement (pctxt, "nsap", -1);
1206
1207 break;
1208
1209 /* nonStandardAddress */
1210 case 6:
1211 invokeStartElement (pctxt, "nonStandardAddress", -1);
1212
1213 pvalue->u.nonStandardAddress = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
1214
1215 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandardAddress);
1216 if (stat != ASN_OK) return stat;
1217
1218 invokeEndElement (pctxt, "nonStandardAddress", -1);
1219
1220 break;
1221
1222 default:
1223 return ASN_E_INVOPT;
1224 }
1225 }
1226 else {
1227 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1228 if (stat != ASN_OK) return stat;
1229 else pvalue->t = ui + 8;
1230
1231 stat = decodeByteAlign (pctxt);
1232 if (stat != ASN_OK) return stat;
1233
1234 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1235 if (stat != ASN_OK) return stat;
1236
1237 }
1238
1239 return (stat);
1240 }
1241
1242 /**************************************************************/
1243 /* */
1244 /* PublicTypeOfNumber */
1245 /* */
1246 /**************************************************************/
1247
1248 EXTERN int asn1PD_H225PublicTypeOfNumber (OOCTXT* pctxt, H225PublicTypeOfNumber* pvalue)
1249 {
1250 int stat = ASN_OK;
1251 ASN1UINT ui;
1252 ASN1OpenType openType;
1253 ASN1BOOL extbit = 0;
1254
1255 /* extension bit */
1256
1257 DECODEBIT (pctxt, &extbit);
1258
1259 if (!extbit) {
1260 stat = decodeConsUnsigned (pctxt, &ui, 0, 5);
1261 if (stat != ASN_OK) return stat;
1262 else pvalue->t = ui + 1;
1263
1264 switch (ui) {
1265 /* unknown */
1266 case 0:
1267 invokeStartElement (pctxt, "unknown", -1);
1268
1269 /* NULL */
1270 invokeNullValue (pctxt);
1271
1272 invokeEndElement (pctxt, "unknown", -1);
1273
1274 break;
1275
1276 /* internationalNumber */
1277 case 1:
1278 invokeStartElement (pctxt, "internationalNumber", -1);
1279
1280 /* NULL */
1281 invokeNullValue (pctxt);
1282
1283 invokeEndElement (pctxt, "internationalNumber", -1);
1284
1285 break;
1286
1287 /* nationalNumber */
1288 case 2:
1289 invokeStartElement (pctxt, "nationalNumber", -1);
1290
1291 /* NULL */
1292 invokeNullValue (pctxt);
1293
1294 invokeEndElement (pctxt, "nationalNumber", -1);
1295
1296 break;
1297
1298 /* networkSpecificNumber */
1299 case 3:
1300 invokeStartElement (pctxt, "networkSpecificNumber", -1);
1301
1302 /* NULL */
1303 invokeNullValue (pctxt);
1304
1305 invokeEndElement (pctxt, "networkSpecificNumber", -1);
1306
1307 break;
1308
1309 /* subscriberNumber */
1310 case 4:
1311 invokeStartElement (pctxt, "subscriberNumber", -1);
1312
1313 /* NULL */
1314 invokeNullValue (pctxt);
1315
1316 invokeEndElement (pctxt, "subscriberNumber", -1);
1317
1318 break;
1319
1320 /* abbreviatedNumber */
1321 case 5:
1322 invokeStartElement (pctxt, "abbreviatedNumber", -1);
1323
1324 /* NULL */
1325 invokeNullValue (pctxt);
1326
1327 invokeEndElement (pctxt, "abbreviatedNumber", -1);
1328
1329 break;
1330
1331 default:
1332 return ASN_E_INVOPT;
1333 }
1334 }
1335 else {
1336 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1337 if (stat != ASN_OK) return stat;
1338 else pvalue->t = ui + 7;
1339
1340 stat = decodeByteAlign (pctxt);
1341 if (stat != ASN_OK) return stat;
1342
1343 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1344 if (stat != ASN_OK) return stat;
1345
1346 }
1347
1348 return (stat);
1349 }
1350
1351 /**************************************************************/
1352 /* */
1353 /* PublicPartyNumber */
1354 /* */
1355 /**************************************************************/
1356
1357 EXTERN int asn1PD_H225PublicPartyNumber (OOCTXT* pctxt, H225PublicPartyNumber* pvalue)
1358 {
1359 int stat = ASN_OK;
1360
1361 /* decode publicTypeOfNumber */
1362
1363 invokeStartElement (pctxt, "publicTypeOfNumber", -1);
1364
1365 stat = asn1PD_H225PublicTypeOfNumber (pctxt, &pvalue->publicTypeOfNumber);
1366 if (stat != ASN_OK) return stat;
1367
1368 invokeEndElement (pctxt, "publicTypeOfNumber", -1);
1369
1370 /* decode publicNumberDigits */
1371
1372 invokeStartElement (pctxt, "publicNumberDigits", -1);
1373
1374 stat = asn1PD_H225NumberDigits (pctxt, &pvalue->publicNumberDigits);
1375 if (stat != ASN_OK) return stat;
1376
1377 invokeEndElement (pctxt, "publicNumberDigits", -1);
1378
1379 return (stat);
1380 }
1381
1382 /**************************************************************/
1383 /* */
1384 /* PrivateTypeOfNumber */
1385 /* */
1386 /**************************************************************/
1387
1388 EXTERN int asn1PD_H225PrivateTypeOfNumber (OOCTXT* pctxt, H225PrivateTypeOfNumber* pvalue)
1389 {
1390 int stat = ASN_OK;
1391 ASN1UINT ui;
1392 ASN1OpenType openType;
1393 ASN1BOOL extbit = 0;
1394
1395 /* extension bit */
1396
1397 DECODEBIT (pctxt, &extbit);
1398
1399 if (!extbit) {
1400 stat = decodeConsUnsigned (pctxt, &ui, 0, 5);
1401 if (stat != ASN_OK) return stat;
1402 else pvalue->t = ui + 1;
1403
1404 switch (ui) {
1405 /* unknown */
1406 case 0:
1407 invokeStartElement (pctxt, "unknown", -1);
1408
1409 /* NULL */
1410 invokeNullValue (pctxt);
1411
1412 invokeEndElement (pctxt, "unknown", -1);
1413
1414 break;
1415
1416 /* level2RegionalNumber */
1417 case 1:
1418 invokeStartElement (pctxt, "level2RegionalNumber", -1);
1419
1420 /* NULL */
1421 invokeNullValue (pctxt);
1422
1423 invokeEndElement (pctxt, "level2RegionalNumber", -1);
1424
1425 break;
1426
1427 /* level1RegionalNumber */
1428 case 2:
1429 invokeStartElement (pctxt, "level1RegionalNumber", -1);
1430
1431 /* NULL */
1432 invokeNullValue (pctxt);
1433
1434 invokeEndElement (pctxt, "level1RegionalNumber", -1);
1435
1436 break;
1437
1438 /* pISNSpecificNumber */
1439 case 3:
1440 invokeStartElement (pctxt, "pISNSpecificNumber", -1);
1441
1442 /* NULL */
1443 invokeNullValue (pctxt);
1444
1445 invokeEndElement (pctxt, "pISNSpecificNumber", -1);
1446
1447 break;
1448
1449 /* localNumber */
1450 case 4:
1451 invokeStartElement (pctxt, "localNumber", -1);
1452
1453 /* NULL */
1454 invokeNullValue (pctxt);
1455
1456 invokeEndElement (pctxt, "localNumber", -1);
1457
1458 break;
1459
1460 /* abbreviatedNumber */
1461 case 5:
1462 invokeStartElement (pctxt, "abbreviatedNumber", -1);
1463
1464 /* NULL */
1465 invokeNullValue (pctxt);
1466
1467 invokeEndElement (pctxt, "abbreviatedNumber", -1);
1468
1469 break;
1470
1471 default:
1472 return ASN_E_INVOPT;
1473 }
1474 }
1475 else {
1476 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1477 if (stat != ASN_OK) return stat;
1478 else pvalue->t = ui + 7;
1479
1480 stat = decodeByteAlign (pctxt);
1481 if (stat != ASN_OK) return stat;
1482
1483 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1484 if (stat != ASN_OK) return stat;
1485
1486 }
1487
1488 return (stat);
1489 }
1490
1491 /**************************************************************/
1492 /* */
1493 /* PrivatePartyNumber */
1494 /* */
1495 /**************************************************************/
1496
1497 EXTERN int asn1PD_H225PrivatePartyNumber (OOCTXT* pctxt, H225PrivatePartyNumber* pvalue)
1498 {
1499 int stat = ASN_OK;
1500
1501 /* decode privateTypeOfNumber */
1502
1503 invokeStartElement (pctxt, "privateTypeOfNumber", -1);
1504
1505 stat = asn1PD_H225PrivateTypeOfNumber (pctxt, &pvalue->privateTypeOfNumber);
1506 if (stat != ASN_OK) return stat;
1507
1508 invokeEndElement (pctxt, "privateTypeOfNumber", -1);
1509
1510 /* decode privateNumberDigits */
1511
1512 invokeStartElement (pctxt, "privateNumberDigits", -1);
1513
1514 stat = asn1PD_H225NumberDigits (pctxt, &pvalue->privateNumberDigits);
1515 if (stat != ASN_OK) return stat;
1516
1517 invokeEndElement (pctxt, "privateNumberDigits", -1);
1518
1519 return (stat);
1520 }
1521
1522 /**************************************************************/
1523 /* */
1524 /* PartyNumber */
1525 /* */
1526 /**************************************************************/
1527
1528 EXTERN int asn1PD_H225PartyNumber (OOCTXT* pctxt, H225PartyNumber* pvalue)
1529 {
1530 int stat = ASN_OK;
1531 ASN1UINT ui;
1532 ASN1OpenType openType;
1533 ASN1BOOL extbit = 0;
1534
1535 /* extension bit */
1536
1537 DECODEBIT (pctxt, &extbit);
1538
1539 if (!extbit) {
1540 stat = decodeConsUnsigned (pctxt, &ui, 0, 4);
1541 if (stat != ASN_OK) return stat;
1542 else pvalue->t = ui + 1;
1543
1544 switch (ui) {
1545 /* e164Number */
1546 case 0:
1547 invokeStartElement (pctxt, "e164Number", -1);
1548
1549 pvalue->u.e164Number = ALLOC_ASN1ELEM (pctxt, H225PublicPartyNumber);
1550
1551 stat = asn1PD_H225PublicPartyNumber (pctxt, pvalue->u.e164Number);
1552 if (stat != ASN_OK) return stat;
1553
1554 invokeEndElement (pctxt, "e164Number", -1);
1555
1556 break;
1557
1558 /* dataPartyNumber */
1559 case 1:
1560 invokeStartElement (pctxt, "dataPartyNumber", -1);
1561
1562 stat = asn1PD_H225NumberDigits (pctxt, &pvalue->u.dataPartyNumber);
1563 if (stat != ASN_OK) return stat;
1564
1565 invokeEndElement (pctxt, "dataPartyNumber", -1);
1566
1567 break;
1568
1569 /* telexPartyNumber */
1570 case 2:
1571 invokeStartElement (pctxt, "telexPartyNumber", -1);
1572
1573 stat = asn1PD_H225NumberDigits (pctxt, &pvalue->u.telexPartyNumber);
1574 if (stat != ASN_OK) return stat;
1575
1576 invokeEndElement (pctxt, "telexPartyNumber", -1);
1577
1578 break;
1579
1580 /* privateNumber */
1581 case 3:
1582 invokeStartElement (pctxt, "privateNumber", -1);
1583
1584 pvalue->u.privateNumber = ALLOC_ASN1ELEM (pctxt, H225PrivatePartyNumber);
1585
1586 stat = asn1PD_H225PrivatePartyNumber (pctxt, pvalue->u.privateNumber);
1587 if (stat != ASN_OK) return stat;
1588
1589 invokeEndElement (pctxt, "privateNumber", -1);
1590
1591 break;
1592
1593 /* nationalStandardPartyNumber */
1594 case 4:
1595 invokeStartElement (pctxt, "nationalStandardPartyNumber", -1);
1596
1597 stat = asn1PD_H225NumberDigits (pctxt, &pvalue->u.nationalStandardPartyNumber);
1598 if (stat != ASN_OK) return stat;
1599
1600 invokeEndElement (pctxt, "nationalStandardPartyNumber", -1);
1601
1602 break;
1603
1604 default:
1605 return ASN_E_INVOPT;
1606 }
1607 }
1608 else {
1609 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1610 if (stat != ASN_OK) return stat;
1611 else pvalue->t = ui + 6;
1612
1613 stat = decodeByteAlign (pctxt);
1614 if (stat != ASN_OK) return stat;
1615
1616 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1617 if (stat != ASN_OK) return stat;
1618
1619 }
1620
1621 return (stat);
1622 }
1623
1624 /**************************************************************/
1625 /* */
1626 /* ANSI_41_UIM_system_id */
1627 /* */
1628 /**************************************************************/
1629
1630 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_system_id_sid_CharSet;
1631
1632 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_system_id_mid_CharSet;
1633
1634 EXTERN int asn1PD_H225ANSI_41_UIM_system_id (OOCTXT* pctxt, H225ANSI_41_UIM_system_id* pvalue)
1635 {
1636 static Asn1SizeCnst sid_lsize1 = { 0, 1, 4, 0 };
1637 static Asn1SizeCnst mid_lsize1 = { 0, 1, 4, 0 };
1638 int stat = ASN_OK;
1639 ASN1UINT ui;
1640 ASN1OpenType openType;
1641 ASN1BOOL extbit = 0;
1642
1643 /* extension bit */
1644
1645 DECODEBIT (pctxt, &extbit);
1646
1647 if (!extbit) {
1648 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
1649 if (stat != ASN_OK) return stat;
1650 else pvalue->t = ui + 1;
1651
1652 switch (ui) {
1653 /* sid */
1654 case 0:
1655 invokeStartElement (pctxt, "sid", -1);
1656
1657 addSizeConstraint (pctxt, &sid_lsize1);
1658
1659 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.sid, gs_H323_MESSAGES_ANSI_41_UIM_system_id_sid_CharSet, 4, 4, 7);
1660 if (stat != ASN_OK) return stat;
1661 invokeCharStrValue (pctxt, pvalue->u.sid);
1662
1663 invokeEndElement (pctxt, "sid", -1);
1664
1665 break;
1666
1667 /* mid */
1668 case 1:
1669 invokeStartElement (pctxt, "mid", -1);
1670
1671 addSizeConstraint (pctxt, &mid_lsize1);
1672
1673 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.mid, gs_H323_MESSAGES_ANSI_41_UIM_system_id_mid_CharSet, 4, 4, 7);
1674 if (stat != ASN_OK) return stat;
1675 invokeCharStrValue (pctxt, pvalue->u.mid);
1676
1677 invokeEndElement (pctxt, "mid", -1);
1678
1679 break;
1680
1681 default:
1682 return ASN_E_INVOPT;
1683 }
1684 }
1685 else {
1686 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
1687 if (stat != ASN_OK) return stat;
1688 else pvalue->t = ui + 3;
1689
1690 stat = decodeByteAlign (pctxt);
1691 if (stat != ASN_OK) return stat;
1692
1693 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
1694 if (stat != ASN_OK) return stat;
1695
1696 }
1697
1698 return (stat);
1699 }
1700
1701 /**************************************************************/
1702 /* */
1703 /* ANSI_41_UIM_systemMyTypeCode */
1704 /* */
1705 /**************************************************************/
1706
1707 EXTERN int asn1PD_H225ANSI_41_UIM_systemMyTypeCode (OOCTXT* pctxt, H225ANSI_41_UIM_systemMyTypeCode* pvalue)
1708 {
1709 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1710 int stat = ASN_OK;
1711
1712 addSizeConstraint (pctxt, &lsize1);
1713
1714 stat = decodeOctetString (pctxt,
1715 &pvalue->numocts,
1716 pvalue->data,
1717 sizeof(pvalue->data));
1718 if (stat != ASN_OK) return stat;
1719 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
1720
1721 return (stat);
1722 }
1723
1724 /**************************************************************/
1725 /* */
1726 /* ANSI_41_UIM_systemAccessType */
1727 /* */
1728 /**************************************************************/
1729
1730 EXTERN int asn1PD_H225ANSI_41_UIM_systemAccessType (OOCTXT* pctxt, H225ANSI_41_UIM_systemAccessType* pvalue)
1731 {
1732 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1733 int stat = ASN_OK;
1734
1735 addSizeConstraint (pctxt, &lsize1);
1736
1737 stat = decodeOctetString (pctxt,
1738 &pvalue->numocts,
1739 pvalue->data,
1740 sizeof(pvalue->data));
1741 if (stat != ASN_OK) return stat;
1742 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
1743
1744 return (stat);
1745 }
1746
1747 /**************************************************************/
1748 /* */
1749 /* ANSI_41_UIM_qualificationInformationCode */
1750 /* */
1751 /**************************************************************/
1752
1753 EXTERN int asn1PD_H225ANSI_41_UIM_qualificationInformationCode (OOCTXT* pctxt, H225ANSI_41_UIM_qualificationInformationCode* pvalue)
1754 {
1755 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1756 int stat = ASN_OK;
1757
1758 addSizeConstraint (pctxt, &lsize1);
1759
1760 stat = decodeOctetString (pctxt,
1761 &pvalue->numocts,
1762 pvalue->data,
1763 sizeof(pvalue->data));
1764 if (stat != ASN_OK) return stat;
1765 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
1766
1767 return (stat);
1768 }
1769
1770 /**************************************************************/
1771 /* */
1772 /* ANSI_41_UIM */
1773 /* */
1774 /**************************************************************/
1775
1776 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_imsi_CharSet;
1777
1778 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_min_CharSet;
1779
1780 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_mdn_CharSet;
1781
1782 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_msisdn_CharSet;
1783
1784 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_esn_CharSet;
1785
1786 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_mscid_CharSet;
1787
1788 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_sesn_CharSet;
1789
1790 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_soc_CharSet;
1791
1792 EXTERN int asn1PD_H225ANSI_41_UIM (OOCTXT* pctxt, H225ANSI_41_UIM* pvalue)
1793 {
1794 static Asn1SizeCnst imsi_lsize1 = { 0, 3, 16, 0 };
1795 static Asn1SizeCnst min_lsize1 = { 0, 3, 16, 0 };
1796 static Asn1SizeCnst mdn_lsize1 = { 0, 3, 16, 0 };
1797 static Asn1SizeCnst msisdn_lsize1 = { 0, 3, 16, 0 };
1798 static Asn1SizeCnst esn_lsize1 = { 0, 16, 16, 0 };
1799 static Asn1SizeCnst mscid_lsize1 = { 0, 3, 16, 0 };
1800 static Asn1SizeCnst sesn_lsize1 = { 0, 16, 16, 0 };
1801 static Asn1SizeCnst soc_lsize1 = { 0, 3, 16, 0 };
1802 int stat = ASN_OK;
1803 OOCTXT lctxt;
1804 ASN1OpenType openType;
1805 ASN1UINT bitcnt;
1806 ASN1UINT i;
1807 ASN1BOOL optbit = 0;
1808 ASN1BOOL extbit = 0;
1809
1810 /* extension bit */
1811
1812 DECODEBIT (pctxt, &extbit);
1813
1814 /* optional bits */
1815
1816 memset (&pvalue->m, 0, sizeof(pvalue->m));
1817
1818 DECODEBIT (pctxt, &optbit);
1819 pvalue->m.imsiPresent = optbit;
1820
1821 DECODEBIT (pctxt, &optbit);
1822 pvalue->m.minPresent = optbit;
1823
1824 DECODEBIT (pctxt, &optbit);
1825 pvalue->m.mdnPresent = optbit;
1826
1827 DECODEBIT (pctxt, &optbit);
1828 pvalue->m.msisdnPresent = optbit;
1829
1830 DECODEBIT (pctxt, &optbit);
1831 pvalue->m.esnPresent = optbit;
1832
1833 DECODEBIT (pctxt, &optbit);
1834 pvalue->m.mscidPresent = optbit;
1835
1836 DECODEBIT (pctxt, &optbit);
1837 pvalue->m.systemMyTypeCodePresent = optbit;
1838
1839 DECODEBIT (pctxt, &optbit);
1840 pvalue->m.systemAccessTypePresent = optbit;
1841
1842 DECODEBIT (pctxt, &optbit);
1843 pvalue->m.qualificationInformationCodePresent = optbit;
1844
1845 DECODEBIT (pctxt, &optbit);
1846 pvalue->m.sesnPresent = optbit;
1847
1848 DECODEBIT (pctxt, &optbit);
1849 pvalue->m.socPresent = optbit;
1850
1851 /* decode imsi */
1852
1853 if (pvalue->m.imsiPresent) {
1854 invokeStartElement (pctxt, "imsi", -1);
1855
1856 addSizeConstraint (pctxt, &imsi_lsize1);
1857
1858 stat = decodeConstrainedStringEx (pctxt, &pvalue->imsi, gs_H323_MESSAGES_ANSI_41_UIM_imsi_CharSet, 4, 4, 7);
1859 if (stat != ASN_OK) return stat;
1860 invokeCharStrValue (pctxt, pvalue->imsi);
1861
1862 invokeEndElement (pctxt, "imsi", -1);
1863 }
1864
1865 /* decode min */
1866
1867 if (pvalue->m.minPresent) {
1868 invokeStartElement (pctxt, "min", -1);
1869
1870 addSizeConstraint (pctxt, &min_lsize1);
1871
1872 stat = decodeConstrainedStringEx (pctxt, &pvalue->min, gs_H323_MESSAGES_ANSI_41_UIM_min_CharSet, 4, 4, 7);
1873 if (stat != ASN_OK) return stat;
1874 invokeCharStrValue (pctxt, pvalue->min);
1875
1876 invokeEndElement (pctxt, "min", -1);
1877 }
1878
1879 /* decode mdn */
1880
1881 if (pvalue->m.mdnPresent) {
1882 invokeStartElement (pctxt, "mdn", -1);
1883
1884 addSizeConstraint (pctxt, &mdn_lsize1);
1885
1886 stat = decodeConstrainedStringEx (pctxt, &pvalue->mdn, gs_H323_MESSAGES_ANSI_41_UIM_mdn_CharSet, 4, 4, 7);
1887 if (stat != ASN_OK) return stat;
1888 invokeCharStrValue (pctxt, pvalue->mdn);
1889
1890 invokeEndElement (pctxt, "mdn", -1);
1891 }
1892
1893 /* decode msisdn */
1894
1895 if (pvalue->m.msisdnPresent) {
1896 invokeStartElement (pctxt, "msisdn", -1);
1897
1898 addSizeConstraint (pctxt, &msisdn_lsize1);
1899
1900 stat = decodeConstrainedStringEx (pctxt, &pvalue->msisdn, gs_H323_MESSAGES_ANSI_41_UIM_msisdn_CharSet, 4, 4, 7);
1901 if (stat != ASN_OK) return stat;
1902 invokeCharStrValue (pctxt, pvalue->msisdn);
1903
1904 invokeEndElement (pctxt, "msisdn", -1);
1905 }
1906
1907 /* decode esn */
1908
1909 if (pvalue->m.esnPresent) {
1910 invokeStartElement (pctxt, "esn", -1);
1911
1912 addSizeConstraint (pctxt, &esn_lsize1);
1913
1914 stat = decodeConstrainedStringEx (pctxt, &pvalue->esn, gs_H323_MESSAGES_ANSI_41_UIM_esn_CharSet, 4, 4, 7);
1915 if (stat != ASN_OK) return stat;
1916 invokeCharStrValue (pctxt, pvalue->esn);
1917
1918 invokeEndElement (pctxt, "esn", -1);
1919 }
1920
1921 /* decode mscid */
1922
1923 if (pvalue->m.mscidPresent) {
1924 invokeStartElement (pctxt, "mscid", -1);
1925
1926 addSizeConstraint (pctxt, &mscid_lsize1);
1927
1928 stat = decodeConstrainedStringEx (pctxt, &pvalue->mscid, gs_H323_MESSAGES_ANSI_41_UIM_mscid_CharSet, 4, 4, 7);
1929 if (stat != ASN_OK) return stat;
1930 invokeCharStrValue (pctxt, pvalue->mscid);
1931
1932 invokeEndElement (pctxt, "mscid", -1);
1933 }
1934
1935 /* decode system_id */
1936
1937 invokeStartElement (pctxt, "system_id", -1);
1938
1939 stat = asn1PD_H225ANSI_41_UIM_system_id (pctxt, &pvalue->system_id);
1940 if (stat != ASN_OK) return stat;
1941
1942 invokeEndElement (pctxt, "system_id", -1);
1943
1944 /* decode systemMyTypeCode */
1945
1946 if (pvalue->m.systemMyTypeCodePresent) {
1947 invokeStartElement (pctxt, "systemMyTypeCode", -1);
1948
1949 stat = asn1PD_H225ANSI_41_UIM_systemMyTypeCode (pctxt, &pvalue->systemMyTypeCode);
1950 if (stat != ASN_OK) return stat;
1951
1952 invokeEndElement (pctxt, "systemMyTypeCode", -1);
1953 }
1954
1955 /* decode systemAccessType */
1956
1957 if (pvalue->m.systemAccessTypePresent) {
1958 invokeStartElement (pctxt, "systemAccessType", -1);
1959
1960 stat = asn1PD_H225ANSI_41_UIM_systemAccessType (pctxt, &pvalue->systemAccessType);
1961 if (stat != ASN_OK) return stat;
1962
1963 invokeEndElement (pctxt, "systemAccessType", -1);
1964 }
1965
1966 /* decode qualificationInformationCode */
1967
1968 if (pvalue->m.qualificationInformationCodePresent) {
1969 invokeStartElement (pctxt, "qualificationInformationCode", -1);
1970
1971 stat = asn1PD_H225ANSI_41_UIM_qualificationInformationCode (pctxt, &pvalue->qualificationInformationCode);
1972 if (stat != ASN_OK) return stat;
1973
1974 invokeEndElement (pctxt, "qualificationInformationCode", -1);
1975 }
1976
1977 /* decode sesn */
1978
1979 if (pvalue->m.sesnPresent) {
1980 invokeStartElement (pctxt, "sesn", -1);
1981
1982 addSizeConstraint (pctxt, &sesn_lsize1);
1983
1984 stat = decodeConstrainedStringEx (pctxt, &pvalue->sesn, gs_H323_MESSAGES_ANSI_41_UIM_sesn_CharSet, 4, 4, 7);
1985 if (stat != ASN_OK) return stat;
1986 invokeCharStrValue (pctxt, pvalue->sesn);
1987
1988 invokeEndElement (pctxt, "sesn", -1);
1989 }
1990
1991 /* decode soc */
1992
1993 if (pvalue->m.socPresent) {
1994 invokeStartElement (pctxt, "soc", -1);
1995
1996 addSizeConstraint (pctxt, &soc_lsize1);
1997
1998 stat = decodeConstrainedStringEx (pctxt, &pvalue->soc, gs_H323_MESSAGES_ANSI_41_UIM_soc_CharSet, 4, 4, 7);
1999 if (stat != ASN_OK) return stat;
2000 invokeCharStrValue (pctxt, pvalue->soc);
2001
2002 invokeEndElement (pctxt, "soc", -1);
2003 }
2004
2005 if (extbit) {
2006
2007 /* decode extension optional bits length */
2008
2009 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
2010 if (stat != ASN_OK) return stat;
2011
2012 bitcnt += 1;
2013
2014 ZEROCONTEXT (&lctxt);
2015 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
2016 if (stat != ASN_OK) return stat;
2017
2018 stat = moveBitCursor (pctxt, bitcnt);
2019 if (stat != ASN_OK) return stat;
2020
2021 for (i = 0; i < bitcnt; i++) {
2022 DECODEBIT (&lctxt, &optbit);
2023
2024 if (optbit) {
2025 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2026 if (stat != ASN_OK) return stat;
2027
2028 pctxt->buffer.byteIndex += openType.numocts;
2029 }
2030 }
2031 }
2032
2033 return (stat);
2034 }
2035
2036 /**************************************************************/
2037 /* */
2038 /* GSM_UIM_tmsi */
2039 /* */
2040 /**************************************************************/
2041
2042 EXTERN int asn1PD_H225GSM_UIM_tmsi (OOCTXT* pctxt, H225GSM_UIM_tmsi* pvalue)
2043 {
2044 static Asn1SizeCnst lsize1 = { 0, 1, 4, 0 };
2045 int stat = ASN_OK;
2046
2047 addSizeConstraint (pctxt, &lsize1);
2048
2049 stat = decodeOctetString (pctxt,
2050 &pvalue->numocts,
2051 pvalue->data,
2052 sizeof(pvalue->data));
2053 if (stat != ASN_OK) return stat;
2054 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
2055
2056 return (stat);
2057 }
2058
2059 /**************************************************************/
2060 /* */
2061 /* GSM_UIM */
2062 /* */
2063 /**************************************************************/
2064
2065 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_imsi_CharSet;
2066
2067 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_msisdn_CharSet;
2068
2069 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_imei_CharSet;
2070
2071 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_hplmn_CharSet;
2072
2073 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet;
2074
2075 EXTERN int asn1PD_H225GSM_UIM (OOCTXT* pctxt, H225GSM_UIM* pvalue)
2076 {
2077 static Asn1SizeCnst imsi_lsize1 = { 0, 3, 16, 0 };
2078 static Asn1SizeCnst msisdn_lsize1 = { 0, 3, 16, 0 };
2079 static Asn1SizeCnst imei_lsize1 = { 0, 15, 16, 0 };
2080 static Asn1SizeCnst hplmn_lsize1 = { 0, 1, 4, 0 };
2081 static Asn1SizeCnst vplmn_lsize1 = { 0, 1, 4, 0 };
2082 int stat = ASN_OK;
2083 OOCTXT lctxt;
2084 ASN1OpenType openType;
2085 ASN1UINT bitcnt;
2086 ASN1UINT i;
2087 ASN1BOOL optbit = 0;
2088 ASN1BOOL extbit = 0;
2089
2090 /* extension bit */
2091
2092 DECODEBIT (pctxt, &extbit);
2093
2094 /* optional bits */
2095
2096 memset (&pvalue->m, 0, sizeof(pvalue->m));
2097
2098 DECODEBIT (pctxt, &optbit);
2099 pvalue->m.imsiPresent = optbit;
2100
2101 DECODEBIT (pctxt, &optbit);
2102 pvalue->m.tmsiPresent = optbit;
2103
2104 DECODEBIT (pctxt, &optbit);
2105 pvalue->m.msisdnPresent = optbit;
2106
2107 DECODEBIT (pctxt, &optbit);
2108 pvalue->m.imeiPresent = optbit;
2109
2110 DECODEBIT (pctxt, &optbit);
2111 pvalue->m.hplmnPresent = optbit;
2112
2113 DECODEBIT (pctxt, &optbit);
2114 pvalue->m.vplmnPresent = optbit;
2115
2116 /* decode imsi */
2117
2118 if (pvalue->m.imsiPresent) {
2119 invokeStartElement (pctxt, "imsi", -1);
2120
2121 addSizeConstraint (pctxt, &imsi_lsize1);
2122
2123 stat = decodeConstrainedStringEx (pctxt, &pvalue->imsi, gs_H323_MESSAGES_GSM_UIM_imsi_CharSet, 4, 4, 7);
2124 if (stat != ASN_OK) return stat;
2125 invokeCharStrValue (pctxt, pvalue->imsi);
2126
2127 invokeEndElement (pctxt, "imsi", -1);
2128 }
2129
2130 /* decode tmsi */
2131
2132 if (pvalue->m.tmsiPresent) {
2133 invokeStartElement (pctxt, "tmsi", -1);
2134
2135 stat = asn1PD_H225GSM_UIM_tmsi (pctxt, &pvalue->tmsi);
2136 if (stat != ASN_OK) return stat;
2137
2138 invokeEndElement (pctxt, "tmsi", -1);
2139 }
2140
2141 /* decode msisdn */
2142
2143 if (pvalue->m.msisdnPresent) {
2144 invokeStartElement (pctxt, "msisdn", -1);
2145
2146 addSizeConstraint (pctxt, &msisdn_lsize1);
2147
2148 stat = decodeConstrainedStringEx (pctxt, &pvalue->msisdn, gs_H323_MESSAGES_GSM_UIM_msisdn_CharSet, 4, 4, 7);
2149 if (stat != ASN_OK) return stat;
2150 invokeCharStrValue (pctxt, pvalue->msisdn);
2151
2152 invokeEndElement (pctxt, "msisdn", -1);
2153 }
2154
2155 /* decode imei */
2156
2157 if (pvalue->m.imeiPresent) {
2158 invokeStartElement (pctxt, "imei", -1);
2159
2160 addSizeConstraint (pctxt, &imei_lsize1);
2161
2162 stat = decodeConstrainedStringEx (pctxt, &pvalue->imei, gs_H323_MESSAGES_GSM_UIM_imei_CharSet, 4, 4, 7);
2163 if (stat != ASN_OK) return stat;
2164 invokeCharStrValue (pctxt, pvalue->imei);
2165
2166 invokeEndElement (pctxt, "imei", -1);
2167 }
2168
2169 /* decode hplmn */
2170
2171 if (pvalue->m.hplmnPresent) {
2172 invokeStartElement (pctxt, "hplmn", -1);
2173
2174 addSizeConstraint (pctxt, &hplmn_lsize1);
2175
2176 stat = decodeConstrainedStringEx (pctxt, &pvalue->hplmn, gs_H323_MESSAGES_GSM_UIM_hplmn_CharSet, 4, 4, 7);
2177 if (stat != ASN_OK) return stat;
2178 invokeCharStrValue (pctxt, pvalue->hplmn);
2179
2180 invokeEndElement (pctxt, "hplmn", -1);
2181 }
2182
2183 /* decode vplmn */
2184
2185 if (pvalue->m.vplmnPresent) {
2186 invokeStartElement (pctxt, "vplmn", -1);
2187
2188 addSizeConstraint (pctxt, &vplmn_lsize1);
2189
2190 stat = decodeConstrainedStringEx (pctxt, &pvalue->vplmn, gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet, 4, 4, 7);
2191 if (stat != ASN_OK) return stat;
2192 invokeCharStrValue (pctxt, pvalue->vplmn);
2193
2194 invokeEndElement (pctxt, "vplmn", -1);
2195 }
2196
2197 if (extbit) {
2198
2199 /* decode extension optional bits length */
2200
2201 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
2202 if (stat != ASN_OK) return stat;
2203
2204 bitcnt += 1;
2205
2206 ZEROCONTEXT (&lctxt);
2207 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
2208 if (stat != ASN_OK) return stat;
2209
2210 stat = moveBitCursor (pctxt, bitcnt);
2211 if (stat != ASN_OK) return stat;
2212
2213 for (i = 0; i < bitcnt; i++) {
2214 DECODEBIT (&lctxt, &optbit);
2215
2216 if (optbit) {
2217 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2218 if (stat != ASN_OK) return stat;
2219
2220 pctxt->buffer.byteIndex += openType.numocts;
2221 }
2222 }
2223 }
2224
2225 return (stat);
2226 }
2227
2228 /**************************************************************/
2229 /* */
2230 /* MobileUIM */
2231 /* */
2232 /**************************************************************/
2233
2234 EXTERN int asn1PD_H225MobileUIM (OOCTXT* pctxt, H225MobileUIM* pvalue)
2235 {
2236 int stat = ASN_OK;
2237 ASN1UINT ui;
2238 ASN1OpenType openType;
2239 ASN1BOOL extbit = 0;
2240
2241 /* extension bit */
2242
2243 DECODEBIT (pctxt, &extbit);
2244
2245 if (!extbit) {
2246 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
2247 if (stat != ASN_OK) return stat;
2248 else pvalue->t = ui + 1;
2249
2250 switch (ui) {
2251 /* ansi_41_uim */
2252 case 0:
2253 invokeStartElement (pctxt, "ansi_41_uim", -1);
2254
2255 pvalue->u.ansi_41_uim = ALLOC_ASN1ELEM (pctxt, H225ANSI_41_UIM);
2256
2257 stat = asn1PD_H225ANSI_41_UIM (pctxt, pvalue->u.ansi_41_uim);
2258 if (stat != ASN_OK) return stat;
2259
2260 invokeEndElement (pctxt, "ansi_41_uim", -1);
2261
2262 break;
2263
2264 /* gsm_uim */
2265 case 1:
2266 invokeStartElement (pctxt, "gsm_uim", -1);
2267
2268 pvalue->u.gsm_uim = ALLOC_ASN1ELEM (pctxt, H225GSM_UIM);
2269
2270 stat = asn1PD_H225GSM_UIM (pctxt, pvalue->u.gsm_uim);
2271 if (stat != ASN_OK) return stat;
2272
2273 invokeEndElement (pctxt, "gsm_uim", -1);
2274
2275 break;
2276
2277 default:
2278 return ASN_E_INVOPT;
2279 }
2280 }
2281 else {
2282 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
2283 if (stat != ASN_OK) return stat;
2284 else pvalue->t = ui + 3;
2285
2286 stat = decodeByteAlign (pctxt);
2287 if (stat != ASN_OK) return stat;
2288
2289 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2290 if (stat != ASN_OK) return stat;
2291
2292 }
2293
2294 return (stat);
2295 }
2296
2297 /**************************************************************/
2298 /* */
2299 /* AliasAddress */
2300 /* */
2301 /**************************************************************/
2302
2303 extern EXTERN const char* gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet;
2304
2305 EXTERN int asn1PD_H225AliasAddress (OOCTXT* pctxt, H225AliasAddress* pvalue)
2306 {
2307 static Asn1SizeCnst dialedDigits_lsize1 = { 0, 1, 128, 0 };
2308 static Asn1SizeCnst h323_ID_lsize1 = { 0, 1, 256, 0 };
2309 static Asn1SizeCnst url_ID_lsize1 = { 0, 1, 512, 0 };
2310 static Asn1SizeCnst email_ID_lsize1 = { 0, 1, 512, 0 };
2311 int stat = ASN_OK;
2312 ASN1UINT ui;
2313 ASN1OpenType openType;
2314 ASN1BOOL extbit = 0;
2315 OOCTXT lctxt;
2316
2317 /* extension bit */
2318
2319 DECODEBIT (pctxt, &extbit);
2320
2321 if (!extbit) {
2322 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
2323 if (stat != ASN_OK) return stat;
2324 else pvalue->t = ui + 1;
2325
2326 switch (ui) {
2327 /* dialedDigits */
2328 case 0:
2329 invokeStartElement (pctxt, "dialedDigits", -1);
2330
2331 addSizeConstraint (pctxt, &dialedDigits_lsize1);
2332
2333 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.dialedDigits, gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet, 4, 4, 7);
2334 if (stat != ASN_OK) return stat;
2335 invokeCharStrValue (pctxt, pvalue->u.dialedDigits);
2336
2337 invokeEndElement (pctxt, "dialedDigits", -1);
2338
2339 break;
2340
2341 /* h323_ID */
2342 case 1:
2343 invokeStartElement (pctxt, "h323_ID", -1);
2344
2345 addSizeConstraint (pctxt, &h323_ID_lsize1);
2346
2347 stat = decodeBMPString (pctxt, &pvalue->u.h323_ID, 0);
2348 if (stat != ASN_OK) return stat;
2349 invokeCharStr16BitValue (pctxt, pvalue->u.h323_ID.nchars, pvalue->u.h323_ID.data);
2350
2351 invokeEndElement (pctxt, "h323_ID", -1);
2352
2353 break;
2354
2355 default:
2356 return ASN_E_INVOPT;
2357 }
2358 }
2359 else {
2360 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
2361 if (stat != ASN_OK) return stat;
2362 else pvalue->t = ui + 3;
2363
2364 stat = decodeByteAlign (pctxt);
2365 if (stat != ASN_OK) return stat;
2366
2367 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2368 if (stat != ASN_OK) return stat;
2369
2370 copyContext (&lctxt, pctxt);
2371 initContextBuffer (pctxt, openType.data, openType.numocts);
2372
2373 switch (pvalue->t) {
2374 /* url_ID */
2375 case 3:
2376 invokeStartElement (pctxt, "url_ID", -1);
2377
2378 addSizeConstraint (pctxt, &url_ID_lsize1);
2379
2380 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.url_ID, 0, 8, 7, 7);
2381 if (stat != ASN_OK) return stat;
2382 invokeCharStrValue (pctxt, pvalue->u.url_ID);
2383
2384 invokeEndElement (pctxt, "url_ID", -1);
2385
2386 break;
2387
2388 /* transportID */
2389 case 4:
2390 invokeStartElement (pctxt, "transportID", -1);
2391
2392 pvalue->u.transportID = ALLOC_ASN1ELEM (pctxt, H225TransportAddress);
2393
2394 stat = asn1PD_H225TransportAddress (pctxt, pvalue->u.transportID);
2395 if (stat != ASN_OK) return stat;
2396
2397 invokeEndElement (pctxt, "transportID", -1);
2398
2399 break;
2400
2401 /* email_ID */
2402 case 5:
2403 invokeStartElement (pctxt, "email_ID", -1);
2404
2405 addSizeConstraint (pctxt, &email_ID_lsize1);
2406
2407 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.email_ID, 0, 8, 7, 7);
2408 if (stat != ASN_OK) return stat;
2409 invokeCharStrValue (pctxt, pvalue->u.email_ID);
2410
2411 invokeEndElement (pctxt, "email_ID", -1);
2412
2413 break;
2414
2415 /* partyNumber */
2416 case 6:
2417 invokeStartElement (pctxt, "partyNumber", -1);
2418
2419 pvalue->u.partyNumber = ALLOC_ASN1ELEM (pctxt, H225PartyNumber);
2420
2421 stat = asn1PD_H225PartyNumber (pctxt, pvalue->u.partyNumber);
2422 if (stat != ASN_OK) return stat;
2423
2424 invokeEndElement (pctxt, "partyNumber", -1);
2425
2426 break;
2427
2428 /* mobileUIM */
2429 case 7:
2430 invokeStartElement (pctxt, "mobileUIM", -1);
2431
2432 pvalue->u.mobileUIM = ALLOC_ASN1ELEM (pctxt, H225MobileUIM);
2433
2434 stat = asn1PD_H225MobileUIM (pctxt, pvalue->u.mobileUIM);
2435 if (stat != ASN_OK) return stat;
2436
2437 invokeEndElement (pctxt, "mobileUIM", -1);
2438
2439 break;
2440
2441 default:;
2442 }
2443
2444 copyContext (pctxt, &lctxt);
2445 }
2446
2447 return (stat);
2448 }
2449
2450 /**************************************************************/
2451 /* */
2452 /* Content_compound */
2453 /* */
2454 /**************************************************************/
2455
2456 EXTERN int asn1PD_H225Content_compound (OOCTXT* pctxt, H225Content_compound* pvalue)
2457 {
2458 static Asn1SizeCnst lsize1 = { 0, 1, 512, 0 };
2459 int stat = ASN_OK;
2460 H225EnumeratedParameter* pdata;
2461 ASN1UINT count = 0;
2462 ASN1UINT xx1;
2463
2464 /* decode length determinant */
2465
2466 addSizeConstraint (pctxt, &lsize1);
2467
2468 stat = decodeLength (pctxt, &count);
2469 if (stat != ASN_OK) return stat;
2470
2471 /* decode elements */
2472
2473 dListInit (pvalue);
2474
2475 for (xx1 = 0; xx1 < count; xx1++) {
2476 invokeStartElement (pctxt, "elem", xx1);
2477
2478 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225EnumeratedParameter);
2479
2480 stat = asn1PD_H225EnumeratedParameter (pctxt, (H225EnumeratedParameter*)pdata);
2481 if (stat != ASN_OK) return stat;
2482 invokeEndElement (pctxt, "elem", xx1);
2483
2484 dListAppendNode (pctxt, pvalue, pdata);
2485 }
2486
2487 return (stat);
2488 }
2489
2490 /**************************************************************/
2491 /* */
2492 /* Content_nested */
2493 /* */
2494 /**************************************************************/
2495
2496 EXTERN int asn1PD_H225Content_nested (OOCTXT* pctxt, H225Content_nested* pvalue)
2497 {
2498 static Asn1SizeCnst lsize1 = { 0, 1, 16, 0 };
2499 int stat = ASN_OK;
2500 H225GenericData* pdata;
2501 ASN1UINT count = 0;
2502 ASN1UINT xx1;
2503
2504 /* decode length determinant */
2505
2506 addSizeConstraint (pctxt, &lsize1);
2507
2508 stat = decodeLength (pctxt, &count);
2509 if (stat != ASN_OK) return stat;
2510
2511 /* decode elements */
2512
2513 dListInit (pvalue);
2514
2515 for (xx1 = 0; xx1 < count; xx1++) {
2516 invokeStartElement (pctxt, "elem", xx1);
2517
2518 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225GenericData);
2519
2520 stat = asn1PD_H225GenericData (pctxt, (H225GenericData*)pdata);
2521 if (stat != ASN_OK) return stat;
2522 invokeEndElement (pctxt, "elem", xx1);
2523
2524 dListAppendNode (pctxt, pvalue, pdata);
2525 }
2526
2527 return (stat);
2528 }
2529
2530 /**************************************************************/
2531 /* */
2532 /* Content */
2533 /* */
2534 /**************************************************************/
2535
2536 EXTERN int asn1PD_H225Content (OOCTXT* pctxt, H225Content* pvalue)
2537 {
2538 int stat = ASN_OK;
2539 ASN1UINT ui;
2540 ASN1OpenType openType;
2541 ASN1BOOL extbit = 0;
2542
2543 /* extension bit */
2544
2545 DECODEBIT (pctxt, &extbit);
2546
2547 if (!extbit) {
2548 stat = decodeConsUnsigned (pctxt, &ui, 0, 11);
2549 if (stat != ASN_OK) return stat;
2550 else pvalue->t = ui + 1;
2551
2552 switch (ui) {
2553 /* raw */
2554 case 0:
2555 invokeStartElement (pctxt, "raw", -1);
2556
2557 pvalue->u.raw = ALLOC_ASN1ELEM (pctxt, ASN1DynOctStr);
2558
2559 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)pvalue->u.raw);
2560 if (stat != ASN_OK) return stat;
2561 invokeOctStrValue (pctxt, pvalue->u.raw->numocts, pvalue->u.raw->data);
2562
2563 invokeEndElement (pctxt, "raw", -1);
2564
2565 break;
2566
2567 /* text */
2568 case 1:
2569 invokeStartElement (pctxt, "text", -1);
2570
2571 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.text, 0, 8, 7, 7);
2572 if (stat != ASN_OK) return stat;
2573 invokeCharStrValue (pctxt, pvalue->u.text);
2574
2575 invokeEndElement (pctxt, "text", -1);
2576
2577 break;
2578
2579 /* unicode */
2580 case 2:
2581 invokeStartElement (pctxt, "unicode", -1);
2582
2583 stat = decodeBMPString (pctxt, &pvalue->u.unicode, 0);
2584 if (stat != ASN_OK) return stat;
2585 invokeCharStr16BitValue (pctxt, pvalue->u.unicode.nchars, pvalue->u.unicode.data);
2586
2587 invokeEndElement (pctxt, "unicode", -1);
2588
2589 break;
2590
2591 /* bool_ */
2592 case 3:
2593 invokeStartElement (pctxt, "bool_", -1);
2594
2595 stat = DECODEBIT (pctxt, &pvalue->u.bool_);
2596 if (stat != ASN_OK) return stat;
2597 invokeBoolValue (pctxt, pvalue->u.bool_);
2598
2599 invokeEndElement (pctxt, "bool_", -1);
2600
2601 break;
2602
2603 /* number8 */
2604 case 4:
2605 invokeStartElement (pctxt, "number8", -1);
2606
2607 stat = decodeConsUInt8 (pctxt, &pvalue->u.number8, 0U, 255U);
2608 if (stat != ASN_OK) return stat;
2609 invokeUIntValue (pctxt, pvalue->u.number8);
2610
2611 invokeEndElement (pctxt, "number8", -1);
2612
2613 break;
2614
2615 /* number16 */
2616 case 5:
2617 invokeStartElement (pctxt, "number16", -1);
2618
2619 stat = decodeConsUInt16 (pctxt, &pvalue->u.number16, 0U, 65535U);
2620 if (stat != ASN_OK) return stat;
2621 invokeUIntValue (pctxt, pvalue->u.number16);
2622
2623 invokeEndElement (pctxt, "number16", -1);
2624
2625 break;
2626
2627 /* number32 */
2628 case 6:
2629 invokeStartElement (pctxt, "number32", -1);
2630
2631 stat = decodeConsUnsigned (pctxt, &pvalue->u.number32, 0U, ASN1UINT_MAX);
2632 if (stat != ASN_OK) return stat;
2633 invokeUIntValue (pctxt, pvalue->u.number32);
2634
2635 invokeEndElement (pctxt, "number32", -1);
2636
2637 break;
2638
2639 /* id */
2640 case 7:
2641 invokeStartElement (pctxt, "id", -1);
2642
2643 pvalue->u.id = ALLOC_ASN1ELEM (pctxt, H225GenericIdentifier);
2644
2645 stat = asn1PD_H225GenericIdentifier (pctxt, pvalue->u.id);
2646 if (stat != ASN_OK) return stat;
2647
2648 invokeEndElement (pctxt, "id", -1);
2649
2650 break;
2651
2652 /* alias */
2653 case 8:
2654 invokeStartElement (pctxt, "alias", -1);
2655
2656 pvalue->u.alias = ALLOC_ASN1ELEM (pctxt, H225AliasAddress);
2657
2658 stat = asn1PD_H225AliasAddress (pctxt, pvalue->u.alias);
2659 if (stat != ASN_OK) return stat;
2660
2661 invokeEndElement (pctxt, "alias", -1);
2662
2663 break;
2664
2665 /* transport */
2666 case 9:
2667 invokeStartElement (pctxt, "transport", -1);
2668
2669 pvalue->u.transport = ALLOC_ASN1ELEM (pctxt, H225TransportAddress);
2670
2671 stat = asn1PD_H225TransportAddress (pctxt, pvalue->u.transport);
2672 if (stat != ASN_OK) return stat;
2673
2674 invokeEndElement (pctxt, "transport", -1);
2675
2676 break;
2677
2678 /* compound */
2679 case 10:
2680 invokeStartElement (pctxt, "compound", -1);
2681
2682 pvalue->u.compound = ALLOC_ASN1ELEM (pctxt, H225Content_compound);
2683
2684 stat = asn1PD_H225Content_compound (pctxt, pvalue->u.compound);
2685 if (stat != ASN_OK) return stat;
2686
2687 invokeEndElement (pctxt, "compound", -1);
2688
2689 break;
2690
2691 /* nested */
2692 case 11:
2693 invokeStartElement (pctxt, "nested", -1);
2694
2695 pvalue->u.nested = ALLOC_ASN1ELEM (pctxt, H225Content_nested);
2696
2697 stat = asn1PD_H225Content_nested (pctxt, pvalue->u.nested);
2698 if (stat != ASN_OK) return stat;
2699
2700 invokeEndElement (pctxt, "nested", -1);
2701
2702 break;
2703
2704 default:
2705 return ASN_E_INVOPT;
2706 }
2707 }
2708 else {
2709 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
2710 if (stat != ASN_OK) return stat;
2711 else pvalue->t = ui + 13;
2712
2713 stat = decodeByteAlign (pctxt);
2714 if (stat != ASN_OK) return stat;
2715
2716 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2717 if (stat != ASN_OK) return stat;
2718
2719 }
2720
2721 return (stat);
2722 }
2723
2724 /**************************************************************/
2725 /* */
2726 /* EnumeratedParameter */
2727 /* */
2728 /**************************************************************/
2729
2730 EXTERN int asn1PD_H225EnumeratedParameter (OOCTXT* pctxt, H225EnumeratedParameter* pvalue)
2731 {
2732 int stat = ASN_OK;
2733 OOCTXT lctxt;
2734 ASN1OpenType openType;
2735 ASN1UINT bitcnt;
2736 ASN1UINT i;
2737 ASN1BOOL optbit = 0;
2738 ASN1BOOL extbit = 0;
2739
2740 /* extension bit */
2741
2742 DECODEBIT (pctxt, &extbit);
2743
2744 /* optional bits */
2745
2746 memset (&pvalue->m, 0, sizeof(pvalue->m));
2747
2748 DECODEBIT (pctxt, &optbit);
2749 pvalue->m.contentPresent = optbit;
2750
2751 /* decode id */
2752
2753 invokeStartElement (pctxt, "id", -1);
2754
2755 stat = asn1PD_H225GenericIdentifier (pctxt, &pvalue->id);
2756 if (stat != ASN_OK) return stat;
2757
2758 invokeEndElement (pctxt, "id", -1);
2759
2760 /* decode content */
2761
2762 if (pvalue->m.contentPresent) {
2763 invokeStartElement (pctxt, "content", -1);
2764
2765 stat = asn1PD_H225Content (pctxt, &pvalue->content);
2766 if (stat != ASN_OK) return stat;
2767
2768 invokeEndElement (pctxt, "content", -1);
2769 }
2770
2771 if (extbit) {
2772
2773 /* decode extension optional bits length */
2774
2775 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
2776 if (stat != ASN_OK) return stat;
2777
2778 bitcnt += 1;
2779
2780 ZEROCONTEXT (&lctxt);
2781 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
2782 if (stat != ASN_OK) return stat;
2783
2784 stat = moveBitCursor (pctxt, bitcnt);
2785 if (stat != ASN_OK) return stat;
2786
2787 for (i = 0; i < bitcnt; i++) {
2788 DECODEBIT (&lctxt, &optbit);
2789
2790 if (optbit) {
2791 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2792 if (stat != ASN_OK) return stat;
2793
2794 pctxt->buffer.byteIndex += openType.numocts;
2795 }
2796 }
2797 }
2798
2799 return (stat);
2800 }
2801
2802 /**************************************************************/
2803 /* */
2804 /* GenericData_parameters */
2805 /* */
2806 /**************************************************************/
2807
2808 EXTERN int asn1PD_H225GenericData_parameters (OOCTXT* pctxt, H225GenericData_parameters* pvalue)
2809 {
2810 static Asn1SizeCnst lsize1 = { 0, 1, 512, 0 };
2811 int stat = ASN_OK;
2812 H225EnumeratedParameter* pdata;
2813 ASN1UINT count = 0;
2814 ASN1UINT xx1;
2815
2816 /* decode length determinant */
2817
2818 addSizeConstraint (pctxt, &lsize1);
2819
2820 stat = decodeLength (pctxt, &count);
2821 if (stat != ASN_OK) return stat;
2822
2823 /* decode elements */
2824
2825 dListInit (pvalue);
2826
2827 for (xx1 = 0; xx1 < count; xx1++) {
2828 invokeStartElement (pctxt, "elem", xx1);
2829
2830 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225EnumeratedParameter);
2831
2832 stat = asn1PD_H225EnumeratedParameter (pctxt, pdata);
2833 if (stat != ASN_OK) return stat;
2834 invokeEndElement (pctxt, "elem", xx1);
2835
2836 dListAppendNode (pctxt, pvalue, pdata);
2837 }
2838
2839 return (stat);
2840 }
2841
2842 /**************************************************************/
2843 /* */
2844 /* GenericData */
2845 /* */
2846 /**************************************************************/
2847
2848 EXTERN int asn1PD_H225GenericData (OOCTXT* pctxt, H225GenericData* pvalue)
2849 {
2850 int stat = ASN_OK;
2851 OOCTXT lctxt;
2852 ASN1OpenType openType;
2853 ASN1UINT bitcnt;
2854 ASN1UINT i;
2855 ASN1BOOL optbit = 0;
2856 ASN1BOOL extbit = 0;
2857
2858 /* extension bit */
2859
2860 DECODEBIT (pctxt, &extbit);
2861
2862 /* optional bits */
2863
2864 memset (&pvalue->m, 0, sizeof(pvalue->m));
2865
2866 DECODEBIT (pctxt, &optbit);
2867 pvalue->m.parametersPresent = optbit;
2868
2869 /* decode id */
2870
2871 invokeStartElement (pctxt, "id", -1);
2872
2873 stat = asn1PD_H225GenericIdentifier (pctxt, &pvalue->id);
2874 if (stat != ASN_OK) return stat;
2875
2876 invokeEndElement (pctxt, "id", -1);
2877
2878 /* decode parameters */
2879
2880 if (pvalue->m.parametersPresent) {
2881 invokeStartElement (pctxt, "parameters", -1);
2882
2883 stat = asn1PD_H225GenericData_parameters (pctxt, &pvalue->parameters);
2884 if (stat != ASN_OK) return stat;
2885
2886 invokeEndElement (pctxt, "parameters", -1);
2887 }
2888
2889 if (extbit) {
2890
2891 /* decode extension optional bits length */
2892
2893 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
2894 if (stat != ASN_OK) return stat;
2895
2896 bitcnt += 1;
2897
2898 ZEROCONTEXT (&lctxt);
2899 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
2900 if (stat != ASN_OK) return stat;
2901
2902 stat = moveBitCursor (pctxt, bitcnt);
2903 if (stat != ASN_OK) return stat;
2904
2905 for (i = 0; i < bitcnt; i++) {
2906 DECODEBIT (&lctxt, &optbit);
2907
2908 if (optbit) {
2909 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
2910 if (stat != ASN_OK) return stat;
2911
2912 pctxt->buffer.byteIndex += openType.numocts;
2913 }
2914 }
2915 }
2916
2917 return (stat);
2918 }
2919
2920 /**************************************************************/
2921 /* */
2922 /* FeatureDescriptor */
2923 /* */
2924 /**************************************************************/
2925
2926 EXTERN int asn1PD_H225FeatureDescriptor (OOCTXT* pctxt, H225FeatureDescriptor* pvalue)
2927 {
2928 int stat = ASN_OK;
2929
2930 stat = asn1PD_H225GenericData (pctxt, pvalue);
2931 if (stat != ASN_OK) return stat;
2932
2933 return (stat);
2934 }
2935
2936 /**************************************************************/
2937 /* */
2938 /* FastStartToken */
2939 /* */
2940 /**************************************************************/
2941
2942 EXTERN int asn1PD_H225FastStartToken (OOCTXT* pctxt, H225FastStartToken* pvalue)
2943 {
2944 int stat = ASN_OK;
2945
2946 stat = asn1PD_H235ClearToken (pctxt, pvalue);
2947 if (stat != ASN_OK) return stat;
2948
2949 return (stat);
2950 }
2951
2952 /**************************************************************/
2953 /* */
2954 /* EncodedFastStartToken */
2955 /* */
2956 /**************************************************************/
2957
2958 EXTERN int asn1PD_H225EncodedFastStartToken (OOCTXT* pctxt, H225EncodedFastStartToken* pvalue)
2959 {
2960 int stat = ASN_OK;
2961
2962 stat = decodeOpenType (pctxt, &pvalue->data, &pvalue->numocts);
2963 if (stat != ASN_OK) return stat;
2964 invokeOpenTypeValue
2965 (pctxt, pvalue->numocts, pvalue->data);
2966
2967 return (stat);
2968 }
2969
2970 /**************************************************************/
2971 /* */
2972 /* H323_UserInformation_user_data_user_information */
2973 /* */
2974 /**************************************************************/
2975
2976 EXTERN int asn1PD_H225H323_UserInformation_user_data_user_information (OOCTXT* pctxt, H225H323_UserInformation_user_data_user_information* pvalue)
2977 {
2978 static Asn1SizeCnst lsize1 = { 0, 1, 131, 0 };
2979 int stat = ASN_OK;
2980
2981 addSizeConstraint (pctxt, &lsize1);
2982
2983 stat = decodeOctetString (pctxt,
2984 &pvalue->numocts,
2985 pvalue->data,
2986 sizeof(pvalue->data));
2987 if (stat != ASN_OK) return stat;
2988 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
2989
2990 return (stat);
2991 }
2992
2993 /**************************************************************/
2994 /* */
2995 /* EndpointType_set */
2996 /* */
2997 /**************************************************************/
2998
2999 EXTERN int asn1PD_H225EndpointType_set (OOCTXT* pctxt, H225EndpointType_set* pvalue)
3000 {
3001 static Asn1SizeCnst lsize1 = { 0, 32, 32, 0 };
3002 int stat = ASN_OK;
3003
3004 addSizeConstraint (pctxt, &lsize1);
3005
3006 stat = decodeBitString (pctxt,
3007 &pvalue->numbits,
3008 pvalue->data,
3009 sizeof(pvalue->data));
3010 if (stat != ASN_OK) return stat;
3011
3012 invokeBitStrValue (pctxt, pvalue->numbits, pvalue->data);
3013
3014 return (stat);
3015 }
3016
3017 /**************************************************************/
3018 /* */
3019 /* VendorIdentifier_productId */
3020 /* */
3021 /**************************************************************/
3022
3023 EXTERN int asn1PD_H225VendorIdentifier_productId (OOCTXT* pctxt, H225VendorIdentifier_productId* pvalue)
3024 {
3025 static Asn1SizeCnst lsize1 = { 0, 1, 256, 0 };
3026 int stat = ASN_OK;
3027
3028 addSizeConstraint (pctxt, &lsize1);
3029
3030 stat = decodeOctetString (pctxt,
3031 &pvalue->numocts,
3032 pvalue->data,
3033 sizeof(pvalue->data));
3034 if (stat != ASN_OK) return stat;
3035 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3036
3037 return (stat);
3038 }
3039
3040 /**************************************************************/
3041 /* */
3042 /* VendorIdentifier_versionId */
3043 /* */
3044 /**************************************************************/
3045
3046 EXTERN int asn1PD_H225VendorIdentifier_versionId (OOCTXT* pctxt, H225VendorIdentifier_versionId* pvalue)
3047 {
3048 static Asn1SizeCnst lsize1 = { 0, 1, 256, 0 };
3049 int stat = ASN_OK;
3050
3051 addSizeConstraint (pctxt, &lsize1);
3052
3053 stat = decodeOctetString (pctxt,
3054 &pvalue->numocts,
3055 pvalue->data,
3056 sizeof(pvalue->data));
3057 if (stat != ASN_OK) return stat;
3058 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3059
3060 return (stat);
3061 }
3062
3063 /**************************************************************/
3064 /* */
3065 /* CicInfo_cic_element */
3066 /* */
3067 /**************************************************************/
3068
3069 EXTERN int asn1PD_H225CicInfo_cic_element (OOCTXT* pctxt, H225CicInfo_cic_element* pvalue)
3070 {
3071 static Asn1SizeCnst lsize1 = { 0, 2, 4, 0 };
3072 int stat = ASN_OK;
3073
3074 addSizeConstraint (pctxt, &lsize1);
3075
3076 stat = decodeOctetString (pctxt,
3077 &pvalue->numocts,
3078 pvalue->data,
3079 sizeof(pvalue->data));
3080 if (stat != ASN_OK) return stat;
3081 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3082
3083 return (stat);
3084 }
3085
3086 /**************************************************************/
3087 /* */
3088 /* CicInfo_pointCode */
3089 /* */
3090 /**************************************************************/
3091
3092 EXTERN int asn1PD_H225CicInfo_pointCode (OOCTXT* pctxt, H225CicInfo_pointCode* pvalue)
3093 {
3094 static Asn1SizeCnst lsize1 = { 0, 2, 5, 0 };
3095 int stat = ASN_OK;
3096
3097 addSizeConstraint (pctxt, &lsize1);
3098
3099 stat = decodeOctetString (pctxt,
3100 &pvalue->numocts,
3101 pvalue->data,
3102 sizeof(pvalue->data));
3103 if (stat != ASN_OK) return stat;
3104 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3105
3106 return (stat);
3107 }
3108
3109 /**************************************************************/
3110 /* */
3111 /* CarrierInfo_carrierIdentificationCode */
3112 /* */
3113 /**************************************************************/
3114
3115 EXTERN int asn1PD_H225CarrierInfo_carrierIdentificationCode (OOCTXT* pctxt, H225CarrierInfo_carrierIdentificationCode* pvalue)
3116 {
3117 static Asn1SizeCnst lsize1 = { 0, 3, 4, 0 };
3118 int stat = ASN_OK;
3119
3120 addSizeConstraint (pctxt, &lsize1);
3121
3122 stat = decodeOctetString (pctxt,
3123 &pvalue->numocts,
3124 pvalue->data,
3125 sizeof(pvalue->data));
3126 if (stat != ASN_OK) return stat;
3127 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3128
3129 return (stat);
3130 }
3131
3132 /**************************************************************/
3133 /* */
3134 /* CallTerminationCause_releaseCompleteCauseIE */
3135 /* */
3136 /**************************************************************/
3137
3138 EXTERN int asn1PD_H225CallTerminationCause_releaseCompleteCauseIE (OOCTXT* pctxt, H225CallTerminationCause_releaseCompleteCauseIE* pvalue)
3139 {
3140 static Asn1SizeCnst lsize1 = { 0, 2, 32, 0 };
3141 int stat = ASN_OK;
3142
3143 addSizeConstraint (pctxt, &lsize1);
3144
3145 stat = decodeOctetString (pctxt,
3146 &pvalue->numocts,
3147 pvalue->data,
3148 sizeof(pvalue->data));
3149 if (stat != ASN_OK) return stat;
3150 invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data);
3151
3152 return (stat);
3153 }
3154
3155 /**************************************************************/
3156 /* */
3157 /* _SeqOfH225AliasAddress */
3158 /* */
3159 /**************************************************************/
3160
3161 EXTERN int asn1PD_H225_SeqOfH225AliasAddress (OOCTXT* pctxt, H225_SeqOfH225AliasAddress* pvalue)
3162 {
3163 int stat = ASN_OK;
3164 H225AliasAddress* pdata;
3165 ASN1UINT count = 0;
3166 ASN1UINT xx1;
3167 int lstat;
3168
3169 dListInit (pvalue);
3170
3171 for (;;) {
3172 /* decode length determinant */
3173
3174 lstat = decodeLength (pctxt, &count);
3175 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
3176 return lstat;
3177 }
3178
3179 /* decode elements */
3180
3181 for (xx1 = 0; xx1 < count; xx1++) {
3182 invokeStartElement (pctxt, "elem", xx1);
3183
3184 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225AliasAddress);
3185
3186 stat = asn1PD_H225AliasAddress (pctxt, pdata);
3187 if (stat != ASN_OK) return stat;
3188 invokeEndElement (pctxt, "elem", xx1);
3189
3190 dListAppendNode (pctxt, pvalue, pdata);
3191 }
3192
3193 if(lstat == ASN_OK) break;
3194 }
3195
3196 return (stat);
3197 }
3198
3199 /**************************************************************/
3200 /* */
3201 /* VendorIdentifier */
3202 /* */
3203 /**************************************************************/
3204
3205 EXTERN int asn1PD_H225VendorIdentifier (OOCTXT* pctxt, H225VendorIdentifier* pvalue)
3206 {
3207 int stat = ASN_OK;
3208 OOCTXT lctxt;
3209 OOCTXT lctxt2;
3210 ASN1OpenType openType;
3211 ASN1UINT bitcnt;
3212 ASN1UINT i;
3213 ASN1BOOL optbit = 0;
3214 ASN1BOOL extbit = 0;
3215
3216 /* extension bit */
3217
3218 DECODEBIT (pctxt, &extbit);
3219
3220 /* optional bits */
3221
3222 memset (&pvalue->m, 0, sizeof(pvalue->m));
3223
3224 DECODEBIT (pctxt, &optbit);
3225 pvalue->m.productIdPresent = optbit;
3226
3227 DECODEBIT (pctxt, &optbit);
3228 pvalue->m.versionIdPresent = optbit;
3229
3230 /* decode vendor */
3231
3232 invokeStartElement (pctxt, "vendor", -1);
3233
3234 stat = asn1PD_H225H221NonStandard (pctxt, &pvalue->vendor);
3235 if (stat != ASN_OK) return stat;
3236
3237 invokeEndElement (pctxt, "vendor", -1);
3238
3239 /* decode productId */
3240
3241 if (pvalue->m.productIdPresent) {
3242 invokeStartElement (pctxt, "productId", -1);
3243
3244 stat = asn1PD_H225VendorIdentifier_productId (pctxt, &pvalue->productId);
3245 if (stat != ASN_OK) return stat;
3246
3247 invokeEndElement (pctxt, "productId", -1);
3248 }
3249
3250 /* decode versionId */
3251
3252 if (pvalue->m.versionIdPresent) {
3253 invokeStartElement (pctxt, "versionId", -1);
3254
3255 stat = asn1PD_H225VendorIdentifier_versionId (pctxt, &pvalue->versionId);
3256 if (stat != ASN_OK) return stat;
3257
3258 invokeEndElement (pctxt, "versionId", -1);
3259 }
3260
3261 if (extbit) {
3262
3263 /* decode extension optional bits length */
3264
3265 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3266 if (stat != ASN_OK) return stat;
3267
3268 bitcnt += 1;
3269
3270 ZEROCONTEXT (&lctxt);
3271 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3272 if (stat != ASN_OK) return stat;
3273
3274 stat = moveBitCursor (pctxt, bitcnt);
3275 if (stat != ASN_OK) return stat;
3276
3277 for (i = 0; i < bitcnt; i++) {
3278 DECODEBIT (&lctxt, &optbit);
3279
3280 if (optbit) {
3281 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3282 if (stat != ASN_OK) return stat;
3283
3284 if (i < 1 && openType.numocts > 0) { /* known element */
3285 copyContext (&lctxt2, pctxt);
3286 initContextBuffer (pctxt, openType.data, openType.numocts);
3287
3288 switch (i) {
3289 case 0:
3290 pvalue->m.enterpriseNumberPresent = 1;
3291
3292 invokeStartElement (pctxt, "enterpriseNumber", -1);
3293
3294 stat = decodeObjectIdentifier (pctxt, &pvalue->enterpriseNumber);
3295 if (stat != ASN_OK) return stat;
3296 invokeOidValue (pctxt, pvalue->enterpriseNumber.numids, pvalue->enterpriseNumber.subid);
3297
3298 invokeEndElement (pctxt, "enterpriseNumber", -1);
3299 break;
3300
3301 default:
3302 pctxt->buffer.byteIndex += openType.numocts;
3303 }
3304 copyContext (pctxt, &lctxt2);
3305 }
3306 else { /* unknown element */
3307 pctxt->buffer.byteIndex += openType.numocts;
3308 }
3309 }
3310 }
3311 }
3312
3313 return (stat);
3314 }
3315
3316 /**************************************************************/
3317 /* */
3318 /* GatekeeperInfo */
3319 /* */
3320 /**************************************************************/
3321
3322 EXTERN int asn1PD_H225GatekeeperInfo (OOCTXT* pctxt, H225GatekeeperInfo* pvalue)
3323 {
3324 int stat = ASN_OK;
3325 OOCTXT lctxt;
3326 ASN1OpenType openType;
3327 ASN1UINT bitcnt;
3328 ASN1UINT i;
3329 ASN1BOOL optbit = 0;
3330 ASN1BOOL extbit = 0;
3331
3332 /* extension bit */
3333
3334 DECODEBIT (pctxt, &extbit);
3335
3336 /* optional bits */
3337
3338 memset (&pvalue->m, 0, sizeof(pvalue->m));
3339
3340 DECODEBIT (pctxt, &optbit);
3341 pvalue->m.nonStandardDataPresent = optbit;
3342
3343 /* decode nonStandardData */
3344
3345 if (pvalue->m.nonStandardDataPresent) {
3346 invokeStartElement (pctxt, "nonStandardData", -1);
3347
3348 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3349 if (stat != ASN_OK) return stat;
3350
3351 invokeEndElement (pctxt, "nonStandardData", -1);
3352 }
3353
3354 if (extbit) {
3355
3356 /* decode extension optional bits length */
3357
3358 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3359 if (stat != ASN_OK) return stat;
3360
3361 bitcnt += 1;
3362
3363 ZEROCONTEXT (&lctxt);
3364 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3365 if (stat != ASN_OK) return stat;
3366
3367 stat = moveBitCursor (pctxt, bitcnt);
3368 if (stat != ASN_OK) return stat;
3369
3370 for (i = 0; i < bitcnt; i++) {
3371 DECODEBIT (&lctxt, &optbit);
3372
3373 if (optbit) {
3374 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3375 if (stat != ASN_OK) return stat;
3376
3377 pctxt->buffer.byteIndex += openType.numocts;
3378 }
3379 }
3380 }
3381
3382 return (stat);
3383 }
3384
3385 /**************************************************************/
3386 /* */
3387 /* DataRate */
3388 /* */
3389 /**************************************************************/
3390
3391 EXTERN int asn1PD_H225DataRate (OOCTXT* pctxt, H225DataRate* pvalue)
3392 {
3393 int stat = ASN_OK;
3394 OOCTXT lctxt;
3395 ASN1OpenType openType;
3396 ASN1UINT bitcnt;
3397 ASN1UINT i;
3398 ASN1BOOL optbit = 0;
3399 ASN1BOOL extbit = 0;
3400
3401 /* extension bit */
3402
3403 DECODEBIT (pctxt, &extbit);
3404
3405 /* optional bits */
3406
3407 memset (&pvalue->m, 0, sizeof(pvalue->m));
3408
3409 DECODEBIT (pctxt, &optbit);
3410 pvalue->m.nonStandardDataPresent = optbit;
3411
3412 DECODEBIT (pctxt, &optbit);
3413 pvalue->m.channelMultiplierPresent = optbit;
3414
3415 /* decode nonStandardData */
3416
3417 if (pvalue->m.nonStandardDataPresent) {
3418 invokeStartElement (pctxt, "nonStandardData", -1);
3419
3420 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3421 if (stat != ASN_OK) return stat;
3422
3423 invokeEndElement (pctxt, "nonStandardData", -1);
3424 }
3425
3426 /* decode channelRate */
3427
3428 invokeStartElement (pctxt, "channelRate", -1);
3429
3430 stat = asn1PD_H225BandWidth (pctxt, &pvalue->channelRate);
3431 if (stat != ASN_OK) return stat;
3432
3433 invokeEndElement (pctxt, "channelRate", -1);
3434
3435 /* decode channelMultiplier */
3436
3437 if (pvalue->m.channelMultiplierPresent) {
3438 invokeStartElement (pctxt, "channelMultiplier", -1);
3439
3440 stat = decodeConsUInt16 (pctxt, &pvalue->channelMultiplier, 1U, 256U);
3441 if (stat != ASN_OK) return stat;
3442 invokeUIntValue (pctxt, pvalue->channelMultiplier);
3443
3444 invokeEndElement (pctxt, "channelMultiplier", -1);
3445 }
3446
3447 if (extbit) {
3448
3449 /* decode extension optional bits length */
3450
3451 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3452 if (stat != ASN_OK) return stat;
3453
3454 bitcnt += 1;
3455
3456 ZEROCONTEXT (&lctxt);
3457 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3458 if (stat != ASN_OK) return stat;
3459
3460 stat = moveBitCursor (pctxt, bitcnt);
3461 if (stat != ASN_OK) return stat;
3462
3463 for (i = 0; i < bitcnt; i++) {
3464 DECODEBIT (&lctxt, &optbit);
3465
3466 if (optbit) {
3467 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3468 if (stat != ASN_OK) return stat;
3469
3470 pctxt->buffer.byteIndex += openType.numocts;
3471 }
3472 }
3473 }
3474
3475 return (stat);
3476 }
3477
3478 /**************************************************************/
3479 /* */
3480 /* _SeqOfH225DataRate */
3481 /* */
3482 /**************************************************************/
3483
3484 EXTERN int asn1PD_H225_SeqOfH225DataRate (OOCTXT* pctxt, H225_SeqOfH225DataRate* pvalue)
3485 {
3486 int stat = ASN_OK;
3487 H225DataRate* pdata;
3488 ASN1UINT count = 0;
3489 ASN1UINT xx1;
3490 int lstat;
3491
3492 dListInit (pvalue);
3493
3494 for (;;) {
3495 /* decode length determinant */
3496
3497 lstat = decodeLength (pctxt, &count);
3498 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
3499 return lstat;
3500 }
3501
3502 /* decode elements */
3503
3504 for (xx1 = 0; xx1 < count; xx1++) {
3505 invokeStartElement (pctxt, "elem", xx1);
3506
3507 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225DataRate);
3508
3509 stat = asn1PD_H225DataRate (pctxt, pdata);
3510 if (stat != ASN_OK) return stat;
3511 invokeEndElement (pctxt, "elem", xx1);
3512
3513 dListAppendNode (pctxt, pvalue, pdata);
3514 }
3515
3516 if(lstat == ASN_OK) break;
3517 }
3518
3519 return (stat);
3520 }
3521
3522 /**************************************************************/
3523 /* */
3524 /* SupportedPrefix */
3525 /* */
3526 /**************************************************************/
3527
3528 EXTERN int asn1PD_H225SupportedPrefix (OOCTXT* pctxt, H225SupportedPrefix* pvalue)
3529 {
3530 int stat = ASN_OK;
3531 OOCTXT lctxt;
3532 ASN1OpenType openType;
3533 ASN1UINT bitcnt;
3534 ASN1UINT i;
3535 ASN1BOOL optbit = 0;
3536 ASN1BOOL extbit = 0;
3537
3538 /* extension bit */
3539
3540 DECODEBIT (pctxt, &extbit);
3541
3542 /* optional bits */
3543
3544 memset (&pvalue->m, 0, sizeof(pvalue->m));
3545
3546 DECODEBIT (pctxt, &optbit);
3547 pvalue->m.nonStandardDataPresent = optbit;
3548
3549 /* decode nonStandardData */
3550
3551 if (pvalue->m.nonStandardDataPresent) {
3552 invokeStartElement (pctxt, "nonStandardData", -1);
3553
3554 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3555 if (stat != ASN_OK) return stat;
3556
3557 invokeEndElement (pctxt, "nonStandardData", -1);
3558 }
3559
3560 /* decode prefix */
3561
3562 invokeStartElement (pctxt, "prefix", -1);
3563
3564 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->prefix);
3565 if (stat != ASN_OK) return stat;
3566
3567 invokeEndElement (pctxt, "prefix", -1);
3568
3569 if (extbit) {
3570
3571 /* decode extension optional bits length */
3572
3573 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3574 if (stat != ASN_OK) return stat;
3575
3576 bitcnt += 1;
3577
3578 ZEROCONTEXT (&lctxt);
3579 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3580 if (stat != ASN_OK) return stat;
3581
3582 stat = moveBitCursor (pctxt, bitcnt);
3583 if (stat != ASN_OK) return stat;
3584
3585 for (i = 0; i < bitcnt; i++) {
3586 DECODEBIT (&lctxt, &optbit);
3587
3588 if (optbit) {
3589 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3590 if (stat != ASN_OK) return stat;
3591
3592 pctxt->buffer.byteIndex += openType.numocts;
3593 }
3594 }
3595 }
3596
3597 return (stat);
3598 }
3599
3600 /**************************************************************/
3601 /* */
3602 /* _SeqOfH225SupportedPrefix */
3603 /* */
3604 /**************************************************************/
3605
3606 EXTERN int asn1PD_H225_SeqOfH225SupportedPrefix (OOCTXT* pctxt, H225_SeqOfH225SupportedPrefix* pvalue)
3607 {
3608 int stat = ASN_OK;
3609 H225SupportedPrefix* pdata;
3610 ASN1UINT count = 0;
3611 ASN1UINT xx1;
3612 int lstat;
3613
3614 dListInit (pvalue);
3615
3616 for (;;) {
3617 /* decode length determinant */
3618
3619 lstat = decodeLength (pctxt, &count);
3620 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
3621 return lstat;
3622 }
3623
3624 /* decode elements */
3625
3626 for (xx1 = 0; xx1 < count; xx1++) {
3627 invokeStartElement (pctxt, "elem", xx1);
3628
3629 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225SupportedPrefix);
3630
3631 stat = asn1PD_H225SupportedPrefix (pctxt, pdata);
3632 if (stat != ASN_OK) return stat;
3633 invokeEndElement (pctxt, "elem", xx1);
3634
3635 dListAppendNode (pctxt, pvalue, pdata);
3636 }
3637
3638 if(lstat == ASN_OK) break;
3639 }
3640
3641 return (stat);
3642 }
3643
3644 /**************************************************************/
3645 /* */
3646 /* H310Caps */
3647 /* */
3648 /**************************************************************/
3649
3650 EXTERN int asn1PD_H225H310Caps (OOCTXT* pctxt, H225H310Caps* pvalue)
3651 {
3652 int stat = ASN_OK;
3653 OOCTXT lctxt;
3654 OOCTXT lctxt2;
3655 ASN1OpenType openType;
3656 ASN1UINT bitcnt;
3657 ASN1UINT i;
3658 ASN1BOOL optbit = 0;
3659 ASN1BOOL extbit = 0;
3660
3661 /* extension bit */
3662
3663 DECODEBIT (pctxt, &extbit);
3664
3665 /* optional bits */
3666
3667 memset (&pvalue->m, 0, sizeof(pvalue->m));
3668
3669 DECODEBIT (pctxt, &optbit);
3670 pvalue->m.nonStandardDataPresent = optbit;
3671
3672 /* decode nonStandardData */
3673
3674 if (pvalue->m.nonStandardDataPresent) {
3675 invokeStartElement (pctxt, "nonStandardData", -1);
3676
3677 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3678 if (stat != ASN_OK) return stat;
3679
3680 invokeEndElement (pctxt, "nonStandardData", -1);
3681 }
3682
3683 if (extbit) {
3684
3685 /* decode extension optional bits length */
3686
3687 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3688 if (stat != ASN_OK) return stat;
3689
3690 bitcnt += 1;
3691
3692 ZEROCONTEXT (&lctxt);
3693 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3694 if (stat != ASN_OK) return stat;
3695
3696 stat = moveBitCursor (pctxt, bitcnt);
3697 if (stat != ASN_OK) return stat;
3698
3699 for (i = 0; i < bitcnt; i++) {
3700 DECODEBIT (&lctxt, &optbit);
3701
3702 if (optbit) {
3703 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3704 if (stat != ASN_OK) return stat;
3705
3706 if (i < 2 && openType.numocts > 0) { /* known element */
3707 copyContext (&lctxt2, pctxt);
3708 initContextBuffer (pctxt, openType.data, openType.numocts);
3709
3710 switch (i) {
3711 case 0:
3712 pvalue->m.dataRatesSupportedPresent = 1;
3713
3714 invokeStartElement (pctxt, "dataRatesSupported", -1);
3715
3716 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3717 if (stat != ASN_OK) return stat;
3718
3719 invokeEndElement (pctxt, "dataRatesSupported", -1);
3720 break;
3721
3722 case 1:
3723 pvalue->m.supportedPrefixesPresent = 1;
3724
3725 invokeStartElement (pctxt, "supportedPrefixes", -1);
3726
3727 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3728 if (stat != ASN_OK) return stat;
3729
3730 invokeEndElement (pctxt, "supportedPrefixes", -1);
3731 break;
3732
3733 default:
3734 pctxt->buffer.byteIndex += openType.numocts;
3735 }
3736 copyContext (pctxt, &lctxt2);
3737 }
3738 else { /* unknown element */
3739 pctxt->buffer.byteIndex += openType.numocts;
3740 }
3741 }
3742 }
3743 }
3744
3745 return (stat);
3746 }
3747
3748 /**************************************************************/
3749 /* */
3750 /* H320Caps */
3751 /* */
3752 /**************************************************************/
3753
3754 EXTERN int asn1PD_H225H320Caps (OOCTXT* pctxt, H225H320Caps* pvalue)
3755 {
3756 int stat = ASN_OK;
3757 OOCTXT lctxt;
3758 OOCTXT lctxt2;
3759 ASN1OpenType openType;
3760 ASN1UINT bitcnt;
3761 ASN1UINT i;
3762 ASN1BOOL optbit = 0;
3763 ASN1BOOL extbit = 0;
3764
3765 /* extension bit */
3766
3767 DECODEBIT (pctxt, &extbit);
3768
3769 /* optional bits */
3770
3771 memset (&pvalue->m, 0, sizeof(pvalue->m));
3772
3773 DECODEBIT (pctxt, &optbit);
3774 pvalue->m.nonStandardDataPresent = optbit;
3775
3776 /* decode nonStandardData */
3777
3778 if (pvalue->m.nonStandardDataPresent) {
3779 invokeStartElement (pctxt, "nonStandardData", -1);
3780
3781 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3782 if (stat != ASN_OK) return stat;
3783
3784 invokeEndElement (pctxt, "nonStandardData", -1);
3785 }
3786
3787 if (extbit) {
3788
3789 /* decode extension optional bits length */
3790
3791 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3792 if (stat != ASN_OK) return stat;
3793
3794 bitcnt += 1;
3795
3796 ZEROCONTEXT (&lctxt);
3797 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3798 if (stat != ASN_OK) return stat;
3799
3800 stat = moveBitCursor (pctxt, bitcnt);
3801 if (stat != ASN_OK) return stat;
3802
3803 for (i = 0; i < bitcnt; i++) {
3804 DECODEBIT (&lctxt, &optbit);
3805
3806 if (optbit) {
3807 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3808 if (stat != ASN_OK) return stat;
3809
3810 if (i < 2 && openType.numocts > 0) { /* known element */
3811 copyContext (&lctxt2, pctxt);
3812 initContextBuffer (pctxt, openType.data, openType.numocts);
3813
3814 switch (i) {
3815 case 0:
3816 pvalue->m.dataRatesSupportedPresent = 1;
3817
3818 invokeStartElement (pctxt, "dataRatesSupported", -1);
3819
3820 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3821 if (stat != ASN_OK) return stat;
3822
3823 invokeEndElement (pctxt, "dataRatesSupported", -1);
3824 break;
3825
3826 case 1:
3827 pvalue->m.supportedPrefixesPresent = 1;
3828
3829 invokeStartElement (pctxt, "supportedPrefixes", -1);
3830
3831 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3832 if (stat != ASN_OK) return stat;
3833
3834 invokeEndElement (pctxt, "supportedPrefixes", -1);
3835 break;
3836
3837 default:
3838 pctxt->buffer.byteIndex += openType.numocts;
3839 }
3840 copyContext (pctxt, &lctxt2);
3841 }
3842 else { /* unknown element */
3843 pctxt->buffer.byteIndex += openType.numocts;
3844 }
3845 }
3846 }
3847 }
3848
3849 return (stat);
3850 }
3851
3852 /**************************************************************/
3853 /* */
3854 /* H321Caps */
3855 /* */
3856 /**************************************************************/
3857
3858 EXTERN int asn1PD_H225H321Caps (OOCTXT* pctxt, H225H321Caps* pvalue)
3859 {
3860 int stat = ASN_OK;
3861 OOCTXT lctxt;
3862 OOCTXT lctxt2;
3863 ASN1OpenType openType;
3864 ASN1UINT bitcnt;
3865 ASN1UINT i;
3866 ASN1BOOL optbit = 0;
3867 ASN1BOOL extbit = 0;
3868
3869 /* extension bit */
3870
3871 DECODEBIT (pctxt, &extbit);
3872
3873 /* optional bits */
3874
3875 memset (&pvalue->m, 0, sizeof(pvalue->m));
3876
3877 DECODEBIT (pctxt, &optbit);
3878 pvalue->m.nonStandardDataPresent = optbit;
3879
3880 /* decode nonStandardData */
3881
3882 if (pvalue->m.nonStandardDataPresent) {
3883 invokeStartElement (pctxt, "nonStandardData", -1);
3884
3885 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3886 if (stat != ASN_OK) return stat;
3887
3888 invokeEndElement (pctxt, "nonStandardData", -1);
3889 }
3890
3891 if (extbit) {
3892
3893 /* decode extension optional bits length */
3894
3895 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
3896 if (stat != ASN_OK) return stat;
3897
3898 bitcnt += 1;
3899
3900 ZEROCONTEXT (&lctxt);
3901 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
3902 if (stat != ASN_OK) return stat;
3903
3904 stat = moveBitCursor (pctxt, bitcnt);
3905 if (stat != ASN_OK) return stat;
3906
3907 for (i = 0; i < bitcnt; i++) {
3908 DECODEBIT (&lctxt, &optbit);
3909
3910 if (optbit) {
3911 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
3912 if (stat != ASN_OK) return stat;
3913
3914 if (i < 2 && openType.numocts > 0) { /* known element */
3915 copyContext (&lctxt2, pctxt);
3916 initContextBuffer (pctxt, openType.data, openType.numocts);
3917
3918 switch (i) {
3919 case 0:
3920 pvalue->m.dataRatesSupportedPresent = 1;
3921
3922 invokeStartElement (pctxt, "dataRatesSupported", -1);
3923
3924 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3925 if (stat != ASN_OK) return stat;
3926
3927 invokeEndElement (pctxt, "dataRatesSupported", -1);
3928 break;
3929
3930 case 1:
3931 pvalue->m.supportedPrefixesPresent = 1;
3932
3933 invokeStartElement (pctxt, "supportedPrefixes", -1);
3934
3935 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3936 if (stat != ASN_OK) return stat;
3937
3938 invokeEndElement (pctxt, "supportedPrefixes", -1);
3939 break;
3940
3941 default:
3942 pctxt->buffer.byteIndex += openType.numocts;
3943 }
3944 copyContext (pctxt, &lctxt2);
3945 }
3946 else { /* unknown element */
3947 pctxt->buffer.byteIndex += openType.numocts;
3948 }
3949 }
3950 }
3951 }
3952
3953 return (stat);
3954 }
3955
3956 /**************************************************************/
3957 /* */
3958 /* H322Caps */
3959 /* */
3960 /**************************************************************/
3961
3962 EXTERN int asn1PD_H225H322Caps (OOCTXT* pctxt, H225H322Caps* pvalue)
3963 {
3964 int stat = ASN_OK;
3965 OOCTXT lctxt;
3966 OOCTXT lctxt2;
3967 ASN1OpenType openType;
3968 ASN1UINT bitcnt;
3969 ASN1UINT i;
3970 ASN1BOOL optbit = 0;
3971 ASN1BOOL extbit = 0;
3972
3973 /* extension bit */
3974
3975 DECODEBIT (pctxt, &extbit);
3976
3977 /* optional bits */
3978
3979 memset (&pvalue->m, 0, sizeof(pvalue->m));
3980
3981 DECODEBIT (pctxt, &optbit);
3982 pvalue->m.nonStandardDataPresent = optbit;
3983
3984 /* decode nonStandardData */
3985
3986 if (pvalue->m.nonStandardDataPresent) {
3987 invokeStartElement (pctxt, "nonStandardData", -1);
3988
3989 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3990 if (stat != ASN_OK) return stat;
3991
3992 invokeEndElement (pctxt, "nonStandardData", -1);
3993 }
3994
3995 if (extbit) {
3996
3997 /* decode extension optional bits length */
3998
3999 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4000 if (stat != ASN_OK) return stat;
4001
4002 bitcnt += 1;
4003
4004 ZEROCONTEXT (&lctxt);
4005 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4006 if (stat != ASN_OK) return stat;
4007
4008 stat = moveBitCursor (pctxt, bitcnt);
4009 if (stat != ASN_OK) return stat;
4010
4011 for (i = 0; i < bitcnt; i++) {
4012 DECODEBIT (&lctxt, &optbit);
4013
4014 if (optbit) {
4015 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4016 if (stat != ASN_OK) return stat;
4017
4018 if (i < 2 && openType.numocts > 0) { /* known element */
4019 copyContext (&lctxt2, pctxt);
4020 initContextBuffer (pctxt, openType.data, openType.numocts);
4021
4022 switch (i) {
4023 case 0:
4024 pvalue->m.dataRatesSupportedPresent = 1;
4025
4026 invokeStartElement (pctxt, "dataRatesSupported", -1);
4027
4028 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4029 if (stat != ASN_OK) return stat;
4030
4031 invokeEndElement (pctxt, "dataRatesSupported", -1);
4032 break;
4033
4034 case 1:
4035 pvalue->m.supportedPrefixesPresent = 1;
4036
4037 invokeStartElement (pctxt, "supportedPrefixes", -1);
4038
4039 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4040 if (stat != ASN_OK) return stat;
4041
4042 invokeEndElement (pctxt, "supportedPrefixes", -1);
4043 break;
4044
4045 default:
4046 pctxt->buffer.byteIndex += openType.numocts;
4047 }
4048 copyContext (pctxt, &lctxt2);
4049 }
4050 else { /* unknown element */
4051 pctxt->buffer.byteIndex += openType.numocts;
4052 }
4053 }
4054 }
4055 }
4056
4057 return (stat);
4058 }
4059
4060 /**************************************************************/
4061 /* */
4062 /* H323Caps */
4063 /* */
4064 /**************************************************************/
4065
4066 EXTERN int asn1PD_H225H323Caps (OOCTXT* pctxt, H225H323Caps* pvalue)
4067 {
4068 int stat = ASN_OK;
4069 OOCTXT lctxt;
4070 OOCTXT lctxt2;
4071 ASN1OpenType openType;
4072 ASN1UINT bitcnt;
4073 ASN1UINT i;
4074 ASN1BOOL optbit = 0;
4075 ASN1BOOL extbit = 0;
4076
4077 /* extension bit */
4078
4079 DECODEBIT (pctxt, &extbit);
4080
4081 /* optional bits */
4082
4083 memset (&pvalue->m, 0, sizeof(pvalue->m));
4084
4085 DECODEBIT (pctxt, &optbit);
4086 pvalue->m.nonStandardDataPresent = optbit;
4087
4088 /* decode nonStandardData */
4089
4090 if (pvalue->m.nonStandardDataPresent) {
4091 invokeStartElement (pctxt, "nonStandardData", -1);
4092
4093 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4094 if (stat != ASN_OK) return stat;
4095
4096 invokeEndElement (pctxt, "nonStandardData", -1);
4097 }
4098
4099 if (extbit) {
4100
4101 /* decode extension optional bits length */
4102
4103 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4104 if (stat != ASN_OK) return stat;
4105
4106 bitcnt += 1;
4107
4108 ZEROCONTEXT (&lctxt);
4109 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4110 if (stat != ASN_OK) return stat;
4111
4112 stat = moveBitCursor (pctxt, bitcnt);
4113 if (stat != ASN_OK) return stat;
4114
4115 for (i = 0; i < bitcnt; i++) {
4116 DECODEBIT (&lctxt, &optbit);
4117
4118 if (optbit) {
4119 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4120 if (stat != ASN_OK) return stat;
4121
4122 if (i < 2 && openType.numocts > 0) { /* known element */
4123 copyContext (&lctxt2, pctxt);
4124 initContextBuffer (pctxt, openType.data, openType.numocts);
4125
4126 switch (i) {
4127 case 0:
4128 pvalue->m.dataRatesSupportedPresent = 1;
4129
4130 invokeStartElement (pctxt, "dataRatesSupported", -1);
4131
4132 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4133 if (stat != ASN_OK) return stat;
4134
4135 invokeEndElement (pctxt, "dataRatesSupported", -1);
4136 break;
4137
4138 case 1:
4139 pvalue->m.supportedPrefixesPresent = 1;
4140
4141 invokeStartElement (pctxt, "supportedPrefixes", -1);
4142
4143 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4144 if (stat != ASN_OK) return stat;
4145
4146 invokeEndElement (pctxt, "supportedPrefixes", -1);
4147 break;
4148
4149 default:
4150 pctxt->buffer.byteIndex += openType.numocts;
4151 }
4152 copyContext (pctxt, &lctxt2);
4153 }
4154 else { /* unknown element */
4155 pctxt->buffer.byteIndex += openType.numocts;
4156 }
4157 }
4158 }
4159 }
4160
4161 return (stat);
4162 }
4163
4164 /**************************************************************/
4165 /* */
4166 /* H324Caps */
4167 /* */
4168 /**************************************************************/
4169
4170 EXTERN int asn1PD_H225H324Caps (OOCTXT* pctxt, H225H324Caps* pvalue)
4171 {
4172 int stat = ASN_OK;
4173 OOCTXT lctxt;
4174 OOCTXT lctxt2;
4175 ASN1OpenType openType;
4176 ASN1UINT bitcnt;
4177 ASN1UINT i;
4178 ASN1BOOL optbit = 0;
4179 ASN1BOOL extbit = 0;
4180
4181 /* extension bit */
4182
4183 DECODEBIT (pctxt, &extbit);
4184
4185 /* optional bits */
4186
4187 memset (&pvalue->m, 0, sizeof(pvalue->m));
4188
4189 DECODEBIT (pctxt, &optbit);
4190 pvalue->m.nonStandardDataPresent = optbit;
4191
4192 /* decode nonStandardData */
4193
4194 if (pvalue->m.nonStandardDataPresent) {
4195 invokeStartElement (pctxt, "nonStandardData", -1);
4196
4197 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4198 if (stat != ASN_OK) return stat;
4199
4200 invokeEndElement (pctxt, "nonStandardData", -1);
4201 }
4202
4203 if (extbit) {
4204
4205 /* decode extension optional bits length */
4206
4207 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4208 if (stat != ASN_OK) return stat;
4209
4210 bitcnt += 1;
4211
4212 ZEROCONTEXT (&lctxt);
4213 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4214 if (stat != ASN_OK) return stat;
4215
4216 stat = moveBitCursor (pctxt, bitcnt);
4217 if (stat != ASN_OK) return stat;
4218
4219 for (i = 0; i < bitcnt; i++) {
4220 DECODEBIT (&lctxt, &optbit);
4221
4222 if (optbit) {
4223 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4224 if (stat != ASN_OK) return stat;
4225
4226 if (i < 2 && openType.numocts > 0) { /* known element */
4227 copyContext (&lctxt2, pctxt);
4228 initContextBuffer (pctxt, openType.data, openType.numocts);
4229
4230 switch (i) {
4231 case 0:
4232 pvalue->m.dataRatesSupportedPresent = 1;
4233
4234 invokeStartElement (pctxt, "dataRatesSupported", -1);
4235
4236 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4237 if (stat != ASN_OK) return stat;
4238
4239 invokeEndElement (pctxt, "dataRatesSupported", -1);
4240 break;
4241
4242 case 1:
4243 pvalue->m.supportedPrefixesPresent = 1;
4244
4245 invokeStartElement (pctxt, "supportedPrefixes", -1);
4246
4247 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4248 if (stat != ASN_OK) return stat;
4249
4250 invokeEndElement (pctxt, "supportedPrefixes", -1);
4251 break;
4252
4253 default:
4254 pctxt->buffer.byteIndex += openType.numocts;
4255 }
4256 copyContext (pctxt, &lctxt2);
4257 }
4258 else { /* unknown element */
4259 pctxt->buffer.byteIndex += openType.numocts;
4260 }
4261 }
4262 }
4263 }
4264
4265 return (stat);
4266 }
4267
4268 /**************************************************************/
4269 /* */
4270 /* VoiceCaps */
4271 /* */
4272 /**************************************************************/
4273
4274 EXTERN int asn1PD_H225VoiceCaps (OOCTXT* pctxt, H225VoiceCaps* pvalue)
4275 {
4276 int stat = ASN_OK;
4277 OOCTXT lctxt;
4278 OOCTXT lctxt2;
4279 ASN1OpenType openType;
4280 ASN1UINT bitcnt;
4281 ASN1UINT i;
4282 ASN1BOOL optbit = 0;
4283 ASN1BOOL extbit = 0;
4284
4285 /* extension bit */
4286
4287 DECODEBIT (pctxt, &extbit);
4288
4289 /* optional bits */
4290
4291 memset (&pvalue->m, 0, sizeof(pvalue->m));
4292
4293 DECODEBIT (pctxt, &optbit);
4294 pvalue->m.nonStandardDataPresent = optbit;
4295
4296 /* decode nonStandardData */
4297
4298 if (pvalue->m.nonStandardDataPresent) {
4299 invokeStartElement (pctxt, "nonStandardData", -1);
4300
4301 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4302 if (stat != ASN_OK) return stat;
4303
4304 invokeEndElement (pctxt, "nonStandardData", -1);
4305 }
4306
4307 if (extbit) {
4308
4309 /* decode extension optional bits length */
4310
4311 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4312 if (stat != ASN_OK) return stat;
4313
4314 bitcnt += 1;
4315
4316 ZEROCONTEXT (&lctxt);
4317 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4318 if (stat != ASN_OK) return stat;
4319
4320 stat = moveBitCursor (pctxt, bitcnt);
4321 if (stat != ASN_OK) return stat;
4322
4323 for (i = 0; i < bitcnt; i++) {
4324 DECODEBIT (&lctxt, &optbit);
4325
4326 if (optbit) {
4327 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4328 if (stat != ASN_OK) return stat;
4329
4330 if (i < 2 && openType.numocts > 0) { /* known element */
4331 copyContext (&lctxt2, pctxt);
4332 initContextBuffer (pctxt, openType.data, openType.numocts);
4333
4334 switch (i) {
4335 case 0:
4336 pvalue->m.dataRatesSupportedPresent = 1;
4337
4338 invokeStartElement (pctxt, "dataRatesSupported", -1);
4339
4340 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4341 if (stat != ASN_OK) return stat;
4342
4343 invokeEndElement (pctxt, "dataRatesSupported", -1);
4344 break;
4345
4346 case 1:
4347 pvalue->m.supportedPrefixesPresent = 1;
4348
4349 invokeStartElement (pctxt, "supportedPrefixes", -1);
4350
4351 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4352 if (stat != ASN_OK) return stat;
4353
4354 invokeEndElement (pctxt, "supportedPrefixes", -1);
4355 break;
4356
4357 default:
4358 pctxt->buffer.byteIndex += openType.numocts;
4359 }
4360 copyContext (pctxt, &lctxt2);
4361 }
4362 else { /* unknown element */
4363 pctxt->buffer.byteIndex += openType.numocts;
4364 }
4365 }
4366 }
4367 }
4368
4369 return (stat);
4370 }
4371
4372 /**************************************************************/
4373 /* */
4374 /* T120OnlyCaps */
4375 /* */
4376 /**************************************************************/
4377
4378 EXTERN int asn1PD_H225T120OnlyCaps (OOCTXT* pctxt, H225T120OnlyCaps* pvalue)
4379 {
4380 int stat = ASN_OK;
4381 OOCTXT lctxt;
4382 OOCTXT lctxt2;
4383 ASN1OpenType openType;
4384 ASN1UINT bitcnt;
4385 ASN1UINT i;
4386 ASN1BOOL optbit = 0;
4387 ASN1BOOL extbit = 0;
4388
4389 /* extension bit */
4390
4391 DECODEBIT (pctxt, &extbit);
4392
4393 /* optional bits */
4394
4395 memset (&pvalue->m, 0, sizeof(pvalue->m));
4396
4397 DECODEBIT (pctxt, &optbit);
4398 pvalue->m.nonStandardDataPresent = optbit;
4399
4400 /* decode nonStandardData */
4401
4402 if (pvalue->m.nonStandardDataPresent) {
4403 invokeStartElement (pctxt, "nonStandardData", -1);
4404
4405 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4406 if (stat != ASN_OK) return stat;
4407
4408 invokeEndElement (pctxt, "nonStandardData", -1);
4409 }
4410
4411 if (extbit) {
4412
4413 /* decode extension optional bits length */
4414
4415 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4416 if (stat != ASN_OK) return stat;
4417
4418 bitcnt += 1;
4419
4420 ZEROCONTEXT (&lctxt);
4421 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4422 if (stat != ASN_OK) return stat;
4423
4424 stat = moveBitCursor (pctxt, bitcnt);
4425 if (stat != ASN_OK) return stat;
4426
4427 for (i = 0; i < bitcnt; i++) {
4428 DECODEBIT (&lctxt, &optbit);
4429
4430 if (optbit) {
4431 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4432 if (stat != ASN_OK) return stat;
4433
4434 if (i < 2 && openType.numocts > 0) { /* known element */
4435 copyContext (&lctxt2, pctxt);
4436 initContextBuffer (pctxt, openType.data, openType.numocts);
4437
4438 switch (i) {
4439 case 0:
4440 pvalue->m.dataRatesSupportedPresent = 1;
4441
4442 invokeStartElement (pctxt, "dataRatesSupported", -1);
4443
4444 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4445 if (stat != ASN_OK) return stat;
4446
4447 invokeEndElement (pctxt, "dataRatesSupported", -1);
4448 break;
4449
4450 case 1:
4451 pvalue->m.supportedPrefixesPresent = 1;
4452
4453 invokeStartElement (pctxt, "supportedPrefixes", -1);
4454
4455 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4456 if (stat != ASN_OK) return stat;
4457
4458 invokeEndElement (pctxt, "supportedPrefixes", -1);
4459 break;
4460
4461 default:
4462 pctxt->buffer.byteIndex += openType.numocts;
4463 }
4464 copyContext (pctxt, &lctxt2);
4465 }
4466 else { /* unknown element */
4467 pctxt->buffer.byteIndex += openType.numocts;
4468 }
4469 }
4470 }
4471 }
4472
4473 return (stat);
4474 }
4475
4476 /**************************************************************/
4477 /* */
4478 /* NonStandardProtocol */
4479 /* */
4480 /**************************************************************/
4481
4482 EXTERN int asn1PD_H225NonStandardProtocol (OOCTXT* pctxt, H225NonStandardProtocol* pvalue)
4483 {
4484 int stat = ASN_OK;
4485 OOCTXT lctxt;
4486 ASN1OpenType openType;
4487 ASN1UINT bitcnt;
4488 ASN1UINT i;
4489 ASN1BOOL optbit = 0;
4490 ASN1BOOL extbit = 0;
4491
4492 /* extension bit */
4493
4494 DECODEBIT (pctxt, &extbit);
4495
4496 /* optional bits */
4497
4498 memset (&pvalue->m, 0, sizeof(pvalue->m));
4499
4500 DECODEBIT (pctxt, &optbit);
4501 pvalue->m.nonStandardDataPresent = optbit;
4502
4503 DECODEBIT (pctxt, &optbit);
4504 pvalue->m.dataRatesSupportedPresent = optbit;
4505
4506 /* decode nonStandardData */
4507
4508 if (pvalue->m.nonStandardDataPresent) {
4509 invokeStartElement (pctxt, "nonStandardData", -1);
4510
4511 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4512 if (stat != ASN_OK) return stat;
4513
4514 invokeEndElement (pctxt, "nonStandardData", -1);
4515 }
4516
4517 /* decode dataRatesSupported */
4518
4519 if (pvalue->m.dataRatesSupportedPresent) {
4520 invokeStartElement (pctxt, "dataRatesSupported", -1);
4521
4522 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4523 if (stat != ASN_OK) return stat;
4524
4525 invokeEndElement (pctxt, "dataRatesSupported", -1);
4526 }
4527
4528 /* decode supportedPrefixes */
4529
4530 invokeStartElement (pctxt, "supportedPrefixes", -1);
4531
4532 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4533 if (stat != ASN_OK) return stat;
4534
4535 invokeEndElement (pctxt, "supportedPrefixes", -1);
4536
4537 if (extbit) {
4538
4539 /* decode extension optional bits length */
4540
4541 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4542 if (stat != ASN_OK) return stat;
4543
4544 bitcnt += 1;
4545
4546 ZEROCONTEXT (&lctxt);
4547 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4548 if (stat != ASN_OK) return stat;
4549
4550 stat = moveBitCursor (pctxt, bitcnt);
4551 if (stat != ASN_OK) return stat;
4552
4553 for (i = 0; i < bitcnt; i++) {
4554 DECODEBIT (&lctxt, &optbit);
4555
4556 if (optbit) {
4557 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4558 if (stat != ASN_OK) return stat;
4559
4560 pctxt->buffer.byteIndex += openType.numocts;
4561 }
4562 }
4563 }
4564
4565 return (stat);
4566 }
4567
4568 /**************************************************************/
4569 /* */
4570 /* T38FaxAnnexbOnlyCaps */
4571 /* */
4572 /**************************************************************/
4573
4574 EXTERN int asn1PD_H225T38FaxAnnexbOnlyCaps (OOCTXT* pctxt, H225T38FaxAnnexbOnlyCaps* pvalue)
4575 {
4576 int stat = ASN_OK;
4577 OOCTXT lctxt;
4578 ASN1OpenType openType;
4579 ASN1UINT bitcnt;
4580 ASN1UINT i;
4581 ASN1BOOL optbit = 0;
4582 ASN1BOOL extbit = 0;
4583
4584 /* extension bit */
4585
4586 DECODEBIT (pctxt, &extbit);
4587
4588 /* optional bits */
4589
4590 memset (&pvalue->m, 0, sizeof(pvalue->m));
4591
4592 DECODEBIT (pctxt, &optbit);
4593 pvalue->m.nonStandardDataPresent = optbit;
4594
4595 DECODEBIT (pctxt, &optbit);
4596 pvalue->m.dataRatesSupportedPresent = optbit;
4597
4598 /* decode nonStandardData */
4599
4600 if (pvalue->m.nonStandardDataPresent) {
4601 invokeStartElement (pctxt, "nonStandardData", -1);
4602
4603 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4604 if (stat != ASN_OK) return stat;
4605
4606 invokeEndElement (pctxt, "nonStandardData", -1);
4607 }
4608
4609 /* decode dataRatesSupported */
4610
4611 if (pvalue->m.dataRatesSupportedPresent) {
4612 invokeStartElement (pctxt, "dataRatesSupported", -1);
4613
4614 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4615 if (stat != ASN_OK) return stat;
4616
4617 invokeEndElement (pctxt, "dataRatesSupported", -1);
4618 }
4619
4620 /* decode supportedPrefixes */
4621
4622 invokeStartElement (pctxt, "supportedPrefixes", -1);
4623
4624 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4625 if (stat != ASN_OK) return stat;
4626
4627 invokeEndElement (pctxt, "supportedPrefixes", -1);
4628
4629 /* decode t38FaxProtocol */
4630
4631 invokeStartElement (pctxt, "t38FaxProtocol", -1);
4632
4633 stat = asn1PD_H245DataProtocolCapability (pctxt, &pvalue->t38FaxProtocol);
4634 if (stat != ASN_OK) return stat;
4635
4636 invokeEndElement (pctxt, "t38FaxProtocol", -1);
4637
4638 /* decode t38FaxProfile */
4639
4640 invokeStartElement (pctxt, "t38FaxProfile", -1);
4641
4642 stat = asn1PD_H245T38FaxProfile (pctxt, &pvalue->t38FaxProfile);
4643 if (stat != ASN_OK) return stat;
4644
4645 invokeEndElement (pctxt, "t38FaxProfile", -1);
4646
4647 if (extbit) {
4648
4649 /* decode extension optional bits length */
4650
4651 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4652 if (stat != ASN_OK) return stat;
4653
4654 bitcnt += 1;
4655
4656 ZEROCONTEXT (&lctxt);
4657 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4658 if (stat != ASN_OK) return stat;
4659
4660 stat = moveBitCursor (pctxt, bitcnt);
4661 if (stat != ASN_OK) return stat;
4662
4663 for (i = 0; i < bitcnt; i++) {
4664 DECODEBIT (&lctxt, &optbit);
4665
4666 if (optbit) {
4667 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4668 if (stat != ASN_OK) return stat;
4669
4670 pctxt->buffer.byteIndex += openType.numocts;
4671 }
4672 }
4673 }
4674
4675 return (stat);
4676 }
4677
4678 /**************************************************************/
4679 /* */
4680 /* SIPCaps */
4681 /* */
4682 /**************************************************************/
4683
4684 EXTERN int asn1PD_H225SIPCaps (OOCTXT* pctxt, H225SIPCaps* pvalue)
4685 {
4686 int stat = ASN_OK;
4687 OOCTXT lctxt;
4688 ASN1OpenType openType;
4689 ASN1UINT bitcnt;
4690 ASN1UINT i;
4691 ASN1BOOL optbit = 0;
4692 ASN1BOOL extbit = 0;
4693
4694 /* extension bit */
4695
4696 DECODEBIT (pctxt, &extbit);
4697
4698 /* optional bits */
4699
4700 memset (&pvalue->m, 0, sizeof(pvalue->m));
4701
4702 DECODEBIT (pctxt, &optbit);
4703 pvalue->m.nonStandardDataPresent = optbit;
4704
4705 DECODEBIT (pctxt, &optbit);
4706 pvalue->m.dataRatesSupportedPresent = optbit;
4707
4708 DECODEBIT (pctxt, &optbit);
4709 pvalue->m.supportedPrefixesPresent = optbit;
4710
4711 /* decode nonStandardData */
4712
4713 if (pvalue->m.nonStandardDataPresent) {
4714 invokeStartElement (pctxt, "nonStandardData", -1);
4715
4716 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
4717 if (stat != ASN_OK) return stat;
4718
4719 invokeEndElement (pctxt, "nonStandardData", -1);
4720 }
4721
4722 /* decode dataRatesSupported */
4723
4724 if (pvalue->m.dataRatesSupportedPresent) {
4725 invokeStartElement (pctxt, "dataRatesSupported", -1);
4726
4727 stat = asn1PD_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
4728 if (stat != ASN_OK) return stat;
4729
4730 invokeEndElement (pctxt, "dataRatesSupported", -1);
4731 }
4732
4733 /* decode supportedPrefixes */
4734
4735 if (pvalue->m.supportedPrefixesPresent) {
4736 invokeStartElement (pctxt, "supportedPrefixes", -1);
4737
4738 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
4739 if (stat != ASN_OK) return stat;
4740
4741 invokeEndElement (pctxt, "supportedPrefixes", -1);
4742 }
4743
4744 if (extbit) {
4745
4746 /* decode extension optional bits length */
4747
4748 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
4749 if (stat != ASN_OK) return stat;
4750
4751 bitcnt += 1;
4752
4753 ZEROCONTEXT (&lctxt);
4754 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
4755 if (stat != ASN_OK) return stat;
4756
4757 stat = moveBitCursor (pctxt, bitcnt);
4758 if (stat != ASN_OK) return stat;
4759
4760 for (i = 0; i < bitcnt; i++) {
4761 DECODEBIT (&lctxt, &optbit);
4762
4763 if (optbit) {
4764 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4765 if (stat != ASN_OK) return stat;
4766
4767 pctxt->buffer.byteIndex += openType.numocts;
4768 }
4769 }
4770 }
4771
4772 return (stat);
4773 }
4774
4775 /**************************************************************/
4776 /* */
4777 /* SupportedProtocols */
4778 /* */
4779 /**************************************************************/
4780
4781 EXTERN int asn1PD_H225SupportedProtocols (OOCTXT* pctxt, H225SupportedProtocols* pvalue)
4782 {
4783 int stat = ASN_OK;
4784 ASN1UINT ui;
4785 ASN1OpenType openType;
4786 ASN1BOOL extbit = 0;
4787 OOCTXT lctxt;
4788
4789 /* extension bit */
4790
4791 DECODEBIT (pctxt, &extbit);
4792
4793 if (!extbit) {
4794 stat = decodeConsUnsigned (pctxt, &ui, 0, 8);
4795 if (stat != ASN_OK) return stat;
4796 else pvalue->t = ui + 1;
4797
4798 switch (ui) {
4799 /* nonStandardData */
4800 case 0:
4801 invokeStartElement (pctxt, "nonStandardData", -1);
4802
4803 pvalue->u.nonStandardData = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
4804
4805 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandardData);
4806 if (stat != ASN_OK) return stat;
4807
4808 invokeEndElement (pctxt, "nonStandardData", -1);
4809
4810 break;
4811
4812 /* h310 */
4813 case 1:
4814 invokeStartElement (pctxt, "h310", -1);
4815
4816 pvalue->u.h310 = ALLOC_ASN1ELEM (pctxt, H225H310Caps);
4817
4818 stat = asn1PD_H225H310Caps (pctxt, pvalue->u.h310);
4819 if (stat != ASN_OK) return stat;
4820
4821 invokeEndElement (pctxt, "h310", -1);
4822
4823 break;
4824
4825 /* h320 */
4826 case 2:
4827 invokeStartElement (pctxt, "h320", -1);
4828
4829 pvalue->u.h320 = ALLOC_ASN1ELEM (pctxt, H225H320Caps);
4830
4831 stat = asn1PD_H225H320Caps (pctxt, pvalue->u.h320);
4832 if (stat != ASN_OK) return stat;
4833
4834 invokeEndElement (pctxt, "h320", -1);
4835
4836 break;
4837
4838 /* h321 */
4839 case 3:
4840 invokeStartElement (pctxt, "h321", -1);
4841
4842 pvalue->u.h321 = ALLOC_ASN1ELEM (pctxt, H225H321Caps);
4843
4844 stat = asn1PD_H225H321Caps (pctxt, pvalue->u.h321);
4845 if (stat != ASN_OK) return stat;
4846
4847 invokeEndElement (pctxt, "h321", -1);
4848
4849 break;
4850
4851 /* h322 */
4852 case 4:
4853 invokeStartElement (pctxt, "h322", -1);
4854
4855 pvalue->u.h322 = ALLOC_ASN1ELEM (pctxt, H225H322Caps);
4856
4857 stat = asn1PD_H225H322Caps (pctxt, pvalue->u.h322);
4858 if (stat != ASN_OK) return stat;
4859
4860 invokeEndElement (pctxt, "h322", -1);
4861
4862 break;
4863
4864 /* h323 */
4865 case 5:
4866 invokeStartElement (pctxt, "h323", -1);
4867
4868 pvalue->u.h323 = ALLOC_ASN1ELEM (pctxt, H225H323Caps);
4869
4870 stat = asn1PD_H225H323Caps (pctxt, pvalue->u.h323);
4871 if (stat != ASN_OK) return stat;
4872
4873 invokeEndElement (pctxt, "h323", -1);
4874
4875 break;
4876
4877 /* h324 */
4878 case 6:
4879 invokeStartElement (pctxt, "h324", -1);
4880
4881 pvalue->u.h324 = ALLOC_ASN1ELEM (pctxt, H225H324Caps);
4882
4883 stat = asn1PD_H225H324Caps (pctxt, pvalue->u.h324);
4884 if (stat != ASN_OK) return stat;
4885
4886 invokeEndElement (pctxt, "h324", -1);
4887
4888 break;
4889
4890 /* voice */
4891 case 7:
4892 invokeStartElement (pctxt, "voice", -1);
4893
4894 pvalue->u.voice = ALLOC_ASN1ELEM (pctxt, H225VoiceCaps);
4895
4896 stat = asn1PD_H225VoiceCaps (pctxt, pvalue->u.voice);
4897 if (stat != ASN_OK) return stat;
4898
4899 invokeEndElement (pctxt, "voice", -1);
4900
4901 break;
4902
4903 /* t120_only */
4904 case 8:
4905 invokeStartElement (pctxt, "t120_only", -1);
4906
4907 pvalue->u.t120_only = ALLOC_ASN1ELEM (pctxt, H225T120OnlyCaps);
4908
4909 stat = asn1PD_H225T120OnlyCaps (pctxt, pvalue->u.t120_only);
4910 if (stat != ASN_OK) return stat;
4911
4912 invokeEndElement (pctxt, "t120_only", -1);
4913
4914 break;
4915
4916 default:
4917 return ASN_E_INVOPT;
4918 }
4919 }
4920 else {
4921 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
4922 if (stat != ASN_OK) return stat;
4923 else pvalue->t = ui + 10;
4924
4925 stat = decodeByteAlign (pctxt);
4926 if (stat != ASN_OK) return stat;
4927
4928 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
4929 if (stat != ASN_OK) return stat;
4930
4931 copyContext (&lctxt, pctxt);
4932 initContextBuffer (pctxt, openType.data, openType.numocts);
4933
4934 switch (pvalue->t) {
4935 /* nonStandardProtocol */
4936 case 10:
4937 invokeStartElement (pctxt, "nonStandardProtocol", -1);
4938
4939 pvalue->u.nonStandardProtocol = ALLOC_ASN1ELEM (pctxt, H225NonStandardProtocol);
4940
4941 stat = asn1PD_H225NonStandardProtocol (pctxt, pvalue->u.nonStandardProtocol);
4942 if (stat != ASN_OK) return stat;
4943
4944 invokeEndElement (pctxt, "nonStandardProtocol", -1);
4945
4946 break;
4947
4948 /* t38FaxAnnexbOnly */
4949 case 11:
4950 invokeStartElement (pctxt, "t38FaxAnnexbOnly", -1);
4951
4952 pvalue->u.t38FaxAnnexbOnly = ALLOC_ASN1ELEM (pctxt, H225T38FaxAnnexbOnlyCaps);
4953
4954 stat = asn1PD_H225T38FaxAnnexbOnlyCaps (pctxt, pvalue->u.t38FaxAnnexbOnly);
4955 if (stat != ASN_OK) return stat;
4956
4957 invokeEndElement (pctxt, "t38FaxAnnexbOnly", -1);
4958
4959 break;
4960
4961 /* sip */
4962 case 12:
4963 invokeStartElement (pctxt, "sip", -1);
4964
4965 pvalue->u.sip = ALLOC_ASN1ELEM (pctxt, H225SIPCaps);
4966
4967 stat = asn1PD_H225SIPCaps (pctxt, pvalue->u.sip);
4968 if (stat != ASN_OK) return stat;
4969
4970 invokeEndElement (pctxt, "sip", -1);
4971
4972 break;
4973
4974 default:;
4975 }
4976
4977 copyContext (pctxt, &lctxt);
4978 }
4979
4980 return (stat);
4981 }
4982
4983 /**************************************************************/
4984 /* */
4985 /* _SeqOfH225SupportedProtocols */
4986 /* */
4987 /**************************************************************/
4988
4989 EXTERN int asn1PD_H225_SeqOfH225SupportedProtocols (OOCTXT* pctxt, H225_SeqOfH225SupportedProtocols* pvalue)
4990 {
4991 int stat = ASN_OK;
4992 H225SupportedProtocols* pdata;
4993 ASN1UINT count = 0;
4994 ASN1UINT xx1;
4995 int lstat;
4996
4997 dListInit (pvalue);
4998
4999 for (;;) {
5000 /* decode length determinant */
5001
5002 lstat = decodeLength (pctxt, &count);
5003 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
5004 return lstat;
5005 }
5006
5007 /* decode elements */
5008
5009 for (xx1 = 0; xx1 < count; xx1++) {
5010 invokeStartElement (pctxt, "elem", xx1);
5011
5012 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225SupportedProtocols);
5013
5014 stat = asn1PD_H225SupportedProtocols (pctxt, pdata);
5015 if (stat != ASN_OK) return stat;
5016 invokeEndElement (pctxt, "elem", xx1);
5017
5018 dListAppendNode (pctxt, pvalue, pdata);
5019 }
5020
5021 if(lstat == ASN_OK) break;
5022 }
5023
5024 return (stat);
5025 }
5026
5027 /**************************************************************/
5028 /* */
5029 /* GatewayInfo */
5030 /* */
5031 /**************************************************************/
5032
5033 EXTERN int asn1PD_H225GatewayInfo (OOCTXT* pctxt, H225GatewayInfo* pvalue)
5034 {
5035 int stat = ASN_OK;
5036 OOCTXT lctxt;
5037 ASN1OpenType openType;
5038 ASN1UINT bitcnt;
5039 ASN1UINT i;
5040 ASN1BOOL optbit = 0;
5041 ASN1BOOL extbit = 0;
5042
5043 /* extension bit */
5044
5045 DECODEBIT (pctxt, &extbit);
5046
5047 /* optional bits */
5048
5049 memset (&pvalue->m, 0, sizeof(pvalue->m));
5050
5051 DECODEBIT (pctxt, &optbit);
5052 pvalue->m.protocolPresent = optbit;
5053
5054 DECODEBIT (pctxt, &optbit);
5055 pvalue->m.nonStandardDataPresent = optbit;
5056
5057 /* decode protocol */
5058
5059 if (pvalue->m.protocolPresent) {
5060 invokeStartElement (pctxt, "protocol", -1);
5061
5062 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->protocol);
5063 if (stat != ASN_OK) return stat;
5064
5065 invokeEndElement (pctxt, "protocol", -1);
5066 }
5067
5068 /* decode nonStandardData */
5069
5070 if (pvalue->m.nonStandardDataPresent) {
5071 invokeStartElement (pctxt, "nonStandardData", -1);
5072
5073 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
5074 if (stat != ASN_OK) return stat;
5075
5076 invokeEndElement (pctxt, "nonStandardData", -1);
5077 }
5078
5079 if (extbit) {
5080
5081 /* decode extension optional bits length */
5082
5083 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5084 if (stat != ASN_OK) return stat;
5085
5086 bitcnt += 1;
5087
5088 ZEROCONTEXT (&lctxt);
5089 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5090 if (stat != ASN_OK) return stat;
5091
5092 stat = moveBitCursor (pctxt, bitcnt);
5093 if (stat != ASN_OK) return stat;
5094
5095 for (i = 0; i < bitcnt; i++) {
5096 DECODEBIT (&lctxt, &optbit);
5097
5098 if (optbit) {
5099 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5100 if (stat != ASN_OK) return stat;
5101
5102 pctxt->buffer.byteIndex += openType.numocts;
5103 }
5104 }
5105 }
5106
5107 return (stat);
5108 }
5109
5110 /**************************************************************/
5111 /* */
5112 /* McuInfo */
5113 /* */
5114 /**************************************************************/
5115
5116 EXTERN int asn1PD_H225McuInfo (OOCTXT* pctxt, H225McuInfo* pvalue)
5117 {
5118 int stat = ASN_OK;
5119 OOCTXT lctxt;
5120 OOCTXT lctxt2;
5121 ASN1OpenType openType;
5122 ASN1UINT bitcnt;
5123 ASN1UINT i;
5124 ASN1BOOL optbit = 0;
5125 ASN1BOOL extbit = 0;
5126
5127 /* extension bit */
5128
5129 DECODEBIT (pctxt, &extbit);
5130
5131 /* optional bits */
5132
5133 memset (&pvalue->m, 0, sizeof(pvalue->m));
5134
5135 DECODEBIT (pctxt, &optbit);
5136 pvalue->m.nonStandardDataPresent = optbit;
5137
5138 /* decode nonStandardData */
5139
5140 if (pvalue->m.nonStandardDataPresent) {
5141 invokeStartElement (pctxt, "nonStandardData", -1);
5142
5143 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
5144 if (stat != ASN_OK) return stat;
5145
5146 invokeEndElement (pctxt, "nonStandardData", -1);
5147 }
5148
5149 if (extbit) {
5150
5151 /* decode extension optional bits length */
5152
5153 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5154 if (stat != ASN_OK) return stat;
5155
5156 bitcnt += 1;
5157
5158 ZEROCONTEXT (&lctxt);
5159 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5160 if (stat != ASN_OK) return stat;
5161
5162 stat = moveBitCursor (pctxt, bitcnt);
5163 if (stat != ASN_OK) return stat;
5164
5165 for (i = 0; i < bitcnt; i++) {
5166 DECODEBIT (&lctxt, &optbit);
5167
5168 if (optbit) {
5169 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5170 if (stat != ASN_OK) return stat;
5171
5172 if (i < 1 && openType.numocts > 0) { /* known element */
5173 copyContext (&lctxt2, pctxt);
5174 initContextBuffer (pctxt, openType.data, openType.numocts);
5175
5176 switch (i) {
5177 case 0:
5178 pvalue->m.protocolPresent = 1;
5179
5180 invokeStartElement (pctxt, "protocol", -1);
5181
5182 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->protocol);
5183 if (stat != ASN_OK) return stat;
5184
5185 invokeEndElement (pctxt, "protocol", -1);
5186 break;
5187
5188 default:
5189 pctxt->buffer.byteIndex += openType.numocts;
5190 }
5191 copyContext (pctxt, &lctxt2);
5192 }
5193 else { /* unknown element */
5194 pctxt->buffer.byteIndex += openType.numocts;
5195 }
5196 }
5197 }
5198 }
5199
5200 return (stat);
5201 }
5202
5203 /**************************************************************/
5204 /* */
5205 /* TerminalInfo */
5206 /* */
5207 /**************************************************************/
5208
5209 EXTERN int asn1PD_H225TerminalInfo (OOCTXT* pctxt, H225TerminalInfo* pvalue)
5210 {
5211 int stat = ASN_OK;
5212 OOCTXT lctxt;
5213 ASN1OpenType openType;
5214 ASN1UINT bitcnt;
5215 ASN1UINT i;
5216 ASN1BOOL optbit = 0;
5217 ASN1BOOL extbit = 0;
5218
5219 /* extension bit */
5220
5221 DECODEBIT (pctxt, &extbit);
5222
5223 /* optional bits */
5224
5225 memset (&pvalue->m, 0, sizeof(pvalue->m));
5226
5227 DECODEBIT (pctxt, &optbit);
5228 pvalue->m.nonStandardDataPresent = optbit;
5229
5230 /* decode nonStandardData */
5231
5232 if (pvalue->m.nonStandardDataPresent) {
5233 invokeStartElement (pctxt, "nonStandardData", -1);
5234
5235 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
5236 if (stat != ASN_OK) return stat;
5237
5238 invokeEndElement (pctxt, "nonStandardData", -1);
5239 }
5240
5241 if (extbit) {
5242
5243 /* decode extension optional bits length */
5244
5245 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5246 if (stat != ASN_OK) return stat;
5247
5248 bitcnt += 1;
5249
5250 ZEROCONTEXT (&lctxt);
5251 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5252 if (stat != ASN_OK) return stat;
5253
5254 stat = moveBitCursor (pctxt, bitcnt);
5255 if (stat != ASN_OK) return stat;
5256
5257 for (i = 0; i < bitcnt; i++) {
5258 DECODEBIT (&lctxt, &optbit);
5259
5260 if (optbit) {
5261 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5262 if (stat != ASN_OK) return stat;
5263
5264 pctxt->buffer.byteIndex += openType.numocts;
5265 }
5266 }
5267 }
5268
5269 return (stat);
5270 }
5271
5272 /**************************************************************/
5273 /* */
5274 /* TunnelledProtocolAlternateIdentifier */
5275 /* */
5276 /**************************************************************/
5277
5278 EXTERN int asn1PD_H225TunnelledProtocolAlternateIdentifier (OOCTXT* pctxt, H225TunnelledProtocolAlternateIdentifier* pvalue)
5279 {
5280 static Asn1SizeCnst protocolType_lsize1 = { 0, 1, 64, 0 };
5281 static Asn1SizeCnst protocolVariant_lsize1 = { 0, 1, 64, 0 };
5282 int stat = ASN_OK;
5283 OOCTXT lctxt;
5284 ASN1OpenType openType;
5285 ASN1UINT bitcnt;
5286 ASN1UINT i;
5287 ASN1BOOL optbit = 0;
5288 ASN1BOOL extbit = 0;
5289
5290 /* extension bit */
5291
5292 DECODEBIT (pctxt, &extbit);
5293
5294 /* optional bits */
5295
5296 memset (&pvalue->m, 0, sizeof(pvalue->m));
5297
5298 DECODEBIT (pctxt, &optbit);
5299 pvalue->m.protocolVariantPresent = optbit;
5300
5301 /* decode protocolType */
5302
5303 invokeStartElement (pctxt, "protocolType", -1);
5304
5305 addSizeConstraint (pctxt, &protocolType_lsize1);
5306
5307 stat = decodeConstrainedStringEx (pctxt, &pvalue->protocolType, 0, 8, 7, 7);
5308 if (stat != ASN_OK) return stat;
5309 invokeCharStrValue (pctxt, pvalue->protocolType);
5310
5311 invokeEndElement (pctxt, "protocolType", -1);
5312
5313 /* decode protocolVariant */
5314
5315 if (pvalue->m.protocolVariantPresent) {
5316 invokeStartElement (pctxt, "protocolVariant", -1);
5317
5318 addSizeConstraint (pctxt, &protocolVariant_lsize1);
5319
5320 stat = decodeConstrainedStringEx (pctxt, &pvalue->protocolVariant, 0, 8, 7, 7);
5321 if (stat != ASN_OK) return stat;
5322 invokeCharStrValue (pctxt, pvalue->protocolVariant);
5323
5324 invokeEndElement (pctxt, "protocolVariant", -1);
5325 }
5326
5327 if (extbit) {
5328
5329 /* decode extension optional bits length */
5330
5331 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5332 if (stat != ASN_OK) return stat;
5333
5334 bitcnt += 1;
5335
5336 ZEROCONTEXT (&lctxt);
5337 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5338 if (stat != ASN_OK) return stat;
5339
5340 stat = moveBitCursor (pctxt, bitcnt);
5341 if (stat != ASN_OK) return stat;
5342
5343 for (i = 0; i < bitcnt; i++) {
5344 DECODEBIT (&lctxt, &optbit);
5345
5346 if (optbit) {
5347 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5348 if (stat != ASN_OK) return stat;
5349
5350 pctxt->buffer.byteIndex += openType.numocts;
5351 }
5352 }
5353 }
5354
5355 return (stat);
5356 }
5357
5358 /**************************************************************/
5359 /* */
5360 /* TunnelledProtocol_id */
5361 /* */
5362 /**************************************************************/
5363
5364 EXTERN int asn1PD_H225TunnelledProtocol_id (OOCTXT* pctxt, H225TunnelledProtocol_id* pvalue)
5365 {
5366 int stat = ASN_OK;
5367 ASN1UINT ui;
5368 ASN1OpenType openType;
5369 ASN1BOOL extbit = 0;
5370
5371 /* extension bit */
5372
5373 DECODEBIT (pctxt, &extbit);
5374
5375 if (!extbit) {
5376 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
5377 if (stat != ASN_OK) return stat;
5378 else pvalue->t = ui + 1;
5379
5380 switch (ui) {
5381 /* tunnelledProtocolObjectID */
5382 case 0:
5383 invokeStartElement (pctxt, "tunnelledProtocolObjectID", -1);
5384
5385 pvalue->u.tunnelledProtocolObjectID = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
5386
5387 stat = decodeObjectIdentifier (pctxt, pvalue->u.tunnelledProtocolObjectID);
5388 if (stat != ASN_OK) return stat;
5389 invokeOidValue (pctxt, pvalue->u.tunnelledProtocolObjectID->numids, pvalue->u.tunnelledProtocolObjectID->subid);
5390
5391 invokeEndElement (pctxt, "tunnelledProtocolObjectID", -1);
5392
5393 break;
5394
5395 /* tunnelledProtocolAlternateID */
5396 case 1:
5397 invokeStartElement (pctxt, "tunnelledProtocolAlternateID", -1);
5398
5399 pvalue->u.tunnelledProtocolAlternateID = ALLOC_ASN1ELEM (pctxt, H225TunnelledProtocolAlternateIdentifier);
5400
5401 stat = asn1PD_H225TunnelledProtocolAlternateIdentifier (pctxt, pvalue->u.tunnelledProtocolAlternateID);
5402 if (stat != ASN_OK) return stat;
5403
5404 invokeEndElement (pctxt, "tunnelledProtocolAlternateID", -1);
5405
5406 break;
5407
5408 default:
5409 return ASN_E_INVOPT;
5410 }
5411 }
5412 else {
5413 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
5414 if (stat != ASN_OK) return stat;
5415 else pvalue->t = ui + 3;
5416
5417 stat = decodeByteAlign (pctxt);
5418 if (stat != ASN_OK) return stat;
5419
5420 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5421 if (stat != ASN_OK) return stat;
5422
5423 }
5424
5425 return (stat);
5426 }
5427
5428 /**************************************************************/
5429 /* */
5430 /* TunnelledProtocol */
5431 /* */
5432 /**************************************************************/
5433
5434 EXTERN int asn1PD_H225TunnelledProtocol (OOCTXT* pctxt, H225TunnelledProtocol* pvalue)
5435 {
5436 static Asn1SizeCnst subIdentifier_lsize1 = { 0, 1, 64, 0 };
5437 int stat = ASN_OK;
5438 OOCTXT lctxt;
5439 ASN1OpenType openType;
5440 ASN1UINT bitcnt;
5441 ASN1UINT i;
5442 ASN1BOOL optbit = 0;
5443 ASN1BOOL extbit = 0;
5444
5445 /* extension bit */
5446
5447 DECODEBIT (pctxt, &extbit);
5448
5449 /* optional bits */
5450
5451 memset (&pvalue->m, 0, sizeof(pvalue->m));
5452
5453 DECODEBIT (pctxt, &optbit);
5454 pvalue->m.subIdentifierPresent = optbit;
5455
5456 /* decode id */
5457
5458 invokeStartElement (pctxt, "id", -1);
5459
5460 stat = asn1PD_H225TunnelledProtocol_id (pctxt, &pvalue->id);
5461 if (stat != ASN_OK) return stat;
5462
5463 invokeEndElement (pctxt, "id", -1);
5464
5465 /* decode subIdentifier */
5466
5467 if (pvalue->m.subIdentifierPresent) {
5468 invokeStartElement (pctxt, "subIdentifier", -1);
5469
5470 addSizeConstraint (pctxt, &subIdentifier_lsize1);
5471
5472 stat = decodeConstrainedStringEx (pctxt, &pvalue->subIdentifier, 0, 8, 7, 7);
5473 if (stat != ASN_OK) return stat;
5474 invokeCharStrValue (pctxt, pvalue->subIdentifier);
5475
5476 invokeEndElement (pctxt, "subIdentifier", -1);
5477 }
5478
5479 if (extbit) {
5480
5481 /* decode extension optional bits length */
5482
5483 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5484 if (stat != ASN_OK) return stat;
5485
5486 bitcnt += 1;
5487
5488 ZEROCONTEXT (&lctxt);
5489 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5490 if (stat != ASN_OK) return stat;
5491
5492 stat = moveBitCursor (pctxt, bitcnt);
5493 if (stat != ASN_OK) return stat;
5494
5495 for (i = 0; i < bitcnt; i++) {
5496 DECODEBIT (&lctxt, &optbit);
5497
5498 if (optbit) {
5499 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5500 if (stat != ASN_OK) return stat;
5501
5502 pctxt->buffer.byteIndex += openType.numocts;
5503 }
5504 }
5505 }
5506
5507 return (stat);
5508 }
5509
5510 /**************************************************************/
5511 /* */
5512 /* _SeqOfH225TunnelledProtocol */
5513 /* */
5514 /**************************************************************/
5515
5516 EXTERN int asn1PD_H225_SeqOfH225TunnelledProtocol (OOCTXT* pctxt, H225_SeqOfH225TunnelledProtocol* pvalue)
5517 {
5518 int stat = ASN_OK;
5519 H225TunnelledProtocol* pdata;
5520 ASN1UINT count = 0;
5521 ASN1UINT xx1;
5522 int lstat;
5523
5524 dListInit (pvalue);
5525
5526 for (;;) {
5527 /* decode length determinant */
5528
5529 lstat = decodeLength (pctxt, &count);
5530 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
5531 return lstat;
5532 }
5533
5534 /* decode elements */
5535
5536 for (xx1 = 0; xx1 < count; xx1++) {
5537 invokeStartElement (pctxt, "elem", xx1);
5538
5539 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225TunnelledProtocol);
5540
5541 stat = asn1PD_H225TunnelledProtocol (pctxt, pdata);
5542 if (stat != ASN_OK) return stat;
5543 invokeEndElement (pctxt, "elem", xx1);
5544
5545 dListAppendNode (pctxt, pvalue, pdata);
5546 }
5547
5548 if(lstat == ASN_OK) break;
5549 }
5550
5551 return (stat);
5552 }
5553
5554 /**************************************************************/
5555 /* */
5556 /* EndpointType */
5557 /* */
5558 /**************************************************************/
5559
5560 EXTERN int asn1PD_H225EndpointType (OOCTXT* pctxt, H225EndpointType* pvalue)
5561 {
5562 int stat = ASN_OK;
5563 OOCTXT lctxt;
5564 OOCTXT lctxt2;
5565 ASN1OpenType openType;
5566 ASN1UINT bitcnt;
5567 ASN1UINT i;
5568 ASN1BOOL optbit = 0;
5569 ASN1BOOL extbit = 0;
5570
5571 /* extension bit */
5572
5573 DECODEBIT (pctxt, &extbit);
5574
5575 /* optional bits */
5576
5577 memset (&pvalue->m, 0, sizeof(pvalue->m));
5578
5579 DECODEBIT (pctxt, &optbit);
5580 pvalue->m.nonStandardDataPresent = optbit;
5581
5582 DECODEBIT (pctxt, &optbit);
5583 pvalue->m.vendorPresent = optbit;
5584
5585 DECODEBIT (pctxt, &optbit);
5586 pvalue->m.gatekeeperPresent = optbit;
5587
5588 DECODEBIT (pctxt, &optbit);
5589 pvalue->m.gatewayPresent = optbit;
5590
5591 DECODEBIT (pctxt, &optbit);
5592 pvalue->m.mcuPresent = optbit;
5593
5594 DECODEBIT (pctxt, &optbit);
5595 pvalue->m.terminalPresent = optbit;
5596
5597 /* decode nonStandardData */
5598
5599 if (pvalue->m.nonStandardDataPresent) {
5600 invokeStartElement (pctxt, "nonStandardData", -1);
5601
5602 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
5603 if (stat != ASN_OK) return stat;
5604
5605 invokeEndElement (pctxt, "nonStandardData", -1);
5606 }
5607
5608 /* decode vendor */
5609
5610 if (pvalue->m.vendorPresent) {
5611 invokeStartElement (pctxt, "vendor", -1);
5612
5613 stat = asn1PD_H225VendorIdentifier (pctxt, &pvalue->vendor);
5614 if (stat != ASN_OK) return stat;
5615
5616 invokeEndElement (pctxt, "vendor", -1);
5617 }
5618
5619 /* decode gatekeeper */
5620
5621 if (pvalue->m.gatekeeperPresent) {
5622 invokeStartElement (pctxt, "gatekeeper", -1);
5623
5624 stat = asn1PD_H225GatekeeperInfo (pctxt, &pvalue->gatekeeper);
5625 if (stat != ASN_OK) return stat;
5626
5627 invokeEndElement (pctxt, "gatekeeper", -1);
5628 }
5629
5630 /* decode gateway */
5631
5632 if (pvalue->m.gatewayPresent) {
5633 invokeStartElement (pctxt, "gateway", -1);
5634
5635 stat = asn1PD_H225GatewayInfo (pctxt, &pvalue->gateway);
5636 if (stat != ASN_OK) return stat;
5637
5638 invokeEndElement (pctxt, "gateway", -1);
5639 }
5640
5641 /* decode mcu */
5642
5643 if (pvalue->m.mcuPresent) {
5644 invokeStartElement (pctxt, "mcu", -1);
5645
5646 stat = asn1PD_H225McuInfo (pctxt, &pvalue->mcu);
5647 if (stat != ASN_OK) return stat;
5648
5649 invokeEndElement (pctxt, "mcu", -1);
5650 }
5651
5652 /* decode terminal */
5653
5654 if (pvalue->m.terminalPresent) {
5655 invokeStartElement (pctxt, "terminal", -1);
5656
5657 stat = asn1PD_H225TerminalInfo (pctxt, &pvalue->terminal);
5658 if (stat != ASN_OK) return stat;
5659
5660 invokeEndElement (pctxt, "terminal", -1);
5661 }
5662
5663 /* decode mc */
5664
5665 invokeStartElement (pctxt, "mc", -1);
5666
5667 stat = DECODEBIT (pctxt, &pvalue->mc);
5668 if (stat != ASN_OK) return stat;
5669 invokeBoolValue (pctxt, pvalue->mc);
5670
5671 invokeEndElement (pctxt, "mc", -1);
5672
5673 /* decode undefinedNode */
5674
5675 invokeStartElement (pctxt, "undefinedNode", -1);
5676
5677 stat = DECODEBIT (pctxt, &pvalue->undefinedNode);
5678 if (stat != ASN_OK) return stat;
5679 invokeBoolValue (pctxt, pvalue->undefinedNode);
5680
5681 invokeEndElement (pctxt, "undefinedNode", -1);
5682
5683 if (extbit) {
5684
5685 /* decode extension optional bits length */
5686
5687 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5688 if (stat != ASN_OK) return stat;
5689
5690 bitcnt += 1;
5691
5692 ZEROCONTEXT (&lctxt);
5693 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5694 if (stat != ASN_OK) return stat;
5695
5696 stat = moveBitCursor (pctxt, bitcnt);
5697 if (stat != ASN_OK) return stat;
5698
5699 for (i = 0; i < bitcnt; i++) {
5700 DECODEBIT (&lctxt, &optbit);
5701
5702 if (optbit) {
5703 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5704 if (stat != ASN_OK) return stat;
5705
5706 if (i < 2 && openType.numocts > 0) { /* known element */
5707 copyContext (&lctxt2, pctxt);
5708 initContextBuffer (pctxt, openType.data, openType.numocts);
5709
5710 switch (i) {
5711 case 0:
5712 pvalue->m.setPresent = 1;
5713
5714 invokeStartElement (pctxt, "set", -1);
5715
5716 stat = asn1PD_H225EndpointType_set (pctxt, &pvalue->set);
5717 if (stat != ASN_OK) return stat;
5718
5719 invokeEndElement (pctxt, "set", -1);
5720 break;
5721
5722 case 1:
5723 pvalue->m.supportedTunnelledProtocolsPresent = 1;
5724
5725 invokeStartElement (pctxt, "supportedTunnelledProtocols", -1);
5726
5727 stat = asn1PD_H225_SeqOfH225TunnelledProtocol (pctxt, &pvalue->supportedTunnelledProtocols);
5728 if (stat != ASN_OK) return stat;
5729
5730 invokeEndElement (pctxt, "supportedTunnelledProtocols", -1);
5731 break;
5732
5733 default:
5734 pctxt->buffer.byteIndex += openType.numocts;
5735 }
5736 copyContext (pctxt, &lctxt2);
5737 }
5738 else { /* unknown element */
5739 pctxt->buffer.byteIndex += openType.numocts;
5740 }
5741 }
5742 }
5743 }
5744
5745 return (stat);
5746 }
5747
5748 /**************************************************************/
5749 /* */
5750 /* _SeqOfH225CallReferenceValue */
5751 /* */
5752 /**************************************************************/
5753
5754 EXTERN int asn1PD_H225_SeqOfH225CallReferenceValue (OOCTXT* pctxt, H225_SeqOfH225CallReferenceValue* pvalue)
5755 {
5756 int stat = ASN_OK;
5757 ASN1UINT xx1;
5758
5759 /* decode length determinant */
5760
5761 stat = decodeLength (pctxt, &pvalue->n);
5762 if (stat != ASN_OK) return stat;
5763
5764 /* decode elements */
5765
5766 ALLOC_ASN1ARRAY (pctxt, pvalue, H225CallReferenceValue);
5767
5768 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
5769 invokeStartElement (pctxt, "elem", xx1);
5770
5771 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->elem[xx1]);
5772 if (stat != ASN_OK) return stat;
5773 invokeEndElement (pctxt, "elem", xx1);
5774
5775 }
5776
5777 return (stat);
5778 }
5779
5780 /**************************************************************/
5781 /* */
5782 /* Setup_UUIE_conferenceGoal */
5783 /* */
5784 /**************************************************************/
5785
5786 EXTERN int asn1PD_H225Setup_UUIE_conferenceGoal (OOCTXT* pctxt, H225Setup_UUIE_conferenceGoal* pvalue)
5787 {
5788 int stat = ASN_OK;
5789 ASN1UINT ui;
5790 ASN1OpenType openType;
5791 ASN1BOOL extbit = 0;
5792 OOCTXT lctxt;
5793
5794 /* extension bit */
5795
5796 DECODEBIT (pctxt, &extbit);
5797
5798 if (!extbit) {
5799 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
5800 if (stat != ASN_OK) return stat;
5801 else pvalue->t = ui + 1;
5802
5803 switch (ui) {
5804 /* create */
5805 case 0:
5806 invokeStartElement (pctxt, "create", -1);
5807
5808 /* NULL */
5809 invokeNullValue (pctxt);
5810
5811 invokeEndElement (pctxt, "create", -1);
5812
5813 break;
5814
5815 /* join */
5816 case 1:
5817 invokeStartElement (pctxt, "join", -1);
5818
5819 /* NULL */
5820 invokeNullValue (pctxt);
5821
5822 invokeEndElement (pctxt, "join", -1);
5823
5824 break;
5825
5826 /* invite */
5827 case 2:
5828 invokeStartElement (pctxt, "invite", -1);
5829
5830 /* NULL */
5831 invokeNullValue (pctxt);
5832
5833 invokeEndElement (pctxt, "invite", -1);
5834
5835 break;
5836
5837 default:
5838 return ASN_E_INVOPT;
5839 }
5840 }
5841 else {
5842 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
5843 if (stat != ASN_OK) return stat;
5844 else pvalue->t = ui + 4;
5845
5846 stat = decodeByteAlign (pctxt);
5847 if (stat != ASN_OK) return stat;
5848
5849 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5850 if (stat != ASN_OK) return stat;
5851
5852 copyContext (&lctxt, pctxt);
5853 initContextBuffer (pctxt, openType.data, openType.numocts);
5854
5855 switch (pvalue->t) {
5856 /* capability_negotiation */
5857 case 4:
5858 invokeStartElement (pctxt, "capability_negotiation", -1);
5859
5860 /* NULL */
5861 invokeNullValue (pctxt);
5862
5863 invokeEndElement (pctxt, "capability_negotiation", -1);
5864
5865 break;
5866
5867 /* callIndependentSupplementaryService */
5868 case 5:
5869 invokeStartElement (pctxt, "callIndependentSupplementaryService", -1);
5870
5871 /* NULL */
5872 invokeNullValue (pctxt);
5873
5874 invokeEndElement (pctxt, "callIndependentSupplementaryService", -1);
5875
5876 break;
5877
5878 default:;
5879 }
5880
5881 copyContext (pctxt, &lctxt);
5882 }
5883
5884 return (stat);
5885 }
5886
5887 /**************************************************************/
5888 /* */
5889 /* Q954Details */
5890 /* */
5891 /**************************************************************/
5892
5893 EXTERN int asn1PD_H225Q954Details (OOCTXT* pctxt, H225Q954Details* pvalue)
5894 {
5895 int stat = ASN_OK;
5896 OOCTXT lctxt;
5897 ASN1OpenType openType;
5898 ASN1UINT bitcnt;
5899 ASN1UINT i;
5900 ASN1BOOL optbit = 0;
5901 ASN1BOOL extbit = 0;
5902
5903 /* extension bit */
5904
5905 DECODEBIT (pctxt, &extbit);
5906
5907 /* decode conferenceCalling */
5908
5909 invokeStartElement (pctxt, "conferenceCalling", -1);
5910
5911 stat = DECODEBIT (pctxt, &pvalue->conferenceCalling);
5912 if (stat != ASN_OK) return stat;
5913 invokeBoolValue (pctxt, pvalue->conferenceCalling);
5914
5915 invokeEndElement (pctxt, "conferenceCalling", -1);
5916
5917 /* decode threePartyService */
5918
5919 invokeStartElement (pctxt, "threePartyService", -1);
5920
5921 stat = DECODEBIT (pctxt, &pvalue->threePartyService);
5922 if (stat != ASN_OK) return stat;
5923 invokeBoolValue (pctxt, pvalue->threePartyService);
5924
5925 invokeEndElement (pctxt, "threePartyService", -1);
5926
5927 if (extbit) {
5928
5929 /* decode extension optional bits length */
5930
5931 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
5932 if (stat != ASN_OK) return stat;
5933
5934 bitcnt += 1;
5935
5936 ZEROCONTEXT (&lctxt);
5937 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
5938 if (stat != ASN_OK) return stat;
5939
5940 stat = moveBitCursor (pctxt, bitcnt);
5941 if (stat != ASN_OK) return stat;
5942
5943 for (i = 0; i < bitcnt; i++) {
5944 DECODEBIT (&lctxt, &optbit);
5945
5946 if (optbit) {
5947 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
5948 if (stat != ASN_OK) return stat;
5949
5950 pctxt->buffer.byteIndex += openType.numocts;
5951 }
5952 }
5953 }
5954
5955 return (stat);
5956 }
5957
5958 /**************************************************************/
5959 /* */
5960 /* QseriesOptions */
5961 /* */
5962 /**************************************************************/
5963
5964 EXTERN int asn1PD_H225QseriesOptions (OOCTXT* pctxt, H225QseriesOptions* pvalue)
5965 {
5966 int stat = ASN_OK;
5967 OOCTXT lctxt;
5968 ASN1OpenType openType;
5969 ASN1UINT bitcnt;
5970 ASN1UINT i;
5971 ASN1BOOL optbit = 0;
5972 ASN1BOOL extbit = 0;
5973
5974 /* extension bit */
5975
5976 DECODEBIT (pctxt, &extbit);
5977
5978 /* decode q932Full */
5979
5980 invokeStartElement (pctxt, "q932Full", -1);
5981
5982 stat = DECODEBIT (pctxt, &pvalue->q932Full);
5983 if (stat != ASN_OK) return stat;
5984 invokeBoolValue (pctxt, pvalue->q932Full);
5985
5986 invokeEndElement (pctxt, "q932Full", -1);
5987
5988 /* decode q951Full */
5989
5990 invokeStartElement (pctxt, "q951Full", -1);
5991
5992 stat = DECODEBIT (pctxt, &pvalue->q951Full);
5993 if (stat != ASN_OK) return stat;
5994 invokeBoolValue (pctxt, pvalue->q951Full);
5995
5996 invokeEndElement (pctxt, "q951Full", -1);
5997
5998 /* decode q952Full */
5999
6000 invokeStartElement (pctxt, "q952Full", -1);
6001
6002 stat = DECODEBIT (pctxt, &pvalue->q952Full);
6003 if (stat != ASN_OK) return stat;
6004 invokeBoolValue (pctxt, pvalue->q952Full);
6005
6006 invokeEndElement (pctxt, "q952Full", -1);
6007
6008 /* decode q953Full */
6009
6010 invokeStartElement (pctxt, "q953Full", -1);
6011
6012 stat = DECODEBIT (pctxt, &pvalue->q953Full);
6013 if (stat != ASN_OK) return stat;
6014 invokeBoolValue (pctxt, pvalue->q953Full);
6015
6016 invokeEndElement (pctxt, "q953Full", -1);
6017
6018 /* decode q955Full */
6019
6020 invokeStartElement (pctxt, "q955Full", -1);
6021
6022 stat = DECODEBIT (pctxt, &pvalue->q955Full);
6023 if (stat != ASN_OK) return stat;
6024 invokeBoolValue (pctxt, pvalue->q955Full);
6025
6026 invokeEndElement (pctxt, "q955Full", -1);
6027
6028 /* decode q956Full */
6029
6030 invokeStartElement (pctxt, "q956Full", -1);
6031
6032 stat = DECODEBIT (pctxt, &pvalue->q956Full);
6033 if (stat != ASN_OK) return stat;
6034 invokeBoolValue (pctxt, pvalue->q956Full);
6035
6036 invokeEndElement (pctxt, "q956Full", -1);
6037
6038 /* decode q957Full */
6039
6040 invokeStartElement (pctxt, "q957Full", -1);
6041
6042 stat = DECODEBIT (pctxt, &pvalue->q957Full);
6043 if (stat != ASN_OK) return stat;
6044 invokeBoolValue (pctxt, pvalue->q957Full);
6045
6046 invokeEndElement (pctxt, "q957Full", -1);
6047
6048 /* decode q954Info */
6049
6050 invokeStartElement (pctxt, "q954Info", -1);
6051
6052 stat = asn1PD_H225Q954Details (pctxt, &pvalue->q954Info);
6053 if (stat != ASN_OK) return stat;
6054
6055 invokeEndElement (pctxt, "q954Info", -1);
6056
6057 if (extbit) {
6058
6059 /* decode extension optional bits length */
6060
6061 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
6062 if (stat != ASN_OK) return stat;
6063
6064 bitcnt += 1;
6065
6066 ZEROCONTEXT (&lctxt);
6067 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
6068 if (stat != ASN_OK) return stat;
6069
6070 stat = moveBitCursor (pctxt, bitcnt);
6071 if (stat != ASN_OK) return stat;
6072
6073 for (i = 0; i < bitcnt; i++) {
6074 DECODEBIT (&lctxt, &optbit);
6075
6076 if (optbit) {
6077 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6078 if (stat != ASN_OK) return stat;
6079
6080 pctxt->buffer.byteIndex += openType.numocts;
6081 }
6082 }
6083 }
6084
6085 return (stat);
6086 }
6087
6088 /**************************************************************/
6089 /* */
6090 /* CallType */
6091 /* */
6092 /**************************************************************/
6093
6094 EXTERN int asn1PD_H225CallType (OOCTXT* pctxt, H225CallType* pvalue)
6095 {
6096 int stat = ASN_OK;
6097 ASN1UINT ui;
6098 ASN1OpenType openType;
6099 ASN1BOOL extbit = 0;
6100
6101 /* extension bit */
6102
6103 DECODEBIT (pctxt, &extbit);
6104
6105 if (!extbit) {
6106 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
6107 if (stat != ASN_OK) return stat;
6108 else pvalue->t = ui + 1;
6109
6110 switch (ui) {
6111 /* pointToPoint */
6112 case 0:
6113 invokeStartElement (pctxt, "pointToPoint", -1);
6114
6115 /* NULL */
6116 invokeNullValue (pctxt);
6117
6118 invokeEndElement (pctxt, "pointToPoint", -1);
6119
6120 break;
6121
6122 /* oneToN */
6123 case 1:
6124 invokeStartElement (pctxt, "oneToN", -1);
6125
6126 /* NULL */
6127 invokeNullValue (pctxt);
6128
6129 invokeEndElement (pctxt, "oneToN", -1);
6130
6131 break;
6132
6133 /* nToOne */
6134 case 2:
6135 invokeStartElement (pctxt, "nToOne", -1);
6136
6137 /* NULL */
6138 invokeNullValue (pctxt);
6139
6140 invokeEndElement (pctxt, "nToOne", -1);
6141
6142 break;
6143
6144 /* nToN */
6145 case 3:
6146 invokeStartElement (pctxt, "nToN", -1);
6147
6148 /* NULL */
6149 invokeNullValue (pctxt);
6150
6151 invokeEndElement (pctxt, "nToN", -1);
6152
6153 break;
6154
6155 default:
6156 return ASN_E_INVOPT;
6157 }
6158 }
6159 else {
6160 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
6161 if (stat != ASN_OK) return stat;
6162 else pvalue->t = ui + 5;
6163
6164 stat = decodeByteAlign (pctxt);
6165 if (stat != ASN_OK) return stat;
6166
6167 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6168 if (stat != ASN_OK) return stat;
6169
6170 }
6171
6172 return (stat);
6173 }
6174
6175 /**************************************************************/
6176 /* */
6177 /* CallIdentifier */
6178 /* */
6179 /**************************************************************/
6180
6181 EXTERN int asn1PD_H225CallIdentifier (OOCTXT* pctxt, H225CallIdentifier* pvalue)
6182 {
6183 int stat = ASN_OK;
6184 OOCTXT lctxt;
6185 ASN1OpenType openType;
6186 ASN1UINT bitcnt;
6187 ASN1UINT i;
6188 ASN1BOOL optbit = 0;
6189 ASN1BOOL extbit = 0;
6190
6191 /* extension bit */
6192
6193 DECODEBIT (pctxt, &extbit);
6194
6195 /* decode guid */
6196
6197 invokeStartElement (pctxt, "guid", -1);
6198
6199 stat = asn1PD_H225GloballyUniqueID (pctxt, &pvalue->guid);
6200 if (stat != ASN_OK) return stat;
6201
6202 invokeEndElement (pctxt, "guid", -1);
6203
6204 if (extbit) {
6205
6206 /* decode extension optional bits length */
6207
6208 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
6209 if (stat != ASN_OK) return stat;
6210
6211 bitcnt += 1;
6212
6213 ZEROCONTEXT (&lctxt);
6214 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
6215 if (stat != ASN_OK) return stat;
6216
6217 stat = moveBitCursor (pctxt, bitcnt);
6218 if (stat != ASN_OK) return stat;
6219
6220 for (i = 0; i < bitcnt; i++) {
6221 DECODEBIT (&lctxt, &optbit);
6222
6223 if (optbit) {
6224 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6225 if (stat != ASN_OK) return stat;
6226
6227 pctxt->buffer.byteIndex += openType.numocts;
6228 }
6229 }
6230 }
6231
6232 return (stat);
6233 }
6234
6235 /**************************************************************/
6236 /* */
6237 /* SecurityServiceMode */
6238 /* */
6239 /**************************************************************/
6240
6241 EXTERN int asn1PD_H225SecurityServiceMode (OOCTXT* pctxt, H225SecurityServiceMode* pvalue)
6242 {
6243 int stat = ASN_OK;
6244 ASN1UINT ui;
6245 ASN1OpenType openType;
6246 ASN1BOOL extbit = 0;
6247
6248 /* extension bit */
6249
6250 DECODEBIT (pctxt, &extbit);
6251
6252 if (!extbit) {
6253 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
6254 if (stat != ASN_OK) return stat;
6255 else pvalue->t = ui + 1;
6256
6257 switch (ui) {
6258 /* nonStandard */
6259 case 0:
6260 invokeStartElement (pctxt, "nonStandard", -1);
6261
6262 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
6263
6264 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
6265 if (stat != ASN_OK) return stat;
6266
6267 invokeEndElement (pctxt, "nonStandard", -1);
6268
6269 break;
6270
6271 /* none */
6272 case 1:
6273 invokeStartElement (pctxt, "none", -1);
6274
6275 /* NULL */
6276 invokeNullValue (pctxt);
6277
6278 invokeEndElement (pctxt, "none", -1);
6279
6280 break;
6281
6282 /* default_ */
6283 case 2:
6284 invokeStartElement (pctxt, "default_", -1);
6285
6286 /* NULL */
6287 invokeNullValue (pctxt);
6288
6289 invokeEndElement (pctxt, "default_", -1);
6290
6291 break;
6292
6293 default:
6294 return ASN_E_INVOPT;
6295 }
6296 }
6297 else {
6298 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
6299 if (stat != ASN_OK) return stat;
6300 else pvalue->t = ui + 4;
6301
6302 stat = decodeByteAlign (pctxt);
6303 if (stat != ASN_OK) return stat;
6304
6305 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6306 if (stat != ASN_OK) return stat;
6307
6308 }
6309
6310 return (stat);
6311 }
6312
6313 /**************************************************************/
6314 /* */
6315 /* SecurityCapabilities */
6316 /* */
6317 /**************************************************************/
6318
6319 EXTERN int asn1PD_H225SecurityCapabilities (OOCTXT* pctxt, H225SecurityCapabilities* pvalue)
6320 {
6321 int stat = ASN_OK;
6322 OOCTXT lctxt;
6323 ASN1OpenType openType;
6324 ASN1UINT bitcnt;
6325 ASN1UINT i;
6326 ASN1BOOL optbit = 0;
6327 ASN1BOOL extbit = 0;
6328
6329 /* extension bit */
6330
6331 DECODEBIT (pctxt, &extbit);
6332
6333 /* optional bits */
6334
6335 memset (&pvalue->m, 0, sizeof(pvalue->m));
6336
6337 DECODEBIT (pctxt, &optbit);
6338 pvalue->m.nonStandardPresent = optbit;
6339
6340 /* decode nonStandard */
6341
6342 if (pvalue->m.nonStandardPresent) {
6343 invokeStartElement (pctxt, "nonStandard", -1);
6344
6345 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandard);
6346 if (stat != ASN_OK) return stat;
6347
6348 invokeEndElement (pctxt, "nonStandard", -1);
6349 }
6350
6351 /* decode encryption */
6352
6353 invokeStartElement (pctxt, "encryption", -1);
6354
6355 stat = asn1PD_H225SecurityServiceMode (pctxt, &pvalue->encryption);
6356 if (stat != ASN_OK) return stat;
6357
6358 invokeEndElement (pctxt, "encryption", -1);
6359
6360 /* decode authentication */
6361
6362 invokeStartElement (pctxt, "authentication", -1);
6363
6364 stat = asn1PD_H225SecurityServiceMode (pctxt, &pvalue->authentication);
6365 if (stat != ASN_OK) return stat;
6366
6367 invokeEndElement (pctxt, "authentication", -1);
6368
6369 /* decode integrity */
6370
6371 invokeStartElement (pctxt, "integrity", -1);
6372
6373 stat = asn1PD_H225SecurityServiceMode (pctxt, &pvalue->integrity);
6374 if (stat != ASN_OK) return stat;
6375
6376 invokeEndElement (pctxt, "integrity", -1);
6377
6378 if (extbit) {
6379
6380 /* decode extension optional bits length */
6381
6382 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
6383 if (stat != ASN_OK) return stat;
6384
6385 bitcnt += 1;
6386
6387 ZEROCONTEXT (&lctxt);
6388 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
6389 if (stat != ASN_OK) return stat;
6390
6391 stat = moveBitCursor (pctxt, bitcnt);
6392 if (stat != ASN_OK) return stat;
6393
6394 for (i = 0; i < bitcnt; i++) {
6395 DECODEBIT (&lctxt, &optbit);
6396
6397 if (optbit) {
6398 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6399 if (stat != ASN_OK) return stat;
6400
6401 pctxt->buffer.byteIndex += openType.numocts;
6402 }
6403 }
6404 }
6405
6406 return (stat);
6407 }
6408
6409 /**************************************************************/
6410 /* */
6411 /* H245Security */
6412 /* */
6413 /**************************************************************/
6414
6415 EXTERN int asn1PD_H225H245Security (OOCTXT* pctxt, H225H245Security* pvalue)
6416 {
6417 int stat = ASN_OK;
6418 ASN1UINT ui;
6419 ASN1OpenType openType;
6420 ASN1BOOL extbit = 0;
6421
6422 /* extension bit */
6423
6424 DECODEBIT (pctxt, &extbit);
6425
6426 if (!extbit) {
6427 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
6428 if (stat != ASN_OK) return stat;
6429 else pvalue->t = ui + 1;
6430
6431 switch (ui) {
6432 /* nonStandard */
6433 case 0:
6434 invokeStartElement (pctxt, "nonStandard", -1);
6435
6436 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
6437
6438 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
6439 if (stat != ASN_OK) return stat;
6440
6441 invokeEndElement (pctxt, "nonStandard", -1);
6442
6443 break;
6444
6445 /* noSecurity */
6446 case 1:
6447 invokeStartElement (pctxt, "noSecurity", -1);
6448
6449 /* NULL */
6450 invokeNullValue (pctxt);
6451
6452 invokeEndElement (pctxt, "noSecurity", -1);
6453
6454 break;
6455
6456 /* tls */
6457 case 2:
6458 invokeStartElement (pctxt, "tls", -1);
6459
6460 pvalue->u.tls = ALLOC_ASN1ELEM (pctxt, H225SecurityCapabilities);
6461
6462 stat = asn1PD_H225SecurityCapabilities (pctxt, pvalue->u.tls);
6463 if (stat != ASN_OK) return stat;
6464
6465 invokeEndElement (pctxt, "tls", -1);
6466
6467 break;
6468
6469 /* ipsec */
6470 case 3:
6471 invokeStartElement (pctxt, "ipsec", -1);
6472
6473 pvalue->u.ipsec = ALLOC_ASN1ELEM (pctxt, H225SecurityCapabilities);
6474
6475 stat = asn1PD_H225SecurityCapabilities (pctxt, pvalue->u.ipsec);
6476 if (stat != ASN_OK) return stat;
6477
6478 invokeEndElement (pctxt, "ipsec", -1);
6479
6480 break;
6481
6482 default:
6483 return ASN_E_INVOPT;
6484 }
6485 }
6486 else {
6487 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
6488 if (stat != ASN_OK) return stat;
6489 else pvalue->t = ui + 5;
6490
6491 stat = decodeByteAlign (pctxt);
6492 if (stat != ASN_OK) return stat;
6493
6494 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6495 if (stat != ASN_OK) return stat;
6496
6497 }
6498
6499 return (stat);
6500 }
6501
6502 /**************************************************************/
6503 /* */
6504 /* _SeqOfH225H245Security */
6505 /* */
6506 /**************************************************************/
6507
6508 EXTERN int asn1PD_H225_SeqOfH225H245Security (OOCTXT* pctxt, H225_SeqOfH225H245Security* pvalue)
6509 {
6510 int stat = ASN_OK;
6511 H225H245Security* pdata;
6512 ASN1UINT count = 0;
6513 ASN1UINT xx1;
6514 int lstat;
6515
6516 dListInit (pvalue);
6517
6518 for (;;) {
6519 /* decode length determinant */
6520
6521 lstat = decodeLength (pctxt, &count);
6522 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
6523 return lstat;
6524 }
6525
6526 /* decode elements */
6527
6528 for (xx1 = 0; xx1 < count; xx1++) {
6529 invokeStartElement (pctxt, "elem", xx1);
6530
6531 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225H245Security);
6532
6533 stat = asn1PD_H225H245Security (pctxt, pdata);
6534 if (stat != ASN_OK) return stat;
6535 invokeEndElement (pctxt, "elem", xx1);
6536
6537 dListAppendNode (pctxt, pvalue, pdata);
6538 }
6539
6540 if(lstat == ASN_OK) break;
6541 }
6542
6543 return (stat);
6544 }
6545
6546 /**************************************************************/
6547 /* */
6548 /* _SeqOfH225ClearToken */
6549 /* */
6550 /**************************************************************/
6551
6552 EXTERN int asn1PD_H225_SeqOfH225ClearToken (OOCTXT* pctxt, H225_SeqOfH225ClearToken* pvalue)
6553 {
6554 int stat = ASN_OK;
6555 H235ClearToken* pdata;
6556 ASN1UINT count = 0;
6557 ASN1UINT xx1;
6558 int lstat;
6559
6560 dListInit (pvalue);
6561
6562 for (;;) {
6563 /* decode length determinant */
6564
6565 lstat = decodeLength (pctxt, &count);
6566 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
6567 return lstat;
6568 }
6569
6570 /* decode elements */
6571
6572 for (xx1 = 0; xx1 < count; xx1++) {
6573 invokeStartElement (pctxt, "elem", xx1);
6574
6575 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H235ClearToken);
6576
6577 stat = asn1PD_H235ClearToken (pctxt, pdata);
6578 if (stat != ASN_OK) return stat;
6579 invokeEndElement (pctxt, "elem", xx1);
6580
6581 dListAppendNode (pctxt, pvalue, pdata);
6582 }
6583
6584 if(lstat == ASN_OK) break;
6585 }
6586
6587 return (stat);
6588 }
6589
6590 /**************************************************************/
6591 /* */
6592 /* CryptoH323Token_cryptoEPPwdHash */
6593 /* */
6594 /**************************************************************/
6595
6596 EXTERN int asn1PD_H225CryptoH323Token_cryptoEPPwdHash (OOCTXT* pctxt, H225CryptoH323Token_cryptoEPPwdHash* pvalue)
6597 {
6598 int stat = ASN_OK;
6599
6600 /* decode alias */
6601
6602 invokeStartElement (pctxt, "alias", -1);
6603
6604 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->alias);
6605 if (stat != ASN_OK) return stat;
6606
6607 invokeEndElement (pctxt, "alias", -1);
6608
6609 /* decode timeStamp */
6610
6611 invokeStartElement (pctxt, "timeStamp", -1);
6612
6613 stat = asn1PD_H235TimeStamp (pctxt, &pvalue->timeStamp);
6614 if (stat != ASN_OK) return stat;
6615
6616 invokeEndElement (pctxt, "timeStamp", -1);
6617
6618 /* decode token */
6619
6620 invokeStartElement (pctxt, "token", -1);
6621
6622 stat = asn1PD_H235HASHED (pctxt, &pvalue->token);
6623 if (stat != ASN_OK) return stat;
6624
6625 invokeEndElement (pctxt, "token", -1);
6626
6627 return (stat);
6628 }
6629
6630 /**************************************************************/
6631 /* */
6632 /* CryptoH323Token_cryptoGKPwdHash */
6633 /* */
6634 /**************************************************************/
6635
6636 EXTERN int asn1PD_H225CryptoH323Token_cryptoGKPwdHash (OOCTXT* pctxt, H225CryptoH323Token_cryptoGKPwdHash* pvalue)
6637 {
6638 int stat = ASN_OK;
6639
6640 /* decode gatekeeperId */
6641
6642 invokeStartElement (pctxt, "gatekeeperId", -1);
6643
6644 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperId);
6645 if (stat != ASN_OK) return stat;
6646
6647 invokeEndElement (pctxt, "gatekeeperId", -1);
6648
6649 /* decode timeStamp */
6650
6651 invokeStartElement (pctxt, "timeStamp", -1);
6652
6653 stat = asn1PD_H235TimeStamp (pctxt, &pvalue->timeStamp);
6654 if (stat != ASN_OK) return stat;
6655
6656 invokeEndElement (pctxt, "timeStamp", -1);
6657
6658 /* decode token */
6659
6660 invokeStartElement (pctxt, "token", -1);
6661
6662 stat = asn1PD_H235HASHED (pctxt, &pvalue->token);
6663 if (stat != ASN_OK) return stat;
6664
6665 invokeEndElement (pctxt, "token", -1);
6666
6667 return (stat);
6668 }
6669
6670 /**************************************************************/
6671 /* */
6672 /* CryptoH323Token_cryptoEPCert */
6673 /* */
6674 /**************************************************************/
6675
6676 EXTERN int asn1PD_H225CryptoH323Token_cryptoEPCert (OOCTXT* pctxt, H225CryptoH323Token_cryptoEPCert* pvalue)
6677 {
6678 int stat = ASN_OK;
6679
6680 /* decode toBeSigned */
6681
6682 invokeStartElement (pctxt, "toBeSigned", -1);
6683
6684 stat = asn1PD_H235EncodedPwdCertToken (pctxt, &pvalue->toBeSigned);
6685 if (stat != ASN_OK) return stat;
6686
6687 invokeEndElement (pctxt, "toBeSigned", -1);
6688
6689 /* decode algorithmOID */
6690
6691 invokeStartElement (pctxt, "algorithmOID", -1);
6692
6693 stat = decodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
6694 if (stat != ASN_OK) return stat;
6695 invokeOidValue (pctxt, pvalue->algorithmOID.numids, pvalue->algorithmOID.subid);
6696
6697 invokeEndElement (pctxt, "algorithmOID", -1);
6698
6699 /* decode paramS */
6700
6701 invokeStartElement (pctxt, "paramS", -1);
6702
6703 stat = asn1PD_H235Params (pctxt, &pvalue->paramS);
6704 if (stat != ASN_OK) return stat;
6705
6706 invokeEndElement (pctxt, "paramS", -1);
6707
6708 /* decode signature */
6709
6710 invokeStartElement (pctxt, "signature", -1);
6711
6712 stat = decodeDynBitString (pctxt, (ASN1DynBitStr*)&pvalue->signature);
6713 if (stat != ASN_OK) return stat;
6714
6715 invokeBitStrValue (pctxt, pvalue->signature.numbits, pvalue->signature.data);
6716
6717 invokeEndElement (pctxt, "signature", -1);
6718
6719 return (stat);
6720 }
6721
6722 /**************************************************************/
6723 /* */
6724 /* CryptoH323Token_cryptoGKCert */
6725 /* */
6726 /**************************************************************/
6727
6728 EXTERN int asn1PD_H225CryptoH323Token_cryptoGKCert (OOCTXT* pctxt, H225CryptoH323Token_cryptoGKCert* pvalue)
6729 {
6730 int stat = ASN_OK;
6731
6732 /* decode toBeSigned */
6733
6734 invokeStartElement (pctxt, "toBeSigned", -1);
6735
6736 stat = asn1PD_H235EncodedPwdCertToken (pctxt, &pvalue->toBeSigned);
6737 if (stat != ASN_OK) return stat;
6738
6739 invokeEndElement (pctxt, "toBeSigned", -1);
6740
6741 /* decode algorithmOID */
6742
6743 invokeStartElement (pctxt, "algorithmOID", -1);
6744
6745 stat = decodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
6746 if (stat != ASN_OK) return stat;
6747 invokeOidValue (pctxt, pvalue->algorithmOID.numids, pvalue->algorithmOID.subid);
6748
6749 invokeEndElement (pctxt, "algorithmOID", -1);
6750
6751 /* decode paramS */
6752
6753 invokeStartElement (pctxt, "paramS", -1);
6754
6755 stat = asn1PD_H235Params (pctxt, &pvalue->paramS);
6756 if (stat != ASN_OK) return stat;
6757
6758 invokeEndElement (pctxt, "paramS", -1);
6759
6760 /* decode signature */
6761
6762 invokeStartElement (pctxt, "signature", -1);
6763
6764 stat = decodeDynBitString (pctxt, (ASN1DynBitStr*)&pvalue->signature);
6765 if (stat != ASN_OK) return stat;
6766
6767 invokeBitStrValue (pctxt, pvalue->signature.numbits, pvalue->signature.data);
6768
6769 invokeEndElement (pctxt, "signature", -1);
6770
6771 return (stat);
6772 }
6773
6774 /**************************************************************/
6775 /* */
6776 /* CryptoH323Token_cryptoFastStart */
6777 /* */
6778 /**************************************************************/
6779
6780 EXTERN int asn1PD_H225CryptoH323Token_cryptoFastStart (OOCTXT* pctxt, H225CryptoH323Token_cryptoFastStart* pvalue)
6781 {
6782 int stat = ASN_OK;
6783
6784 /* decode toBeSigned */
6785
6786 invokeStartElement (pctxt, "toBeSigned", -1);
6787
6788 stat = asn1PD_H225EncodedFastStartToken (pctxt, &pvalue->toBeSigned);
6789 if (stat != ASN_OK) return stat;
6790
6791 invokeEndElement (pctxt, "toBeSigned", -1);
6792
6793 /* decode algorithmOID */
6794
6795 invokeStartElement (pctxt, "algorithmOID", -1);
6796
6797 stat = decodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
6798 if (stat != ASN_OK) return stat;
6799 invokeOidValue (pctxt, pvalue->algorithmOID.numids, pvalue->algorithmOID.subid);
6800
6801 invokeEndElement (pctxt, "algorithmOID", -1);
6802
6803 /* decode paramS */
6804
6805 invokeStartElement (pctxt, "paramS", -1);
6806
6807 stat = asn1PD_H235Params (pctxt, &pvalue->paramS);
6808 if (stat != ASN_OK) return stat;
6809
6810 invokeEndElement (pctxt, "paramS", -1);
6811
6812 /* decode signature */
6813
6814 invokeStartElement (pctxt, "signature", -1);
6815
6816 stat = decodeDynBitString (pctxt, (ASN1DynBitStr*)&pvalue->signature);
6817 if (stat != ASN_OK) return stat;
6818
6819 invokeBitStrValue (pctxt, pvalue->signature.numbits, pvalue->signature.data);
6820
6821 invokeEndElement (pctxt, "signature", -1);
6822
6823 return (stat);
6824 }
6825
6826 /**************************************************************/
6827 /* */
6828 /* CryptoH323Token */
6829 /* */
6830 /**************************************************************/
6831
6832 EXTERN int asn1PD_H225CryptoH323Token (OOCTXT* pctxt, H225CryptoH323Token* pvalue)
6833 {
6834 int stat = ASN_OK;
6835 ASN1UINT ui;
6836 ASN1OpenType openType;
6837 ASN1BOOL extbit = 0;
6838
6839 /* extension bit */
6840
6841 DECODEBIT (pctxt, &extbit);
6842
6843 if (!extbit) {
6844 stat = decodeConsUnsigned (pctxt, &ui, 0, 7);
6845 if (stat != ASN_OK) return stat;
6846 else pvalue->t = ui + 1;
6847
6848 switch (ui) {
6849 /* cryptoEPPwdHash */
6850 case 0:
6851 invokeStartElement (pctxt, "cryptoEPPwdHash", -1);
6852
6853 pvalue->u.cryptoEPPwdHash = ALLOC_ASN1ELEM (pctxt, H225CryptoH323Token_cryptoEPPwdHash);
6854
6855 stat = asn1PD_H225CryptoH323Token_cryptoEPPwdHash (pctxt, pvalue->u.cryptoEPPwdHash);
6856 if (stat != ASN_OK) return stat;
6857
6858 invokeEndElement (pctxt, "cryptoEPPwdHash", -1);
6859
6860 break;
6861
6862 /* cryptoGKPwdHash */
6863 case 1:
6864 invokeStartElement (pctxt, "cryptoGKPwdHash", -1);
6865
6866 pvalue->u.cryptoGKPwdHash = ALLOC_ASN1ELEM (pctxt, H225CryptoH323Token_cryptoGKPwdHash);
6867
6868 stat = asn1PD_H225CryptoH323Token_cryptoGKPwdHash (pctxt, pvalue->u.cryptoGKPwdHash);
6869 if (stat != ASN_OK) return stat;
6870
6871 invokeEndElement (pctxt, "cryptoGKPwdHash", -1);
6872
6873 break;
6874
6875 /* cryptoEPPwdEncr */
6876 case 2:
6877 invokeStartElement (pctxt, "cryptoEPPwdEncr", -1);
6878
6879 pvalue->u.cryptoEPPwdEncr = ALLOC_ASN1ELEM (pctxt, H235ENCRYPTED);
6880
6881 stat = asn1PD_H235ENCRYPTED (pctxt, pvalue->u.cryptoEPPwdEncr);
6882 if (stat != ASN_OK) return stat;
6883
6884 invokeEndElement (pctxt, "cryptoEPPwdEncr", -1);
6885
6886 break;
6887
6888 /* cryptoGKPwdEncr */
6889 case 3:
6890 invokeStartElement (pctxt, "cryptoGKPwdEncr", -1);
6891
6892 pvalue->u.cryptoGKPwdEncr = ALLOC_ASN1ELEM (pctxt, H235ENCRYPTED);
6893
6894 stat = asn1PD_H235ENCRYPTED (pctxt, pvalue->u.cryptoGKPwdEncr);
6895 if (stat != ASN_OK) return stat;
6896
6897 invokeEndElement (pctxt, "cryptoGKPwdEncr", -1);
6898
6899 break;
6900
6901 /* cryptoEPCert */
6902 case 4:
6903 invokeStartElement (pctxt, "cryptoEPCert", -1);
6904
6905 pvalue->u.cryptoEPCert = ALLOC_ASN1ELEM (pctxt, H225CryptoH323Token_cryptoEPCert);
6906
6907 stat = asn1PD_H225CryptoH323Token_cryptoEPCert (pctxt, pvalue->u.cryptoEPCert);
6908 if (stat != ASN_OK) return stat;
6909
6910 invokeEndElement (pctxt, "cryptoEPCert", -1);
6911
6912 break;
6913
6914 /* cryptoGKCert */
6915 case 5:
6916 invokeStartElement (pctxt, "cryptoGKCert", -1);
6917
6918 pvalue->u.cryptoGKCert = ALLOC_ASN1ELEM (pctxt, H225CryptoH323Token_cryptoGKCert);
6919
6920 stat = asn1PD_H225CryptoH323Token_cryptoGKCert (pctxt, pvalue->u.cryptoGKCert);
6921 if (stat != ASN_OK) return stat;
6922
6923 invokeEndElement (pctxt, "cryptoGKCert", -1);
6924
6925 break;
6926
6927 /* cryptoFastStart */
6928 case 6:
6929 invokeStartElement (pctxt, "cryptoFastStart", -1);
6930
6931 pvalue->u.cryptoFastStart = ALLOC_ASN1ELEM (pctxt, H225CryptoH323Token_cryptoFastStart);
6932
6933 stat = asn1PD_H225CryptoH323Token_cryptoFastStart (pctxt, pvalue->u.cryptoFastStart);
6934 if (stat != ASN_OK) return stat;
6935
6936 invokeEndElement (pctxt, "cryptoFastStart", -1);
6937
6938 break;
6939
6940 /* nestedcryptoToken */
6941 case 7:
6942 invokeStartElement (pctxt, "nestedcryptoToken", -1);
6943
6944 pvalue->u.nestedcryptoToken = ALLOC_ASN1ELEM (pctxt, H235CryptoToken);
6945
6946 stat = asn1PD_H235CryptoToken (pctxt, pvalue->u.nestedcryptoToken);
6947 if (stat != ASN_OK) return stat;
6948
6949 invokeEndElement (pctxt, "nestedcryptoToken", -1);
6950
6951 break;
6952
6953 default:
6954 return ASN_E_INVOPT;
6955 }
6956 }
6957 else {
6958 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
6959 if (stat != ASN_OK) return stat;
6960 else pvalue->t = ui + 9;
6961
6962 stat = decodeByteAlign (pctxt);
6963 if (stat != ASN_OK) return stat;
6964
6965 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
6966 if (stat != ASN_OK) return stat;
6967
6968 }
6969
6970 return (stat);
6971 }
6972
6973 /**************************************************************/
6974 /* */
6975 /* _SeqOfH225CryptoH323Token */
6976 /* */
6977 /**************************************************************/
6978
6979 EXTERN int asn1PD_H225_SeqOfH225CryptoH323Token (OOCTXT* pctxt, H225_SeqOfH225CryptoH323Token* pvalue)
6980 {
6981 int stat = ASN_OK;
6982 H225CryptoH323Token* pdata;
6983 ASN1UINT count = 0;
6984 ASN1UINT xx1;
6985 int lstat;
6986
6987 dListInit (pvalue);
6988
6989 for (;;) {
6990 /* decode length determinant */
6991
6992 lstat = decodeLength (pctxt, &count);
6993 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
6994 return lstat;
6995 }
6996
6997 /* decode elements */
6998
6999 for (xx1 = 0; xx1 < count; xx1++) {
7000 invokeStartElement (pctxt, "elem", xx1);
7001
7002 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225CryptoH323Token);
7003
7004 stat = asn1PD_H225CryptoH323Token (pctxt, pdata);
7005 if (stat != ASN_OK) return stat;
7006 invokeEndElement (pctxt, "elem", xx1);
7007
7008 dListAppendNode (pctxt, pvalue, pdata);
7009 }
7010
7011 if(lstat == ASN_OK) break;
7012 }
7013
7014 return (stat);
7015 }
7016
7017 /**************************************************************/
7018 /* */
7019 /* Setup_UUIE_fastStart */
7020 /* */
7021 /**************************************************************/
7022
7023 EXTERN int asn1PD_H225Setup_UUIE_fastStart (OOCTXT* pctxt, H225Setup_UUIE_fastStart* pvalue)
7024 {
7025 int stat = ASN_OK;
7026 ASN1UINT xx1;
7027
7028 /* decode length determinant */
7029
7030 stat = decodeLength (pctxt, &pvalue->n);
7031 if (stat != ASN_OK) return stat;
7032
7033 /* decode elements */
7034
7035 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
7036
7037 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7038 invokeStartElement (pctxt, "elem", xx1);
7039
7040 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
7041 if (stat != ASN_OK) return stat;
7042 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
7043 invokeEndElement (pctxt, "elem", xx1);
7044
7045 }
7046
7047 return (stat);
7048 }
7049
7050 /**************************************************************/
7051 /* */
7052 /* ScnConnectionType */
7053 /* */
7054 /**************************************************************/
7055
7056 EXTERN int asn1PD_H225ScnConnectionType (OOCTXT* pctxt, H225ScnConnectionType* pvalue)
7057 {
7058 int stat = ASN_OK;
7059 ASN1UINT ui;
7060 ASN1OpenType openType;
7061 ASN1BOOL extbit = 0;
7062
7063 /* extension bit */
7064
7065 DECODEBIT (pctxt, &extbit);
7066
7067 if (!extbit) {
7068 stat = decodeConsUnsigned (pctxt, &ui, 0, 6);
7069 if (stat != ASN_OK) return stat;
7070 else pvalue->t = ui + 1;
7071
7072 switch (ui) {
7073 /* unknown */
7074 case 0:
7075 invokeStartElement (pctxt, "unknown", -1);
7076
7077 /* NULL */
7078 invokeNullValue (pctxt);
7079
7080 invokeEndElement (pctxt, "unknown", -1);
7081
7082 break;
7083
7084 /* bChannel */
7085 case 1:
7086 invokeStartElement (pctxt, "bChannel", -1);
7087
7088 /* NULL */
7089 invokeNullValue (pctxt);
7090
7091 invokeEndElement (pctxt, "bChannel", -1);
7092
7093 break;
7094
7095 /* hybrid2x64 */
7096 case 2:
7097 invokeStartElement (pctxt, "hybrid2x64", -1);
7098
7099 /* NULL */
7100 invokeNullValue (pctxt);
7101
7102 invokeEndElement (pctxt, "hybrid2x64", -1);
7103
7104 break;
7105
7106 /* hybrid384 */
7107 case 3:
7108 invokeStartElement (pctxt, "hybrid384", -1);
7109
7110 /* NULL */
7111 invokeNullValue (pctxt);
7112
7113 invokeEndElement (pctxt, "hybrid384", -1);
7114
7115 break;
7116
7117 /* hybrid1536 */
7118 case 4:
7119 invokeStartElement (pctxt, "hybrid1536", -1);
7120
7121 /* NULL */
7122 invokeNullValue (pctxt);
7123
7124 invokeEndElement (pctxt, "hybrid1536", -1);
7125
7126 break;
7127
7128 /* hybrid1920 */
7129 case 5:
7130 invokeStartElement (pctxt, "hybrid1920", -1);
7131
7132 /* NULL */
7133 invokeNullValue (pctxt);
7134
7135 invokeEndElement (pctxt, "hybrid1920", -1);
7136
7137 break;
7138
7139 /* multirate */
7140 case 6:
7141 invokeStartElement (pctxt, "multirate", -1);
7142
7143 /* NULL */
7144 invokeNullValue (pctxt);
7145
7146 invokeEndElement (pctxt, "multirate", -1);
7147
7148 break;
7149
7150 default:
7151 return ASN_E_INVOPT;
7152 }
7153 }
7154 else {
7155 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7156 if (stat != ASN_OK) return stat;
7157 else pvalue->t = ui + 8;
7158
7159 stat = decodeByteAlign (pctxt);
7160 if (stat != ASN_OK) return stat;
7161
7162 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7163 if (stat != ASN_OK) return stat;
7164
7165 }
7166
7167 return (stat);
7168 }
7169
7170 /**************************************************************/
7171 /* */
7172 /* ScnConnectionAggregation */
7173 /* */
7174 /**************************************************************/
7175
7176 EXTERN int asn1PD_H225ScnConnectionAggregation (OOCTXT* pctxt, H225ScnConnectionAggregation* pvalue)
7177 {
7178 int stat = ASN_OK;
7179 ASN1UINT ui;
7180 ASN1OpenType openType;
7181 ASN1BOOL extbit = 0;
7182
7183 /* extension bit */
7184
7185 DECODEBIT (pctxt, &extbit);
7186
7187 if (!extbit) {
7188 stat = decodeConsUnsigned (pctxt, &ui, 0, 5);
7189 if (stat != ASN_OK) return stat;
7190 else pvalue->t = ui + 1;
7191
7192 switch (ui) {
7193 /* auto_ */
7194 case 0:
7195 invokeStartElement (pctxt, "auto_", -1);
7196
7197 /* NULL */
7198 invokeNullValue (pctxt);
7199
7200 invokeEndElement (pctxt, "auto_", -1);
7201
7202 break;
7203
7204 /* none */
7205 case 1:
7206 invokeStartElement (pctxt, "none", -1);
7207
7208 /* NULL */
7209 invokeNullValue (pctxt);
7210
7211 invokeEndElement (pctxt, "none", -1);
7212
7213 break;
7214
7215 /* h221 */
7216 case 2:
7217 invokeStartElement (pctxt, "h221", -1);
7218
7219 /* NULL */
7220 invokeNullValue (pctxt);
7221
7222 invokeEndElement (pctxt, "h221", -1);
7223
7224 break;
7225
7226 /* bonded_mode1 */
7227 case 3:
7228 invokeStartElement (pctxt, "bonded_mode1", -1);
7229
7230 /* NULL */
7231 invokeNullValue (pctxt);
7232
7233 invokeEndElement (pctxt, "bonded_mode1", -1);
7234
7235 break;
7236
7237 /* bonded_mode2 */
7238 case 4:
7239 invokeStartElement (pctxt, "bonded_mode2", -1);
7240
7241 /* NULL */
7242 invokeNullValue (pctxt);
7243
7244 invokeEndElement (pctxt, "bonded_mode2", -1);
7245
7246 break;
7247
7248 /* bonded_mode3 */
7249 case 5:
7250 invokeStartElement (pctxt, "bonded_mode3", -1);
7251
7252 /* NULL */
7253 invokeNullValue (pctxt);
7254
7255 invokeEndElement (pctxt, "bonded_mode3", -1);
7256
7257 break;
7258
7259 default:
7260 return ASN_E_INVOPT;
7261 }
7262 }
7263 else {
7264 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7265 if (stat != ASN_OK) return stat;
7266 else pvalue->t = ui + 7;
7267
7268 stat = decodeByteAlign (pctxt);
7269 if (stat != ASN_OK) return stat;
7270
7271 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7272 if (stat != ASN_OK) return stat;
7273
7274 }
7275
7276 return (stat);
7277 }
7278
7279 /**************************************************************/
7280 /* */
7281 /* Setup_UUIE_connectionParameters */
7282 /* */
7283 /**************************************************************/
7284
7285 EXTERN int asn1PD_H225Setup_UUIE_connectionParameters (OOCTXT* pctxt, H225Setup_UUIE_connectionParameters* pvalue)
7286 {
7287 int stat = ASN_OK;
7288 OOCTXT lctxt;
7289 ASN1OpenType openType;
7290 ASN1UINT bitcnt;
7291 ASN1UINT i;
7292 ASN1BOOL optbit = 0;
7293 ASN1BOOL extbit = 0;
7294
7295 /* extension bit */
7296
7297 DECODEBIT (pctxt, &extbit);
7298
7299 /* decode connectionType */
7300
7301 invokeStartElement (pctxt, "connectionType", -1);
7302
7303 stat = asn1PD_H225ScnConnectionType (pctxt, &pvalue->connectionType);
7304 if (stat != ASN_OK) return stat;
7305
7306 invokeEndElement (pctxt, "connectionType", -1);
7307
7308 /* decode numberOfScnConnections */
7309
7310 invokeStartElement (pctxt, "numberOfScnConnections", -1);
7311
7312 stat = decodeConsUInt16 (pctxt, &pvalue->numberOfScnConnections, 0U, 65535U);
7313 if (stat != ASN_OK) return stat;
7314 invokeUIntValue (pctxt, pvalue->numberOfScnConnections);
7315
7316 invokeEndElement (pctxt, "numberOfScnConnections", -1);
7317
7318 /* decode connectionAggregation */
7319
7320 invokeStartElement (pctxt, "connectionAggregation", -1);
7321
7322 stat = asn1PD_H225ScnConnectionAggregation (pctxt, &pvalue->connectionAggregation);
7323 if (stat != ASN_OK) return stat;
7324
7325 invokeEndElement (pctxt, "connectionAggregation", -1);
7326
7327 if (extbit) {
7328
7329 /* decode extension optional bits length */
7330
7331 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
7332 if (stat != ASN_OK) return stat;
7333
7334 bitcnt += 1;
7335
7336 ZEROCONTEXT (&lctxt);
7337 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
7338 if (stat != ASN_OK) return stat;
7339
7340 stat = moveBitCursor (pctxt, bitcnt);
7341 if (stat != ASN_OK) return stat;
7342
7343 for (i = 0; i < bitcnt; i++) {
7344 DECODEBIT (&lctxt, &optbit);
7345
7346 if (optbit) {
7347 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7348 if (stat != ASN_OK) return stat;
7349
7350 pctxt->buffer.byteIndex += openType.numocts;
7351 }
7352 }
7353 }
7354
7355 return (stat);
7356 }
7357
7358 /**************************************************************/
7359 /* */
7360 /* Setup_UUIE_language */
7361 /* */
7362 /**************************************************************/
7363
7364 EXTERN int asn1PD_H225Setup_UUIE_language (OOCTXT* pctxt, H225Setup_UUIE_language* pvalue)
7365 {
7366 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
7367 int stat = ASN_OK;
7368 ASN1UINT xx1;
7369
7370 /* decode length determinant */
7371
7372 stat = decodeLength (pctxt, &pvalue->n);
7373 if (stat != ASN_OK) return stat;
7374
7375 /* decode elements */
7376
7377 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1IA5String);
7378
7379 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7380 invokeStartElement (pctxt, "elem", xx1);
7381
7382 addSizeConstraint (pctxt, &element_lsize1);
7383
7384 stat = decodeConstrainedStringEx (pctxt, &pvalue->elem[xx1], 0, 8, 7, 7);
7385 if (stat != ASN_OK) return stat;
7386 invokeCharStrValue (pctxt, pvalue->elem[xx1]);
7387 invokeEndElement (pctxt, "elem", xx1);
7388
7389 }
7390
7391 return (stat);
7392 }
7393
7394 /**************************************************************/
7395 /* */
7396 /* PresentationIndicator */
7397 /* */
7398 /**************************************************************/
7399
7400 EXTERN int asn1PD_H225PresentationIndicator (OOCTXT* pctxt, H225PresentationIndicator* pvalue)
7401 {
7402 int stat = ASN_OK;
7403 ASN1UINT ui;
7404 ASN1OpenType openType;
7405 ASN1BOOL extbit = 0;
7406
7407 /* extension bit */
7408
7409 DECODEBIT (pctxt, &extbit);
7410
7411 if (!extbit) {
7412 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
7413 if (stat != ASN_OK) return stat;
7414 else pvalue->t = ui + 1;
7415
7416 switch (ui) {
7417 /* presentationAllowed */
7418 case 0:
7419 invokeStartElement (pctxt, "presentationAllowed", -1);
7420
7421 /* NULL */
7422 invokeNullValue (pctxt);
7423
7424 invokeEndElement (pctxt, "presentationAllowed", -1);
7425
7426 break;
7427
7428 /* presentationRestricted */
7429 case 1:
7430 invokeStartElement (pctxt, "presentationRestricted", -1);
7431
7432 /* NULL */
7433 invokeNullValue (pctxt);
7434
7435 invokeEndElement (pctxt, "presentationRestricted", -1);
7436
7437 break;
7438
7439 /* addressNotAvailable */
7440 case 2:
7441 invokeStartElement (pctxt, "addressNotAvailable", -1);
7442
7443 /* NULL */
7444 invokeNullValue (pctxt);
7445
7446 invokeEndElement (pctxt, "addressNotAvailable", -1);
7447
7448 break;
7449
7450 default:
7451 return ASN_E_INVOPT;
7452 }
7453 }
7454 else {
7455 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7456 if (stat != ASN_OK) return stat;
7457 else pvalue->t = ui + 4;
7458
7459 stat = decodeByteAlign (pctxt);
7460 if (stat != ASN_OK) return stat;
7461
7462 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7463 if (stat != ASN_OK) return stat;
7464
7465 }
7466
7467 return (stat);
7468 }
7469
7470 /**************************************************************/
7471 /* */
7472 /* CallCreditServiceControl_billingMode */
7473 /* */
7474 /**************************************************************/
7475
7476 EXTERN int asn1PD_H225CallCreditServiceControl_billingMode (OOCTXT* pctxt, H225CallCreditServiceControl_billingMode* pvalue)
7477 {
7478 int stat = ASN_OK;
7479 ASN1UINT ui;
7480 ASN1OpenType openType;
7481 ASN1BOOL extbit = 0;
7482
7483 /* extension bit */
7484
7485 DECODEBIT (pctxt, &extbit);
7486
7487 if (!extbit) {
7488 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
7489 if (stat != ASN_OK) return stat;
7490 else pvalue->t = ui + 1;
7491
7492 switch (ui) {
7493 /* credit */
7494 case 0:
7495 invokeStartElement (pctxt, "credit", -1);
7496
7497 /* NULL */
7498 invokeNullValue (pctxt);
7499
7500 invokeEndElement (pctxt, "credit", -1);
7501
7502 break;
7503
7504 /* debit */
7505 case 1:
7506 invokeStartElement (pctxt, "debit", -1);
7507
7508 /* NULL */
7509 invokeNullValue (pctxt);
7510
7511 invokeEndElement (pctxt, "debit", -1);
7512
7513 break;
7514
7515 default:
7516 return ASN_E_INVOPT;
7517 }
7518 }
7519 else {
7520 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7521 if (stat != ASN_OK) return stat;
7522 else pvalue->t = ui + 3;
7523
7524 stat = decodeByteAlign (pctxt);
7525 if (stat != ASN_OK) return stat;
7526
7527 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7528 if (stat != ASN_OK) return stat;
7529
7530 }
7531
7532 return (stat);
7533 }
7534
7535 /**************************************************************/
7536 /* */
7537 /* CallCreditServiceControl_callStartingPoint */
7538 /* */
7539 /**************************************************************/
7540
7541 EXTERN int asn1PD_H225CallCreditServiceControl_callStartingPoint (OOCTXT* pctxt, H225CallCreditServiceControl_callStartingPoint* pvalue)
7542 {
7543 int stat = ASN_OK;
7544 ASN1UINT ui;
7545 ASN1OpenType openType;
7546 ASN1BOOL extbit = 0;
7547
7548 /* extension bit */
7549
7550 DECODEBIT (pctxt, &extbit);
7551
7552 if (!extbit) {
7553 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
7554 if (stat != ASN_OK) return stat;
7555 else pvalue->t = ui + 1;
7556
7557 switch (ui) {
7558 /* alerting */
7559 case 0:
7560 invokeStartElement (pctxt, "alerting", -1);
7561
7562 /* NULL */
7563 invokeNullValue (pctxt);
7564
7565 invokeEndElement (pctxt, "alerting", -1);
7566
7567 break;
7568
7569 /* connect */
7570 case 1:
7571 invokeStartElement (pctxt, "connect", -1);
7572
7573 /* NULL */
7574 invokeNullValue (pctxt);
7575
7576 invokeEndElement (pctxt, "connect", -1);
7577
7578 break;
7579
7580 default:
7581 return ASN_E_INVOPT;
7582 }
7583 }
7584 else {
7585 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7586 if (stat != ASN_OK) return stat;
7587 else pvalue->t = ui + 3;
7588
7589 stat = decodeByteAlign (pctxt);
7590 if (stat != ASN_OK) return stat;
7591
7592 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7593 if (stat != ASN_OK) return stat;
7594
7595 }
7596
7597 return (stat);
7598 }
7599
7600 /**************************************************************/
7601 /* */
7602 /* CallCreditServiceControl */
7603 /* */
7604 /**************************************************************/
7605
7606 EXTERN int asn1PD_H225CallCreditServiceControl (OOCTXT* pctxt, H225CallCreditServiceControl* pvalue)
7607 {
7608 static Asn1SizeCnst amountString_lsize1 = { 0, 1, 512, 0 };
7609 int stat = ASN_OK;
7610 OOCTXT lctxt;
7611 ASN1OpenType openType;
7612 ASN1UINT bitcnt;
7613 ASN1UINT i;
7614 ASN1BOOL optbit = 0;
7615 ASN1BOOL extbit = 0;
7616
7617 /* extension bit */
7618
7619 DECODEBIT (pctxt, &extbit);
7620
7621 /* optional bits */
7622
7623 memset (&pvalue->m, 0, sizeof(pvalue->m));
7624
7625 DECODEBIT (pctxt, &optbit);
7626 pvalue->m.amountStringPresent = optbit;
7627
7628 DECODEBIT (pctxt, &optbit);
7629 pvalue->m.billingModePresent = optbit;
7630
7631 DECODEBIT (pctxt, &optbit);
7632 pvalue->m.callDurationLimitPresent = optbit;
7633
7634 DECODEBIT (pctxt, &optbit);
7635 pvalue->m.enforceCallDurationLimitPresent = optbit;
7636
7637 DECODEBIT (pctxt, &optbit);
7638 pvalue->m.callStartingPointPresent = optbit;
7639
7640 /* decode amountString */
7641
7642 if (pvalue->m.amountStringPresent) {
7643 invokeStartElement (pctxt, "amountString", -1);
7644
7645 addSizeConstraint (pctxt, &amountString_lsize1);
7646
7647 stat = decodeBMPString (pctxt, &pvalue->amountString, 0);
7648 if (stat != ASN_OK) return stat;
7649 invokeCharStr16BitValue (pctxt, pvalue->amountString.nchars, pvalue->amountString.data);
7650
7651 invokeEndElement (pctxt, "amountString", -1);
7652 }
7653
7654 /* decode billingMode */
7655
7656 if (pvalue->m.billingModePresent) {
7657 invokeStartElement (pctxt, "billingMode", -1);
7658
7659 stat = asn1PD_H225CallCreditServiceControl_billingMode (pctxt, &pvalue->billingMode);
7660 if (stat != ASN_OK) return stat;
7661
7662 invokeEndElement (pctxt, "billingMode", -1);
7663 }
7664
7665 /* decode callDurationLimit */
7666
7667 if (pvalue->m.callDurationLimitPresent) {
7668 invokeStartElement (pctxt, "callDurationLimit", -1);
7669
7670 stat = decodeConsUnsigned (pctxt, &pvalue->callDurationLimit, 1U, ASN1UINT_MAX);
7671 if (stat != ASN_OK) return stat;
7672 invokeUIntValue (pctxt, pvalue->callDurationLimit);
7673
7674 invokeEndElement (pctxt, "callDurationLimit", -1);
7675 }
7676
7677 /* decode enforceCallDurationLimit */
7678
7679 if (pvalue->m.enforceCallDurationLimitPresent) {
7680 invokeStartElement (pctxt, "enforceCallDurationLimit", -1);
7681
7682 stat = DECODEBIT (pctxt, &pvalue->enforceCallDurationLimit);
7683 if (stat != ASN_OK) return stat;
7684 invokeBoolValue (pctxt, pvalue->enforceCallDurationLimit);
7685
7686 invokeEndElement (pctxt, "enforceCallDurationLimit", -1);
7687 }
7688
7689 /* decode callStartingPoint */
7690
7691 if (pvalue->m.callStartingPointPresent) {
7692 invokeStartElement (pctxt, "callStartingPoint", -1);
7693
7694 stat = asn1PD_H225CallCreditServiceControl_callStartingPoint (pctxt, &pvalue->callStartingPoint);
7695 if (stat != ASN_OK) return stat;
7696
7697 invokeEndElement (pctxt, "callStartingPoint", -1);
7698 }
7699
7700 if (extbit) {
7701
7702 /* decode extension optional bits length */
7703
7704 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
7705 if (stat != ASN_OK) return stat;
7706
7707 bitcnt += 1;
7708
7709 ZEROCONTEXT (&lctxt);
7710 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
7711 if (stat != ASN_OK) return stat;
7712
7713 stat = moveBitCursor (pctxt, bitcnt);
7714 if (stat != ASN_OK) return stat;
7715
7716 for (i = 0; i < bitcnt; i++) {
7717 DECODEBIT (&lctxt, &optbit);
7718
7719 if (optbit) {
7720 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7721 if (stat != ASN_OK) return stat;
7722
7723 pctxt->buffer.byteIndex += openType.numocts;
7724 }
7725 }
7726 }
7727
7728 return (stat);
7729 }
7730
7731 /**************************************************************/
7732 /* */
7733 /* ServiceControlDescriptor */
7734 /* */
7735 /**************************************************************/
7736
7737 EXTERN int asn1PD_H225ServiceControlDescriptor (OOCTXT* pctxt, H225ServiceControlDescriptor* pvalue)
7738 {
7739 static Asn1SizeCnst url_lsize1 = { 0, 0, 512, 0 };
7740 int stat = ASN_OK;
7741 ASN1UINT ui;
7742 ASN1OpenType openType;
7743 ASN1BOOL extbit = 0;
7744
7745 /* extension bit */
7746
7747 DECODEBIT (pctxt, &extbit);
7748
7749 if (!extbit) {
7750 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
7751 if (stat != ASN_OK) return stat;
7752 else pvalue->t = ui + 1;
7753
7754 switch (ui) {
7755 /* url */
7756 case 0:
7757 invokeStartElement (pctxt, "url", -1);
7758
7759 addSizeConstraint (pctxt, &url_lsize1);
7760
7761 stat = decodeConstrainedStringEx (pctxt, &pvalue->u.url, 0, 8, 7, 7);
7762 if (stat != ASN_OK) return stat;
7763 invokeCharStrValue (pctxt, pvalue->u.url);
7764
7765 invokeEndElement (pctxt, "url", -1);
7766
7767 break;
7768
7769 /* signal */
7770 case 1:
7771 invokeStartElement (pctxt, "signal", -1);
7772
7773 pvalue->u.signal = ALLOC_ASN1ELEM (pctxt, H225H248SignalsDescriptor);
7774
7775 stat = asn1PD_H225H248SignalsDescriptor (pctxt, pvalue->u.signal);
7776 if (stat != ASN_OK) return stat;
7777
7778 invokeEndElement (pctxt, "signal", -1);
7779
7780 break;
7781
7782 /* nonStandard */
7783 case 2:
7784 invokeStartElement (pctxt, "nonStandard", -1);
7785
7786 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
7787
7788 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
7789 if (stat != ASN_OK) return stat;
7790
7791 invokeEndElement (pctxt, "nonStandard", -1);
7792
7793 break;
7794
7795 /* callCreditServiceControl */
7796 case 3:
7797 invokeStartElement (pctxt, "callCreditServiceControl", -1);
7798
7799 pvalue->u.callCreditServiceControl = ALLOC_ASN1ELEM (pctxt, H225CallCreditServiceControl);
7800
7801 stat = asn1PD_H225CallCreditServiceControl (pctxt, pvalue->u.callCreditServiceControl);
7802 if (stat != ASN_OK) return stat;
7803
7804 invokeEndElement (pctxt, "callCreditServiceControl", -1);
7805
7806 break;
7807
7808 default:
7809 return ASN_E_INVOPT;
7810 }
7811 }
7812 else {
7813 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7814 if (stat != ASN_OK) return stat;
7815 else pvalue->t = ui + 5;
7816
7817 stat = decodeByteAlign (pctxt);
7818 if (stat != ASN_OK) return stat;
7819
7820 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7821 if (stat != ASN_OK) return stat;
7822
7823 }
7824
7825 return (stat);
7826 }
7827
7828 /**************************************************************/
7829 /* */
7830 /* ServiceControlSession_reason */
7831 /* */
7832 /**************************************************************/
7833
7834 EXTERN int asn1PD_H225ServiceControlSession_reason (OOCTXT* pctxt, H225ServiceControlSession_reason* pvalue)
7835 {
7836 int stat = ASN_OK;
7837 ASN1UINT ui;
7838 ASN1OpenType openType;
7839 ASN1BOOL extbit = 0;
7840
7841 /* extension bit */
7842
7843 DECODEBIT (pctxt, &extbit);
7844
7845 if (!extbit) {
7846 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
7847 if (stat != ASN_OK) return stat;
7848 else pvalue->t = ui + 1;
7849
7850 switch (ui) {
7851 /* open */
7852 case 0:
7853 invokeStartElement (pctxt, "open", -1);
7854
7855 /* NULL */
7856 invokeNullValue (pctxt);
7857
7858 invokeEndElement (pctxt, "open", -1);
7859
7860 break;
7861
7862 /* refresh */
7863 case 1:
7864 invokeStartElement (pctxt, "refresh", -1);
7865
7866 /* NULL */
7867 invokeNullValue (pctxt);
7868
7869 invokeEndElement (pctxt, "refresh", -1);
7870
7871 break;
7872
7873 /* close */
7874 case 2:
7875 invokeStartElement (pctxt, "close", -1);
7876
7877 /* NULL */
7878 invokeNullValue (pctxt);
7879
7880 invokeEndElement (pctxt, "close", -1);
7881
7882 break;
7883
7884 default:
7885 return ASN_E_INVOPT;
7886 }
7887 }
7888 else {
7889 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
7890 if (stat != ASN_OK) return stat;
7891 else pvalue->t = ui + 4;
7892
7893 stat = decodeByteAlign (pctxt);
7894 if (stat != ASN_OK) return stat;
7895
7896 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7897 if (stat != ASN_OK) return stat;
7898
7899 }
7900
7901 return (stat);
7902 }
7903
7904 /**************************************************************/
7905 /* */
7906 /* ServiceControlSession */
7907 /* */
7908 /**************************************************************/
7909
7910 EXTERN int asn1PD_H225ServiceControlSession (OOCTXT* pctxt, H225ServiceControlSession* pvalue)
7911 {
7912 int stat = ASN_OK;
7913 OOCTXT lctxt;
7914 ASN1OpenType openType;
7915 ASN1UINT bitcnt;
7916 ASN1UINT i;
7917 ASN1BOOL optbit = 0;
7918 ASN1BOOL extbit = 0;
7919
7920 /* extension bit */
7921
7922 DECODEBIT (pctxt, &extbit);
7923
7924 /* optional bits */
7925
7926 memset (&pvalue->m, 0, sizeof(pvalue->m));
7927
7928 DECODEBIT (pctxt, &optbit);
7929 pvalue->m.contentsPresent = optbit;
7930
7931 /* decode sessionId */
7932
7933 invokeStartElement (pctxt, "sessionId", -1);
7934
7935 stat = decodeConsUInt8 (pctxt, &pvalue->sessionId, 0U, 255U);
7936 if (stat != ASN_OK) return stat;
7937 invokeUIntValue (pctxt, pvalue->sessionId);
7938
7939 invokeEndElement (pctxt, "sessionId", -1);
7940
7941 /* decode contents */
7942
7943 if (pvalue->m.contentsPresent) {
7944 invokeStartElement (pctxt, "contents", -1);
7945
7946 stat = asn1PD_H225ServiceControlDescriptor (pctxt, &pvalue->contents);
7947 if (stat != ASN_OK) return stat;
7948
7949 invokeEndElement (pctxt, "contents", -1);
7950 }
7951
7952 /* decode reason */
7953
7954 invokeStartElement (pctxt, "reason", -1);
7955
7956 stat = asn1PD_H225ServiceControlSession_reason (pctxt, &pvalue->reason);
7957 if (stat != ASN_OK) return stat;
7958
7959 invokeEndElement (pctxt, "reason", -1);
7960
7961 if (extbit) {
7962
7963 /* decode extension optional bits length */
7964
7965 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
7966 if (stat != ASN_OK) return stat;
7967
7968 bitcnt += 1;
7969
7970 ZEROCONTEXT (&lctxt);
7971 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
7972 if (stat != ASN_OK) return stat;
7973
7974 stat = moveBitCursor (pctxt, bitcnt);
7975 if (stat != ASN_OK) return stat;
7976
7977 for (i = 0; i < bitcnt; i++) {
7978 DECODEBIT (&lctxt, &optbit);
7979
7980 if (optbit) {
7981 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
7982 if (stat != ASN_OK) return stat;
7983
7984 pctxt->buffer.byteIndex += openType.numocts;
7985 }
7986 }
7987 }
7988
7989 return (stat);
7990 }
7991
7992 /**************************************************************/
7993 /* */
7994 /* _SeqOfH225ServiceControlSession */
7995 /* */
7996 /**************************************************************/
7997
7998 EXTERN int asn1PD_H225_SeqOfH225ServiceControlSession (OOCTXT* pctxt, H225_SeqOfH225ServiceControlSession* pvalue)
7999 {
8000 int stat = ASN_OK;
8001 H225ServiceControlSession* pdata;
8002 ASN1UINT count = 0;
8003 ASN1UINT xx1;
8004 int lstat;
8005
8006 dListInit (pvalue);
8007
8008 for (;;) {
8009 /* decode length determinant */
8010
8011 lstat = decodeLength (pctxt, &count);
8012 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
8013 return lstat;
8014 }
8015
8016 /* decode elements */
8017
8018 for (xx1 = 0; xx1 < count; xx1++) {
8019 invokeStartElement (pctxt, "elem", xx1);
8020
8021 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225ServiceControlSession);
8022
8023 stat = asn1PD_H225ServiceControlSession (pctxt, pdata);
8024 if (stat != ASN_OK) return stat;
8025 invokeEndElement (pctxt, "elem", xx1);
8026
8027 dListAppendNode (pctxt, pvalue, pdata);
8028 }
8029
8030 if(lstat == ASN_OK) break;
8031 }
8032
8033 return (stat);
8034 }
8035
8036 /**************************************************************/
8037 /* */
8038 /* CarrierInfo */
8039 /* */
8040 /**************************************************************/
8041
8042 EXTERN int asn1PD_H225CarrierInfo (OOCTXT* pctxt, H225CarrierInfo* pvalue)
8043 {
8044 static Asn1SizeCnst carrierName_lsize1 = { 0, 1, 128, 0 };
8045 int stat = ASN_OK;
8046 OOCTXT lctxt;
8047 ASN1OpenType openType;
8048 ASN1UINT bitcnt;
8049 ASN1UINT i;
8050 ASN1BOOL optbit = 0;
8051 ASN1BOOL extbit = 0;
8052
8053 /* extension bit */
8054
8055 DECODEBIT (pctxt, &extbit);
8056
8057 /* optional bits */
8058
8059 memset (&pvalue->m, 0, sizeof(pvalue->m));
8060
8061 DECODEBIT (pctxt, &optbit);
8062 pvalue->m.carrierIdentificationCodePresent = optbit;
8063
8064 DECODEBIT (pctxt, &optbit);
8065 pvalue->m.carrierNamePresent = optbit;
8066
8067 /* decode carrierIdentificationCode */
8068
8069 if (pvalue->m.carrierIdentificationCodePresent) {
8070 invokeStartElement (pctxt, "carrierIdentificationCode", -1);
8071
8072 stat = asn1PD_H225CarrierInfo_carrierIdentificationCode (pctxt, &pvalue->carrierIdentificationCode);
8073 if (stat != ASN_OK) return stat;
8074
8075 invokeEndElement (pctxt, "carrierIdentificationCode", -1);
8076 }
8077
8078 /* decode carrierName */
8079
8080 if (pvalue->m.carrierNamePresent) {
8081 invokeStartElement (pctxt, "carrierName", -1);
8082
8083 addSizeConstraint (pctxt, &carrierName_lsize1);
8084
8085 stat = decodeConstrainedStringEx (pctxt, &pvalue->carrierName, 0, 8, 7, 7);
8086 if (stat != ASN_OK) return stat;
8087 invokeCharStrValue (pctxt, pvalue->carrierName);
8088
8089 invokeEndElement (pctxt, "carrierName", -1);
8090 }
8091
8092 if (extbit) {
8093
8094 /* decode extension optional bits length */
8095
8096 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8097 if (stat != ASN_OK) return stat;
8098
8099 bitcnt += 1;
8100
8101 ZEROCONTEXT (&lctxt);
8102 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8103 if (stat != ASN_OK) return stat;
8104
8105 stat = moveBitCursor (pctxt, bitcnt);
8106 if (stat != ASN_OK) return stat;
8107
8108 for (i = 0; i < bitcnt; i++) {
8109 DECODEBIT (&lctxt, &optbit);
8110
8111 if (optbit) {
8112 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8113 if (stat != ASN_OK) return stat;
8114
8115 pctxt->buffer.byteIndex += openType.numocts;
8116 }
8117 }
8118 }
8119
8120 return (stat);
8121 }
8122
8123 /**************************************************************/
8124 /* */
8125 /* CallsAvailable */
8126 /* */
8127 /**************************************************************/
8128
8129 EXTERN int asn1PD_H225CallsAvailable (OOCTXT* pctxt, H225CallsAvailable* pvalue)
8130 {
8131 static Asn1SizeCnst group_lsize1 = { 0, 1, 128, 0 };
8132 int stat = ASN_OK;
8133 OOCTXT lctxt;
8134 OOCTXT lctxt2;
8135 ASN1OpenType openType;
8136 ASN1UINT bitcnt;
8137 ASN1UINT i;
8138 ASN1BOOL optbit = 0;
8139 ASN1BOOL extbit = 0;
8140
8141 /* extension bit */
8142
8143 DECODEBIT (pctxt, &extbit);
8144
8145 /* optional bits */
8146
8147 memset (&pvalue->m, 0, sizeof(pvalue->m));
8148
8149 DECODEBIT (pctxt, &optbit);
8150 pvalue->m.groupPresent = optbit;
8151
8152 /* decode calls */
8153
8154 invokeStartElement (pctxt, "calls", -1);
8155
8156 stat = decodeConsUnsigned (pctxt, &pvalue->calls, 0U, ASN1UINT_MAX);
8157 if (stat != ASN_OK) return stat;
8158 invokeUIntValue (pctxt, pvalue->calls);
8159
8160 invokeEndElement (pctxt, "calls", -1);
8161
8162 /* decode group */
8163
8164 if (pvalue->m.groupPresent) {
8165 invokeStartElement (pctxt, "group", -1);
8166
8167 addSizeConstraint (pctxt, &group_lsize1);
8168
8169 stat = decodeConstrainedStringEx (pctxt, &pvalue->group, 0, 8, 7, 7);
8170 if (stat != ASN_OK) return stat;
8171 invokeCharStrValue (pctxt, pvalue->group);
8172
8173 invokeEndElement (pctxt, "group", -1);
8174 }
8175
8176 if (extbit) {
8177
8178 /* decode extension optional bits length */
8179
8180 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8181 if (stat != ASN_OK) return stat;
8182
8183 bitcnt += 1;
8184
8185 ZEROCONTEXT (&lctxt);
8186 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8187 if (stat != ASN_OK) return stat;
8188
8189 stat = moveBitCursor (pctxt, bitcnt);
8190 if (stat != ASN_OK) return stat;
8191
8192 for (i = 0; i < bitcnt; i++) {
8193 DECODEBIT (&lctxt, &optbit);
8194
8195 if (optbit) {
8196 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8197 if (stat != ASN_OK) return stat;
8198
8199 if (i < 1 && openType.numocts > 0) { /* known element */
8200 copyContext (&lctxt2, pctxt);
8201 initContextBuffer (pctxt, openType.data, openType.numocts);
8202
8203 switch (i) {
8204 case 0:
8205 pvalue->m.carrierPresent = 1;
8206
8207 invokeStartElement (pctxt, "carrier", -1);
8208
8209 stat = asn1PD_H225CarrierInfo (pctxt, &pvalue->carrier);
8210 if (stat != ASN_OK) return stat;
8211
8212 invokeEndElement (pctxt, "carrier", -1);
8213 break;
8214
8215 default:
8216 pctxt->buffer.byteIndex += openType.numocts;
8217 }
8218 copyContext (pctxt, &lctxt2);
8219 }
8220 else { /* unknown element */
8221 pctxt->buffer.byteIndex += openType.numocts;
8222 }
8223 }
8224 }
8225 }
8226
8227 return (stat);
8228 }
8229
8230 /**************************************************************/
8231 /* */
8232 /* _SeqOfH225CallsAvailable */
8233 /* */
8234 /**************************************************************/
8235
8236 EXTERN int asn1PD_H225_SeqOfH225CallsAvailable (OOCTXT* pctxt, H225_SeqOfH225CallsAvailable* pvalue)
8237 {
8238 int stat = ASN_OK;
8239 H225CallsAvailable* pdata;
8240 ASN1UINT count = 0;
8241 ASN1UINT xx1;
8242 int lstat;
8243
8244 dListInit (pvalue);
8245
8246 for (;;) {
8247 /* decode length determinant */
8248
8249 lstat = decodeLength (pctxt, &count);
8250 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
8251 return lstat;
8252 }
8253
8254 /* decode elements */
8255
8256 for (xx1 = 0; xx1 < count; xx1++) {
8257 invokeStartElement (pctxt, "elem", xx1);
8258
8259 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225CallsAvailable);
8260
8261 stat = asn1PD_H225CallsAvailable (pctxt, pdata);
8262 if (stat != ASN_OK) return stat;
8263 invokeEndElement (pctxt, "elem", xx1);
8264
8265 dListAppendNode (pctxt, pvalue, pdata);
8266 }
8267
8268 if(lstat == ASN_OK) break;
8269 }
8270
8271 return (stat);
8272 }
8273
8274 /**************************************************************/
8275 /* */
8276 /* CallCapacityInfo */
8277 /* */
8278 /**************************************************************/
8279
8280 EXTERN int asn1PD_H225CallCapacityInfo (OOCTXT* pctxt, H225CallCapacityInfo* pvalue)
8281 {
8282 int stat = ASN_OK;
8283 OOCTXT lctxt;
8284 OOCTXT lctxt2;
8285 ASN1OpenType openType;
8286 ASN1UINT bitcnt;
8287 ASN1UINT i;
8288 ASN1BOOL optbit = 0;
8289 ASN1BOOL extbit = 0;
8290
8291 /* extension bit */
8292
8293 DECODEBIT (pctxt, &extbit);
8294
8295 /* optional bits */
8296
8297 memset (&pvalue->m, 0, sizeof(pvalue->m));
8298
8299 DECODEBIT (pctxt, &optbit);
8300 pvalue->m.voiceGwCallsAvailablePresent = optbit;
8301
8302 DECODEBIT (pctxt, &optbit);
8303 pvalue->m.h310GwCallsAvailablePresent = optbit;
8304
8305 DECODEBIT (pctxt, &optbit);
8306 pvalue->m.h320GwCallsAvailablePresent = optbit;
8307
8308 DECODEBIT (pctxt, &optbit);
8309 pvalue->m.h321GwCallsAvailablePresent = optbit;
8310
8311 DECODEBIT (pctxt, &optbit);
8312 pvalue->m.h322GwCallsAvailablePresent = optbit;
8313
8314 DECODEBIT (pctxt, &optbit);
8315 pvalue->m.h323GwCallsAvailablePresent = optbit;
8316
8317 DECODEBIT (pctxt, &optbit);
8318 pvalue->m.h324GwCallsAvailablePresent = optbit;
8319
8320 DECODEBIT (pctxt, &optbit);
8321 pvalue->m.t120OnlyGwCallsAvailablePresent = optbit;
8322
8323 DECODEBIT (pctxt, &optbit);
8324 pvalue->m.t38FaxAnnexbOnlyGwCallsAvailablePresent = optbit;
8325
8326 DECODEBIT (pctxt, &optbit);
8327 pvalue->m.terminalCallsAvailablePresent = optbit;
8328
8329 DECODEBIT (pctxt, &optbit);
8330 pvalue->m.mcuCallsAvailablePresent = optbit;
8331
8332 /* decode voiceGwCallsAvailable */
8333
8334 if (pvalue->m.voiceGwCallsAvailablePresent) {
8335 invokeStartElement (pctxt, "voiceGwCallsAvailable", -1);
8336
8337 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->voiceGwCallsAvailable);
8338 if (stat != ASN_OK) return stat;
8339
8340 invokeEndElement (pctxt, "voiceGwCallsAvailable", -1);
8341 }
8342
8343 /* decode h310GwCallsAvailable */
8344
8345 if (pvalue->m.h310GwCallsAvailablePresent) {
8346 invokeStartElement (pctxt, "h310GwCallsAvailable", -1);
8347
8348 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h310GwCallsAvailable);
8349 if (stat != ASN_OK) return stat;
8350
8351 invokeEndElement (pctxt, "h310GwCallsAvailable", -1);
8352 }
8353
8354 /* decode h320GwCallsAvailable */
8355
8356 if (pvalue->m.h320GwCallsAvailablePresent) {
8357 invokeStartElement (pctxt, "h320GwCallsAvailable", -1);
8358
8359 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h320GwCallsAvailable);
8360 if (stat != ASN_OK) return stat;
8361
8362 invokeEndElement (pctxt, "h320GwCallsAvailable", -1);
8363 }
8364
8365 /* decode h321GwCallsAvailable */
8366
8367 if (pvalue->m.h321GwCallsAvailablePresent) {
8368 invokeStartElement (pctxt, "h321GwCallsAvailable", -1);
8369
8370 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h321GwCallsAvailable);
8371 if (stat != ASN_OK) return stat;
8372
8373 invokeEndElement (pctxt, "h321GwCallsAvailable", -1);
8374 }
8375
8376 /* decode h322GwCallsAvailable */
8377
8378 if (pvalue->m.h322GwCallsAvailablePresent) {
8379 invokeStartElement (pctxt, "h322GwCallsAvailable", -1);
8380
8381 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h322GwCallsAvailable);
8382 if (stat != ASN_OK) return stat;
8383
8384 invokeEndElement (pctxt, "h322GwCallsAvailable", -1);
8385 }
8386
8387 /* decode h323GwCallsAvailable */
8388
8389 if (pvalue->m.h323GwCallsAvailablePresent) {
8390 invokeStartElement (pctxt, "h323GwCallsAvailable", -1);
8391
8392 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h323GwCallsAvailable);
8393 if (stat != ASN_OK) return stat;
8394
8395 invokeEndElement (pctxt, "h323GwCallsAvailable", -1);
8396 }
8397
8398 /* decode h324GwCallsAvailable */
8399
8400 if (pvalue->m.h324GwCallsAvailablePresent) {
8401 invokeStartElement (pctxt, "h324GwCallsAvailable", -1);
8402
8403 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h324GwCallsAvailable);
8404 if (stat != ASN_OK) return stat;
8405
8406 invokeEndElement (pctxt, "h324GwCallsAvailable", -1);
8407 }
8408
8409 /* decode t120OnlyGwCallsAvailable */
8410
8411 if (pvalue->m.t120OnlyGwCallsAvailablePresent) {
8412 invokeStartElement (pctxt, "t120OnlyGwCallsAvailable", -1);
8413
8414 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->t120OnlyGwCallsAvailable);
8415 if (stat != ASN_OK) return stat;
8416
8417 invokeEndElement (pctxt, "t120OnlyGwCallsAvailable", -1);
8418 }
8419
8420 /* decode t38FaxAnnexbOnlyGwCallsAvailable */
8421
8422 if (pvalue->m.t38FaxAnnexbOnlyGwCallsAvailablePresent) {
8423 invokeStartElement (pctxt, "t38FaxAnnexbOnlyGwCallsAvailable", -1);
8424
8425 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->t38FaxAnnexbOnlyGwCallsAvailable);
8426 if (stat != ASN_OK) return stat;
8427
8428 invokeEndElement (pctxt, "t38FaxAnnexbOnlyGwCallsAvailable", -1);
8429 }
8430
8431 /* decode terminalCallsAvailable */
8432
8433 if (pvalue->m.terminalCallsAvailablePresent) {
8434 invokeStartElement (pctxt, "terminalCallsAvailable", -1);
8435
8436 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->terminalCallsAvailable);
8437 if (stat != ASN_OK) return stat;
8438
8439 invokeEndElement (pctxt, "terminalCallsAvailable", -1);
8440 }
8441
8442 /* decode mcuCallsAvailable */
8443
8444 if (pvalue->m.mcuCallsAvailablePresent) {
8445 invokeStartElement (pctxt, "mcuCallsAvailable", -1);
8446
8447 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->mcuCallsAvailable);
8448 if (stat != ASN_OK) return stat;
8449
8450 invokeEndElement (pctxt, "mcuCallsAvailable", -1);
8451 }
8452
8453 if (extbit) {
8454
8455 /* decode extension optional bits length */
8456
8457 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8458 if (stat != ASN_OK) return stat;
8459
8460 bitcnt += 1;
8461
8462 ZEROCONTEXT (&lctxt);
8463 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8464 if (stat != ASN_OK) return stat;
8465
8466 stat = moveBitCursor (pctxt, bitcnt);
8467 if (stat != ASN_OK) return stat;
8468
8469 for (i = 0; i < bitcnt; i++) {
8470 DECODEBIT (&lctxt, &optbit);
8471
8472 if (optbit) {
8473 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8474 if (stat != ASN_OK) return stat;
8475
8476 if (i < 1 && openType.numocts > 0) { /* known element */
8477 copyContext (&lctxt2, pctxt);
8478 initContextBuffer (pctxt, openType.data, openType.numocts);
8479
8480 switch (i) {
8481 case 0:
8482 pvalue->m.sipGwCallsAvailablePresent = 1;
8483
8484 invokeStartElement (pctxt, "sipGwCallsAvailable", -1);
8485
8486 stat = asn1PD_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->sipGwCallsAvailable);
8487 if (stat != ASN_OK) return stat;
8488
8489 invokeEndElement (pctxt, "sipGwCallsAvailable", -1);
8490 break;
8491
8492 default:
8493 pctxt->buffer.byteIndex += openType.numocts;
8494 }
8495 copyContext (pctxt, &lctxt2);
8496 }
8497 else { /* unknown element */
8498 pctxt->buffer.byteIndex += openType.numocts;
8499 }
8500 }
8501 }
8502 }
8503
8504 return (stat);
8505 }
8506
8507 /**************************************************************/
8508 /* */
8509 /* CallCapacity */
8510 /* */
8511 /**************************************************************/
8512
8513 EXTERN int asn1PD_H225CallCapacity (OOCTXT* pctxt, H225CallCapacity* pvalue)
8514 {
8515 int stat = ASN_OK;
8516 OOCTXT lctxt;
8517 ASN1OpenType openType;
8518 ASN1UINT bitcnt;
8519 ASN1UINT i;
8520 ASN1BOOL optbit = 0;
8521 ASN1BOOL extbit = 0;
8522
8523 /* extension bit */
8524
8525 DECODEBIT (pctxt, &extbit);
8526
8527 /* optional bits */
8528
8529 memset (&pvalue->m, 0, sizeof(pvalue->m));
8530
8531 DECODEBIT (pctxt, &optbit);
8532 pvalue->m.maximumCallCapacityPresent = optbit;
8533
8534 DECODEBIT (pctxt, &optbit);
8535 pvalue->m.currentCallCapacityPresent = optbit;
8536
8537 /* decode maximumCallCapacity */
8538
8539 if (pvalue->m.maximumCallCapacityPresent) {
8540 invokeStartElement (pctxt, "maximumCallCapacity", -1);
8541
8542 stat = asn1PD_H225CallCapacityInfo (pctxt, &pvalue->maximumCallCapacity);
8543 if (stat != ASN_OK) return stat;
8544
8545 invokeEndElement (pctxt, "maximumCallCapacity", -1);
8546 }
8547
8548 /* decode currentCallCapacity */
8549
8550 if (pvalue->m.currentCallCapacityPresent) {
8551 invokeStartElement (pctxt, "currentCallCapacity", -1);
8552
8553 stat = asn1PD_H225CallCapacityInfo (pctxt, &pvalue->currentCallCapacity);
8554 if (stat != ASN_OK) return stat;
8555
8556 invokeEndElement (pctxt, "currentCallCapacity", -1);
8557 }
8558
8559 if (extbit) {
8560
8561 /* decode extension optional bits length */
8562
8563 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8564 if (stat != ASN_OK) return stat;
8565
8566 bitcnt += 1;
8567
8568 ZEROCONTEXT (&lctxt);
8569 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8570 if (stat != ASN_OK) return stat;
8571
8572 stat = moveBitCursor (pctxt, bitcnt);
8573 if (stat != ASN_OK) return stat;
8574
8575 for (i = 0; i < bitcnt; i++) {
8576 DECODEBIT (&lctxt, &optbit);
8577
8578 if (optbit) {
8579 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8580 if (stat != ASN_OK) return stat;
8581
8582 pctxt->buffer.byteIndex += openType.numocts;
8583 }
8584 }
8585 }
8586
8587 return (stat);
8588 }
8589
8590 /**************************************************************/
8591 /* */
8592 /* _SeqOfH225CicInfo_cic_element */
8593 /* */
8594 /**************************************************************/
8595
8596 EXTERN int asn1PD_H225_SeqOfH225CicInfo_cic_element (OOCTXT* pctxt, H225_SeqOfH225CicInfo_cic_element* pvalue)
8597 {
8598 int stat = ASN_OK;
8599 ASN1UINT xx1;
8600
8601 /* decode length determinant */
8602
8603 stat = decodeLength (pctxt, &pvalue->n);
8604 if (stat != ASN_OK) return stat;
8605
8606 /* decode elements */
8607
8608 ALLOC_ASN1ARRAY (pctxt, pvalue, H225CicInfo_cic_element);
8609
8610 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
8611 invokeStartElement (pctxt, "elem", xx1);
8612
8613 stat = asn1PD_H225CicInfo_cic_element (pctxt, &pvalue->elem[xx1]);
8614 if (stat != ASN_OK) return stat;
8615 invokeEndElement (pctxt, "elem", xx1);
8616
8617 }
8618
8619 return (stat);
8620 }
8621
8622 /**************************************************************/
8623 /* */
8624 /* CicInfo */
8625 /* */
8626 /**************************************************************/
8627
8628 EXTERN int asn1PD_H225CicInfo (OOCTXT* pctxt, H225CicInfo* pvalue)
8629 {
8630 int stat = ASN_OK;
8631 OOCTXT lctxt;
8632 ASN1OpenType openType;
8633 ASN1UINT bitcnt;
8634 ASN1UINT i;
8635 ASN1BOOL optbit = 0;
8636 ASN1BOOL extbit = 0;
8637
8638 /* extension bit */
8639
8640 DECODEBIT (pctxt, &extbit);
8641
8642 /* decode cic */
8643
8644 invokeStartElement (pctxt, "cic", -1);
8645
8646 stat = asn1PD_H225_SeqOfH225CicInfo_cic_element (pctxt, &pvalue->cic);
8647 if (stat != ASN_OK) return stat;
8648
8649 invokeEndElement (pctxt, "cic", -1);
8650
8651 /* decode pointCode */
8652
8653 invokeStartElement (pctxt, "pointCode", -1);
8654
8655 stat = asn1PD_H225CicInfo_pointCode (pctxt, &pvalue->pointCode);
8656 if (stat != ASN_OK) return stat;
8657
8658 invokeEndElement (pctxt, "pointCode", -1);
8659
8660 if (extbit) {
8661
8662 /* decode extension optional bits length */
8663
8664 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8665 if (stat != ASN_OK) return stat;
8666
8667 bitcnt += 1;
8668
8669 ZEROCONTEXT (&lctxt);
8670 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8671 if (stat != ASN_OK) return stat;
8672
8673 stat = moveBitCursor (pctxt, bitcnt);
8674 if (stat != ASN_OK) return stat;
8675
8676 for (i = 0; i < bitcnt; i++) {
8677 DECODEBIT (&lctxt, &optbit);
8678
8679 if (optbit) {
8680 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8681 if (stat != ASN_OK) return stat;
8682
8683 pctxt->buffer.byteIndex += openType.numocts;
8684 }
8685 }
8686 }
8687
8688 return (stat);
8689 }
8690
8691 /**************************************************************/
8692 /* */
8693 /* GroupID_member */
8694 /* */
8695 /**************************************************************/
8696
8697 EXTERN int asn1PD_H225GroupID_member (OOCTXT* pctxt, H225GroupID_member* pvalue)
8698 {
8699 int stat = ASN_OK;
8700 ASN1UINT xx1;
8701
8702 /* decode length determinant */
8703
8704 stat = decodeLength (pctxt, &pvalue->n);
8705 if (stat != ASN_OK) return stat;
8706
8707 /* decode elements */
8708
8709 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1USINT);
8710
8711 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
8712 invokeStartElement (pctxt, "elem", xx1);
8713
8714 stat = decodeConsUInt16 (pctxt, &pvalue->elem[xx1], 0U, 65535U);
8715 if (stat != ASN_OK) return stat;
8716 invokeUIntValue (pctxt, pvalue->elem[xx1]);
8717 invokeEndElement (pctxt, "elem", xx1);
8718
8719 }
8720
8721 return (stat);
8722 }
8723
8724 /**************************************************************/
8725 /* */
8726 /* GroupID */
8727 /* */
8728 /**************************************************************/
8729
8730 EXTERN int asn1PD_H225GroupID (OOCTXT* pctxt, H225GroupID* pvalue)
8731 {
8732 static Asn1SizeCnst group_lsize1 = { 0, 1, 128, 0 };
8733 int stat = ASN_OK;
8734 OOCTXT lctxt;
8735 ASN1OpenType openType;
8736 ASN1UINT bitcnt;
8737 ASN1UINT i;
8738 ASN1BOOL optbit = 0;
8739 ASN1BOOL extbit = 0;
8740
8741 /* extension bit */
8742
8743 DECODEBIT (pctxt, &extbit);
8744
8745 /* optional bits */
8746
8747 memset (&pvalue->m, 0, sizeof(pvalue->m));
8748
8749 DECODEBIT (pctxt, &optbit);
8750 pvalue->m.memberPresent = optbit;
8751
8752 /* decode member */
8753
8754 if (pvalue->m.memberPresent) {
8755 invokeStartElement (pctxt, "member", -1);
8756
8757 stat = asn1PD_H225GroupID_member (pctxt, &pvalue->member);
8758 if (stat != ASN_OK) return stat;
8759
8760 invokeEndElement (pctxt, "member", -1);
8761 }
8762
8763 /* decode group */
8764
8765 invokeStartElement (pctxt, "group", -1);
8766
8767 addSizeConstraint (pctxt, &group_lsize1);
8768
8769 stat = decodeConstrainedStringEx (pctxt, &pvalue->group, 0, 8, 7, 7);
8770 if (stat != ASN_OK) return stat;
8771 invokeCharStrValue (pctxt, pvalue->group);
8772
8773 invokeEndElement (pctxt, "group", -1);
8774
8775 if (extbit) {
8776
8777 /* decode extension optional bits length */
8778
8779 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8780 if (stat != ASN_OK) return stat;
8781
8782 bitcnt += 1;
8783
8784 ZEROCONTEXT (&lctxt);
8785 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8786 if (stat != ASN_OK) return stat;
8787
8788 stat = moveBitCursor (pctxt, bitcnt);
8789 if (stat != ASN_OK) return stat;
8790
8791 for (i = 0; i < bitcnt; i++) {
8792 DECODEBIT (&lctxt, &optbit);
8793
8794 if (optbit) {
8795 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8796 if (stat != ASN_OK) return stat;
8797
8798 pctxt->buffer.byteIndex += openType.numocts;
8799 }
8800 }
8801 }
8802
8803 return (stat);
8804 }
8805
8806 /**************************************************************/
8807 /* */
8808 /* CircuitIdentifier */
8809 /* */
8810 /**************************************************************/
8811
8812 EXTERN int asn1PD_H225CircuitIdentifier (OOCTXT* pctxt, H225CircuitIdentifier* pvalue)
8813 {
8814 int stat = ASN_OK;
8815 OOCTXT lctxt;
8816 OOCTXT lctxt2;
8817 ASN1OpenType openType;
8818 ASN1UINT bitcnt;
8819 ASN1UINT i;
8820 ASN1BOOL optbit = 0;
8821 ASN1BOOL extbit = 0;
8822
8823 /* extension bit */
8824
8825 DECODEBIT (pctxt, &extbit);
8826
8827 /* optional bits */
8828
8829 memset (&pvalue->m, 0, sizeof(pvalue->m));
8830
8831 DECODEBIT (pctxt, &optbit);
8832 pvalue->m.cicPresent = optbit;
8833
8834 DECODEBIT (pctxt, &optbit);
8835 pvalue->m.groupPresent = optbit;
8836
8837 /* decode cic */
8838
8839 if (pvalue->m.cicPresent) {
8840 invokeStartElement (pctxt, "cic", -1);
8841
8842 stat = asn1PD_H225CicInfo (pctxt, &pvalue->cic);
8843 if (stat != ASN_OK) return stat;
8844
8845 invokeEndElement (pctxt, "cic", -1);
8846 }
8847
8848 /* decode group */
8849
8850 if (pvalue->m.groupPresent) {
8851 invokeStartElement (pctxt, "group", -1);
8852
8853 stat = asn1PD_H225GroupID (pctxt, &pvalue->group);
8854 if (stat != ASN_OK) return stat;
8855
8856 invokeEndElement (pctxt, "group", -1);
8857 }
8858
8859 if (extbit) {
8860
8861 /* decode extension optional bits length */
8862
8863 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
8864 if (stat != ASN_OK) return stat;
8865
8866 bitcnt += 1;
8867
8868 ZEROCONTEXT (&lctxt);
8869 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
8870 if (stat != ASN_OK) return stat;
8871
8872 stat = moveBitCursor (pctxt, bitcnt);
8873 if (stat != ASN_OK) return stat;
8874
8875 for (i = 0; i < bitcnt; i++) {
8876 DECODEBIT (&lctxt, &optbit);
8877
8878 if (optbit) {
8879 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
8880 if (stat != ASN_OK) return stat;
8881
8882 if (i < 1 && openType.numocts > 0) { /* known element */
8883 copyContext (&lctxt2, pctxt);
8884 initContextBuffer (pctxt, openType.data, openType.numocts);
8885
8886 switch (i) {
8887 case 0:
8888 pvalue->m.carrierPresent = 1;
8889
8890 invokeStartElement (pctxt, "carrier", -1);
8891
8892 stat = asn1PD_H225CarrierInfo (pctxt, &pvalue->carrier);
8893 if (stat != ASN_OK) return stat;
8894
8895 invokeEndElement (pctxt, "carrier", -1);
8896 break;
8897
8898 default:
8899 pctxt->buffer.byteIndex += openType.numocts;
8900 }
8901 copyContext (pctxt, &lctxt2);
8902 }
8903 else { /* unknown element */
8904 pctxt->buffer.byteIndex += openType.numocts;
8905 }
8906 }
8907 }
8908 }
8909
8910 return (stat);
8911 }
8912
8913 /**************************************************************/
8914 /* */
8915 /* _SeqOfH225GenericData */
8916 /* */
8917 /**************************************************************/
8918
8919 EXTERN int asn1PD_H225_SeqOfH225GenericData (OOCTXT* pctxt, H225_SeqOfH225GenericData* pvalue)
8920 {
8921 int stat = ASN_OK;
8922 H225GenericData* pdata;
8923 ASN1UINT count = 0;
8924 ASN1UINT xx1;
8925 int lstat;
8926
8927 dListInit (pvalue);
8928
8929 for (;;) {
8930 /* decode length determinant */
8931
8932 lstat = decodeLength (pctxt, &count);
8933 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
8934 return lstat;
8935 }
8936
8937 /* decode elements */
8938
8939 for (xx1 = 0; xx1 < count; xx1++) {
8940 invokeStartElement (pctxt, "elem", xx1);
8941
8942 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225GenericData);
8943
8944 stat = asn1PD_H225GenericData (pctxt, pdata);
8945 if (stat != ASN_OK) return stat;
8946 invokeEndElement (pctxt, "elem", xx1);
8947
8948 dListAppendNode (pctxt, pvalue, pdata);
8949 }
8950
8951 if(lstat == ASN_OK) break;
8952 }
8953
8954 return (stat);
8955 }
8956
8957 /**************************************************************/
8958 /* */
8959 /* CircuitInfo */
8960 /* */
8961 /**************************************************************/
8962
8963 EXTERN int asn1PD_H225CircuitInfo (OOCTXT* pctxt, H225CircuitInfo* pvalue)
8964 {
8965 int stat = ASN_OK;
8966 OOCTXT lctxt;
8967 ASN1OpenType openType;
8968 ASN1UINT bitcnt;
8969 ASN1UINT i;
8970 ASN1BOOL optbit = 0;
8971 ASN1BOOL extbit = 0;
8972
8973 /* extension bit */
8974
8975 DECODEBIT (pctxt, &extbit);
8976
8977 /* optional bits */
8978
8979 memset (&pvalue->m, 0, sizeof(pvalue->m));
8980
8981 DECODEBIT (pctxt, &optbit);
8982 pvalue->m.sourceCircuitIDPresent = optbit;
8983
8984 DECODEBIT (pctxt, &optbit);
8985 pvalue->m.destinationCircuitIDPresent = optbit;
8986
8987 DECODEBIT (pctxt, &optbit);
8988 pvalue->m.genericDataPresent = optbit;
8989
8990 /* decode sourceCircuitID */
8991
8992 if (pvalue->m.sourceCircuitIDPresent) {
8993 invokeStartElement (pctxt, "sourceCircuitID", -1);
8994
8995 stat = asn1PD_H225CircuitIdentifier (pctxt, &pvalue->sourceCircuitID);
8996 if (stat != ASN_OK) return stat;
8997
8998 invokeEndElement (pctxt, "sourceCircuitID", -1);
8999 }
9000
9001 /* decode destinationCircuitID */
9002
9003 if (pvalue->m.destinationCircuitIDPresent) {
9004 invokeStartElement (pctxt, "destinationCircuitID", -1);
9005
9006 stat = asn1PD_H225CircuitIdentifier (pctxt, &pvalue->destinationCircuitID);
9007 if (stat != ASN_OK) return stat;
9008
9009 invokeEndElement (pctxt, "destinationCircuitID", -1);
9010 }
9011
9012 /* decode genericData */
9013
9014 if (pvalue->m.genericDataPresent) {
9015 invokeStartElement (pctxt, "genericData", -1);
9016
9017 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
9018 if (stat != ASN_OK) return stat;
9019
9020 invokeEndElement (pctxt, "genericData", -1);
9021 }
9022
9023 if (extbit) {
9024
9025 /* decode extension optional bits length */
9026
9027 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
9028 if (stat != ASN_OK) return stat;
9029
9030 bitcnt += 1;
9031
9032 ZEROCONTEXT (&lctxt);
9033 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
9034 if (stat != ASN_OK) return stat;
9035
9036 stat = moveBitCursor (pctxt, bitcnt);
9037 if (stat != ASN_OK) return stat;
9038
9039 for (i = 0; i < bitcnt; i++) {
9040 DECODEBIT (&lctxt, &optbit);
9041
9042 if (optbit) {
9043 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
9044 if (stat != ASN_OK) return stat;
9045
9046 pctxt->buffer.byteIndex += openType.numocts;
9047 }
9048 }
9049 }
9050
9051 return (stat);
9052 }
9053
9054 /**************************************************************/
9055 /* */
9056 /* _SeqOfH225FeatureDescriptor */
9057 /* */
9058 /**************************************************************/
9059
9060 EXTERN int asn1PD_H225_SeqOfH225FeatureDescriptor (OOCTXT* pctxt, H225_SeqOfH225FeatureDescriptor* pvalue)
9061 {
9062 int stat = ASN_OK;
9063 H225FeatureDescriptor* pdata;
9064 ASN1UINT count = 0;
9065 ASN1UINT xx1;
9066 int lstat;
9067
9068 dListInit (pvalue);
9069
9070 for (;;) {
9071 /* decode length determinant */
9072
9073 lstat = decodeLength (pctxt, &count);
9074 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
9075 return lstat;
9076 }
9077
9078 /* decode elements */
9079
9080 for (xx1 = 0; xx1 < count; xx1++) {
9081 invokeStartElement (pctxt, "elem", xx1);
9082
9083 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225FeatureDescriptor);
9084
9085 stat = asn1PD_H225FeatureDescriptor (pctxt, pdata);
9086 if (stat != ASN_OK) return stat;
9087 invokeEndElement (pctxt, "elem", xx1);
9088
9089 dListAppendNode (pctxt, pvalue, pdata);
9090 }
9091
9092 if(lstat == ASN_OK) break;
9093 }
9094
9095 return (stat);
9096 }
9097
9098 /**************************************************************/
9099 /* */
9100 /* Setup_UUIE_parallelH245Control */
9101 /* */
9102 /**************************************************************/
9103
9104 EXTERN int asn1PD_H225Setup_UUIE_parallelH245Control (OOCTXT* pctxt, H225Setup_UUIE_parallelH245Control* pvalue)
9105 {
9106 int stat = ASN_OK;
9107 ASN1UINT xx1;
9108
9109 /* decode length determinant */
9110
9111 stat = decodeLength (pctxt, &pvalue->n);
9112 if (stat != ASN_OK) return stat;
9113
9114 /* decode elements */
9115
9116 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
9117
9118 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
9119 invokeStartElement (pctxt, "elem", xx1);
9120
9121 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
9122 if (stat != ASN_OK) return stat;
9123 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
9124 invokeEndElement (pctxt, "elem", xx1);
9125
9126 }
9127
9128 return (stat);
9129 }
9130
9131 /**************************************************************/
9132 /* */
9133 /* ExtendedAliasAddress */
9134 /* */
9135 /**************************************************************/
9136
9137 EXTERN int asn1PD_H225ExtendedAliasAddress (OOCTXT* pctxt, H225ExtendedAliasAddress* pvalue)
9138 {
9139 int stat = ASN_OK;
9140 OOCTXT lctxt;
9141 ASN1OpenType openType;
9142 ASN1UINT bitcnt;
9143 ASN1UINT i;
9144 ASN1BOOL optbit = 0;
9145 ASN1BOOL extbit = 0;
9146
9147 /* extension bit */
9148
9149 DECODEBIT (pctxt, &extbit);
9150
9151 /* optional bits */
9152
9153 memset (&pvalue->m, 0, sizeof(pvalue->m));
9154
9155 DECODEBIT (pctxt, &optbit);
9156 pvalue->m.presentationIndicatorPresent = optbit;
9157
9158 DECODEBIT (pctxt, &optbit);
9159 pvalue->m.screeningIndicatorPresent = optbit;
9160
9161 /* decode address */
9162
9163 invokeStartElement (pctxt, "address", -1);
9164
9165 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->address);
9166 if (stat != ASN_OK) return stat;
9167
9168 invokeEndElement (pctxt, "address", -1);
9169
9170 /* decode presentationIndicator */
9171
9172 if (pvalue->m.presentationIndicatorPresent) {
9173 invokeStartElement (pctxt, "presentationIndicator", -1);
9174
9175 stat = asn1PD_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
9176 if (stat != ASN_OK) return stat;
9177
9178 invokeEndElement (pctxt, "presentationIndicator", -1);
9179 }
9180
9181 /* decode screeningIndicator */
9182
9183 if (pvalue->m.screeningIndicatorPresent) {
9184 invokeStartElement (pctxt, "screeningIndicator", -1);
9185
9186 stat = asn1PD_H225ScreeningIndicator (pctxt, &pvalue->screeningIndicator);
9187 if (stat != ASN_OK) return stat;
9188
9189 invokeEndElement (pctxt, "screeningIndicator", -1);
9190 }
9191
9192 if (extbit) {
9193
9194 /* decode extension optional bits length */
9195
9196 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
9197 if (stat != ASN_OK) return stat;
9198
9199 bitcnt += 1;
9200
9201 ZEROCONTEXT (&lctxt);
9202 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
9203 if (stat != ASN_OK) return stat;
9204
9205 stat = moveBitCursor (pctxt, bitcnt);
9206 if (stat != ASN_OK) return stat;
9207
9208 for (i = 0; i < bitcnt; i++) {
9209 DECODEBIT (&lctxt, &optbit);
9210
9211 if (optbit) {
9212 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
9213 if (stat != ASN_OK) return stat;
9214
9215 pctxt->buffer.byteIndex += openType.numocts;
9216 }
9217 }
9218 }
9219
9220 return (stat);
9221 }
9222
9223 /**************************************************************/
9224 /* */
9225 /* _SeqOfH225ExtendedAliasAddress */
9226 /* */
9227 /**************************************************************/
9228
9229 EXTERN int asn1PD_H225_SeqOfH225ExtendedAliasAddress (OOCTXT* pctxt, H225_SeqOfH225ExtendedAliasAddress* pvalue)
9230 {
9231 int stat = ASN_OK;
9232 H225ExtendedAliasAddress* pdata;
9233 ASN1UINT count = 0;
9234 ASN1UINT xx1;
9235 int lstat;
9236
9237 dListInit (pvalue);
9238
9239 for (;;) {
9240 /* decode length determinant */
9241
9242 lstat = decodeLength (pctxt, &count);
9243 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
9244 return lstat;
9245 }
9246
9247 /* decode elements */
9248
9249 for (xx1 = 0; xx1 < count; xx1++) {
9250 invokeStartElement (pctxt, "elem", xx1);
9251
9252 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225ExtendedAliasAddress);
9253
9254 stat = asn1PD_H225ExtendedAliasAddress (pctxt, pdata);
9255 if (stat != ASN_OK) return stat;
9256 invokeEndElement (pctxt, "elem", xx1);
9257
9258 dListAppendNode (pctxt, pvalue, pdata);
9259 }
9260
9261 if(lstat == ASN_OK) break;
9262 }
9263
9264 return (stat);
9265 }
9266
9267 /**************************************************************/
9268 /* */
9269 /* Setup_UUIE */
9270 /* */
9271 /**************************************************************/
9272
9273 EXTERN int asn1PD_H225Setup_UUIE (OOCTXT* pctxt, H225Setup_UUIE* pvalue)
9274 {
9275 int stat = ASN_OK;
9276 OOCTXT lctxt;
9277 OOCTXT lctxt2;
9278 ASN1OpenType openType;
9279 ASN1UINT bitcnt;
9280 ASN1UINT i;
9281 ASN1BOOL optbit = 0;
9282 ASN1BOOL extbit = 0;
9283
9284 /* extension bit */
9285
9286 DECODEBIT (pctxt, &extbit);
9287
9288 /* optional bits */
9289
9290 memset (&pvalue->m, 0, sizeof(pvalue->m));
9291
9292 DECODEBIT (pctxt, &optbit);
9293 pvalue->m.h245AddressPresent = optbit;
9294
9295 DECODEBIT (pctxt, &optbit);
9296 pvalue->m.sourceAddressPresent = optbit;
9297
9298 DECODEBIT (pctxt, &optbit);
9299 pvalue->m.destinationAddressPresent = optbit;
9300
9301 DECODEBIT (pctxt, &optbit);
9302 pvalue->m.destCallSignalAddressPresent = optbit;
9303
9304 DECODEBIT (pctxt, &optbit);
9305 pvalue->m.destExtraCallInfoPresent = optbit;
9306
9307 DECODEBIT (pctxt, &optbit);
9308 pvalue->m.destExtraCRVPresent = optbit;
9309
9310 DECODEBIT (pctxt, &optbit);
9311 pvalue->m.callServicesPresent = optbit;
9312
9313 /* decode protocolIdentifier */
9314
9315 invokeStartElement (pctxt, "protocolIdentifier", -1);
9316
9317 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9318 if (stat != ASN_OK) return stat;
9319
9320 invokeEndElement (pctxt, "protocolIdentifier", -1);
9321
9322 /* decode h245Address */
9323
9324 if (pvalue->m.h245AddressPresent) {
9325 invokeStartElement (pctxt, "h245Address", -1);
9326
9327 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
9328 if (stat != ASN_OK) return stat;
9329
9330 invokeEndElement (pctxt, "h245Address", -1);
9331 }
9332
9333 /* decode sourceAddress */
9334
9335 if (pvalue->m.sourceAddressPresent) {
9336 invokeStartElement (pctxt, "sourceAddress", -1);
9337
9338 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->sourceAddress);
9339 if (stat != ASN_OK) return stat;
9340
9341 invokeEndElement (pctxt, "sourceAddress", -1);
9342 }
9343
9344 /* decode sourceInfo */
9345
9346 invokeStartElement (pctxt, "sourceInfo", -1);
9347
9348 stat = asn1PD_H225EndpointType (pctxt, &pvalue->sourceInfo);
9349 if (stat != ASN_OK) return stat;
9350
9351 invokeEndElement (pctxt, "sourceInfo", -1);
9352
9353 /* decode destinationAddress */
9354
9355 if (pvalue->m.destinationAddressPresent) {
9356 invokeStartElement (pctxt, "destinationAddress", -1);
9357
9358 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationAddress);
9359 if (stat != ASN_OK) return stat;
9360
9361 invokeEndElement (pctxt, "destinationAddress", -1);
9362 }
9363
9364 /* decode destCallSignalAddress */
9365
9366 if (pvalue->m.destCallSignalAddressPresent) {
9367 invokeStartElement (pctxt, "destCallSignalAddress", -1);
9368
9369 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
9370 if (stat != ASN_OK) return stat;
9371
9372 invokeEndElement (pctxt, "destCallSignalAddress", -1);
9373 }
9374
9375 /* decode destExtraCallInfo */
9376
9377 if (pvalue->m.destExtraCallInfoPresent) {
9378 invokeStartElement (pctxt, "destExtraCallInfo", -1);
9379
9380 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
9381 if (stat != ASN_OK) return stat;
9382
9383 invokeEndElement (pctxt, "destExtraCallInfo", -1);
9384 }
9385
9386 /* decode destExtraCRV */
9387
9388 if (pvalue->m.destExtraCRVPresent) {
9389 invokeStartElement (pctxt, "destExtraCRV", -1);
9390
9391 stat = asn1PD_H225_SeqOfH225CallReferenceValue (pctxt, &pvalue->destExtraCRV);
9392 if (stat != ASN_OK) return stat;
9393
9394 invokeEndElement (pctxt, "destExtraCRV", -1);
9395 }
9396
9397 /* decode activeMC */
9398
9399 invokeStartElement (pctxt, "activeMC", -1);
9400
9401 stat = DECODEBIT (pctxt, &pvalue->activeMC);
9402 if (stat != ASN_OK) return stat;
9403 invokeBoolValue (pctxt, pvalue->activeMC);
9404
9405 invokeEndElement (pctxt, "activeMC", -1);
9406
9407 /* decode conferenceID */
9408
9409 invokeStartElement (pctxt, "conferenceID", -1);
9410
9411 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
9412 if (stat != ASN_OK) return stat;
9413
9414 invokeEndElement (pctxt, "conferenceID", -1);
9415
9416 /* decode conferenceGoal */
9417
9418 invokeStartElement (pctxt, "conferenceGoal", -1);
9419
9420 stat = asn1PD_H225Setup_UUIE_conferenceGoal (pctxt, &pvalue->conferenceGoal);
9421 if (stat != ASN_OK) return stat;
9422
9423 invokeEndElement (pctxt, "conferenceGoal", -1);
9424
9425 /* decode callServices */
9426
9427 if (pvalue->m.callServicesPresent) {
9428 invokeStartElement (pctxt, "callServices", -1);
9429
9430 stat = asn1PD_H225QseriesOptions (pctxt, &pvalue->callServices);
9431 if (stat != ASN_OK) return stat;
9432
9433 invokeEndElement (pctxt, "callServices", -1);
9434 }
9435
9436 /* decode callType */
9437
9438 invokeStartElement (pctxt, "callType", -1);
9439
9440 stat = asn1PD_H225CallType (pctxt, &pvalue->callType);
9441 if (stat != ASN_OK) return stat;
9442
9443 invokeEndElement (pctxt, "callType", -1);
9444
9445 if (extbit) {
9446
9447 /* decode extension optional bits length */
9448
9449 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
9450 if (stat != ASN_OK) return stat;
9451
9452 bitcnt += 1;
9453
9454 ZEROCONTEXT (&lctxt);
9455 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
9456 if (stat != ASN_OK) return stat;
9457
9458 stat = moveBitCursor (pctxt, bitcnt);
9459 if (stat != ASN_OK) return stat;
9460
9461 for (i = 0; i < bitcnt; i++) {
9462 DECODEBIT (&lctxt, &optbit);
9463
9464 if (optbit) {
9465 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
9466 if (stat != ASN_OK) return stat;
9467
9468 if (i < 27 && openType.numocts > 0) { /* known element */
9469 copyContext (&lctxt2, pctxt);
9470 initContextBuffer (pctxt, openType.data, openType.numocts);
9471
9472 switch (i) {
9473 case 0:
9474 pvalue->m.sourceCallSignalAddressPresent = 1;
9475
9476 invokeStartElement (pctxt, "sourceCallSignalAddress", -1);
9477
9478 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->sourceCallSignalAddress);
9479 if (stat != ASN_OK) return stat;
9480
9481 invokeEndElement (pctxt, "sourceCallSignalAddress", -1);
9482 break;
9483
9484 case 1:
9485 pvalue->m.remoteExtensionAddressPresent = 1;
9486
9487 invokeStartElement (pctxt, "remoteExtensionAddress", -1);
9488
9489 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
9490 if (stat != ASN_OK) return stat;
9491
9492 invokeEndElement (pctxt, "remoteExtensionAddress", -1);
9493 break;
9494
9495 case 2:
9496 pvalue->m.callIdentifierPresent = 1;
9497
9498 invokeStartElement (pctxt, "callIdentifier", -1);
9499
9500 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9501 if (stat != ASN_OK) return stat;
9502
9503 invokeEndElement (pctxt, "callIdentifier", -1);
9504 break;
9505
9506 case 3:
9507 pvalue->m.h245SecurityCapabilityPresent = 1;
9508
9509 invokeStartElement (pctxt, "h245SecurityCapability", -1);
9510
9511 stat = asn1PD_H225_SeqOfH225H245Security (pctxt, &pvalue->h245SecurityCapability);
9512 if (stat != ASN_OK) return stat;
9513
9514 invokeEndElement (pctxt, "h245SecurityCapability", -1);
9515 break;
9516
9517 case 4:
9518 pvalue->m.tokensPresent = 1;
9519
9520 invokeStartElement (pctxt, "tokens", -1);
9521
9522 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9523 if (stat != ASN_OK) return stat;
9524
9525 invokeEndElement (pctxt, "tokens", -1);
9526 break;
9527
9528 case 5:
9529 pvalue->m.cryptoTokensPresent = 1;
9530
9531 invokeStartElement (pctxt, "cryptoTokens", -1);
9532
9533 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9534 if (stat != ASN_OK) return stat;
9535
9536 invokeEndElement (pctxt, "cryptoTokens", -1);
9537 break;
9538
9539 case 6:
9540 pvalue->m.fastStartPresent = 1;
9541
9542 invokeStartElement (pctxt, "fastStart", -1);
9543
9544 stat = asn1PD_H225Setup_UUIE_fastStart (pctxt, &pvalue->fastStart);
9545 if (stat != ASN_OK) return stat;
9546
9547 invokeEndElement (pctxt, "fastStart", -1);
9548 break;
9549
9550 case 7:
9551 pvalue->m.mediaWaitForConnectPresent = 1;
9552
9553 invokeStartElement (pctxt, "mediaWaitForConnect", -1);
9554
9555 stat = DECODEBIT (pctxt, &pvalue->mediaWaitForConnect);
9556 if (stat != ASN_OK) return stat;
9557 invokeBoolValue (pctxt, pvalue->mediaWaitForConnect);
9558
9559 invokeEndElement (pctxt, "mediaWaitForConnect", -1);
9560 break;
9561
9562 case 8:
9563 pvalue->m.canOverlapSendPresent = 1;
9564
9565 invokeStartElement (pctxt, "canOverlapSend", -1);
9566
9567 stat = DECODEBIT (pctxt, &pvalue->canOverlapSend);
9568 if (stat != ASN_OK) return stat;
9569 invokeBoolValue (pctxt, pvalue->canOverlapSend);
9570
9571 invokeEndElement (pctxt, "canOverlapSend", -1);
9572 break;
9573
9574 case 9:
9575 pvalue->m.endpointIdentifierPresent = 1;
9576
9577 invokeStartElement (pctxt, "endpointIdentifier", -1);
9578
9579 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
9580 if (stat != ASN_OK) return stat;
9581
9582 invokeEndElement (pctxt, "endpointIdentifier", -1);
9583 break;
9584
9585 case 10:
9586 pvalue->m.multipleCallsPresent = 1;
9587
9588 invokeStartElement (pctxt, "multipleCalls", -1);
9589
9590 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
9591 if (stat != ASN_OK) return stat;
9592 invokeBoolValue (pctxt, pvalue->multipleCalls);
9593
9594 invokeEndElement (pctxt, "multipleCalls", -1);
9595 break;
9596
9597 case 11:
9598 pvalue->m.maintainConnectionPresent = 1;
9599
9600 invokeStartElement (pctxt, "maintainConnection", -1);
9601
9602 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
9603 if (stat != ASN_OK) return stat;
9604 invokeBoolValue (pctxt, pvalue->maintainConnection);
9605
9606 invokeEndElement (pctxt, "maintainConnection", -1);
9607 break;
9608
9609 case 12:
9610 pvalue->m.connectionParametersPresent = 1;
9611
9612 invokeStartElement (pctxt, "connectionParameters", -1);
9613
9614 stat = asn1PD_H225Setup_UUIE_connectionParameters (pctxt, &pvalue->connectionParameters);
9615 if (stat != ASN_OK) return stat;
9616
9617 invokeEndElement (pctxt, "connectionParameters", -1);
9618 break;
9619
9620 case 13:
9621 pvalue->m.languagePresent = 1;
9622
9623 invokeStartElement (pctxt, "language", -1);
9624
9625 stat = asn1PD_H225Setup_UUIE_language (pctxt, &pvalue->language);
9626 if (stat != ASN_OK) return stat;
9627
9628 invokeEndElement (pctxt, "language", -1);
9629 break;
9630
9631 case 14:
9632 pvalue->m.presentationIndicatorPresent = 1;
9633
9634 invokeStartElement (pctxt, "presentationIndicator", -1);
9635
9636 stat = asn1PD_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
9637 if (stat != ASN_OK) return stat;
9638
9639 invokeEndElement (pctxt, "presentationIndicator", -1);
9640 break;
9641
9642 case 15:
9643 pvalue->m.screeningIndicatorPresent = 1;
9644
9645 invokeStartElement (pctxt, "screeningIndicator", -1);
9646
9647 stat = asn1PD_H225ScreeningIndicator (pctxt, &pvalue->screeningIndicator);
9648 if (stat != ASN_OK) return stat;
9649
9650 invokeEndElement (pctxt, "screeningIndicator", -1);
9651 break;
9652
9653 case 16:
9654 pvalue->m.serviceControlPresent = 1;
9655
9656 invokeStartElement (pctxt, "serviceControl", -1);
9657
9658 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
9659 if (stat != ASN_OK) return stat;
9660
9661 invokeEndElement (pctxt, "serviceControl", -1);
9662 break;
9663
9664 case 17:
9665 pvalue->m.symmetricOperationRequiredPresent = 1;
9666
9667 invokeStartElement (pctxt, "symmetricOperationRequired", -1);
9668
9669 /* NULL */
9670 invokeNullValue (pctxt);
9671
9672 invokeEndElement (pctxt, "symmetricOperationRequired", -1);
9673 break;
9674
9675 case 18:
9676 pvalue->m.capacityPresent = 1;
9677
9678 invokeStartElement (pctxt, "capacity", -1);
9679
9680 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
9681 if (stat != ASN_OK) return stat;
9682
9683 invokeEndElement (pctxt, "capacity", -1);
9684 break;
9685
9686 case 19:
9687 pvalue->m.circuitInfoPresent = 1;
9688
9689 invokeStartElement (pctxt, "circuitInfo", -1);
9690
9691 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
9692 if (stat != ASN_OK) return stat;
9693
9694 invokeEndElement (pctxt, "circuitInfo", -1);
9695 break;
9696
9697 case 20:
9698 pvalue->m.desiredProtocolsPresent = 1;
9699
9700 invokeStartElement (pctxt, "desiredProtocols", -1);
9701
9702 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->desiredProtocols);
9703 if (stat != ASN_OK) return stat;
9704
9705 invokeEndElement (pctxt, "desiredProtocols", -1);
9706 break;
9707
9708 case 21:
9709 pvalue->m.neededFeaturesPresent = 1;
9710
9711 invokeStartElement (pctxt, "neededFeatures", -1);
9712
9713 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->neededFeatures);
9714 if (stat != ASN_OK) return stat;
9715
9716 invokeEndElement (pctxt, "neededFeatures", -1);
9717 break;
9718
9719 case 22:
9720 pvalue->m.desiredFeaturesPresent = 1;
9721
9722 invokeStartElement (pctxt, "desiredFeatures", -1);
9723
9724 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->desiredFeatures);
9725 if (stat != ASN_OK) return stat;
9726
9727 invokeEndElement (pctxt, "desiredFeatures", -1);
9728 break;
9729
9730 case 23:
9731 pvalue->m.supportedFeaturesPresent = 1;
9732
9733 invokeStartElement (pctxt, "supportedFeatures", -1);
9734
9735 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->supportedFeatures);
9736 if (stat != ASN_OK) return stat;
9737
9738 invokeEndElement (pctxt, "supportedFeatures", -1);
9739 break;
9740
9741 case 24:
9742 pvalue->m.parallelH245ControlPresent = 1;
9743
9744 invokeStartElement (pctxt, "parallelH245Control", -1);
9745
9746 stat = asn1PD_H225Setup_UUIE_parallelH245Control (pctxt, &pvalue->parallelH245Control);
9747 if (stat != ASN_OK) return stat;
9748
9749 invokeEndElement (pctxt, "parallelH245Control", -1);
9750 break;
9751
9752 case 25:
9753 pvalue->m.additionalSourceAddressesPresent = 1;
9754
9755 invokeStartElement (pctxt, "additionalSourceAddresses", -1);
9756
9757 stat = asn1PD_H225_SeqOfH225ExtendedAliasAddress (pctxt, &pvalue->additionalSourceAddresses);
9758 if (stat != ASN_OK) return stat;
9759
9760 invokeEndElement (pctxt, "additionalSourceAddresses", -1);
9761 break;
9762
9763 case 26:
9764 pvalue->m.hopCountPresent = 1;
9765
9766 invokeStartElement (pctxt, "hopCount", -1);
9767
9768 stat = decodeConsUInt8 (pctxt, &pvalue->hopCount, 1U, 31U);
9769 if (stat != ASN_OK) return stat;
9770 invokeUIntValue (pctxt, pvalue->hopCount);
9771
9772 invokeEndElement (pctxt, "hopCount", -1);
9773 break;
9774
9775 default:
9776 pctxt->buffer.byteIndex += openType.numocts;
9777 }
9778 copyContext (pctxt, &lctxt2);
9779 }
9780 else { /* unknown element */
9781 pctxt->buffer.byteIndex += openType.numocts;
9782 }
9783 }
9784 }
9785 }
9786
9787 return (stat);
9788 }
9789
9790 /**************************************************************/
9791 /* */
9792 /* CallProceeding_UUIE_fastStart */
9793 /* */
9794 /**************************************************************/
9795
9796 EXTERN int asn1PD_H225CallProceeding_UUIE_fastStart (OOCTXT* pctxt, H225CallProceeding_UUIE_fastStart* pvalue)
9797 {
9798 int stat = ASN_OK;
9799 ASN1UINT xx1;
9800
9801 /* decode length determinant */
9802
9803 stat = decodeLength (pctxt, &pvalue->n);
9804 if (stat != ASN_OK) return stat;
9805
9806 /* decode elements */
9807
9808 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
9809
9810 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
9811 invokeStartElement (pctxt, "elem", xx1);
9812
9813 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
9814 if (stat != ASN_OK) return stat;
9815 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
9816 invokeEndElement (pctxt, "elem", xx1);
9817
9818 }
9819
9820 return (stat);
9821 }
9822
9823 /**************************************************************/
9824 /* */
9825 /* FeatureSet */
9826 /* */
9827 /**************************************************************/
9828
9829 EXTERN int asn1PD_H225FeatureSet (OOCTXT* pctxt, H225FeatureSet* pvalue)
9830 {
9831 int stat = ASN_OK;
9832 OOCTXT lctxt;
9833 ASN1OpenType openType;
9834 ASN1UINT bitcnt;
9835 ASN1UINT i;
9836 ASN1BOOL optbit = 0;
9837 ASN1BOOL extbit = 0;
9838
9839 /* extension bit */
9840
9841 DECODEBIT (pctxt, &extbit);
9842
9843 /* optional bits */
9844
9845 memset (&pvalue->m, 0, sizeof(pvalue->m));
9846
9847 DECODEBIT (pctxt, &optbit);
9848 pvalue->m.neededFeaturesPresent = optbit;
9849
9850 DECODEBIT (pctxt, &optbit);
9851 pvalue->m.desiredFeaturesPresent = optbit;
9852
9853 DECODEBIT (pctxt, &optbit);
9854 pvalue->m.supportedFeaturesPresent = optbit;
9855
9856 /* decode replacementFeatureSet */
9857
9858 invokeStartElement (pctxt, "replacementFeatureSet", -1);
9859
9860 stat = DECODEBIT (pctxt, &pvalue->replacementFeatureSet);
9861 if (stat != ASN_OK) return stat;
9862 invokeBoolValue (pctxt, pvalue->replacementFeatureSet);
9863
9864 invokeEndElement (pctxt, "replacementFeatureSet", -1);
9865
9866 /* decode neededFeatures */
9867
9868 if (pvalue->m.neededFeaturesPresent) {
9869 invokeStartElement (pctxt, "neededFeatures", -1);
9870
9871 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->neededFeatures);
9872 if (stat != ASN_OK) return stat;
9873
9874 invokeEndElement (pctxt, "neededFeatures", -1);
9875 }
9876
9877 /* decode desiredFeatures */
9878
9879 if (pvalue->m.desiredFeaturesPresent) {
9880 invokeStartElement (pctxt, "desiredFeatures", -1);
9881
9882 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->desiredFeatures);
9883 if (stat != ASN_OK) return stat;
9884
9885 invokeEndElement (pctxt, "desiredFeatures", -1);
9886 }
9887
9888 /* decode supportedFeatures */
9889
9890 if (pvalue->m.supportedFeaturesPresent) {
9891 invokeStartElement (pctxt, "supportedFeatures", -1);
9892
9893 stat = asn1PD_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->supportedFeatures);
9894 if (stat != ASN_OK) return stat;
9895
9896 invokeEndElement (pctxt, "supportedFeatures", -1);
9897 }
9898
9899 if (extbit) {
9900
9901 /* decode extension optional bits length */
9902
9903 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
9904 if (stat != ASN_OK) return stat;
9905
9906 bitcnt += 1;
9907
9908 ZEROCONTEXT (&lctxt);
9909 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
9910 if (stat != ASN_OK) return stat;
9911
9912 stat = moveBitCursor (pctxt, bitcnt);
9913 if (stat != ASN_OK) return stat;
9914
9915 for (i = 0; i < bitcnt; i++) {
9916 DECODEBIT (&lctxt, &optbit);
9917
9918 if (optbit) {
9919 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
9920 if (stat != ASN_OK) return stat;
9921
9922 pctxt->buffer.byteIndex += openType.numocts;
9923 }
9924 }
9925 }
9926
9927 return (stat);
9928 }
9929
9930 /**************************************************************/
9931 /* */
9932 /* CallProceeding_UUIE */
9933 /* */
9934 /**************************************************************/
9935
9936 EXTERN int asn1PD_H225CallProceeding_UUIE (OOCTXT* pctxt, H225CallProceeding_UUIE* pvalue)
9937 {
9938 int stat = ASN_OK;
9939 OOCTXT lctxt;
9940 OOCTXT lctxt2;
9941 ASN1OpenType openType;
9942 ASN1UINT bitcnt;
9943 ASN1UINT i;
9944 ASN1BOOL optbit = 0;
9945 ASN1BOOL extbit = 0;
9946
9947 /* extension bit */
9948
9949 DECODEBIT (pctxt, &extbit);
9950
9951 /* optional bits */
9952
9953 memset (&pvalue->m, 0, sizeof(pvalue->m));
9954
9955 DECODEBIT (pctxt, &optbit);
9956 pvalue->m.h245AddressPresent = optbit;
9957
9958 /* decode protocolIdentifier */
9959
9960 invokeStartElement (pctxt, "protocolIdentifier", -1);
9961
9962 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9963 if (stat != ASN_OK) return stat;
9964
9965 invokeEndElement (pctxt, "protocolIdentifier", -1);
9966
9967 /* decode destinationInfo */
9968
9969 invokeStartElement (pctxt, "destinationInfo", -1);
9970
9971 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationInfo);
9972 if (stat != ASN_OK) return stat;
9973
9974 invokeEndElement (pctxt, "destinationInfo", -1);
9975
9976 /* decode h245Address */
9977
9978 if (pvalue->m.h245AddressPresent) {
9979 invokeStartElement (pctxt, "h245Address", -1);
9980
9981 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
9982 if (stat != ASN_OK) return stat;
9983
9984 invokeEndElement (pctxt, "h245Address", -1);
9985 }
9986
9987 if (extbit) {
9988
9989 /* decode extension optional bits length */
9990
9991 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
9992 if (stat != ASN_OK) return stat;
9993
9994 bitcnt += 1;
9995
9996 ZEROCONTEXT (&lctxt);
9997 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
9998 if (stat != ASN_OK) return stat;
9999
10000 stat = moveBitCursor (pctxt, bitcnt);
10001 if (stat != ASN_OK) return stat;
10002
10003 for (i = 0; i < bitcnt; i++) {
10004 DECODEBIT (&lctxt, &optbit);
10005
10006 if (optbit) {
10007 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
10008 if (stat != ASN_OK) return stat;
10009
10010 if (i < 9 && openType.numocts > 0) { /* known element */
10011 copyContext (&lctxt2, pctxt);
10012 initContextBuffer (pctxt, openType.data, openType.numocts);
10013
10014 switch (i) {
10015 case 0:
10016 pvalue->m.callIdentifierPresent = 1;
10017
10018 invokeStartElement (pctxt, "callIdentifier", -1);
10019
10020 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
10021 if (stat != ASN_OK) return stat;
10022
10023 invokeEndElement (pctxt, "callIdentifier", -1);
10024 break;
10025
10026 case 1:
10027 pvalue->m.h245SecurityModePresent = 1;
10028
10029 invokeStartElement (pctxt, "h245SecurityMode", -1);
10030
10031 stat = asn1PD_H225H245Security (pctxt, &pvalue->h245SecurityMode);
10032 if (stat != ASN_OK) return stat;
10033
10034 invokeEndElement (pctxt, "h245SecurityMode", -1);
10035 break;
10036
10037 case 2:
10038 pvalue->m.tokensPresent = 1;
10039
10040 invokeStartElement (pctxt, "tokens", -1);
10041
10042 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
10043 if (stat != ASN_OK) return stat;
10044
10045 invokeEndElement (pctxt, "tokens", -1);
10046 break;
10047
10048 case 3:
10049 pvalue->m.cryptoTokensPresent = 1;
10050
10051 invokeStartElement (pctxt, "cryptoTokens", -1);
10052
10053 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
10054 if (stat != ASN_OK) return stat;
10055
10056 invokeEndElement (pctxt, "cryptoTokens", -1);
10057 break;
10058
10059 case 4:
10060 pvalue->m.fastStartPresent = 1;
10061
10062 invokeStartElement (pctxt, "fastStart", -1);
10063
10064 stat = asn1PD_H225CallProceeding_UUIE_fastStart (pctxt, &pvalue->fastStart);
10065 if (stat != ASN_OK) return stat;
10066
10067 invokeEndElement (pctxt, "fastStart", -1);
10068 break;
10069
10070 case 5:
10071 pvalue->m.multipleCallsPresent = 1;
10072
10073 invokeStartElement (pctxt, "multipleCalls", -1);
10074
10075 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
10076 if (stat != ASN_OK) return stat;
10077 invokeBoolValue (pctxt, pvalue->multipleCalls);
10078
10079 invokeEndElement (pctxt, "multipleCalls", -1);
10080 break;
10081
10082 case 6:
10083 pvalue->m.maintainConnectionPresent = 1;
10084
10085 invokeStartElement (pctxt, "maintainConnection", -1);
10086
10087 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
10088 if (stat != ASN_OK) return stat;
10089 invokeBoolValue (pctxt, pvalue->maintainConnection);
10090
10091 invokeEndElement (pctxt, "maintainConnection", -1);
10092 break;
10093
10094 case 7:
10095 pvalue->m.fastConnectRefusedPresent = 1;
10096
10097 invokeStartElement (pctxt, "fastConnectRefused", -1);
10098
10099 /* NULL */
10100 invokeNullValue (pctxt);
10101
10102 invokeEndElement (pctxt, "fastConnectRefused", -1);
10103 break;
10104
10105 case 8:
10106 pvalue->m.featureSetPresent = 1;
10107
10108 invokeStartElement (pctxt, "featureSet", -1);
10109
10110 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
10111 if (stat != ASN_OK) return stat;
10112
10113 invokeEndElement (pctxt, "featureSet", -1);
10114 break;
10115
10116 default:
10117 pctxt->buffer.byteIndex += openType.numocts;
10118 }
10119 copyContext (pctxt, &lctxt2);
10120 }
10121 else { /* unknown element */
10122 pctxt->buffer.byteIndex += openType.numocts;
10123 }
10124 }
10125 }
10126 }
10127
10128 return (stat);
10129 }
10130
10131 /**************************************************************/
10132 /* */
10133 /* Connect_UUIE_fastStart */
10134 /* */
10135 /**************************************************************/
10136
10137 EXTERN int asn1PD_H225Connect_UUIE_fastStart (OOCTXT* pctxt, H225Connect_UUIE_fastStart* pvalue)
10138 {
10139 int stat = ASN_OK;
10140 ASN1UINT xx1;
10141
10142 /* decode length determinant */
10143
10144 stat = decodeLength (pctxt, &pvalue->n);
10145 if (stat != ASN_OK) return stat;
10146
10147 /* decode elements */
10148
10149 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
10150
10151 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10152 invokeStartElement (pctxt, "elem", xx1);
10153
10154 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
10155 if (stat != ASN_OK) return stat;
10156 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10157 invokeEndElement (pctxt, "elem", xx1);
10158
10159 }
10160
10161 return (stat);
10162 }
10163
10164 /**************************************************************/
10165 /* */
10166 /* Connect_UUIE_language */
10167 /* */
10168 /**************************************************************/
10169
10170 EXTERN int asn1PD_H225Connect_UUIE_language (OOCTXT* pctxt, H225Connect_UUIE_language* pvalue)
10171 {
10172 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
10173 int stat = ASN_OK;
10174 ASN1UINT xx1;
10175
10176 /* decode length determinant */
10177
10178 stat = decodeLength (pctxt, &pvalue->n);
10179 if (stat != ASN_OK) return stat;
10180
10181 /* decode elements */
10182
10183 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1IA5String);
10184
10185 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10186 invokeStartElement (pctxt, "elem", xx1);
10187
10188 addSizeConstraint (pctxt, &element_lsize1);
10189
10190 stat = decodeConstrainedStringEx (pctxt, &pvalue->elem[xx1], 0, 8, 7, 7);
10191 if (stat != ASN_OK) return stat;
10192 invokeCharStrValue (pctxt, pvalue->elem[xx1]);
10193 invokeEndElement (pctxt, "elem", xx1);
10194
10195 }
10196
10197 return (stat);
10198 }
10199
10200 /**************************************************************/
10201 /* */
10202 /* Connect_UUIE */
10203 /* */
10204 /**************************************************************/
10205
10206 EXTERN int asn1PD_H225Connect_UUIE (OOCTXT* pctxt, H225Connect_UUIE* pvalue)
10207 {
10208 int stat = ASN_OK;
10209 OOCTXT lctxt;
10210 OOCTXT lctxt2;
10211 ASN1OpenType openType;
10212 ASN1UINT bitcnt;
10213 ASN1UINT i;
10214 ASN1BOOL optbit = 0;
10215 ASN1BOOL extbit = 0;
10216
10217 /* extension bit */
10218
10219 DECODEBIT (pctxt, &extbit);
10220
10221 /* optional bits */
10222
10223 memset (&pvalue->m, 0, sizeof(pvalue->m));
10224
10225 DECODEBIT (pctxt, &optbit);
10226 pvalue->m.h245AddressPresent = optbit;
10227
10228 /* decode protocolIdentifier */
10229
10230 invokeStartElement (pctxt, "protocolIdentifier", -1);
10231
10232 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
10233 if (stat != ASN_OK) return stat;
10234
10235 invokeEndElement (pctxt, "protocolIdentifier", -1);
10236
10237 /* decode h245Address */
10238
10239 if (pvalue->m.h245AddressPresent) {
10240 invokeStartElement (pctxt, "h245Address", -1);
10241
10242 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
10243 if (stat != ASN_OK) return stat;
10244
10245 invokeEndElement (pctxt, "h245Address", -1);
10246 }
10247
10248 /* decode destinationInfo */
10249
10250 invokeStartElement (pctxt, "destinationInfo", -1);
10251
10252 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationInfo);
10253 if (stat != ASN_OK) return stat;
10254
10255 invokeEndElement (pctxt, "destinationInfo", -1);
10256
10257 /* decode conferenceID */
10258
10259 invokeStartElement (pctxt, "conferenceID", -1);
10260
10261 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
10262 if (stat != ASN_OK) return stat;
10263
10264 invokeEndElement (pctxt, "conferenceID", -1);
10265
10266 if (extbit) {
10267
10268 /* decode extension optional bits length */
10269
10270 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
10271 if (stat != ASN_OK) return stat;
10272
10273 bitcnt += 1;
10274
10275 ZEROCONTEXT (&lctxt);
10276 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
10277 if (stat != ASN_OK) return stat;
10278
10279 stat = moveBitCursor (pctxt, bitcnt);
10280 if (stat != ASN_OK) return stat;
10281
10282 for (i = 0; i < bitcnt; i++) {
10283 DECODEBIT (&lctxt, &optbit);
10284
10285 if (optbit) {
10286 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
10287 if (stat != ASN_OK) return stat;
10288
10289 if (i < 15 && openType.numocts > 0) { /* known element */
10290 copyContext (&lctxt2, pctxt);
10291 initContextBuffer (pctxt, openType.data, openType.numocts);
10292
10293 switch (i) {
10294 case 0:
10295 pvalue->m.callIdentifierPresent = 1;
10296
10297 invokeStartElement (pctxt, "callIdentifier", -1);
10298
10299 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
10300 if (stat != ASN_OK) return stat;
10301
10302 invokeEndElement (pctxt, "callIdentifier", -1);
10303 break;
10304
10305 case 1:
10306 pvalue->m.h245SecurityModePresent = 1;
10307
10308 invokeStartElement (pctxt, "h245SecurityMode", -1);
10309
10310 stat = asn1PD_H225H245Security (pctxt, &pvalue->h245SecurityMode);
10311 if (stat != ASN_OK) return stat;
10312
10313 invokeEndElement (pctxt, "h245SecurityMode", -1);
10314 break;
10315
10316 case 2:
10317 pvalue->m.tokensPresent = 1;
10318
10319 invokeStartElement (pctxt, "tokens", -1);
10320
10321 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
10322 if (stat != ASN_OK) return stat;
10323
10324 invokeEndElement (pctxt, "tokens", -1);
10325 break;
10326
10327 case 3:
10328 pvalue->m.cryptoTokensPresent = 1;
10329
10330 invokeStartElement (pctxt, "cryptoTokens", -1);
10331
10332 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
10333 if (stat != ASN_OK) return stat;
10334
10335 invokeEndElement (pctxt, "cryptoTokens", -1);
10336 break;
10337
10338 case 4:
10339 pvalue->m.fastStartPresent = 1;
10340
10341 invokeStartElement (pctxt, "fastStart", -1);
10342
10343 stat = asn1PD_H225Connect_UUIE_fastStart (pctxt, &pvalue->fastStart);
10344 if (stat != ASN_OK) return stat;
10345
10346 invokeEndElement (pctxt, "fastStart", -1);
10347 break;
10348
10349 case 5:
10350 pvalue->m.multipleCallsPresent = 1;
10351
10352 invokeStartElement (pctxt, "multipleCalls", -1);
10353
10354 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
10355 if (stat != ASN_OK) return stat;
10356 invokeBoolValue (pctxt, pvalue->multipleCalls);
10357
10358 invokeEndElement (pctxt, "multipleCalls", -1);
10359 break;
10360
10361 case 6:
10362 pvalue->m.maintainConnectionPresent = 1;
10363
10364 invokeStartElement (pctxt, "maintainConnection", -1);
10365
10366 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
10367 if (stat != ASN_OK) return stat;
10368 invokeBoolValue (pctxt, pvalue->maintainConnection);
10369
10370 invokeEndElement (pctxt, "maintainConnection", -1);
10371 break;
10372
10373 case 7:
10374 pvalue->m.languagePresent = 1;
10375
10376 invokeStartElement (pctxt, "language", -1);
10377
10378 stat = asn1PD_H225Connect_UUIE_language (pctxt, &pvalue->language);
10379 if (stat != ASN_OK) return stat;
10380
10381 invokeEndElement (pctxt, "language", -1);
10382 break;
10383
10384 case 8:
10385 pvalue->m.connectedAddressPresent = 1;
10386
10387 invokeStartElement (pctxt, "connectedAddress", -1);
10388
10389 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->connectedAddress);
10390 if (stat != ASN_OK) return stat;
10391
10392 invokeEndElement (pctxt, "connectedAddress", -1);
10393 break;
10394
10395 case 9:
10396 pvalue->m.presentationIndicatorPresent = 1;
10397
10398 invokeStartElement (pctxt, "presentationIndicator", -1);
10399
10400 stat = asn1PD_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
10401 if (stat != ASN_OK) return stat;
10402
10403 invokeEndElement (pctxt, "presentationIndicator", -1);
10404 break;
10405
10406 case 10:
10407 pvalue->m.screeningIndicatorPresent = 1;
10408
10409 invokeStartElement (pctxt, "screeningIndicator", -1);
10410
10411 stat = asn1PD_H225ScreeningIndicator (pctxt, &pvalue->screeningIndicator);
10412 if (stat != ASN_OK) return stat;
10413
10414 invokeEndElement (pctxt, "screeningIndicator", -1);
10415 break;
10416
10417 case 11:
10418 pvalue->m.fastConnectRefusedPresent = 1;
10419
10420 invokeStartElement (pctxt, "fastConnectRefused", -1);
10421
10422 /* NULL */
10423 invokeNullValue (pctxt);
10424
10425 invokeEndElement (pctxt, "fastConnectRefused", -1);
10426 break;
10427
10428 case 12:
10429 pvalue->m.serviceControlPresent = 1;
10430
10431 invokeStartElement (pctxt, "serviceControl", -1);
10432
10433 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
10434 if (stat != ASN_OK) return stat;
10435
10436 invokeEndElement (pctxt, "serviceControl", -1);
10437 break;
10438
10439 case 13:
10440 pvalue->m.capacityPresent = 1;
10441
10442 invokeStartElement (pctxt, "capacity", -1);
10443
10444 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
10445 if (stat != ASN_OK) return stat;
10446
10447 invokeEndElement (pctxt, "capacity", -1);
10448 break;
10449
10450 case 14:
10451 pvalue->m.featureSetPresent = 1;
10452
10453 invokeStartElement (pctxt, "featureSet", -1);
10454
10455 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
10456 if (stat != ASN_OK) return stat;
10457
10458 invokeEndElement (pctxt, "featureSet", -1);
10459 break;
10460
10461 default:
10462 pctxt->buffer.byteIndex += openType.numocts;
10463 }
10464 copyContext (pctxt, &lctxt2);
10465 }
10466 else { /* unknown element */
10467 pctxt->buffer.byteIndex += openType.numocts;
10468 }
10469 }
10470 }
10471 }
10472
10473 return (stat);
10474 }
10475
10476 /**************************************************************/
10477 /* */
10478 /* Alerting_UUIE_fastStart */
10479 /* */
10480 /**************************************************************/
10481
10482 EXTERN int asn1PD_H225Alerting_UUIE_fastStart (OOCTXT* pctxt, H225Alerting_UUIE_fastStart* pvalue)
10483 {
10484 int stat = ASN_OK;
10485 ASN1UINT xx1;
10486
10487 /* decode length determinant */
10488
10489 stat = decodeLength (pctxt, &pvalue->n);
10490 if (stat != ASN_OK) return stat;
10491
10492 /* decode elements */
10493
10494 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
10495
10496 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10497 invokeStartElement (pctxt, "elem", xx1);
10498
10499 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
10500 if (stat != ASN_OK) return stat;
10501 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10502 invokeEndElement (pctxt, "elem", xx1);
10503
10504 }
10505
10506 return (stat);
10507 }
10508
10509 /**************************************************************/
10510 /* */
10511 /* Alerting_UUIE */
10512 /* */
10513 /**************************************************************/
10514
10515 EXTERN int asn1PD_H225Alerting_UUIE (OOCTXT* pctxt, H225Alerting_UUIE* pvalue)
10516 {
10517 int stat = ASN_OK;
10518 OOCTXT lctxt;
10519 OOCTXT lctxt2;
10520 ASN1OpenType openType;
10521 ASN1UINT bitcnt;
10522 ASN1UINT i;
10523 ASN1BOOL optbit = 0;
10524 ASN1BOOL extbit = 0;
10525
10526 /* extension bit */
10527
10528 DECODEBIT (pctxt, &extbit);
10529
10530 /* optional bits */
10531
10532 memset (&pvalue->m, 0, sizeof(pvalue->m));
10533
10534 DECODEBIT (pctxt, &optbit);
10535 pvalue->m.h245AddressPresent = optbit;
10536
10537 /* decode protocolIdentifier */
10538
10539 invokeStartElement (pctxt, "protocolIdentifier", -1);
10540
10541 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
10542 if (stat != ASN_OK) return stat;
10543
10544 invokeEndElement (pctxt, "protocolIdentifier", -1);
10545
10546 /* decode destinationInfo */
10547
10548 invokeStartElement (pctxt, "destinationInfo", -1);
10549
10550 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationInfo);
10551 if (stat != ASN_OK) return stat;
10552
10553 invokeEndElement (pctxt, "destinationInfo", -1);
10554
10555 /* decode h245Address */
10556
10557 if (pvalue->m.h245AddressPresent) {
10558 invokeStartElement (pctxt, "h245Address", -1);
10559
10560 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
10561 if (stat != ASN_OK) return stat;
10562
10563 invokeEndElement (pctxt, "h245Address", -1);
10564 }
10565
10566 if (extbit) {
10567
10568 /* decode extension optional bits length */
10569
10570 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
10571 if (stat != ASN_OK) return stat;
10572
10573 bitcnt += 1;
10574
10575 ZEROCONTEXT (&lctxt);
10576 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
10577 if (stat != ASN_OK) return stat;
10578
10579 stat = moveBitCursor (pctxt, bitcnt);
10580 if (stat != ASN_OK) return stat;
10581
10582 for (i = 0; i < bitcnt; i++) {
10583 DECODEBIT (&lctxt, &optbit);
10584
10585 if (optbit) {
10586 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
10587 if (stat != ASN_OK) return stat;
10588
10589 if (i < 14 && openType.numocts > 0) { /* known element */
10590 copyContext (&lctxt2, pctxt);
10591 initContextBuffer (pctxt, openType.data, openType.numocts);
10592
10593 switch (i) {
10594 case 0:
10595 pvalue->m.callIdentifierPresent = 1;
10596
10597 invokeStartElement (pctxt, "callIdentifier", -1);
10598
10599 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
10600 if (stat != ASN_OK) return stat;
10601
10602 invokeEndElement (pctxt, "callIdentifier", -1);
10603 break;
10604
10605 case 1:
10606 pvalue->m.h245SecurityModePresent = 1;
10607
10608 invokeStartElement (pctxt, "h245SecurityMode", -1);
10609
10610 stat = asn1PD_H225H245Security (pctxt, &pvalue->h245SecurityMode);
10611 if (stat != ASN_OK) return stat;
10612
10613 invokeEndElement (pctxt, "h245SecurityMode", -1);
10614 break;
10615
10616 case 2:
10617 pvalue->m.tokensPresent = 1;
10618
10619 invokeStartElement (pctxt, "tokens", -1);
10620
10621 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
10622 if (stat != ASN_OK) return stat;
10623
10624 invokeEndElement (pctxt, "tokens", -1);
10625 break;
10626
10627 case 3:
10628 pvalue->m.cryptoTokensPresent = 1;
10629
10630 invokeStartElement (pctxt, "cryptoTokens", -1);
10631
10632 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
10633 if (stat != ASN_OK) return stat;
10634
10635 invokeEndElement (pctxt, "cryptoTokens", -1);
10636 break;
10637
10638 case 4:
10639 pvalue->m.fastStartPresent = 1;
10640
10641 invokeStartElement (pctxt, "fastStart", -1);
10642
10643 stat = asn1PD_H225Alerting_UUIE_fastStart (pctxt, &pvalue->fastStart);
10644 if (stat != ASN_OK) return stat;
10645
10646 invokeEndElement (pctxt, "fastStart", -1);
10647 break;
10648
10649 case 5:
10650 pvalue->m.multipleCallsPresent = 1;
10651
10652 invokeStartElement (pctxt, "multipleCalls", -1);
10653
10654 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
10655 if (stat != ASN_OK) return stat;
10656 invokeBoolValue (pctxt, pvalue->multipleCalls);
10657
10658 invokeEndElement (pctxt, "multipleCalls", -1);
10659 break;
10660
10661 case 6:
10662 pvalue->m.maintainConnectionPresent = 1;
10663
10664 invokeStartElement (pctxt, "maintainConnection", -1);
10665
10666 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
10667 if (stat != ASN_OK) return stat;
10668 invokeBoolValue (pctxt, pvalue->maintainConnection);
10669
10670 invokeEndElement (pctxt, "maintainConnection", -1);
10671 break;
10672
10673 case 7:
10674 pvalue->m.alertingAddressPresent = 1;
10675
10676 invokeStartElement (pctxt, "alertingAddress", -1);
10677
10678 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->alertingAddress);
10679 if (stat != ASN_OK) return stat;
10680
10681 invokeEndElement (pctxt, "alertingAddress", -1);
10682 break;
10683
10684 case 8:
10685 pvalue->m.presentationIndicatorPresent = 1;
10686
10687 invokeStartElement (pctxt, "presentationIndicator", -1);
10688
10689 stat = asn1PD_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
10690 if (stat != ASN_OK) return stat;
10691
10692 invokeEndElement (pctxt, "presentationIndicator", -1);
10693 break;
10694
10695 case 9:
10696 pvalue->m.screeningIndicatorPresent = 1;
10697
10698 invokeStartElement (pctxt, "screeningIndicator", -1);
10699
10700 stat = asn1PD_H225ScreeningIndicator (pctxt, &pvalue->screeningIndicator);
10701 if (stat != ASN_OK) return stat;
10702
10703 invokeEndElement (pctxt, "screeningIndicator", -1);
10704 break;
10705
10706 case 10:
10707 pvalue->m.fastConnectRefusedPresent = 1;
10708
10709 invokeStartElement (pctxt, "fastConnectRefused", -1);
10710
10711 /* NULL */
10712 invokeNullValue (pctxt);
10713
10714 invokeEndElement (pctxt, "fastConnectRefused", -1);
10715 break;
10716
10717 case 11:
10718 pvalue->m.serviceControlPresent = 1;
10719
10720 invokeStartElement (pctxt, "serviceControl", -1);
10721
10722 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
10723 if (stat != ASN_OK) return stat;
10724
10725 invokeEndElement (pctxt, "serviceControl", -1);
10726 break;
10727
10728 case 12:
10729 pvalue->m.capacityPresent = 1;
10730
10731 invokeStartElement (pctxt, "capacity", -1);
10732
10733 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
10734 if (stat != ASN_OK) return stat;
10735
10736 invokeEndElement (pctxt, "capacity", -1);
10737 break;
10738
10739 case 13:
10740 pvalue->m.featureSetPresent = 1;
10741
10742 invokeStartElement (pctxt, "featureSet", -1);
10743
10744 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
10745 if (stat != ASN_OK) return stat;
10746
10747 invokeEndElement (pctxt, "featureSet", -1);
10748 break;
10749
10750 default:
10751 pctxt->buffer.byteIndex += openType.numocts;
10752 }
10753 copyContext (pctxt, &lctxt2);
10754 }
10755 else { /* unknown element */
10756 pctxt->buffer.byteIndex += openType.numocts;
10757 }
10758 }
10759 }
10760 }
10761
10762 return (stat);
10763 }
10764
10765 /**************************************************************/
10766 /* */
10767 /* Information_UUIE_fastStart */
10768 /* */
10769 /**************************************************************/
10770
10771 EXTERN int asn1PD_H225Information_UUIE_fastStart (OOCTXT* pctxt, H225Information_UUIE_fastStart* pvalue)
10772 {
10773 int stat = ASN_OK;
10774 ASN1UINT xx1;
10775
10776 /* decode length determinant */
10777
10778 stat = decodeLength (pctxt, &pvalue->n);
10779 if (stat != ASN_OK) return stat;
10780
10781 /* decode elements */
10782
10783 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
10784
10785 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10786 invokeStartElement (pctxt, "elem", xx1);
10787
10788 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
10789 if (stat != ASN_OK) return stat;
10790 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10791 invokeEndElement (pctxt, "elem", xx1);
10792
10793 }
10794
10795 return (stat);
10796 }
10797
10798 /**************************************************************/
10799 /* */
10800 /* Information_UUIE */
10801 /* */
10802 /**************************************************************/
10803
10804 EXTERN int asn1PD_H225Information_UUIE (OOCTXT* pctxt, H225Information_UUIE* pvalue)
10805 {
10806 int stat = ASN_OK;
10807 OOCTXT lctxt;
10808 OOCTXT lctxt2;
10809 ASN1OpenType openType;
10810 ASN1UINT bitcnt;
10811 ASN1UINT i;
10812 ASN1BOOL optbit = 0;
10813 ASN1BOOL extbit = 0;
10814
10815 /* extension bit */
10816
10817 DECODEBIT (pctxt, &extbit);
10818
10819 /* optional bits */
10820
10821 memset (&pvalue->m, 0, sizeof(pvalue->m));
10822
10823 /* decode protocolIdentifier */
10824
10825 invokeStartElement (pctxt, "protocolIdentifier", -1);
10826
10827 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
10828 if (stat != ASN_OK) return stat;
10829
10830 invokeEndElement (pctxt, "protocolIdentifier", -1);
10831
10832 if (extbit) {
10833
10834 /* decode extension optional bits length */
10835
10836 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
10837 if (stat != ASN_OK) return stat;
10838
10839 bitcnt += 1;
10840
10841 ZEROCONTEXT (&lctxt);
10842 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
10843 if (stat != ASN_OK) return stat;
10844
10845 stat = moveBitCursor (pctxt, bitcnt);
10846 if (stat != ASN_OK) return stat;
10847
10848 for (i = 0; i < bitcnt; i++) {
10849 DECODEBIT (&lctxt, &optbit);
10850
10851 if (optbit) {
10852 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
10853 if (stat != ASN_OK) return stat;
10854
10855 if (i < 6 && openType.numocts > 0) { /* known element */
10856 copyContext (&lctxt2, pctxt);
10857 initContextBuffer (pctxt, openType.data, openType.numocts);
10858
10859 switch (i) {
10860 case 0:
10861 pvalue->m.callIdentifierPresent = 1;
10862
10863 invokeStartElement (pctxt, "callIdentifier", -1);
10864
10865 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
10866 if (stat != ASN_OK) return stat;
10867
10868 invokeEndElement (pctxt, "callIdentifier", -1);
10869 break;
10870
10871 case 1:
10872 pvalue->m.tokensPresent = 1;
10873
10874 invokeStartElement (pctxt, "tokens", -1);
10875
10876 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
10877 if (stat != ASN_OK) return stat;
10878
10879 invokeEndElement (pctxt, "tokens", -1);
10880 break;
10881
10882 case 2:
10883 pvalue->m.cryptoTokensPresent = 1;
10884
10885 invokeStartElement (pctxt, "cryptoTokens", -1);
10886
10887 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
10888 if (stat != ASN_OK) return stat;
10889
10890 invokeEndElement (pctxt, "cryptoTokens", -1);
10891 break;
10892
10893 case 3:
10894 pvalue->m.fastStartPresent = 1;
10895
10896 invokeStartElement (pctxt, "fastStart", -1);
10897
10898 stat = asn1PD_H225Information_UUIE_fastStart (pctxt, &pvalue->fastStart);
10899 if (stat != ASN_OK) return stat;
10900
10901 invokeEndElement (pctxt, "fastStart", -1);
10902 break;
10903
10904 case 4:
10905 pvalue->m.fastConnectRefusedPresent = 1;
10906
10907 invokeStartElement (pctxt, "fastConnectRefused", -1);
10908
10909 /* NULL */
10910 invokeNullValue (pctxt);
10911
10912 invokeEndElement (pctxt, "fastConnectRefused", -1);
10913 break;
10914
10915 case 5:
10916 pvalue->m.circuitInfoPresent = 1;
10917
10918 invokeStartElement (pctxt, "circuitInfo", -1);
10919
10920 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
10921 if (stat != ASN_OK) return stat;
10922
10923 invokeEndElement (pctxt, "circuitInfo", -1);
10924 break;
10925
10926 default:
10927 pctxt->buffer.byteIndex += openType.numocts;
10928 }
10929 copyContext (pctxt, &lctxt2);
10930 }
10931 else { /* unknown element */
10932 pctxt->buffer.byteIndex += openType.numocts;
10933 }
10934 }
10935 }
10936 }
10937
10938 return (stat);
10939 }
10940
10941 /**************************************************************/
10942 /* */
10943 /* SecurityErrors */
10944 /* */
10945 /**************************************************************/
10946
10947 EXTERN int asn1PD_H225SecurityErrors (OOCTXT* pctxt, H225SecurityErrors* pvalue)
10948 {
10949 int stat = ASN_OK;
10950 ASN1UINT ui;
10951 ASN1OpenType openType;
10952 ASN1BOOL extbit = 0;
10953
10954 /* extension bit */
10955
10956 DECODEBIT (pctxt, &extbit);
10957
10958 if (!extbit) {
10959 stat = decodeConsUnsigned (pctxt, &ui, 0, 15);
10960 if (stat != ASN_OK) return stat;
10961 else pvalue->t = ui + 1;
10962
10963 switch (ui) {
10964 /* securityWrongSyncTime */
10965 case 0:
10966 invokeStartElement (pctxt, "securityWrongSyncTime", -1);
10967
10968 /* NULL */
10969 invokeNullValue (pctxt);
10970
10971 invokeEndElement (pctxt, "securityWrongSyncTime", -1);
10972
10973 break;
10974
10975 /* securityReplay */
10976 case 1:
10977 invokeStartElement (pctxt, "securityReplay", -1);
10978
10979 /* NULL */
10980 invokeNullValue (pctxt);
10981
10982 invokeEndElement (pctxt, "securityReplay", -1);
10983
10984 break;
10985
10986 /* securityWrongGeneralID */
10987 case 2:
10988 invokeStartElement (pctxt, "securityWrongGeneralID", -1);
10989
10990 /* NULL */
10991 invokeNullValue (pctxt);
10992
10993 invokeEndElement (pctxt, "securityWrongGeneralID", -1);
10994
10995 break;
10996
10997 /* securityWrongSendersID */
10998 case 3:
10999 invokeStartElement (pctxt, "securityWrongSendersID", -1);
11000
11001 /* NULL */
11002 invokeNullValue (pctxt);
11003
11004 invokeEndElement (pctxt, "securityWrongSendersID", -1);
11005
11006 break;
11007
11008 /* securityIntegrityFailed */
11009 case 4:
11010 invokeStartElement (pctxt, "securityIntegrityFailed", -1);
11011
11012 /* NULL */
11013 invokeNullValue (pctxt);
11014
11015 invokeEndElement (pctxt, "securityIntegrityFailed", -1);
11016
11017 break;
11018
11019 /* securityWrongOID */
11020 case 5:
11021 invokeStartElement (pctxt, "securityWrongOID", -1);
11022
11023 /* NULL */
11024 invokeNullValue (pctxt);
11025
11026 invokeEndElement (pctxt, "securityWrongOID", -1);
11027
11028 break;
11029
11030 /* securityDHmismatch */
11031 case 6:
11032 invokeStartElement (pctxt, "securityDHmismatch", -1);
11033
11034 /* NULL */
11035 invokeNullValue (pctxt);
11036
11037 invokeEndElement (pctxt, "securityDHmismatch", -1);
11038
11039 break;
11040
11041 /* securityCertificateExpired */
11042 case 7:
11043 invokeStartElement (pctxt, "securityCertificateExpired", -1);
11044
11045 /* NULL */
11046 invokeNullValue (pctxt);
11047
11048 invokeEndElement (pctxt, "securityCertificateExpired", -1);
11049
11050 break;
11051
11052 /* securityCertificateDateInvalid */
11053 case 8:
11054 invokeStartElement (pctxt, "securityCertificateDateInvalid", -1);
11055
11056 /* NULL */
11057 invokeNullValue (pctxt);
11058
11059 invokeEndElement (pctxt, "securityCertificateDateInvalid", -1);
11060
11061 break;
11062
11063 /* securityCertificateRevoked */
11064 case 9:
11065 invokeStartElement (pctxt, "securityCertificateRevoked", -1);
11066
11067 /* NULL */
11068 invokeNullValue (pctxt);
11069
11070 invokeEndElement (pctxt, "securityCertificateRevoked", -1);
11071
11072 break;
11073
11074 /* securityCertificateNotReadable */
11075 case 10:
11076 invokeStartElement (pctxt, "securityCertificateNotReadable", -1);
11077
11078 /* NULL */
11079 invokeNullValue (pctxt);
11080
11081 invokeEndElement (pctxt, "securityCertificateNotReadable", -1);
11082
11083 break;
11084
11085 /* securityCertificateSignatureInvalid */
11086 case 11:
11087 invokeStartElement (pctxt, "securityCertificateSignatureInvalid", -1);
11088
11089 /* NULL */
11090 invokeNullValue (pctxt);
11091
11092 invokeEndElement (pctxt, "securityCertificateSignatureInvalid", -1);
11093
11094 break;
11095
11096 /* securityCertificateMissing */
11097 case 12:
11098 invokeStartElement (pctxt, "securityCertificateMissing", -1);
11099
11100 /* NULL */
11101 invokeNullValue (pctxt);
11102
11103 invokeEndElement (pctxt, "securityCertificateMissing", -1);
11104
11105 break;
11106
11107 /* securityCertificateIncomplete */
11108 case 13:
11109 invokeStartElement (pctxt, "securityCertificateIncomplete", -1);
11110
11111 /* NULL */
11112 invokeNullValue (pctxt);
11113
11114 invokeEndElement (pctxt, "securityCertificateIncomplete", -1);
11115
11116 break;
11117
11118 /* securityUnsupportedCertificateAlgOID */
11119 case 14:
11120 invokeStartElement (pctxt, "securityUnsupportedCertificateAlgOID", -1);
11121
11122 /* NULL */
11123 invokeNullValue (pctxt);
11124
11125 invokeEndElement (pctxt, "securityUnsupportedCertificateAlgOID", -1);
11126
11127 break;
11128
11129 /* securityUnknownCA */
11130 case 15:
11131 invokeStartElement (pctxt, "securityUnknownCA", -1);
11132
11133 /* NULL */
11134 invokeNullValue (pctxt);
11135
11136 invokeEndElement (pctxt, "securityUnknownCA", -1);
11137
11138 break;
11139
11140 default:
11141 return ASN_E_INVOPT;
11142 }
11143 }
11144 else {
11145 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
11146 if (stat != ASN_OK) return stat;
11147 else pvalue->t = ui + 17;
11148
11149 stat = decodeByteAlign (pctxt);
11150 if (stat != ASN_OK) return stat;
11151
11152 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
11153 if (stat != ASN_OK) return stat;
11154
11155 }
11156
11157 return (stat);
11158 }
11159
11160 /**************************************************************/
11161 /* */
11162 /* ReleaseCompleteReason */
11163 /* */
11164 /**************************************************************/
11165
11166 EXTERN int asn1PD_H225ReleaseCompleteReason (OOCTXT* pctxt, H225ReleaseCompleteReason* pvalue)
11167 {
11168 int stat = ASN_OK;
11169 ASN1UINT ui;
11170 ASN1OpenType openType;
11171 ASN1BOOL extbit = 0;
11172 OOCTXT lctxt;
11173
11174 /* extension bit */
11175
11176 DECODEBIT (pctxt, &extbit);
11177
11178 if (!extbit) {
11179 stat = decodeConsUnsigned (pctxt, &ui, 0, 11);
11180 if (stat != ASN_OK) return stat;
11181 else pvalue->t = ui + 1;
11182
11183 switch (ui) {
11184 /* noBandwidth */
11185 case 0:
11186 invokeStartElement (pctxt, "noBandwidth", -1);
11187
11188 /* NULL */
11189 invokeNullValue (pctxt);
11190
11191 invokeEndElement (pctxt, "noBandwidth", -1);
11192
11193 break;
11194
11195 /* gatekeeperResources */
11196 case 1:
11197 invokeStartElement (pctxt, "gatekeeperResources", -1);
11198
11199 /* NULL */
11200 invokeNullValue (pctxt);
11201
11202 invokeEndElement (pctxt, "gatekeeperResources", -1);
11203
11204 break;
11205
11206 /* unreachableDestination */
11207 case 2:
11208 invokeStartElement (pctxt, "unreachableDestination", -1);
11209
11210 /* NULL */
11211 invokeNullValue (pctxt);
11212
11213 invokeEndElement (pctxt, "unreachableDestination", -1);
11214
11215 break;
11216
11217 /* destinationRejection */
11218 case 3:
11219 invokeStartElement (pctxt, "destinationRejection", -1);
11220
11221 /* NULL */
11222 invokeNullValue (pctxt);
11223
11224 invokeEndElement (pctxt, "destinationRejection", -1);
11225
11226 break;
11227
11228 /* invalidRevision */
11229 case 4:
11230 invokeStartElement (pctxt, "invalidRevision", -1);
11231
11232 /* NULL */
11233 invokeNullValue (pctxt);
11234
11235 invokeEndElement (pctxt, "invalidRevision", -1);
11236
11237 break;
11238
11239 /* noPermission */
11240 case 5:
11241 invokeStartElement (pctxt, "noPermission", -1);
11242
11243 /* NULL */
11244 invokeNullValue (pctxt);
11245
11246 invokeEndElement (pctxt, "noPermission", -1);
11247
11248 break;
11249
11250 /* unreachableGatekeeper */
11251 case 6:
11252 invokeStartElement (pctxt, "unreachableGatekeeper", -1);
11253
11254 /* NULL */
11255 invokeNullValue (pctxt);
11256
11257 invokeEndElement (pctxt, "unreachableGatekeeper", -1);
11258
11259 break;
11260
11261 /* gatewayResources */
11262 case 7:
11263 invokeStartElement (pctxt, "gatewayResources", -1);
11264
11265 /* NULL */
11266 invokeNullValue (pctxt);
11267
11268 invokeEndElement (pctxt, "gatewayResources", -1);
11269
11270 break;
11271
11272 /* badFormatAddress */
11273 case 8:
11274 invokeStartElement (pctxt, "badFormatAddress", -1);
11275
11276 /* NULL */
11277 invokeNullValue (pctxt);
11278
11279 invokeEndElement (pctxt, "badFormatAddress", -1);
11280
11281 break;
11282
11283 /* adaptiveBusy */
11284 case 9:
11285 invokeStartElement (pctxt, "adaptiveBusy", -1);
11286
11287 /* NULL */
11288 invokeNullValue (pctxt);
11289
11290 invokeEndElement (pctxt, "adaptiveBusy", -1);
11291
11292 break;
11293
11294 /* inConf */
11295 case 10:
11296 invokeStartElement (pctxt, "inConf", -1);
11297
11298 /* NULL */
11299 invokeNullValue (pctxt);
11300
11301 invokeEndElement (pctxt, "inConf", -1);
11302
11303 break;
11304
11305 /* undefinedReason */
11306 case 11:
11307 invokeStartElement (pctxt, "undefinedReason", -1);
11308
11309 /* NULL */
11310 invokeNullValue (pctxt);
11311
11312 invokeEndElement (pctxt, "undefinedReason", -1);
11313
11314 break;
11315
11316 default:
11317 return ASN_E_INVOPT;
11318 }
11319 }
11320 else {
11321 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
11322 if (stat != ASN_OK) return stat;
11323 else pvalue->t = ui + 13;
11324
11325 stat = decodeByteAlign (pctxt);
11326 if (stat != ASN_OK) return stat;
11327
11328 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
11329 if (stat != ASN_OK) return stat;
11330
11331 copyContext (&lctxt, pctxt);
11332 initContextBuffer (pctxt, openType.data, openType.numocts);
11333
11334 switch (pvalue->t) {
11335 /* facilityCallDeflection */
11336 case 13:
11337 invokeStartElement (pctxt, "facilityCallDeflection", -1);
11338
11339 /* NULL */
11340 invokeNullValue (pctxt);
11341
11342 invokeEndElement (pctxt, "facilityCallDeflection", -1);
11343
11344 break;
11345
11346 /* securityDenied */
11347 case 14:
11348 invokeStartElement (pctxt, "securityDenied", -1);
11349
11350 /* NULL */
11351 invokeNullValue (pctxt);
11352
11353 invokeEndElement (pctxt, "securityDenied", -1);
11354
11355 break;
11356
11357 /* calledPartyNotRegistered */
11358 case 15:
11359 invokeStartElement (pctxt, "calledPartyNotRegistered", -1);
11360
11361 /* NULL */
11362 invokeNullValue (pctxt);
11363
11364 invokeEndElement (pctxt, "calledPartyNotRegistered", -1);
11365
11366 break;
11367
11368 /* callerNotRegistered */
11369 case 16:
11370 invokeStartElement (pctxt, "callerNotRegistered", -1);
11371
11372 /* NULL */
11373 invokeNullValue (pctxt);
11374
11375 invokeEndElement (pctxt, "callerNotRegistered", -1);
11376
11377 break;
11378
11379 /* newConnectionNeeded */
11380 case 17:
11381 invokeStartElement (pctxt, "newConnectionNeeded", -1);
11382
11383 /* NULL */
11384 invokeNullValue (pctxt);
11385
11386 invokeEndElement (pctxt, "newConnectionNeeded", -1);
11387
11388 break;
11389
11390 /* nonStandardReason */
11391 case 18:
11392 invokeStartElement (pctxt, "nonStandardReason", -1);
11393
11394 pvalue->u.nonStandardReason = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
11395
11396 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandardReason);
11397 if (stat != ASN_OK) return stat;
11398
11399 invokeEndElement (pctxt, "nonStandardReason", -1);
11400
11401 break;
11402
11403 /* replaceWithConferenceInvite */
11404 case 19:
11405 invokeStartElement (pctxt, "replaceWithConferenceInvite", -1);
11406
11407 pvalue->u.replaceWithConferenceInvite = ALLOC_ASN1ELEM (pctxt, H225ConferenceIdentifier);
11408
11409 stat = asn1PD_H225ConferenceIdentifier (pctxt, pvalue->u.replaceWithConferenceInvite);
11410 if (stat != ASN_OK) return stat;
11411
11412 invokeEndElement (pctxt, "replaceWithConferenceInvite", -1);
11413
11414 break;
11415
11416 /* genericDataReason */
11417 case 20:
11418 invokeStartElement (pctxt, "genericDataReason", -1);
11419
11420 /* NULL */
11421 invokeNullValue (pctxt);
11422
11423 invokeEndElement (pctxt, "genericDataReason", -1);
11424
11425 break;
11426
11427 /* neededFeatureNotSupported */
11428 case 21:
11429 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
11430
11431 /* NULL */
11432 invokeNullValue (pctxt);
11433
11434 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
11435
11436 break;
11437
11438 /* tunnelledSignallingRejected */
11439 case 22:
11440 invokeStartElement (pctxt, "tunnelledSignallingRejected", -1);
11441
11442 /* NULL */
11443 invokeNullValue (pctxt);
11444
11445 invokeEndElement (pctxt, "tunnelledSignallingRejected", -1);
11446
11447 break;
11448
11449 /* invalidCID */
11450 case 23:
11451 invokeStartElement (pctxt, "invalidCID", -1);
11452
11453 /* NULL */
11454 invokeNullValue (pctxt);
11455
11456 invokeEndElement (pctxt, "invalidCID", -1);
11457
11458 break;
11459
11460 /* securityError */
11461 case 24:
11462 invokeStartElement (pctxt, "securityError", -1);
11463
11464 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors);
11465
11466 stat = asn1PD_H225SecurityErrors (pctxt, pvalue->u.securityError);
11467 if (stat != ASN_OK) return stat;
11468
11469 invokeEndElement (pctxt, "securityError", -1);
11470
11471 break;
11472
11473 /* hopCountExceeded */
11474 case 25:
11475 invokeStartElement (pctxt, "hopCountExceeded", -1);
11476
11477 /* NULL */
11478 invokeNullValue (pctxt);
11479
11480 invokeEndElement (pctxt, "hopCountExceeded", -1);
11481
11482 break;
11483
11484 default:;
11485 }
11486
11487 copyContext (pctxt, &lctxt);
11488 }
11489
11490 return (stat);
11491 }
11492
11493 /**************************************************************/
11494 /* */
11495 /* ReleaseComplete_UUIE */
11496 /* */
11497 /**************************************************************/
11498
11499 EXTERN int asn1PD_H225ReleaseComplete_UUIE (OOCTXT* pctxt, H225ReleaseComplete_UUIE* pvalue)
11500 {
11501 int stat = ASN_OK;
11502 OOCTXT lctxt;
11503 OOCTXT lctxt2;
11504 ASN1OpenType openType;
11505 ASN1UINT bitcnt;
11506 ASN1UINT i;
11507 ASN1BOOL optbit = 0;
11508 ASN1BOOL extbit = 0;
11509
11510 /* extension bit */
11511
11512 DECODEBIT (pctxt, &extbit);
11513
11514 /* optional bits */
11515
11516 memset (&pvalue->m, 0, sizeof(pvalue->m));
11517
11518 DECODEBIT (pctxt, &optbit);
11519 pvalue->m.reasonPresent = optbit;
11520
11521 /* decode protocolIdentifier */
11522
11523 invokeStartElement (pctxt, "protocolIdentifier", -1);
11524
11525 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
11526 if (stat != ASN_OK) return stat;
11527
11528 invokeEndElement (pctxt, "protocolIdentifier", -1);
11529
11530 /* decode reason */
11531
11532 if (pvalue->m.reasonPresent) {
11533 invokeStartElement (pctxt, "reason", -1);
11534
11535 stat = asn1PD_H225ReleaseCompleteReason (pctxt, &pvalue->reason);
11536 if (stat != ASN_OK) return stat;
11537
11538 invokeEndElement (pctxt, "reason", -1);
11539 }
11540
11541 if (extbit) {
11542
11543 /* decode extension optional bits length */
11544
11545 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
11546 if (stat != ASN_OK) return stat;
11547
11548 bitcnt += 1;
11549
11550 ZEROCONTEXT (&lctxt);
11551 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
11552 if (stat != ASN_OK) return stat;
11553
11554 stat = moveBitCursor (pctxt, bitcnt);
11555 if (stat != ASN_OK) return stat;
11556
11557 for (i = 0; i < bitcnt; i++) {
11558 DECODEBIT (&lctxt, &optbit);
11559
11560 if (optbit) {
11561 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
11562 if (stat != ASN_OK) return stat;
11563
11564 if (i < 9 && openType.numocts > 0) { /* known element */
11565 copyContext (&lctxt2, pctxt);
11566 initContextBuffer (pctxt, openType.data, openType.numocts);
11567
11568 switch (i) {
11569 case 0:
11570 pvalue->m.callIdentifierPresent = 1;
11571
11572 invokeStartElement (pctxt, "callIdentifier", -1);
11573
11574 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
11575 if (stat != ASN_OK) return stat;
11576
11577 invokeEndElement (pctxt, "callIdentifier", -1);
11578 break;
11579
11580 case 1:
11581 pvalue->m.tokensPresent = 1;
11582
11583 invokeStartElement (pctxt, "tokens", -1);
11584
11585 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
11586 if (stat != ASN_OK) return stat;
11587
11588 invokeEndElement (pctxt, "tokens", -1);
11589 break;
11590
11591 case 2:
11592 pvalue->m.cryptoTokensPresent = 1;
11593
11594 invokeStartElement (pctxt, "cryptoTokens", -1);
11595
11596 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
11597 if (stat != ASN_OK) return stat;
11598
11599 invokeEndElement (pctxt, "cryptoTokens", -1);
11600 break;
11601
11602 case 3:
11603 pvalue->m.busyAddressPresent = 1;
11604
11605 invokeStartElement (pctxt, "busyAddress", -1);
11606
11607 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->busyAddress);
11608 if (stat != ASN_OK) return stat;
11609
11610 invokeEndElement (pctxt, "busyAddress", -1);
11611 break;
11612
11613 case 4:
11614 pvalue->m.presentationIndicatorPresent = 1;
11615
11616 invokeStartElement (pctxt, "presentationIndicator", -1);
11617
11618 stat = asn1PD_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
11619 if (stat != ASN_OK) return stat;
11620
11621 invokeEndElement (pctxt, "presentationIndicator", -1);
11622 break;
11623
11624 case 5:
11625 pvalue->m.screeningIndicatorPresent = 1;
11626
11627 invokeStartElement (pctxt, "screeningIndicator", -1);
11628
11629 stat = asn1PD_H225ScreeningIndicator (pctxt, &pvalue->screeningIndicator);
11630 if (stat != ASN_OK) return stat;
11631
11632 invokeEndElement (pctxt, "screeningIndicator", -1);
11633 break;
11634
11635 case 6:
11636 pvalue->m.capacityPresent = 1;
11637
11638 invokeStartElement (pctxt, "capacity", -1);
11639
11640 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
11641 if (stat != ASN_OK) return stat;
11642
11643 invokeEndElement (pctxt, "capacity", -1);
11644 break;
11645
11646 case 7:
11647 pvalue->m.serviceControlPresent = 1;
11648
11649 invokeStartElement (pctxt, "serviceControl", -1);
11650
11651 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
11652 if (stat != ASN_OK) return stat;
11653
11654 invokeEndElement (pctxt, "serviceControl", -1);
11655 break;
11656
11657 case 8:
11658 pvalue->m.featureSetPresent = 1;
11659
11660 invokeStartElement (pctxt, "featureSet", -1);
11661
11662 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
11663 if (stat != ASN_OK) return stat;
11664
11665 invokeEndElement (pctxt, "featureSet", -1);
11666 break;
11667
11668 default:
11669 pctxt->buffer.byteIndex += openType.numocts;
11670 }
11671 copyContext (pctxt, &lctxt2);
11672 }
11673 else { /* unknown element */
11674 pctxt->buffer.byteIndex += openType.numocts;
11675 }
11676 }
11677 }
11678 }
11679
11680 return (stat);
11681 }
11682
11683 /**************************************************************/
11684 /* */
11685 /* FacilityReason */
11686 /* */
11687 /**************************************************************/
11688
11689 EXTERN int asn1PD_H225FacilityReason (OOCTXT* pctxt, H225FacilityReason* pvalue)
11690 {
11691 int stat = ASN_OK;
11692 ASN1UINT ui;
11693 ASN1OpenType openType;
11694 ASN1BOOL extbit = 0;
11695 OOCTXT lctxt;
11696
11697 /* extension bit */
11698
11699 DECODEBIT (pctxt, &extbit);
11700
11701 if (!extbit) {
11702 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
11703 if (stat != ASN_OK) return stat;
11704 else pvalue->t = ui + 1;
11705
11706 switch (ui) {
11707 /* routeCallToGatekeeper */
11708 case 0:
11709 invokeStartElement (pctxt, "routeCallToGatekeeper", -1);
11710
11711 /* NULL */
11712 invokeNullValue (pctxt);
11713
11714 invokeEndElement (pctxt, "routeCallToGatekeeper", -1);
11715
11716 break;
11717
11718 /* callForwarded */
11719 case 1:
11720 invokeStartElement (pctxt, "callForwarded", -1);
11721
11722 /* NULL */
11723 invokeNullValue (pctxt);
11724
11725 invokeEndElement (pctxt, "callForwarded", -1);
11726
11727 break;
11728
11729 /* routeCallToMC */
11730 case 2:
11731 invokeStartElement (pctxt, "routeCallToMC", -1);
11732
11733 /* NULL */
11734 invokeNullValue (pctxt);
11735
11736 invokeEndElement (pctxt, "routeCallToMC", -1);
11737
11738 break;
11739
11740 /* undefinedReason */
11741 case 3:
11742 invokeStartElement (pctxt, "undefinedReason", -1);
11743
11744 /* NULL */
11745 invokeNullValue (pctxt);
11746
11747 invokeEndElement (pctxt, "undefinedReason", -1);
11748
11749 break;
11750
11751 default:
11752 return ASN_E_INVOPT;
11753 }
11754 }
11755 else {
11756 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
11757 if (stat != ASN_OK) return stat;
11758 else pvalue->t = ui + 5;
11759
11760 stat = decodeByteAlign (pctxt);
11761 if (stat != ASN_OK) return stat;
11762
11763 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
11764 if (stat != ASN_OK) return stat;
11765
11766 copyContext (&lctxt, pctxt);
11767 initContextBuffer (pctxt, openType.data, openType.numocts);
11768
11769 switch (pvalue->t) {
11770 /* conferenceListChoice */
11771 case 5:
11772 invokeStartElement (pctxt, "conferenceListChoice", -1);
11773
11774 /* NULL */
11775 invokeNullValue (pctxt);
11776
11777 invokeEndElement (pctxt, "conferenceListChoice", -1);
11778
11779 break;
11780
11781 /* startH245 */
11782 case 6:
11783 invokeStartElement (pctxt, "startH245", -1);
11784
11785 /* NULL */
11786 invokeNullValue (pctxt);
11787
11788 invokeEndElement (pctxt, "startH245", -1);
11789
11790 break;
11791
11792 /* noH245 */
11793 case 7:
11794 invokeStartElement (pctxt, "noH245", -1);
11795
11796 /* NULL */
11797 invokeNullValue (pctxt);
11798
11799 invokeEndElement (pctxt, "noH245", -1);
11800
11801 break;
11802
11803 /* newTokens */
11804 case 8:
11805 invokeStartElement (pctxt, "newTokens", -1);
11806
11807 /* NULL */
11808 invokeNullValue (pctxt);
11809
11810 invokeEndElement (pctxt, "newTokens", -1);
11811
11812 break;
11813
11814 /* featureSetUpdate */
11815 case 9:
11816 invokeStartElement (pctxt, "featureSetUpdate", -1);
11817
11818 /* NULL */
11819 invokeNullValue (pctxt);
11820
11821 invokeEndElement (pctxt, "featureSetUpdate", -1);
11822
11823 break;
11824
11825 /* forwardedElements */
11826 case 10:
11827 invokeStartElement (pctxt, "forwardedElements", -1);
11828
11829 /* NULL */
11830 invokeNullValue (pctxt);
11831
11832 invokeEndElement (pctxt, "forwardedElements", -1);
11833
11834 break;
11835
11836 /* transportedInformation */
11837 case 11:
11838 invokeStartElement (pctxt, "transportedInformation", -1);
11839
11840 /* NULL */
11841 invokeNullValue (pctxt);
11842
11843 invokeEndElement (pctxt, "transportedInformation", -1);
11844
11845 break;
11846
11847 default:;
11848 }
11849
11850 copyContext (pctxt, &lctxt);
11851 }
11852
11853 return (stat);
11854 }
11855
11856 /**************************************************************/
11857 /* */
11858 /* ConferenceList */
11859 /* */
11860 /**************************************************************/
11861
11862 EXTERN int asn1PD_H225ConferenceList (OOCTXT* pctxt, H225ConferenceList* pvalue)
11863 {
11864 int stat = ASN_OK;
11865 OOCTXT lctxt;
11866 ASN1OpenType openType;
11867 ASN1UINT bitcnt;
11868 ASN1UINT i;
11869 ASN1BOOL optbit = 0;
11870 ASN1BOOL extbit = 0;
11871
11872 /* extension bit */
11873
11874 DECODEBIT (pctxt, &extbit);
11875
11876 /* optional bits */
11877
11878 memset (&pvalue->m, 0, sizeof(pvalue->m));
11879
11880 DECODEBIT (pctxt, &optbit);
11881 pvalue->m.conferenceIDPresent = optbit;
11882
11883 DECODEBIT (pctxt, &optbit);
11884 pvalue->m.conferenceAliasPresent = optbit;
11885
11886 DECODEBIT (pctxt, &optbit);
11887 pvalue->m.nonStandardDataPresent = optbit;
11888
11889 /* decode conferenceID */
11890
11891 if (pvalue->m.conferenceIDPresent) {
11892 invokeStartElement (pctxt, "conferenceID", -1);
11893
11894 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
11895 if (stat != ASN_OK) return stat;
11896
11897 invokeEndElement (pctxt, "conferenceID", -1);
11898 }
11899
11900 /* decode conferenceAlias */
11901
11902 if (pvalue->m.conferenceAliasPresent) {
11903 invokeStartElement (pctxt, "conferenceAlias", -1);
11904
11905 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->conferenceAlias);
11906 if (stat != ASN_OK) return stat;
11907
11908 invokeEndElement (pctxt, "conferenceAlias", -1);
11909 }
11910
11911 /* decode nonStandardData */
11912
11913 if (pvalue->m.nonStandardDataPresent) {
11914 invokeStartElement (pctxt, "nonStandardData", -1);
11915
11916 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
11917 if (stat != ASN_OK) return stat;
11918
11919 invokeEndElement (pctxt, "nonStandardData", -1);
11920 }
11921
11922 if (extbit) {
11923
11924 /* decode extension optional bits length */
11925
11926 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
11927 if (stat != ASN_OK) return stat;
11928
11929 bitcnt += 1;
11930
11931 ZEROCONTEXT (&lctxt);
11932 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
11933 if (stat != ASN_OK) return stat;
11934
11935 stat = moveBitCursor (pctxt, bitcnt);
11936 if (stat != ASN_OK) return stat;
11937
11938 for (i = 0; i < bitcnt; i++) {
11939 DECODEBIT (&lctxt, &optbit);
11940
11941 if (optbit) {
11942 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
11943 if (stat != ASN_OK) return stat;
11944
11945 pctxt->buffer.byteIndex += openType.numocts;
11946 }
11947 }
11948 }
11949
11950 return (stat);
11951 }
11952
11953 /**************************************************************/
11954 /* */
11955 /* _SeqOfH225ConferenceList */
11956 /* */
11957 /**************************************************************/
11958
11959 EXTERN int asn1PD_H225_SeqOfH225ConferenceList (OOCTXT* pctxt, H225_SeqOfH225ConferenceList* pvalue)
11960 {
11961 int stat = ASN_OK;
11962 H225ConferenceList* pdata;
11963 ASN1UINT count = 0;
11964 ASN1UINT xx1;
11965 int lstat;
11966
11967 dListInit (pvalue);
11968
11969 for (;;) {
11970 /* decode length determinant */
11971
11972 lstat = decodeLength (pctxt, &count);
11973 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
11974 return lstat;
11975 }
11976
11977 /* decode elements */
11978
11979 for (xx1 = 0; xx1 < count; xx1++) {
11980 invokeStartElement (pctxt, "elem", xx1);
11981
11982 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225ConferenceList);
11983
11984 stat = asn1PD_H225ConferenceList (pctxt, pdata);
11985 if (stat != ASN_OK) return stat;
11986 invokeEndElement (pctxt, "elem", xx1);
11987
11988 dListAppendNode (pctxt, pvalue, pdata);
11989 }
11990
11991 if(lstat == ASN_OK) break;
11992 }
11993
11994 return (stat);
11995 }
11996
11997 /**************************************************************/
11998 /* */
11999 /* Facility_UUIE_fastStart */
12000 /* */
12001 /**************************************************************/
12002
12003 EXTERN int asn1PD_H225Facility_UUIE_fastStart (OOCTXT* pctxt, H225Facility_UUIE_fastStart* pvalue)
12004 {
12005 int stat = ASN_OK;
12006 ASN1UINT xx1;
12007
12008 /* decode length determinant */
12009
12010 stat = decodeLength (pctxt, &pvalue->n);
12011 if (stat != ASN_OK) return stat;
12012
12013 /* decode elements */
12014
12015 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
12016
12017 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
12018 invokeStartElement (pctxt, "elem", xx1);
12019
12020 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
12021 if (stat != ASN_OK) return stat;
12022 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
12023 invokeEndElement (pctxt, "elem", xx1);
12024
12025 }
12026
12027 return (stat);
12028 }
12029
12030 /**************************************************************/
12031 /* */
12032 /* Facility_UUIE */
12033 /* */
12034 /**************************************************************/
12035
12036 EXTERN int asn1PD_H225Facility_UUIE (OOCTXT* pctxt, H225Facility_UUIE* pvalue)
12037 {
12038 int stat = ASN_OK;
12039 OOCTXT lctxt;
12040 OOCTXT lctxt2;
12041 ASN1OpenType openType;
12042 ASN1UINT bitcnt;
12043 ASN1UINT i;
12044 ASN1BOOL optbit = 0;
12045 ASN1BOOL extbit = 0;
12046
12047 /* extension bit */
12048
12049 DECODEBIT (pctxt, &extbit);
12050
12051 /* optional bits */
12052
12053 memset (&pvalue->m, 0, sizeof(pvalue->m));
12054
12055 DECODEBIT (pctxt, &optbit);
12056 pvalue->m.alternativeAddressPresent = optbit;
12057
12058 DECODEBIT (pctxt, &optbit);
12059 pvalue->m.alternativeAliasAddressPresent = optbit;
12060
12061 DECODEBIT (pctxt, &optbit);
12062 pvalue->m.conferenceIDPresent = optbit;
12063
12064 /* decode protocolIdentifier */
12065
12066 invokeStartElement (pctxt, "protocolIdentifier", -1);
12067
12068 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12069 if (stat != ASN_OK) return stat;
12070
12071 invokeEndElement (pctxt, "protocolIdentifier", -1);
12072
12073 /* decode alternativeAddress */
12074
12075 if (pvalue->m.alternativeAddressPresent) {
12076 invokeStartElement (pctxt, "alternativeAddress", -1);
12077
12078 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->alternativeAddress);
12079 if (stat != ASN_OK) return stat;
12080
12081 invokeEndElement (pctxt, "alternativeAddress", -1);
12082 }
12083
12084 /* decode alternativeAliasAddress */
12085
12086 if (pvalue->m.alternativeAliasAddressPresent) {
12087 invokeStartElement (pctxt, "alternativeAliasAddress", -1);
12088
12089 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->alternativeAliasAddress);
12090 if (stat != ASN_OK) return stat;
12091
12092 invokeEndElement (pctxt, "alternativeAliasAddress", -1);
12093 }
12094
12095 /* decode conferenceID */
12096
12097 if (pvalue->m.conferenceIDPresent) {
12098 invokeStartElement (pctxt, "conferenceID", -1);
12099
12100 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
12101 if (stat != ASN_OK) return stat;
12102
12103 invokeEndElement (pctxt, "conferenceID", -1);
12104 }
12105
12106 /* decode reason */
12107
12108 invokeStartElement (pctxt, "reason", -1);
12109
12110 stat = asn1PD_H225FacilityReason (pctxt, &pvalue->reason);
12111 if (stat != ASN_OK) return stat;
12112
12113 invokeEndElement (pctxt, "reason", -1);
12114
12115 if (extbit) {
12116
12117 /* decode extension optional bits length */
12118
12119 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12120 if (stat != ASN_OK) return stat;
12121
12122 bitcnt += 1;
12123
12124 ZEROCONTEXT (&lctxt);
12125 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12126 if (stat != ASN_OK) return stat;
12127
12128 stat = moveBitCursor (pctxt, bitcnt);
12129 if (stat != ASN_OK) return stat;
12130
12131 for (i = 0; i < bitcnt; i++) {
12132 DECODEBIT (&lctxt, &optbit);
12133
12134 if (optbit) {
12135 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12136 if (stat != ASN_OK) return stat;
12137
12138 if (i < 16 && openType.numocts > 0) { /* known element */
12139 copyContext (&lctxt2, pctxt);
12140 initContextBuffer (pctxt, openType.data, openType.numocts);
12141
12142 switch (i) {
12143 case 0:
12144 pvalue->m.callIdentifierPresent = 1;
12145
12146 invokeStartElement (pctxt, "callIdentifier", -1);
12147
12148 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12149 if (stat != ASN_OK) return stat;
12150
12151 invokeEndElement (pctxt, "callIdentifier", -1);
12152 break;
12153
12154 case 1:
12155 pvalue->m.destExtraCallInfoPresent = 1;
12156
12157 invokeStartElement (pctxt, "destExtraCallInfo", -1);
12158
12159 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
12160 if (stat != ASN_OK) return stat;
12161
12162 invokeEndElement (pctxt, "destExtraCallInfo", -1);
12163 break;
12164
12165 case 2:
12166 pvalue->m.remoteExtensionAddressPresent = 1;
12167
12168 invokeStartElement (pctxt, "remoteExtensionAddress", -1);
12169
12170 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
12171 if (stat != ASN_OK) return stat;
12172
12173 invokeEndElement (pctxt, "remoteExtensionAddress", -1);
12174 break;
12175
12176 case 3:
12177 pvalue->m.tokensPresent = 1;
12178
12179 invokeStartElement (pctxt, "tokens", -1);
12180
12181 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12182 if (stat != ASN_OK) return stat;
12183
12184 invokeEndElement (pctxt, "tokens", -1);
12185 break;
12186
12187 case 4:
12188 pvalue->m.cryptoTokensPresent = 1;
12189
12190 invokeStartElement (pctxt, "cryptoTokens", -1);
12191
12192 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12193 if (stat != ASN_OK) return stat;
12194
12195 invokeEndElement (pctxt, "cryptoTokens", -1);
12196 break;
12197
12198 case 5:
12199 pvalue->m.conferencesPresent = 1;
12200
12201 invokeStartElement (pctxt, "conferences", -1);
12202
12203 stat = asn1PD_H225_SeqOfH225ConferenceList (pctxt, &pvalue->conferences);
12204 if (stat != ASN_OK) return stat;
12205
12206 invokeEndElement (pctxt, "conferences", -1);
12207 break;
12208
12209 case 6:
12210 pvalue->m.h245AddressPresent = 1;
12211
12212 invokeStartElement (pctxt, "h245Address", -1);
12213
12214 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
12215 if (stat != ASN_OK) return stat;
12216
12217 invokeEndElement (pctxt, "h245Address", -1);
12218 break;
12219
12220 case 7:
12221 pvalue->m.fastStartPresent = 1;
12222
12223 invokeStartElement (pctxt, "fastStart", -1);
12224
12225 stat = asn1PD_H225Facility_UUIE_fastStart (pctxt, &pvalue->fastStart);
12226 if (stat != ASN_OK) return stat;
12227
12228 invokeEndElement (pctxt, "fastStart", -1);
12229 break;
12230
12231 case 8:
12232 pvalue->m.multipleCallsPresent = 1;
12233
12234 invokeStartElement (pctxt, "multipleCalls", -1);
12235
12236 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
12237 if (stat != ASN_OK) return stat;
12238 invokeBoolValue (pctxt, pvalue->multipleCalls);
12239
12240 invokeEndElement (pctxt, "multipleCalls", -1);
12241 break;
12242
12243 case 9:
12244 pvalue->m.maintainConnectionPresent = 1;
12245
12246 invokeStartElement (pctxt, "maintainConnection", -1);
12247
12248 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
12249 if (stat != ASN_OK) return stat;
12250 invokeBoolValue (pctxt, pvalue->maintainConnection);
12251
12252 invokeEndElement (pctxt, "maintainConnection", -1);
12253 break;
12254
12255 case 10:
12256 pvalue->m.fastConnectRefusedPresent = 1;
12257
12258 invokeStartElement (pctxt, "fastConnectRefused", -1);
12259
12260 /* NULL */
12261 invokeNullValue (pctxt);
12262
12263 invokeEndElement (pctxt, "fastConnectRefused", -1);
12264 break;
12265
12266 case 11:
12267 pvalue->m.serviceControlPresent = 1;
12268
12269 invokeStartElement (pctxt, "serviceControl", -1);
12270
12271 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
12272 if (stat != ASN_OK) return stat;
12273
12274 invokeEndElement (pctxt, "serviceControl", -1);
12275 break;
12276
12277 case 12:
12278 pvalue->m.circuitInfoPresent = 1;
12279
12280 invokeStartElement (pctxt, "circuitInfo", -1);
12281
12282 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
12283 if (stat != ASN_OK) return stat;
12284
12285 invokeEndElement (pctxt, "circuitInfo", -1);
12286 break;
12287
12288 case 13:
12289 pvalue->m.featureSetPresent = 1;
12290
12291 invokeStartElement (pctxt, "featureSet", -1);
12292
12293 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
12294 if (stat != ASN_OK) return stat;
12295
12296 invokeEndElement (pctxt, "featureSet", -1);
12297 break;
12298
12299 case 14:
12300 pvalue->m.destinationInfoPresent = 1;
12301
12302 invokeStartElement (pctxt, "destinationInfo", -1);
12303
12304 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationInfo);
12305 if (stat != ASN_OK) return stat;
12306
12307 invokeEndElement (pctxt, "destinationInfo", -1);
12308 break;
12309
12310 case 15:
12311 pvalue->m.h245SecurityModePresent = 1;
12312
12313 invokeStartElement (pctxt, "h245SecurityMode", -1);
12314
12315 stat = asn1PD_H225H245Security (pctxt, &pvalue->h245SecurityMode);
12316 if (stat != ASN_OK) return stat;
12317
12318 invokeEndElement (pctxt, "h245SecurityMode", -1);
12319 break;
12320
12321 default:
12322 pctxt->buffer.byteIndex += openType.numocts;
12323 }
12324 copyContext (pctxt, &lctxt2);
12325 }
12326 else { /* unknown element */
12327 pctxt->buffer.byteIndex += openType.numocts;
12328 }
12329 }
12330 }
12331 }
12332
12333 return (stat);
12334 }
12335
12336 /**************************************************************/
12337 /* */
12338 /* Progress_UUIE_fastStart */
12339 /* */
12340 /**************************************************************/
12341
12342 EXTERN int asn1PD_H225Progress_UUIE_fastStart (OOCTXT* pctxt, H225Progress_UUIE_fastStart* pvalue)
12343 {
12344 int stat = ASN_OK;
12345 ASN1UINT xx1;
12346
12347 /* decode length determinant */
12348
12349 stat = decodeLength (pctxt, &pvalue->n);
12350 if (stat != ASN_OK) return stat;
12351
12352 /* decode elements */
12353
12354 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
12355
12356 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
12357 invokeStartElement (pctxt, "elem", xx1);
12358
12359 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
12360 if (stat != ASN_OK) return stat;
12361 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
12362 invokeEndElement (pctxt, "elem", xx1);
12363
12364 }
12365
12366 return (stat);
12367 }
12368
12369 /**************************************************************/
12370 /* */
12371 /* Progress_UUIE */
12372 /* */
12373 /**************************************************************/
12374
12375 EXTERN int asn1PD_H225Progress_UUIE (OOCTXT* pctxt, H225Progress_UUIE* pvalue)
12376 {
12377 int stat = ASN_OK;
12378 OOCTXT lctxt;
12379 OOCTXT lctxt2;
12380 ASN1OpenType openType;
12381 ASN1UINT bitcnt;
12382 ASN1UINT i;
12383 ASN1BOOL optbit = 0;
12384 ASN1BOOL extbit = 0;
12385
12386 /* extension bit */
12387
12388 DECODEBIT (pctxt, &extbit);
12389
12390 /* optional bits */
12391
12392 memset (&pvalue->m, 0, sizeof(pvalue->m));
12393
12394 DECODEBIT (pctxt, &optbit);
12395 pvalue->m.h245AddressPresent = optbit;
12396
12397 DECODEBIT (pctxt, &optbit);
12398 pvalue->m.h245SecurityModePresent = optbit;
12399
12400 DECODEBIT (pctxt, &optbit);
12401 pvalue->m.tokensPresent = optbit;
12402
12403 DECODEBIT (pctxt, &optbit);
12404 pvalue->m.cryptoTokensPresent = optbit;
12405
12406 DECODEBIT (pctxt, &optbit);
12407 pvalue->m.fastStartPresent = optbit;
12408
12409 /* decode protocolIdentifier */
12410
12411 invokeStartElement (pctxt, "protocolIdentifier", -1);
12412
12413 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12414 if (stat != ASN_OK) return stat;
12415
12416 invokeEndElement (pctxt, "protocolIdentifier", -1);
12417
12418 /* decode destinationInfo */
12419
12420 invokeStartElement (pctxt, "destinationInfo", -1);
12421
12422 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationInfo);
12423 if (stat != ASN_OK) return stat;
12424
12425 invokeEndElement (pctxt, "destinationInfo", -1);
12426
12427 /* decode h245Address */
12428
12429 if (pvalue->m.h245AddressPresent) {
12430 invokeStartElement (pctxt, "h245Address", -1);
12431
12432 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->h245Address);
12433 if (stat != ASN_OK) return stat;
12434
12435 invokeEndElement (pctxt, "h245Address", -1);
12436 }
12437
12438 /* decode callIdentifier */
12439
12440 invokeStartElement (pctxt, "callIdentifier", -1);
12441
12442 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12443 if (stat != ASN_OK) return stat;
12444
12445 invokeEndElement (pctxt, "callIdentifier", -1);
12446
12447 /* decode h245SecurityMode */
12448
12449 if (pvalue->m.h245SecurityModePresent) {
12450 invokeStartElement (pctxt, "h245SecurityMode", -1);
12451
12452 stat = asn1PD_H225H245Security (pctxt, &pvalue->h245SecurityMode);
12453 if (stat != ASN_OK) return stat;
12454
12455 invokeEndElement (pctxt, "h245SecurityMode", -1);
12456 }
12457
12458 /* decode tokens */
12459
12460 if (pvalue->m.tokensPresent) {
12461 invokeStartElement (pctxt, "tokens", -1);
12462
12463 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12464 if (stat != ASN_OK) return stat;
12465
12466 invokeEndElement (pctxt, "tokens", -1);
12467 }
12468
12469 /* decode cryptoTokens */
12470
12471 if (pvalue->m.cryptoTokensPresent) {
12472 invokeStartElement (pctxt, "cryptoTokens", -1);
12473
12474 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12475 if (stat != ASN_OK) return stat;
12476
12477 invokeEndElement (pctxt, "cryptoTokens", -1);
12478 }
12479
12480 /* decode fastStart */
12481
12482 if (pvalue->m.fastStartPresent) {
12483 invokeStartElement (pctxt, "fastStart", -1);
12484
12485 stat = asn1PD_H225Progress_UUIE_fastStart (pctxt, &pvalue->fastStart);
12486 if (stat != ASN_OK) return stat;
12487
12488 invokeEndElement (pctxt, "fastStart", -1);
12489 }
12490
12491 if (extbit) {
12492
12493 /* decode extension optional bits length */
12494
12495 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12496 if (stat != ASN_OK) return stat;
12497
12498 bitcnt += 1;
12499
12500 ZEROCONTEXT (&lctxt);
12501 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12502 if (stat != ASN_OK) return stat;
12503
12504 stat = moveBitCursor (pctxt, bitcnt);
12505 if (stat != ASN_OK) return stat;
12506
12507 for (i = 0; i < bitcnt; i++) {
12508 DECODEBIT (&lctxt, &optbit);
12509
12510 if (optbit) {
12511 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12512 if (stat != ASN_OK) return stat;
12513
12514 if (i < 3 && openType.numocts > 0) { /* known element */
12515 copyContext (&lctxt2, pctxt);
12516 initContextBuffer (pctxt, openType.data, openType.numocts);
12517
12518 switch (i) {
12519 case 0:
12520 pvalue->m.multipleCallsPresent = 1;
12521
12522 invokeStartElement (pctxt, "multipleCalls", -1);
12523
12524 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
12525 if (stat != ASN_OK) return stat;
12526 invokeBoolValue (pctxt, pvalue->multipleCalls);
12527
12528 invokeEndElement (pctxt, "multipleCalls", -1);
12529 break;
12530
12531 case 1:
12532 pvalue->m.maintainConnectionPresent = 1;
12533
12534 invokeStartElement (pctxt, "maintainConnection", -1);
12535
12536 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
12537 if (stat != ASN_OK) return stat;
12538 invokeBoolValue (pctxt, pvalue->maintainConnection);
12539
12540 invokeEndElement (pctxt, "maintainConnection", -1);
12541 break;
12542
12543 case 2:
12544 pvalue->m.fastConnectRefusedPresent = 1;
12545
12546 invokeStartElement (pctxt, "fastConnectRefused", -1);
12547
12548 /* NULL */
12549 invokeNullValue (pctxt);
12550
12551 invokeEndElement (pctxt, "fastConnectRefused", -1);
12552 break;
12553
12554 default:
12555 pctxt->buffer.byteIndex += openType.numocts;
12556 }
12557 copyContext (pctxt, &lctxt2);
12558 }
12559 else { /* unknown element */
12560 pctxt->buffer.byteIndex += openType.numocts;
12561 }
12562 }
12563 }
12564 }
12565
12566 return (stat);
12567 }
12568
12569 /**************************************************************/
12570 /* */
12571 /* Status_UUIE */
12572 /* */
12573 /**************************************************************/
12574
12575 EXTERN int asn1PD_H225Status_UUIE (OOCTXT* pctxt, H225Status_UUIE* pvalue)
12576 {
12577 int stat = ASN_OK;
12578 OOCTXT lctxt;
12579 ASN1OpenType openType;
12580 ASN1UINT bitcnt;
12581 ASN1UINT i;
12582 ASN1BOOL optbit = 0;
12583 ASN1BOOL extbit = 0;
12584
12585 /* extension bit */
12586
12587 DECODEBIT (pctxt, &extbit);
12588
12589 /* optional bits */
12590
12591 memset (&pvalue->m, 0, sizeof(pvalue->m));
12592
12593 DECODEBIT (pctxt, &optbit);
12594 pvalue->m.tokensPresent = optbit;
12595
12596 DECODEBIT (pctxt, &optbit);
12597 pvalue->m.cryptoTokensPresent = optbit;
12598
12599 /* decode protocolIdentifier */
12600
12601 invokeStartElement (pctxt, "protocolIdentifier", -1);
12602
12603 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12604 if (stat != ASN_OK) return stat;
12605
12606 invokeEndElement (pctxt, "protocolIdentifier", -1);
12607
12608 /* decode callIdentifier */
12609
12610 invokeStartElement (pctxt, "callIdentifier", -1);
12611
12612 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12613 if (stat != ASN_OK) return stat;
12614
12615 invokeEndElement (pctxt, "callIdentifier", -1);
12616
12617 /* decode tokens */
12618
12619 if (pvalue->m.tokensPresent) {
12620 invokeStartElement (pctxt, "tokens", -1);
12621
12622 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12623 if (stat != ASN_OK) return stat;
12624
12625 invokeEndElement (pctxt, "tokens", -1);
12626 }
12627
12628 /* decode cryptoTokens */
12629
12630 if (pvalue->m.cryptoTokensPresent) {
12631 invokeStartElement (pctxt, "cryptoTokens", -1);
12632
12633 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12634 if (stat != ASN_OK) return stat;
12635
12636 invokeEndElement (pctxt, "cryptoTokens", -1);
12637 }
12638
12639 if (extbit) {
12640
12641 /* decode extension optional bits length */
12642
12643 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12644 if (stat != ASN_OK) return stat;
12645
12646 bitcnt += 1;
12647
12648 ZEROCONTEXT (&lctxt);
12649 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12650 if (stat != ASN_OK) return stat;
12651
12652 stat = moveBitCursor (pctxt, bitcnt);
12653 if (stat != ASN_OK) return stat;
12654
12655 for (i = 0; i < bitcnt; i++) {
12656 DECODEBIT (&lctxt, &optbit);
12657
12658 if (optbit) {
12659 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12660 if (stat != ASN_OK) return stat;
12661
12662 pctxt->buffer.byteIndex += openType.numocts;
12663 }
12664 }
12665 }
12666
12667 return (stat);
12668 }
12669
12670 /**************************************************************/
12671 /* */
12672 /* StatusInquiry_UUIE */
12673 /* */
12674 /**************************************************************/
12675
12676 EXTERN int asn1PD_H225StatusInquiry_UUIE (OOCTXT* pctxt, H225StatusInquiry_UUIE* pvalue)
12677 {
12678 int stat = ASN_OK;
12679 OOCTXT lctxt;
12680 ASN1OpenType openType;
12681 ASN1UINT bitcnt;
12682 ASN1UINT i;
12683 ASN1BOOL optbit = 0;
12684 ASN1BOOL extbit = 0;
12685
12686 /* extension bit */
12687
12688 DECODEBIT (pctxt, &extbit);
12689
12690 /* optional bits */
12691
12692 memset (&pvalue->m, 0, sizeof(pvalue->m));
12693
12694 DECODEBIT (pctxt, &optbit);
12695 pvalue->m.tokensPresent = optbit;
12696
12697 DECODEBIT (pctxt, &optbit);
12698 pvalue->m.cryptoTokensPresent = optbit;
12699
12700 /* decode protocolIdentifier */
12701
12702 invokeStartElement (pctxt, "protocolIdentifier", -1);
12703
12704 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12705 if (stat != ASN_OK) return stat;
12706
12707 invokeEndElement (pctxt, "protocolIdentifier", -1);
12708
12709 /* decode callIdentifier */
12710
12711 invokeStartElement (pctxt, "callIdentifier", -1);
12712
12713 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12714 if (stat != ASN_OK) return stat;
12715
12716 invokeEndElement (pctxt, "callIdentifier", -1);
12717
12718 /* decode tokens */
12719
12720 if (pvalue->m.tokensPresent) {
12721 invokeStartElement (pctxt, "tokens", -1);
12722
12723 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12724 if (stat != ASN_OK) return stat;
12725
12726 invokeEndElement (pctxt, "tokens", -1);
12727 }
12728
12729 /* decode cryptoTokens */
12730
12731 if (pvalue->m.cryptoTokensPresent) {
12732 invokeStartElement (pctxt, "cryptoTokens", -1);
12733
12734 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12735 if (stat != ASN_OK) return stat;
12736
12737 invokeEndElement (pctxt, "cryptoTokens", -1);
12738 }
12739
12740 if (extbit) {
12741
12742 /* decode extension optional bits length */
12743
12744 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12745 if (stat != ASN_OK) return stat;
12746
12747 bitcnt += 1;
12748
12749 ZEROCONTEXT (&lctxt);
12750 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12751 if (stat != ASN_OK) return stat;
12752
12753 stat = moveBitCursor (pctxt, bitcnt);
12754 if (stat != ASN_OK) return stat;
12755
12756 for (i = 0; i < bitcnt; i++) {
12757 DECODEBIT (&lctxt, &optbit);
12758
12759 if (optbit) {
12760 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12761 if (stat != ASN_OK) return stat;
12762
12763 pctxt->buffer.byteIndex += openType.numocts;
12764 }
12765 }
12766 }
12767
12768 return (stat);
12769 }
12770
12771 /**************************************************************/
12772 /* */
12773 /* SetupAcknowledge_UUIE */
12774 /* */
12775 /**************************************************************/
12776
12777 EXTERN int asn1PD_H225SetupAcknowledge_UUIE (OOCTXT* pctxt, H225SetupAcknowledge_UUIE* pvalue)
12778 {
12779 int stat = ASN_OK;
12780 OOCTXT lctxt;
12781 ASN1OpenType openType;
12782 ASN1UINT bitcnt;
12783 ASN1UINT i;
12784 ASN1BOOL optbit = 0;
12785 ASN1BOOL extbit = 0;
12786
12787 /* extension bit */
12788
12789 DECODEBIT (pctxt, &extbit);
12790
12791 /* optional bits */
12792
12793 memset (&pvalue->m, 0, sizeof(pvalue->m));
12794
12795 DECODEBIT (pctxt, &optbit);
12796 pvalue->m.tokensPresent = optbit;
12797
12798 DECODEBIT (pctxt, &optbit);
12799 pvalue->m.cryptoTokensPresent = optbit;
12800
12801 /* decode protocolIdentifier */
12802
12803 invokeStartElement (pctxt, "protocolIdentifier", -1);
12804
12805 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12806 if (stat != ASN_OK) return stat;
12807
12808 invokeEndElement (pctxt, "protocolIdentifier", -1);
12809
12810 /* decode callIdentifier */
12811
12812 invokeStartElement (pctxt, "callIdentifier", -1);
12813
12814 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12815 if (stat != ASN_OK) return stat;
12816
12817 invokeEndElement (pctxt, "callIdentifier", -1);
12818
12819 /* decode tokens */
12820
12821 if (pvalue->m.tokensPresent) {
12822 invokeStartElement (pctxt, "tokens", -1);
12823
12824 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12825 if (stat != ASN_OK) return stat;
12826
12827 invokeEndElement (pctxt, "tokens", -1);
12828 }
12829
12830 /* decode cryptoTokens */
12831
12832 if (pvalue->m.cryptoTokensPresent) {
12833 invokeStartElement (pctxt, "cryptoTokens", -1);
12834
12835 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12836 if (stat != ASN_OK) return stat;
12837
12838 invokeEndElement (pctxt, "cryptoTokens", -1);
12839 }
12840
12841 if (extbit) {
12842
12843 /* decode extension optional bits length */
12844
12845 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12846 if (stat != ASN_OK) return stat;
12847
12848 bitcnt += 1;
12849
12850 ZEROCONTEXT (&lctxt);
12851 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12852 if (stat != ASN_OK) return stat;
12853
12854 stat = moveBitCursor (pctxt, bitcnt);
12855 if (stat != ASN_OK) return stat;
12856
12857 for (i = 0; i < bitcnt; i++) {
12858 DECODEBIT (&lctxt, &optbit);
12859
12860 if (optbit) {
12861 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12862 if (stat != ASN_OK) return stat;
12863
12864 pctxt->buffer.byteIndex += openType.numocts;
12865 }
12866 }
12867 }
12868
12869 return (stat);
12870 }
12871
12872 /**************************************************************/
12873 /* */
12874 /* Notify_UUIE */
12875 /* */
12876 /**************************************************************/
12877
12878 EXTERN int asn1PD_H225Notify_UUIE (OOCTXT* pctxt, H225Notify_UUIE* pvalue)
12879 {
12880 int stat = ASN_OK;
12881 OOCTXT lctxt;
12882 ASN1OpenType openType;
12883 ASN1UINT bitcnt;
12884 ASN1UINT i;
12885 ASN1BOOL optbit = 0;
12886 ASN1BOOL extbit = 0;
12887
12888 /* extension bit */
12889
12890 DECODEBIT (pctxt, &extbit);
12891
12892 /* optional bits */
12893
12894 memset (&pvalue->m, 0, sizeof(pvalue->m));
12895
12896 DECODEBIT (pctxt, &optbit);
12897 pvalue->m.tokensPresent = optbit;
12898
12899 DECODEBIT (pctxt, &optbit);
12900 pvalue->m.cryptoTokensPresent = optbit;
12901
12902 /* decode protocolIdentifier */
12903
12904 invokeStartElement (pctxt, "protocolIdentifier", -1);
12905
12906 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12907 if (stat != ASN_OK) return stat;
12908
12909 invokeEndElement (pctxt, "protocolIdentifier", -1);
12910
12911 /* decode callIdentifier */
12912
12913 invokeStartElement (pctxt, "callIdentifier", -1);
12914
12915 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
12916 if (stat != ASN_OK) return stat;
12917
12918 invokeEndElement (pctxt, "callIdentifier", -1);
12919
12920 /* decode tokens */
12921
12922 if (pvalue->m.tokensPresent) {
12923 invokeStartElement (pctxt, "tokens", -1);
12924
12925 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
12926 if (stat != ASN_OK) return stat;
12927
12928 invokeEndElement (pctxt, "tokens", -1);
12929 }
12930
12931 /* decode cryptoTokens */
12932
12933 if (pvalue->m.cryptoTokensPresent) {
12934 invokeStartElement (pctxt, "cryptoTokens", -1);
12935
12936 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
12937 if (stat != ASN_OK) return stat;
12938
12939 invokeEndElement (pctxt, "cryptoTokens", -1);
12940 }
12941
12942 if (extbit) {
12943
12944 /* decode extension optional bits length */
12945
12946 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
12947 if (stat != ASN_OK) return stat;
12948
12949 bitcnt += 1;
12950
12951 ZEROCONTEXT (&lctxt);
12952 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
12953 if (stat != ASN_OK) return stat;
12954
12955 stat = moveBitCursor (pctxt, bitcnt);
12956 if (stat != ASN_OK) return stat;
12957
12958 for (i = 0; i < bitcnt; i++) {
12959 DECODEBIT (&lctxt, &optbit);
12960
12961 if (optbit) {
12962 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
12963 if (stat != ASN_OK) return stat;
12964
12965 pctxt->buffer.byteIndex += openType.numocts;
12966 }
12967 }
12968 }
12969
12970 return (stat);
12971 }
12972
12973 /**************************************************************/
12974 /* */
12975 /* H323_UU_PDU_h323_message_body */
12976 /* */
12977 /**************************************************************/
12978
12979 EXTERN int asn1PD_H225H323_UU_PDU_h323_message_body (OOCTXT* pctxt, H225H323_UU_PDU_h323_message_body* pvalue)
12980 {
12981 int stat = ASN_OK;
12982 ASN1UINT ui;
12983 ASN1OpenType openType;
12984 ASN1BOOL extbit = 0;
12985 OOCTXT lctxt;
12986
12987 /* extension bit */
12988
12989 DECODEBIT (pctxt, &extbit);
12990
12991 if (!extbit) {
12992 stat = decodeConsUnsigned (pctxt, &ui, 0, 6);
12993 if (stat != ASN_OK) return stat;
12994 else pvalue->t = ui + 1;
12995
12996 switch (ui) {
12997 /* setup */
12998 case 0:
12999 invokeStartElement (pctxt, "setup", -1);
13000
13001 pvalue->u.setup = ALLOC_ASN1ELEM (pctxt, H225Setup_UUIE);
13002
13003 stat = asn1PD_H225Setup_UUIE (pctxt, pvalue->u.setup);
13004 if (stat != ASN_OK) return stat;
13005
13006 invokeEndElement (pctxt, "setup", -1);
13007
13008 break;
13009
13010 /* callProceeding */
13011 case 1:
13012 invokeStartElement (pctxt, "callProceeding", -1);
13013
13014 pvalue->u.callProceeding = ALLOC_ASN1ELEM (pctxt, H225CallProceeding_UUIE);
13015
13016 stat = asn1PD_H225CallProceeding_UUIE (pctxt, pvalue->u.callProceeding);
13017 if (stat != ASN_OK) return stat;
13018
13019 invokeEndElement (pctxt, "callProceeding", -1);
13020
13021 break;
13022
13023 /* connect */
13024 case 2:
13025 invokeStartElement (pctxt, "connect", -1);
13026
13027 pvalue->u.connect = ALLOC_ASN1ELEM (pctxt, H225Connect_UUIE);
13028
13029 stat = asn1PD_H225Connect_UUIE (pctxt, pvalue->u.connect);
13030 if (stat != ASN_OK) return stat;
13031
13032 invokeEndElement (pctxt, "connect", -1);
13033
13034 break;
13035
13036 /* alerting */
13037 case 3:
13038 invokeStartElement (pctxt, "alerting", -1);
13039
13040 pvalue->u.alerting = ALLOC_ASN1ELEM (pctxt, H225Alerting_UUIE);
13041
13042 stat = asn1PD_H225Alerting_UUIE (pctxt, pvalue->u.alerting);
13043 if (stat != ASN_OK) return stat;
13044
13045 invokeEndElement (pctxt, "alerting", -1);
13046
13047 break;
13048
13049 /* information */
13050 case 4:
13051 invokeStartElement (pctxt, "information", -1);
13052
13053 pvalue->u.information = ALLOC_ASN1ELEM (pctxt, H225Information_UUIE);
13054
13055 stat = asn1PD_H225Information_UUIE (pctxt, pvalue->u.information);
13056 if (stat != ASN_OK) return stat;
13057
13058 invokeEndElement (pctxt, "information", -1);
13059
13060 break;
13061
13062 /* releaseComplete */
13063 case 5:
13064 invokeStartElement (pctxt, "releaseComplete", -1);
13065
13066 pvalue->u.releaseComplete = ALLOC_ASN1ELEM (pctxt, H225ReleaseComplete_UUIE);
13067
13068 stat = asn1PD_H225ReleaseComplete_UUIE (pctxt, pvalue->u.releaseComplete);
13069 if (stat != ASN_OK) return stat;
13070
13071 invokeEndElement (pctxt, "releaseComplete", -1);
13072
13073 break;
13074
13075 /* facility */
13076 case 6:
13077 invokeStartElement (pctxt, "facility", -1);
13078
13079 pvalue->u.facility = ALLOC_ASN1ELEM (pctxt, H225Facility_UUIE);
13080
13081 stat = asn1PD_H225Facility_UUIE (pctxt, pvalue->u.facility);
13082 if (stat != ASN_OK) return stat;
13083
13084 invokeEndElement (pctxt, "facility", -1);
13085
13086 break;
13087
13088 default:
13089 return ASN_E_INVOPT;
13090 }
13091 }
13092 else {
13093 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
13094 if (stat != ASN_OK) return stat;
13095 else pvalue->t = ui + 8;
13096
13097 stat = decodeByteAlign (pctxt);
13098 if (stat != ASN_OK) return stat;
13099
13100 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13101 if (stat != ASN_OK) return stat;
13102
13103 copyContext (&lctxt, pctxt);
13104 initContextBuffer (pctxt, openType.data, openType.numocts);
13105
13106 switch (pvalue->t) {
13107 /* progress */
13108 case 8:
13109 invokeStartElement (pctxt, "progress", -1);
13110
13111 pvalue->u.progress = ALLOC_ASN1ELEM (pctxt, H225Progress_UUIE);
13112
13113 stat = asn1PD_H225Progress_UUIE (pctxt, pvalue->u.progress);
13114 if (stat != ASN_OK) return stat;
13115
13116 invokeEndElement (pctxt, "progress", -1);
13117
13118 break;
13119
13120 /* empty */
13121 case 9:
13122 invokeStartElement (pctxt, "empty", -1);
13123
13124 /* NULL */
13125 invokeNullValue (pctxt);
13126
13127 invokeEndElement (pctxt, "empty", -1);
13128
13129 break;
13130
13131 /* status */
13132 case 10:
13133 invokeStartElement (pctxt, "status", -1);
13134
13135 pvalue->u.status = ALLOC_ASN1ELEM (pctxt, H225Status_UUIE);
13136
13137 stat = asn1PD_H225Status_UUIE (pctxt, pvalue->u.status);
13138 if (stat != ASN_OK) return stat;
13139
13140 invokeEndElement (pctxt, "status", -1);
13141
13142 break;
13143
13144 /* statusInquiry */
13145 case 11:
13146 invokeStartElement (pctxt, "statusInquiry", -1);
13147
13148 pvalue->u.statusInquiry = ALLOC_ASN1ELEM (pctxt, H225StatusInquiry_UUIE);
13149
13150 stat = asn1PD_H225StatusInquiry_UUIE (pctxt, pvalue->u.statusInquiry);
13151 if (stat != ASN_OK) return stat;
13152
13153 invokeEndElement (pctxt, "statusInquiry", -1);
13154
13155 break;
13156
13157 /* setupAcknowledge */
13158 case 12:
13159 invokeStartElement (pctxt, "setupAcknowledge", -1);
13160
13161 pvalue->u.setupAcknowledge = ALLOC_ASN1ELEM (pctxt, H225SetupAcknowledge_UUIE);
13162
13163 stat = asn1PD_H225SetupAcknowledge_UUIE (pctxt, pvalue->u.setupAcknowledge);
13164 if (stat != ASN_OK) return stat;
13165
13166 invokeEndElement (pctxt, "setupAcknowledge", -1);
13167
13168 break;
13169
13170 /* notify */
13171 case 13:
13172 invokeStartElement (pctxt, "notify", -1);
13173
13174 pvalue->u.notify = ALLOC_ASN1ELEM (pctxt, H225Notify_UUIE);
13175
13176 stat = asn1PD_H225Notify_UUIE (pctxt, pvalue->u.notify);
13177 if (stat != ASN_OK) return stat;
13178
13179 invokeEndElement (pctxt, "notify", -1);
13180
13181 break;
13182
13183 default:;
13184 }
13185
13186 copyContext (pctxt, &lctxt);
13187 }
13188
13189 return (stat);
13190 }
13191
13192 /**************************************************************/
13193 /* */
13194 /* H323_UU_PDU_h4501SupplementaryService */
13195 /* */
13196 /**************************************************************/
13197
13198 EXTERN int asn1PD_H225H323_UU_PDU_h4501SupplementaryService (OOCTXT* pctxt, H225H323_UU_PDU_h4501SupplementaryService* pvalue)
13199 {
13200 int stat = ASN_OK;
13201 ASN1UINT xx1;
13202
13203 /* decode length determinant */
13204
13205 stat = decodeLength (pctxt, &pvalue->n);
13206 if (stat != ASN_OK) return stat;
13207
13208 /* decode elements */
13209
13210 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
13211
13212 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
13213 invokeStartElement (pctxt, "elem", xx1);
13214
13215 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
13216 if (stat != ASN_OK) return stat;
13217 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
13218 invokeEndElement (pctxt, "elem", xx1);
13219
13220 }
13221
13222 return (stat);
13223 }
13224
13225 /**************************************************************/
13226 /* */
13227 /* H323_UU_PDU_h245Control */
13228 /* */
13229 /**************************************************************/
13230
13231 EXTERN int asn1PD_H225H323_UU_PDU_h245Control (OOCTXT* pctxt, H225H323_UU_PDU_h245Control* pvalue)
13232 {
13233 int stat = ASN_OK;
13234 ASN1UINT xx1;
13235
13236 /* decode length determinant */
13237
13238 stat = decodeLength (pctxt, &pvalue->n);
13239 if (stat != ASN_OK) return stat;
13240
13241 /* decode elements */
13242
13243 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
13244
13245 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
13246 invokeStartElement (pctxt, "elem", xx1);
13247
13248 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
13249 if (stat != ASN_OK) return stat;
13250 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
13251 invokeEndElement (pctxt, "elem", xx1);
13252
13253 }
13254
13255 return (stat);
13256 }
13257
13258 /**************************************************************/
13259 /* */
13260 /* _SeqOfH225NonStandardParameter */
13261 /* */
13262 /**************************************************************/
13263
13264 EXTERN int asn1PD_H225_SeqOfH225NonStandardParameter (OOCTXT* pctxt, H225_SeqOfH225NonStandardParameter* pvalue)
13265 {
13266 int stat = ASN_OK;
13267 H225NonStandardParameter* pdata;
13268 ASN1UINT count = 0;
13269 ASN1UINT xx1;
13270 int lstat;
13271
13272 dListInit (pvalue);
13273
13274 for (;;) {
13275 /* decode length determinant */
13276
13277 lstat = decodeLength (pctxt, &count);
13278 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
13279 return lstat;
13280 }
13281
13282 /* decode elements */
13283
13284 for (xx1 = 0; xx1 < count; xx1++) {
13285 invokeStartElement (pctxt, "elem", xx1);
13286
13287 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225NonStandardParameter);
13288
13289 stat = asn1PD_H225NonStandardParameter (pctxt, pdata);
13290 if (stat != ASN_OK) return stat;
13291 invokeEndElement (pctxt, "elem", xx1);
13292
13293 dListAppendNode (pctxt, pvalue, pdata);
13294 }
13295
13296 if(lstat == ASN_OK) break;
13297 }
13298
13299 return (stat);
13300 }
13301
13302 /**************************************************************/
13303 /* */
13304 /* CallLinkage */
13305 /* */
13306 /**************************************************************/
13307
13308 EXTERN int asn1PD_H225CallLinkage (OOCTXT* pctxt, H225CallLinkage* pvalue)
13309 {
13310 int stat = ASN_OK;
13311 OOCTXT lctxt;
13312 ASN1OpenType openType;
13313 ASN1UINT bitcnt;
13314 ASN1UINT i;
13315 ASN1BOOL optbit = 0;
13316 ASN1BOOL extbit = 0;
13317
13318 /* extension bit */
13319
13320 DECODEBIT (pctxt, &extbit);
13321
13322 /* optional bits */
13323
13324 memset (&pvalue->m, 0, sizeof(pvalue->m));
13325
13326 DECODEBIT (pctxt, &optbit);
13327 pvalue->m.globalCallIdPresent = optbit;
13328
13329 DECODEBIT (pctxt, &optbit);
13330 pvalue->m.threadIdPresent = optbit;
13331
13332 /* decode globalCallId */
13333
13334 if (pvalue->m.globalCallIdPresent) {
13335 invokeStartElement (pctxt, "globalCallId", -1);
13336
13337 stat = asn1PD_H225GloballyUniqueID (pctxt, &pvalue->globalCallId);
13338 if (stat != ASN_OK) return stat;
13339
13340 invokeEndElement (pctxt, "globalCallId", -1);
13341 }
13342
13343 /* decode threadId */
13344
13345 if (pvalue->m.threadIdPresent) {
13346 invokeStartElement (pctxt, "threadId", -1);
13347
13348 stat = asn1PD_H225GloballyUniqueID (pctxt, &pvalue->threadId);
13349 if (stat != ASN_OK) return stat;
13350
13351 invokeEndElement (pctxt, "threadId", -1);
13352 }
13353
13354 if (extbit) {
13355
13356 /* decode extension optional bits length */
13357
13358 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13359 if (stat != ASN_OK) return stat;
13360
13361 bitcnt += 1;
13362
13363 ZEROCONTEXT (&lctxt);
13364 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13365 if (stat != ASN_OK) return stat;
13366
13367 stat = moveBitCursor (pctxt, bitcnt);
13368 if (stat != ASN_OK) return stat;
13369
13370 for (i = 0; i < bitcnt; i++) {
13371 DECODEBIT (&lctxt, &optbit);
13372
13373 if (optbit) {
13374 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13375 if (stat != ASN_OK) return stat;
13376
13377 pctxt->buffer.byteIndex += openType.numocts;
13378 }
13379 }
13380 }
13381
13382 return (stat);
13383 }
13384
13385 /**************************************************************/
13386 /* */
13387 /* H323_UU_PDU_tunnelledSignallingMessage_messageContent */
13388 /* */
13389 /**************************************************************/
13390
13391 EXTERN int asn1PD_H225H323_UU_PDU_tunnelledSignallingMessage_messageContent (OOCTXT* pctxt, H225H323_UU_PDU_tunnelledSignallingMessage_messageContent* pvalue)
13392 {
13393 int stat = ASN_OK;
13394 ASN1UINT xx1;
13395
13396 /* decode length determinant */
13397
13398 stat = decodeLength (pctxt, &pvalue->n);
13399 if (stat != ASN_OK) return stat;
13400
13401 /* decode elements */
13402
13403 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1DynOctStr);
13404
13405 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
13406 invokeStartElement (pctxt, "elem", xx1);
13407
13408 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->elem[xx1]);
13409 if (stat != ASN_OK) return stat;
13410 invokeOctStrValue (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
13411 invokeEndElement (pctxt, "elem", xx1);
13412
13413 }
13414
13415 return (stat);
13416 }
13417
13418 /**************************************************************/
13419 /* */
13420 /* H323_UU_PDU_tunnelledSignallingMessage */
13421 /* */
13422 /**************************************************************/
13423
13424 EXTERN int asn1PD_H225H323_UU_PDU_tunnelledSignallingMessage (OOCTXT* pctxt, H225H323_UU_PDU_tunnelledSignallingMessage* pvalue)
13425 {
13426 int stat = ASN_OK;
13427 OOCTXT lctxt;
13428 ASN1OpenType openType;
13429 ASN1UINT bitcnt;
13430 ASN1UINT i;
13431 ASN1BOOL optbit = 0;
13432 ASN1BOOL extbit = 0;
13433
13434 /* extension bit */
13435
13436 DECODEBIT (pctxt, &extbit);
13437
13438 /* optional bits */
13439
13440 memset (&pvalue->m, 0, sizeof(pvalue->m));
13441
13442 DECODEBIT (pctxt, &optbit);
13443 pvalue->m.tunnellingRequiredPresent = optbit;
13444
13445 DECODEBIT (pctxt, &optbit);
13446 pvalue->m.nonStandardDataPresent = optbit;
13447
13448 /* decode tunnelledProtocolID */
13449
13450 invokeStartElement (pctxt, "tunnelledProtocolID", -1);
13451
13452 stat = asn1PD_H225TunnelledProtocol (pctxt, &pvalue->tunnelledProtocolID);
13453 if (stat != ASN_OK) return stat;
13454
13455 invokeEndElement (pctxt, "tunnelledProtocolID", -1);
13456
13457 /* decode messageContent */
13458
13459 invokeStartElement (pctxt, "messageContent", -1);
13460
13461 stat = asn1PD_H225H323_UU_PDU_tunnelledSignallingMessage_messageContent (pctxt, &pvalue->messageContent);
13462 if (stat != ASN_OK) return stat;
13463
13464 invokeEndElement (pctxt, "messageContent", -1);
13465
13466 /* decode tunnellingRequired */
13467
13468 if (pvalue->m.tunnellingRequiredPresent) {
13469 invokeStartElement (pctxt, "tunnellingRequired", -1);
13470
13471 /* NULL */
13472 invokeNullValue (pctxt);
13473
13474 invokeEndElement (pctxt, "tunnellingRequired", -1);
13475 }
13476
13477 /* decode nonStandardData */
13478
13479 if (pvalue->m.nonStandardDataPresent) {
13480 invokeStartElement (pctxt, "nonStandardData", -1);
13481
13482 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
13483 if (stat != ASN_OK) return stat;
13484
13485 invokeEndElement (pctxt, "nonStandardData", -1);
13486 }
13487
13488 if (extbit) {
13489
13490 /* decode extension optional bits length */
13491
13492 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13493 if (stat != ASN_OK) return stat;
13494
13495 bitcnt += 1;
13496
13497 ZEROCONTEXT (&lctxt);
13498 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13499 if (stat != ASN_OK) return stat;
13500
13501 stat = moveBitCursor (pctxt, bitcnt);
13502 if (stat != ASN_OK) return stat;
13503
13504 for (i = 0; i < bitcnt; i++) {
13505 DECODEBIT (&lctxt, &optbit);
13506
13507 if (optbit) {
13508 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13509 if (stat != ASN_OK) return stat;
13510
13511 pctxt->buffer.byteIndex += openType.numocts;
13512 }
13513 }
13514 }
13515
13516 return (stat);
13517 }
13518
13519 /**************************************************************/
13520 /* */
13521 /* StimulusControl */
13522 /* */
13523 /**************************************************************/
13524
13525 EXTERN int asn1PD_H225StimulusControl (OOCTXT* pctxt, H225StimulusControl* pvalue)
13526 {
13527 int stat = ASN_OK;
13528 OOCTXT lctxt;
13529 ASN1OpenType openType;
13530 ASN1UINT bitcnt;
13531 ASN1UINT i;
13532 ASN1BOOL optbit = 0;
13533 ASN1BOOL extbit = 0;
13534
13535 /* extension bit */
13536
13537 DECODEBIT (pctxt, &extbit);
13538
13539 /* optional bits */
13540
13541 memset (&pvalue->m, 0, sizeof(pvalue->m));
13542
13543 DECODEBIT (pctxt, &optbit);
13544 pvalue->m.nonStandardPresent = optbit;
13545
13546 DECODEBIT (pctxt, &optbit);
13547 pvalue->m.isTextPresent = optbit;
13548
13549 DECODEBIT (pctxt, &optbit);
13550 pvalue->m.h248MessagePresent = optbit;
13551
13552 /* decode nonStandard */
13553
13554 if (pvalue->m.nonStandardPresent) {
13555 invokeStartElement (pctxt, "nonStandard", -1);
13556
13557 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandard);
13558 if (stat != ASN_OK) return stat;
13559
13560 invokeEndElement (pctxt, "nonStandard", -1);
13561 }
13562
13563 /* decode isText */
13564
13565 if (pvalue->m.isTextPresent) {
13566 invokeStartElement (pctxt, "isText", -1);
13567
13568 /* NULL */
13569 invokeNullValue (pctxt);
13570
13571 invokeEndElement (pctxt, "isText", -1);
13572 }
13573
13574 /* decode h248Message */
13575
13576 if (pvalue->m.h248MessagePresent) {
13577 invokeStartElement (pctxt, "h248Message", -1);
13578
13579 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->h248Message);
13580 if (stat != ASN_OK) return stat;
13581 invokeOctStrValue (pctxt, pvalue->h248Message.numocts, pvalue->h248Message.data);
13582
13583 invokeEndElement (pctxt, "h248Message", -1);
13584 }
13585
13586 if (extbit) {
13587
13588 /* decode extension optional bits length */
13589
13590 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13591 if (stat != ASN_OK) return stat;
13592
13593 bitcnt += 1;
13594
13595 ZEROCONTEXT (&lctxt);
13596 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13597 if (stat != ASN_OK) return stat;
13598
13599 stat = moveBitCursor (pctxt, bitcnt);
13600 if (stat != ASN_OK) return stat;
13601
13602 for (i = 0; i < bitcnt; i++) {
13603 DECODEBIT (&lctxt, &optbit);
13604
13605 if (optbit) {
13606 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13607 if (stat != ASN_OK) return stat;
13608
13609 pctxt->buffer.byteIndex += openType.numocts;
13610 }
13611 }
13612 }
13613
13614 return (stat);
13615 }
13616
13617 /**************************************************************/
13618 /* */
13619 /* H323_UU_PDU */
13620 /* */
13621 /**************************************************************/
13622
13623 EXTERN int asn1PD_H225H323_UU_PDU (OOCTXT* pctxt, H225H323_UU_PDU* pvalue)
13624 {
13625 int stat = ASN_OK;
13626 OOCTXT lctxt;
13627 OOCTXT lctxt2;
13628 ASN1OpenType openType;
13629 ASN1UINT bitcnt;
13630 ASN1UINT i;
13631 ASN1BOOL optbit = 0;
13632 ASN1BOOL extbit = 0;
13633
13634 /* extension bit */
13635
13636 DECODEBIT (pctxt, &extbit);
13637
13638 /* optional bits */
13639
13640 memset (&pvalue->m, 0, sizeof(pvalue->m));
13641
13642 DECODEBIT (pctxt, &optbit);
13643 pvalue->m.nonStandardDataPresent = optbit;
13644
13645 /* decode h323_message_body */
13646
13647 invokeStartElement (pctxt, "h323_message_body", -1);
13648
13649 stat = asn1PD_H225H323_UU_PDU_h323_message_body (pctxt, &pvalue->h323_message_body);
13650 if (stat != ASN_OK) return stat;
13651
13652 invokeEndElement (pctxt, "h323_message_body", -1);
13653
13654 /* decode nonStandardData */
13655
13656 if (pvalue->m.nonStandardDataPresent) {
13657 invokeStartElement (pctxt, "nonStandardData", -1);
13658
13659 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
13660 if (stat != ASN_OK) return stat;
13661
13662 invokeEndElement (pctxt, "nonStandardData", -1);
13663 }
13664
13665 if (extbit) {
13666
13667 /* decode extension optional bits length */
13668
13669 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13670 if (stat != ASN_OK) return stat;
13671
13672 bitcnt += 1;
13673
13674 ZEROCONTEXT (&lctxt);
13675 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13676 if (stat != ASN_OK) return stat;
13677
13678 stat = moveBitCursor (pctxt, bitcnt);
13679 if (stat != ASN_OK) return stat;
13680
13681 for (i = 0; i < bitcnt; i++) {
13682 DECODEBIT (&lctxt, &optbit);
13683
13684 if (optbit) {
13685 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13686 if (stat != ASN_OK) return stat;
13687
13688 if (i < 9 && openType.numocts > 0) { /* known element */
13689 copyContext (&lctxt2, pctxt);
13690 initContextBuffer (pctxt, openType.data, openType.numocts);
13691
13692 switch (i) {
13693 case 0:
13694 pvalue->m.h4501SupplementaryServicePresent = 1;
13695
13696 invokeStartElement (pctxt, "h4501SupplementaryService", -1);
13697
13698 stat = asn1PD_H225H323_UU_PDU_h4501SupplementaryService (pctxt, &pvalue->h4501SupplementaryService);
13699 if (stat != ASN_OK) return stat;
13700
13701 invokeEndElement (pctxt, "h4501SupplementaryService", -1);
13702 break;
13703
13704 case 1:
13705 pvalue->m.h245TunnelingPresent = 1;
13706
13707 invokeStartElement (pctxt, "h245Tunneling", -1);
13708
13709 stat = DECODEBIT (pctxt, &pvalue->h245Tunneling);
13710 if (stat != ASN_OK) return stat;
13711 invokeBoolValue (pctxt, pvalue->h245Tunneling);
13712
13713 invokeEndElement (pctxt, "h245Tunneling", -1);
13714 break;
13715
13716 case 2:
13717 pvalue->m.h245ControlPresent = 1;
13718
13719 invokeStartElement (pctxt, "h245Control", -1);
13720
13721 stat = asn1PD_H225H323_UU_PDU_h245Control (pctxt, &pvalue->h245Control);
13722 if (stat != ASN_OK) return stat;
13723
13724 invokeEndElement (pctxt, "h245Control", -1);
13725 break;
13726
13727 case 3:
13728 pvalue->m.nonStandardControlPresent = 1;
13729
13730 invokeStartElement (pctxt, "nonStandardControl", -1);
13731
13732 stat = asn1PD_H225_SeqOfH225NonStandardParameter (pctxt, &pvalue->nonStandardControl);
13733 if (stat != ASN_OK) return stat;
13734
13735 invokeEndElement (pctxt, "nonStandardControl", -1);
13736 break;
13737
13738 case 4:
13739 pvalue->m.callLinkagePresent = 1;
13740
13741 invokeStartElement (pctxt, "callLinkage", -1);
13742
13743 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
13744 if (stat != ASN_OK) return stat;
13745
13746 invokeEndElement (pctxt, "callLinkage", -1);
13747 break;
13748
13749 case 5:
13750 pvalue->m.tunnelledSignallingMessagePresent = 1;
13751
13752 invokeStartElement (pctxt, "tunnelledSignallingMessage", -1);
13753
13754 stat = asn1PD_H225H323_UU_PDU_tunnelledSignallingMessage (pctxt, &pvalue->tunnelledSignallingMessage);
13755 if (stat != ASN_OK) return stat;
13756
13757 invokeEndElement (pctxt, "tunnelledSignallingMessage", -1);
13758 break;
13759
13760 case 6:
13761 pvalue->m.provisionalRespToH245TunnelingPresent = 1;
13762
13763 invokeStartElement (pctxt, "provisionalRespToH245Tunneling", -1);
13764
13765 /* NULL */
13766 invokeNullValue (pctxt);
13767
13768 invokeEndElement (pctxt, "provisionalRespToH245Tunneling", -1);
13769 break;
13770
13771 case 7:
13772 pvalue->m.stimulusControlPresent = 1;
13773
13774 invokeStartElement (pctxt, "stimulusControl", -1);
13775
13776 stat = asn1PD_H225StimulusControl (pctxt, &pvalue->stimulusControl);
13777 if (stat != ASN_OK) return stat;
13778
13779 invokeEndElement (pctxt, "stimulusControl", -1);
13780 break;
13781
13782 case 8:
13783 pvalue->m.genericDataPresent = 1;
13784
13785 invokeStartElement (pctxt, "genericData", -1);
13786
13787 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
13788 if (stat != ASN_OK) return stat;
13789
13790 invokeEndElement (pctxt, "genericData", -1);
13791 break;
13792
13793 default:
13794 pctxt->buffer.byteIndex += openType.numocts;
13795 }
13796 copyContext (pctxt, &lctxt2);
13797 }
13798 else { /* unknown element */
13799 pctxt->buffer.byteIndex += openType.numocts;
13800 }
13801 }
13802 }
13803 }
13804
13805 return (stat);
13806 }
13807
13808 /**************************************************************/
13809 /* */
13810 /* H323_UserInformation_user_data */
13811 /* */
13812 /**************************************************************/
13813
13814 EXTERN int asn1PD_H225H323_UserInformation_user_data (OOCTXT* pctxt, H225H323_UserInformation_user_data* pvalue)
13815 {
13816 int stat = ASN_OK;
13817 OOCTXT lctxt;
13818 ASN1OpenType openType;
13819 ASN1UINT bitcnt;
13820 ASN1UINT i;
13821 ASN1BOOL optbit = 0;
13822 ASN1BOOL extbit = 0;
13823
13824 /* extension bit */
13825
13826 DECODEBIT (pctxt, &extbit);
13827
13828 /* decode protocol_discriminator */
13829
13830 invokeStartElement (pctxt, "protocol_discriminator", -1);
13831
13832 stat = decodeConsUInt8 (pctxt, &pvalue->protocol_discriminator, 0U, 255U);
13833 if (stat != ASN_OK) return stat;
13834 invokeUIntValue (pctxt, pvalue->protocol_discriminator);
13835
13836 invokeEndElement (pctxt, "protocol_discriminator", -1);
13837
13838 /* decode user_information */
13839
13840 invokeStartElement (pctxt, "user_information", -1);
13841
13842 stat = asn1PD_H225H323_UserInformation_user_data_user_information (pctxt, &pvalue->user_information);
13843 if (stat != ASN_OK) return stat;
13844
13845 invokeEndElement (pctxt, "user_information", -1);
13846
13847 if (extbit) {
13848
13849 /* decode extension optional bits length */
13850
13851 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13852 if (stat != ASN_OK) return stat;
13853
13854 bitcnt += 1;
13855
13856 ZEROCONTEXT (&lctxt);
13857 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13858 if (stat != ASN_OK) return stat;
13859
13860 stat = moveBitCursor (pctxt, bitcnt);
13861 if (stat != ASN_OK) return stat;
13862
13863 for (i = 0; i < bitcnt; i++) {
13864 DECODEBIT (&lctxt, &optbit);
13865
13866 if (optbit) {
13867 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13868 if (stat != ASN_OK) return stat;
13869
13870 pctxt->buffer.byteIndex += openType.numocts;
13871 }
13872 }
13873 }
13874
13875 return (stat);
13876 }
13877
13878 /**************************************************************/
13879 /* */
13880 /* H323_UserInformation */
13881 /* */
13882 /**************************************************************/
13883
13884 EXTERN int asn1PD_H225H323_UserInformation (OOCTXT* pctxt, H225H323_UserInformation* pvalue)
13885 {
13886 int stat = ASN_OK;
13887 OOCTXT lctxt;
13888 ASN1OpenType openType;
13889 ASN1UINT bitcnt;
13890 ASN1UINT i;
13891 ASN1BOOL optbit = 0;
13892 ASN1BOOL extbit = 0;
13893
13894 /* extension bit */
13895
13896 DECODEBIT (pctxt, &extbit);
13897
13898 /* optional bits */
13899
13900 memset (&pvalue->m, 0, sizeof(pvalue->m));
13901
13902 DECODEBIT (pctxt, &optbit);
13903 pvalue->m.user_dataPresent = optbit;
13904
13905 /* decode h323_uu_pdu */
13906
13907 invokeStartElement (pctxt, "h323_uu_pdu", -1);
13908
13909 stat = asn1PD_H225H323_UU_PDU (pctxt, &pvalue->h323_uu_pdu);
13910 if (stat != ASN_OK) return stat;
13911
13912 invokeEndElement (pctxt, "h323_uu_pdu", -1);
13913
13914 /* decode user_data */
13915
13916 if (pvalue->m.user_dataPresent) {
13917 invokeStartElement (pctxt, "user_data", -1);
13918
13919 stat = asn1PD_H225H323_UserInformation_user_data (pctxt, &pvalue->user_data);
13920 if (stat != ASN_OK) return stat;
13921
13922 invokeEndElement (pctxt, "user_data", -1);
13923 }
13924
13925 if (extbit) {
13926
13927 /* decode extension optional bits length */
13928
13929 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
13930 if (stat != ASN_OK) return stat;
13931
13932 bitcnt += 1;
13933
13934 ZEROCONTEXT (&lctxt);
13935 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
13936 if (stat != ASN_OK) return stat;
13937
13938 stat = moveBitCursor (pctxt, bitcnt);
13939 if (stat != ASN_OK) return stat;
13940
13941 for (i = 0; i < bitcnt; i++) {
13942 DECODEBIT (&lctxt, &optbit);
13943
13944 if (optbit) {
13945 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
13946 if (stat != ASN_OK) return stat;
13947
13948 pctxt->buffer.byteIndex += openType.numocts;
13949 }
13950 }
13951 }
13952
13953 return (stat);
13954 }
13955
13956 /**************************************************************/
13957 /* */
13958 /* AddressPattern_range */
13959 /* */
13960 /**************************************************************/
13961
13962 EXTERN int asn1PD_H225AddressPattern_range (OOCTXT* pctxt, H225AddressPattern_range* pvalue)
13963 {
13964 int stat = ASN_OK;
13965
13966 /* decode startOfRange */
13967
13968 invokeStartElement (pctxt, "startOfRange", -1);
13969
13970 stat = asn1PD_H225PartyNumber (pctxt, &pvalue->startOfRange);
13971 if (stat != ASN_OK) return stat;
13972
13973 invokeEndElement (pctxt, "startOfRange", -1);
13974
13975 /* decode endOfRange */
13976
13977 invokeStartElement (pctxt, "endOfRange", -1);
13978
13979 stat = asn1PD_H225PartyNumber (pctxt, &pvalue->endOfRange);
13980 if (stat != ASN_OK) return stat;
13981
13982 invokeEndElement (pctxt, "endOfRange", -1);
13983
13984 return (stat);
13985 }
13986
13987 /**************************************************************/
13988 /* */
13989 /* AddressPattern */
13990 /* */
13991 /**************************************************************/
13992
13993 EXTERN int asn1PD_H225AddressPattern (OOCTXT* pctxt, H225AddressPattern* pvalue)
13994 {
13995 int stat = ASN_OK;
13996 ASN1UINT ui;
13997 ASN1OpenType openType;
13998 ASN1BOOL extbit = 0;
13999
14000 /* extension bit */
14001
14002 DECODEBIT (pctxt, &extbit);
14003
14004 if (!extbit) {
14005 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
14006 if (stat != ASN_OK) return stat;
14007 else pvalue->t = ui + 1;
14008
14009 switch (ui) {
14010 /* wildcard */
14011 case 0:
14012 invokeStartElement (pctxt, "wildcard", -1);
14013
14014 pvalue->u.wildcard = ALLOC_ASN1ELEM (pctxt, H225AliasAddress);
14015
14016 stat = asn1PD_H225AliasAddress (pctxt, pvalue->u.wildcard);
14017 if (stat != ASN_OK) return stat;
14018
14019 invokeEndElement (pctxt, "wildcard", -1);
14020
14021 break;
14022
14023 /* range */
14024 case 1:
14025 invokeStartElement (pctxt, "range", -1);
14026
14027 pvalue->u.range = ALLOC_ASN1ELEM (pctxt, H225AddressPattern_range);
14028
14029 stat = asn1PD_H225AddressPattern_range (pctxt, pvalue->u.range);
14030 if (stat != ASN_OK) return stat;
14031
14032 invokeEndElement (pctxt, "range", -1);
14033
14034 break;
14035
14036 default:
14037 return ASN_E_INVOPT;
14038 }
14039 }
14040 else {
14041 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
14042 if (stat != ASN_OK) return stat;
14043 else pvalue->t = ui + 3;
14044
14045 stat = decodeByteAlign (pctxt);
14046 if (stat != ASN_OK) return stat;
14047
14048 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14049 if (stat != ASN_OK) return stat;
14050
14051 }
14052
14053 return (stat);
14054 }
14055
14056 /**************************************************************/
14057 /* */
14058 /* _SeqOfH225TransportAddress */
14059 /* */
14060 /**************************************************************/
14061
14062 EXTERN int asn1PD_H225_SeqOfH225TransportAddress (OOCTXT* pctxt, H225_SeqOfH225TransportAddress* pvalue)
14063 {
14064 int stat = ASN_OK;
14065 H225TransportAddress* pdata;
14066 ASN1UINT count = 0;
14067 ASN1UINT xx1;
14068 int lstat;
14069
14070 dListInit (pvalue);
14071
14072 for (;;) {
14073 /* decode length determinant */
14074
14075 lstat = decodeLength (pctxt, &count);
14076 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
14077 return lstat;
14078 }
14079
14080 /* decode elements */
14081
14082 for (xx1 = 0; xx1 < count; xx1++) {
14083 invokeStartElement (pctxt, "elem", xx1);
14084
14085 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225TransportAddress);
14086
14087 stat = asn1PD_H225TransportAddress (pctxt, pdata);
14088 if (stat != ASN_OK) return stat;
14089 invokeEndElement (pctxt, "elem", xx1);
14090
14091 dListAppendNode (pctxt, pvalue, pdata);
14092 }
14093
14094 if(lstat == ASN_OK) break;
14095 }
14096
14097 return (stat);
14098 }
14099
14100 /**************************************************************/
14101 /* */
14102 /* AlternateTransportAddresses */
14103 /* */
14104 /**************************************************************/
14105
14106 EXTERN int asn1PD_H225AlternateTransportAddresses (OOCTXT* pctxt, H225AlternateTransportAddresses* pvalue)
14107 {
14108 int stat = ASN_OK;
14109 OOCTXT lctxt;
14110 OOCTXT lctxt2;
14111 ASN1OpenType openType;
14112 ASN1UINT bitcnt;
14113 ASN1UINT i;
14114 ASN1BOOL optbit = 0;
14115 ASN1BOOL extbit = 0;
14116
14117 /* extension bit */
14118
14119 DECODEBIT (pctxt, &extbit);
14120
14121 /* optional bits */
14122
14123 memset (&pvalue->m, 0, sizeof(pvalue->m));
14124
14125 DECODEBIT (pctxt, &optbit);
14126 pvalue->m.annexEPresent = optbit;
14127
14128 /* decode annexE */
14129
14130 if (pvalue->m.annexEPresent) {
14131 invokeStartElement (pctxt, "annexE", -1);
14132
14133 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->annexE);
14134 if (stat != ASN_OK) return stat;
14135
14136 invokeEndElement (pctxt, "annexE", -1);
14137 }
14138
14139 if (extbit) {
14140
14141 /* decode extension optional bits length */
14142
14143 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
14144 if (stat != ASN_OK) return stat;
14145
14146 bitcnt += 1;
14147
14148 ZEROCONTEXT (&lctxt);
14149 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
14150 if (stat != ASN_OK) return stat;
14151
14152 stat = moveBitCursor (pctxt, bitcnt);
14153 if (stat != ASN_OK) return stat;
14154
14155 for (i = 0; i < bitcnt; i++) {
14156 DECODEBIT (&lctxt, &optbit);
14157
14158 if (optbit) {
14159 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14160 if (stat != ASN_OK) return stat;
14161
14162 if (i < 1 && openType.numocts > 0) { /* known element */
14163 copyContext (&lctxt2, pctxt);
14164 initContextBuffer (pctxt, openType.data, openType.numocts);
14165
14166 switch (i) {
14167 case 0:
14168 pvalue->m.sctpPresent = 1;
14169
14170 invokeStartElement (pctxt, "sctp", -1);
14171
14172 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->sctp);
14173 if (stat != ASN_OK) return stat;
14174
14175 invokeEndElement (pctxt, "sctp", -1);
14176 break;
14177
14178 default:
14179 pctxt->buffer.byteIndex += openType.numocts;
14180 }
14181 copyContext (pctxt, &lctxt2);
14182 }
14183 else { /* unknown element */
14184 pctxt->buffer.byteIndex += openType.numocts;
14185 }
14186 }
14187 }
14188 }
14189
14190 return (stat);
14191 }
14192
14193 /**************************************************************/
14194 /* */
14195 /* Endpoint */
14196 /* */
14197 /**************************************************************/
14198
14199 EXTERN int asn1PD_H225Endpoint (OOCTXT* pctxt, H225Endpoint* pvalue)
14200 {
14201 int stat = ASN_OK;
14202 OOCTXT lctxt;
14203 OOCTXT lctxt2;
14204 ASN1OpenType openType;
14205 ASN1UINT bitcnt;
14206 ASN1UINT i;
14207 ASN1BOOL optbit = 0;
14208 ASN1BOOL extbit = 0;
14209
14210 /* extension bit */
14211
14212 DECODEBIT (pctxt, &extbit);
14213
14214 /* optional bits */
14215
14216 memset (&pvalue->m, 0, sizeof(pvalue->m));
14217
14218 DECODEBIT (pctxt, &optbit);
14219 pvalue->m.nonStandardDataPresent = optbit;
14220
14221 DECODEBIT (pctxt, &optbit);
14222 pvalue->m.aliasAddressPresent = optbit;
14223
14224 DECODEBIT (pctxt, &optbit);
14225 pvalue->m.callSignalAddressPresent = optbit;
14226
14227 DECODEBIT (pctxt, &optbit);
14228 pvalue->m.rasAddressPresent = optbit;
14229
14230 DECODEBIT (pctxt, &optbit);
14231 pvalue->m.endpointTypePresent = optbit;
14232
14233 DECODEBIT (pctxt, &optbit);
14234 pvalue->m.tokensPresent = optbit;
14235
14236 DECODEBIT (pctxt, &optbit);
14237 pvalue->m.cryptoTokensPresent = optbit;
14238
14239 DECODEBIT (pctxt, &optbit);
14240 pvalue->m.priorityPresent = optbit;
14241
14242 DECODEBIT (pctxt, &optbit);
14243 pvalue->m.remoteExtensionAddressPresent = optbit;
14244
14245 DECODEBIT (pctxt, &optbit);
14246 pvalue->m.destExtraCallInfoPresent = optbit;
14247
14248 /* decode nonStandardData */
14249
14250 if (pvalue->m.nonStandardDataPresent) {
14251 invokeStartElement (pctxt, "nonStandardData", -1);
14252
14253 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
14254 if (stat != ASN_OK) return stat;
14255
14256 invokeEndElement (pctxt, "nonStandardData", -1);
14257 }
14258
14259 /* decode aliasAddress */
14260
14261 if (pvalue->m.aliasAddressPresent) {
14262 invokeStartElement (pctxt, "aliasAddress", -1);
14263
14264 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->aliasAddress);
14265 if (stat != ASN_OK) return stat;
14266
14267 invokeEndElement (pctxt, "aliasAddress", -1);
14268 }
14269
14270 /* decode callSignalAddress */
14271
14272 if (pvalue->m.callSignalAddressPresent) {
14273 invokeStartElement (pctxt, "callSignalAddress", -1);
14274
14275 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
14276 if (stat != ASN_OK) return stat;
14277
14278 invokeEndElement (pctxt, "callSignalAddress", -1);
14279 }
14280
14281 /* decode rasAddress */
14282
14283 if (pvalue->m.rasAddressPresent) {
14284 invokeStartElement (pctxt, "rasAddress", -1);
14285
14286 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->rasAddress);
14287 if (stat != ASN_OK) return stat;
14288
14289 invokeEndElement (pctxt, "rasAddress", -1);
14290 }
14291
14292 /* decode endpointType */
14293
14294 if (pvalue->m.endpointTypePresent) {
14295 invokeStartElement (pctxt, "endpointType", -1);
14296
14297 stat = asn1PD_H225EndpointType (pctxt, &pvalue->endpointType);
14298 if (stat != ASN_OK) return stat;
14299
14300 invokeEndElement (pctxt, "endpointType", -1);
14301 }
14302
14303 /* decode tokens */
14304
14305 if (pvalue->m.tokensPresent) {
14306 invokeStartElement (pctxt, "tokens", -1);
14307
14308 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
14309 if (stat != ASN_OK) return stat;
14310
14311 invokeEndElement (pctxt, "tokens", -1);
14312 }
14313
14314 /* decode cryptoTokens */
14315
14316 if (pvalue->m.cryptoTokensPresent) {
14317 invokeStartElement (pctxt, "cryptoTokens", -1);
14318
14319 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
14320 if (stat != ASN_OK) return stat;
14321
14322 invokeEndElement (pctxt, "cryptoTokens", -1);
14323 }
14324
14325 /* decode priority */
14326
14327 if (pvalue->m.priorityPresent) {
14328 invokeStartElement (pctxt, "priority", -1);
14329
14330 stat = decodeConsUInt8 (pctxt, &pvalue->priority, 0U, 127U);
14331 if (stat != ASN_OK) return stat;
14332 invokeUIntValue (pctxt, pvalue->priority);
14333
14334 invokeEndElement (pctxt, "priority", -1);
14335 }
14336
14337 /* decode remoteExtensionAddress */
14338
14339 if (pvalue->m.remoteExtensionAddressPresent) {
14340 invokeStartElement (pctxt, "remoteExtensionAddress", -1);
14341
14342 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
14343 if (stat != ASN_OK) return stat;
14344
14345 invokeEndElement (pctxt, "remoteExtensionAddress", -1);
14346 }
14347
14348 /* decode destExtraCallInfo */
14349
14350 if (pvalue->m.destExtraCallInfoPresent) {
14351 invokeStartElement (pctxt, "destExtraCallInfo", -1);
14352
14353 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
14354 if (stat != ASN_OK) return stat;
14355
14356 invokeEndElement (pctxt, "destExtraCallInfo", -1);
14357 }
14358
14359 if (extbit) {
14360
14361 /* decode extension optional bits length */
14362
14363 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
14364 if (stat != ASN_OK) return stat;
14365
14366 bitcnt += 1;
14367
14368 ZEROCONTEXT (&lctxt);
14369 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
14370 if (stat != ASN_OK) return stat;
14371
14372 stat = moveBitCursor (pctxt, bitcnt);
14373 if (stat != ASN_OK) return stat;
14374
14375 for (i = 0; i < bitcnt; i++) {
14376 DECODEBIT (&lctxt, &optbit);
14377
14378 if (optbit) {
14379 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14380 if (stat != ASN_OK) return stat;
14381
14382 if (i < 3 && openType.numocts > 0) { /* known element */
14383 copyContext (&lctxt2, pctxt);
14384 initContextBuffer (pctxt, openType.data, openType.numocts);
14385
14386 switch (i) {
14387 case 0:
14388 pvalue->m.alternateTransportAddressesPresent = 1;
14389
14390 invokeStartElement (pctxt, "alternateTransportAddresses", -1);
14391
14392 stat = asn1PD_H225AlternateTransportAddresses (pctxt, &pvalue->alternateTransportAddresses);
14393 if (stat != ASN_OK) return stat;
14394
14395 invokeEndElement (pctxt, "alternateTransportAddresses", -1);
14396 break;
14397
14398 case 1:
14399 pvalue->m.circuitInfoPresent = 1;
14400
14401 invokeStartElement (pctxt, "circuitInfo", -1);
14402
14403 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
14404 if (stat != ASN_OK) return stat;
14405
14406 invokeEndElement (pctxt, "circuitInfo", -1);
14407 break;
14408
14409 case 2:
14410 pvalue->m.featureSetPresent = 1;
14411
14412 invokeStartElement (pctxt, "featureSet", -1);
14413
14414 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
14415 if (stat != ASN_OK) return stat;
14416
14417 invokeEndElement (pctxt, "featureSet", -1);
14418 break;
14419
14420 default:
14421 pctxt->buffer.byteIndex += openType.numocts;
14422 }
14423 copyContext (pctxt, &lctxt2);
14424 }
14425 else { /* unknown element */
14426 pctxt->buffer.byteIndex += openType.numocts;
14427 }
14428 }
14429 }
14430 }
14431
14432 return (stat);
14433 }
14434
14435 /**************************************************************/
14436 /* */
14437 /* UseSpecifiedTransport */
14438 /* */
14439 /**************************************************************/
14440
14441 EXTERN int asn1PD_H225UseSpecifiedTransport (OOCTXT* pctxt, H225UseSpecifiedTransport* pvalue)
14442 {
14443 int stat = ASN_OK;
14444 ASN1UINT ui;
14445 ASN1OpenType openType;
14446 ASN1BOOL extbit = 0;
14447 OOCTXT lctxt;
14448
14449 /* extension bit */
14450
14451 DECODEBIT (pctxt, &extbit);
14452
14453 if (!extbit) {
14454 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
14455 if (stat != ASN_OK) return stat;
14456 else pvalue->t = ui + 1;
14457
14458 switch (ui) {
14459 /* tcp */
14460 case 0:
14461 invokeStartElement (pctxt, "tcp", -1);
14462
14463 /* NULL */
14464 invokeNullValue (pctxt);
14465
14466 invokeEndElement (pctxt, "tcp", -1);
14467
14468 break;
14469
14470 /* annexE */
14471 case 1:
14472 invokeStartElement (pctxt, "annexE", -1);
14473
14474 /* NULL */
14475 invokeNullValue (pctxt);
14476
14477 invokeEndElement (pctxt, "annexE", -1);
14478
14479 break;
14480
14481 default:
14482 return ASN_E_INVOPT;
14483 }
14484 }
14485 else {
14486 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
14487 if (stat != ASN_OK) return stat;
14488 else pvalue->t = ui + 3;
14489
14490 stat = decodeByteAlign (pctxt);
14491 if (stat != ASN_OK) return stat;
14492
14493 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14494 if (stat != ASN_OK) return stat;
14495
14496 copyContext (&lctxt, pctxt);
14497 initContextBuffer (pctxt, openType.data, openType.numocts);
14498
14499 switch (pvalue->t) {
14500 /* sctp */
14501 case 3:
14502 invokeStartElement (pctxt, "sctp", -1);
14503
14504 /* NULL */
14505 invokeNullValue (pctxt);
14506
14507 invokeEndElement (pctxt, "sctp", -1);
14508
14509 break;
14510
14511 default:;
14512 }
14513
14514 copyContext (pctxt, &lctxt);
14515 }
14516
14517 return (stat);
14518 }
14519
14520 /**************************************************************/
14521 /* */
14522 /* AlternateGK */
14523 /* */
14524 /**************************************************************/
14525
14526 EXTERN int asn1PD_H225AlternateGK (OOCTXT* pctxt, H225AlternateGK* pvalue)
14527 {
14528 int stat = ASN_OK;
14529 OOCTXT lctxt;
14530 ASN1OpenType openType;
14531 ASN1UINT bitcnt;
14532 ASN1UINT i;
14533 ASN1BOOL optbit = 0;
14534 ASN1BOOL extbit = 0;
14535
14536 /* extension bit */
14537
14538 DECODEBIT (pctxt, &extbit);
14539
14540 /* optional bits */
14541
14542 memset (&pvalue->m, 0, sizeof(pvalue->m));
14543
14544 DECODEBIT (pctxt, &optbit);
14545 pvalue->m.gatekeeperIdentifierPresent = optbit;
14546
14547 /* decode rasAddress */
14548
14549 invokeStartElement (pctxt, "rasAddress", -1);
14550
14551 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->rasAddress);
14552 if (stat != ASN_OK) return stat;
14553
14554 invokeEndElement (pctxt, "rasAddress", -1);
14555
14556 /* decode gatekeeperIdentifier */
14557
14558 if (pvalue->m.gatekeeperIdentifierPresent) {
14559 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
14560
14561 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
14562 if (stat != ASN_OK) return stat;
14563
14564 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
14565 }
14566
14567 /* decode needToRegister */
14568
14569 invokeStartElement (pctxt, "needToRegister", -1);
14570
14571 stat = DECODEBIT (pctxt, &pvalue->needToRegister);
14572 if (stat != ASN_OK) return stat;
14573 invokeBoolValue (pctxt, pvalue->needToRegister);
14574
14575 invokeEndElement (pctxt, "needToRegister", -1);
14576
14577 /* decode priority */
14578
14579 invokeStartElement (pctxt, "priority", -1);
14580
14581 stat = decodeConsUInt8 (pctxt, &pvalue->priority, 0U, 127U);
14582 if (stat != ASN_OK) return stat;
14583 invokeUIntValue (pctxt, pvalue->priority);
14584
14585 invokeEndElement (pctxt, "priority", -1);
14586
14587 if (extbit) {
14588
14589 /* decode extension optional bits length */
14590
14591 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
14592 if (stat != ASN_OK) return stat;
14593
14594 bitcnt += 1;
14595
14596 ZEROCONTEXT (&lctxt);
14597 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
14598 if (stat != ASN_OK) return stat;
14599
14600 stat = moveBitCursor (pctxt, bitcnt);
14601 if (stat != ASN_OK) return stat;
14602
14603 for (i = 0; i < bitcnt; i++) {
14604 DECODEBIT (&lctxt, &optbit);
14605
14606 if (optbit) {
14607 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14608 if (stat != ASN_OK) return stat;
14609
14610 pctxt->buffer.byteIndex += openType.numocts;
14611 }
14612 }
14613 }
14614
14615 return (stat);
14616 }
14617
14618 /**************************************************************/
14619 /* */
14620 /* _SeqOfH225AlternateGK */
14621 /* */
14622 /**************************************************************/
14623
14624 EXTERN int asn1PD_H225_SeqOfH225AlternateGK (OOCTXT* pctxt, H225_SeqOfH225AlternateGK* pvalue)
14625 {
14626 int stat = ASN_OK;
14627 H225AlternateGK* pdata;
14628 ASN1UINT count = 0;
14629 ASN1UINT xx1;
14630 int lstat;
14631
14632 dListInit (pvalue);
14633
14634 for (;;) {
14635 /* decode length determinant */
14636
14637 lstat = decodeLength (pctxt, &count);
14638 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
14639 return lstat;
14640 }
14641
14642 /* decode elements */
14643
14644 for (xx1 = 0; xx1 < count; xx1++) {
14645 invokeStartElement (pctxt, "elem", xx1);
14646
14647 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225AlternateGK);
14648
14649 stat = asn1PD_H225AlternateGK (pctxt, pdata);
14650 if (stat != ASN_OK) return stat;
14651 invokeEndElement (pctxt, "elem", xx1);
14652
14653 dListAppendNode (pctxt, pvalue, pdata);
14654 }
14655
14656 if(lstat == ASN_OK) break;
14657 }
14658
14659 return (stat);
14660 }
14661
14662 /**************************************************************/
14663 /* */
14664 /* AltGKInfo */
14665 /* */
14666 /**************************************************************/
14667
14668 EXTERN int asn1PD_H225AltGKInfo (OOCTXT* pctxt, H225AltGKInfo* pvalue)
14669 {
14670 int stat = ASN_OK;
14671 OOCTXT lctxt;
14672 ASN1OpenType openType;
14673 ASN1UINT bitcnt;
14674 ASN1UINT i;
14675 ASN1BOOL optbit = 0;
14676 ASN1BOOL extbit = 0;
14677
14678 /* extension bit */
14679
14680 DECODEBIT (pctxt, &extbit);
14681
14682 /* decode alternateGatekeeper */
14683
14684 invokeStartElement (pctxt, "alternateGatekeeper", -1);
14685
14686 stat = asn1PD_H225_SeqOfH225AlternateGK (pctxt, &pvalue->alternateGatekeeper);
14687 if (stat != ASN_OK) return stat;
14688
14689 invokeEndElement (pctxt, "alternateGatekeeper", -1);
14690
14691 /* decode altGKisPermanent */
14692
14693 invokeStartElement (pctxt, "altGKisPermanent", -1);
14694
14695 stat = DECODEBIT (pctxt, &pvalue->altGKisPermanent);
14696 if (stat != ASN_OK) return stat;
14697 invokeBoolValue (pctxt, pvalue->altGKisPermanent);
14698
14699 invokeEndElement (pctxt, "altGKisPermanent", -1);
14700
14701 if (extbit) {
14702
14703 /* decode extension optional bits length */
14704
14705 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
14706 if (stat != ASN_OK) return stat;
14707
14708 bitcnt += 1;
14709
14710 ZEROCONTEXT (&lctxt);
14711 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
14712 if (stat != ASN_OK) return stat;
14713
14714 stat = moveBitCursor (pctxt, bitcnt);
14715 if (stat != ASN_OK) return stat;
14716
14717 for (i = 0; i < bitcnt; i++) {
14718 DECODEBIT (&lctxt, &optbit);
14719
14720 if (optbit) {
14721 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14722 if (stat != ASN_OK) return stat;
14723
14724 pctxt->buffer.byteIndex += openType.numocts;
14725 }
14726 }
14727 }
14728
14729 return (stat);
14730 }
14731
14732 /**************************************************************/
14733 /* */
14734 /* SecurityErrors2 */
14735 /* */
14736 /**************************************************************/
14737
14738 EXTERN int asn1PD_H225SecurityErrors2 (OOCTXT* pctxt, H225SecurityErrors2* pvalue)
14739 {
14740 int stat = ASN_OK;
14741 ASN1UINT ui;
14742 ASN1OpenType openType;
14743 ASN1BOOL extbit = 0;
14744
14745 /* extension bit */
14746
14747 DECODEBIT (pctxt, &extbit);
14748
14749 if (!extbit) {
14750 stat = decodeConsUnsigned (pctxt, &ui, 0, 5);
14751 if (stat != ASN_OK) return stat;
14752 else pvalue->t = ui + 1;
14753
14754 switch (ui) {
14755 /* securityWrongSyncTime */
14756 case 0:
14757 invokeStartElement (pctxt, "securityWrongSyncTime", -1);
14758
14759 /* NULL */
14760 invokeNullValue (pctxt);
14761
14762 invokeEndElement (pctxt, "securityWrongSyncTime", -1);
14763
14764 break;
14765
14766 /* securityReplay */
14767 case 1:
14768 invokeStartElement (pctxt, "securityReplay", -1);
14769
14770 /* NULL */
14771 invokeNullValue (pctxt);
14772
14773 invokeEndElement (pctxt, "securityReplay", -1);
14774
14775 break;
14776
14777 /* securityWrongGeneralID */
14778 case 2:
14779 invokeStartElement (pctxt, "securityWrongGeneralID", -1);
14780
14781 /* NULL */
14782 invokeNullValue (pctxt);
14783
14784 invokeEndElement (pctxt, "securityWrongGeneralID", -1);
14785
14786 break;
14787
14788 /* securityWrongSendersID */
14789 case 3:
14790 invokeStartElement (pctxt, "securityWrongSendersID", -1);
14791
14792 /* NULL */
14793 invokeNullValue (pctxt);
14794
14795 invokeEndElement (pctxt, "securityWrongSendersID", -1);
14796
14797 break;
14798
14799 /* securityIntegrityFailed */
14800 case 4:
14801 invokeStartElement (pctxt, "securityIntegrityFailed", -1);
14802
14803 /* NULL */
14804 invokeNullValue (pctxt);
14805
14806 invokeEndElement (pctxt, "securityIntegrityFailed", -1);
14807
14808 break;
14809
14810 /* securityWrongOID */
14811 case 5:
14812 invokeStartElement (pctxt, "securityWrongOID", -1);
14813
14814 /* NULL */
14815 invokeNullValue (pctxt);
14816
14817 invokeEndElement (pctxt, "securityWrongOID", -1);
14818
14819 break;
14820
14821 default:
14822 return ASN_E_INVOPT;
14823 }
14824 }
14825 else {
14826 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
14827 if (stat != ASN_OK) return stat;
14828 else pvalue->t = ui + 7;
14829
14830 stat = decodeByteAlign (pctxt);
14831 if (stat != ASN_OK) return stat;
14832
14833 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14834 if (stat != ASN_OK) return stat;
14835
14836 }
14837
14838 return (stat);
14839 }
14840
14841 /**************************************************************/
14842 /* */
14843 /* EncryptIntAlg */
14844 /* */
14845 /**************************************************************/
14846
14847 EXTERN int asn1PD_H225EncryptIntAlg (OOCTXT* pctxt, H225EncryptIntAlg* pvalue)
14848 {
14849 int stat = ASN_OK;
14850 ASN1UINT ui;
14851 ASN1OpenType openType;
14852 ASN1BOOL extbit = 0;
14853
14854 /* extension bit */
14855
14856 DECODEBIT (pctxt, &extbit);
14857
14858 if (!extbit) {
14859 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
14860 if (stat != ASN_OK) return stat;
14861 else pvalue->t = ui + 1;
14862
14863 switch (ui) {
14864 /* nonStandard */
14865 case 0:
14866 invokeStartElement (pctxt, "nonStandard", -1);
14867
14868 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
14869
14870 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
14871 if (stat != ASN_OK) return stat;
14872
14873 invokeEndElement (pctxt, "nonStandard", -1);
14874
14875 break;
14876
14877 /* isoAlgorithm */
14878 case 1:
14879 invokeStartElement (pctxt, "isoAlgorithm", -1);
14880
14881 pvalue->u.isoAlgorithm = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
14882
14883 stat = decodeObjectIdentifier (pctxt, pvalue->u.isoAlgorithm);
14884 if (stat != ASN_OK) return stat;
14885 invokeOidValue (pctxt, pvalue->u.isoAlgorithm->numids, pvalue->u.isoAlgorithm->subid);
14886
14887 invokeEndElement (pctxt, "isoAlgorithm", -1);
14888
14889 break;
14890
14891 default:
14892 return ASN_E_INVOPT;
14893 }
14894 }
14895 else {
14896 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
14897 if (stat != ASN_OK) return stat;
14898 else pvalue->t = ui + 3;
14899
14900 stat = decodeByteAlign (pctxt);
14901 if (stat != ASN_OK) return stat;
14902
14903 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14904 if (stat != ASN_OK) return stat;
14905
14906 }
14907
14908 return (stat);
14909 }
14910
14911 /**************************************************************/
14912 /* */
14913 /* NonIsoIntegrityMechanism */
14914 /* */
14915 /**************************************************************/
14916
14917 EXTERN int asn1PD_H225NonIsoIntegrityMechanism (OOCTXT* pctxt, H225NonIsoIntegrityMechanism* pvalue)
14918 {
14919 int stat = ASN_OK;
14920 ASN1UINT ui;
14921 ASN1OpenType openType;
14922 ASN1BOOL extbit = 0;
14923
14924 /* extension bit */
14925
14926 DECODEBIT (pctxt, &extbit);
14927
14928 if (!extbit) {
14929 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
14930 if (stat != ASN_OK) return stat;
14931 else pvalue->t = ui + 1;
14932
14933 switch (ui) {
14934 /* hMAC_MD5 */
14935 case 0:
14936 invokeStartElement (pctxt, "hMAC_MD5", -1);
14937
14938 /* NULL */
14939 invokeNullValue (pctxt);
14940
14941 invokeEndElement (pctxt, "hMAC_MD5", -1);
14942
14943 break;
14944
14945 /* hMAC_iso10118_2_s */
14946 case 1:
14947 invokeStartElement (pctxt, "hMAC_iso10118_2_s", -1);
14948
14949 pvalue->u.hMAC_iso10118_2_s = ALLOC_ASN1ELEM (pctxt, H225EncryptIntAlg);
14950
14951 stat = asn1PD_H225EncryptIntAlg (pctxt, pvalue->u.hMAC_iso10118_2_s);
14952 if (stat != ASN_OK) return stat;
14953
14954 invokeEndElement (pctxt, "hMAC_iso10118_2_s", -1);
14955
14956 break;
14957
14958 /* hMAC_iso10118_2_l */
14959 case 2:
14960 invokeStartElement (pctxt, "hMAC_iso10118_2_l", -1);
14961
14962 pvalue->u.hMAC_iso10118_2_l = ALLOC_ASN1ELEM (pctxt, H225EncryptIntAlg);
14963
14964 stat = asn1PD_H225EncryptIntAlg (pctxt, pvalue->u.hMAC_iso10118_2_l);
14965 if (stat != ASN_OK) return stat;
14966
14967 invokeEndElement (pctxt, "hMAC_iso10118_2_l", -1);
14968
14969 break;
14970
14971 /* hMAC_iso10118_3 */
14972 case 3:
14973 invokeStartElement (pctxt, "hMAC_iso10118_3", -1);
14974
14975 pvalue->u.hMAC_iso10118_3 = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
14976
14977 stat = decodeObjectIdentifier (pctxt, pvalue->u.hMAC_iso10118_3);
14978 if (stat != ASN_OK) return stat;
14979 invokeOidValue (pctxt, pvalue->u.hMAC_iso10118_3->numids, pvalue->u.hMAC_iso10118_3->subid);
14980
14981 invokeEndElement (pctxt, "hMAC_iso10118_3", -1);
14982
14983 break;
14984
14985 default:
14986 return ASN_E_INVOPT;
14987 }
14988 }
14989 else {
14990 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
14991 if (stat != ASN_OK) return stat;
14992 else pvalue->t = ui + 5;
14993
14994 stat = decodeByteAlign (pctxt);
14995 if (stat != ASN_OK) return stat;
14996
14997 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
14998 if (stat != ASN_OK) return stat;
14999
15000 }
15001
15002 return (stat);
15003 }
15004
15005 /**************************************************************/
15006 /* */
15007 /* IntegrityMechanism */
15008 /* */
15009 /**************************************************************/
15010
15011 EXTERN int asn1PD_H225IntegrityMechanism (OOCTXT* pctxt, H225IntegrityMechanism* pvalue)
15012 {
15013 int stat = ASN_OK;
15014 ASN1UINT ui;
15015 ASN1OpenType openType;
15016 ASN1BOOL extbit = 0;
15017
15018 /* extension bit */
15019
15020 DECODEBIT (pctxt, &extbit);
15021
15022 if (!extbit) {
15023 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
15024 if (stat != ASN_OK) return stat;
15025 else pvalue->t = ui + 1;
15026
15027 switch (ui) {
15028 /* nonStandard */
15029 case 0:
15030 invokeStartElement (pctxt, "nonStandard", -1);
15031
15032 pvalue->u.nonStandard = ALLOC_ASN1ELEM (pctxt, H225NonStandardParameter);
15033
15034 stat = asn1PD_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
15035 if (stat != ASN_OK) return stat;
15036
15037 invokeEndElement (pctxt, "nonStandard", -1);
15038
15039 break;
15040
15041 /* digSig */
15042 case 1:
15043 invokeStartElement (pctxt, "digSig", -1);
15044
15045 /* NULL */
15046 invokeNullValue (pctxt);
15047
15048 invokeEndElement (pctxt, "digSig", -1);
15049
15050 break;
15051
15052 /* iso9797 */
15053 case 2:
15054 invokeStartElement (pctxt, "iso9797", -1);
15055
15056 pvalue->u.iso9797 = ALLOC_ASN1ELEM (pctxt, ASN1OBJID);
15057
15058 stat = decodeObjectIdentifier (pctxt, pvalue->u.iso9797);
15059 if (stat != ASN_OK) return stat;
15060 invokeOidValue (pctxt, pvalue->u.iso9797->numids, pvalue->u.iso9797->subid);
15061
15062 invokeEndElement (pctxt, "iso9797", -1);
15063
15064 break;
15065
15066 /* nonIsoIM */
15067 case 3:
15068 invokeStartElement (pctxt, "nonIsoIM", -1);
15069
15070 pvalue->u.nonIsoIM = ALLOC_ASN1ELEM (pctxt, H225NonIsoIntegrityMechanism);
15071
15072 stat = asn1PD_H225NonIsoIntegrityMechanism (pctxt, pvalue->u.nonIsoIM);
15073 if (stat != ASN_OK) return stat;
15074
15075 invokeEndElement (pctxt, "nonIsoIM", -1);
15076
15077 break;
15078
15079 default:
15080 return ASN_E_INVOPT;
15081 }
15082 }
15083 else {
15084 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
15085 if (stat != ASN_OK) return stat;
15086 else pvalue->t = ui + 5;
15087
15088 stat = decodeByteAlign (pctxt);
15089 if (stat != ASN_OK) return stat;
15090
15091 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15092 if (stat != ASN_OK) return stat;
15093
15094 }
15095
15096 return (stat);
15097 }
15098
15099 /**************************************************************/
15100 /* */
15101 /* ICV */
15102 /* */
15103 /**************************************************************/
15104
15105 EXTERN int asn1PD_H225ICV (OOCTXT* pctxt, H225ICV* pvalue)
15106 {
15107 int stat = ASN_OK;
15108
15109 /* decode algorithmOID */
15110
15111 invokeStartElement (pctxt, "algorithmOID", -1);
15112
15113 stat = decodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
15114 if (stat != ASN_OK) return stat;
15115 invokeOidValue (pctxt, pvalue->algorithmOID.numids, pvalue->algorithmOID.subid);
15116
15117 invokeEndElement (pctxt, "algorithmOID", -1);
15118
15119 /* decode icv */
15120
15121 invokeStartElement (pctxt, "icv", -1);
15122
15123 stat = decodeDynBitString (pctxt, (ASN1DynBitStr*)&pvalue->icv);
15124 if (stat != ASN_OK) return stat;
15125
15126 invokeBitStrValue (pctxt, pvalue->icv.numbits, pvalue->icv.data);
15127
15128 invokeEndElement (pctxt, "icv", -1);
15129
15130 return (stat);
15131 }
15132
15133 /**************************************************************/
15134 /* */
15135 /* CapacityReportingCapability */
15136 /* */
15137 /**************************************************************/
15138
15139 EXTERN int asn1PD_H225CapacityReportingCapability (OOCTXT* pctxt, H225CapacityReportingCapability* pvalue)
15140 {
15141 int stat = ASN_OK;
15142 OOCTXT lctxt;
15143 ASN1OpenType openType;
15144 ASN1UINT bitcnt;
15145 ASN1UINT i;
15146 ASN1BOOL optbit = 0;
15147 ASN1BOOL extbit = 0;
15148
15149 /* extension bit */
15150
15151 DECODEBIT (pctxt, &extbit);
15152
15153 /* decode canReportCallCapacity */
15154
15155 invokeStartElement (pctxt, "canReportCallCapacity", -1);
15156
15157 stat = DECODEBIT (pctxt, &pvalue->canReportCallCapacity);
15158 if (stat != ASN_OK) return stat;
15159 invokeBoolValue (pctxt, pvalue->canReportCallCapacity);
15160
15161 invokeEndElement (pctxt, "canReportCallCapacity", -1);
15162
15163 if (extbit) {
15164
15165 /* decode extension optional bits length */
15166
15167 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15168 if (stat != ASN_OK) return stat;
15169
15170 bitcnt += 1;
15171
15172 ZEROCONTEXT (&lctxt);
15173 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15174 if (stat != ASN_OK) return stat;
15175
15176 stat = moveBitCursor (pctxt, bitcnt);
15177 if (stat != ASN_OK) return stat;
15178
15179 for (i = 0; i < bitcnt; i++) {
15180 DECODEBIT (&lctxt, &optbit);
15181
15182 if (optbit) {
15183 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15184 if (stat != ASN_OK) return stat;
15185
15186 pctxt->buffer.byteIndex += openType.numocts;
15187 }
15188 }
15189 }
15190
15191 return (stat);
15192 }
15193
15194 /**************************************************************/
15195 /* */
15196 /* CapacityReportingSpecification_when */
15197 /* */
15198 /**************************************************************/
15199
15200 EXTERN int asn1PD_H225CapacityReportingSpecification_when (OOCTXT* pctxt, H225CapacityReportingSpecification_when* pvalue)
15201 {
15202 int stat = ASN_OK;
15203 OOCTXT lctxt;
15204 ASN1OpenType openType;
15205 ASN1UINT bitcnt;
15206 ASN1UINT i;
15207 ASN1BOOL optbit = 0;
15208 ASN1BOOL extbit = 0;
15209
15210 /* extension bit */
15211
15212 DECODEBIT (pctxt, &extbit);
15213
15214 /* optional bits */
15215
15216 memset (&pvalue->m, 0, sizeof(pvalue->m));
15217
15218 DECODEBIT (pctxt, &optbit);
15219 pvalue->m.callStartPresent = optbit;
15220
15221 DECODEBIT (pctxt, &optbit);
15222 pvalue->m.callEndPresent = optbit;
15223
15224 /* decode callStart */
15225
15226 if (pvalue->m.callStartPresent) {
15227 invokeStartElement (pctxt, "callStart", -1);
15228
15229 /* NULL */
15230 invokeNullValue (pctxt);
15231
15232 invokeEndElement (pctxt, "callStart", -1);
15233 }
15234
15235 /* decode callEnd */
15236
15237 if (pvalue->m.callEndPresent) {
15238 invokeStartElement (pctxt, "callEnd", -1);
15239
15240 /* NULL */
15241 invokeNullValue (pctxt);
15242
15243 invokeEndElement (pctxt, "callEnd", -1);
15244 }
15245
15246 if (extbit) {
15247
15248 /* decode extension optional bits length */
15249
15250 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15251 if (stat != ASN_OK) return stat;
15252
15253 bitcnt += 1;
15254
15255 ZEROCONTEXT (&lctxt);
15256 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15257 if (stat != ASN_OK) return stat;
15258
15259 stat = moveBitCursor (pctxt, bitcnt);
15260 if (stat != ASN_OK) return stat;
15261
15262 for (i = 0; i < bitcnt; i++) {
15263 DECODEBIT (&lctxt, &optbit);
15264
15265 if (optbit) {
15266 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15267 if (stat != ASN_OK) return stat;
15268
15269 pctxt->buffer.byteIndex += openType.numocts;
15270 }
15271 }
15272 }
15273
15274 return (stat);
15275 }
15276
15277 /**************************************************************/
15278 /* */
15279 /* CapacityReportingSpecification */
15280 /* */
15281 /**************************************************************/
15282
15283 EXTERN int asn1PD_H225CapacityReportingSpecification (OOCTXT* pctxt, H225CapacityReportingSpecification* pvalue)
15284 {
15285 int stat = ASN_OK;
15286 OOCTXT lctxt;
15287 ASN1OpenType openType;
15288 ASN1UINT bitcnt;
15289 ASN1UINT i;
15290 ASN1BOOL optbit = 0;
15291 ASN1BOOL extbit = 0;
15292
15293 /* extension bit */
15294
15295 DECODEBIT (pctxt, &extbit);
15296
15297 /* decode when */
15298
15299 invokeStartElement (pctxt, "when", -1);
15300
15301 stat = asn1PD_H225CapacityReportingSpecification_when (pctxt, &pvalue->when);
15302 if (stat != ASN_OK) return stat;
15303
15304 invokeEndElement (pctxt, "when", -1);
15305
15306 if (extbit) {
15307
15308 /* decode extension optional bits length */
15309
15310 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15311 if (stat != ASN_OK) return stat;
15312
15313 bitcnt += 1;
15314
15315 ZEROCONTEXT (&lctxt);
15316 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15317 if (stat != ASN_OK) return stat;
15318
15319 stat = moveBitCursor (pctxt, bitcnt);
15320 if (stat != ASN_OK) return stat;
15321
15322 for (i = 0; i < bitcnt; i++) {
15323 DECODEBIT (&lctxt, &optbit);
15324
15325 if (optbit) {
15326 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15327 if (stat != ASN_OK) return stat;
15328
15329 pctxt->buffer.byteIndex += openType.numocts;
15330 }
15331 }
15332 }
15333
15334 return (stat);
15335 }
15336
15337 /**************************************************************/
15338 /* */
15339 /* RasUsageInfoTypes */
15340 /* */
15341 /**************************************************************/
15342
15343 EXTERN int asn1PD_H225RasUsageInfoTypes (OOCTXT* pctxt, H225RasUsageInfoTypes* pvalue)
15344 {
15345 int stat = ASN_OK;
15346 OOCTXT lctxt;
15347 ASN1OpenType openType;
15348 ASN1UINT bitcnt;
15349 ASN1UINT i;
15350 ASN1BOOL optbit = 0;
15351 ASN1BOOL extbit = 0;
15352
15353 /* extension bit */
15354
15355 DECODEBIT (pctxt, &extbit);
15356
15357 /* optional bits */
15358
15359 memset (&pvalue->m, 0, sizeof(pvalue->m));
15360
15361 DECODEBIT (pctxt, &optbit);
15362 pvalue->m.startTimePresent = optbit;
15363
15364 DECODEBIT (pctxt, &optbit);
15365 pvalue->m.endTimePresent = optbit;
15366
15367 DECODEBIT (pctxt, &optbit);
15368 pvalue->m.terminationCausePresent = optbit;
15369
15370 /* decode nonStandardUsageTypes */
15371
15372 invokeStartElement (pctxt, "nonStandardUsageTypes", -1);
15373
15374 stat = asn1PD_H225_SeqOfH225NonStandardParameter (pctxt, &pvalue->nonStandardUsageTypes);
15375 if (stat != ASN_OK) return stat;
15376
15377 invokeEndElement (pctxt, "nonStandardUsageTypes", -1);
15378
15379 /* decode startTime */
15380
15381 if (pvalue->m.startTimePresent) {
15382 invokeStartElement (pctxt, "startTime", -1);
15383
15384 /* NULL */
15385 invokeNullValue (pctxt);
15386
15387 invokeEndElement (pctxt, "startTime", -1);
15388 }
15389
15390 /* decode endTime */
15391
15392 if (pvalue->m.endTimePresent) {
15393 invokeStartElement (pctxt, "endTime", -1);
15394
15395 /* NULL */
15396 invokeNullValue (pctxt);
15397
15398 invokeEndElement (pctxt, "endTime", -1);
15399 }
15400
15401 /* decode terminationCause */
15402
15403 if (pvalue->m.terminationCausePresent) {
15404 invokeStartElement (pctxt, "terminationCause", -1);
15405
15406 /* NULL */
15407 invokeNullValue (pctxt);
15408
15409 invokeEndElement (pctxt, "terminationCause", -1);
15410 }
15411
15412 if (extbit) {
15413
15414 /* decode extension optional bits length */
15415
15416 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15417 if (stat != ASN_OK) return stat;
15418
15419 bitcnt += 1;
15420
15421 ZEROCONTEXT (&lctxt);
15422 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15423 if (stat != ASN_OK) return stat;
15424
15425 stat = moveBitCursor (pctxt, bitcnt);
15426 if (stat != ASN_OK) return stat;
15427
15428 for (i = 0; i < bitcnt; i++) {
15429 DECODEBIT (&lctxt, &optbit);
15430
15431 if (optbit) {
15432 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15433 if (stat != ASN_OK) return stat;
15434
15435 pctxt->buffer.byteIndex += openType.numocts;
15436 }
15437 }
15438 }
15439
15440 return (stat);
15441 }
15442
15443 /**************************************************************/
15444 /* */
15445 /* RasUsageSpecification_when */
15446 /* */
15447 /**************************************************************/
15448
15449 EXTERN int asn1PD_H225RasUsageSpecification_when (OOCTXT* pctxt, H225RasUsageSpecification_when* pvalue)
15450 {
15451 int stat = ASN_OK;
15452 OOCTXT lctxt;
15453 ASN1OpenType openType;
15454 ASN1UINT bitcnt;
15455 ASN1UINT i;
15456 ASN1BOOL optbit = 0;
15457 ASN1BOOL extbit = 0;
15458
15459 /* extension bit */
15460
15461 DECODEBIT (pctxt, &extbit);
15462
15463 /* optional bits */
15464
15465 memset (&pvalue->m, 0, sizeof(pvalue->m));
15466
15467 DECODEBIT (pctxt, &optbit);
15468 pvalue->m.startPresent = optbit;
15469
15470 DECODEBIT (pctxt, &optbit);
15471 pvalue->m.endPresent = optbit;
15472
15473 DECODEBIT (pctxt, &optbit);
15474 pvalue->m.inIrrPresent = optbit;
15475
15476 /* decode start */
15477
15478 if (pvalue->m.startPresent) {
15479 invokeStartElement (pctxt, "start", -1);
15480
15481 /* NULL */
15482 invokeNullValue (pctxt);
15483
15484 invokeEndElement (pctxt, "start", -1);
15485 }
15486
15487 /* decode end */
15488
15489 if (pvalue->m.endPresent) {
15490 invokeStartElement (pctxt, "end", -1);
15491
15492 /* NULL */
15493 invokeNullValue (pctxt);
15494
15495 invokeEndElement (pctxt, "end", -1);
15496 }
15497
15498 /* decode inIrr */
15499
15500 if (pvalue->m.inIrrPresent) {
15501 invokeStartElement (pctxt, "inIrr", -1);
15502
15503 /* NULL */
15504 invokeNullValue (pctxt);
15505
15506 invokeEndElement (pctxt, "inIrr", -1);
15507 }
15508
15509 if (extbit) {
15510
15511 /* decode extension optional bits length */
15512
15513 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15514 if (stat != ASN_OK) return stat;
15515
15516 bitcnt += 1;
15517
15518 ZEROCONTEXT (&lctxt);
15519 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15520 if (stat != ASN_OK) return stat;
15521
15522 stat = moveBitCursor (pctxt, bitcnt);
15523 if (stat != ASN_OK) return stat;
15524
15525 for (i = 0; i < bitcnt; i++) {
15526 DECODEBIT (&lctxt, &optbit);
15527
15528 if (optbit) {
15529 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15530 if (stat != ASN_OK) return stat;
15531
15532 pctxt->buffer.byteIndex += openType.numocts;
15533 }
15534 }
15535 }
15536
15537 return (stat);
15538 }
15539
15540 /**************************************************************/
15541 /* */
15542 /* RasUsageSpecification_callStartingPoint */
15543 /* */
15544 /**************************************************************/
15545
15546 EXTERN int asn1PD_H225RasUsageSpecification_callStartingPoint (OOCTXT* pctxt, H225RasUsageSpecification_callStartingPoint* pvalue)
15547 {
15548 int stat = ASN_OK;
15549 OOCTXT lctxt;
15550 ASN1OpenType openType;
15551 ASN1UINT bitcnt;
15552 ASN1UINT i;
15553 ASN1BOOL optbit = 0;
15554 ASN1BOOL extbit = 0;
15555
15556 /* extension bit */
15557
15558 DECODEBIT (pctxt, &extbit);
15559
15560 /* optional bits */
15561
15562 memset (&pvalue->m, 0, sizeof(pvalue->m));
15563
15564 DECODEBIT (pctxt, &optbit);
15565 pvalue->m.alertingPresent = optbit;
15566
15567 DECODEBIT (pctxt, &optbit);
15568 pvalue->m.connectPresent = optbit;
15569
15570 /* decode alerting */
15571
15572 if (pvalue->m.alertingPresent) {
15573 invokeStartElement (pctxt, "alerting", -1);
15574
15575 /* NULL */
15576 invokeNullValue (pctxt);
15577
15578 invokeEndElement (pctxt, "alerting", -1);
15579 }
15580
15581 /* decode connect */
15582
15583 if (pvalue->m.connectPresent) {
15584 invokeStartElement (pctxt, "connect", -1);
15585
15586 /* NULL */
15587 invokeNullValue (pctxt);
15588
15589 invokeEndElement (pctxt, "connect", -1);
15590 }
15591
15592 if (extbit) {
15593
15594 /* decode extension optional bits length */
15595
15596 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15597 if (stat != ASN_OK) return stat;
15598
15599 bitcnt += 1;
15600
15601 ZEROCONTEXT (&lctxt);
15602 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15603 if (stat != ASN_OK) return stat;
15604
15605 stat = moveBitCursor (pctxt, bitcnt);
15606 if (stat != ASN_OK) return stat;
15607
15608 for (i = 0; i < bitcnt; i++) {
15609 DECODEBIT (&lctxt, &optbit);
15610
15611 if (optbit) {
15612 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15613 if (stat != ASN_OK) return stat;
15614
15615 pctxt->buffer.byteIndex += openType.numocts;
15616 }
15617 }
15618 }
15619
15620 return (stat);
15621 }
15622
15623 /**************************************************************/
15624 /* */
15625 /* RasUsageSpecification */
15626 /* */
15627 /**************************************************************/
15628
15629 EXTERN int asn1PD_H225RasUsageSpecification (OOCTXT* pctxt, H225RasUsageSpecification* pvalue)
15630 {
15631 int stat = ASN_OK;
15632 OOCTXT lctxt;
15633 ASN1OpenType openType;
15634 ASN1UINT bitcnt;
15635 ASN1UINT i;
15636 ASN1BOOL optbit = 0;
15637 ASN1BOOL extbit = 0;
15638
15639 /* extension bit */
15640
15641 DECODEBIT (pctxt, &extbit);
15642
15643 /* optional bits */
15644
15645 memset (&pvalue->m, 0, sizeof(pvalue->m));
15646
15647 DECODEBIT (pctxt, &optbit);
15648 pvalue->m.callStartingPointPresent = optbit;
15649
15650 /* decode when */
15651
15652 invokeStartElement (pctxt, "when", -1);
15653
15654 stat = asn1PD_H225RasUsageSpecification_when (pctxt, &pvalue->when);
15655 if (stat != ASN_OK) return stat;
15656
15657 invokeEndElement (pctxt, "when", -1);
15658
15659 /* decode callStartingPoint */
15660
15661 if (pvalue->m.callStartingPointPresent) {
15662 invokeStartElement (pctxt, "callStartingPoint", -1);
15663
15664 stat = asn1PD_H225RasUsageSpecification_callStartingPoint (pctxt, &pvalue->callStartingPoint);
15665 if (stat != ASN_OK) return stat;
15666
15667 invokeEndElement (pctxt, "callStartingPoint", -1);
15668 }
15669
15670 /* decode required */
15671
15672 invokeStartElement (pctxt, "required", -1);
15673
15674 stat = asn1PD_H225RasUsageInfoTypes (pctxt, &pvalue->required);
15675 if (stat != ASN_OK) return stat;
15676
15677 invokeEndElement (pctxt, "required", -1);
15678
15679 if (extbit) {
15680
15681 /* decode extension optional bits length */
15682
15683 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15684 if (stat != ASN_OK) return stat;
15685
15686 bitcnt += 1;
15687
15688 ZEROCONTEXT (&lctxt);
15689 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15690 if (stat != ASN_OK) return stat;
15691
15692 stat = moveBitCursor (pctxt, bitcnt);
15693 if (stat != ASN_OK) return stat;
15694
15695 for (i = 0; i < bitcnt; i++) {
15696 DECODEBIT (&lctxt, &optbit);
15697
15698 if (optbit) {
15699 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15700 if (stat != ASN_OK) return stat;
15701
15702 pctxt->buffer.byteIndex += openType.numocts;
15703 }
15704 }
15705 }
15706
15707 return (stat);
15708 }
15709
15710 /**************************************************************/
15711 /* */
15712 /* RasUsageInformation */
15713 /* */
15714 /**************************************************************/
15715
15716 EXTERN int asn1PD_H225RasUsageInformation (OOCTXT* pctxt, H225RasUsageInformation* pvalue)
15717 {
15718 int stat = ASN_OK;
15719 OOCTXT lctxt;
15720 ASN1OpenType openType;
15721 ASN1UINT bitcnt;
15722 ASN1UINT i;
15723 ASN1BOOL optbit = 0;
15724 ASN1BOOL extbit = 0;
15725
15726 /* extension bit */
15727
15728 DECODEBIT (pctxt, &extbit);
15729
15730 /* optional bits */
15731
15732 memset (&pvalue->m, 0, sizeof(pvalue->m));
15733
15734 DECODEBIT (pctxt, &optbit);
15735 pvalue->m.alertingTimePresent = optbit;
15736
15737 DECODEBIT (pctxt, &optbit);
15738 pvalue->m.connectTimePresent = optbit;
15739
15740 DECODEBIT (pctxt, &optbit);
15741 pvalue->m.endTimePresent = optbit;
15742
15743 /* decode nonStandardUsageFields */
15744
15745 invokeStartElement (pctxt, "nonStandardUsageFields", -1);
15746
15747 stat = asn1PD_H225_SeqOfH225NonStandardParameter (pctxt, &pvalue->nonStandardUsageFields);
15748 if (stat != ASN_OK) return stat;
15749
15750 invokeEndElement (pctxt, "nonStandardUsageFields", -1);
15751
15752 /* decode alertingTime */
15753
15754 if (pvalue->m.alertingTimePresent) {
15755 invokeStartElement (pctxt, "alertingTime", -1);
15756
15757 stat = asn1PD_H235TimeStamp (pctxt, &pvalue->alertingTime);
15758 if (stat != ASN_OK) return stat;
15759
15760 invokeEndElement (pctxt, "alertingTime", -1);
15761 }
15762
15763 /* decode connectTime */
15764
15765 if (pvalue->m.connectTimePresent) {
15766 invokeStartElement (pctxt, "connectTime", -1);
15767
15768 stat = asn1PD_H235TimeStamp (pctxt, &pvalue->connectTime);
15769 if (stat != ASN_OK) return stat;
15770
15771 invokeEndElement (pctxt, "connectTime", -1);
15772 }
15773
15774 /* decode endTime */
15775
15776 if (pvalue->m.endTimePresent) {
15777 invokeStartElement (pctxt, "endTime", -1);
15778
15779 stat = asn1PD_H235TimeStamp (pctxt, &pvalue->endTime);
15780 if (stat != ASN_OK) return stat;
15781
15782 invokeEndElement (pctxt, "endTime", -1);
15783 }
15784
15785 if (extbit) {
15786
15787 /* decode extension optional bits length */
15788
15789 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15790 if (stat != ASN_OK) return stat;
15791
15792 bitcnt += 1;
15793
15794 ZEROCONTEXT (&lctxt);
15795 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15796 if (stat != ASN_OK) return stat;
15797
15798 stat = moveBitCursor (pctxt, bitcnt);
15799 if (stat != ASN_OK) return stat;
15800
15801 for (i = 0; i < bitcnt; i++) {
15802 DECODEBIT (&lctxt, &optbit);
15803
15804 if (optbit) {
15805 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15806 if (stat != ASN_OK) return stat;
15807
15808 pctxt->buffer.byteIndex += openType.numocts;
15809 }
15810 }
15811 }
15812
15813 return (stat);
15814 }
15815
15816 /**************************************************************/
15817 /* */
15818 /* CallTerminationCause */
15819 /* */
15820 /**************************************************************/
15821
15822 EXTERN int asn1PD_H225CallTerminationCause (OOCTXT* pctxt, H225CallTerminationCause* pvalue)
15823 {
15824 int stat = ASN_OK;
15825 ASN1UINT ui;
15826 ASN1OpenType openType;
15827 ASN1BOOL extbit = 0;
15828
15829 /* extension bit */
15830
15831 DECODEBIT (pctxt, &extbit);
15832
15833 if (!extbit) {
15834 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
15835 if (stat != ASN_OK) return stat;
15836 else pvalue->t = ui + 1;
15837
15838 switch (ui) {
15839 /* releaseCompleteReason */
15840 case 0:
15841 invokeStartElement (pctxt, "releaseCompleteReason", -1);
15842
15843 pvalue->u.releaseCompleteReason = ALLOC_ASN1ELEM (pctxt, H225ReleaseCompleteReason);
15844
15845 stat = asn1PD_H225ReleaseCompleteReason (pctxt, pvalue->u.releaseCompleteReason);
15846 if (stat != ASN_OK) return stat;
15847
15848 invokeEndElement (pctxt, "releaseCompleteReason", -1);
15849
15850 break;
15851
15852 /* releaseCompleteCauseIE */
15853 case 1:
15854 invokeStartElement (pctxt, "releaseCompleteCauseIE", -1);
15855
15856 pvalue->u.releaseCompleteCauseIE = ALLOC_ASN1ELEM (pctxt, H225CallTerminationCause_releaseCompleteCauseIE);
15857
15858 stat = asn1PD_H225CallTerminationCause_releaseCompleteCauseIE (pctxt, pvalue->u.releaseCompleteCauseIE);
15859 if (stat != ASN_OK) return stat;
15860
15861 invokeEndElement (pctxt, "releaseCompleteCauseIE", -1);
15862
15863 break;
15864
15865 default:
15866 return ASN_E_INVOPT;
15867 }
15868 }
15869 else {
15870 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
15871 if (stat != ASN_OK) return stat;
15872 else pvalue->t = ui + 3;
15873
15874 stat = decodeByteAlign (pctxt);
15875 if (stat != ASN_OK) return stat;
15876
15877 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15878 if (stat != ASN_OK) return stat;
15879
15880 }
15881
15882 return (stat);
15883 }
15884
15885 /**************************************************************/
15886 /* */
15887 /* TransportChannelInfo */
15888 /* */
15889 /**************************************************************/
15890
15891 EXTERN int asn1PD_H225TransportChannelInfo (OOCTXT* pctxt, H225TransportChannelInfo* pvalue)
15892 {
15893 int stat = ASN_OK;
15894 OOCTXT lctxt;
15895 ASN1OpenType openType;
15896 ASN1UINT bitcnt;
15897 ASN1UINT i;
15898 ASN1BOOL optbit = 0;
15899 ASN1BOOL extbit = 0;
15900
15901 /* extension bit */
15902
15903 DECODEBIT (pctxt, &extbit);
15904
15905 /* optional bits */
15906
15907 memset (&pvalue->m, 0, sizeof(pvalue->m));
15908
15909 DECODEBIT (pctxt, &optbit);
15910 pvalue->m.sendAddressPresent = optbit;
15911
15912 DECODEBIT (pctxt, &optbit);
15913 pvalue->m.recvAddressPresent = optbit;
15914
15915 /* decode sendAddress */
15916
15917 if (pvalue->m.sendAddressPresent) {
15918 invokeStartElement (pctxt, "sendAddress", -1);
15919
15920 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->sendAddress);
15921 if (stat != ASN_OK) return stat;
15922
15923 invokeEndElement (pctxt, "sendAddress", -1);
15924 }
15925
15926 /* decode recvAddress */
15927
15928 if (pvalue->m.recvAddressPresent) {
15929 invokeStartElement (pctxt, "recvAddress", -1);
15930
15931 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->recvAddress);
15932 if (stat != ASN_OK) return stat;
15933
15934 invokeEndElement (pctxt, "recvAddress", -1);
15935 }
15936
15937 if (extbit) {
15938
15939 /* decode extension optional bits length */
15940
15941 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
15942 if (stat != ASN_OK) return stat;
15943
15944 bitcnt += 1;
15945
15946 ZEROCONTEXT (&lctxt);
15947 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
15948 if (stat != ASN_OK) return stat;
15949
15950 stat = moveBitCursor (pctxt, bitcnt);
15951 if (stat != ASN_OK) return stat;
15952
15953 for (i = 0; i < bitcnt; i++) {
15954 DECODEBIT (&lctxt, &optbit);
15955
15956 if (optbit) {
15957 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
15958 if (stat != ASN_OK) return stat;
15959
15960 pctxt->buffer.byteIndex += openType.numocts;
15961 }
15962 }
15963 }
15964
15965 return (stat);
15966 }
15967
15968 /**************************************************************/
15969 /* */
15970 /* BandwidthDetails */
15971 /* */
15972 /**************************************************************/
15973
15974 EXTERN int asn1PD_H225BandwidthDetails (OOCTXT* pctxt, H225BandwidthDetails* pvalue)
15975 {
15976 int stat = ASN_OK;
15977 OOCTXT lctxt;
15978 ASN1OpenType openType;
15979 ASN1UINT bitcnt;
15980 ASN1UINT i;
15981 ASN1BOOL optbit = 0;
15982 ASN1BOOL extbit = 0;
15983
15984 /* extension bit */
15985
15986 DECODEBIT (pctxt, &extbit);
15987
15988 /* decode sender */
15989
15990 invokeStartElement (pctxt, "sender", -1);
15991
15992 stat = DECODEBIT (pctxt, &pvalue->sender);
15993 if (stat != ASN_OK) return stat;
15994 invokeBoolValue (pctxt, pvalue->sender);
15995
15996 invokeEndElement (pctxt, "sender", -1);
15997
15998 /* decode multicast */
15999
16000 invokeStartElement (pctxt, "multicast", -1);
16001
16002 stat = DECODEBIT (pctxt, &pvalue->multicast);
16003 if (stat != ASN_OK) return stat;
16004 invokeBoolValue (pctxt, pvalue->multicast);
16005
16006 invokeEndElement (pctxt, "multicast", -1);
16007
16008 /* decode bandwidth */
16009
16010 invokeStartElement (pctxt, "bandwidth", -1);
16011
16012 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandwidth);
16013 if (stat != ASN_OK) return stat;
16014
16015 invokeEndElement (pctxt, "bandwidth", -1);
16016
16017 /* decode rtcpAddresses */
16018
16019 invokeStartElement (pctxt, "rtcpAddresses", -1);
16020
16021 stat = asn1PD_H225TransportChannelInfo (pctxt, &pvalue->rtcpAddresses);
16022 if (stat != ASN_OK) return stat;
16023
16024 invokeEndElement (pctxt, "rtcpAddresses", -1);
16025
16026 if (extbit) {
16027
16028 /* decode extension optional bits length */
16029
16030 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
16031 if (stat != ASN_OK) return stat;
16032
16033 bitcnt += 1;
16034
16035 ZEROCONTEXT (&lctxt);
16036 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
16037 if (stat != ASN_OK) return stat;
16038
16039 stat = moveBitCursor (pctxt, bitcnt);
16040 if (stat != ASN_OK) return stat;
16041
16042 for (i = 0; i < bitcnt; i++) {
16043 DECODEBIT (&lctxt, &optbit);
16044
16045 if (optbit) {
16046 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
16047 if (stat != ASN_OK) return stat;
16048
16049 pctxt->buffer.byteIndex += openType.numocts;
16050 }
16051 }
16052 }
16053
16054 return (stat);
16055 }
16056
16057 /**************************************************************/
16058 /* */
16059 /* CallCreditCapability */
16060 /* */
16061 /**************************************************************/
16062
16063 EXTERN int asn1PD_H225CallCreditCapability (OOCTXT* pctxt, H225CallCreditCapability* pvalue)
16064 {
16065 int stat = ASN_OK;
16066 OOCTXT lctxt;
16067 ASN1OpenType openType;
16068 ASN1UINT bitcnt;
16069 ASN1UINT i;
16070 ASN1BOOL optbit = 0;
16071 ASN1BOOL extbit = 0;
16072
16073 /* extension bit */
16074
16075 DECODEBIT (pctxt, &extbit);
16076
16077 /* optional bits */
16078
16079 memset (&pvalue->m, 0, sizeof(pvalue->m));
16080
16081 DECODEBIT (pctxt, &optbit);
16082 pvalue->m.canDisplayAmountStringPresent = optbit;
16083
16084 DECODEBIT (pctxt, &optbit);
16085 pvalue->m.canEnforceDurationLimitPresent = optbit;
16086
16087 /* decode canDisplayAmountString */
16088
16089 if (pvalue->m.canDisplayAmountStringPresent) {
16090 invokeStartElement (pctxt, "canDisplayAmountString", -1);
16091
16092 stat = DECODEBIT (pctxt, &pvalue->canDisplayAmountString);
16093 if (stat != ASN_OK) return stat;
16094 invokeBoolValue (pctxt, pvalue->canDisplayAmountString);
16095
16096 invokeEndElement (pctxt, "canDisplayAmountString", -1);
16097 }
16098
16099 /* decode canEnforceDurationLimit */
16100
16101 if (pvalue->m.canEnforceDurationLimitPresent) {
16102 invokeStartElement (pctxt, "canEnforceDurationLimit", -1);
16103
16104 stat = DECODEBIT (pctxt, &pvalue->canEnforceDurationLimit);
16105 if (stat != ASN_OK) return stat;
16106 invokeBoolValue (pctxt, pvalue->canEnforceDurationLimit);
16107
16108 invokeEndElement (pctxt, "canEnforceDurationLimit", -1);
16109 }
16110
16111 if (extbit) {
16112
16113 /* decode extension optional bits length */
16114
16115 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
16116 if (stat != ASN_OK) return stat;
16117
16118 bitcnt += 1;
16119
16120 ZEROCONTEXT (&lctxt);
16121 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
16122 if (stat != ASN_OK) return stat;
16123
16124 stat = moveBitCursor (pctxt, bitcnt);
16125 if (stat != ASN_OK) return stat;
16126
16127 for (i = 0; i < bitcnt; i++) {
16128 DECODEBIT (&lctxt, &optbit);
16129
16130 if (optbit) {
16131 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
16132 if (stat != ASN_OK) return stat;
16133
16134 pctxt->buffer.byteIndex += openType.numocts;
16135 }
16136 }
16137 }
16138
16139 return (stat);
16140 }
16141
16142 /**************************************************************/
16143 /* */
16144 /* RTPSession_associatedSessionIds */
16145 /* */
16146 /**************************************************************/
16147
16148 EXTERN int asn1PD_H225RTPSession_associatedSessionIds (OOCTXT* pctxt, H225RTPSession_associatedSessionIds* pvalue)
16149 {
16150 int stat = ASN_OK;
16151 ASN1UINT xx1;
16152
16153 /* decode length determinant */
16154
16155 stat = decodeLength (pctxt, &pvalue->n);
16156 if (stat != ASN_OK) return stat;
16157
16158 /* decode elements */
16159
16160 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1UINT8);
16161
16162 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
16163 invokeStartElement (pctxt, "elem", xx1);
16164
16165 stat = decodeConsUInt8 (pctxt, &pvalue->elem[xx1], 1U, 255U);
16166 if (stat != ASN_OK) return stat;
16167 invokeUIntValue (pctxt, pvalue->elem[xx1]);
16168 invokeEndElement (pctxt, "elem", xx1);
16169
16170 }
16171
16172 return (stat);
16173 }
16174
16175 /**************************************************************/
16176 /* */
16177 /* RTPSession */
16178 /* */
16179 /**************************************************************/
16180
16181 EXTERN int asn1PD_H225RTPSession (OOCTXT* pctxt, H225RTPSession* pvalue)
16182 {
16183 int stat = ASN_OK;
16184 OOCTXT lctxt;
16185 OOCTXT lctxt2;
16186 ASN1OpenType openType;
16187 ASN1UINT bitcnt;
16188 ASN1UINT i;
16189 ASN1BOOL optbit = 0;
16190 ASN1BOOL extbit = 0;
16191
16192 /* extension bit */
16193
16194 DECODEBIT (pctxt, &extbit);
16195
16196 /* optional bits */
16197
16198 memset (&pvalue->m, 0, sizeof(pvalue->m));
16199
16200 /* decode rtpAddress */
16201
16202 invokeStartElement (pctxt, "rtpAddress", -1);
16203
16204 stat = asn1PD_H225TransportChannelInfo (pctxt, &pvalue->rtpAddress);
16205 if (stat != ASN_OK) return stat;
16206
16207 invokeEndElement (pctxt, "rtpAddress", -1);
16208
16209 /* decode rtcpAddress */
16210
16211 invokeStartElement (pctxt, "rtcpAddress", -1);
16212
16213 stat = asn1PD_H225TransportChannelInfo (pctxt, &pvalue->rtcpAddress);
16214 if (stat != ASN_OK) return stat;
16215
16216 invokeEndElement (pctxt, "rtcpAddress", -1);
16217
16218 /* decode cname */
16219
16220 invokeStartElement (pctxt, "cname", -1);
16221
16222 stat = decodeConstrainedStringEx (pctxt, &pvalue->cname, 0, 8, 7, 7);
16223 if (stat != ASN_OK) return stat;
16224 invokeCharStrValue (pctxt, pvalue->cname);
16225
16226 invokeEndElement (pctxt, "cname", -1);
16227
16228 /* decode ssrc */
16229
16230 invokeStartElement (pctxt, "ssrc", -1);
16231
16232 stat = decodeConsUnsigned (pctxt, &pvalue->ssrc, 1U, ASN1UINT_MAX);
16233 if (stat != ASN_OK) return stat;
16234 invokeUIntValue (pctxt, pvalue->ssrc);
16235
16236 invokeEndElement (pctxt, "ssrc", -1);
16237
16238 /* decode sessionId */
16239
16240 invokeStartElement (pctxt, "sessionId", -1);
16241
16242 stat = decodeConsUInt8 (pctxt, &pvalue->sessionId, 1U, 255U);
16243 if (stat != ASN_OK) return stat;
16244 invokeUIntValue (pctxt, pvalue->sessionId);
16245
16246 invokeEndElement (pctxt, "sessionId", -1);
16247
16248 /* decode associatedSessionIds */
16249
16250 invokeStartElement (pctxt, "associatedSessionIds", -1);
16251
16252 stat = asn1PD_H225RTPSession_associatedSessionIds (pctxt, &pvalue->associatedSessionIds);
16253 if (stat != ASN_OK) return stat;
16254
16255 invokeEndElement (pctxt, "associatedSessionIds", -1);
16256
16257 if (extbit) {
16258
16259 /* decode extension optional bits length */
16260
16261 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
16262 if (stat != ASN_OK) return stat;
16263
16264 bitcnt += 1;
16265
16266 ZEROCONTEXT (&lctxt);
16267 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
16268 if (stat != ASN_OK) return stat;
16269
16270 stat = moveBitCursor (pctxt, bitcnt);
16271 if (stat != ASN_OK) return stat;
16272
16273 for (i = 0; i < bitcnt; i++) {
16274 DECODEBIT (&lctxt, &optbit);
16275
16276 if (optbit) {
16277 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
16278 if (stat != ASN_OK) return stat;
16279
16280 if (i < 2 && openType.numocts > 0) { /* known element */
16281 copyContext (&lctxt2, pctxt);
16282 initContextBuffer (pctxt, openType.data, openType.numocts);
16283
16284 switch (i) {
16285 case 0:
16286 pvalue->m.multicastPresent = 1;
16287
16288 invokeStartElement (pctxt, "multicast", -1);
16289
16290 /* NULL */
16291 invokeNullValue (pctxt);
16292
16293 invokeEndElement (pctxt, "multicast", -1);
16294 break;
16295
16296 case 1:
16297 pvalue->m.bandwidthPresent = 1;
16298
16299 invokeStartElement (pctxt, "bandwidth", -1);
16300
16301 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandwidth);
16302 if (stat != ASN_OK) return stat;
16303
16304 invokeEndElement (pctxt, "bandwidth", -1);
16305 break;
16306
16307 default:
16308 pctxt->buffer.byteIndex += openType.numocts;
16309 }
16310 copyContext (pctxt, &lctxt2);
16311 }
16312 else { /* unknown element */
16313 pctxt->buffer.byteIndex += openType.numocts;
16314 }
16315 }
16316 }
16317 }
16318
16319 return (stat);
16320 }
16321
16322 /**************************************************************/
16323 /* */
16324 /* _SeqOfH225Endpoint */
16325 /* */
16326 /**************************************************************/
16327
16328 EXTERN int asn1PD_H225_SeqOfH225Endpoint (OOCTXT* pctxt, H225_SeqOfH225Endpoint* pvalue)
16329 {
16330 int stat = ASN_OK;
16331 H225Endpoint* pdata;
16332 ASN1UINT count = 0;
16333 ASN1UINT xx1;
16334 int lstat;
16335
16336 dListInit (pvalue);
16337
16338 for (;;) {
16339 /* decode length determinant */
16340
16341 lstat = decodeLength (pctxt, &count);
16342 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
16343 return lstat;
16344 }
16345
16346 /* decode elements */
16347
16348 for (xx1 = 0; xx1 < count; xx1++) {
16349 invokeStartElement (pctxt, "elem", xx1);
16350
16351 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225Endpoint);
16352
16353 stat = asn1PD_H225Endpoint (pctxt, pdata);
16354 if (stat != ASN_OK) return stat;
16355 invokeEndElement (pctxt, "elem", xx1);
16356
16357 dListAppendNode (pctxt, pvalue, pdata);
16358 }
16359
16360 if(lstat == ASN_OK) break;
16361 }
16362
16363 return (stat);
16364 }
16365
16366 /**************************************************************/
16367 /* */
16368 /* _SeqOfH225AuthenticationMechanism */
16369 /* */
16370 /**************************************************************/
16371
16372 EXTERN int asn1PD_H225_SeqOfH225AuthenticationMechanism (OOCTXT* pctxt, H225_SeqOfH225AuthenticationMechanism* pvalue)
16373 {
16374 int stat = ASN_OK;
16375 H235AuthenticationMechanism* pdata;
16376 ASN1UINT count = 0;
16377 ASN1UINT xx1;
16378 int lstat;
16379
16380 dListInit (pvalue);
16381
16382 for (;;) {
16383 /* decode length determinant */
16384
16385 lstat = decodeLength (pctxt, &count);
16386 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
16387 return lstat;
16388 }
16389
16390 /* decode elements */
16391
16392 for (xx1 = 0; xx1 < count; xx1++) {
16393 invokeStartElement (pctxt, "elem", xx1);
16394
16395 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H235AuthenticationMechanism);
16396
16397 stat = asn1PD_H235AuthenticationMechanism (pctxt, pdata);
16398 if (stat != ASN_OK) return stat;
16399 invokeEndElement (pctxt, "elem", xx1);
16400
16401 dListAppendNode (pctxt, pvalue, pdata);
16402 }
16403
16404 if(lstat == ASN_OK) break;
16405 }
16406
16407 return (stat);
16408 }
16409
16410 /**************************************************************/
16411 /* */
16412 /* GatekeeperRequest_algorithmOIDs */
16413 /* */
16414 /**************************************************************/
16415
16416 EXTERN int asn1PD_H225GatekeeperRequest_algorithmOIDs (OOCTXT* pctxt, H225GatekeeperRequest_algorithmOIDs* pvalue)
16417 {
16418 int stat = ASN_OK;
16419 ASN1UINT xx1;
16420
16421 /* decode length determinant */
16422
16423 stat = decodeLength (pctxt, &pvalue->n);
16424 if (stat != ASN_OK) return stat;
16425
16426 /* decode elements */
16427
16428 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1OBJID);
16429
16430 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
16431 invokeStartElement (pctxt, "elem", xx1);
16432
16433 stat = decodeObjectIdentifier (pctxt, &pvalue->elem[xx1]);
16434 if (stat != ASN_OK) return stat;
16435 invokeOidValue (pctxt, pvalue->elem[xx1].numids, pvalue->elem[xx1].subid);
16436 invokeEndElement (pctxt, "elem", xx1);
16437
16438 }
16439
16440 return (stat);
16441 }
16442
16443 /**************************************************************/
16444 /* */
16445 /* _SeqOfH225IntegrityMechanism */
16446 /* */
16447 /**************************************************************/
16448
16449 EXTERN int asn1PD_H225_SeqOfH225IntegrityMechanism (OOCTXT* pctxt, H225_SeqOfH225IntegrityMechanism* pvalue)
16450 {
16451 int stat = ASN_OK;
16452 H225IntegrityMechanism* pdata;
16453 ASN1UINT count = 0;
16454 ASN1UINT xx1;
16455 int lstat;
16456
16457 dListInit (pvalue);
16458
16459 for (;;) {
16460 /* decode length determinant */
16461
16462 lstat = decodeLength (pctxt, &count);
16463 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
16464 return lstat;
16465 }
16466
16467 /* decode elements */
16468
16469 for (xx1 = 0; xx1 < count; xx1++) {
16470 invokeStartElement (pctxt, "elem", xx1);
16471
16472 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225IntegrityMechanism);
16473
16474 stat = asn1PD_H225IntegrityMechanism (pctxt, pdata);
16475 if (stat != ASN_OK) return stat;
16476 invokeEndElement (pctxt, "elem", xx1);
16477
16478 dListAppendNode (pctxt, pvalue, pdata);
16479 }
16480
16481 if(lstat == ASN_OK) break;
16482 }
16483
16484 return (stat);
16485 }
16486
16487 /**************************************************************/
16488 /* */
16489 /* GatekeeperRequest */
16490 /* */
16491 /**************************************************************/
16492
16493 EXTERN int asn1PD_H225GatekeeperRequest (OOCTXT* pctxt, H225GatekeeperRequest* pvalue)
16494 {
16495 int stat = ASN_OK;
16496 OOCTXT lctxt;
16497 OOCTXT lctxt2;
16498 ASN1OpenType openType;
16499 ASN1UINT bitcnt;
16500 ASN1UINT i;
16501 ASN1BOOL optbit = 0;
16502 ASN1BOOL extbit = 0;
16503
16504 /* extension bit */
16505
16506 DECODEBIT (pctxt, &extbit);
16507
16508 /* optional bits */
16509
16510 memset (&pvalue->m, 0, sizeof(pvalue->m));
16511
16512 DECODEBIT (pctxt, &optbit);
16513 pvalue->m.nonStandardDataPresent = optbit;
16514
16515 DECODEBIT (pctxt, &optbit);
16516 pvalue->m.gatekeeperIdentifierPresent = optbit;
16517
16518 DECODEBIT (pctxt, &optbit);
16519 pvalue->m.callServicesPresent = optbit;
16520
16521 DECODEBIT (pctxt, &optbit);
16522 pvalue->m.endpointAliasPresent = optbit;
16523
16524 /* decode requestSeqNum */
16525
16526 invokeStartElement (pctxt, "requestSeqNum", -1);
16527
16528 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
16529 if (stat != ASN_OK) return stat;
16530
16531 invokeEndElement (pctxt, "requestSeqNum", -1);
16532
16533 /* decode protocolIdentifier */
16534
16535 invokeStartElement (pctxt, "protocolIdentifier", -1);
16536
16537 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
16538 if (stat != ASN_OK) return stat;
16539
16540 invokeEndElement (pctxt, "protocolIdentifier", -1);
16541
16542 /* decode nonStandardData */
16543
16544 if (pvalue->m.nonStandardDataPresent) {
16545 invokeStartElement (pctxt, "nonStandardData", -1);
16546
16547 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
16548 if (stat != ASN_OK) return stat;
16549
16550 invokeEndElement (pctxt, "nonStandardData", -1);
16551 }
16552
16553 /* decode rasAddress */
16554
16555 invokeStartElement (pctxt, "rasAddress", -1);
16556
16557 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->rasAddress);
16558 if (stat != ASN_OK) return stat;
16559
16560 invokeEndElement (pctxt, "rasAddress", -1);
16561
16562 /* decode endpointType */
16563
16564 invokeStartElement (pctxt, "endpointType", -1);
16565
16566 stat = asn1PD_H225EndpointType (pctxt, &pvalue->endpointType);
16567 if (stat != ASN_OK) return stat;
16568
16569 invokeEndElement (pctxt, "endpointType", -1);
16570
16571 /* decode gatekeeperIdentifier */
16572
16573 if (pvalue->m.gatekeeperIdentifierPresent) {
16574 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
16575
16576 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
16577 if (stat != ASN_OK) return stat;
16578
16579 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
16580 }
16581
16582 /* decode callServices */
16583
16584 if (pvalue->m.callServicesPresent) {
16585 invokeStartElement (pctxt, "callServices", -1);
16586
16587 stat = asn1PD_H225QseriesOptions (pctxt, &pvalue->callServices);
16588 if (stat != ASN_OK) return stat;
16589
16590 invokeEndElement (pctxt, "callServices", -1);
16591 }
16592
16593 /* decode endpointAlias */
16594
16595 if (pvalue->m.endpointAliasPresent) {
16596 invokeStartElement (pctxt, "endpointAlias", -1);
16597
16598 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
16599 if (stat != ASN_OK) return stat;
16600
16601 invokeEndElement (pctxt, "endpointAlias", -1);
16602 }
16603
16604 if (extbit) {
16605
16606 /* decode extension optional bits length */
16607
16608 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
16609 if (stat != ASN_OK) return stat;
16610
16611 bitcnt += 1;
16612
16613 ZEROCONTEXT (&lctxt);
16614 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
16615 if (stat != ASN_OK) return stat;
16616
16617 stat = moveBitCursor (pctxt, bitcnt);
16618 if (stat != ASN_OK) return stat;
16619
16620 for (i = 0; i < bitcnt; i++) {
16621 DECODEBIT (&lctxt, &optbit);
16622
16623 if (optbit) {
16624 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
16625 if (stat != ASN_OK) return stat;
16626
16627 if (i < 10 && openType.numocts > 0) { /* known element */
16628 copyContext (&lctxt2, pctxt);
16629 initContextBuffer (pctxt, openType.data, openType.numocts);
16630
16631 switch (i) {
16632 case 0:
16633 pvalue->m.alternateEndpointsPresent = 1;
16634
16635 invokeStartElement (pctxt, "alternateEndpoints", -1);
16636
16637 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->alternateEndpoints);
16638 if (stat != ASN_OK) return stat;
16639
16640 invokeEndElement (pctxt, "alternateEndpoints", -1);
16641 break;
16642
16643 case 1:
16644 pvalue->m.tokensPresent = 1;
16645
16646 invokeStartElement (pctxt, "tokens", -1);
16647
16648 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
16649 if (stat != ASN_OK) return stat;
16650
16651 invokeEndElement (pctxt, "tokens", -1);
16652 break;
16653
16654 case 2:
16655 pvalue->m.cryptoTokensPresent = 1;
16656
16657 invokeStartElement (pctxt, "cryptoTokens", -1);
16658
16659 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
16660 if (stat != ASN_OK) return stat;
16661
16662 invokeEndElement (pctxt, "cryptoTokens", -1);
16663 break;
16664
16665 case 3:
16666 pvalue->m.authenticationCapabilityPresent = 1;
16667
16668 invokeStartElement (pctxt, "authenticationCapability", -1);
16669
16670 stat = asn1PD_H225_SeqOfH225AuthenticationMechanism (pctxt, &pvalue->authenticationCapability);
16671 if (stat != ASN_OK) return stat;
16672
16673 invokeEndElement (pctxt, "authenticationCapability", -1);
16674 break;
16675
16676 case 4:
16677 pvalue->m.algorithmOIDsPresent = 1;
16678
16679 invokeStartElement (pctxt, "algorithmOIDs", -1);
16680
16681 stat = asn1PD_H225GatekeeperRequest_algorithmOIDs (pctxt, &pvalue->algorithmOIDs);
16682 if (stat != ASN_OK) return stat;
16683
16684 invokeEndElement (pctxt, "algorithmOIDs", -1);
16685 break;
16686
16687 case 5:
16688 pvalue->m.integrityPresent = 1;
16689
16690 invokeStartElement (pctxt, "integrity", -1);
16691
16692 stat = asn1PD_H225_SeqOfH225IntegrityMechanism (pctxt, &pvalue->integrity);
16693 if (stat != ASN_OK) return stat;
16694
16695 invokeEndElement (pctxt, "integrity", -1);
16696 break;
16697
16698 case 6:
16699 pvalue->m.integrityCheckValuePresent = 1;
16700
16701 invokeStartElement (pctxt, "integrityCheckValue", -1);
16702
16703 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
16704 if (stat != ASN_OK) return stat;
16705
16706 invokeEndElement (pctxt, "integrityCheckValue", -1);
16707 break;
16708
16709 case 7:
16710 pvalue->m.supportsAltGKPresent = 1;
16711
16712 invokeStartElement (pctxt, "supportsAltGK", -1);
16713
16714 /* NULL */
16715 invokeNullValue (pctxt);
16716
16717 invokeEndElement (pctxt, "supportsAltGK", -1);
16718 break;
16719
16720 case 8:
16721 pvalue->m.featureSetPresent = 1;
16722
16723 invokeStartElement (pctxt, "featureSet", -1);
16724
16725 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
16726 if (stat != ASN_OK) return stat;
16727
16728 invokeEndElement (pctxt, "featureSet", -1);
16729 break;
16730
16731 case 9:
16732 pvalue->m.genericDataPresent = 1;
16733
16734 invokeStartElement (pctxt, "genericData", -1);
16735
16736 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
16737 if (stat != ASN_OK) return stat;
16738
16739 invokeEndElement (pctxt, "genericData", -1);
16740 break;
16741
16742 default:
16743 pctxt->buffer.byteIndex += openType.numocts;
16744 }
16745 copyContext (pctxt, &lctxt2);
16746 }
16747 else { /* unknown element */
16748 pctxt->buffer.byteIndex += openType.numocts;
16749 }
16750 }
16751 }
16752 }
16753
16754 return (stat);
16755 }
16756
16757 /**************************************************************/
16758 /* */
16759 /* GatekeeperConfirm */
16760 /* */
16761 /**************************************************************/
16762
16763 EXTERN int asn1PD_H225GatekeeperConfirm (OOCTXT* pctxt, H225GatekeeperConfirm* pvalue)
16764 {
16765 int stat = ASN_OK;
16766 OOCTXT lctxt;
16767 OOCTXT lctxt2;
16768 ASN1OpenType openType;
16769 ASN1UINT bitcnt;
16770 ASN1UINT i;
16771 ASN1BOOL optbit = 0;
16772 ASN1BOOL extbit = 0;
16773
16774 /* extension bit */
16775
16776 DECODEBIT (pctxt, &extbit);
16777
16778 /* optional bits */
16779
16780 memset (&pvalue->m, 0, sizeof(pvalue->m));
16781
16782 DECODEBIT (pctxt, &optbit);
16783 pvalue->m.nonStandardDataPresent = optbit;
16784
16785 DECODEBIT (pctxt, &optbit);
16786 pvalue->m.gatekeeperIdentifierPresent = optbit;
16787
16788 /* decode requestSeqNum */
16789
16790 invokeStartElement (pctxt, "requestSeqNum", -1);
16791
16792 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
16793 if (stat != ASN_OK) return stat;
16794
16795 invokeEndElement (pctxt, "requestSeqNum", -1);
16796
16797 /* decode protocolIdentifier */
16798
16799 invokeStartElement (pctxt, "protocolIdentifier", -1);
16800
16801 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
16802 if (stat != ASN_OK) return stat;
16803
16804 invokeEndElement (pctxt, "protocolIdentifier", -1);
16805
16806 /* decode nonStandardData */
16807
16808 if (pvalue->m.nonStandardDataPresent) {
16809 invokeStartElement (pctxt, "nonStandardData", -1);
16810
16811 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
16812 if (stat != ASN_OK) return stat;
16813
16814 invokeEndElement (pctxt, "nonStandardData", -1);
16815 }
16816
16817 /* decode gatekeeperIdentifier */
16818
16819 if (pvalue->m.gatekeeperIdentifierPresent) {
16820 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
16821
16822 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
16823 if (stat != ASN_OK) return stat;
16824
16825 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
16826 }
16827
16828 /* decode rasAddress */
16829
16830 invokeStartElement (pctxt, "rasAddress", -1);
16831
16832 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->rasAddress);
16833 if (stat != ASN_OK) return stat;
16834
16835 invokeEndElement (pctxt, "rasAddress", -1);
16836
16837 if (extbit) {
16838
16839 /* decode extension optional bits length */
16840
16841 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
16842 if (stat != ASN_OK) return stat;
16843
16844 bitcnt += 1;
16845
16846 ZEROCONTEXT (&lctxt);
16847 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
16848 if (stat != ASN_OK) return stat;
16849
16850 stat = moveBitCursor (pctxt, bitcnt);
16851 if (stat != ASN_OK) return stat;
16852
16853 for (i = 0; i < bitcnt; i++) {
16854 DECODEBIT (&lctxt, &optbit);
16855
16856 if (optbit) {
16857 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
16858 if (stat != ASN_OK) return stat;
16859
16860 if (i < 9 && openType.numocts > 0) { /* known element */
16861 copyContext (&lctxt2, pctxt);
16862 initContextBuffer (pctxt, openType.data, openType.numocts);
16863
16864 switch (i) {
16865 case 0:
16866 pvalue->m.alternateGatekeeperPresent = 1;
16867
16868 invokeStartElement (pctxt, "alternateGatekeeper", -1);
16869
16870 stat = asn1PD_H225_SeqOfH225AlternateGK (pctxt, &pvalue->alternateGatekeeper);
16871 if (stat != ASN_OK) return stat;
16872
16873 invokeEndElement (pctxt, "alternateGatekeeper", -1);
16874 break;
16875
16876 case 1:
16877 pvalue->m.authenticationModePresent = 1;
16878
16879 invokeStartElement (pctxt, "authenticationMode", -1);
16880
16881 stat = asn1PD_H235AuthenticationMechanism (pctxt, &pvalue->authenticationMode);
16882 if (stat != ASN_OK) return stat;
16883
16884 invokeEndElement (pctxt, "authenticationMode", -1);
16885 break;
16886
16887 case 2:
16888 pvalue->m.tokensPresent = 1;
16889
16890 invokeStartElement (pctxt, "tokens", -1);
16891
16892 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
16893 if (stat != ASN_OK) return stat;
16894
16895 invokeEndElement (pctxt, "tokens", -1);
16896 break;
16897
16898 case 3:
16899 pvalue->m.cryptoTokensPresent = 1;
16900
16901 invokeStartElement (pctxt, "cryptoTokens", -1);
16902
16903 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
16904 if (stat != ASN_OK) return stat;
16905
16906 invokeEndElement (pctxt, "cryptoTokens", -1);
16907 break;
16908
16909 case 4:
16910 pvalue->m.algorithmOIDPresent = 1;
16911
16912 invokeStartElement (pctxt, "algorithmOID", -1);
16913
16914 stat = decodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
16915 if (stat != ASN_OK) return stat;
16916 invokeOidValue (pctxt, pvalue->algorithmOID.numids, pvalue->algorithmOID.subid);
16917
16918 invokeEndElement (pctxt, "algorithmOID", -1);
16919 break;
16920
16921 case 5:
16922 pvalue->m.integrityPresent = 1;
16923
16924 invokeStartElement (pctxt, "integrity", -1);
16925
16926 stat = asn1PD_H225_SeqOfH225IntegrityMechanism (pctxt, &pvalue->integrity);
16927 if (stat != ASN_OK) return stat;
16928
16929 invokeEndElement (pctxt, "integrity", -1);
16930 break;
16931
16932 case 6:
16933 pvalue->m.integrityCheckValuePresent = 1;
16934
16935 invokeStartElement (pctxt, "integrityCheckValue", -1);
16936
16937 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
16938 if (stat != ASN_OK) return stat;
16939
16940 invokeEndElement (pctxt, "integrityCheckValue", -1);
16941 break;
16942
16943 case 7:
16944 pvalue->m.featureSetPresent = 1;
16945
16946 invokeStartElement (pctxt, "featureSet", -1);
16947
16948 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
16949 if (stat != ASN_OK) return stat;
16950
16951 invokeEndElement (pctxt, "featureSet", -1);
16952 break;
16953
16954 case 8:
16955 pvalue->m.genericDataPresent = 1;
16956
16957 invokeStartElement (pctxt, "genericData", -1);
16958
16959 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
16960 if (stat != ASN_OK) return stat;
16961
16962 invokeEndElement (pctxt, "genericData", -1);
16963 break;
16964
16965 default:
16966 pctxt->buffer.byteIndex += openType.numocts;
16967 }
16968 copyContext (pctxt, &lctxt2);
16969 }
16970 else { /* unknown element */
16971 pctxt->buffer.byteIndex += openType.numocts;
16972 }
16973 }
16974 }
16975 }
16976
16977 return (stat);
16978 }
16979
16980 /**************************************************************/
16981 /* */
16982 /* GatekeeperRejectReason */
16983 /* */
16984 /**************************************************************/
16985
16986 EXTERN int asn1PD_H225GatekeeperRejectReason (OOCTXT* pctxt, H225GatekeeperRejectReason* pvalue)
16987 {
16988 int stat = ASN_OK;
16989 ASN1UINT ui;
16990 ASN1OpenType openType;
16991 ASN1BOOL extbit = 0;
16992 OOCTXT lctxt;
16993
16994 /* extension bit */
16995
16996 DECODEBIT (pctxt, &extbit);
16997
16998 if (!extbit) {
16999 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
17000 if (stat != ASN_OK) return stat;
17001 else pvalue->t = ui + 1;
17002
17003 switch (ui) {
17004 /* resourceUnavailable */
17005 case 0:
17006 invokeStartElement (pctxt, "resourceUnavailable", -1);
17007
17008 /* NULL */
17009 invokeNullValue (pctxt);
17010
17011 invokeEndElement (pctxt, "resourceUnavailable", -1);
17012
17013 break;
17014
17015 /* terminalExcluded */
17016 case 1:
17017 invokeStartElement (pctxt, "terminalExcluded", -1);
17018
17019 /* NULL */
17020 invokeNullValue (pctxt);
17021
17022 invokeEndElement (pctxt, "terminalExcluded", -1);
17023
17024 break;
17025
17026 /* invalidRevision */
17027 case 2:
17028 invokeStartElement (pctxt, "invalidRevision", -1);
17029
17030 /* NULL */
17031 invokeNullValue (pctxt);
17032
17033 invokeEndElement (pctxt, "invalidRevision", -1);
17034
17035 break;
17036
17037 /* undefinedReason */
17038 case 3:
17039 invokeStartElement (pctxt, "undefinedReason", -1);
17040
17041 /* NULL */
17042 invokeNullValue (pctxt);
17043
17044 invokeEndElement (pctxt, "undefinedReason", -1);
17045
17046 break;
17047
17048 default:
17049 return ASN_E_INVOPT;
17050 }
17051 }
17052 else {
17053 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
17054 if (stat != ASN_OK) return stat;
17055 else pvalue->t = ui + 5;
17056
17057 stat = decodeByteAlign (pctxt);
17058 if (stat != ASN_OK) return stat;
17059
17060 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
17061 if (stat != ASN_OK) return stat;
17062
17063 copyContext (&lctxt, pctxt);
17064 initContextBuffer (pctxt, openType.data, openType.numocts);
17065
17066 switch (pvalue->t) {
17067 /* securityDenial */
17068 case 5:
17069 invokeStartElement (pctxt, "securityDenial", -1);
17070
17071 /* NULL */
17072 invokeNullValue (pctxt);
17073
17074 invokeEndElement (pctxt, "securityDenial", -1);
17075
17076 break;
17077
17078 /* genericDataReason */
17079 case 6:
17080 invokeStartElement (pctxt, "genericDataReason", -1);
17081
17082 /* NULL */
17083 invokeNullValue (pctxt);
17084
17085 invokeEndElement (pctxt, "genericDataReason", -1);
17086
17087 break;
17088
17089 /* neededFeatureNotSupported */
17090 case 7:
17091 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
17092
17093 /* NULL */
17094 invokeNullValue (pctxt);
17095
17096 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
17097
17098 break;
17099
17100 /* securityError */
17101 case 8:
17102 invokeStartElement (pctxt, "securityError", -1);
17103
17104 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors);
17105
17106 stat = asn1PD_H225SecurityErrors (pctxt, pvalue->u.securityError);
17107 if (stat != ASN_OK) return stat;
17108
17109 invokeEndElement (pctxt, "securityError", -1);
17110
17111 break;
17112
17113 default:;
17114 }
17115
17116 copyContext (pctxt, &lctxt);
17117 }
17118
17119 return (stat);
17120 }
17121
17122 /**************************************************************/
17123 /* */
17124 /* GatekeeperReject */
17125 /* */
17126 /**************************************************************/
17127
17128 EXTERN int asn1PD_H225GatekeeperReject (OOCTXT* pctxt, H225GatekeeperReject* pvalue)
17129 {
17130 int stat = ASN_OK;
17131 OOCTXT lctxt;
17132 OOCTXT lctxt2;
17133 ASN1OpenType openType;
17134 ASN1UINT bitcnt;
17135 ASN1UINT i;
17136 ASN1BOOL optbit = 0;
17137 ASN1BOOL extbit = 0;
17138
17139 /* extension bit */
17140
17141 DECODEBIT (pctxt, &extbit);
17142
17143 /* optional bits */
17144
17145 memset (&pvalue->m, 0, sizeof(pvalue->m));
17146
17147 DECODEBIT (pctxt, &optbit);
17148 pvalue->m.nonStandardDataPresent = optbit;
17149
17150 DECODEBIT (pctxt, &optbit);
17151 pvalue->m.gatekeeperIdentifierPresent = optbit;
17152
17153 /* decode requestSeqNum */
17154
17155 invokeStartElement (pctxt, "requestSeqNum", -1);
17156
17157 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
17158 if (stat != ASN_OK) return stat;
17159
17160 invokeEndElement (pctxt, "requestSeqNum", -1);
17161
17162 /* decode protocolIdentifier */
17163
17164 invokeStartElement (pctxt, "protocolIdentifier", -1);
17165
17166 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
17167 if (stat != ASN_OK) return stat;
17168
17169 invokeEndElement (pctxt, "protocolIdentifier", -1);
17170
17171 /* decode nonStandardData */
17172
17173 if (pvalue->m.nonStandardDataPresent) {
17174 invokeStartElement (pctxt, "nonStandardData", -1);
17175
17176 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17177 if (stat != ASN_OK) return stat;
17178
17179 invokeEndElement (pctxt, "nonStandardData", -1);
17180 }
17181
17182 /* decode gatekeeperIdentifier */
17183
17184 if (pvalue->m.gatekeeperIdentifierPresent) {
17185 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
17186
17187 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
17188 if (stat != ASN_OK) return stat;
17189
17190 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
17191 }
17192
17193 /* decode rejectReason */
17194
17195 invokeStartElement (pctxt, "rejectReason", -1);
17196
17197 stat = asn1PD_H225GatekeeperRejectReason (pctxt, &pvalue->rejectReason);
17198 if (stat != ASN_OK) return stat;
17199
17200 invokeEndElement (pctxt, "rejectReason", -1);
17201
17202 if (extbit) {
17203
17204 /* decode extension optional bits length */
17205
17206 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
17207 if (stat != ASN_OK) return stat;
17208
17209 bitcnt += 1;
17210
17211 ZEROCONTEXT (&lctxt);
17212 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
17213 if (stat != ASN_OK) return stat;
17214
17215 stat = moveBitCursor (pctxt, bitcnt);
17216 if (stat != ASN_OK) return stat;
17217
17218 for (i = 0; i < bitcnt; i++) {
17219 DECODEBIT (&lctxt, &optbit);
17220
17221 if (optbit) {
17222 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
17223 if (stat != ASN_OK) return stat;
17224
17225 if (i < 6 && openType.numocts > 0) { /* known element */
17226 copyContext (&lctxt2, pctxt);
17227 initContextBuffer (pctxt, openType.data, openType.numocts);
17228
17229 switch (i) {
17230 case 0:
17231 pvalue->m.altGKInfoPresent = 1;
17232
17233 invokeStartElement (pctxt, "altGKInfo", -1);
17234
17235 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
17236 if (stat != ASN_OK) return stat;
17237
17238 invokeEndElement (pctxt, "altGKInfo", -1);
17239 break;
17240
17241 case 1:
17242 pvalue->m.tokensPresent = 1;
17243
17244 invokeStartElement (pctxt, "tokens", -1);
17245
17246 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
17247 if (stat != ASN_OK) return stat;
17248
17249 invokeEndElement (pctxt, "tokens", -1);
17250 break;
17251
17252 case 2:
17253 pvalue->m.cryptoTokensPresent = 1;
17254
17255 invokeStartElement (pctxt, "cryptoTokens", -1);
17256
17257 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
17258 if (stat != ASN_OK) return stat;
17259
17260 invokeEndElement (pctxt, "cryptoTokens", -1);
17261 break;
17262
17263 case 3:
17264 pvalue->m.integrityCheckValuePresent = 1;
17265
17266 invokeStartElement (pctxt, "integrityCheckValue", -1);
17267
17268 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
17269 if (stat != ASN_OK) return stat;
17270
17271 invokeEndElement (pctxt, "integrityCheckValue", -1);
17272 break;
17273
17274 case 4:
17275 pvalue->m.featureSetPresent = 1;
17276
17277 invokeStartElement (pctxt, "featureSet", -1);
17278
17279 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
17280 if (stat != ASN_OK) return stat;
17281
17282 invokeEndElement (pctxt, "featureSet", -1);
17283 break;
17284
17285 case 5:
17286 pvalue->m.genericDataPresent = 1;
17287
17288 invokeStartElement (pctxt, "genericData", -1);
17289
17290 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
17291 if (stat != ASN_OK) return stat;
17292
17293 invokeEndElement (pctxt, "genericData", -1);
17294 break;
17295
17296 default:
17297 pctxt->buffer.byteIndex += openType.numocts;
17298 }
17299 copyContext (pctxt, &lctxt2);
17300 }
17301 else { /* unknown element */
17302 pctxt->buffer.byteIndex += openType.numocts;
17303 }
17304 }
17305 }
17306 }
17307
17308 return (stat);
17309 }
17310
17311 /**************************************************************/
17312 /* */
17313 /* _SeqOfH225AddressPattern */
17314 /* */
17315 /**************************************************************/
17316
17317 EXTERN int asn1PD_H225_SeqOfH225AddressPattern (OOCTXT* pctxt, H225_SeqOfH225AddressPattern* pvalue)
17318 {
17319 int stat = ASN_OK;
17320 H225AddressPattern* pdata;
17321 ASN1UINT count = 0;
17322 ASN1UINT xx1;
17323 int lstat;
17324
17325 dListInit (pvalue);
17326
17327 for (;;) {
17328 /* decode length determinant */
17329
17330 lstat = decodeLength (pctxt, &count);
17331 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
17332 return lstat;
17333 }
17334
17335 /* decode elements */
17336
17337 for (xx1 = 0; xx1 < count; xx1++) {
17338 invokeStartElement (pctxt, "elem", xx1);
17339
17340 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225AddressPattern);
17341
17342 stat = asn1PD_H225AddressPattern (pctxt, pdata);
17343 if (stat != ASN_OK) return stat;
17344 invokeEndElement (pctxt, "elem", xx1);
17345
17346 dListAppendNode (pctxt, pvalue, pdata);
17347 }
17348
17349 if(lstat == ASN_OK) break;
17350 }
17351
17352 return (stat);
17353 }
17354
17355 /**************************************************************/
17356 /* */
17357 /* _SeqOfH225H248PackagesDescriptor */
17358 /* */
17359 /**************************************************************/
17360
17361 EXTERN int asn1PD_H225_SeqOfH225H248PackagesDescriptor (OOCTXT* pctxt, H225_SeqOfH225H248PackagesDescriptor* pvalue)
17362 {
17363 int stat = ASN_OK;
17364 ASN1UINT xx1;
17365
17366 /* decode length determinant */
17367
17368 stat = decodeLength (pctxt, &pvalue->n);
17369 if (stat != ASN_OK) return stat;
17370
17371 /* decode elements */
17372
17373 ALLOC_ASN1ARRAY (pctxt, pvalue, H225H248PackagesDescriptor);
17374
17375 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
17376 invokeStartElement (pctxt, "elem", xx1);
17377
17378 stat = asn1PD_H225H248PackagesDescriptor (pctxt, &pvalue->elem[xx1]);
17379 if (stat != ASN_OK) return stat;
17380 invokeEndElement (pctxt, "elem", xx1);
17381
17382 }
17383
17384 return (stat);
17385 }
17386
17387 /**************************************************************/
17388 /* */
17389 /* RegistrationRequest */
17390 /* */
17391 /**************************************************************/
17392
17393 EXTERN int asn1PD_H225RegistrationRequest (OOCTXT* pctxt, H225RegistrationRequest* pvalue)
17394 {
17395 int stat = ASN_OK;
17396 OOCTXT lctxt;
17397 OOCTXT lctxt2;
17398 ASN1OpenType openType;
17399 ASN1UINT bitcnt;
17400 ASN1UINT i;
17401 ASN1BOOL optbit = 0;
17402 ASN1BOOL extbit = 0;
17403
17404 /* extension bit */
17405
17406 DECODEBIT (pctxt, &extbit);
17407
17408 /* optional bits */
17409
17410 memset (&pvalue->m, 0, sizeof(pvalue->m));
17411
17412 DECODEBIT (pctxt, &optbit);
17413 pvalue->m.nonStandardDataPresent = optbit;
17414
17415 DECODEBIT (pctxt, &optbit);
17416 pvalue->m.terminalAliasPresent = optbit;
17417
17418 DECODEBIT (pctxt, &optbit);
17419 pvalue->m.gatekeeperIdentifierPresent = optbit;
17420
17421 /* decode requestSeqNum */
17422
17423 invokeStartElement (pctxt, "requestSeqNum", -1);
17424
17425 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
17426 if (stat != ASN_OK) return stat;
17427
17428 invokeEndElement (pctxt, "requestSeqNum", -1);
17429
17430 /* decode protocolIdentifier */
17431
17432 invokeStartElement (pctxt, "protocolIdentifier", -1);
17433
17434 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
17435 if (stat != ASN_OK) return stat;
17436
17437 invokeEndElement (pctxt, "protocolIdentifier", -1);
17438
17439 /* decode nonStandardData */
17440
17441 if (pvalue->m.nonStandardDataPresent) {
17442 invokeStartElement (pctxt, "nonStandardData", -1);
17443
17444 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17445 if (stat != ASN_OK) return stat;
17446
17447 invokeEndElement (pctxt, "nonStandardData", -1);
17448 }
17449
17450 /* decode discoveryComplete */
17451
17452 invokeStartElement (pctxt, "discoveryComplete", -1);
17453
17454 stat = DECODEBIT (pctxt, &pvalue->discoveryComplete);
17455 if (stat != ASN_OK) return stat;
17456 invokeBoolValue (pctxt, pvalue->discoveryComplete);
17457
17458 invokeEndElement (pctxt, "discoveryComplete", -1);
17459
17460 /* decode callSignalAddress */
17461
17462 invokeStartElement (pctxt, "callSignalAddress", -1);
17463
17464 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
17465 if (stat != ASN_OK) return stat;
17466
17467 invokeEndElement (pctxt, "callSignalAddress", -1);
17468
17469 /* decode rasAddress */
17470
17471 invokeStartElement (pctxt, "rasAddress", -1);
17472
17473 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->rasAddress);
17474 if (stat != ASN_OK) return stat;
17475
17476 invokeEndElement (pctxt, "rasAddress", -1);
17477
17478 /* decode terminalType */
17479
17480 invokeStartElement (pctxt, "terminalType", -1);
17481
17482 stat = asn1PD_H225EndpointType (pctxt, &pvalue->terminalType);
17483 if (stat != ASN_OK) return stat;
17484
17485 invokeEndElement (pctxt, "terminalType", -1);
17486
17487 /* decode terminalAlias */
17488
17489 if (pvalue->m.terminalAliasPresent) {
17490 invokeStartElement (pctxt, "terminalAlias", -1);
17491
17492 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
17493 if (stat != ASN_OK) return stat;
17494
17495 invokeEndElement (pctxt, "terminalAlias", -1);
17496 }
17497
17498 /* decode gatekeeperIdentifier */
17499
17500 if (pvalue->m.gatekeeperIdentifierPresent) {
17501 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
17502
17503 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
17504 if (stat != ASN_OK) return stat;
17505
17506 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
17507 }
17508
17509 /* decode endpointVendor */
17510
17511 invokeStartElement (pctxt, "endpointVendor", -1);
17512
17513 stat = asn1PD_H225VendorIdentifier (pctxt, &pvalue->endpointVendor);
17514 if (stat != ASN_OK) return stat;
17515
17516 invokeEndElement (pctxt, "endpointVendor", -1);
17517
17518 if (extbit) {
17519
17520 /* decode extension optional bits length */
17521
17522 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
17523 if (stat != ASN_OK) return stat;
17524
17525 bitcnt += 1;
17526
17527 ZEROCONTEXT (&lctxt);
17528 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
17529 if (stat != ASN_OK) return stat;
17530
17531 stat = moveBitCursor (pctxt, bitcnt);
17532 if (stat != ASN_OK) return stat;
17533
17534 for (i = 0; i < bitcnt; i++) {
17535 DECODEBIT (&lctxt, &optbit);
17536
17537 if (optbit) {
17538 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
17539 if (stat != ASN_OK) return stat;
17540
17541 if (i < 23 && openType.numocts > 0) { /* known element */
17542 copyContext (&lctxt2, pctxt);
17543 initContextBuffer (pctxt, openType.data, openType.numocts);
17544
17545 switch (i) {
17546 case 0:
17547 pvalue->m.alternateEndpointsPresent = 1;
17548
17549 invokeStartElement (pctxt, "alternateEndpoints", -1);
17550
17551 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->alternateEndpoints);
17552 if (stat != ASN_OK) return stat;
17553
17554 invokeEndElement (pctxt, "alternateEndpoints", -1);
17555 break;
17556
17557 case 1:
17558 pvalue->m.timeToLivePresent = 1;
17559
17560 invokeStartElement (pctxt, "timeToLive", -1);
17561
17562 stat = asn1PD_H225TimeToLive (pctxt, &pvalue->timeToLive);
17563 if (stat != ASN_OK) return stat;
17564
17565 invokeEndElement (pctxt, "timeToLive", -1);
17566 break;
17567
17568 case 2:
17569 pvalue->m.tokensPresent = 1;
17570
17571 invokeStartElement (pctxt, "tokens", -1);
17572
17573 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
17574 if (stat != ASN_OK) return stat;
17575
17576 invokeEndElement (pctxt, "tokens", -1);
17577 break;
17578
17579 case 3:
17580 pvalue->m.cryptoTokensPresent = 1;
17581
17582 invokeStartElement (pctxt, "cryptoTokens", -1);
17583
17584 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
17585 if (stat != ASN_OK) return stat;
17586
17587 invokeEndElement (pctxt, "cryptoTokens", -1);
17588 break;
17589
17590 case 4:
17591 pvalue->m.integrityCheckValuePresent = 1;
17592
17593 invokeStartElement (pctxt, "integrityCheckValue", -1);
17594
17595 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
17596 if (stat != ASN_OK) return stat;
17597
17598 invokeEndElement (pctxt, "integrityCheckValue", -1);
17599 break;
17600
17601 case 5:
17602 pvalue->m.keepAlivePresent = 1;
17603
17604 invokeStartElement (pctxt, "keepAlive", -1);
17605
17606 stat = DECODEBIT (pctxt, &pvalue->keepAlive);
17607 if (stat != ASN_OK) return stat;
17608 invokeBoolValue (pctxt, pvalue->keepAlive);
17609
17610 invokeEndElement (pctxt, "keepAlive", -1);
17611 break;
17612
17613 case 6:
17614 pvalue->m.endpointIdentifierPresent = 1;
17615
17616 invokeStartElement (pctxt, "endpointIdentifier", -1);
17617
17618 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
17619 if (stat != ASN_OK) return stat;
17620
17621 invokeEndElement (pctxt, "endpointIdentifier", -1);
17622 break;
17623
17624 case 7:
17625 pvalue->m.willSupplyUUIEsPresent = 1;
17626
17627 invokeStartElement (pctxt, "willSupplyUUIEs", -1);
17628
17629 stat = DECODEBIT (pctxt, &pvalue->willSupplyUUIEs);
17630 if (stat != ASN_OK) return stat;
17631 invokeBoolValue (pctxt, pvalue->willSupplyUUIEs);
17632
17633 invokeEndElement (pctxt, "willSupplyUUIEs", -1);
17634 break;
17635
17636 case 8:
17637 pvalue->m.maintainConnectionPresent = 1;
17638
17639 invokeStartElement (pctxt, "maintainConnection", -1);
17640
17641 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
17642 if (stat != ASN_OK) return stat;
17643 invokeBoolValue (pctxt, pvalue->maintainConnection);
17644
17645 invokeEndElement (pctxt, "maintainConnection", -1);
17646 break;
17647
17648 case 9:
17649 pvalue->m.alternateTransportAddressesPresent = 1;
17650
17651 invokeStartElement (pctxt, "alternateTransportAddresses", -1);
17652
17653 stat = asn1PD_H225AlternateTransportAddresses (pctxt, &pvalue->alternateTransportAddresses);
17654 if (stat != ASN_OK) return stat;
17655
17656 invokeEndElement (pctxt, "alternateTransportAddresses", -1);
17657 break;
17658
17659 case 10:
17660 pvalue->m.additiveRegistrationPresent = 1;
17661
17662 invokeStartElement (pctxt, "additiveRegistration", -1);
17663
17664 /* NULL */
17665 invokeNullValue (pctxt);
17666
17667 invokeEndElement (pctxt, "additiveRegistration", -1);
17668 break;
17669
17670 case 11:
17671 pvalue->m.terminalAliasPatternPresent = 1;
17672
17673 invokeStartElement (pctxt, "terminalAliasPattern", -1);
17674
17675 stat = asn1PD_H225_SeqOfH225AddressPattern (pctxt, &pvalue->terminalAliasPattern);
17676 if (stat != ASN_OK) return stat;
17677
17678 invokeEndElement (pctxt, "terminalAliasPattern", -1);
17679 break;
17680
17681 case 12:
17682 pvalue->m.supportsAltGKPresent = 1;
17683
17684 invokeStartElement (pctxt, "supportsAltGK", -1);
17685
17686 /* NULL */
17687 invokeNullValue (pctxt);
17688
17689 invokeEndElement (pctxt, "supportsAltGK", -1);
17690 break;
17691
17692 case 13:
17693 pvalue->m.usageReportingCapabilityPresent = 1;
17694
17695 invokeStartElement (pctxt, "usageReportingCapability", -1);
17696
17697 stat = asn1PD_H225RasUsageInfoTypes (pctxt, &pvalue->usageReportingCapability);
17698 if (stat != ASN_OK) return stat;
17699
17700 invokeEndElement (pctxt, "usageReportingCapability", -1);
17701 break;
17702
17703 case 14:
17704 pvalue->m.multipleCallsPresent = 1;
17705
17706 invokeStartElement (pctxt, "multipleCalls", -1);
17707
17708 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
17709 if (stat != ASN_OK) return stat;
17710 invokeBoolValue (pctxt, pvalue->multipleCalls);
17711
17712 invokeEndElement (pctxt, "multipleCalls", -1);
17713 break;
17714
17715 case 15:
17716 pvalue->m.supportedH248PackagesPresent = 1;
17717
17718 invokeStartElement (pctxt, "supportedH248Packages", -1);
17719
17720 stat = asn1PD_H225_SeqOfH225H248PackagesDescriptor (pctxt, &pvalue->supportedH248Packages);
17721 if (stat != ASN_OK) return stat;
17722
17723 invokeEndElement (pctxt, "supportedH248Packages", -1);
17724 break;
17725
17726 case 16:
17727 pvalue->m.callCreditCapabilityPresent = 1;
17728
17729 invokeStartElement (pctxt, "callCreditCapability", -1);
17730
17731 stat = asn1PD_H225CallCreditCapability (pctxt, &pvalue->callCreditCapability);
17732 if (stat != ASN_OK) return stat;
17733
17734 invokeEndElement (pctxt, "callCreditCapability", -1);
17735 break;
17736
17737 case 17:
17738 pvalue->m.capacityReportingCapabilityPresent = 1;
17739
17740 invokeStartElement (pctxt, "capacityReportingCapability", -1);
17741
17742 stat = asn1PD_H225CapacityReportingCapability (pctxt, &pvalue->capacityReportingCapability);
17743 if (stat != ASN_OK) return stat;
17744
17745 invokeEndElement (pctxt, "capacityReportingCapability", -1);
17746 break;
17747
17748 case 18:
17749 pvalue->m.capacityPresent = 1;
17750
17751 invokeStartElement (pctxt, "capacity", -1);
17752
17753 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
17754 if (stat != ASN_OK) return stat;
17755
17756 invokeEndElement (pctxt, "capacity", -1);
17757 break;
17758
17759 case 19:
17760 pvalue->m.featureSetPresent = 1;
17761
17762 invokeStartElement (pctxt, "featureSet", -1);
17763
17764 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
17765 if (stat != ASN_OK) return stat;
17766
17767 invokeEndElement (pctxt, "featureSet", -1);
17768 break;
17769
17770 case 20:
17771 pvalue->m.genericDataPresent = 1;
17772
17773 invokeStartElement (pctxt, "genericData", -1);
17774
17775 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
17776 if (stat != ASN_OK) return stat;
17777
17778 invokeEndElement (pctxt, "genericData", -1);
17779 break;
17780
17781 case 21:
17782 pvalue->m.restartPresent = 1;
17783
17784 invokeStartElement (pctxt, "restart", -1);
17785
17786 /* NULL */
17787 invokeNullValue (pctxt);
17788
17789 invokeEndElement (pctxt, "restart", -1);
17790 break;
17791
17792 case 22:
17793 pvalue->m.supportsACFSequencesPresent = 1;
17794
17795 invokeStartElement (pctxt, "supportsACFSequences", -1);
17796
17797 /* NULL */
17798 invokeNullValue (pctxt);
17799
17800 invokeEndElement (pctxt, "supportsACFSequences", -1);
17801 break;
17802
17803 default:
17804 pctxt->buffer.byteIndex += openType.numocts;
17805 }
17806 copyContext (pctxt, &lctxt2);
17807 }
17808 else { /* unknown element */
17809 pctxt->buffer.byteIndex += openType.numocts;
17810 }
17811 }
17812 }
17813 }
17814
17815 return (stat);
17816 }
17817
17818 /**************************************************************/
17819 /* */
17820 /* RegistrationConfirm_preGrantedARQ */
17821 /* */
17822 /**************************************************************/
17823
17824 EXTERN int asn1PD_H225RegistrationConfirm_preGrantedARQ (OOCTXT* pctxt, H225RegistrationConfirm_preGrantedARQ* pvalue)
17825 {
17826 int stat = ASN_OK;
17827 OOCTXT lctxt;
17828 OOCTXT lctxt2;
17829 ASN1OpenType openType;
17830 ASN1UINT bitcnt;
17831 ASN1UINT i;
17832 ASN1BOOL optbit = 0;
17833 ASN1BOOL extbit = 0;
17834
17835 /* extension bit */
17836
17837 DECODEBIT (pctxt, &extbit);
17838
17839 /* optional bits */
17840
17841 memset (&pvalue->m, 0, sizeof(pvalue->m));
17842
17843 /* decode makeCall */
17844
17845 invokeStartElement (pctxt, "makeCall", -1);
17846
17847 stat = DECODEBIT (pctxt, &pvalue->makeCall);
17848 if (stat != ASN_OK) return stat;
17849 invokeBoolValue (pctxt, pvalue->makeCall);
17850
17851 invokeEndElement (pctxt, "makeCall", -1);
17852
17853 /* decode useGKCallSignalAddressToMakeCall */
17854
17855 invokeStartElement (pctxt, "useGKCallSignalAddressToMakeCall", -1);
17856
17857 stat = DECODEBIT (pctxt, &pvalue->useGKCallSignalAddressToMakeCall);
17858 if (stat != ASN_OK) return stat;
17859 invokeBoolValue (pctxt, pvalue->useGKCallSignalAddressToMakeCall);
17860
17861 invokeEndElement (pctxt, "useGKCallSignalAddressToMakeCall", -1);
17862
17863 /* decode answerCall */
17864
17865 invokeStartElement (pctxt, "answerCall", -1);
17866
17867 stat = DECODEBIT (pctxt, &pvalue->answerCall);
17868 if (stat != ASN_OK) return stat;
17869 invokeBoolValue (pctxt, pvalue->answerCall);
17870
17871 invokeEndElement (pctxt, "answerCall", -1);
17872
17873 /* decode useGKCallSignalAddressToAnswer */
17874
17875 invokeStartElement (pctxt, "useGKCallSignalAddressToAnswer", -1);
17876
17877 stat = DECODEBIT (pctxt, &pvalue->useGKCallSignalAddressToAnswer);
17878 if (stat != ASN_OK) return stat;
17879 invokeBoolValue (pctxt, pvalue->useGKCallSignalAddressToAnswer);
17880
17881 invokeEndElement (pctxt, "useGKCallSignalAddressToAnswer", -1);
17882
17883 if (extbit) {
17884
17885 /* decode extension optional bits length */
17886
17887 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
17888 if (stat != ASN_OK) return stat;
17889
17890 bitcnt += 1;
17891
17892 ZEROCONTEXT (&lctxt);
17893 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
17894 if (stat != ASN_OK) return stat;
17895
17896 stat = moveBitCursor (pctxt, bitcnt);
17897 if (stat != ASN_OK) return stat;
17898
17899 for (i = 0; i < bitcnt; i++) {
17900 DECODEBIT (&lctxt, &optbit);
17901
17902 if (optbit) {
17903 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
17904 if (stat != ASN_OK) return stat;
17905
17906 if (i < 4 && openType.numocts > 0) { /* known element */
17907 copyContext (&lctxt2, pctxt);
17908 initContextBuffer (pctxt, openType.data, openType.numocts);
17909
17910 switch (i) {
17911 case 0:
17912 pvalue->m.irrFrequencyInCallPresent = 1;
17913
17914 invokeStartElement (pctxt, "irrFrequencyInCall", -1);
17915
17916 stat = decodeConsUInt16 (pctxt, &pvalue->irrFrequencyInCall, 1U, 65535U);
17917 if (stat != ASN_OK) return stat;
17918 invokeUIntValue (pctxt, pvalue->irrFrequencyInCall);
17919
17920 invokeEndElement (pctxt, "irrFrequencyInCall", -1);
17921 break;
17922
17923 case 1:
17924 pvalue->m.totalBandwidthRestrictionPresent = 1;
17925
17926 invokeStartElement (pctxt, "totalBandwidthRestriction", -1);
17927
17928 stat = asn1PD_H225BandWidth (pctxt, &pvalue->totalBandwidthRestriction);
17929 if (stat != ASN_OK) return stat;
17930
17931 invokeEndElement (pctxt, "totalBandwidthRestriction", -1);
17932 break;
17933
17934 case 2:
17935 pvalue->m.alternateTransportAddressesPresent = 1;
17936
17937 invokeStartElement (pctxt, "alternateTransportAddresses", -1);
17938
17939 stat = asn1PD_H225AlternateTransportAddresses (pctxt, &pvalue->alternateTransportAddresses);
17940 if (stat != ASN_OK) return stat;
17941
17942 invokeEndElement (pctxt, "alternateTransportAddresses", -1);
17943 break;
17944
17945 case 3:
17946 pvalue->m.useSpecifiedTransportPresent = 1;
17947
17948 invokeStartElement (pctxt, "useSpecifiedTransport", -1);
17949
17950 stat = asn1PD_H225UseSpecifiedTransport (pctxt, &pvalue->useSpecifiedTransport);
17951 if (stat != ASN_OK) return stat;
17952
17953 invokeEndElement (pctxt, "useSpecifiedTransport", -1);
17954 break;
17955
17956 default:
17957 pctxt->buffer.byteIndex += openType.numocts;
17958 }
17959 copyContext (pctxt, &lctxt2);
17960 }
17961 else { /* unknown element */
17962 pctxt->buffer.byteIndex += openType.numocts;
17963 }
17964 }
17965 }
17966 }
17967
17968 return (stat);
17969 }
17970
17971 /**************************************************************/
17972 /* */
17973 /* _SeqOfH225RasUsageSpecification */
17974 /* */
17975 /**************************************************************/
17976
17977 EXTERN int asn1PD_H225_SeqOfH225RasUsageSpecification (OOCTXT* pctxt, H225_SeqOfH225RasUsageSpecification* pvalue)
17978 {
17979 int stat = ASN_OK;
17980 H225RasUsageSpecification* pdata;
17981 ASN1UINT count = 0;
17982 ASN1UINT xx1;
17983 int lstat;
17984
17985 dListInit (pvalue);
17986
17987 for (;;) {
17988 /* decode length determinant */
17989
17990 lstat = decodeLength (pctxt, &count);
17991 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
17992 return lstat;
17993 }
17994
17995 /* decode elements */
17996
17997 for (xx1 = 0; xx1 < count; xx1++) {
17998 invokeStartElement (pctxt, "elem", xx1);
17999
18000 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225RasUsageSpecification);
18001
18002 stat = asn1PD_H225RasUsageSpecification (pctxt, pdata);
18003 if (stat != ASN_OK) return stat;
18004 invokeEndElement (pctxt, "elem", xx1);
18005
18006 dListAppendNode (pctxt, pvalue, pdata);
18007 }
18008
18009 if(lstat == ASN_OK) break;
18010 }
18011
18012 return (stat);
18013 }
18014
18015 /**************************************************************/
18016 /* */
18017 /* RegistrationConfirm */
18018 /* */
18019 /**************************************************************/
18020
18021 EXTERN int asn1PD_H225RegistrationConfirm (OOCTXT* pctxt, H225RegistrationConfirm* pvalue)
18022 {
18023 int stat = ASN_OK;
18024 OOCTXT lctxt;
18025 OOCTXT lctxt2;
18026 ASN1OpenType openType;
18027 ASN1UINT bitcnt;
18028 ASN1UINT i;
18029 ASN1BOOL optbit = 0;
18030 ASN1BOOL extbit = 0;
18031
18032 /* extension bit */
18033
18034 DECODEBIT (pctxt, &extbit);
18035
18036 /* optional bits */
18037
18038 memset (&pvalue->m, 0, sizeof(pvalue->m));
18039
18040 DECODEBIT (pctxt, &optbit);
18041 pvalue->m.nonStandardDataPresent = optbit;
18042
18043 DECODEBIT (pctxt, &optbit);
18044 pvalue->m.terminalAliasPresent = optbit;
18045
18046 DECODEBIT (pctxt, &optbit);
18047 pvalue->m.gatekeeperIdentifierPresent = optbit;
18048
18049 /* decode requestSeqNum */
18050
18051 invokeStartElement (pctxt, "requestSeqNum", -1);
18052
18053 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
18054 if (stat != ASN_OK) return stat;
18055
18056 invokeEndElement (pctxt, "requestSeqNum", -1);
18057
18058 /* decode protocolIdentifier */
18059
18060 invokeStartElement (pctxt, "protocolIdentifier", -1);
18061
18062 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
18063 if (stat != ASN_OK) return stat;
18064
18065 invokeEndElement (pctxt, "protocolIdentifier", -1);
18066
18067 /* decode nonStandardData */
18068
18069 if (pvalue->m.nonStandardDataPresent) {
18070 invokeStartElement (pctxt, "nonStandardData", -1);
18071
18072 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18073 if (stat != ASN_OK) return stat;
18074
18075 invokeEndElement (pctxt, "nonStandardData", -1);
18076 }
18077
18078 /* decode callSignalAddress */
18079
18080 invokeStartElement (pctxt, "callSignalAddress", -1);
18081
18082 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
18083 if (stat != ASN_OK) return stat;
18084
18085 invokeEndElement (pctxt, "callSignalAddress", -1);
18086
18087 /* decode terminalAlias */
18088
18089 if (pvalue->m.terminalAliasPresent) {
18090 invokeStartElement (pctxt, "terminalAlias", -1);
18091
18092 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
18093 if (stat != ASN_OK) return stat;
18094
18095 invokeEndElement (pctxt, "terminalAlias", -1);
18096 }
18097
18098 /* decode gatekeeperIdentifier */
18099
18100 if (pvalue->m.gatekeeperIdentifierPresent) {
18101 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
18102
18103 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
18104 if (stat != ASN_OK) return stat;
18105
18106 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
18107 }
18108
18109 /* decode endpointIdentifier */
18110
18111 invokeStartElement (pctxt, "endpointIdentifier", -1);
18112
18113 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
18114 if (stat != ASN_OK) return stat;
18115
18116 invokeEndElement (pctxt, "endpointIdentifier", -1);
18117
18118 if (extbit) {
18119
18120 /* decode extension optional bits length */
18121
18122 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
18123 if (stat != ASN_OK) return stat;
18124
18125 bitcnt += 1;
18126
18127 ZEROCONTEXT (&lctxt);
18128 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
18129 if (stat != ASN_OK) return stat;
18130
18131 stat = moveBitCursor (pctxt, bitcnt);
18132 if (stat != ASN_OK) return stat;
18133
18134 for (i = 0; i < bitcnt; i++) {
18135 DECODEBIT (&lctxt, &optbit);
18136
18137 if (optbit) {
18138 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
18139 if (stat != ASN_OK) return stat;
18140
18141 if (i < 17 && openType.numocts > 0) { /* known element */
18142 copyContext (&lctxt2, pctxt);
18143 initContextBuffer (pctxt, openType.data, openType.numocts);
18144
18145 switch (i) {
18146 case 0:
18147 pvalue->m.alternateGatekeeperPresent = 1;
18148
18149 invokeStartElement (pctxt, "alternateGatekeeper", -1);
18150
18151 stat = asn1PD_H225_SeqOfH225AlternateGK (pctxt, &pvalue->alternateGatekeeper);
18152 if (stat != ASN_OK) return stat;
18153
18154 invokeEndElement (pctxt, "alternateGatekeeper", -1);
18155 break;
18156
18157 case 1:
18158 pvalue->m.timeToLivePresent = 1;
18159
18160 invokeStartElement (pctxt, "timeToLive", -1);
18161
18162 stat = asn1PD_H225TimeToLive (pctxt, &pvalue->timeToLive);
18163 if (stat != ASN_OK) return stat;
18164
18165 invokeEndElement (pctxt, "timeToLive", -1);
18166 break;
18167
18168 case 2:
18169 pvalue->m.tokensPresent = 1;
18170
18171 invokeStartElement (pctxt, "tokens", -1);
18172
18173 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
18174 if (stat != ASN_OK) return stat;
18175
18176 invokeEndElement (pctxt, "tokens", -1);
18177 break;
18178
18179 case 3:
18180 pvalue->m.cryptoTokensPresent = 1;
18181
18182 invokeStartElement (pctxt, "cryptoTokens", -1);
18183
18184 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
18185 if (stat != ASN_OK) return stat;
18186
18187 invokeEndElement (pctxt, "cryptoTokens", -1);
18188 break;
18189
18190 case 4:
18191 pvalue->m.integrityCheckValuePresent = 1;
18192
18193 invokeStartElement (pctxt, "integrityCheckValue", -1);
18194
18195 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
18196 if (stat != ASN_OK) return stat;
18197
18198 invokeEndElement (pctxt, "integrityCheckValue", -1);
18199 break;
18200
18201 case 5:
18202 pvalue->m.willRespondToIRRPresent = 1;
18203
18204 invokeStartElement (pctxt, "willRespondToIRR", -1);
18205
18206 stat = DECODEBIT (pctxt, &pvalue->willRespondToIRR);
18207 if (stat != ASN_OK) return stat;
18208 invokeBoolValue (pctxt, pvalue->willRespondToIRR);
18209
18210 invokeEndElement (pctxt, "willRespondToIRR", -1);
18211 break;
18212
18213 case 6:
18214 pvalue->m.preGrantedARQPresent = 1;
18215
18216 invokeStartElement (pctxt, "preGrantedARQ", -1);
18217
18218 stat = asn1PD_H225RegistrationConfirm_preGrantedARQ (pctxt, &pvalue->preGrantedARQ);
18219 if (stat != ASN_OK) return stat;
18220
18221 invokeEndElement (pctxt, "preGrantedARQ", -1);
18222 break;
18223
18224 case 7:
18225 pvalue->m.maintainConnectionPresent = 1;
18226
18227 invokeStartElement (pctxt, "maintainConnection", -1);
18228
18229 stat = DECODEBIT (pctxt, &pvalue->maintainConnection);
18230 if (stat != ASN_OK) return stat;
18231 invokeBoolValue (pctxt, pvalue->maintainConnection);
18232
18233 invokeEndElement (pctxt, "maintainConnection", -1);
18234 break;
18235
18236 case 8:
18237 pvalue->m.serviceControlPresent = 1;
18238
18239 invokeStartElement (pctxt, "serviceControl", -1);
18240
18241 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
18242 if (stat != ASN_OK) return stat;
18243
18244 invokeEndElement (pctxt, "serviceControl", -1);
18245 break;
18246
18247 case 9:
18248 pvalue->m.supportsAdditiveRegistrationPresent = 1;
18249
18250 invokeStartElement (pctxt, "supportsAdditiveRegistration", -1);
18251
18252 /* NULL */
18253 invokeNullValue (pctxt);
18254
18255 invokeEndElement (pctxt, "supportsAdditiveRegistration", -1);
18256 break;
18257
18258 case 10:
18259 pvalue->m.terminalAliasPatternPresent = 1;
18260
18261 invokeStartElement (pctxt, "terminalAliasPattern", -1);
18262
18263 stat = asn1PD_H225_SeqOfH225AddressPattern (pctxt, &pvalue->terminalAliasPattern);
18264 if (stat != ASN_OK) return stat;
18265
18266 invokeEndElement (pctxt, "terminalAliasPattern", -1);
18267 break;
18268
18269 case 11:
18270 pvalue->m.supportedPrefixesPresent = 1;
18271
18272 invokeStartElement (pctxt, "supportedPrefixes", -1);
18273
18274 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
18275 if (stat != ASN_OK) return stat;
18276
18277 invokeEndElement (pctxt, "supportedPrefixes", -1);
18278 break;
18279
18280 case 12:
18281 pvalue->m.usageSpecPresent = 1;
18282
18283 invokeStartElement (pctxt, "usageSpec", -1);
18284
18285 stat = asn1PD_H225_SeqOfH225RasUsageSpecification (pctxt, &pvalue->usageSpec);
18286 if (stat != ASN_OK) return stat;
18287
18288 invokeEndElement (pctxt, "usageSpec", -1);
18289 break;
18290
18291 case 13:
18292 pvalue->m.featureServerAliasPresent = 1;
18293
18294 invokeStartElement (pctxt, "featureServerAlias", -1);
18295
18296 stat = asn1PD_H225AliasAddress (pctxt, &pvalue->featureServerAlias);
18297 if (stat != ASN_OK) return stat;
18298
18299 invokeEndElement (pctxt, "featureServerAlias", -1);
18300 break;
18301
18302 case 14:
18303 pvalue->m.capacityReportingSpecPresent = 1;
18304
18305 invokeStartElement (pctxt, "capacityReportingSpec", -1);
18306
18307 stat = asn1PD_H225CapacityReportingSpecification (pctxt, &pvalue->capacityReportingSpec);
18308 if (stat != ASN_OK) return stat;
18309
18310 invokeEndElement (pctxt, "capacityReportingSpec", -1);
18311 break;
18312
18313 case 15:
18314 pvalue->m.featureSetPresent = 1;
18315
18316 invokeStartElement (pctxt, "featureSet", -1);
18317
18318 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
18319 if (stat != ASN_OK) return stat;
18320
18321 invokeEndElement (pctxt, "featureSet", -1);
18322 break;
18323
18324 case 16:
18325 pvalue->m.genericDataPresent = 1;
18326
18327 invokeStartElement (pctxt, "genericData", -1);
18328
18329 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
18330 if (stat != ASN_OK) return stat;
18331
18332 invokeEndElement (pctxt, "genericData", -1);
18333 break;
18334
18335 default:
18336 pctxt->buffer.byteIndex += openType.numocts;
18337 }
18338 copyContext (pctxt, &lctxt2);
18339 }
18340 else { /* unknown element */
18341 pctxt->buffer.byteIndex += openType.numocts;
18342 }
18343 }
18344 }
18345 }
18346
18347 return (stat);
18348 }
18349
18350 /**************************************************************/
18351 /* */
18352 /* RegistrationRejectReason_invalidTerminalAliases */
18353 /* */
18354 /**************************************************************/
18355
18356 EXTERN int asn1PD_H225RegistrationRejectReason_invalidTerminalAliases (OOCTXT* pctxt, H225RegistrationRejectReason_invalidTerminalAliases* pvalue)
18357 {
18358 int stat = ASN_OK;
18359 OOCTXT lctxt;
18360 ASN1OpenType openType;
18361 ASN1UINT bitcnt;
18362 ASN1UINT i;
18363 ASN1BOOL optbit = 0;
18364 ASN1BOOL extbit = 0;
18365
18366 /* extension bit */
18367
18368 DECODEBIT (pctxt, &extbit);
18369
18370 /* optional bits */
18371
18372 memset (&pvalue->m, 0, sizeof(pvalue->m));
18373
18374 DECODEBIT (pctxt, &optbit);
18375 pvalue->m.terminalAliasPresent = optbit;
18376
18377 DECODEBIT (pctxt, &optbit);
18378 pvalue->m.terminalAliasPatternPresent = optbit;
18379
18380 DECODEBIT (pctxt, &optbit);
18381 pvalue->m.supportedPrefixesPresent = optbit;
18382
18383 /* decode terminalAlias */
18384
18385 if (pvalue->m.terminalAliasPresent) {
18386 invokeStartElement (pctxt, "terminalAlias", -1);
18387
18388 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
18389 if (stat != ASN_OK) return stat;
18390
18391 invokeEndElement (pctxt, "terminalAlias", -1);
18392 }
18393
18394 /* decode terminalAliasPattern */
18395
18396 if (pvalue->m.terminalAliasPatternPresent) {
18397 invokeStartElement (pctxt, "terminalAliasPattern", -1);
18398
18399 stat = asn1PD_H225_SeqOfH225AddressPattern (pctxt, &pvalue->terminalAliasPattern);
18400 if (stat != ASN_OK) return stat;
18401
18402 invokeEndElement (pctxt, "terminalAliasPattern", -1);
18403 }
18404
18405 /* decode supportedPrefixes */
18406
18407 if (pvalue->m.supportedPrefixesPresent) {
18408 invokeStartElement (pctxt, "supportedPrefixes", -1);
18409
18410 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
18411 if (stat != ASN_OK) return stat;
18412
18413 invokeEndElement (pctxt, "supportedPrefixes", -1);
18414 }
18415
18416 if (extbit) {
18417
18418 /* decode extension optional bits length */
18419
18420 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
18421 if (stat != ASN_OK) return stat;
18422
18423 bitcnt += 1;
18424
18425 ZEROCONTEXT (&lctxt);
18426 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
18427 if (stat != ASN_OK) return stat;
18428
18429 stat = moveBitCursor (pctxt, bitcnt);
18430 if (stat != ASN_OK) return stat;
18431
18432 for (i = 0; i < bitcnt; i++) {
18433 DECODEBIT (&lctxt, &optbit);
18434
18435 if (optbit) {
18436 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
18437 if (stat != ASN_OK) return stat;
18438
18439 pctxt->buffer.byteIndex += openType.numocts;
18440 }
18441 }
18442 }
18443
18444 return (stat);
18445 }
18446
18447 /**************************************************************/
18448 /* */
18449 /* RegistrationRejectReason */
18450 /* */
18451 /**************************************************************/
18452
18453 EXTERN int asn1PD_H225RegistrationRejectReason (OOCTXT* pctxt, H225RegistrationRejectReason* pvalue)
18454 {
18455 int stat = ASN_OK;
18456 ASN1UINT ui;
18457 ASN1OpenType openType;
18458 ASN1BOOL extbit = 0;
18459 OOCTXT lctxt;
18460
18461 /* extension bit */
18462
18463 DECODEBIT (pctxt, &extbit);
18464
18465 if (!extbit) {
18466 stat = decodeConsUnsigned (pctxt, &ui, 0, 7);
18467 if (stat != ASN_OK) return stat;
18468 else pvalue->t = ui + 1;
18469
18470 switch (ui) {
18471 /* discoveryRequired */
18472 case 0:
18473 invokeStartElement (pctxt, "discoveryRequired", -1);
18474
18475 /* NULL */
18476 invokeNullValue (pctxt);
18477
18478 invokeEndElement (pctxt, "discoveryRequired", -1);
18479
18480 break;
18481
18482 /* invalidRevision */
18483 case 1:
18484 invokeStartElement (pctxt, "invalidRevision", -1);
18485
18486 /* NULL */
18487 invokeNullValue (pctxt);
18488
18489 invokeEndElement (pctxt, "invalidRevision", -1);
18490
18491 break;
18492
18493 /* invalidCallSignalAddress */
18494 case 2:
18495 invokeStartElement (pctxt, "invalidCallSignalAddress", -1);
18496
18497 /* NULL */
18498 invokeNullValue (pctxt);
18499
18500 invokeEndElement (pctxt, "invalidCallSignalAddress", -1);
18501
18502 break;
18503
18504 /* invalidRASAddress */
18505 case 3:
18506 invokeStartElement (pctxt, "invalidRASAddress", -1);
18507
18508 /* NULL */
18509 invokeNullValue (pctxt);
18510
18511 invokeEndElement (pctxt, "invalidRASAddress", -1);
18512
18513 break;
18514
18515 /* duplicateAlias */
18516 case 4:
18517 invokeStartElement (pctxt, "duplicateAlias", -1);
18518
18519 pvalue->u.duplicateAlias = ALLOC_ASN1ELEM (pctxt, H225_SeqOfH225AliasAddress);
18520
18521 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, pvalue->u.duplicateAlias);
18522 if (stat != ASN_OK) return stat;
18523
18524 invokeEndElement (pctxt, "duplicateAlias", -1);
18525
18526 break;
18527
18528 /* invalidTerminalType */
18529 case 5:
18530 invokeStartElement (pctxt, "invalidTerminalType", -1);
18531
18532 /* NULL */
18533 invokeNullValue (pctxt);
18534
18535 invokeEndElement (pctxt, "invalidTerminalType", -1);
18536
18537 break;
18538
18539 /* undefinedReason */
18540 case 6:
18541 invokeStartElement (pctxt, "undefinedReason", -1);
18542
18543 /* NULL */
18544 invokeNullValue (pctxt);
18545
18546 invokeEndElement (pctxt, "undefinedReason", -1);
18547
18548 break;
18549
18550 /* transportNotSupported */
18551 case 7:
18552 invokeStartElement (pctxt, "transportNotSupported", -1);
18553
18554 /* NULL */
18555 invokeNullValue (pctxt);
18556
18557 invokeEndElement (pctxt, "transportNotSupported", -1);
18558
18559 break;
18560
18561 default:
18562 return ASN_E_INVOPT;
18563 }
18564 }
18565 else {
18566 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
18567 if (stat != ASN_OK) return stat;
18568 else pvalue->t = ui + 9;
18569
18570 stat = decodeByteAlign (pctxt);
18571 if (stat != ASN_OK) return stat;
18572
18573 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
18574 if (stat != ASN_OK) return stat;
18575
18576 copyContext (&lctxt, pctxt);
18577 initContextBuffer (pctxt, openType.data, openType.numocts);
18578
18579 switch (pvalue->t) {
18580 /* transportQOSNotSupported */
18581 case 9:
18582 invokeStartElement (pctxt, "transportQOSNotSupported", -1);
18583
18584 /* NULL */
18585 invokeNullValue (pctxt);
18586
18587 invokeEndElement (pctxt, "transportQOSNotSupported", -1);
18588
18589 break;
18590
18591 /* resourceUnavailable */
18592 case 10:
18593 invokeStartElement (pctxt, "resourceUnavailable", -1);
18594
18595 /* NULL */
18596 invokeNullValue (pctxt);
18597
18598 invokeEndElement (pctxt, "resourceUnavailable", -1);
18599
18600 break;
18601
18602 /* invalidAlias */
18603 case 11:
18604 invokeStartElement (pctxt, "invalidAlias", -1);
18605
18606 /* NULL */
18607 invokeNullValue (pctxt);
18608
18609 invokeEndElement (pctxt, "invalidAlias", -1);
18610
18611 break;
18612
18613 /* securityDenial */
18614 case 12:
18615 invokeStartElement (pctxt, "securityDenial", -1);
18616
18617 /* NULL */
18618 invokeNullValue (pctxt);
18619
18620 invokeEndElement (pctxt, "securityDenial", -1);
18621
18622 break;
18623
18624 /* fullRegistrationRequired */
18625 case 13:
18626 invokeStartElement (pctxt, "fullRegistrationRequired", -1);
18627
18628 /* NULL */
18629 invokeNullValue (pctxt);
18630
18631 invokeEndElement (pctxt, "fullRegistrationRequired", -1);
18632
18633 break;
18634
18635 /* additiveRegistrationNotSupported */
18636 case 14:
18637 invokeStartElement (pctxt, "additiveRegistrationNotSupported", -1);
18638
18639 /* NULL */
18640 invokeNullValue (pctxt);
18641
18642 invokeEndElement (pctxt, "additiveRegistrationNotSupported", -1);
18643
18644 break;
18645
18646 /* invalidTerminalAliases */
18647 case 15:
18648 invokeStartElement (pctxt, "invalidTerminalAliases", -1);
18649
18650 pvalue->u.invalidTerminalAliases = ALLOC_ASN1ELEM (pctxt, H225RegistrationRejectReason_invalidTerminalAliases);
18651
18652 stat = asn1PD_H225RegistrationRejectReason_invalidTerminalAliases (pctxt, pvalue->u.invalidTerminalAliases);
18653 if (stat != ASN_OK) return stat;
18654
18655 invokeEndElement (pctxt, "invalidTerminalAliases", -1);
18656
18657 break;
18658
18659 /* genericDataReason */
18660 case 16:
18661 invokeStartElement (pctxt, "genericDataReason", -1);
18662
18663 /* NULL */
18664 invokeNullValue (pctxt);
18665
18666 invokeEndElement (pctxt, "genericDataReason", -1);
18667
18668 break;
18669
18670 /* neededFeatureNotSupported */
18671 case 17:
18672 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
18673
18674 /* NULL */
18675 invokeNullValue (pctxt);
18676
18677 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
18678
18679 break;
18680
18681 /* securityError */
18682 case 18:
18683 invokeStartElement (pctxt, "securityError", -1);
18684
18685 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors);
18686
18687 stat = asn1PD_H225SecurityErrors (pctxt, pvalue->u.securityError);
18688 if (stat != ASN_OK) return stat;
18689
18690 invokeEndElement (pctxt, "securityError", -1);
18691
18692 break;
18693
18694 default:;
18695 }
18696
18697 copyContext (pctxt, &lctxt);
18698 }
18699
18700 return (stat);
18701 }
18702
18703 /**************************************************************/
18704 /* */
18705 /* RegistrationReject */
18706 /* */
18707 /**************************************************************/
18708
18709 EXTERN int asn1PD_H225RegistrationReject (OOCTXT* pctxt, H225RegistrationReject* pvalue)
18710 {
18711 int stat = ASN_OK;
18712 OOCTXT lctxt;
18713 OOCTXT lctxt2;
18714 ASN1OpenType openType;
18715 ASN1UINT bitcnt;
18716 ASN1UINT i;
18717 ASN1BOOL optbit = 0;
18718 ASN1BOOL extbit = 0;
18719
18720 /* extension bit */
18721
18722 DECODEBIT (pctxt, &extbit);
18723
18724 /* optional bits */
18725
18726 memset (&pvalue->m, 0, sizeof(pvalue->m));
18727
18728 DECODEBIT (pctxt, &optbit);
18729 pvalue->m.nonStandardDataPresent = optbit;
18730
18731 DECODEBIT (pctxt, &optbit);
18732 pvalue->m.gatekeeperIdentifierPresent = optbit;
18733
18734 /* decode requestSeqNum */
18735
18736 invokeStartElement (pctxt, "requestSeqNum", -1);
18737
18738 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
18739 if (stat != ASN_OK) return stat;
18740
18741 invokeEndElement (pctxt, "requestSeqNum", -1);
18742
18743 /* decode protocolIdentifier */
18744
18745 invokeStartElement (pctxt, "protocolIdentifier", -1);
18746
18747 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
18748 if (stat != ASN_OK) return stat;
18749
18750 invokeEndElement (pctxt, "protocolIdentifier", -1);
18751
18752 /* decode nonStandardData */
18753
18754 if (pvalue->m.nonStandardDataPresent) {
18755 invokeStartElement (pctxt, "nonStandardData", -1);
18756
18757 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18758 if (stat != ASN_OK) return stat;
18759
18760 invokeEndElement (pctxt, "nonStandardData", -1);
18761 }
18762
18763 /* decode rejectReason */
18764
18765 invokeStartElement (pctxt, "rejectReason", -1);
18766
18767 stat = asn1PD_H225RegistrationRejectReason (pctxt, &pvalue->rejectReason);
18768 if (stat != ASN_OK) return stat;
18769
18770 invokeEndElement (pctxt, "rejectReason", -1);
18771
18772 /* decode gatekeeperIdentifier */
18773
18774 if (pvalue->m.gatekeeperIdentifierPresent) {
18775 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
18776
18777 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
18778 if (stat != ASN_OK) return stat;
18779
18780 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
18781 }
18782
18783 if (extbit) {
18784
18785 /* decode extension optional bits length */
18786
18787 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
18788 if (stat != ASN_OK) return stat;
18789
18790 bitcnt += 1;
18791
18792 ZEROCONTEXT (&lctxt);
18793 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
18794 if (stat != ASN_OK) return stat;
18795
18796 stat = moveBitCursor (pctxt, bitcnt);
18797 if (stat != ASN_OK) return stat;
18798
18799 for (i = 0; i < bitcnt; i++) {
18800 DECODEBIT (&lctxt, &optbit);
18801
18802 if (optbit) {
18803 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
18804 if (stat != ASN_OK) return stat;
18805
18806 if (i < 6 && openType.numocts > 0) { /* known element */
18807 copyContext (&lctxt2, pctxt);
18808 initContextBuffer (pctxt, openType.data, openType.numocts);
18809
18810 switch (i) {
18811 case 0:
18812 pvalue->m.altGKInfoPresent = 1;
18813
18814 invokeStartElement (pctxt, "altGKInfo", -1);
18815
18816 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
18817 if (stat != ASN_OK) return stat;
18818
18819 invokeEndElement (pctxt, "altGKInfo", -1);
18820 break;
18821
18822 case 1:
18823 pvalue->m.tokensPresent = 1;
18824
18825 invokeStartElement (pctxt, "tokens", -1);
18826
18827 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
18828 if (stat != ASN_OK) return stat;
18829
18830 invokeEndElement (pctxt, "tokens", -1);
18831 break;
18832
18833 case 2:
18834 pvalue->m.cryptoTokensPresent = 1;
18835
18836 invokeStartElement (pctxt, "cryptoTokens", -1);
18837
18838 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
18839 if (stat != ASN_OK) return stat;
18840
18841 invokeEndElement (pctxt, "cryptoTokens", -1);
18842 break;
18843
18844 case 3:
18845 pvalue->m.integrityCheckValuePresent = 1;
18846
18847 invokeStartElement (pctxt, "integrityCheckValue", -1);
18848
18849 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
18850 if (stat != ASN_OK) return stat;
18851
18852 invokeEndElement (pctxt, "integrityCheckValue", -1);
18853 break;
18854
18855 case 4:
18856 pvalue->m.featureSetPresent = 1;
18857
18858 invokeStartElement (pctxt, "featureSet", -1);
18859
18860 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
18861 if (stat != ASN_OK) return stat;
18862
18863 invokeEndElement (pctxt, "featureSet", -1);
18864 break;
18865
18866 case 5:
18867 pvalue->m.genericDataPresent = 1;
18868
18869 invokeStartElement (pctxt, "genericData", -1);
18870
18871 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
18872 if (stat != ASN_OK) return stat;
18873
18874 invokeEndElement (pctxt, "genericData", -1);
18875 break;
18876
18877 default:
18878 pctxt->buffer.byteIndex += openType.numocts;
18879 }
18880 copyContext (pctxt, &lctxt2);
18881 }
18882 else { /* unknown element */
18883 pctxt->buffer.byteIndex += openType.numocts;
18884 }
18885 }
18886 }
18887 }
18888
18889 return (stat);
18890 }
18891
18892 /**************************************************************/
18893 /* */
18894 /* UnregRequestReason */
18895 /* */
18896 /**************************************************************/
18897
18898 EXTERN int asn1PD_H225UnregRequestReason (OOCTXT* pctxt, H225UnregRequestReason* pvalue)
18899 {
18900 int stat = ASN_OK;
18901 ASN1UINT ui;
18902 ASN1OpenType openType;
18903 ASN1BOOL extbit = 0;
18904 OOCTXT lctxt;
18905
18906 /* extension bit */
18907
18908 DECODEBIT (pctxt, &extbit);
18909
18910 if (!extbit) {
18911 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
18912 if (stat != ASN_OK) return stat;
18913 else pvalue->t = ui + 1;
18914
18915 switch (ui) {
18916 /* reregistrationRequired */
18917 case 0:
18918 invokeStartElement (pctxt, "reregistrationRequired", -1);
18919
18920 /* NULL */
18921 invokeNullValue (pctxt);
18922
18923 invokeEndElement (pctxt, "reregistrationRequired", -1);
18924
18925 break;
18926
18927 /* ttlExpired */
18928 case 1:
18929 invokeStartElement (pctxt, "ttlExpired", -1);
18930
18931 /* NULL */
18932 invokeNullValue (pctxt);
18933
18934 invokeEndElement (pctxt, "ttlExpired", -1);
18935
18936 break;
18937
18938 /* securityDenial */
18939 case 2:
18940 invokeStartElement (pctxt, "securityDenial", -1);
18941
18942 /* NULL */
18943 invokeNullValue (pctxt);
18944
18945 invokeEndElement (pctxt, "securityDenial", -1);
18946
18947 break;
18948
18949 /* undefinedReason */
18950 case 3:
18951 invokeStartElement (pctxt, "undefinedReason", -1);
18952
18953 /* NULL */
18954 invokeNullValue (pctxt);
18955
18956 invokeEndElement (pctxt, "undefinedReason", -1);
18957
18958 break;
18959
18960 default:
18961 return ASN_E_INVOPT;
18962 }
18963 }
18964 else {
18965 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
18966 if (stat != ASN_OK) return stat;
18967 else pvalue->t = ui + 5;
18968
18969 stat = decodeByteAlign (pctxt);
18970 if (stat != ASN_OK) return stat;
18971
18972 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
18973 if (stat != ASN_OK) return stat;
18974
18975 copyContext (&lctxt, pctxt);
18976 initContextBuffer (pctxt, openType.data, openType.numocts);
18977
18978 switch (pvalue->t) {
18979 /* maintenance */
18980 case 5:
18981 invokeStartElement (pctxt, "maintenance", -1);
18982
18983 /* NULL */
18984 invokeNullValue (pctxt);
18985
18986 invokeEndElement (pctxt, "maintenance", -1);
18987
18988 break;
18989
18990 /* securityError */
18991 case 6:
18992 invokeStartElement (pctxt, "securityError", -1);
18993
18994 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
18995
18996 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
18997 if (stat != ASN_OK) return stat;
18998
18999 invokeEndElement (pctxt, "securityError", -1);
19000
19001 break;
19002
19003 default:;
19004 }
19005
19006 copyContext (pctxt, &lctxt);
19007 }
19008
19009 return (stat);
19010 }
19011
19012 /**************************************************************/
19013 /* */
19014 /* UnregistrationRequest */
19015 /* */
19016 /**************************************************************/
19017
19018 EXTERN int asn1PD_H225UnregistrationRequest (OOCTXT* pctxt, H225UnregistrationRequest* pvalue)
19019 {
19020 int stat = ASN_OK;
19021 OOCTXT lctxt;
19022 OOCTXT lctxt2;
19023 ASN1OpenType openType;
19024 ASN1UINT bitcnt;
19025 ASN1UINT i;
19026 ASN1BOOL optbit = 0;
19027 ASN1BOOL extbit = 0;
19028
19029 /* extension bit */
19030
19031 DECODEBIT (pctxt, &extbit);
19032
19033 /* optional bits */
19034
19035 memset (&pvalue->m, 0, sizeof(pvalue->m));
19036
19037 DECODEBIT (pctxt, &optbit);
19038 pvalue->m.endpointAliasPresent = optbit;
19039
19040 DECODEBIT (pctxt, &optbit);
19041 pvalue->m.nonStandardDataPresent = optbit;
19042
19043 DECODEBIT (pctxt, &optbit);
19044 pvalue->m.endpointIdentifierPresent = optbit;
19045
19046 /* decode requestSeqNum */
19047
19048 invokeStartElement (pctxt, "requestSeqNum", -1);
19049
19050 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
19051 if (stat != ASN_OK) return stat;
19052
19053 invokeEndElement (pctxt, "requestSeqNum", -1);
19054
19055 /* decode callSignalAddress */
19056
19057 invokeStartElement (pctxt, "callSignalAddress", -1);
19058
19059 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
19060 if (stat != ASN_OK) return stat;
19061
19062 invokeEndElement (pctxt, "callSignalAddress", -1);
19063
19064 /* decode endpointAlias */
19065
19066 if (pvalue->m.endpointAliasPresent) {
19067 invokeStartElement (pctxt, "endpointAlias", -1);
19068
19069 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
19070 if (stat != ASN_OK) return stat;
19071
19072 invokeEndElement (pctxt, "endpointAlias", -1);
19073 }
19074
19075 /* decode nonStandardData */
19076
19077 if (pvalue->m.nonStandardDataPresent) {
19078 invokeStartElement (pctxt, "nonStandardData", -1);
19079
19080 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19081 if (stat != ASN_OK) return stat;
19082
19083 invokeEndElement (pctxt, "nonStandardData", -1);
19084 }
19085
19086 /* decode endpointIdentifier */
19087
19088 if (pvalue->m.endpointIdentifierPresent) {
19089 invokeStartElement (pctxt, "endpointIdentifier", -1);
19090
19091 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
19092 if (stat != ASN_OK) return stat;
19093
19094 invokeEndElement (pctxt, "endpointIdentifier", -1);
19095 }
19096
19097 if (extbit) {
19098
19099 /* decode extension optional bits length */
19100
19101 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
19102 if (stat != ASN_OK) return stat;
19103
19104 bitcnt += 1;
19105
19106 ZEROCONTEXT (&lctxt);
19107 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
19108 if (stat != ASN_OK) return stat;
19109
19110 stat = moveBitCursor (pctxt, bitcnt);
19111 if (stat != ASN_OK) return stat;
19112
19113 for (i = 0; i < bitcnt; i++) {
19114 DECODEBIT (&lctxt, &optbit);
19115
19116 if (optbit) {
19117 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19118 if (stat != ASN_OK) return stat;
19119
19120 if (i < 10 && openType.numocts > 0) { /* known element */
19121 copyContext (&lctxt2, pctxt);
19122 initContextBuffer (pctxt, openType.data, openType.numocts);
19123
19124 switch (i) {
19125 case 0:
19126 pvalue->m.alternateEndpointsPresent = 1;
19127
19128 invokeStartElement (pctxt, "alternateEndpoints", -1);
19129
19130 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->alternateEndpoints);
19131 if (stat != ASN_OK) return stat;
19132
19133 invokeEndElement (pctxt, "alternateEndpoints", -1);
19134 break;
19135
19136 case 1:
19137 pvalue->m.gatekeeperIdentifierPresent = 1;
19138
19139 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
19140
19141 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
19142 if (stat != ASN_OK) return stat;
19143
19144 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
19145 break;
19146
19147 case 2:
19148 pvalue->m.tokensPresent = 1;
19149
19150 invokeStartElement (pctxt, "tokens", -1);
19151
19152 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
19153 if (stat != ASN_OK) return stat;
19154
19155 invokeEndElement (pctxt, "tokens", -1);
19156 break;
19157
19158 case 3:
19159 pvalue->m.cryptoTokensPresent = 1;
19160
19161 invokeStartElement (pctxt, "cryptoTokens", -1);
19162
19163 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
19164 if (stat != ASN_OK) return stat;
19165
19166 invokeEndElement (pctxt, "cryptoTokens", -1);
19167 break;
19168
19169 case 4:
19170 pvalue->m.integrityCheckValuePresent = 1;
19171
19172 invokeStartElement (pctxt, "integrityCheckValue", -1);
19173
19174 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
19175 if (stat != ASN_OK) return stat;
19176
19177 invokeEndElement (pctxt, "integrityCheckValue", -1);
19178 break;
19179
19180 case 5:
19181 pvalue->m.reasonPresent = 1;
19182
19183 invokeStartElement (pctxt, "reason", -1);
19184
19185 stat = asn1PD_H225UnregRequestReason (pctxt, &pvalue->reason);
19186 if (stat != ASN_OK) return stat;
19187
19188 invokeEndElement (pctxt, "reason", -1);
19189 break;
19190
19191 case 6:
19192 pvalue->m.endpointAliasPatternPresent = 1;
19193
19194 invokeStartElement (pctxt, "endpointAliasPattern", -1);
19195
19196 stat = asn1PD_H225_SeqOfH225AddressPattern (pctxt, &pvalue->endpointAliasPattern);
19197 if (stat != ASN_OK) return stat;
19198
19199 invokeEndElement (pctxt, "endpointAliasPattern", -1);
19200 break;
19201
19202 case 7:
19203 pvalue->m.supportedPrefixesPresent = 1;
19204
19205 invokeStartElement (pctxt, "supportedPrefixes", -1);
19206
19207 stat = asn1PD_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
19208 if (stat != ASN_OK) return stat;
19209
19210 invokeEndElement (pctxt, "supportedPrefixes", -1);
19211 break;
19212
19213 case 8:
19214 pvalue->m.alternateGatekeeperPresent = 1;
19215
19216 invokeStartElement (pctxt, "alternateGatekeeper", -1);
19217
19218 stat = asn1PD_H225_SeqOfH225AlternateGK (pctxt, &pvalue->alternateGatekeeper);
19219 if (stat != ASN_OK) return stat;
19220
19221 invokeEndElement (pctxt, "alternateGatekeeper", -1);
19222 break;
19223
19224 case 9:
19225 pvalue->m.genericDataPresent = 1;
19226
19227 invokeStartElement (pctxt, "genericData", -1);
19228
19229 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
19230 if (stat != ASN_OK) return stat;
19231
19232 invokeEndElement (pctxt, "genericData", -1);
19233 break;
19234
19235 default:
19236 pctxt->buffer.byteIndex += openType.numocts;
19237 }
19238 copyContext (pctxt, &lctxt2);
19239 }
19240 else { /* unknown element */
19241 pctxt->buffer.byteIndex += openType.numocts;
19242 }
19243 }
19244 }
19245 }
19246
19247 return (stat);
19248 }
19249
19250 /**************************************************************/
19251 /* */
19252 /* UnregistrationConfirm */
19253 /* */
19254 /**************************************************************/
19255
19256 EXTERN int asn1PD_H225UnregistrationConfirm (OOCTXT* pctxt, H225UnregistrationConfirm* pvalue)
19257 {
19258 int stat = ASN_OK;
19259 OOCTXT lctxt;
19260 OOCTXT lctxt2;
19261 ASN1OpenType openType;
19262 ASN1UINT bitcnt;
19263 ASN1UINT i;
19264 ASN1BOOL optbit = 0;
19265 ASN1BOOL extbit = 0;
19266
19267 /* extension bit */
19268
19269 DECODEBIT (pctxt, &extbit);
19270
19271 /* optional bits */
19272
19273 memset (&pvalue->m, 0, sizeof(pvalue->m));
19274
19275 DECODEBIT (pctxt, &optbit);
19276 pvalue->m.nonStandardDataPresent = optbit;
19277
19278 /* decode requestSeqNum */
19279
19280 invokeStartElement (pctxt, "requestSeqNum", -1);
19281
19282 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
19283 if (stat != ASN_OK) return stat;
19284
19285 invokeEndElement (pctxt, "requestSeqNum", -1);
19286
19287 /* decode nonStandardData */
19288
19289 if (pvalue->m.nonStandardDataPresent) {
19290 invokeStartElement (pctxt, "nonStandardData", -1);
19291
19292 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19293 if (stat != ASN_OK) return stat;
19294
19295 invokeEndElement (pctxt, "nonStandardData", -1);
19296 }
19297
19298 if (extbit) {
19299
19300 /* decode extension optional bits length */
19301
19302 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
19303 if (stat != ASN_OK) return stat;
19304
19305 bitcnt += 1;
19306
19307 ZEROCONTEXT (&lctxt);
19308 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
19309 if (stat != ASN_OK) return stat;
19310
19311 stat = moveBitCursor (pctxt, bitcnt);
19312 if (stat != ASN_OK) return stat;
19313
19314 for (i = 0; i < bitcnt; i++) {
19315 DECODEBIT (&lctxt, &optbit);
19316
19317 if (optbit) {
19318 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19319 if (stat != ASN_OK) return stat;
19320
19321 if (i < 4 && openType.numocts > 0) { /* known element */
19322 copyContext (&lctxt2, pctxt);
19323 initContextBuffer (pctxt, openType.data, openType.numocts);
19324
19325 switch (i) {
19326 case 0:
19327 pvalue->m.tokensPresent = 1;
19328
19329 invokeStartElement (pctxt, "tokens", -1);
19330
19331 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
19332 if (stat != ASN_OK) return stat;
19333
19334 invokeEndElement (pctxt, "tokens", -1);
19335 break;
19336
19337 case 1:
19338 pvalue->m.cryptoTokensPresent = 1;
19339
19340 invokeStartElement (pctxt, "cryptoTokens", -1);
19341
19342 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
19343 if (stat != ASN_OK) return stat;
19344
19345 invokeEndElement (pctxt, "cryptoTokens", -1);
19346 break;
19347
19348 case 2:
19349 pvalue->m.integrityCheckValuePresent = 1;
19350
19351 invokeStartElement (pctxt, "integrityCheckValue", -1);
19352
19353 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
19354 if (stat != ASN_OK) return stat;
19355
19356 invokeEndElement (pctxt, "integrityCheckValue", -1);
19357 break;
19358
19359 case 3:
19360 pvalue->m.genericDataPresent = 1;
19361
19362 invokeStartElement (pctxt, "genericData", -1);
19363
19364 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
19365 if (stat != ASN_OK) return stat;
19366
19367 invokeEndElement (pctxt, "genericData", -1);
19368 break;
19369
19370 default:
19371 pctxt->buffer.byteIndex += openType.numocts;
19372 }
19373 copyContext (pctxt, &lctxt2);
19374 }
19375 else { /* unknown element */
19376 pctxt->buffer.byteIndex += openType.numocts;
19377 }
19378 }
19379 }
19380 }
19381
19382 return (stat);
19383 }
19384
19385 /**************************************************************/
19386 /* */
19387 /* UnregRejectReason */
19388 /* */
19389 /**************************************************************/
19390
19391 EXTERN int asn1PD_H225UnregRejectReason (OOCTXT* pctxt, H225UnregRejectReason* pvalue)
19392 {
19393 int stat = ASN_OK;
19394 ASN1UINT ui;
19395 ASN1OpenType openType;
19396 ASN1BOOL extbit = 0;
19397 OOCTXT lctxt;
19398
19399 /* extension bit */
19400
19401 DECODEBIT (pctxt, &extbit);
19402
19403 if (!extbit) {
19404 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
19405 if (stat != ASN_OK) return stat;
19406 else pvalue->t = ui + 1;
19407
19408 switch (ui) {
19409 /* notCurrentlyRegistered */
19410 case 0:
19411 invokeStartElement (pctxt, "notCurrentlyRegistered", -1);
19412
19413 /* NULL */
19414 invokeNullValue (pctxt);
19415
19416 invokeEndElement (pctxt, "notCurrentlyRegistered", -1);
19417
19418 break;
19419
19420 /* callInProgress */
19421 case 1:
19422 invokeStartElement (pctxt, "callInProgress", -1);
19423
19424 /* NULL */
19425 invokeNullValue (pctxt);
19426
19427 invokeEndElement (pctxt, "callInProgress", -1);
19428
19429 break;
19430
19431 /* undefinedReason */
19432 case 2:
19433 invokeStartElement (pctxt, "undefinedReason", -1);
19434
19435 /* NULL */
19436 invokeNullValue (pctxt);
19437
19438 invokeEndElement (pctxt, "undefinedReason", -1);
19439
19440 break;
19441
19442 default:
19443 return ASN_E_INVOPT;
19444 }
19445 }
19446 else {
19447 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
19448 if (stat != ASN_OK) return stat;
19449 else pvalue->t = ui + 4;
19450
19451 stat = decodeByteAlign (pctxt);
19452 if (stat != ASN_OK) return stat;
19453
19454 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19455 if (stat != ASN_OK) return stat;
19456
19457 copyContext (&lctxt, pctxt);
19458 initContextBuffer (pctxt, openType.data, openType.numocts);
19459
19460 switch (pvalue->t) {
19461 /* permissionDenied */
19462 case 4:
19463 invokeStartElement (pctxt, "permissionDenied", -1);
19464
19465 /* NULL */
19466 invokeNullValue (pctxt);
19467
19468 invokeEndElement (pctxt, "permissionDenied", -1);
19469
19470 break;
19471
19472 /* securityDenial */
19473 case 5:
19474 invokeStartElement (pctxt, "securityDenial", -1);
19475
19476 /* NULL */
19477 invokeNullValue (pctxt);
19478
19479 invokeEndElement (pctxt, "securityDenial", -1);
19480
19481 break;
19482
19483 /* securityError */
19484 case 6:
19485 invokeStartElement (pctxt, "securityError", -1);
19486
19487 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
19488
19489 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
19490 if (stat != ASN_OK) return stat;
19491
19492 invokeEndElement (pctxt, "securityError", -1);
19493
19494 break;
19495
19496 default:;
19497 }
19498
19499 copyContext (pctxt, &lctxt);
19500 }
19501
19502 return (stat);
19503 }
19504
19505 /**************************************************************/
19506 /* */
19507 /* UnregistrationReject */
19508 /* */
19509 /**************************************************************/
19510
19511 EXTERN int asn1PD_H225UnregistrationReject (OOCTXT* pctxt, H225UnregistrationReject* pvalue)
19512 {
19513 int stat = ASN_OK;
19514 OOCTXT lctxt;
19515 OOCTXT lctxt2;
19516 ASN1OpenType openType;
19517 ASN1UINT bitcnt;
19518 ASN1UINT i;
19519 ASN1BOOL optbit = 0;
19520 ASN1BOOL extbit = 0;
19521
19522 /* extension bit */
19523
19524 DECODEBIT (pctxt, &extbit);
19525
19526 /* optional bits */
19527
19528 memset (&pvalue->m, 0, sizeof(pvalue->m));
19529
19530 DECODEBIT (pctxt, &optbit);
19531 pvalue->m.nonStandardDataPresent = optbit;
19532
19533 /* decode requestSeqNum */
19534
19535 invokeStartElement (pctxt, "requestSeqNum", -1);
19536
19537 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
19538 if (stat != ASN_OK) return stat;
19539
19540 invokeEndElement (pctxt, "requestSeqNum", -1);
19541
19542 /* decode rejectReason */
19543
19544 invokeStartElement (pctxt, "rejectReason", -1);
19545
19546 stat = asn1PD_H225UnregRejectReason (pctxt, &pvalue->rejectReason);
19547 if (stat != ASN_OK) return stat;
19548
19549 invokeEndElement (pctxt, "rejectReason", -1);
19550
19551 /* decode nonStandardData */
19552
19553 if (pvalue->m.nonStandardDataPresent) {
19554 invokeStartElement (pctxt, "nonStandardData", -1);
19555
19556 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19557 if (stat != ASN_OK) return stat;
19558
19559 invokeEndElement (pctxt, "nonStandardData", -1);
19560 }
19561
19562 if (extbit) {
19563
19564 /* decode extension optional bits length */
19565
19566 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
19567 if (stat != ASN_OK) return stat;
19568
19569 bitcnt += 1;
19570
19571 ZEROCONTEXT (&lctxt);
19572 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
19573 if (stat != ASN_OK) return stat;
19574
19575 stat = moveBitCursor (pctxt, bitcnt);
19576 if (stat != ASN_OK) return stat;
19577
19578 for (i = 0; i < bitcnt; i++) {
19579 DECODEBIT (&lctxt, &optbit);
19580
19581 if (optbit) {
19582 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19583 if (stat != ASN_OK) return stat;
19584
19585 if (i < 5 && openType.numocts > 0) { /* known element */
19586 copyContext (&lctxt2, pctxt);
19587 initContextBuffer (pctxt, openType.data, openType.numocts);
19588
19589 switch (i) {
19590 case 0:
19591 pvalue->m.altGKInfoPresent = 1;
19592
19593 invokeStartElement (pctxt, "altGKInfo", -1);
19594
19595 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
19596 if (stat != ASN_OK) return stat;
19597
19598 invokeEndElement (pctxt, "altGKInfo", -1);
19599 break;
19600
19601 case 1:
19602 pvalue->m.tokensPresent = 1;
19603
19604 invokeStartElement (pctxt, "tokens", -1);
19605
19606 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
19607 if (stat != ASN_OK) return stat;
19608
19609 invokeEndElement (pctxt, "tokens", -1);
19610 break;
19611
19612 case 2:
19613 pvalue->m.cryptoTokensPresent = 1;
19614
19615 invokeStartElement (pctxt, "cryptoTokens", -1);
19616
19617 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
19618 if (stat != ASN_OK) return stat;
19619
19620 invokeEndElement (pctxt, "cryptoTokens", -1);
19621 break;
19622
19623 case 3:
19624 pvalue->m.integrityCheckValuePresent = 1;
19625
19626 invokeStartElement (pctxt, "integrityCheckValue", -1);
19627
19628 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
19629 if (stat != ASN_OK) return stat;
19630
19631 invokeEndElement (pctxt, "integrityCheckValue", -1);
19632 break;
19633
19634 case 4:
19635 pvalue->m.genericDataPresent = 1;
19636
19637 invokeStartElement (pctxt, "genericData", -1);
19638
19639 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
19640 if (stat != ASN_OK) return stat;
19641
19642 invokeEndElement (pctxt, "genericData", -1);
19643 break;
19644
19645 default:
19646 pctxt->buffer.byteIndex += openType.numocts;
19647 }
19648 copyContext (pctxt, &lctxt2);
19649 }
19650 else { /* unknown element */
19651 pctxt->buffer.byteIndex += openType.numocts;
19652 }
19653 }
19654 }
19655 }
19656
19657 return (stat);
19658 }
19659
19660 /**************************************************************/
19661 /* */
19662 /* CallModel */
19663 /* */
19664 /**************************************************************/
19665
19666 EXTERN int asn1PD_H225CallModel (OOCTXT* pctxt, H225CallModel* pvalue)
19667 {
19668 int stat = ASN_OK;
19669 ASN1UINT ui;
19670 ASN1OpenType openType;
19671 ASN1BOOL extbit = 0;
19672
19673 /* extension bit */
19674
19675 DECODEBIT (pctxt, &extbit);
19676
19677 if (!extbit) {
19678 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
19679 if (stat != ASN_OK) return stat;
19680 else pvalue->t = ui + 1;
19681
19682 switch (ui) {
19683 /* direct */
19684 case 0:
19685 invokeStartElement (pctxt, "direct", -1);
19686
19687 /* NULL */
19688 invokeNullValue (pctxt);
19689
19690 invokeEndElement (pctxt, "direct", -1);
19691
19692 break;
19693
19694 /* gatekeeperRouted */
19695 case 1:
19696 invokeStartElement (pctxt, "gatekeeperRouted", -1);
19697
19698 /* NULL */
19699 invokeNullValue (pctxt);
19700
19701 invokeEndElement (pctxt, "gatekeeperRouted", -1);
19702
19703 break;
19704
19705 default:
19706 return ASN_E_INVOPT;
19707 }
19708 }
19709 else {
19710 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
19711 if (stat != ASN_OK) return stat;
19712 else pvalue->t = ui + 3;
19713
19714 stat = decodeByteAlign (pctxt);
19715 if (stat != ASN_OK) return stat;
19716
19717 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19718 if (stat != ASN_OK) return stat;
19719
19720 }
19721
19722 return (stat);
19723 }
19724
19725 /**************************************************************/
19726 /* */
19727 /* TransportQOS */
19728 /* */
19729 /**************************************************************/
19730
19731 EXTERN int asn1PD_H225TransportQOS (OOCTXT* pctxt, H225TransportQOS* pvalue)
19732 {
19733 int stat = ASN_OK;
19734 ASN1UINT ui;
19735 ASN1OpenType openType;
19736 ASN1BOOL extbit = 0;
19737
19738 /* extension bit */
19739
19740 DECODEBIT (pctxt, &extbit);
19741
19742 if (!extbit) {
19743 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
19744 if (stat != ASN_OK) return stat;
19745 else pvalue->t = ui + 1;
19746
19747 switch (ui) {
19748 /* endpointControlled */
19749 case 0:
19750 invokeStartElement (pctxt, "endpointControlled", -1);
19751
19752 /* NULL */
19753 invokeNullValue (pctxt);
19754
19755 invokeEndElement (pctxt, "endpointControlled", -1);
19756
19757 break;
19758
19759 /* gatekeeperControlled */
19760 case 1:
19761 invokeStartElement (pctxt, "gatekeeperControlled", -1);
19762
19763 /* NULL */
19764 invokeNullValue (pctxt);
19765
19766 invokeEndElement (pctxt, "gatekeeperControlled", -1);
19767
19768 break;
19769
19770 /* noControl */
19771 case 2:
19772 invokeStartElement (pctxt, "noControl", -1);
19773
19774 /* NULL */
19775 invokeNullValue (pctxt);
19776
19777 invokeEndElement (pctxt, "noControl", -1);
19778
19779 break;
19780
19781 default:
19782 return ASN_E_INVOPT;
19783 }
19784 }
19785 else {
19786 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
19787 if (stat != ASN_OK) return stat;
19788 else pvalue->t = ui + 4;
19789
19790 stat = decodeByteAlign (pctxt);
19791 if (stat != ASN_OK) return stat;
19792
19793 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
19794 if (stat != ASN_OK) return stat;
19795
19796 }
19797
19798 return (stat);
19799 }
19800
19801 /**************************************************************/
19802 /* */
19803 /* AdmissionRequest */
19804 /* */
19805 /**************************************************************/
19806
19807 EXTERN int asn1PD_H225AdmissionRequest (OOCTXT* pctxt, H225AdmissionRequest* pvalue)
19808 {
19809 int stat = ASN_OK;
19810 OOCTXT lctxt;
19811 OOCTXT lctxt2;
19812 ASN1OpenType openType;
19813 ASN1UINT bitcnt;
19814 ASN1UINT i;
19815 ASN1BOOL optbit = 0;
19816 ASN1BOOL extbit = 0;
19817
19818 /* extension bit */
19819
19820 DECODEBIT (pctxt, &extbit);
19821
19822 /* optional bits */
19823
19824 memset (&pvalue->m, 0, sizeof(pvalue->m));
19825
19826 DECODEBIT (pctxt, &optbit);
19827 pvalue->m.callModelPresent = optbit;
19828
19829 DECODEBIT (pctxt, &optbit);
19830 pvalue->m.destinationInfoPresent = optbit;
19831
19832 DECODEBIT (pctxt, &optbit);
19833 pvalue->m.destCallSignalAddressPresent = optbit;
19834
19835 DECODEBIT (pctxt, &optbit);
19836 pvalue->m.destExtraCallInfoPresent = optbit;
19837
19838 DECODEBIT (pctxt, &optbit);
19839 pvalue->m.srcCallSignalAddressPresent = optbit;
19840
19841 DECODEBIT (pctxt, &optbit);
19842 pvalue->m.nonStandardDataPresent = optbit;
19843
19844 DECODEBIT (pctxt, &optbit);
19845 pvalue->m.callServicesPresent = optbit;
19846
19847 /* decode requestSeqNum */
19848
19849 invokeStartElement (pctxt, "requestSeqNum", -1);
19850
19851 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
19852 if (stat != ASN_OK) return stat;
19853
19854 invokeEndElement (pctxt, "requestSeqNum", -1);
19855
19856 /* decode callType */
19857
19858 invokeStartElement (pctxt, "callType", -1);
19859
19860 stat = asn1PD_H225CallType (pctxt, &pvalue->callType);
19861 if (stat != ASN_OK) return stat;
19862
19863 invokeEndElement (pctxt, "callType", -1);
19864
19865 /* decode callModel */
19866
19867 if (pvalue->m.callModelPresent) {
19868 invokeStartElement (pctxt, "callModel", -1);
19869
19870 stat = asn1PD_H225CallModel (pctxt, &pvalue->callModel);
19871 if (stat != ASN_OK) return stat;
19872
19873 invokeEndElement (pctxt, "callModel", -1);
19874 }
19875
19876 /* decode endpointIdentifier */
19877
19878 invokeStartElement (pctxt, "endpointIdentifier", -1);
19879
19880 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
19881 if (stat != ASN_OK) return stat;
19882
19883 invokeEndElement (pctxt, "endpointIdentifier", -1);
19884
19885 /* decode destinationInfo */
19886
19887 if (pvalue->m.destinationInfoPresent) {
19888 invokeStartElement (pctxt, "destinationInfo", -1);
19889
19890 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
19891 if (stat != ASN_OK) return stat;
19892
19893 invokeEndElement (pctxt, "destinationInfo", -1);
19894 }
19895
19896 /* decode destCallSignalAddress */
19897
19898 if (pvalue->m.destCallSignalAddressPresent) {
19899 invokeStartElement (pctxt, "destCallSignalAddress", -1);
19900
19901 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
19902 if (stat != ASN_OK) return stat;
19903
19904 invokeEndElement (pctxt, "destCallSignalAddress", -1);
19905 }
19906
19907 /* decode destExtraCallInfo */
19908
19909 if (pvalue->m.destExtraCallInfoPresent) {
19910 invokeStartElement (pctxt, "destExtraCallInfo", -1);
19911
19912 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
19913 if (stat != ASN_OK) return stat;
19914
19915 invokeEndElement (pctxt, "destExtraCallInfo", -1);
19916 }
19917
19918 /* decode srcInfo */
19919
19920 invokeStartElement (pctxt, "srcInfo", -1);
19921
19922 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->srcInfo);
19923 if (stat != ASN_OK) return stat;
19924
19925 invokeEndElement (pctxt, "srcInfo", -1);
19926
19927 /* decode srcCallSignalAddress */
19928
19929 if (pvalue->m.srcCallSignalAddressPresent) {
19930 invokeStartElement (pctxt, "srcCallSignalAddress", -1);
19931
19932 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->srcCallSignalAddress);
19933 if (stat != ASN_OK) return stat;
19934
19935 invokeEndElement (pctxt, "srcCallSignalAddress", -1);
19936 }
19937
19938 /* decode bandWidth */
19939
19940 invokeStartElement (pctxt, "bandWidth", -1);
19941
19942 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
19943 if (stat != ASN_OK) return stat;
19944
19945 invokeEndElement (pctxt, "bandWidth", -1);
19946
19947 /* decode callReferenceValue */
19948
19949 invokeStartElement (pctxt, "callReferenceValue", -1);
19950
19951 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->callReferenceValue);
19952 if (stat != ASN_OK) return stat;
19953
19954 invokeEndElement (pctxt, "callReferenceValue", -1);
19955
19956 /* decode nonStandardData */
19957
19958 if (pvalue->m.nonStandardDataPresent) {
19959 invokeStartElement (pctxt, "nonStandardData", -1);
19960
19961 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19962 if (stat != ASN_OK) return stat;
19963
19964 invokeEndElement (pctxt, "nonStandardData", -1);
19965 }
19966
19967 /* decode callServices */
19968
19969 if (pvalue->m.callServicesPresent) {
19970 invokeStartElement (pctxt, "callServices", -1);
19971
19972 stat = asn1PD_H225QseriesOptions (pctxt, &pvalue->callServices);
19973 if (stat != ASN_OK) return stat;
19974
19975 invokeEndElement (pctxt, "callServices", -1);
19976 }
19977
19978 /* decode conferenceID */
19979
19980 invokeStartElement (pctxt, "conferenceID", -1);
19981
19982 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
19983 if (stat != ASN_OK) return stat;
19984
19985 invokeEndElement (pctxt, "conferenceID", -1);
19986
19987 /* decode activeMC */
19988
19989 invokeStartElement (pctxt, "activeMC", -1);
19990
19991 stat = DECODEBIT (pctxt, &pvalue->activeMC);
19992 if (stat != ASN_OK) return stat;
19993 invokeBoolValue (pctxt, pvalue->activeMC);
19994
19995 invokeEndElement (pctxt, "activeMC", -1);
19996
19997 /* decode answerCall */
19998
19999 invokeStartElement (pctxt, "answerCall", -1);
20000
20001 stat = DECODEBIT (pctxt, &pvalue->answerCall);
20002 if (stat != ASN_OK) return stat;
20003 invokeBoolValue (pctxt, pvalue->answerCall);
20004
20005 invokeEndElement (pctxt, "answerCall", -1);
20006
20007 if (extbit) {
20008
20009 /* decode extension optional bits length */
20010
20011 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
20012 if (stat != ASN_OK) return stat;
20013
20014 bitcnt += 1;
20015
20016 ZEROCONTEXT (&lctxt);
20017 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
20018 if (stat != ASN_OK) return stat;
20019
20020 stat = moveBitCursor (pctxt, bitcnt);
20021 if (stat != ASN_OK) return stat;
20022
20023 for (i = 0; i < bitcnt; i++) {
20024 DECODEBIT (&lctxt, &optbit);
20025
20026 if (optbit) {
20027 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
20028 if (stat != ASN_OK) return stat;
20029
20030 if (i < 19 && openType.numocts > 0) { /* known element */
20031 copyContext (&lctxt2, pctxt);
20032 initContextBuffer (pctxt, openType.data, openType.numocts);
20033
20034 switch (i) {
20035 case 0:
20036 pvalue->m.canMapAliasPresent = 1;
20037
20038 invokeStartElement (pctxt, "canMapAlias", -1);
20039
20040 stat = DECODEBIT (pctxt, &pvalue->canMapAlias);
20041 if (stat != ASN_OK) return stat;
20042 invokeBoolValue (pctxt, pvalue->canMapAlias);
20043
20044 invokeEndElement (pctxt, "canMapAlias", -1);
20045 break;
20046
20047 case 1:
20048 pvalue->m.callIdentifierPresent = 1;
20049
20050 invokeStartElement (pctxt, "callIdentifier", -1);
20051
20052 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
20053 if (stat != ASN_OK) return stat;
20054
20055 invokeEndElement (pctxt, "callIdentifier", -1);
20056 break;
20057
20058 case 2:
20059 pvalue->m.srcAlternativesPresent = 1;
20060
20061 invokeStartElement (pctxt, "srcAlternatives", -1);
20062
20063 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->srcAlternatives);
20064 if (stat != ASN_OK) return stat;
20065
20066 invokeEndElement (pctxt, "srcAlternatives", -1);
20067 break;
20068
20069 case 3:
20070 pvalue->m.destAlternativesPresent = 1;
20071
20072 invokeStartElement (pctxt, "destAlternatives", -1);
20073
20074 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->destAlternatives);
20075 if (stat != ASN_OK) return stat;
20076
20077 invokeEndElement (pctxt, "destAlternatives", -1);
20078 break;
20079
20080 case 4:
20081 pvalue->m.gatekeeperIdentifierPresent = 1;
20082
20083 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
20084
20085 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
20086 if (stat != ASN_OK) return stat;
20087
20088 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
20089 break;
20090
20091 case 5:
20092 pvalue->m.tokensPresent = 1;
20093
20094 invokeStartElement (pctxt, "tokens", -1);
20095
20096 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
20097 if (stat != ASN_OK) return stat;
20098
20099 invokeEndElement (pctxt, "tokens", -1);
20100 break;
20101
20102 case 6:
20103 pvalue->m.cryptoTokensPresent = 1;
20104
20105 invokeStartElement (pctxt, "cryptoTokens", -1);
20106
20107 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
20108 if (stat != ASN_OK) return stat;
20109
20110 invokeEndElement (pctxt, "cryptoTokens", -1);
20111 break;
20112
20113 case 7:
20114 pvalue->m.integrityCheckValuePresent = 1;
20115
20116 invokeStartElement (pctxt, "integrityCheckValue", -1);
20117
20118 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
20119 if (stat != ASN_OK) return stat;
20120
20121 invokeEndElement (pctxt, "integrityCheckValue", -1);
20122 break;
20123
20124 case 8:
20125 pvalue->m.transportQOSPresent = 1;
20126
20127 invokeStartElement (pctxt, "transportQOS", -1);
20128
20129 stat = asn1PD_H225TransportQOS (pctxt, &pvalue->transportQOS);
20130 if (stat != ASN_OK) return stat;
20131
20132 invokeEndElement (pctxt, "transportQOS", -1);
20133 break;
20134
20135 case 9:
20136 pvalue->m.willSupplyUUIEsPresent = 1;
20137
20138 invokeStartElement (pctxt, "willSupplyUUIEs", -1);
20139
20140 stat = DECODEBIT (pctxt, &pvalue->willSupplyUUIEs);
20141 if (stat != ASN_OK) return stat;
20142 invokeBoolValue (pctxt, pvalue->willSupplyUUIEs);
20143
20144 invokeEndElement (pctxt, "willSupplyUUIEs", -1);
20145 break;
20146
20147 case 10:
20148 pvalue->m.callLinkagePresent = 1;
20149
20150 invokeStartElement (pctxt, "callLinkage", -1);
20151
20152 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
20153 if (stat != ASN_OK) return stat;
20154
20155 invokeEndElement (pctxt, "callLinkage", -1);
20156 break;
20157
20158 case 11:
20159 pvalue->m.gatewayDataRatePresent = 1;
20160
20161 invokeStartElement (pctxt, "gatewayDataRate", -1);
20162
20163 stat = asn1PD_H225DataRate (pctxt, &pvalue->gatewayDataRate);
20164 if (stat != ASN_OK) return stat;
20165
20166 invokeEndElement (pctxt, "gatewayDataRate", -1);
20167 break;
20168
20169 case 12:
20170 pvalue->m.capacityPresent = 1;
20171
20172 invokeStartElement (pctxt, "capacity", -1);
20173
20174 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
20175 if (stat != ASN_OK) return stat;
20176
20177 invokeEndElement (pctxt, "capacity", -1);
20178 break;
20179
20180 case 13:
20181 pvalue->m.circuitInfoPresent = 1;
20182
20183 invokeStartElement (pctxt, "circuitInfo", -1);
20184
20185 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
20186 if (stat != ASN_OK) return stat;
20187
20188 invokeEndElement (pctxt, "circuitInfo", -1);
20189 break;
20190
20191 case 14:
20192 pvalue->m.desiredProtocolsPresent = 1;
20193
20194 invokeStartElement (pctxt, "desiredProtocols", -1);
20195
20196 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->desiredProtocols);
20197 if (stat != ASN_OK) return stat;
20198
20199 invokeEndElement (pctxt, "desiredProtocols", -1);
20200 break;
20201
20202 case 15:
20203 pvalue->m.desiredTunnelledProtocolPresent = 1;
20204
20205 invokeStartElement (pctxt, "desiredTunnelledProtocol", -1);
20206
20207 stat = asn1PD_H225TunnelledProtocol (pctxt, &pvalue->desiredTunnelledProtocol);
20208 if (stat != ASN_OK) return stat;
20209
20210 invokeEndElement (pctxt, "desiredTunnelledProtocol", -1);
20211 break;
20212
20213 case 16:
20214 pvalue->m.featureSetPresent = 1;
20215
20216 invokeStartElement (pctxt, "featureSet", -1);
20217
20218 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
20219 if (stat != ASN_OK) return stat;
20220
20221 invokeEndElement (pctxt, "featureSet", -1);
20222 break;
20223
20224 case 17:
20225 pvalue->m.genericDataPresent = 1;
20226
20227 invokeStartElement (pctxt, "genericData", -1);
20228
20229 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
20230 if (stat != ASN_OK) return stat;
20231
20232 invokeEndElement (pctxt, "genericData", -1);
20233 break;
20234
20235 case 18:
20236 pvalue->m.canMapSrcAliasPresent = 1;
20237
20238 invokeStartElement (pctxt, "canMapSrcAlias", -1);
20239
20240 stat = DECODEBIT (pctxt, &pvalue->canMapSrcAlias);
20241 if (stat != ASN_OK) return stat;
20242 invokeBoolValue (pctxt, pvalue->canMapSrcAlias);
20243
20244 invokeEndElement (pctxt, "canMapSrcAlias", -1);
20245 break;
20246
20247 default:
20248 pctxt->buffer.byteIndex += openType.numocts;
20249 }
20250 copyContext (pctxt, &lctxt2);
20251 }
20252 else { /* unknown element */
20253 pctxt->buffer.byteIndex += openType.numocts;
20254 }
20255 }
20256 }
20257 }
20258
20259 return (stat);
20260 }
20261
20262 /**************************************************************/
20263 /* */
20264 /* UUIEsRequested */
20265 /* */
20266 /**************************************************************/
20267
20268 EXTERN int asn1PD_H225UUIEsRequested (OOCTXT* pctxt, H225UUIEsRequested* pvalue)
20269 {
20270 int stat = ASN_OK;
20271 OOCTXT lctxt;
20272 OOCTXT lctxt2;
20273 ASN1OpenType openType;
20274 ASN1UINT bitcnt;
20275 ASN1UINT i;
20276 ASN1BOOL optbit = 0;
20277 ASN1BOOL extbit = 0;
20278
20279 /* extension bit */
20280
20281 DECODEBIT (pctxt, &extbit);
20282
20283 memset (&pvalue->m, 0, sizeof(pvalue->m));
20284
20285 /* decode setup */
20286
20287 invokeStartElement (pctxt, "setup", -1);
20288
20289 stat = DECODEBIT (pctxt, &pvalue->setup);
20290 if (stat != ASN_OK) return stat;
20291 invokeBoolValue (pctxt, pvalue->setup);
20292
20293 invokeEndElement (pctxt, "setup", -1);
20294
20295 /* decode callProceeding */
20296
20297 invokeStartElement (pctxt, "callProceeding", -1);
20298
20299 stat = DECODEBIT (pctxt, &pvalue->callProceeding);
20300 if (stat != ASN_OK) return stat;
20301 invokeBoolValue (pctxt, pvalue->callProceeding);
20302
20303 invokeEndElement (pctxt, "callProceeding", -1);
20304
20305 /* decode connect */
20306
20307 invokeStartElement (pctxt, "connect", -1);
20308
20309 stat = DECODEBIT (pctxt, &pvalue->connect);
20310 if (stat != ASN_OK) return stat;
20311 invokeBoolValue (pctxt, pvalue->connect);
20312
20313 invokeEndElement (pctxt, "connect", -1);
20314
20315 /* decode alerting */
20316
20317 invokeStartElement (pctxt, "alerting", -1);
20318
20319 stat = DECODEBIT (pctxt, &pvalue->alerting);
20320 if (stat != ASN_OK) return stat;
20321 invokeBoolValue (pctxt, pvalue->alerting);
20322
20323 invokeEndElement (pctxt, "alerting", -1);
20324
20325 /* decode information */
20326
20327 invokeStartElement (pctxt, "information", -1);
20328
20329 stat = DECODEBIT (pctxt, &pvalue->information);
20330 if (stat != ASN_OK) return stat;
20331 invokeBoolValue (pctxt, pvalue->information);
20332
20333 invokeEndElement (pctxt, "information", -1);
20334
20335 /* decode releaseComplete */
20336
20337 invokeStartElement (pctxt, "releaseComplete", -1);
20338
20339 stat = DECODEBIT (pctxt, &pvalue->releaseComplete);
20340 if (stat != ASN_OK) return stat;
20341 invokeBoolValue (pctxt, pvalue->releaseComplete);
20342
20343 invokeEndElement (pctxt, "releaseComplete", -1);
20344
20345 /* decode facility */
20346
20347 invokeStartElement (pctxt, "facility", -1);
20348
20349 stat = DECODEBIT (pctxt, &pvalue->facility);
20350 if (stat != ASN_OK) return stat;
20351 invokeBoolValue (pctxt, pvalue->facility);
20352
20353 invokeEndElement (pctxt, "facility", -1);
20354
20355 /* decode progress */
20356
20357 invokeStartElement (pctxt, "progress", -1);
20358
20359 stat = DECODEBIT (pctxt, &pvalue->progress);
20360 if (stat != ASN_OK) return stat;
20361 invokeBoolValue (pctxt, pvalue->progress);
20362
20363 invokeEndElement (pctxt, "progress", -1);
20364
20365 /* decode empty */
20366
20367 invokeStartElement (pctxt, "empty", -1);
20368
20369 stat = DECODEBIT (pctxt, &pvalue->empty);
20370 if (stat != ASN_OK) return stat;
20371 invokeBoolValue (pctxt, pvalue->empty);
20372
20373 invokeEndElement (pctxt, "empty", -1);
20374
20375 if (extbit) {
20376
20377 /* decode extension optional bits length */
20378
20379 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
20380 if (stat != ASN_OK) return stat;
20381
20382 bitcnt += 1;
20383
20384 ZEROCONTEXT (&lctxt);
20385 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
20386 if (stat != ASN_OK) return stat;
20387
20388 stat = moveBitCursor (pctxt, bitcnt);
20389 if (stat != ASN_OK) return stat;
20390
20391 for (i = 0; i < bitcnt; i++) {
20392 DECODEBIT (&lctxt, &optbit);
20393
20394 if (optbit) {
20395 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
20396 if (stat != ASN_OK) return stat;
20397
20398 if (i < 4 && openType.numocts > 0) { /* known element */
20399 copyContext (&lctxt2, pctxt);
20400 initContextBuffer (pctxt, openType.data, openType.numocts);
20401
20402 switch (i) {
20403 case 0:
20404 pvalue->m.statusPresent = 1;
20405
20406 invokeStartElement (pctxt, "status", -1);
20407
20408 stat = DECODEBIT (pctxt, &pvalue->status);
20409 if (stat != ASN_OK) return stat;
20410 invokeBoolValue (pctxt, pvalue->status);
20411
20412 invokeEndElement (pctxt, "status", -1);
20413 break;
20414
20415 case 1:
20416 pvalue->m.statusInquiryPresent = 1;
20417
20418 invokeStartElement (pctxt, "statusInquiry", -1);
20419
20420 stat = DECODEBIT (pctxt, &pvalue->statusInquiry);
20421 if (stat != ASN_OK) return stat;
20422 invokeBoolValue (pctxt, pvalue->statusInquiry);
20423
20424 invokeEndElement (pctxt, "statusInquiry", -1);
20425 break;
20426
20427 case 2:
20428 pvalue->m.setupAcknowledgePresent = 1;
20429
20430 invokeStartElement (pctxt, "setupAcknowledge", -1);
20431
20432 stat = DECODEBIT (pctxt, &pvalue->setupAcknowledge);
20433 if (stat != ASN_OK) return stat;
20434 invokeBoolValue (pctxt, pvalue->setupAcknowledge);
20435
20436 invokeEndElement (pctxt, "setupAcknowledge", -1);
20437 break;
20438
20439 case 3:
20440 pvalue->m.notifyPresent = 1;
20441
20442 invokeStartElement (pctxt, "notify", -1);
20443
20444 stat = DECODEBIT (pctxt, &pvalue->notify);
20445 if (stat != ASN_OK) return stat;
20446 invokeBoolValue (pctxt, pvalue->notify);
20447
20448 invokeEndElement (pctxt, "notify", -1);
20449 break;
20450
20451 default:
20452 pctxt->buffer.byteIndex += openType.numocts;
20453 }
20454 copyContext (pctxt, &lctxt2);
20455 }
20456 else { /* unknown element */
20457 pctxt->buffer.byteIndex += openType.numocts;
20458 }
20459 }
20460 }
20461 }
20462
20463 return (stat);
20464 }
20465
20466 /**************************************************************/
20467 /* */
20468 /* AdmissionConfirm_language */
20469 /* */
20470 /**************************************************************/
20471
20472 EXTERN int asn1PD_H225AdmissionConfirm_language (OOCTXT* pctxt, H225AdmissionConfirm_language* pvalue)
20473 {
20474 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
20475 int stat = ASN_OK;
20476 ASN1UINT xx1;
20477
20478 /* decode length determinant */
20479
20480 stat = decodeLength (pctxt, &pvalue->n);
20481 if (stat != ASN_OK) return stat;
20482
20483 /* decode elements */
20484
20485 ALLOC_ASN1ARRAY (pctxt, pvalue, ASN1IA5String);
20486
20487 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
20488 invokeStartElement (pctxt, "elem", xx1);
20489
20490 addSizeConstraint (pctxt, &element_lsize1);
20491
20492 stat = decodeConstrainedStringEx (pctxt, &pvalue->elem[xx1], 0, 8, 7, 7);
20493 if (stat != ASN_OK) return stat;
20494 invokeCharStrValue (pctxt, pvalue->elem[xx1]);
20495 invokeEndElement (pctxt, "elem", xx1);
20496
20497 }
20498
20499 return (stat);
20500 }
20501
20502 /**************************************************************/
20503 /* */
20504 /* AdmissionConfirm */
20505 /* */
20506 /**************************************************************/
20507
20508 EXTERN int asn1PD_H225AdmissionConfirm (OOCTXT* pctxt, H225AdmissionConfirm* pvalue)
20509 {
20510 int stat = ASN_OK;
20511 OOCTXT lctxt;
20512 OOCTXT lctxt2;
20513 ASN1OpenType openType;
20514 ASN1UINT bitcnt;
20515 ASN1UINT i;
20516 ASN1BOOL optbit = 0;
20517 ASN1BOOL extbit = 0;
20518
20519 /* extension bit */
20520
20521 DECODEBIT (pctxt, &extbit);
20522
20523 /* optional bits */
20524
20525 memset (&pvalue->m, 0, sizeof(pvalue->m));
20526
20527 DECODEBIT (pctxt, &optbit);
20528 pvalue->m.irrFrequencyPresent = optbit;
20529
20530 DECODEBIT (pctxt, &optbit);
20531 pvalue->m.nonStandardDataPresent = optbit;
20532
20533 /* decode requestSeqNum */
20534
20535 invokeStartElement (pctxt, "requestSeqNum", -1);
20536
20537 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
20538 if (stat != ASN_OK) return stat;
20539
20540 invokeEndElement (pctxt, "requestSeqNum", -1);
20541
20542 /* decode bandWidth */
20543
20544 invokeStartElement (pctxt, "bandWidth", -1);
20545
20546 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
20547 if (stat != ASN_OK) return stat;
20548
20549 invokeEndElement (pctxt, "bandWidth", -1);
20550
20551 /* decode callModel */
20552
20553 invokeStartElement (pctxt, "callModel", -1);
20554
20555 stat = asn1PD_H225CallModel (pctxt, &pvalue->callModel);
20556 if (stat != ASN_OK) return stat;
20557
20558 invokeEndElement (pctxt, "callModel", -1);
20559
20560 /* decode destCallSignalAddress */
20561
20562 invokeStartElement (pctxt, "destCallSignalAddress", -1);
20563
20564 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
20565 if (stat != ASN_OK) return stat;
20566
20567 invokeEndElement (pctxt, "destCallSignalAddress", -1);
20568
20569 /* decode irrFrequency */
20570
20571 if (pvalue->m.irrFrequencyPresent) {
20572 invokeStartElement (pctxt, "irrFrequency", -1);
20573
20574 stat = decodeConsUInt16 (pctxt, &pvalue->irrFrequency, 1U, 65535U);
20575 if (stat != ASN_OK) return stat;
20576 invokeUIntValue (pctxt, pvalue->irrFrequency);
20577
20578 invokeEndElement (pctxt, "irrFrequency", -1);
20579 }
20580
20581 /* decode nonStandardData */
20582
20583 if (pvalue->m.nonStandardDataPresent) {
20584 invokeStartElement (pctxt, "nonStandardData", -1);
20585
20586 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
20587 if (stat != ASN_OK) return stat;
20588
20589 invokeEndElement (pctxt, "nonStandardData", -1);
20590 }
20591
20592 if (extbit) {
20593
20594 /* decode extension optional bits length */
20595
20596 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
20597 if (stat != ASN_OK) return stat;
20598
20599 bitcnt += 1;
20600
20601 ZEROCONTEXT (&lctxt);
20602 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
20603 if (stat != ASN_OK) return stat;
20604
20605 stat = moveBitCursor (pctxt, bitcnt);
20606 if (stat != ASN_OK) return stat;
20607
20608 for (i = 0; i < bitcnt; i++) {
20609 DECODEBIT (&lctxt, &optbit);
20610
20611 if (optbit) {
20612 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
20613 if (stat != ASN_OK) return stat;
20614
20615 if (i < 22 && openType.numocts > 0) { /* known element */
20616 copyContext (&lctxt2, pctxt);
20617 initContextBuffer (pctxt, openType.data, openType.numocts);
20618
20619 switch (i) {
20620 case 0:
20621 pvalue->m.destinationInfoPresent = 1;
20622
20623 invokeStartElement (pctxt, "destinationInfo", -1);
20624
20625 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
20626 if (stat != ASN_OK) return stat;
20627
20628 invokeEndElement (pctxt, "destinationInfo", -1);
20629 break;
20630
20631 case 1:
20632 pvalue->m.destExtraCallInfoPresent = 1;
20633
20634 invokeStartElement (pctxt, "destExtraCallInfo", -1);
20635
20636 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
20637 if (stat != ASN_OK) return stat;
20638
20639 invokeEndElement (pctxt, "destExtraCallInfo", -1);
20640 break;
20641
20642 case 2:
20643 pvalue->m.destinationTypePresent = 1;
20644
20645 invokeStartElement (pctxt, "destinationType", -1);
20646
20647 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationType);
20648 if (stat != ASN_OK) return stat;
20649
20650 invokeEndElement (pctxt, "destinationType", -1);
20651 break;
20652
20653 case 3:
20654 pvalue->m.remoteExtensionAddressPresent = 1;
20655
20656 invokeStartElement (pctxt, "remoteExtensionAddress", -1);
20657
20658 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
20659 if (stat != ASN_OK) return stat;
20660
20661 invokeEndElement (pctxt, "remoteExtensionAddress", -1);
20662 break;
20663
20664 case 4:
20665 pvalue->m.alternateEndpointsPresent = 1;
20666
20667 invokeStartElement (pctxt, "alternateEndpoints", -1);
20668
20669 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->alternateEndpoints);
20670 if (stat != ASN_OK) return stat;
20671
20672 invokeEndElement (pctxt, "alternateEndpoints", -1);
20673 break;
20674
20675 case 5:
20676 pvalue->m.tokensPresent = 1;
20677
20678 invokeStartElement (pctxt, "tokens", -1);
20679
20680 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
20681 if (stat != ASN_OK) return stat;
20682
20683 invokeEndElement (pctxt, "tokens", -1);
20684 break;
20685
20686 case 6:
20687 pvalue->m.cryptoTokensPresent = 1;
20688
20689 invokeStartElement (pctxt, "cryptoTokens", -1);
20690
20691 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
20692 if (stat != ASN_OK) return stat;
20693
20694 invokeEndElement (pctxt, "cryptoTokens", -1);
20695 break;
20696
20697 case 7:
20698 pvalue->m.integrityCheckValuePresent = 1;
20699
20700 invokeStartElement (pctxt, "integrityCheckValue", -1);
20701
20702 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
20703 if (stat != ASN_OK) return stat;
20704
20705 invokeEndElement (pctxt, "integrityCheckValue", -1);
20706 break;
20707
20708 case 8:
20709 pvalue->m.transportQOSPresent = 1;
20710
20711 invokeStartElement (pctxt, "transportQOS", -1);
20712
20713 stat = asn1PD_H225TransportQOS (pctxt, &pvalue->transportQOS);
20714 if (stat != ASN_OK) return stat;
20715
20716 invokeEndElement (pctxt, "transportQOS", -1);
20717 break;
20718
20719 case 9:
20720 pvalue->m.willRespondToIRRPresent = 1;
20721
20722 invokeStartElement (pctxt, "willRespondToIRR", -1);
20723
20724 stat = DECODEBIT (pctxt, &pvalue->willRespondToIRR);
20725 if (stat != ASN_OK) return stat;
20726 invokeBoolValue (pctxt, pvalue->willRespondToIRR);
20727
20728 invokeEndElement (pctxt, "willRespondToIRR", -1);
20729 break;
20730
20731 case 10:
20732 pvalue->m.uuiesRequestedPresent = 1;
20733
20734 invokeStartElement (pctxt, "uuiesRequested", -1);
20735
20736 stat = asn1PD_H225UUIEsRequested (pctxt, &pvalue->uuiesRequested);
20737 if (stat != ASN_OK) return stat;
20738
20739 invokeEndElement (pctxt, "uuiesRequested", -1);
20740 break;
20741
20742 case 11:
20743 pvalue->m.languagePresent = 1;
20744
20745 invokeStartElement (pctxt, "language", -1);
20746
20747 stat = asn1PD_H225AdmissionConfirm_language (pctxt, &pvalue->language);
20748 if (stat != ASN_OK) return stat;
20749
20750 invokeEndElement (pctxt, "language", -1);
20751 break;
20752
20753 case 12:
20754 pvalue->m.alternateTransportAddressesPresent = 1;
20755
20756 invokeStartElement (pctxt, "alternateTransportAddresses", -1);
20757
20758 stat = asn1PD_H225AlternateTransportAddresses (pctxt, &pvalue->alternateTransportAddresses);
20759 if (stat != ASN_OK) return stat;
20760
20761 invokeEndElement (pctxt, "alternateTransportAddresses", -1);
20762 break;
20763
20764 case 13:
20765 pvalue->m.useSpecifiedTransportPresent = 1;
20766
20767 invokeStartElement (pctxt, "useSpecifiedTransport", -1);
20768
20769 stat = asn1PD_H225UseSpecifiedTransport (pctxt, &pvalue->useSpecifiedTransport);
20770 if (stat != ASN_OK) return stat;
20771
20772 invokeEndElement (pctxt, "useSpecifiedTransport", -1);
20773 break;
20774
20775 case 14:
20776 pvalue->m.circuitInfoPresent = 1;
20777
20778 invokeStartElement (pctxt, "circuitInfo", -1);
20779
20780 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
20781 if (stat != ASN_OK) return stat;
20782
20783 invokeEndElement (pctxt, "circuitInfo", -1);
20784 break;
20785
20786 case 15:
20787 pvalue->m.usageSpecPresent = 1;
20788
20789 invokeStartElement (pctxt, "usageSpec", -1);
20790
20791 stat = asn1PD_H225_SeqOfH225RasUsageSpecification (pctxt, &pvalue->usageSpec);
20792 if (stat != ASN_OK) return stat;
20793
20794 invokeEndElement (pctxt, "usageSpec", -1);
20795 break;
20796
20797 case 16:
20798 pvalue->m.supportedProtocolsPresent = 1;
20799
20800 invokeStartElement (pctxt, "supportedProtocols", -1);
20801
20802 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->supportedProtocols);
20803 if (stat != ASN_OK) return stat;
20804
20805 invokeEndElement (pctxt, "supportedProtocols", -1);
20806 break;
20807
20808 case 17:
20809 pvalue->m.serviceControlPresent = 1;
20810
20811 invokeStartElement (pctxt, "serviceControl", -1);
20812
20813 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
20814 if (stat != ASN_OK) return stat;
20815
20816 invokeEndElement (pctxt, "serviceControl", -1);
20817 break;
20818
20819 case 18:
20820 pvalue->m.multipleCallsPresent = 1;
20821
20822 invokeStartElement (pctxt, "multipleCalls", -1);
20823
20824 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
20825 if (stat != ASN_OK) return stat;
20826 invokeBoolValue (pctxt, pvalue->multipleCalls);
20827
20828 invokeEndElement (pctxt, "multipleCalls", -1);
20829 break;
20830
20831 case 19:
20832 pvalue->m.featureSetPresent = 1;
20833
20834 invokeStartElement (pctxt, "featureSet", -1);
20835
20836 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
20837 if (stat != ASN_OK) return stat;
20838
20839 invokeEndElement (pctxt, "featureSet", -1);
20840 break;
20841
20842 case 20:
20843 pvalue->m.genericDataPresent = 1;
20844
20845 invokeStartElement (pctxt, "genericData", -1);
20846
20847 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
20848 if (stat != ASN_OK) return stat;
20849
20850 invokeEndElement (pctxt, "genericData", -1);
20851 break;
20852
20853 case 21:
20854 pvalue->m.modifiedSrcInfoPresent = 1;
20855
20856 invokeStartElement (pctxt, "modifiedSrcInfo", -1);
20857
20858 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->modifiedSrcInfo);
20859 if (stat != ASN_OK) return stat;
20860
20861 invokeEndElement (pctxt, "modifiedSrcInfo", -1);
20862 break;
20863
20864 default:
20865 pctxt->buffer.byteIndex += openType.numocts;
20866 }
20867 copyContext (pctxt, &lctxt2);
20868 }
20869 else { /* unknown element */
20870 pctxt->buffer.byteIndex += openType.numocts;
20871 }
20872 }
20873 }
20874 }
20875
20876 return (stat);
20877 }
20878
20879 /**************************************************************/
20880 /* */
20881 /* _SeqOfH225PartyNumber */
20882 /* */
20883 /**************************************************************/
20884
20885 EXTERN int asn1PD_H225_SeqOfH225PartyNumber (OOCTXT* pctxt, H225_SeqOfH225PartyNumber* pvalue)
20886 {
20887 int stat = ASN_OK;
20888 H225PartyNumber* pdata;
20889 ASN1UINT count = 0;
20890 ASN1UINT xx1;
20891 int lstat;
20892
20893 dListInit (pvalue);
20894
20895 for (;;) {
20896 /* decode length determinant */
20897
20898 lstat = decodeLength (pctxt, &count);
20899 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
20900 return lstat;
20901 }
20902
20903 /* decode elements */
20904
20905 for (xx1 = 0; xx1 < count; xx1++) {
20906 invokeStartElement (pctxt, "elem", xx1);
20907
20908 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225PartyNumber);
20909
20910 stat = asn1PD_H225PartyNumber (pctxt, pdata);
20911 if (stat != ASN_OK) return stat;
20912 invokeEndElement (pctxt, "elem", xx1);
20913
20914 dListAppendNode (pctxt, pvalue, pdata);
20915 }
20916
20917 if(lstat == ASN_OK) break;
20918 }
20919
20920 return (stat);
20921 }
20922
20923 /**************************************************************/
20924 /* */
20925 /* AdmissionRejectReason */
20926 /* */
20927 /**************************************************************/
20928
20929 EXTERN int asn1PD_H225AdmissionRejectReason (OOCTXT* pctxt, H225AdmissionRejectReason* pvalue)
20930 {
20931 int stat = ASN_OK;
20932 ASN1UINT ui;
20933 ASN1OpenType openType;
20934 ASN1BOOL extbit = 0;
20935 OOCTXT lctxt;
20936
20937 /* extension bit */
20938
20939 DECODEBIT (pctxt, &extbit);
20940
20941 if (!extbit) {
20942 stat = decodeConsUnsigned (pctxt, &ui, 0, 7);
20943 if (stat != ASN_OK) return stat;
20944 else pvalue->t = ui + 1;
20945
20946 switch (ui) {
20947 /* calledPartyNotRegistered */
20948 case 0:
20949 invokeStartElement (pctxt, "calledPartyNotRegistered", -1);
20950
20951 /* NULL */
20952 invokeNullValue (pctxt);
20953
20954 invokeEndElement (pctxt, "calledPartyNotRegistered", -1);
20955
20956 break;
20957
20958 /* invalidPermission */
20959 case 1:
20960 invokeStartElement (pctxt, "invalidPermission", -1);
20961
20962 /* NULL */
20963 invokeNullValue (pctxt);
20964
20965 invokeEndElement (pctxt, "invalidPermission", -1);
20966
20967 break;
20968
20969 /* requestDenied */
20970 case 2:
20971 invokeStartElement (pctxt, "requestDenied", -1);
20972
20973 /* NULL */
20974 invokeNullValue (pctxt);
20975
20976 invokeEndElement (pctxt, "requestDenied", -1);
20977
20978 break;
20979
20980 /* undefinedReason */
20981 case 3:
20982 invokeStartElement (pctxt, "undefinedReason", -1);
20983
20984 /* NULL */
20985 invokeNullValue (pctxt);
20986
20987 invokeEndElement (pctxt, "undefinedReason", -1);
20988
20989 break;
20990
20991 /* callerNotRegistered */
20992 case 4:
20993 invokeStartElement (pctxt, "callerNotRegistered", -1);
20994
20995 /* NULL */
20996 invokeNullValue (pctxt);
20997
20998 invokeEndElement (pctxt, "callerNotRegistered", -1);
20999
21000 break;
21001
21002 /* routeCallToGatekeeper */
21003 case 5:
21004 invokeStartElement (pctxt, "routeCallToGatekeeper", -1);
21005
21006 /* NULL */
21007 invokeNullValue (pctxt);
21008
21009 invokeEndElement (pctxt, "routeCallToGatekeeper", -1);
21010
21011 break;
21012
21013 /* invalidEndpointIdentifier */
21014 case 6:
21015 invokeStartElement (pctxt, "invalidEndpointIdentifier", -1);
21016
21017 /* NULL */
21018 invokeNullValue (pctxt);
21019
21020 invokeEndElement (pctxt, "invalidEndpointIdentifier", -1);
21021
21022 break;
21023
21024 /* resourceUnavailable */
21025 case 7:
21026 invokeStartElement (pctxt, "resourceUnavailable", -1);
21027
21028 /* NULL */
21029 invokeNullValue (pctxt);
21030
21031 invokeEndElement (pctxt, "resourceUnavailable", -1);
21032
21033 break;
21034
21035 default:
21036 return ASN_E_INVOPT;
21037 }
21038 }
21039 else {
21040 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
21041 if (stat != ASN_OK) return stat;
21042 else pvalue->t = ui + 9;
21043
21044 stat = decodeByteAlign (pctxt);
21045 if (stat != ASN_OK) return stat;
21046
21047 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
21048 if (stat != ASN_OK) return stat;
21049
21050 copyContext (&lctxt, pctxt);
21051 initContextBuffer (pctxt, openType.data, openType.numocts);
21052
21053 switch (pvalue->t) {
21054 /* securityDenial */
21055 case 9:
21056 invokeStartElement (pctxt, "securityDenial", -1);
21057
21058 /* NULL */
21059 invokeNullValue (pctxt);
21060
21061 invokeEndElement (pctxt, "securityDenial", -1);
21062
21063 break;
21064
21065 /* qosControlNotSupported */
21066 case 10:
21067 invokeStartElement (pctxt, "qosControlNotSupported", -1);
21068
21069 /* NULL */
21070 invokeNullValue (pctxt);
21071
21072 invokeEndElement (pctxt, "qosControlNotSupported", -1);
21073
21074 break;
21075
21076 /* incompleteAddress */
21077 case 11:
21078 invokeStartElement (pctxt, "incompleteAddress", -1);
21079
21080 /* NULL */
21081 invokeNullValue (pctxt);
21082
21083 invokeEndElement (pctxt, "incompleteAddress", -1);
21084
21085 break;
21086
21087 /* aliasesInconsistent */
21088 case 12:
21089 invokeStartElement (pctxt, "aliasesInconsistent", -1);
21090
21091 /* NULL */
21092 invokeNullValue (pctxt);
21093
21094 invokeEndElement (pctxt, "aliasesInconsistent", -1);
21095
21096 break;
21097
21098 /* routeCallToSCN */
21099 case 13:
21100 invokeStartElement (pctxt, "routeCallToSCN", -1);
21101
21102 pvalue->u.routeCallToSCN = ALLOC_ASN1ELEM (pctxt, H225_SeqOfH225PartyNumber);
21103
21104 stat = asn1PD_H225_SeqOfH225PartyNumber (pctxt, pvalue->u.routeCallToSCN);
21105 if (stat != ASN_OK) return stat;
21106
21107 invokeEndElement (pctxt, "routeCallToSCN", -1);
21108
21109 break;
21110
21111 /* exceedsCallCapacity */
21112 case 14:
21113 invokeStartElement (pctxt, "exceedsCallCapacity", -1);
21114
21115 /* NULL */
21116 invokeNullValue (pctxt);
21117
21118 invokeEndElement (pctxt, "exceedsCallCapacity", -1);
21119
21120 break;
21121
21122 /* collectDestination */
21123 case 15:
21124 invokeStartElement (pctxt, "collectDestination", -1);
21125
21126 /* NULL */
21127 invokeNullValue (pctxt);
21128
21129 invokeEndElement (pctxt, "collectDestination", -1);
21130
21131 break;
21132
21133 /* collectPIN */
21134 case 16:
21135 invokeStartElement (pctxt, "collectPIN", -1);
21136
21137 /* NULL */
21138 invokeNullValue (pctxt);
21139
21140 invokeEndElement (pctxt, "collectPIN", -1);
21141
21142 break;
21143
21144 /* genericDataReason */
21145 case 17:
21146 invokeStartElement (pctxt, "genericDataReason", -1);
21147
21148 /* NULL */
21149 invokeNullValue (pctxt);
21150
21151 invokeEndElement (pctxt, "genericDataReason", -1);
21152
21153 break;
21154
21155 /* neededFeatureNotSupported */
21156 case 18:
21157 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
21158
21159 /* NULL */
21160 invokeNullValue (pctxt);
21161
21162 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
21163
21164 break;
21165
21166 /* securityErrors */
21167 case 19:
21168 invokeStartElement (pctxt, "securityErrors", -1);
21169
21170 pvalue->u.securityErrors = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
21171
21172 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityErrors);
21173 if (stat != ASN_OK) return stat;
21174
21175 invokeEndElement (pctxt, "securityErrors", -1);
21176
21177 break;
21178
21179 /* securityDHmismatch */
21180 case 20:
21181 invokeStartElement (pctxt, "securityDHmismatch", -1);
21182
21183 /* NULL */
21184 invokeNullValue (pctxt);
21185
21186 invokeEndElement (pctxt, "securityDHmismatch", -1);
21187
21188 break;
21189
21190 /* noRouteToDestination */
21191 case 21:
21192 invokeStartElement (pctxt, "noRouteToDestination", -1);
21193
21194 /* NULL */
21195 invokeNullValue (pctxt);
21196
21197 invokeEndElement (pctxt, "noRouteToDestination", -1);
21198
21199 break;
21200
21201 /* unallocatedNumber */
21202 case 22:
21203 invokeStartElement (pctxt, "unallocatedNumber", -1);
21204
21205 /* NULL */
21206 invokeNullValue (pctxt);
21207
21208 invokeEndElement (pctxt, "unallocatedNumber", -1);
21209
21210 break;
21211
21212 default:;
21213 }
21214
21215 copyContext (pctxt, &lctxt);
21216 }
21217
21218 return (stat);
21219 }
21220
21221 /**************************************************************/
21222 /* */
21223 /* AdmissionReject */
21224 /* */
21225 /**************************************************************/
21226
21227 EXTERN int asn1PD_H225AdmissionReject (OOCTXT* pctxt, H225AdmissionReject* pvalue)
21228 {
21229 int stat = ASN_OK;
21230 OOCTXT lctxt;
21231 OOCTXT lctxt2;
21232 ASN1OpenType openType;
21233 ASN1UINT bitcnt;
21234 ASN1UINT i;
21235 ASN1BOOL optbit = 0;
21236 ASN1BOOL extbit = 0;
21237
21238 /* extension bit */
21239
21240 DECODEBIT (pctxt, &extbit);
21241
21242 /* optional bits */
21243
21244 memset (&pvalue->m, 0, sizeof(pvalue->m));
21245
21246 DECODEBIT (pctxt, &optbit);
21247 pvalue->m.nonStandardDataPresent = optbit;
21248
21249 /* decode requestSeqNum */
21250
21251 invokeStartElement (pctxt, "requestSeqNum", -1);
21252
21253 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
21254 if (stat != ASN_OK) return stat;
21255
21256 invokeEndElement (pctxt, "requestSeqNum", -1);
21257
21258 /* decode rejectReason */
21259
21260 invokeStartElement (pctxt, "rejectReason", -1);
21261
21262 stat = asn1PD_H225AdmissionRejectReason (pctxt, &pvalue->rejectReason);
21263 if (stat != ASN_OK) return stat;
21264
21265 invokeEndElement (pctxt, "rejectReason", -1);
21266
21267 /* decode nonStandardData */
21268
21269 if (pvalue->m.nonStandardDataPresent) {
21270 invokeStartElement (pctxt, "nonStandardData", -1);
21271
21272 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21273 if (stat != ASN_OK) return stat;
21274
21275 invokeEndElement (pctxt, "nonStandardData", -1);
21276 }
21277
21278 if (extbit) {
21279
21280 /* decode extension optional bits length */
21281
21282 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
21283 if (stat != ASN_OK) return stat;
21284
21285 bitcnt += 1;
21286
21287 ZEROCONTEXT (&lctxt);
21288 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
21289 if (stat != ASN_OK) return stat;
21290
21291 stat = moveBitCursor (pctxt, bitcnt);
21292 if (stat != ASN_OK) return stat;
21293
21294 for (i = 0; i < bitcnt; i++) {
21295 DECODEBIT (&lctxt, &optbit);
21296
21297 if (optbit) {
21298 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
21299 if (stat != ASN_OK) return stat;
21300
21301 if (i < 8 && openType.numocts > 0) { /* known element */
21302 copyContext (&lctxt2, pctxt);
21303 initContextBuffer (pctxt, openType.data, openType.numocts);
21304
21305 switch (i) {
21306 case 0:
21307 pvalue->m.altGKInfoPresent = 1;
21308
21309 invokeStartElement (pctxt, "altGKInfo", -1);
21310
21311 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
21312 if (stat != ASN_OK) return stat;
21313
21314 invokeEndElement (pctxt, "altGKInfo", -1);
21315 break;
21316
21317 case 1:
21318 pvalue->m.tokensPresent = 1;
21319
21320 invokeStartElement (pctxt, "tokens", -1);
21321
21322 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21323 if (stat != ASN_OK) return stat;
21324
21325 invokeEndElement (pctxt, "tokens", -1);
21326 break;
21327
21328 case 2:
21329 pvalue->m.cryptoTokensPresent = 1;
21330
21331 invokeStartElement (pctxt, "cryptoTokens", -1);
21332
21333 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21334 if (stat != ASN_OK) return stat;
21335
21336 invokeEndElement (pctxt, "cryptoTokens", -1);
21337 break;
21338
21339 case 3:
21340 pvalue->m.callSignalAddressPresent = 1;
21341
21342 invokeStartElement (pctxt, "callSignalAddress", -1);
21343
21344 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
21345 if (stat != ASN_OK) return stat;
21346
21347 invokeEndElement (pctxt, "callSignalAddress", -1);
21348 break;
21349
21350 case 4:
21351 pvalue->m.integrityCheckValuePresent = 1;
21352
21353 invokeStartElement (pctxt, "integrityCheckValue", -1);
21354
21355 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
21356 if (stat != ASN_OK) return stat;
21357
21358 invokeEndElement (pctxt, "integrityCheckValue", -1);
21359 break;
21360
21361 case 5:
21362 pvalue->m.serviceControlPresent = 1;
21363
21364 invokeStartElement (pctxt, "serviceControl", -1);
21365
21366 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
21367 if (stat != ASN_OK) return stat;
21368
21369 invokeEndElement (pctxt, "serviceControl", -1);
21370 break;
21371
21372 case 6:
21373 pvalue->m.featureSetPresent = 1;
21374
21375 invokeStartElement (pctxt, "featureSet", -1);
21376
21377 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
21378 if (stat != ASN_OK) return stat;
21379
21380 invokeEndElement (pctxt, "featureSet", -1);
21381 break;
21382
21383 case 7:
21384 pvalue->m.genericDataPresent = 1;
21385
21386 invokeStartElement (pctxt, "genericData", -1);
21387
21388 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
21389 if (stat != ASN_OK) return stat;
21390
21391 invokeEndElement (pctxt, "genericData", -1);
21392 break;
21393
21394 default:
21395 pctxt->buffer.byteIndex += openType.numocts;
21396 }
21397 copyContext (pctxt, &lctxt2);
21398 }
21399 else { /* unknown element */
21400 pctxt->buffer.byteIndex += openType.numocts;
21401 }
21402 }
21403 }
21404 }
21405
21406 return (stat);
21407 }
21408
21409 /**************************************************************/
21410 /* */
21411 /* _SeqOfH225BandwidthDetails */
21412 /* */
21413 /**************************************************************/
21414
21415 EXTERN int asn1PD_H225_SeqOfH225BandwidthDetails (OOCTXT* pctxt, H225_SeqOfH225BandwidthDetails* pvalue)
21416 {
21417 int stat = ASN_OK;
21418 H225BandwidthDetails* pdata;
21419 ASN1UINT count = 0;
21420 ASN1UINT xx1;
21421 int lstat;
21422
21423 dListInit (pvalue);
21424
21425 for (;;) {
21426 /* decode length determinant */
21427
21428 lstat = decodeLength (pctxt, &count);
21429 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
21430 return lstat;
21431 }
21432
21433 /* decode elements */
21434
21435 for (xx1 = 0; xx1 < count; xx1++) {
21436 invokeStartElement (pctxt, "elem", xx1);
21437
21438 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225BandwidthDetails);
21439
21440 stat = asn1PD_H225BandwidthDetails (pctxt, pdata);
21441 if (stat != ASN_OK) return stat;
21442 invokeEndElement (pctxt, "elem", xx1);
21443
21444 dListAppendNode (pctxt, pvalue, pdata);
21445 }
21446
21447 if(lstat == ASN_OK) break;
21448 }
21449
21450 return (stat);
21451 }
21452
21453 /**************************************************************/
21454 /* */
21455 /* BandwidthRequest */
21456 /* */
21457 /**************************************************************/
21458
21459 EXTERN int asn1PD_H225BandwidthRequest (OOCTXT* pctxt, H225BandwidthRequest* pvalue)
21460 {
21461 int stat = ASN_OK;
21462 OOCTXT lctxt;
21463 OOCTXT lctxt2;
21464 ASN1OpenType openType;
21465 ASN1UINT bitcnt;
21466 ASN1UINT i;
21467 ASN1BOOL optbit = 0;
21468 ASN1BOOL extbit = 0;
21469
21470 /* extension bit */
21471
21472 DECODEBIT (pctxt, &extbit);
21473
21474 /* optional bits */
21475
21476 memset (&pvalue->m, 0, sizeof(pvalue->m));
21477
21478 DECODEBIT (pctxt, &optbit);
21479 pvalue->m.callTypePresent = optbit;
21480
21481 DECODEBIT (pctxt, &optbit);
21482 pvalue->m.nonStandardDataPresent = optbit;
21483
21484 /* decode requestSeqNum */
21485
21486 invokeStartElement (pctxt, "requestSeqNum", -1);
21487
21488 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
21489 if (stat != ASN_OK) return stat;
21490
21491 invokeEndElement (pctxt, "requestSeqNum", -1);
21492
21493 /* decode endpointIdentifier */
21494
21495 invokeStartElement (pctxt, "endpointIdentifier", -1);
21496
21497 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
21498 if (stat != ASN_OK) return stat;
21499
21500 invokeEndElement (pctxt, "endpointIdentifier", -1);
21501
21502 /* decode conferenceID */
21503
21504 invokeStartElement (pctxt, "conferenceID", -1);
21505
21506 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
21507 if (stat != ASN_OK) return stat;
21508
21509 invokeEndElement (pctxt, "conferenceID", -1);
21510
21511 /* decode callReferenceValue */
21512
21513 invokeStartElement (pctxt, "callReferenceValue", -1);
21514
21515 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->callReferenceValue);
21516 if (stat != ASN_OK) return stat;
21517
21518 invokeEndElement (pctxt, "callReferenceValue", -1);
21519
21520 /* decode callType */
21521
21522 if (pvalue->m.callTypePresent) {
21523 invokeStartElement (pctxt, "callType", -1);
21524
21525 stat = asn1PD_H225CallType (pctxt, &pvalue->callType);
21526 if (stat != ASN_OK) return stat;
21527
21528 invokeEndElement (pctxt, "callType", -1);
21529 }
21530
21531 /* decode bandWidth */
21532
21533 invokeStartElement (pctxt, "bandWidth", -1);
21534
21535 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
21536 if (stat != ASN_OK) return stat;
21537
21538 invokeEndElement (pctxt, "bandWidth", -1);
21539
21540 /* decode nonStandardData */
21541
21542 if (pvalue->m.nonStandardDataPresent) {
21543 invokeStartElement (pctxt, "nonStandardData", -1);
21544
21545 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21546 if (stat != ASN_OK) return stat;
21547
21548 invokeEndElement (pctxt, "nonStandardData", -1);
21549 }
21550
21551 if (extbit) {
21552
21553 /* decode extension optional bits length */
21554
21555 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
21556 if (stat != ASN_OK) return stat;
21557
21558 bitcnt += 1;
21559
21560 ZEROCONTEXT (&lctxt);
21561 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
21562 if (stat != ASN_OK) return stat;
21563
21564 stat = moveBitCursor (pctxt, bitcnt);
21565 if (stat != ASN_OK) return stat;
21566
21567 for (i = 0; i < bitcnt; i++) {
21568 DECODEBIT (&lctxt, &optbit);
21569
21570 if (optbit) {
21571 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
21572 if (stat != ASN_OK) return stat;
21573
21574 if (i < 11 && openType.numocts > 0) { /* known element */
21575 copyContext (&lctxt2, pctxt);
21576 initContextBuffer (pctxt, openType.data, openType.numocts);
21577
21578 switch (i) {
21579 case 0:
21580 pvalue->m.callIdentifierPresent = 1;
21581
21582 invokeStartElement (pctxt, "callIdentifier", -1);
21583
21584 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
21585 if (stat != ASN_OK) return stat;
21586
21587 invokeEndElement (pctxt, "callIdentifier", -1);
21588 break;
21589
21590 case 1:
21591 pvalue->m.gatekeeperIdentifierPresent = 1;
21592
21593 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
21594
21595 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
21596 if (stat != ASN_OK) return stat;
21597
21598 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
21599 break;
21600
21601 case 2:
21602 pvalue->m.tokensPresent = 1;
21603
21604 invokeStartElement (pctxt, "tokens", -1);
21605
21606 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21607 if (stat != ASN_OK) return stat;
21608
21609 invokeEndElement (pctxt, "tokens", -1);
21610 break;
21611
21612 case 3:
21613 pvalue->m.cryptoTokensPresent = 1;
21614
21615 invokeStartElement (pctxt, "cryptoTokens", -1);
21616
21617 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21618 if (stat != ASN_OK) return stat;
21619
21620 invokeEndElement (pctxt, "cryptoTokens", -1);
21621 break;
21622
21623 case 4:
21624 pvalue->m.integrityCheckValuePresent = 1;
21625
21626 invokeStartElement (pctxt, "integrityCheckValue", -1);
21627
21628 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
21629 if (stat != ASN_OK) return stat;
21630
21631 invokeEndElement (pctxt, "integrityCheckValue", -1);
21632 break;
21633
21634 case 5:
21635 pvalue->m.answeredCallPresent = 1;
21636
21637 invokeStartElement (pctxt, "answeredCall", -1);
21638
21639 stat = DECODEBIT (pctxt, &pvalue->answeredCall);
21640 if (stat != ASN_OK) return stat;
21641 invokeBoolValue (pctxt, pvalue->answeredCall);
21642
21643 invokeEndElement (pctxt, "answeredCall", -1);
21644 break;
21645
21646 case 6:
21647 pvalue->m.callLinkagePresent = 1;
21648
21649 invokeStartElement (pctxt, "callLinkage", -1);
21650
21651 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
21652 if (stat != ASN_OK) return stat;
21653
21654 invokeEndElement (pctxt, "callLinkage", -1);
21655 break;
21656
21657 case 7:
21658 pvalue->m.capacityPresent = 1;
21659
21660 invokeStartElement (pctxt, "capacity", -1);
21661
21662 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
21663 if (stat != ASN_OK) return stat;
21664
21665 invokeEndElement (pctxt, "capacity", -1);
21666 break;
21667
21668 case 8:
21669 pvalue->m.usageInformationPresent = 1;
21670
21671 invokeStartElement (pctxt, "usageInformation", -1);
21672
21673 stat = asn1PD_H225RasUsageInformation (pctxt, &pvalue->usageInformation);
21674 if (stat != ASN_OK) return stat;
21675
21676 invokeEndElement (pctxt, "usageInformation", -1);
21677 break;
21678
21679 case 9:
21680 pvalue->m.bandwidthDetailsPresent = 1;
21681
21682 invokeStartElement (pctxt, "bandwidthDetails", -1);
21683
21684 stat = asn1PD_H225_SeqOfH225BandwidthDetails (pctxt, &pvalue->bandwidthDetails);
21685 if (stat != ASN_OK) return stat;
21686
21687 invokeEndElement (pctxt, "bandwidthDetails", -1);
21688 break;
21689
21690 case 10:
21691 pvalue->m.genericDataPresent = 1;
21692
21693 invokeStartElement (pctxt, "genericData", -1);
21694
21695 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
21696 if (stat != ASN_OK) return stat;
21697
21698 invokeEndElement (pctxt, "genericData", -1);
21699 break;
21700
21701 default:
21702 pctxt->buffer.byteIndex += openType.numocts;
21703 }
21704 copyContext (pctxt, &lctxt2);
21705 }
21706 else { /* unknown element */
21707 pctxt->buffer.byteIndex += openType.numocts;
21708 }
21709 }
21710 }
21711 }
21712
21713 return (stat);
21714 }
21715
21716 /**************************************************************/
21717 /* */
21718 /* BandwidthConfirm */
21719 /* */
21720 /**************************************************************/
21721
21722 EXTERN int asn1PD_H225BandwidthConfirm (OOCTXT* pctxt, H225BandwidthConfirm* pvalue)
21723 {
21724 int stat = ASN_OK;
21725 OOCTXT lctxt;
21726 OOCTXT lctxt2;
21727 ASN1OpenType openType;
21728 ASN1UINT bitcnt;
21729 ASN1UINT i;
21730 ASN1BOOL optbit = 0;
21731 ASN1BOOL extbit = 0;
21732
21733 /* extension bit */
21734
21735 DECODEBIT (pctxt, &extbit);
21736
21737 /* optional bits */
21738
21739 memset (&pvalue->m, 0, sizeof(pvalue->m));
21740
21741 DECODEBIT (pctxt, &optbit);
21742 pvalue->m.nonStandardDataPresent = optbit;
21743
21744 /* decode requestSeqNum */
21745
21746 invokeStartElement (pctxt, "requestSeqNum", -1);
21747
21748 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
21749 if (stat != ASN_OK) return stat;
21750
21751 invokeEndElement (pctxt, "requestSeqNum", -1);
21752
21753 /* decode bandWidth */
21754
21755 invokeStartElement (pctxt, "bandWidth", -1);
21756
21757 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
21758 if (stat != ASN_OK) return stat;
21759
21760 invokeEndElement (pctxt, "bandWidth", -1);
21761
21762 /* decode nonStandardData */
21763
21764 if (pvalue->m.nonStandardDataPresent) {
21765 invokeStartElement (pctxt, "nonStandardData", -1);
21766
21767 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21768 if (stat != ASN_OK) return stat;
21769
21770 invokeEndElement (pctxt, "nonStandardData", -1);
21771 }
21772
21773 if (extbit) {
21774
21775 /* decode extension optional bits length */
21776
21777 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
21778 if (stat != ASN_OK) return stat;
21779
21780 bitcnt += 1;
21781
21782 ZEROCONTEXT (&lctxt);
21783 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
21784 if (stat != ASN_OK) return stat;
21785
21786 stat = moveBitCursor (pctxt, bitcnt);
21787 if (stat != ASN_OK) return stat;
21788
21789 for (i = 0; i < bitcnt; i++) {
21790 DECODEBIT (&lctxt, &optbit);
21791
21792 if (optbit) {
21793 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
21794 if (stat != ASN_OK) return stat;
21795
21796 if (i < 5 && openType.numocts > 0) { /* known element */
21797 copyContext (&lctxt2, pctxt);
21798 initContextBuffer (pctxt, openType.data, openType.numocts);
21799
21800 switch (i) {
21801 case 0:
21802 pvalue->m.tokensPresent = 1;
21803
21804 invokeStartElement (pctxt, "tokens", -1);
21805
21806 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21807 if (stat != ASN_OK) return stat;
21808
21809 invokeEndElement (pctxt, "tokens", -1);
21810 break;
21811
21812 case 1:
21813 pvalue->m.cryptoTokensPresent = 1;
21814
21815 invokeStartElement (pctxt, "cryptoTokens", -1);
21816
21817 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21818 if (stat != ASN_OK) return stat;
21819
21820 invokeEndElement (pctxt, "cryptoTokens", -1);
21821 break;
21822
21823 case 2:
21824 pvalue->m.integrityCheckValuePresent = 1;
21825
21826 invokeStartElement (pctxt, "integrityCheckValue", -1);
21827
21828 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
21829 if (stat != ASN_OK) return stat;
21830
21831 invokeEndElement (pctxt, "integrityCheckValue", -1);
21832 break;
21833
21834 case 3:
21835 pvalue->m.capacityPresent = 1;
21836
21837 invokeStartElement (pctxt, "capacity", -1);
21838
21839 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
21840 if (stat != ASN_OK) return stat;
21841
21842 invokeEndElement (pctxt, "capacity", -1);
21843 break;
21844
21845 case 4:
21846 pvalue->m.genericDataPresent = 1;
21847
21848 invokeStartElement (pctxt, "genericData", -1);
21849
21850 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
21851 if (stat != ASN_OK) return stat;
21852
21853 invokeEndElement (pctxt, "genericData", -1);
21854 break;
21855
21856 default:
21857 pctxt->buffer.byteIndex += openType.numocts;
21858 }
21859 copyContext (pctxt, &lctxt2);
21860 }
21861 else { /* unknown element */
21862 pctxt->buffer.byteIndex += openType.numocts;
21863 }
21864 }
21865 }
21866 }
21867
21868 return (stat);
21869 }
21870
21871 /**************************************************************/
21872 /* */
21873 /* BandRejectReason */
21874 /* */
21875 /**************************************************************/
21876
21877 EXTERN int asn1PD_H225BandRejectReason (OOCTXT* pctxt, H225BandRejectReason* pvalue)
21878 {
21879 int stat = ASN_OK;
21880 ASN1UINT ui;
21881 ASN1OpenType openType;
21882 ASN1BOOL extbit = 0;
21883 OOCTXT lctxt;
21884
21885 /* extension bit */
21886
21887 DECODEBIT (pctxt, &extbit);
21888
21889 if (!extbit) {
21890 stat = decodeConsUnsigned (pctxt, &ui, 0, 5);
21891 if (stat != ASN_OK) return stat;
21892 else pvalue->t = ui + 1;
21893
21894 switch (ui) {
21895 /* notBound */
21896 case 0:
21897 invokeStartElement (pctxt, "notBound", -1);
21898
21899 /* NULL */
21900 invokeNullValue (pctxt);
21901
21902 invokeEndElement (pctxt, "notBound", -1);
21903
21904 break;
21905
21906 /* invalidConferenceID */
21907 case 1:
21908 invokeStartElement (pctxt, "invalidConferenceID", -1);
21909
21910 /* NULL */
21911 invokeNullValue (pctxt);
21912
21913 invokeEndElement (pctxt, "invalidConferenceID", -1);
21914
21915 break;
21916
21917 /* invalidPermission */
21918 case 2:
21919 invokeStartElement (pctxt, "invalidPermission", -1);
21920
21921 /* NULL */
21922 invokeNullValue (pctxt);
21923
21924 invokeEndElement (pctxt, "invalidPermission", -1);
21925
21926 break;
21927
21928 /* insufficientResources */
21929 case 3:
21930 invokeStartElement (pctxt, "insufficientResources", -1);
21931
21932 /* NULL */
21933 invokeNullValue (pctxt);
21934
21935 invokeEndElement (pctxt, "insufficientResources", -1);
21936
21937 break;
21938
21939 /* invalidRevision */
21940 case 4:
21941 invokeStartElement (pctxt, "invalidRevision", -1);
21942
21943 /* NULL */
21944 invokeNullValue (pctxt);
21945
21946 invokeEndElement (pctxt, "invalidRevision", -1);
21947
21948 break;
21949
21950 /* undefinedReason */
21951 case 5:
21952 invokeStartElement (pctxt, "undefinedReason", -1);
21953
21954 /* NULL */
21955 invokeNullValue (pctxt);
21956
21957 invokeEndElement (pctxt, "undefinedReason", -1);
21958
21959 break;
21960
21961 default:
21962 return ASN_E_INVOPT;
21963 }
21964 }
21965 else {
21966 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
21967 if (stat != ASN_OK) return stat;
21968 else pvalue->t = ui + 7;
21969
21970 stat = decodeByteAlign (pctxt);
21971 if (stat != ASN_OK) return stat;
21972
21973 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
21974 if (stat != ASN_OK) return stat;
21975
21976 copyContext (&lctxt, pctxt);
21977 initContextBuffer (pctxt, openType.data, openType.numocts);
21978
21979 switch (pvalue->t) {
21980 /* securityDenial */
21981 case 7:
21982 invokeStartElement (pctxt, "securityDenial", -1);
21983
21984 /* NULL */
21985 invokeNullValue (pctxt);
21986
21987 invokeEndElement (pctxt, "securityDenial", -1);
21988
21989 break;
21990
21991 /* securityError */
21992 case 8:
21993 invokeStartElement (pctxt, "securityError", -1);
21994
21995 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
21996
21997 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
21998 if (stat != ASN_OK) return stat;
21999
22000 invokeEndElement (pctxt, "securityError", -1);
22001
22002 break;
22003
22004 default:;
22005 }
22006
22007 copyContext (pctxt, &lctxt);
22008 }
22009
22010 return (stat);
22011 }
22012
22013 /**************************************************************/
22014 /* */
22015 /* BandwidthReject */
22016 /* */
22017 /**************************************************************/
22018
22019 EXTERN int asn1PD_H225BandwidthReject (OOCTXT* pctxt, H225BandwidthReject* pvalue)
22020 {
22021 int stat = ASN_OK;
22022 OOCTXT lctxt;
22023 OOCTXT lctxt2;
22024 ASN1OpenType openType;
22025 ASN1UINT bitcnt;
22026 ASN1UINT i;
22027 ASN1BOOL optbit = 0;
22028 ASN1BOOL extbit = 0;
22029
22030 /* extension bit */
22031
22032 DECODEBIT (pctxt, &extbit);
22033
22034 /* optional bits */
22035
22036 memset (&pvalue->m, 0, sizeof(pvalue->m));
22037
22038 DECODEBIT (pctxt, &optbit);
22039 pvalue->m.nonStandardDataPresent = optbit;
22040
22041 /* decode requestSeqNum */
22042
22043 invokeStartElement (pctxt, "requestSeqNum", -1);
22044
22045 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
22046 if (stat != ASN_OK) return stat;
22047
22048 invokeEndElement (pctxt, "requestSeqNum", -1);
22049
22050 /* decode rejectReason */
22051
22052 invokeStartElement (pctxt, "rejectReason", -1);
22053
22054 stat = asn1PD_H225BandRejectReason (pctxt, &pvalue->rejectReason);
22055 if (stat != ASN_OK) return stat;
22056
22057 invokeEndElement (pctxt, "rejectReason", -1);
22058
22059 /* decode allowedBandWidth */
22060
22061 invokeStartElement (pctxt, "allowedBandWidth", -1);
22062
22063 stat = asn1PD_H225BandWidth (pctxt, &pvalue->allowedBandWidth);
22064 if (stat != ASN_OK) return stat;
22065
22066 invokeEndElement (pctxt, "allowedBandWidth", -1);
22067
22068 /* decode nonStandardData */
22069
22070 if (pvalue->m.nonStandardDataPresent) {
22071 invokeStartElement (pctxt, "nonStandardData", -1);
22072
22073 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22074 if (stat != ASN_OK) return stat;
22075
22076 invokeEndElement (pctxt, "nonStandardData", -1);
22077 }
22078
22079 if (extbit) {
22080
22081 /* decode extension optional bits length */
22082
22083 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
22084 if (stat != ASN_OK) return stat;
22085
22086 bitcnt += 1;
22087
22088 ZEROCONTEXT (&lctxt);
22089 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
22090 if (stat != ASN_OK) return stat;
22091
22092 stat = moveBitCursor (pctxt, bitcnt);
22093 if (stat != ASN_OK) return stat;
22094
22095 for (i = 0; i < bitcnt; i++) {
22096 DECODEBIT (&lctxt, &optbit);
22097
22098 if (optbit) {
22099 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22100 if (stat != ASN_OK) return stat;
22101
22102 if (i < 5 && openType.numocts > 0) { /* known element */
22103 copyContext (&lctxt2, pctxt);
22104 initContextBuffer (pctxt, openType.data, openType.numocts);
22105
22106 switch (i) {
22107 case 0:
22108 pvalue->m.altGKInfoPresent = 1;
22109
22110 invokeStartElement (pctxt, "altGKInfo", -1);
22111
22112 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
22113 if (stat != ASN_OK) return stat;
22114
22115 invokeEndElement (pctxt, "altGKInfo", -1);
22116 break;
22117
22118 case 1:
22119 pvalue->m.tokensPresent = 1;
22120
22121 invokeStartElement (pctxt, "tokens", -1);
22122
22123 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22124 if (stat != ASN_OK) return stat;
22125
22126 invokeEndElement (pctxt, "tokens", -1);
22127 break;
22128
22129 case 2:
22130 pvalue->m.cryptoTokensPresent = 1;
22131
22132 invokeStartElement (pctxt, "cryptoTokens", -1);
22133
22134 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22135 if (stat != ASN_OK) return stat;
22136
22137 invokeEndElement (pctxt, "cryptoTokens", -1);
22138 break;
22139
22140 case 3:
22141 pvalue->m.integrityCheckValuePresent = 1;
22142
22143 invokeStartElement (pctxt, "integrityCheckValue", -1);
22144
22145 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
22146 if (stat != ASN_OK) return stat;
22147
22148 invokeEndElement (pctxt, "integrityCheckValue", -1);
22149 break;
22150
22151 case 4:
22152 pvalue->m.genericDataPresent = 1;
22153
22154 invokeStartElement (pctxt, "genericData", -1);
22155
22156 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22157 if (stat != ASN_OK) return stat;
22158
22159 invokeEndElement (pctxt, "genericData", -1);
22160 break;
22161
22162 default:
22163 pctxt->buffer.byteIndex += openType.numocts;
22164 }
22165 copyContext (pctxt, &lctxt2);
22166 }
22167 else { /* unknown element */
22168 pctxt->buffer.byteIndex += openType.numocts;
22169 }
22170 }
22171 }
22172 }
22173
22174 return (stat);
22175 }
22176
22177 /**************************************************************/
22178 /* */
22179 /* DisengageReason */
22180 /* */
22181 /**************************************************************/
22182
22183 EXTERN int asn1PD_H225DisengageReason (OOCTXT* pctxt, H225DisengageReason* pvalue)
22184 {
22185 int stat = ASN_OK;
22186 ASN1UINT ui;
22187 ASN1OpenType openType;
22188 ASN1BOOL extbit = 0;
22189
22190 /* extension bit */
22191
22192 DECODEBIT (pctxt, &extbit);
22193
22194 if (!extbit) {
22195 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
22196 if (stat != ASN_OK) return stat;
22197 else pvalue->t = ui + 1;
22198
22199 switch (ui) {
22200 /* forcedDrop */
22201 case 0:
22202 invokeStartElement (pctxt, "forcedDrop", -1);
22203
22204 /* NULL */
22205 invokeNullValue (pctxt);
22206
22207 invokeEndElement (pctxt, "forcedDrop", -1);
22208
22209 break;
22210
22211 /* normalDrop */
22212 case 1:
22213 invokeStartElement (pctxt, "normalDrop", -1);
22214
22215 /* NULL */
22216 invokeNullValue (pctxt);
22217
22218 invokeEndElement (pctxt, "normalDrop", -1);
22219
22220 break;
22221
22222 /* undefinedReason */
22223 case 2:
22224 invokeStartElement (pctxt, "undefinedReason", -1);
22225
22226 /* NULL */
22227 invokeNullValue (pctxt);
22228
22229 invokeEndElement (pctxt, "undefinedReason", -1);
22230
22231 break;
22232
22233 default:
22234 return ASN_E_INVOPT;
22235 }
22236 }
22237 else {
22238 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
22239 if (stat != ASN_OK) return stat;
22240 else pvalue->t = ui + 4;
22241
22242 stat = decodeByteAlign (pctxt);
22243 if (stat != ASN_OK) return stat;
22244
22245 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22246 if (stat != ASN_OK) return stat;
22247
22248 }
22249
22250 return (stat);
22251 }
22252
22253 /**************************************************************/
22254 /* */
22255 /* DisengageRequest */
22256 /* */
22257 /**************************************************************/
22258
22259 EXTERN int asn1PD_H225DisengageRequest (OOCTXT* pctxt, H225DisengageRequest* pvalue)
22260 {
22261 int stat = ASN_OK;
22262 OOCTXT lctxt;
22263 OOCTXT lctxt2;
22264 ASN1OpenType openType;
22265 ASN1UINT bitcnt;
22266 ASN1UINT i;
22267 ASN1BOOL optbit = 0;
22268 ASN1BOOL extbit = 0;
22269
22270 /* extension bit */
22271
22272 DECODEBIT (pctxt, &extbit);
22273
22274 /* optional bits */
22275
22276 memset (&pvalue->m, 0, sizeof(pvalue->m));
22277
22278 DECODEBIT (pctxt, &optbit);
22279 pvalue->m.nonStandardDataPresent = optbit;
22280
22281 /* decode requestSeqNum */
22282
22283 invokeStartElement (pctxt, "requestSeqNum", -1);
22284
22285 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
22286 if (stat != ASN_OK) return stat;
22287
22288 invokeEndElement (pctxt, "requestSeqNum", -1);
22289
22290 /* decode endpointIdentifier */
22291
22292 invokeStartElement (pctxt, "endpointIdentifier", -1);
22293
22294 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
22295 if (stat != ASN_OK) return stat;
22296
22297 invokeEndElement (pctxt, "endpointIdentifier", -1);
22298
22299 /* decode conferenceID */
22300
22301 invokeStartElement (pctxt, "conferenceID", -1);
22302
22303 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
22304 if (stat != ASN_OK) return stat;
22305
22306 invokeEndElement (pctxt, "conferenceID", -1);
22307
22308 /* decode callReferenceValue */
22309
22310 invokeStartElement (pctxt, "callReferenceValue", -1);
22311
22312 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->callReferenceValue);
22313 if (stat != ASN_OK) return stat;
22314
22315 invokeEndElement (pctxt, "callReferenceValue", -1);
22316
22317 /* decode disengageReason */
22318
22319 invokeStartElement (pctxt, "disengageReason", -1);
22320
22321 stat = asn1PD_H225DisengageReason (pctxt, &pvalue->disengageReason);
22322 if (stat != ASN_OK) return stat;
22323
22324 invokeEndElement (pctxt, "disengageReason", -1);
22325
22326 /* decode nonStandardData */
22327
22328 if (pvalue->m.nonStandardDataPresent) {
22329 invokeStartElement (pctxt, "nonStandardData", -1);
22330
22331 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22332 if (stat != ASN_OK) return stat;
22333
22334 invokeEndElement (pctxt, "nonStandardData", -1);
22335 }
22336
22337 if (extbit) {
22338
22339 /* decode extension optional bits length */
22340
22341 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
22342 if (stat != ASN_OK) return stat;
22343
22344 bitcnt += 1;
22345
22346 ZEROCONTEXT (&lctxt);
22347 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
22348 if (stat != ASN_OK) return stat;
22349
22350 stat = moveBitCursor (pctxt, bitcnt);
22351 if (stat != ASN_OK) return stat;
22352
22353 for (i = 0; i < bitcnt; i++) {
22354 DECODEBIT (&lctxt, &optbit);
22355
22356 if (optbit) {
22357 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22358 if (stat != ASN_OK) return stat;
22359
22360 if (i < 13 && openType.numocts > 0) { /* known element */
22361 copyContext (&lctxt2, pctxt);
22362 initContextBuffer (pctxt, openType.data, openType.numocts);
22363
22364 switch (i) {
22365 case 0:
22366 pvalue->m.callIdentifierPresent = 1;
22367
22368 invokeStartElement (pctxt, "callIdentifier", -1);
22369
22370 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
22371 if (stat != ASN_OK) return stat;
22372
22373 invokeEndElement (pctxt, "callIdentifier", -1);
22374 break;
22375
22376 case 1:
22377 pvalue->m.gatekeeperIdentifierPresent = 1;
22378
22379 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
22380
22381 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
22382 if (stat != ASN_OK) return stat;
22383
22384 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
22385 break;
22386
22387 case 2:
22388 pvalue->m.tokensPresent = 1;
22389
22390 invokeStartElement (pctxt, "tokens", -1);
22391
22392 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22393 if (stat != ASN_OK) return stat;
22394
22395 invokeEndElement (pctxt, "tokens", -1);
22396 break;
22397
22398 case 3:
22399 pvalue->m.cryptoTokensPresent = 1;
22400
22401 invokeStartElement (pctxt, "cryptoTokens", -1);
22402
22403 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22404 if (stat != ASN_OK) return stat;
22405
22406 invokeEndElement (pctxt, "cryptoTokens", -1);
22407 break;
22408
22409 case 4:
22410 pvalue->m.integrityCheckValuePresent = 1;
22411
22412 invokeStartElement (pctxt, "integrityCheckValue", -1);
22413
22414 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
22415 if (stat != ASN_OK) return stat;
22416
22417 invokeEndElement (pctxt, "integrityCheckValue", -1);
22418 break;
22419
22420 case 5:
22421 pvalue->m.answeredCallPresent = 1;
22422
22423 invokeStartElement (pctxt, "answeredCall", -1);
22424
22425 stat = DECODEBIT (pctxt, &pvalue->answeredCall);
22426 if (stat != ASN_OK) return stat;
22427 invokeBoolValue (pctxt, pvalue->answeredCall);
22428
22429 invokeEndElement (pctxt, "answeredCall", -1);
22430 break;
22431
22432 case 6:
22433 pvalue->m.callLinkagePresent = 1;
22434
22435 invokeStartElement (pctxt, "callLinkage", -1);
22436
22437 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
22438 if (stat != ASN_OK) return stat;
22439
22440 invokeEndElement (pctxt, "callLinkage", -1);
22441 break;
22442
22443 case 7:
22444 pvalue->m.capacityPresent = 1;
22445
22446 invokeStartElement (pctxt, "capacity", -1);
22447
22448 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
22449 if (stat != ASN_OK) return stat;
22450
22451 invokeEndElement (pctxt, "capacity", -1);
22452 break;
22453
22454 case 8:
22455 pvalue->m.circuitInfoPresent = 1;
22456
22457 invokeStartElement (pctxt, "circuitInfo", -1);
22458
22459 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
22460 if (stat != ASN_OK) return stat;
22461
22462 invokeEndElement (pctxt, "circuitInfo", -1);
22463 break;
22464
22465 case 9:
22466 pvalue->m.usageInformationPresent = 1;
22467
22468 invokeStartElement (pctxt, "usageInformation", -1);
22469
22470 stat = asn1PD_H225RasUsageInformation (pctxt, &pvalue->usageInformation);
22471 if (stat != ASN_OK) return stat;
22472
22473 invokeEndElement (pctxt, "usageInformation", -1);
22474 break;
22475
22476 case 10:
22477 pvalue->m.terminationCausePresent = 1;
22478
22479 invokeStartElement (pctxt, "terminationCause", -1);
22480
22481 stat = asn1PD_H225CallTerminationCause (pctxt, &pvalue->terminationCause);
22482 if (stat != ASN_OK) return stat;
22483
22484 invokeEndElement (pctxt, "terminationCause", -1);
22485 break;
22486
22487 case 11:
22488 pvalue->m.serviceControlPresent = 1;
22489
22490 invokeStartElement (pctxt, "serviceControl", -1);
22491
22492 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
22493 if (stat != ASN_OK) return stat;
22494
22495 invokeEndElement (pctxt, "serviceControl", -1);
22496 break;
22497
22498 case 12:
22499 pvalue->m.genericDataPresent = 1;
22500
22501 invokeStartElement (pctxt, "genericData", -1);
22502
22503 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22504 if (stat != ASN_OK) return stat;
22505
22506 invokeEndElement (pctxt, "genericData", -1);
22507 break;
22508
22509 default:
22510 pctxt->buffer.byteIndex += openType.numocts;
22511 }
22512 copyContext (pctxt, &lctxt2);
22513 }
22514 else { /* unknown element */
22515 pctxt->buffer.byteIndex += openType.numocts;
22516 }
22517 }
22518 }
22519 }
22520
22521 return (stat);
22522 }
22523
22524 /**************************************************************/
22525 /* */
22526 /* DisengageConfirm */
22527 /* */
22528 /**************************************************************/
22529
22530 EXTERN int asn1PD_H225DisengageConfirm (OOCTXT* pctxt, H225DisengageConfirm* pvalue)
22531 {
22532 int stat = ASN_OK;
22533 OOCTXT lctxt;
22534 OOCTXT lctxt2;
22535 ASN1OpenType openType;
22536 ASN1UINT bitcnt;
22537 ASN1UINT i;
22538 ASN1BOOL optbit = 0;
22539 ASN1BOOL extbit = 0;
22540
22541 /* extension bit */
22542
22543 DECODEBIT (pctxt, &extbit);
22544
22545 /* optional bits */
22546
22547 memset (&pvalue->m, 0, sizeof(pvalue->m));
22548
22549 DECODEBIT (pctxt, &optbit);
22550 pvalue->m.nonStandardDataPresent = optbit;
22551
22552 /* decode requestSeqNum */
22553
22554 invokeStartElement (pctxt, "requestSeqNum", -1);
22555
22556 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
22557 if (stat != ASN_OK) return stat;
22558
22559 invokeEndElement (pctxt, "requestSeqNum", -1);
22560
22561 /* decode nonStandardData */
22562
22563 if (pvalue->m.nonStandardDataPresent) {
22564 invokeStartElement (pctxt, "nonStandardData", -1);
22565
22566 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22567 if (stat != ASN_OK) return stat;
22568
22569 invokeEndElement (pctxt, "nonStandardData", -1);
22570 }
22571
22572 if (extbit) {
22573
22574 /* decode extension optional bits length */
22575
22576 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
22577 if (stat != ASN_OK) return stat;
22578
22579 bitcnt += 1;
22580
22581 ZEROCONTEXT (&lctxt);
22582 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
22583 if (stat != ASN_OK) return stat;
22584
22585 stat = moveBitCursor (pctxt, bitcnt);
22586 if (stat != ASN_OK) return stat;
22587
22588 for (i = 0; i < bitcnt; i++) {
22589 DECODEBIT (&lctxt, &optbit);
22590
22591 if (optbit) {
22592 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22593 if (stat != ASN_OK) return stat;
22594
22595 if (i < 7 && openType.numocts > 0) { /* known element */
22596 copyContext (&lctxt2, pctxt);
22597 initContextBuffer (pctxt, openType.data, openType.numocts);
22598
22599 switch (i) {
22600 case 0:
22601 pvalue->m.tokensPresent = 1;
22602
22603 invokeStartElement (pctxt, "tokens", -1);
22604
22605 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22606 if (stat != ASN_OK) return stat;
22607
22608 invokeEndElement (pctxt, "tokens", -1);
22609 break;
22610
22611 case 1:
22612 pvalue->m.cryptoTokensPresent = 1;
22613
22614 invokeStartElement (pctxt, "cryptoTokens", -1);
22615
22616 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22617 if (stat != ASN_OK) return stat;
22618
22619 invokeEndElement (pctxt, "cryptoTokens", -1);
22620 break;
22621
22622 case 2:
22623 pvalue->m.integrityCheckValuePresent = 1;
22624
22625 invokeStartElement (pctxt, "integrityCheckValue", -1);
22626
22627 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
22628 if (stat != ASN_OK) return stat;
22629
22630 invokeEndElement (pctxt, "integrityCheckValue", -1);
22631 break;
22632
22633 case 3:
22634 pvalue->m.capacityPresent = 1;
22635
22636 invokeStartElement (pctxt, "capacity", -1);
22637
22638 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
22639 if (stat != ASN_OK) return stat;
22640
22641 invokeEndElement (pctxt, "capacity", -1);
22642 break;
22643
22644 case 4:
22645 pvalue->m.circuitInfoPresent = 1;
22646
22647 invokeStartElement (pctxt, "circuitInfo", -1);
22648
22649 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
22650 if (stat != ASN_OK) return stat;
22651
22652 invokeEndElement (pctxt, "circuitInfo", -1);
22653 break;
22654
22655 case 5:
22656 pvalue->m.usageInformationPresent = 1;
22657
22658 invokeStartElement (pctxt, "usageInformation", -1);
22659
22660 stat = asn1PD_H225RasUsageInformation (pctxt, &pvalue->usageInformation);
22661 if (stat != ASN_OK) return stat;
22662
22663 invokeEndElement (pctxt, "usageInformation", -1);
22664 break;
22665
22666 case 6:
22667 pvalue->m.genericDataPresent = 1;
22668
22669 invokeStartElement (pctxt, "genericData", -1);
22670
22671 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22672 if (stat != ASN_OK) return stat;
22673
22674 invokeEndElement (pctxt, "genericData", -1);
22675 break;
22676
22677 default:
22678 pctxt->buffer.byteIndex += openType.numocts;
22679 }
22680 copyContext (pctxt, &lctxt2);
22681 }
22682 else { /* unknown element */
22683 pctxt->buffer.byteIndex += openType.numocts;
22684 }
22685 }
22686 }
22687 }
22688
22689 return (stat);
22690 }
22691
22692 /**************************************************************/
22693 /* */
22694 /* DisengageRejectReason */
22695 /* */
22696 /**************************************************************/
22697
22698 EXTERN int asn1PD_H225DisengageRejectReason (OOCTXT* pctxt, H225DisengageRejectReason* pvalue)
22699 {
22700 int stat = ASN_OK;
22701 ASN1UINT ui;
22702 ASN1OpenType openType;
22703 ASN1BOOL extbit = 0;
22704 OOCTXT lctxt;
22705
22706 /* extension bit */
22707
22708 DECODEBIT (pctxt, &extbit);
22709
22710 if (!extbit) {
22711 stat = decodeConsUnsigned (pctxt, &ui, 0, 1);
22712 if (stat != ASN_OK) return stat;
22713 else pvalue->t = ui + 1;
22714
22715 switch (ui) {
22716 /* notRegistered */
22717 case 0:
22718 invokeStartElement (pctxt, "notRegistered", -1);
22719
22720 /* NULL */
22721 invokeNullValue (pctxt);
22722
22723 invokeEndElement (pctxt, "notRegistered", -1);
22724
22725 break;
22726
22727 /* requestToDropOther */
22728 case 1:
22729 invokeStartElement (pctxt, "requestToDropOther", -1);
22730
22731 /* NULL */
22732 invokeNullValue (pctxt);
22733
22734 invokeEndElement (pctxt, "requestToDropOther", -1);
22735
22736 break;
22737
22738 default:
22739 return ASN_E_INVOPT;
22740 }
22741 }
22742 else {
22743 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
22744 if (stat != ASN_OK) return stat;
22745 else pvalue->t = ui + 3;
22746
22747 stat = decodeByteAlign (pctxt);
22748 if (stat != ASN_OK) return stat;
22749
22750 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22751 if (stat != ASN_OK) return stat;
22752
22753 copyContext (&lctxt, pctxt);
22754 initContextBuffer (pctxt, openType.data, openType.numocts);
22755
22756 switch (pvalue->t) {
22757 /* securityDenial */
22758 case 3:
22759 invokeStartElement (pctxt, "securityDenial", -1);
22760
22761 /* NULL */
22762 invokeNullValue (pctxt);
22763
22764 invokeEndElement (pctxt, "securityDenial", -1);
22765
22766 break;
22767
22768 /* securityError */
22769 case 4:
22770 invokeStartElement (pctxt, "securityError", -1);
22771
22772 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
22773
22774 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
22775 if (stat != ASN_OK) return stat;
22776
22777 invokeEndElement (pctxt, "securityError", -1);
22778
22779 break;
22780
22781 default:;
22782 }
22783
22784 copyContext (pctxt, &lctxt);
22785 }
22786
22787 return (stat);
22788 }
22789
22790 /**************************************************************/
22791 /* */
22792 /* DisengageReject */
22793 /* */
22794 /**************************************************************/
22795
22796 EXTERN int asn1PD_H225DisengageReject (OOCTXT* pctxt, H225DisengageReject* pvalue)
22797 {
22798 int stat = ASN_OK;
22799 OOCTXT lctxt;
22800 OOCTXT lctxt2;
22801 ASN1OpenType openType;
22802 ASN1UINT bitcnt;
22803 ASN1UINT i;
22804 ASN1BOOL optbit = 0;
22805 ASN1BOOL extbit = 0;
22806
22807 /* extension bit */
22808
22809 DECODEBIT (pctxt, &extbit);
22810
22811 /* optional bits */
22812
22813 memset (&pvalue->m, 0, sizeof(pvalue->m));
22814
22815 DECODEBIT (pctxt, &optbit);
22816 pvalue->m.nonStandardDataPresent = optbit;
22817
22818 /* decode requestSeqNum */
22819
22820 invokeStartElement (pctxt, "requestSeqNum", -1);
22821
22822 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
22823 if (stat != ASN_OK) return stat;
22824
22825 invokeEndElement (pctxt, "requestSeqNum", -1);
22826
22827 /* decode rejectReason */
22828
22829 invokeStartElement (pctxt, "rejectReason", -1);
22830
22831 stat = asn1PD_H225DisengageRejectReason (pctxt, &pvalue->rejectReason);
22832 if (stat != ASN_OK) return stat;
22833
22834 invokeEndElement (pctxt, "rejectReason", -1);
22835
22836 /* decode nonStandardData */
22837
22838 if (pvalue->m.nonStandardDataPresent) {
22839 invokeStartElement (pctxt, "nonStandardData", -1);
22840
22841 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22842 if (stat != ASN_OK) return stat;
22843
22844 invokeEndElement (pctxt, "nonStandardData", -1);
22845 }
22846
22847 if (extbit) {
22848
22849 /* decode extension optional bits length */
22850
22851 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
22852 if (stat != ASN_OK) return stat;
22853
22854 bitcnt += 1;
22855
22856 ZEROCONTEXT (&lctxt);
22857 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
22858 if (stat != ASN_OK) return stat;
22859
22860 stat = moveBitCursor (pctxt, bitcnt);
22861 if (stat != ASN_OK) return stat;
22862
22863 for (i = 0; i < bitcnt; i++) {
22864 DECODEBIT (&lctxt, &optbit);
22865
22866 if (optbit) {
22867 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
22868 if (stat != ASN_OK) return stat;
22869
22870 if (i < 5 && openType.numocts > 0) { /* known element */
22871 copyContext (&lctxt2, pctxt);
22872 initContextBuffer (pctxt, openType.data, openType.numocts);
22873
22874 switch (i) {
22875 case 0:
22876 pvalue->m.altGKInfoPresent = 1;
22877
22878 invokeStartElement (pctxt, "altGKInfo", -1);
22879
22880 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
22881 if (stat != ASN_OK) return stat;
22882
22883 invokeEndElement (pctxt, "altGKInfo", -1);
22884 break;
22885
22886 case 1:
22887 pvalue->m.tokensPresent = 1;
22888
22889 invokeStartElement (pctxt, "tokens", -1);
22890
22891 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22892 if (stat != ASN_OK) return stat;
22893
22894 invokeEndElement (pctxt, "tokens", -1);
22895 break;
22896
22897 case 2:
22898 pvalue->m.cryptoTokensPresent = 1;
22899
22900 invokeStartElement (pctxt, "cryptoTokens", -1);
22901
22902 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22903 if (stat != ASN_OK) return stat;
22904
22905 invokeEndElement (pctxt, "cryptoTokens", -1);
22906 break;
22907
22908 case 3:
22909 pvalue->m.integrityCheckValuePresent = 1;
22910
22911 invokeStartElement (pctxt, "integrityCheckValue", -1);
22912
22913 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
22914 if (stat != ASN_OK) return stat;
22915
22916 invokeEndElement (pctxt, "integrityCheckValue", -1);
22917 break;
22918
22919 case 4:
22920 pvalue->m.genericDataPresent = 1;
22921
22922 invokeStartElement (pctxt, "genericData", -1);
22923
22924 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22925 if (stat != ASN_OK) return stat;
22926
22927 invokeEndElement (pctxt, "genericData", -1);
22928 break;
22929
22930 default:
22931 pctxt->buffer.byteIndex += openType.numocts;
22932 }
22933 copyContext (pctxt, &lctxt2);
22934 }
22935 else { /* unknown element */
22936 pctxt->buffer.byteIndex += openType.numocts;
22937 }
22938 }
22939 }
22940 }
22941
22942 return (stat);
22943 }
22944
22945 /**************************************************************/
22946 /* */
22947 /* LocationRequest */
22948 /* */
22949 /**************************************************************/
22950
22951 EXTERN int asn1PD_H225LocationRequest (OOCTXT* pctxt, H225LocationRequest* pvalue)
22952 {
22953 int stat = ASN_OK;
22954 OOCTXT lctxt;
22955 OOCTXT lctxt2;
22956 ASN1OpenType openType;
22957 ASN1UINT bitcnt;
22958 ASN1UINT i;
22959 ASN1BOOL optbit = 0;
22960 ASN1BOOL extbit = 0;
22961
22962 /* extension bit */
22963
22964 DECODEBIT (pctxt, &extbit);
22965
22966 /* optional bits */
22967
22968 memset (&pvalue->m, 0, sizeof(pvalue->m));
22969
22970 DECODEBIT (pctxt, &optbit);
22971 pvalue->m.endpointIdentifierPresent = optbit;
22972
22973 DECODEBIT (pctxt, &optbit);
22974 pvalue->m.nonStandardDataPresent = optbit;
22975
22976 /* decode requestSeqNum */
22977
22978 invokeStartElement (pctxt, "requestSeqNum", -1);
22979
22980 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
22981 if (stat != ASN_OK) return stat;
22982
22983 invokeEndElement (pctxt, "requestSeqNum", -1);
22984
22985 /* decode endpointIdentifier */
22986
22987 if (pvalue->m.endpointIdentifierPresent) {
22988 invokeStartElement (pctxt, "endpointIdentifier", -1);
22989
22990 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
22991 if (stat != ASN_OK) return stat;
22992
22993 invokeEndElement (pctxt, "endpointIdentifier", -1);
22994 }
22995
22996 /* decode destinationInfo */
22997
22998 invokeStartElement (pctxt, "destinationInfo", -1);
22999
23000 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
23001 if (stat != ASN_OK) return stat;
23002
23003 invokeEndElement (pctxt, "destinationInfo", -1);
23004
23005 /* decode nonStandardData */
23006
23007 if (pvalue->m.nonStandardDataPresent) {
23008 invokeStartElement (pctxt, "nonStandardData", -1);
23009
23010 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
23011 if (stat != ASN_OK) return stat;
23012
23013 invokeEndElement (pctxt, "nonStandardData", -1);
23014 }
23015
23016 /* decode replyAddress */
23017
23018 invokeStartElement (pctxt, "replyAddress", -1);
23019
23020 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->replyAddress);
23021 if (stat != ASN_OK) return stat;
23022
23023 invokeEndElement (pctxt, "replyAddress", -1);
23024
23025 if (extbit) {
23026
23027 /* decode extension optional bits length */
23028
23029 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
23030 if (stat != ASN_OK) return stat;
23031
23032 bitcnt += 1;
23033
23034 ZEROCONTEXT (&lctxt);
23035 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
23036 if (stat != ASN_OK) return stat;
23037
23038 stat = moveBitCursor (pctxt, bitcnt);
23039 if (stat != ASN_OK) return stat;
23040
23041 for (i = 0; i < bitcnt; i++) {
23042 DECODEBIT (&lctxt, &optbit);
23043
23044 if (optbit) {
23045 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
23046 if (stat != ASN_OK) return stat;
23047
23048 if (i < 16 && openType.numocts > 0) { /* known element */
23049 copyContext (&lctxt2, pctxt);
23050 initContextBuffer (pctxt, openType.data, openType.numocts);
23051
23052 switch (i) {
23053 case 0:
23054 pvalue->m.sourceInfoPresent = 1;
23055
23056 invokeStartElement (pctxt, "sourceInfo", -1);
23057
23058 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->sourceInfo);
23059 if (stat != ASN_OK) return stat;
23060
23061 invokeEndElement (pctxt, "sourceInfo", -1);
23062 break;
23063
23064 case 1:
23065 pvalue->m.canMapAliasPresent = 1;
23066
23067 invokeStartElement (pctxt, "canMapAlias", -1);
23068
23069 stat = DECODEBIT (pctxt, &pvalue->canMapAlias);
23070 if (stat != ASN_OK) return stat;
23071 invokeBoolValue (pctxt, pvalue->canMapAlias);
23072
23073 invokeEndElement (pctxt, "canMapAlias", -1);
23074 break;
23075
23076 case 2:
23077 pvalue->m.gatekeeperIdentifierPresent = 1;
23078
23079 invokeStartElement (pctxt, "gatekeeperIdentifier", -1);
23080
23081 stat = asn1PD_H225GatekeeperIdentifier (pctxt, &pvalue->gatekeeperIdentifier);
23082 if (stat != ASN_OK) return stat;
23083
23084 invokeEndElement (pctxt, "gatekeeperIdentifier", -1);
23085 break;
23086
23087 case 3:
23088 pvalue->m.tokensPresent = 1;
23089
23090 invokeStartElement (pctxt, "tokens", -1);
23091
23092 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
23093 if (stat != ASN_OK) return stat;
23094
23095 invokeEndElement (pctxt, "tokens", -1);
23096 break;
23097
23098 case 4:
23099 pvalue->m.cryptoTokensPresent = 1;
23100
23101 invokeStartElement (pctxt, "cryptoTokens", -1);
23102
23103 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
23104 if (stat != ASN_OK) return stat;
23105
23106 invokeEndElement (pctxt, "cryptoTokens", -1);
23107 break;
23108
23109 case 5:
23110 pvalue->m.integrityCheckValuePresent = 1;
23111
23112 invokeStartElement (pctxt, "integrityCheckValue", -1);
23113
23114 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
23115 if (stat != ASN_OK) return stat;
23116
23117 invokeEndElement (pctxt, "integrityCheckValue", -1);
23118 break;
23119
23120 case 6:
23121 pvalue->m.desiredProtocolsPresent = 1;
23122
23123 invokeStartElement (pctxt, "desiredProtocols", -1);
23124
23125 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->desiredProtocols);
23126 if (stat != ASN_OK) return stat;
23127
23128 invokeEndElement (pctxt, "desiredProtocols", -1);
23129 break;
23130
23131 case 7:
23132 pvalue->m.desiredTunnelledProtocolPresent = 1;
23133
23134 invokeStartElement (pctxt, "desiredTunnelledProtocol", -1);
23135
23136 stat = asn1PD_H225TunnelledProtocol (pctxt, &pvalue->desiredTunnelledProtocol);
23137 if (stat != ASN_OK) return stat;
23138
23139 invokeEndElement (pctxt, "desiredTunnelledProtocol", -1);
23140 break;
23141
23142 case 8:
23143 pvalue->m.featureSetPresent = 1;
23144
23145 invokeStartElement (pctxt, "featureSet", -1);
23146
23147 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
23148 if (stat != ASN_OK) return stat;
23149
23150 invokeEndElement (pctxt, "featureSet", -1);
23151 break;
23152
23153 case 9:
23154 pvalue->m.genericDataPresent = 1;
23155
23156 invokeStartElement (pctxt, "genericData", -1);
23157
23158 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
23159 if (stat != ASN_OK) return stat;
23160
23161 invokeEndElement (pctxt, "genericData", -1);
23162 break;
23163
23164 case 10:
23165 pvalue->m.hopCountPresent = 1;
23166
23167 invokeStartElement (pctxt, "hopCount", -1);
23168
23169 stat = decodeConsUInt8 (pctxt, &pvalue->hopCount, 1U, 255U);
23170 if (stat != ASN_OK) return stat;
23171 invokeUIntValue (pctxt, pvalue->hopCount);
23172
23173 invokeEndElement (pctxt, "hopCount", -1);
23174 break;
23175
23176 case 11:
23177 pvalue->m.circuitInfoPresent = 1;
23178
23179 invokeStartElement (pctxt, "circuitInfo", -1);
23180
23181 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
23182 if (stat != ASN_OK) return stat;
23183
23184 invokeEndElement (pctxt, "circuitInfo", -1);
23185 break;
23186
23187 case 12:
23188 pvalue->m.callIdentifierPresent = 1;
23189
23190 invokeStartElement (pctxt, "callIdentifier", -1);
23191
23192 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
23193 if (stat != ASN_OK) return stat;
23194
23195 invokeEndElement (pctxt, "callIdentifier", -1);
23196 break;
23197
23198 case 13:
23199 pvalue->m.bandWidthPresent = 1;
23200
23201 invokeStartElement (pctxt, "bandWidth", -1);
23202
23203 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
23204 if (stat != ASN_OK) return stat;
23205
23206 invokeEndElement (pctxt, "bandWidth", -1);
23207 break;
23208
23209 case 14:
23210 pvalue->m.sourceEndpointInfoPresent = 1;
23211
23212 invokeStartElement (pctxt, "sourceEndpointInfo", -1);
23213
23214 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->sourceEndpointInfo);
23215 if (stat != ASN_OK) return stat;
23216
23217 invokeEndElement (pctxt, "sourceEndpointInfo", -1);
23218 break;
23219
23220 case 15:
23221 pvalue->m.canMapSrcAliasPresent = 1;
23222
23223 invokeStartElement (pctxt, "canMapSrcAlias", -1);
23224
23225 stat = DECODEBIT (pctxt, &pvalue->canMapSrcAlias);
23226 if (stat != ASN_OK) return stat;
23227 invokeBoolValue (pctxt, pvalue->canMapSrcAlias);
23228
23229 invokeEndElement (pctxt, "canMapSrcAlias", -1);
23230 break;
23231
23232 default:
23233 pctxt->buffer.byteIndex += openType.numocts;
23234 }
23235 copyContext (pctxt, &lctxt2);
23236 }
23237 else { /* unknown element */
23238 pctxt->buffer.byteIndex += openType.numocts;
23239 }
23240 }
23241 }
23242 }
23243
23244 return (stat);
23245 }
23246
23247 /**************************************************************/
23248 /* */
23249 /* LocationConfirm */
23250 /* */
23251 /**************************************************************/
23252
23253 EXTERN int asn1PD_H225LocationConfirm (OOCTXT* pctxt, H225LocationConfirm* pvalue)
23254 {
23255 int stat = ASN_OK;
23256 OOCTXT lctxt;
23257 OOCTXT lctxt2;
23258 ASN1OpenType openType;
23259 ASN1UINT bitcnt;
23260 ASN1UINT i;
23261 ASN1BOOL optbit = 0;
23262 ASN1BOOL extbit = 0;
23263
23264 /* extension bit */
23265
23266 DECODEBIT (pctxt, &extbit);
23267
23268 /* optional bits */
23269
23270 memset (&pvalue->m, 0, sizeof(pvalue->m));
23271
23272 DECODEBIT (pctxt, &optbit);
23273 pvalue->m.nonStandardDataPresent = optbit;
23274
23275 /* decode requestSeqNum */
23276
23277 invokeStartElement (pctxt, "requestSeqNum", -1);
23278
23279 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
23280 if (stat != ASN_OK) return stat;
23281
23282 invokeEndElement (pctxt, "requestSeqNum", -1);
23283
23284 /* decode callSignalAddress */
23285
23286 invokeStartElement (pctxt, "callSignalAddress", -1);
23287
23288 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->callSignalAddress);
23289 if (stat != ASN_OK) return stat;
23290
23291 invokeEndElement (pctxt, "callSignalAddress", -1);
23292
23293 /* decode rasAddress */
23294
23295 invokeStartElement (pctxt, "rasAddress", -1);
23296
23297 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->rasAddress);
23298 if (stat != ASN_OK) return stat;
23299
23300 invokeEndElement (pctxt, "rasAddress", -1);
23301
23302 /* decode nonStandardData */
23303
23304 if (pvalue->m.nonStandardDataPresent) {
23305 invokeStartElement (pctxt, "nonStandardData", -1);
23306
23307 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
23308 if (stat != ASN_OK) return stat;
23309
23310 invokeEndElement (pctxt, "nonStandardData", -1);
23311 }
23312
23313 if (extbit) {
23314
23315 /* decode extension optional bits length */
23316
23317 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
23318 if (stat != ASN_OK) return stat;
23319
23320 bitcnt += 1;
23321
23322 ZEROCONTEXT (&lctxt);
23323 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
23324 if (stat != ASN_OK) return stat;
23325
23326 stat = moveBitCursor (pctxt, bitcnt);
23327 if (stat != ASN_OK) return stat;
23328
23329 for (i = 0; i < bitcnt; i++) {
23330 DECODEBIT (&lctxt, &optbit);
23331
23332 if (optbit) {
23333 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
23334 if (stat != ASN_OK) return stat;
23335
23336 if (i < 17 && openType.numocts > 0) { /* known element */
23337 copyContext (&lctxt2, pctxt);
23338 initContextBuffer (pctxt, openType.data, openType.numocts);
23339
23340 switch (i) {
23341 case 0:
23342 pvalue->m.destinationInfoPresent = 1;
23343
23344 invokeStartElement (pctxt, "destinationInfo", -1);
23345
23346 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
23347 if (stat != ASN_OK) return stat;
23348
23349 invokeEndElement (pctxt, "destinationInfo", -1);
23350 break;
23351
23352 case 1:
23353 pvalue->m.destExtraCallInfoPresent = 1;
23354
23355 invokeStartElement (pctxt, "destExtraCallInfo", -1);
23356
23357 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
23358 if (stat != ASN_OK) return stat;
23359
23360 invokeEndElement (pctxt, "destExtraCallInfo", -1);
23361 break;
23362
23363 case 2:
23364 pvalue->m.destinationTypePresent = 1;
23365
23366 invokeStartElement (pctxt, "destinationType", -1);
23367
23368 stat = asn1PD_H225EndpointType (pctxt, &pvalue->destinationType);
23369 if (stat != ASN_OK) return stat;
23370
23371 invokeEndElement (pctxt, "destinationType", -1);
23372 break;
23373
23374 case 3:
23375 pvalue->m.remoteExtensionAddressPresent = 1;
23376
23377 invokeStartElement (pctxt, "remoteExtensionAddress", -1);
23378
23379 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
23380 if (stat != ASN_OK) return stat;
23381
23382 invokeEndElement (pctxt, "remoteExtensionAddress", -1);
23383 break;
23384
23385 case 4:
23386 pvalue->m.alternateEndpointsPresent = 1;
23387
23388 invokeStartElement (pctxt, "alternateEndpoints", -1);
23389
23390 stat = asn1PD_H225_SeqOfH225Endpoint (pctxt, &pvalue->alternateEndpoints);
23391 if (stat != ASN_OK) return stat;
23392
23393 invokeEndElement (pctxt, "alternateEndpoints", -1);
23394 break;
23395
23396 case 5:
23397 pvalue->m.tokensPresent = 1;
23398
23399 invokeStartElement (pctxt, "tokens", -1);
23400
23401 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
23402 if (stat != ASN_OK) return stat;
23403
23404 invokeEndElement (pctxt, "tokens", -1);
23405 break;
23406
23407 case 6:
23408 pvalue->m.cryptoTokensPresent = 1;
23409
23410 invokeStartElement (pctxt, "cryptoTokens", -1);
23411
23412 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
23413 if (stat != ASN_OK) return stat;
23414
23415 invokeEndElement (pctxt, "cryptoTokens", -1);
23416 break;
23417
23418 case 7:
23419 pvalue->m.integrityCheckValuePresent = 1;
23420
23421 invokeStartElement (pctxt, "integrityCheckValue", -1);
23422
23423 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
23424 if (stat != ASN_OK) return stat;
23425
23426 invokeEndElement (pctxt, "integrityCheckValue", -1);
23427 break;
23428
23429 case 8:
23430 pvalue->m.alternateTransportAddressesPresent = 1;
23431
23432 invokeStartElement (pctxt, "alternateTransportAddresses", -1);
23433
23434 stat = asn1PD_H225AlternateTransportAddresses (pctxt, &pvalue->alternateTransportAddresses);
23435 if (stat != ASN_OK) return stat;
23436
23437 invokeEndElement (pctxt, "alternateTransportAddresses", -1);
23438 break;
23439
23440 case 9:
23441 pvalue->m.supportedProtocolsPresent = 1;
23442
23443 invokeStartElement (pctxt, "supportedProtocols", -1);
23444
23445 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->supportedProtocols);
23446 if (stat != ASN_OK) return stat;
23447
23448 invokeEndElement (pctxt, "supportedProtocols", -1);
23449 break;
23450
23451 case 10:
23452 pvalue->m.multipleCallsPresent = 1;
23453
23454 invokeStartElement (pctxt, "multipleCalls", -1);
23455
23456 stat = DECODEBIT (pctxt, &pvalue->multipleCalls);
23457 if (stat != ASN_OK) return stat;
23458 invokeBoolValue (pctxt, pvalue->multipleCalls);
23459
23460 invokeEndElement (pctxt, "multipleCalls", -1);
23461 break;
23462
23463 case 11:
23464 pvalue->m.featureSetPresent = 1;
23465
23466 invokeStartElement (pctxt, "featureSet", -1);
23467
23468 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
23469 if (stat != ASN_OK) return stat;
23470
23471 invokeEndElement (pctxt, "featureSet", -1);
23472 break;
23473
23474 case 12:
23475 pvalue->m.genericDataPresent = 1;
23476
23477 invokeStartElement (pctxt, "genericData", -1);
23478
23479 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
23480 if (stat != ASN_OK) return stat;
23481
23482 invokeEndElement (pctxt, "genericData", -1);
23483 break;
23484
23485 case 13:
23486 pvalue->m.circuitInfoPresent = 1;
23487
23488 invokeStartElement (pctxt, "circuitInfo", -1);
23489
23490 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
23491 if (stat != ASN_OK) return stat;
23492
23493 invokeEndElement (pctxt, "circuitInfo", -1);
23494 break;
23495
23496 case 14:
23497 pvalue->m.serviceControlPresent = 1;
23498
23499 invokeStartElement (pctxt, "serviceControl", -1);
23500
23501 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
23502 if (stat != ASN_OK) return stat;
23503
23504 invokeEndElement (pctxt, "serviceControl", -1);
23505 break;
23506
23507 case 15:
23508 pvalue->m.modifiedSrcInfoPresent = 1;
23509
23510 invokeStartElement (pctxt, "modifiedSrcInfo", -1);
23511
23512 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->modifiedSrcInfo);
23513 if (stat != ASN_OK) return stat;
23514
23515 invokeEndElement (pctxt, "modifiedSrcInfo", -1);
23516 break;
23517
23518 case 16:
23519 pvalue->m.bandWidthPresent = 1;
23520
23521 invokeStartElement (pctxt, "bandWidth", -1);
23522
23523 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
23524 if (stat != ASN_OK) return stat;
23525
23526 invokeEndElement (pctxt, "bandWidth", -1);
23527 break;
23528
23529 default:
23530 pctxt->buffer.byteIndex += openType.numocts;
23531 }
23532 copyContext (pctxt, &lctxt2);
23533 }
23534 else { /* unknown element */
23535 pctxt->buffer.byteIndex += openType.numocts;
23536 }
23537 }
23538 }
23539 }
23540
23541 return (stat);
23542 }
23543
23544 /**************************************************************/
23545 /* */
23546 /* LocationRejectReason */
23547 /* */
23548 /**************************************************************/
23549
23550 EXTERN int asn1PD_H225LocationRejectReason (OOCTXT* pctxt, H225LocationRejectReason* pvalue)
23551 {
23552 int stat = ASN_OK;
23553 ASN1UINT ui;
23554 ASN1OpenType openType;
23555 ASN1BOOL extbit = 0;
23556 OOCTXT lctxt;
23557
23558 /* extension bit */
23559
23560 DECODEBIT (pctxt, &extbit);
23561
23562 if (!extbit) {
23563 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
23564 if (stat != ASN_OK) return stat;
23565 else pvalue->t = ui + 1;
23566
23567 switch (ui) {
23568 /* notRegistered */
23569 case 0:
23570 invokeStartElement (pctxt, "notRegistered", -1);
23571
23572 /* NULL */
23573 invokeNullValue (pctxt);
23574
23575 invokeEndElement (pctxt, "notRegistered", -1);
23576
23577 break;
23578
23579 /* invalidPermission */
23580 case 1:
23581 invokeStartElement (pctxt, "invalidPermission", -1);
23582
23583 /* NULL */
23584 invokeNullValue (pctxt);
23585
23586 invokeEndElement (pctxt, "invalidPermission", -1);
23587
23588 break;
23589
23590 /* requestDenied */
23591 case 2:
23592 invokeStartElement (pctxt, "requestDenied", -1);
23593
23594 /* NULL */
23595 invokeNullValue (pctxt);
23596
23597 invokeEndElement (pctxt, "requestDenied", -1);
23598
23599 break;
23600
23601 /* undefinedReason */
23602 case 3:
23603 invokeStartElement (pctxt, "undefinedReason", -1);
23604
23605 /* NULL */
23606 invokeNullValue (pctxt);
23607
23608 invokeEndElement (pctxt, "undefinedReason", -1);
23609
23610 break;
23611
23612 default:
23613 return ASN_E_INVOPT;
23614 }
23615 }
23616 else {
23617 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
23618 if (stat != ASN_OK) return stat;
23619 else pvalue->t = ui + 5;
23620
23621 stat = decodeByteAlign (pctxt);
23622 if (stat != ASN_OK) return stat;
23623
23624 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
23625 if (stat != ASN_OK) return stat;
23626
23627 copyContext (&lctxt, pctxt);
23628 initContextBuffer (pctxt, openType.data, openType.numocts);
23629
23630 switch (pvalue->t) {
23631 /* securityDenial */
23632 case 5:
23633 invokeStartElement (pctxt, "securityDenial", -1);
23634
23635 /* NULL */
23636 invokeNullValue (pctxt);
23637
23638 invokeEndElement (pctxt, "securityDenial", -1);
23639
23640 break;
23641
23642 /* aliasesInconsistent */
23643 case 6:
23644 invokeStartElement (pctxt, "aliasesInconsistent", -1);
23645
23646 /* NULL */
23647 invokeNullValue (pctxt);
23648
23649 invokeEndElement (pctxt, "aliasesInconsistent", -1);
23650
23651 break;
23652
23653 /* routeCalltoSCN */
23654 case 7:
23655 invokeStartElement (pctxt, "routeCalltoSCN", -1);
23656
23657 pvalue->u.routeCalltoSCN = ALLOC_ASN1ELEM (pctxt, H225_SeqOfH225PartyNumber);
23658
23659 stat = asn1PD_H225_SeqOfH225PartyNumber (pctxt, pvalue->u.routeCalltoSCN);
23660 if (stat != ASN_OK) return stat;
23661
23662 invokeEndElement (pctxt, "routeCalltoSCN", -1);
23663
23664 break;
23665
23666 /* resourceUnavailable */
23667 case 8:
23668 invokeStartElement (pctxt, "resourceUnavailable", -1);
23669
23670 /* NULL */
23671 invokeNullValue (pctxt);
23672
23673 invokeEndElement (pctxt, "resourceUnavailable", -1);
23674
23675 break;
23676
23677 /* genericDataReason */
23678 case 9:
23679 invokeStartElement (pctxt, "genericDataReason", -1);
23680
23681 /* NULL */
23682 invokeNullValue (pctxt);
23683
23684 invokeEndElement (pctxt, "genericDataReason", -1);
23685
23686 break;
23687
23688 /* neededFeatureNotSupported */
23689 case 10:
23690 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
23691
23692 /* NULL */
23693 invokeNullValue (pctxt);
23694
23695 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
23696
23697 break;
23698
23699 /* hopCountExceeded */
23700 case 11:
23701 invokeStartElement (pctxt, "hopCountExceeded", -1);
23702
23703 /* NULL */
23704 invokeNullValue (pctxt);
23705
23706 invokeEndElement (pctxt, "hopCountExceeded", -1);
23707
23708 break;
23709
23710 /* incompleteAddress */
23711 case 12:
23712 invokeStartElement (pctxt, "incompleteAddress", -1);
23713
23714 /* NULL */
23715 invokeNullValue (pctxt);
23716
23717 invokeEndElement (pctxt, "incompleteAddress", -1);
23718
23719 break;
23720
23721 /* securityError */
23722 case 13:
23723 invokeStartElement (pctxt, "securityError", -1);
23724
23725 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
23726
23727 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
23728 if (stat != ASN_OK) return stat;
23729
23730 invokeEndElement (pctxt, "securityError", -1);
23731
23732 break;
23733
23734 /* securityDHmismatch */
23735 case 14:
23736 invokeStartElement (pctxt, "securityDHmismatch", -1);
23737
23738 /* NULL */
23739 invokeNullValue (pctxt);
23740
23741 invokeEndElement (pctxt, "securityDHmismatch", -1);
23742
23743 break;
23744
23745 /* noRouteToDestination */
23746 case 15:
23747 invokeStartElement (pctxt, "noRouteToDestination", -1);
23748
23749 /* NULL */
23750 invokeNullValue (pctxt);
23751
23752 invokeEndElement (pctxt, "noRouteToDestination", -1);
23753
23754 break;
23755
23756 /* unallocatedNumber */
23757 case 16:
23758 invokeStartElement (pctxt, "unallocatedNumber", -1);
23759
23760 /* NULL */
23761 invokeNullValue (pctxt);
23762
23763 invokeEndElement (pctxt, "unallocatedNumber", -1);
23764
23765 break;
23766
23767 default:;
23768 }
23769
23770 copyContext (pctxt, &lctxt);
23771 }
23772
23773 return (stat);
23774 }
23775
23776 /**************************************************************/
23777 /* */
23778 /* LocationReject */
23779 /* */
23780 /**************************************************************/
23781
23782 EXTERN int asn1PD_H225LocationReject (OOCTXT* pctxt, H225LocationReject* pvalue)
23783 {
23784 int stat = ASN_OK;
23785 OOCTXT lctxt;
23786 OOCTXT lctxt2;
23787 ASN1OpenType openType;
23788 ASN1UINT bitcnt;
23789 ASN1UINT i;
23790 ASN1BOOL optbit = 0;
23791 ASN1BOOL extbit = 0;
23792
23793 /* extension bit */
23794
23795 DECODEBIT (pctxt, &extbit);
23796
23797 /* optional bits */
23798
23799 memset (&pvalue->m, 0, sizeof(pvalue->m));
23800
23801 DECODEBIT (pctxt, &optbit);
23802 pvalue->m.nonStandardDataPresent = optbit;
23803
23804 /* decode requestSeqNum */
23805
23806 invokeStartElement (pctxt, "requestSeqNum", -1);
23807
23808 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
23809 if (stat != ASN_OK) return stat;
23810
23811 invokeEndElement (pctxt, "requestSeqNum", -1);
23812
23813 /* decode rejectReason */
23814
23815 invokeStartElement (pctxt, "rejectReason", -1);
23816
23817 stat = asn1PD_H225LocationRejectReason (pctxt, &pvalue->rejectReason);
23818 if (stat != ASN_OK) return stat;
23819
23820 invokeEndElement (pctxt, "rejectReason", -1);
23821
23822 /* decode nonStandardData */
23823
23824 if (pvalue->m.nonStandardDataPresent) {
23825 invokeStartElement (pctxt, "nonStandardData", -1);
23826
23827 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
23828 if (stat != ASN_OK) return stat;
23829
23830 invokeEndElement (pctxt, "nonStandardData", -1);
23831 }
23832
23833 if (extbit) {
23834
23835 /* decode extension optional bits length */
23836
23837 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
23838 if (stat != ASN_OK) return stat;
23839
23840 bitcnt += 1;
23841
23842 ZEROCONTEXT (&lctxt);
23843 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
23844 if (stat != ASN_OK) return stat;
23845
23846 stat = moveBitCursor (pctxt, bitcnt);
23847 if (stat != ASN_OK) return stat;
23848
23849 for (i = 0; i < bitcnt; i++) {
23850 DECODEBIT (&lctxt, &optbit);
23851
23852 if (optbit) {
23853 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
23854 if (stat != ASN_OK) return stat;
23855
23856 if (i < 7 && openType.numocts > 0) { /* known element */
23857 copyContext (&lctxt2, pctxt);
23858 initContextBuffer (pctxt, openType.data, openType.numocts);
23859
23860 switch (i) {
23861 case 0:
23862 pvalue->m.altGKInfoPresent = 1;
23863
23864 invokeStartElement (pctxt, "altGKInfo", -1);
23865
23866 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
23867 if (stat != ASN_OK) return stat;
23868
23869 invokeEndElement (pctxt, "altGKInfo", -1);
23870 break;
23871
23872 case 1:
23873 pvalue->m.tokensPresent = 1;
23874
23875 invokeStartElement (pctxt, "tokens", -1);
23876
23877 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
23878 if (stat != ASN_OK) return stat;
23879
23880 invokeEndElement (pctxt, "tokens", -1);
23881 break;
23882
23883 case 2:
23884 pvalue->m.cryptoTokensPresent = 1;
23885
23886 invokeStartElement (pctxt, "cryptoTokens", -1);
23887
23888 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
23889 if (stat != ASN_OK) return stat;
23890
23891 invokeEndElement (pctxt, "cryptoTokens", -1);
23892 break;
23893
23894 case 3:
23895 pvalue->m.integrityCheckValuePresent = 1;
23896
23897 invokeStartElement (pctxt, "integrityCheckValue", -1);
23898
23899 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
23900 if (stat != ASN_OK) return stat;
23901
23902 invokeEndElement (pctxt, "integrityCheckValue", -1);
23903 break;
23904
23905 case 4:
23906 pvalue->m.featureSetPresent = 1;
23907
23908 invokeStartElement (pctxt, "featureSet", -1);
23909
23910 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
23911 if (stat != ASN_OK) return stat;
23912
23913 invokeEndElement (pctxt, "featureSet", -1);
23914 break;
23915
23916 case 5:
23917 pvalue->m.genericDataPresent = 1;
23918
23919 invokeStartElement (pctxt, "genericData", -1);
23920
23921 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
23922 if (stat != ASN_OK) return stat;
23923
23924 invokeEndElement (pctxt, "genericData", -1);
23925 break;
23926
23927 case 6:
23928 pvalue->m.serviceControlPresent = 1;
23929
23930 invokeStartElement (pctxt, "serviceControl", -1);
23931
23932 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
23933 if (stat != ASN_OK) return stat;
23934
23935 invokeEndElement (pctxt, "serviceControl", -1);
23936 break;
23937
23938 default:
23939 pctxt->buffer.byteIndex += openType.numocts;
23940 }
23941 copyContext (pctxt, &lctxt2);
23942 }
23943 else { /* unknown element */
23944 pctxt->buffer.byteIndex += openType.numocts;
23945 }
23946 }
23947 }
23948 }
23949
23950 return (stat);
23951 }
23952
23953 /**************************************************************/
23954 /* */
23955 /* InfoRequest */
23956 /* */
23957 /**************************************************************/
23958
23959 EXTERN int asn1PD_H225InfoRequest (OOCTXT* pctxt, H225InfoRequest* pvalue)
23960 {
23961 int stat = ASN_OK;
23962 OOCTXT lctxt;
23963 OOCTXT lctxt2;
23964 ASN1OpenType openType;
23965 ASN1UINT bitcnt;
23966 ASN1UINT i;
23967 ASN1BOOL optbit = 0;
23968 ASN1BOOL extbit = 0;
23969
23970 /* extension bit */
23971
23972 DECODEBIT (pctxt, &extbit);
23973
23974 /* optional bits */
23975
23976 memset (&pvalue->m, 0, sizeof(pvalue->m));
23977
23978 DECODEBIT (pctxt, &optbit);
23979 pvalue->m.nonStandardDataPresent = optbit;
23980
23981 DECODEBIT (pctxt, &optbit);
23982 pvalue->m.replyAddressPresent = optbit;
23983
23984 /* decode requestSeqNum */
23985
23986 invokeStartElement (pctxt, "requestSeqNum", -1);
23987
23988 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
23989 if (stat != ASN_OK) return stat;
23990
23991 invokeEndElement (pctxt, "requestSeqNum", -1);
23992
23993 /* decode callReferenceValue */
23994
23995 invokeStartElement (pctxt, "callReferenceValue", -1);
23996
23997 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->callReferenceValue);
23998 if (stat != ASN_OK) return stat;
23999
24000 invokeEndElement (pctxt, "callReferenceValue", -1);
24001
24002 /* decode nonStandardData */
24003
24004 if (pvalue->m.nonStandardDataPresent) {
24005 invokeStartElement (pctxt, "nonStandardData", -1);
24006
24007 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
24008 if (stat != ASN_OK) return stat;
24009
24010 invokeEndElement (pctxt, "nonStandardData", -1);
24011 }
24012
24013 /* decode replyAddress */
24014
24015 if (pvalue->m.replyAddressPresent) {
24016 invokeStartElement (pctxt, "replyAddress", -1);
24017
24018 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->replyAddress);
24019 if (stat != ASN_OK) return stat;
24020
24021 invokeEndElement (pctxt, "replyAddress", -1);
24022 }
24023
24024 if (extbit) {
24025
24026 /* decode extension optional bits length */
24027
24028 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
24029 if (stat != ASN_OK) return stat;
24030
24031 bitcnt += 1;
24032
24033 ZEROCONTEXT (&lctxt);
24034 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
24035 if (stat != ASN_OK) return stat;
24036
24037 stat = moveBitCursor (pctxt, bitcnt);
24038 if (stat != ASN_OK) return stat;
24039
24040 for (i = 0; i < bitcnt; i++) {
24041 DECODEBIT (&lctxt, &optbit);
24042
24043 if (optbit) {
24044 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
24045 if (stat != ASN_OK) return stat;
24046
24047 if (i < 11 && openType.numocts > 0) { /* known element */
24048 copyContext (&lctxt2, pctxt);
24049 initContextBuffer (pctxt, openType.data, openType.numocts);
24050
24051 switch (i) {
24052 case 0:
24053 pvalue->m.callIdentifierPresent = 1;
24054
24055 invokeStartElement (pctxt, "callIdentifier", -1);
24056
24057 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
24058 if (stat != ASN_OK) return stat;
24059
24060 invokeEndElement (pctxt, "callIdentifier", -1);
24061 break;
24062
24063 case 1:
24064 pvalue->m.tokensPresent = 1;
24065
24066 invokeStartElement (pctxt, "tokens", -1);
24067
24068 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
24069 if (stat != ASN_OK) return stat;
24070
24071 invokeEndElement (pctxt, "tokens", -1);
24072 break;
24073
24074 case 2:
24075 pvalue->m.cryptoTokensPresent = 1;
24076
24077 invokeStartElement (pctxt, "cryptoTokens", -1);
24078
24079 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
24080 if (stat != ASN_OK) return stat;
24081
24082 invokeEndElement (pctxt, "cryptoTokens", -1);
24083 break;
24084
24085 case 3:
24086 pvalue->m.integrityCheckValuePresent = 1;
24087
24088 invokeStartElement (pctxt, "integrityCheckValue", -1);
24089
24090 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
24091 if (stat != ASN_OK) return stat;
24092
24093 invokeEndElement (pctxt, "integrityCheckValue", -1);
24094 break;
24095
24096 case 4:
24097 pvalue->m.uuiesRequestedPresent = 1;
24098
24099 invokeStartElement (pctxt, "uuiesRequested", -1);
24100
24101 stat = asn1PD_H225UUIEsRequested (pctxt, &pvalue->uuiesRequested);
24102 if (stat != ASN_OK) return stat;
24103
24104 invokeEndElement (pctxt, "uuiesRequested", -1);
24105 break;
24106
24107 case 5:
24108 pvalue->m.callLinkagePresent = 1;
24109
24110 invokeStartElement (pctxt, "callLinkage", -1);
24111
24112 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
24113 if (stat != ASN_OK) return stat;
24114
24115 invokeEndElement (pctxt, "callLinkage", -1);
24116 break;
24117
24118 case 6:
24119 pvalue->m.usageInfoRequestedPresent = 1;
24120
24121 invokeStartElement (pctxt, "usageInfoRequested", -1);
24122
24123 stat = asn1PD_H225RasUsageInfoTypes (pctxt, &pvalue->usageInfoRequested);
24124 if (stat != ASN_OK) return stat;
24125
24126 invokeEndElement (pctxt, "usageInfoRequested", -1);
24127 break;
24128
24129 case 7:
24130 pvalue->m.segmentedResponseSupportedPresent = 1;
24131
24132 invokeStartElement (pctxt, "segmentedResponseSupported", -1);
24133
24134 /* NULL */
24135 invokeNullValue (pctxt);
24136
24137 invokeEndElement (pctxt, "segmentedResponseSupported", -1);
24138 break;
24139
24140 case 8:
24141 pvalue->m.nextSegmentRequestedPresent = 1;
24142
24143 invokeStartElement (pctxt, "nextSegmentRequested", -1);
24144
24145 stat = decodeConsUInt16 (pctxt, &pvalue->nextSegmentRequested, 0U, 65535U);
24146 if (stat != ASN_OK) return stat;
24147 invokeUIntValue (pctxt, pvalue->nextSegmentRequested);
24148
24149 invokeEndElement (pctxt, "nextSegmentRequested", -1);
24150 break;
24151
24152 case 9:
24153 pvalue->m.capacityInfoRequestedPresent = 1;
24154
24155 invokeStartElement (pctxt, "capacityInfoRequested", -1);
24156
24157 /* NULL */
24158 invokeNullValue (pctxt);
24159
24160 invokeEndElement (pctxt, "capacityInfoRequested", -1);
24161 break;
24162
24163 case 10:
24164 pvalue->m.genericDataPresent = 1;
24165
24166 invokeStartElement (pctxt, "genericData", -1);
24167
24168 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
24169 if (stat != ASN_OK) return stat;
24170
24171 invokeEndElement (pctxt, "genericData", -1);
24172 break;
24173
24174 default:
24175 pctxt->buffer.byteIndex += openType.numocts;
24176 }
24177 copyContext (pctxt, &lctxt2);
24178 }
24179 else { /* unknown element */
24180 pctxt->buffer.byteIndex += openType.numocts;
24181 }
24182 }
24183 }
24184 }
24185
24186 return (stat);
24187 }
24188
24189 /**************************************************************/
24190 /* */
24191 /* _SeqOfH225RTPSession */
24192 /* */
24193 /**************************************************************/
24194
24195 EXTERN int asn1PD_H225_SeqOfH225RTPSession (OOCTXT* pctxt, H225_SeqOfH225RTPSession* pvalue)
24196 {
24197 int stat = ASN_OK;
24198 H225RTPSession* pdata;
24199 ASN1UINT count = 0;
24200 ASN1UINT xx1;
24201 int lstat;
24202
24203 dListInit (pvalue);
24204
24205 for (;;) {
24206 /* decode length determinant */
24207
24208 lstat = decodeLength (pctxt, &count);
24209 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
24210 return lstat;
24211 }
24212
24213 /* decode elements */
24214
24215 for (xx1 = 0; xx1 < count; xx1++) {
24216 invokeStartElement (pctxt, "elem", xx1);
24217
24218 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225RTPSession);
24219
24220 stat = asn1PD_H225RTPSession (pctxt, pdata);
24221 if (stat != ASN_OK) return stat;
24222 invokeEndElement (pctxt, "elem", xx1);
24223
24224 dListAppendNode (pctxt, pvalue, pdata);
24225 }
24226
24227 if(lstat == ASN_OK) break;
24228 }
24229
24230 return (stat);
24231 }
24232
24233 /**************************************************************/
24234 /* */
24235 /* _SeqOfH225TransportChannelInfo */
24236 /* */
24237 /**************************************************************/
24238
24239 EXTERN int asn1PD_H225_SeqOfH225TransportChannelInfo (OOCTXT* pctxt, H225_SeqOfH225TransportChannelInfo* pvalue)
24240 {
24241 int stat = ASN_OK;
24242 H225TransportChannelInfo* pdata;
24243 ASN1UINT count = 0;
24244 ASN1UINT xx1;
24245 int lstat;
24246
24247 dListInit (pvalue);
24248
24249 for (;;) {
24250 /* decode length determinant */
24251
24252 lstat = decodeLength (pctxt, &count);
24253 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
24254 return lstat;
24255 }
24256
24257 /* decode elements */
24258
24259 for (xx1 = 0; xx1 < count; xx1++) {
24260 invokeStartElement (pctxt, "elem", xx1);
24261
24262 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225TransportChannelInfo);
24263
24264 stat = asn1PD_H225TransportChannelInfo (pctxt, pdata);
24265 if (stat != ASN_OK) return stat;
24266 invokeEndElement (pctxt, "elem", xx1);
24267
24268 dListAppendNode (pctxt, pvalue, pdata);
24269 }
24270
24271 if(lstat == ASN_OK) break;
24272 }
24273
24274 return (stat);
24275 }
24276
24277 /**************************************************************/
24278 /* */
24279 /* _SeqOfH225ConferenceIdentifier */
24280 /* */
24281 /**************************************************************/
24282
24283 EXTERN int asn1PD_H225_SeqOfH225ConferenceIdentifier (OOCTXT* pctxt, H225_SeqOfH225ConferenceIdentifier* pvalue)
24284 {
24285 int stat = ASN_OK;
24286 ASN1UINT xx1;
24287
24288 /* decode length determinant */
24289
24290 stat = decodeLength (pctxt, &pvalue->n);
24291 if (stat != ASN_OK) return stat;
24292
24293 /* decode elements */
24294
24295 ALLOC_ASN1ARRAY (pctxt, pvalue, H225ConferenceIdentifier);
24296
24297 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
24298 invokeStartElement (pctxt, "elem", xx1);
24299
24300 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->elem[xx1]);
24301 if (stat != ASN_OK) return stat;
24302 invokeEndElement (pctxt, "elem", xx1);
24303
24304 }
24305
24306 return (stat);
24307 }
24308
24309 /**************************************************************/
24310 /* */
24311 /* InfoRequestResponse_perCallInfo_element_pdu_element */
24312 /* */
24313 /**************************************************************/
24314
24315 EXTERN int asn1PD_H225InfoRequestResponse_perCallInfo_element_pdu_element (OOCTXT* pctxt, H225InfoRequestResponse_perCallInfo_element_pdu_element* pvalue)
24316 {
24317 int stat = ASN_OK;
24318
24319 /* decode h323pdu */
24320
24321 invokeStartElement (pctxt, "h323pdu", -1);
24322
24323 stat = asn1PD_H225H323_UU_PDU (pctxt, &pvalue->h323pdu);
24324 if (stat != ASN_OK) return stat;
24325
24326 invokeEndElement (pctxt, "h323pdu", -1);
24327
24328 /* decode sent */
24329
24330 invokeStartElement (pctxt, "sent", -1);
24331
24332 stat = DECODEBIT (pctxt, &pvalue->sent);
24333 if (stat != ASN_OK) return stat;
24334 invokeBoolValue (pctxt, pvalue->sent);
24335
24336 invokeEndElement (pctxt, "sent", -1);
24337
24338 return (stat);
24339 }
24340
24341 /**************************************************************/
24342 /* */
24343 /* _SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_el */
24344 /* */
24345 /**************************************************************/
24346
24347 EXTERN int asn1PD_H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element (OOCTXT* pctxt, H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element* pvalue)
24348 {
24349 int stat = ASN_OK;
24350 H225InfoRequestResponse_perCallInfo_element_pdu_element* pdata;
24351 ASN1UINT count = 0;
24352 ASN1UINT xx1;
24353 int lstat;
24354
24355 dListInit (pvalue);
24356
24357 for (;;) {
24358 /* decode length determinant */
24359
24360 lstat = decodeLength (pctxt, &count);
24361 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
24362 return lstat;
24363 }
24364
24365 /* decode elements */
24366
24367 for (xx1 = 0; xx1 < count; xx1++) {
24368 invokeStartElement (pctxt, "elem", xx1);
24369
24370 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225InfoRequestResponse_perCallInfo_element_pdu_element);
24371
24372 stat = asn1PD_H225InfoRequestResponse_perCallInfo_element_pdu_element (pctxt, pdata);
24373 if (stat != ASN_OK) return stat;
24374 invokeEndElement (pctxt, "elem", xx1);
24375
24376 dListAppendNode (pctxt, pvalue, pdata);
24377 }
24378
24379 if(lstat == ASN_OK) break;
24380 }
24381
24382 return (stat);
24383 }
24384
24385 /**************************************************************/
24386 /* */
24387 /* InfoRequestResponse_perCallInfo_element */
24388 /* */
24389 /**************************************************************/
24390
24391 EXTERN int asn1PD_H225InfoRequestResponse_perCallInfo_element (OOCTXT* pctxt, H225InfoRequestResponse_perCallInfo_element* pvalue)
24392 {
24393 int stat = ASN_OK;
24394 OOCTXT lctxt;
24395 OOCTXT lctxt2;
24396 ASN1OpenType openType;
24397 ASN1UINT bitcnt;
24398 ASN1UINT i;
24399 ASN1BOOL optbit = 0;
24400 ASN1BOOL extbit = 0;
24401
24402 /* extension bit */
24403
24404 DECODEBIT (pctxt, &extbit);
24405
24406 /* optional bits */
24407
24408 memset (&pvalue->m, 0, sizeof(pvalue->m));
24409
24410 DECODEBIT (pctxt, &optbit);
24411 pvalue->m.nonStandardDataPresent = optbit;
24412
24413 DECODEBIT (pctxt, &optbit);
24414 pvalue->m.originatorPresent = optbit;
24415
24416 DECODEBIT (pctxt, &optbit);
24417 pvalue->m.audioPresent = optbit;
24418
24419 DECODEBIT (pctxt, &optbit);
24420 pvalue->m.videoPresent = optbit;
24421
24422 DECODEBIT (pctxt, &optbit);
24423 pvalue->m.dataPresent = optbit;
24424
24425 /* decode nonStandardData */
24426
24427 if (pvalue->m.nonStandardDataPresent) {
24428 invokeStartElement (pctxt, "nonStandardData", -1);
24429
24430 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
24431 if (stat != ASN_OK) return stat;
24432
24433 invokeEndElement (pctxt, "nonStandardData", -1);
24434 }
24435
24436 /* decode callReferenceValue */
24437
24438 invokeStartElement (pctxt, "callReferenceValue", -1);
24439
24440 stat = asn1PD_H225CallReferenceValue (pctxt, &pvalue->callReferenceValue);
24441 if (stat != ASN_OK) return stat;
24442
24443 invokeEndElement (pctxt, "callReferenceValue", -1);
24444
24445 /* decode conferenceID */
24446
24447 invokeStartElement (pctxt, "conferenceID", -1);
24448
24449 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
24450 if (stat != ASN_OK) return stat;
24451
24452 invokeEndElement (pctxt, "conferenceID", -1);
24453
24454 /* decode originator */
24455
24456 if (pvalue->m.originatorPresent) {
24457 invokeStartElement (pctxt, "originator", -1);
24458
24459 stat = DECODEBIT (pctxt, &pvalue->originator);
24460 if (stat != ASN_OK) return stat;
24461 invokeBoolValue (pctxt, pvalue->originator);
24462
24463 invokeEndElement (pctxt, "originator", -1);
24464 }
24465
24466 /* decode audio */
24467
24468 if (pvalue->m.audioPresent) {
24469 invokeStartElement (pctxt, "audio", -1);
24470
24471 stat = asn1PD_H225_SeqOfH225RTPSession (pctxt, &pvalue->audio);
24472 if (stat != ASN_OK) return stat;
24473
24474 invokeEndElement (pctxt, "audio", -1);
24475 }
24476
24477 /* decode video */
24478
24479 if (pvalue->m.videoPresent) {
24480 invokeStartElement (pctxt, "video", -1);
24481
24482 stat = asn1PD_H225_SeqOfH225RTPSession (pctxt, &pvalue->video);
24483 if (stat != ASN_OK) return stat;
24484
24485 invokeEndElement (pctxt, "video", -1);
24486 }
24487
24488 /* decode data */
24489
24490 if (pvalue->m.dataPresent) {
24491 invokeStartElement (pctxt, "data", -1);
24492
24493 stat = asn1PD_H225_SeqOfH225TransportChannelInfo (pctxt, &pvalue->data);
24494 if (stat != ASN_OK) return stat;
24495
24496 invokeEndElement (pctxt, "data", -1);
24497 }
24498
24499 /* decode h245 */
24500
24501 invokeStartElement (pctxt, "h245", -1);
24502
24503 stat = asn1PD_H225TransportChannelInfo (pctxt, &pvalue->h245);
24504 if (stat != ASN_OK) return stat;
24505
24506 invokeEndElement (pctxt, "h245", -1);
24507
24508 /* decode callSignaling */
24509
24510 invokeStartElement (pctxt, "callSignaling", -1);
24511
24512 stat = asn1PD_H225TransportChannelInfo (pctxt, &pvalue->callSignaling);
24513 if (stat != ASN_OK) return stat;
24514
24515 invokeEndElement (pctxt, "callSignaling", -1);
24516
24517 /* decode callType */
24518
24519 invokeStartElement (pctxt, "callType", -1);
24520
24521 stat = asn1PD_H225CallType (pctxt, &pvalue->callType);
24522 if (stat != ASN_OK) return stat;
24523
24524 invokeEndElement (pctxt, "callType", -1);
24525
24526 /* decode bandWidth */
24527
24528 invokeStartElement (pctxt, "bandWidth", -1);
24529
24530 stat = asn1PD_H225BandWidth (pctxt, &pvalue->bandWidth);
24531 if (stat != ASN_OK) return stat;
24532
24533 invokeEndElement (pctxt, "bandWidth", -1);
24534
24535 /* decode callModel */
24536
24537 invokeStartElement (pctxt, "callModel", -1);
24538
24539 stat = asn1PD_H225CallModel (pctxt, &pvalue->callModel);
24540 if (stat != ASN_OK) return stat;
24541
24542 invokeEndElement (pctxt, "callModel", -1);
24543
24544 if (extbit) {
24545
24546 /* decode extension optional bits length */
24547
24548 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
24549 if (stat != ASN_OK) return stat;
24550
24551 bitcnt += 1;
24552
24553 ZEROCONTEXT (&lctxt);
24554 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
24555 if (stat != ASN_OK) return stat;
24556
24557 stat = moveBitCursor (pctxt, bitcnt);
24558 if (stat != ASN_OK) return stat;
24559
24560 for (i = 0; i < bitcnt; i++) {
24561 DECODEBIT (&lctxt, &optbit);
24562
24563 if (optbit) {
24564 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
24565 if (stat != ASN_OK) return stat;
24566
24567 if (i < 8 && openType.numocts > 0) { /* known element */
24568 copyContext (&lctxt2, pctxt);
24569 initContextBuffer (pctxt, openType.data, openType.numocts);
24570
24571 switch (i) {
24572 case 0:
24573 pvalue->m.callIdentifierPresent = 1;
24574
24575 invokeStartElement (pctxt, "callIdentifier", -1);
24576
24577 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
24578 if (stat != ASN_OK) return stat;
24579
24580 invokeEndElement (pctxt, "callIdentifier", -1);
24581 break;
24582
24583 case 1:
24584 pvalue->m.tokensPresent = 1;
24585
24586 invokeStartElement (pctxt, "tokens", -1);
24587
24588 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
24589 if (stat != ASN_OK) return stat;
24590
24591 invokeEndElement (pctxt, "tokens", -1);
24592 break;
24593
24594 case 2:
24595 pvalue->m.cryptoTokensPresent = 1;
24596
24597 invokeStartElement (pctxt, "cryptoTokens", -1);
24598
24599 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
24600 if (stat != ASN_OK) return stat;
24601
24602 invokeEndElement (pctxt, "cryptoTokens", -1);
24603 break;
24604
24605 case 3:
24606 pvalue->m.substituteConfIDsPresent = 1;
24607
24608 invokeStartElement (pctxt, "substituteConfIDs", -1);
24609
24610 stat = asn1PD_H225_SeqOfH225ConferenceIdentifier (pctxt, &pvalue->substituteConfIDs);
24611 if (stat != ASN_OK) return stat;
24612
24613 invokeEndElement (pctxt, "substituteConfIDs", -1);
24614 break;
24615
24616 case 4:
24617 pvalue->m.pduPresent = 1;
24618
24619 invokeStartElement (pctxt, "pdu", -1);
24620
24621 stat = asn1PD_H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element (pctxt, &pvalue->pdu);
24622 if (stat != ASN_OK) return stat;
24623
24624 invokeEndElement (pctxt, "pdu", -1);
24625 break;
24626
24627 case 5:
24628 pvalue->m.callLinkagePresent = 1;
24629
24630 invokeStartElement (pctxt, "callLinkage", -1);
24631
24632 stat = asn1PD_H225CallLinkage (pctxt, &pvalue->callLinkage);
24633 if (stat != ASN_OK) return stat;
24634
24635 invokeEndElement (pctxt, "callLinkage", -1);
24636 break;
24637
24638 case 6:
24639 pvalue->m.usageInformationPresent = 1;
24640
24641 invokeStartElement (pctxt, "usageInformation", -1);
24642
24643 stat = asn1PD_H225RasUsageInformation (pctxt, &pvalue->usageInformation);
24644 if (stat != ASN_OK) return stat;
24645
24646 invokeEndElement (pctxt, "usageInformation", -1);
24647 break;
24648
24649 case 7:
24650 pvalue->m.circuitInfoPresent = 1;
24651
24652 invokeStartElement (pctxt, "circuitInfo", -1);
24653
24654 stat = asn1PD_H225CircuitInfo (pctxt, &pvalue->circuitInfo);
24655 if (stat != ASN_OK) return stat;
24656
24657 invokeEndElement (pctxt, "circuitInfo", -1);
24658 break;
24659
24660 default:
24661 pctxt->buffer.byteIndex += openType.numocts;
24662 }
24663 copyContext (pctxt, &lctxt2);
24664 }
24665 else { /* unknown element */
24666 pctxt->buffer.byteIndex += openType.numocts;
24667 }
24668 }
24669 }
24670 }
24671
24672 return (stat);
24673 }
24674
24675 /**************************************************************/
24676 /* */
24677 /* _SeqOfH225InfoRequestResponse_perCallInfo_element */
24678 /* */
24679 /**************************************************************/
24680
24681 EXTERN int asn1PD_H225_SeqOfH225InfoRequestResponse_perCallInfo_element (OOCTXT* pctxt, H225_SeqOfH225InfoRequestResponse_perCallInfo_element* pvalue)
24682 {
24683 int stat = ASN_OK;
24684 H225InfoRequestResponse_perCallInfo_element* pdata;
24685 ASN1UINT count = 0;
24686 ASN1UINT xx1;
24687 int lstat;
24688
24689 dListInit (pvalue);
24690
24691 for (;;) {
24692 /* decode length determinant */
24693
24694 lstat = decodeLength (pctxt, &count);
24695 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
24696 return lstat;
24697 }
24698
24699 /* decode elements */
24700
24701 for (xx1 = 0; xx1 < count; xx1++) {
24702 invokeStartElement (pctxt, "elem", xx1);
24703
24704 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225InfoRequestResponse_perCallInfo_element);
24705
24706 stat = asn1PD_H225InfoRequestResponse_perCallInfo_element (pctxt, pdata);
24707 if (stat != ASN_OK) return stat;
24708 invokeEndElement (pctxt, "elem", xx1);
24709
24710 dListAppendNode (pctxt, pvalue, pdata);
24711 }
24712
24713 if(lstat == ASN_OK) break;
24714 }
24715
24716 return (stat);
24717 }
24718
24719 /**************************************************************/
24720 /* */
24721 /* InfoRequestResponseStatus */
24722 /* */
24723 /**************************************************************/
24724
24725 EXTERN int asn1PD_H225InfoRequestResponseStatus (OOCTXT* pctxt, H225InfoRequestResponseStatus* pvalue)
24726 {
24727 int stat = ASN_OK;
24728 ASN1UINT ui;
24729 ASN1OpenType openType;
24730 ASN1BOOL extbit = 0;
24731
24732 /* extension bit */
24733
24734 DECODEBIT (pctxt, &extbit);
24735
24736 if (!extbit) {
24737 stat = decodeConsUnsigned (pctxt, &ui, 0, 3);
24738 if (stat != ASN_OK) return stat;
24739 else pvalue->t = ui + 1;
24740
24741 switch (ui) {
24742 /* complete */
24743 case 0:
24744 invokeStartElement (pctxt, "complete", -1);
24745
24746 /* NULL */
24747 invokeNullValue (pctxt);
24748
24749 invokeEndElement (pctxt, "complete", -1);
24750
24751 break;
24752
24753 /* incomplete */
24754 case 1:
24755 invokeStartElement (pctxt, "incomplete", -1);
24756
24757 /* NULL */
24758 invokeNullValue (pctxt);
24759
24760 invokeEndElement (pctxt, "incomplete", -1);
24761
24762 break;
24763
24764 /* segment */
24765 case 2:
24766 invokeStartElement (pctxt, "segment", -1);
24767
24768 stat = decodeConsUInt16 (pctxt, &pvalue->u.segment, 0U, 65535U);
24769 if (stat != ASN_OK) return stat;
24770 invokeUIntValue (pctxt, pvalue->u.segment);
24771
24772 invokeEndElement (pctxt, "segment", -1);
24773
24774 break;
24775
24776 /* invalidCall */
24777 case 3:
24778 invokeStartElement (pctxt, "invalidCall", -1);
24779
24780 /* NULL */
24781 invokeNullValue (pctxt);
24782
24783 invokeEndElement (pctxt, "invalidCall", -1);
24784
24785 break;
24786
24787 default:
24788 return ASN_E_INVOPT;
24789 }
24790 }
24791 else {
24792 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
24793 if (stat != ASN_OK) return stat;
24794 else pvalue->t = ui + 5;
24795
24796 stat = decodeByteAlign (pctxt);
24797 if (stat != ASN_OK) return stat;
24798
24799 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
24800 if (stat != ASN_OK) return stat;
24801
24802 }
24803
24804 return (stat);
24805 }
24806
24807 /**************************************************************/
24808 /* */
24809 /* InfoRequestResponse */
24810 /* */
24811 /**************************************************************/
24812
24813 EXTERN int asn1PD_H225InfoRequestResponse (OOCTXT* pctxt, H225InfoRequestResponse* pvalue)
24814 {
24815 int stat = ASN_OK;
24816 OOCTXT lctxt;
24817 OOCTXT lctxt2;
24818 ASN1OpenType openType;
24819 ASN1UINT bitcnt;
24820 ASN1UINT i;
24821 ASN1BOOL optbit = 0;
24822 ASN1BOOL extbit = 0;
24823
24824 /* extension bit */
24825
24826 DECODEBIT (pctxt, &extbit);
24827
24828 /* optional bits */
24829
24830 memset (&pvalue->m, 0, sizeof(pvalue->m));
24831
24832 DECODEBIT (pctxt, &optbit);
24833 pvalue->m.nonStandardDataPresent = optbit;
24834
24835 DECODEBIT (pctxt, &optbit);
24836 pvalue->m.endpointAliasPresent = optbit;
24837
24838 DECODEBIT (pctxt, &optbit);
24839 pvalue->m.perCallInfoPresent = optbit;
24840
24841 /* decode nonStandardData */
24842
24843 if (pvalue->m.nonStandardDataPresent) {
24844 invokeStartElement (pctxt, "nonStandardData", -1);
24845
24846 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
24847 if (stat != ASN_OK) return stat;
24848
24849 invokeEndElement (pctxt, "nonStandardData", -1);
24850 }
24851
24852 /* decode requestSeqNum */
24853
24854 invokeStartElement (pctxt, "requestSeqNum", -1);
24855
24856 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
24857 if (stat != ASN_OK) return stat;
24858
24859 invokeEndElement (pctxt, "requestSeqNum", -1);
24860
24861 /* decode endpointType */
24862
24863 invokeStartElement (pctxt, "endpointType", -1);
24864
24865 stat = asn1PD_H225EndpointType (pctxt, &pvalue->endpointType);
24866 if (stat != ASN_OK) return stat;
24867
24868 invokeEndElement (pctxt, "endpointType", -1);
24869
24870 /* decode endpointIdentifier */
24871
24872 invokeStartElement (pctxt, "endpointIdentifier", -1);
24873
24874 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
24875 if (stat != ASN_OK) return stat;
24876
24877 invokeEndElement (pctxt, "endpointIdentifier", -1);
24878
24879 /* decode rasAddress */
24880
24881 invokeStartElement (pctxt, "rasAddress", -1);
24882
24883 stat = asn1PD_H225TransportAddress (pctxt, &pvalue->rasAddress);
24884 if (stat != ASN_OK) return stat;
24885
24886 invokeEndElement (pctxt, "rasAddress", -1);
24887
24888 /* decode callSignalAddress */
24889
24890 invokeStartElement (pctxt, "callSignalAddress", -1);
24891
24892 stat = asn1PD_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
24893 if (stat != ASN_OK) return stat;
24894
24895 invokeEndElement (pctxt, "callSignalAddress", -1);
24896
24897 /* decode endpointAlias */
24898
24899 if (pvalue->m.endpointAliasPresent) {
24900 invokeStartElement (pctxt, "endpointAlias", -1);
24901
24902 stat = asn1PD_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
24903 if (stat != ASN_OK) return stat;
24904
24905 invokeEndElement (pctxt, "endpointAlias", -1);
24906 }
24907
24908 /* decode perCallInfo */
24909
24910 if (pvalue->m.perCallInfoPresent) {
24911 invokeStartElement (pctxt, "perCallInfo", -1);
24912
24913 stat = asn1PD_H225_SeqOfH225InfoRequestResponse_perCallInfo_element (pctxt, &pvalue->perCallInfo);
24914 if (stat != ASN_OK) return stat;
24915
24916 invokeEndElement (pctxt, "perCallInfo", -1);
24917 }
24918
24919 if (extbit) {
24920
24921 /* decode extension optional bits length */
24922
24923 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
24924 if (stat != ASN_OK) return stat;
24925
24926 bitcnt += 1;
24927
24928 ZEROCONTEXT (&lctxt);
24929 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
24930 if (stat != ASN_OK) return stat;
24931
24932 stat = moveBitCursor (pctxt, bitcnt);
24933 if (stat != ASN_OK) return stat;
24934
24935 for (i = 0; i < bitcnt; i++) {
24936 DECODEBIT (&lctxt, &optbit);
24937
24938 if (optbit) {
24939 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
24940 if (stat != ASN_OK) return stat;
24941
24942 if (i < 8 && openType.numocts > 0) { /* known element */
24943 copyContext (&lctxt2, pctxt);
24944 initContextBuffer (pctxt, openType.data, openType.numocts);
24945
24946 switch (i) {
24947 case 0:
24948 pvalue->m.tokensPresent = 1;
24949
24950 invokeStartElement (pctxt, "tokens", -1);
24951
24952 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
24953 if (stat != ASN_OK) return stat;
24954
24955 invokeEndElement (pctxt, "tokens", -1);
24956 break;
24957
24958 case 1:
24959 pvalue->m.cryptoTokensPresent = 1;
24960
24961 invokeStartElement (pctxt, "cryptoTokens", -1);
24962
24963 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
24964 if (stat != ASN_OK) return stat;
24965
24966 invokeEndElement (pctxt, "cryptoTokens", -1);
24967 break;
24968
24969 case 2:
24970 pvalue->m.integrityCheckValuePresent = 1;
24971
24972 invokeStartElement (pctxt, "integrityCheckValue", -1);
24973
24974 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
24975 if (stat != ASN_OK) return stat;
24976
24977 invokeEndElement (pctxt, "integrityCheckValue", -1);
24978 break;
24979
24980 case 3:
24981 pvalue->m.needResponsePresent = 1;
24982
24983 invokeStartElement (pctxt, "needResponse", -1);
24984
24985 stat = DECODEBIT (pctxt, &pvalue->needResponse);
24986 if (stat != ASN_OK) return stat;
24987 invokeBoolValue (pctxt, pvalue->needResponse);
24988
24989 invokeEndElement (pctxt, "needResponse", -1);
24990 break;
24991
24992 case 4:
24993 pvalue->m.capacityPresent = 1;
24994
24995 invokeStartElement (pctxt, "capacity", -1);
24996
24997 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
24998 if (stat != ASN_OK) return stat;
24999
25000 invokeEndElement (pctxt, "capacity", -1);
25001 break;
25002
25003 case 5:
25004 pvalue->m.irrStatusPresent = 1;
25005
25006 invokeStartElement (pctxt, "irrStatus", -1);
25007
25008 stat = asn1PD_H225InfoRequestResponseStatus (pctxt, &pvalue->irrStatus);
25009 if (stat != ASN_OK) return stat;
25010
25011 invokeEndElement (pctxt, "irrStatus", -1);
25012 break;
25013
25014 case 6:
25015 pvalue->m.unsolicitedPresent = 1;
25016
25017 invokeStartElement (pctxt, "unsolicited", -1);
25018
25019 stat = DECODEBIT (pctxt, &pvalue->unsolicited);
25020 if (stat != ASN_OK) return stat;
25021 invokeBoolValue (pctxt, pvalue->unsolicited);
25022
25023 invokeEndElement (pctxt, "unsolicited", -1);
25024 break;
25025
25026 case 7:
25027 pvalue->m.genericDataPresent = 1;
25028
25029 invokeStartElement (pctxt, "genericData", -1);
25030
25031 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
25032 if (stat != ASN_OK) return stat;
25033
25034 invokeEndElement (pctxt, "genericData", -1);
25035 break;
25036
25037 default:
25038 pctxt->buffer.byteIndex += openType.numocts;
25039 }
25040 copyContext (pctxt, &lctxt2);
25041 }
25042 else { /* unknown element */
25043 pctxt->buffer.byteIndex += openType.numocts;
25044 }
25045 }
25046 }
25047 }
25048
25049 return (stat);
25050 }
25051
25052 /**************************************************************/
25053 /* */
25054 /* NonStandardMessage */
25055 /* */
25056 /**************************************************************/
25057
25058 EXTERN int asn1PD_H225NonStandardMessage (OOCTXT* pctxt, H225NonStandardMessage* pvalue)
25059 {
25060 int stat = ASN_OK;
25061 OOCTXT lctxt;
25062 OOCTXT lctxt2;
25063 ASN1OpenType openType;
25064 ASN1UINT bitcnt;
25065 ASN1UINT i;
25066 ASN1BOOL optbit = 0;
25067 ASN1BOOL extbit = 0;
25068
25069 /* extension bit */
25070
25071 DECODEBIT (pctxt, &extbit);
25072
25073 /* optional bits */
25074
25075 memset (&pvalue->m, 0, sizeof(pvalue->m));
25076
25077 /* decode requestSeqNum */
25078
25079 invokeStartElement (pctxt, "requestSeqNum", -1);
25080
25081 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25082 if (stat != ASN_OK) return stat;
25083
25084 invokeEndElement (pctxt, "requestSeqNum", -1);
25085
25086 /* decode nonStandardData */
25087
25088 invokeStartElement (pctxt, "nonStandardData", -1);
25089
25090 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
25091 if (stat != ASN_OK) return stat;
25092
25093 invokeEndElement (pctxt, "nonStandardData", -1);
25094
25095 if (extbit) {
25096
25097 /* decode extension optional bits length */
25098
25099 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25100 if (stat != ASN_OK) return stat;
25101
25102 bitcnt += 1;
25103
25104 ZEROCONTEXT (&lctxt);
25105 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25106 if (stat != ASN_OK) return stat;
25107
25108 stat = moveBitCursor (pctxt, bitcnt);
25109 if (stat != ASN_OK) return stat;
25110
25111 for (i = 0; i < bitcnt; i++) {
25112 DECODEBIT (&lctxt, &optbit);
25113
25114 if (optbit) {
25115 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25116 if (stat != ASN_OK) return stat;
25117
25118 if (i < 5 && openType.numocts > 0) { /* known element */
25119 copyContext (&lctxt2, pctxt);
25120 initContextBuffer (pctxt, openType.data, openType.numocts);
25121
25122 switch (i) {
25123 case 0:
25124 pvalue->m.tokensPresent = 1;
25125
25126 invokeStartElement (pctxt, "tokens", -1);
25127
25128 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25129 if (stat != ASN_OK) return stat;
25130
25131 invokeEndElement (pctxt, "tokens", -1);
25132 break;
25133
25134 case 1:
25135 pvalue->m.cryptoTokensPresent = 1;
25136
25137 invokeStartElement (pctxt, "cryptoTokens", -1);
25138
25139 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25140 if (stat != ASN_OK) return stat;
25141
25142 invokeEndElement (pctxt, "cryptoTokens", -1);
25143 break;
25144
25145 case 2:
25146 pvalue->m.integrityCheckValuePresent = 1;
25147
25148 invokeStartElement (pctxt, "integrityCheckValue", -1);
25149
25150 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25151 if (stat != ASN_OK) return stat;
25152
25153 invokeEndElement (pctxt, "integrityCheckValue", -1);
25154 break;
25155
25156 case 3:
25157 pvalue->m.featureSetPresent = 1;
25158
25159 invokeStartElement (pctxt, "featureSet", -1);
25160
25161 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
25162 if (stat != ASN_OK) return stat;
25163
25164 invokeEndElement (pctxt, "featureSet", -1);
25165 break;
25166
25167 case 4:
25168 pvalue->m.genericDataPresent = 1;
25169
25170 invokeStartElement (pctxt, "genericData", -1);
25171
25172 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
25173 if (stat != ASN_OK) return stat;
25174
25175 invokeEndElement (pctxt, "genericData", -1);
25176 break;
25177
25178 default:
25179 pctxt->buffer.byteIndex += openType.numocts;
25180 }
25181 copyContext (pctxt, &lctxt2);
25182 }
25183 else { /* unknown element */
25184 pctxt->buffer.byteIndex += openType.numocts;
25185 }
25186 }
25187 }
25188 }
25189
25190 return (stat);
25191 }
25192
25193 /**************************************************************/
25194 /* */
25195 /* UnknownMessageResponse */
25196 /* */
25197 /**************************************************************/
25198
25199 EXTERN int asn1PD_H225UnknownMessageResponse (OOCTXT* pctxt, H225UnknownMessageResponse* pvalue)
25200 {
25201 int stat = ASN_OK;
25202 OOCTXT lctxt;
25203 OOCTXT lctxt2;
25204 ASN1OpenType openType;
25205 ASN1UINT bitcnt;
25206 ASN1UINT i;
25207 ASN1BOOL optbit = 0;
25208 ASN1BOOL extbit = 0;
25209
25210 /* extension bit */
25211
25212 DECODEBIT (pctxt, &extbit);
25213
25214 /* optional bits */
25215
25216 memset (&pvalue->m, 0, sizeof(pvalue->m));
25217
25218 /* decode requestSeqNum */
25219
25220 invokeStartElement (pctxt, "requestSeqNum", -1);
25221
25222 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25223 if (stat != ASN_OK) return stat;
25224
25225 invokeEndElement (pctxt, "requestSeqNum", -1);
25226
25227 if (extbit) {
25228
25229 /* decode extension optional bits length */
25230
25231 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25232 if (stat != ASN_OK) return stat;
25233
25234 bitcnt += 1;
25235
25236 ZEROCONTEXT (&lctxt);
25237 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25238 if (stat != ASN_OK) return stat;
25239
25240 stat = moveBitCursor (pctxt, bitcnt);
25241 if (stat != ASN_OK) return stat;
25242
25243 for (i = 0; i < bitcnt; i++) {
25244 DECODEBIT (&lctxt, &optbit);
25245
25246 if (optbit) {
25247 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25248 if (stat != ASN_OK) return stat;
25249
25250 if (i < 4 && openType.numocts > 0) { /* known element */
25251 copyContext (&lctxt2, pctxt);
25252 initContextBuffer (pctxt, openType.data, openType.numocts);
25253
25254 switch (i) {
25255 case 0:
25256 pvalue->m.tokensPresent = 1;
25257
25258 invokeStartElement (pctxt, "tokens", -1);
25259
25260 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25261 if (stat != ASN_OK) return stat;
25262
25263 invokeEndElement (pctxt, "tokens", -1);
25264 break;
25265
25266 case 1:
25267 pvalue->m.cryptoTokensPresent = 1;
25268
25269 invokeStartElement (pctxt, "cryptoTokens", -1);
25270
25271 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25272 if (stat != ASN_OK) return stat;
25273
25274 invokeEndElement (pctxt, "cryptoTokens", -1);
25275 break;
25276
25277 case 2:
25278 pvalue->m.integrityCheckValuePresent = 1;
25279
25280 invokeStartElement (pctxt, "integrityCheckValue", -1);
25281
25282 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25283 if (stat != ASN_OK) return stat;
25284
25285 invokeEndElement (pctxt, "integrityCheckValue", -1);
25286 break;
25287
25288 case 3:
25289 pvalue->m.messageNotUnderstoodPresent = 1;
25290
25291 invokeStartElement (pctxt, "messageNotUnderstood", -1);
25292
25293 stat = decodeDynOctetString (pctxt, (ASN1DynOctStr*)&pvalue->messageNotUnderstood);
25294 if (stat != ASN_OK) return stat;
25295 invokeOctStrValue (pctxt, pvalue->messageNotUnderstood.numocts, pvalue->messageNotUnderstood.data);
25296
25297 invokeEndElement (pctxt, "messageNotUnderstood", -1);
25298 break;
25299
25300 default:
25301 pctxt->buffer.byteIndex += openType.numocts;
25302 }
25303 copyContext (pctxt, &lctxt2);
25304 }
25305 else { /* unknown element */
25306 pctxt->buffer.byteIndex += openType.numocts;
25307 }
25308 }
25309 }
25310 }
25311
25312 return (stat);
25313 }
25314
25315 /**************************************************************/
25316 /* */
25317 /* RequestInProgress */
25318 /* */
25319 /**************************************************************/
25320
25321 EXTERN int asn1PD_H225RequestInProgress (OOCTXT* pctxt, H225RequestInProgress* pvalue)
25322 {
25323 int stat = ASN_OK;
25324 OOCTXT lctxt;
25325 ASN1OpenType openType;
25326 ASN1UINT bitcnt;
25327 ASN1UINT i;
25328 ASN1BOOL optbit = 0;
25329 ASN1BOOL extbit = 0;
25330
25331 /* extension bit */
25332
25333 DECODEBIT (pctxt, &extbit);
25334
25335 /* optional bits */
25336
25337 memset (&pvalue->m, 0, sizeof(pvalue->m));
25338
25339 DECODEBIT (pctxt, &optbit);
25340 pvalue->m.nonStandardDataPresent = optbit;
25341
25342 DECODEBIT (pctxt, &optbit);
25343 pvalue->m.tokensPresent = optbit;
25344
25345 DECODEBIT (pctxt, &optbit);
25346 pvalue->m.cryptoTokensPresent = optbit;
25347
25348 DECODEBIT (pctxt, &optbit);
25349 pvalue->m.integrityCheckValuePresent = optbit;
25350
25351 /* decode requestSeqNum */
25352
25353 invokeStartElement (pctxt, "requestSeqNum", -1);
25354
25355 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25356 if (stat != ASN_OK) return stat;
25357
25358 invokeEndElement (pctxt, "requestSeqNum", -1);
25359
25360 /* decode nonStandardData */
25361
25362 if (pvalue->m.nonStandardDataPresent) {
25363 invokeStartElement (pctxt, "nonStandardData", -1);
25364
25365 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
25366 if (stat != ASN_OK) return stat;
25367
25368 invokeEndElement (pctxt, "nonStandardData", -1);
25369 }
25370
25371 /* decode tokens */
25372
25373 if (pvalue->m.tokensPresent) {
25374 invokeStartElement (pctxt, "tokens", -1);
25375
25376 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25377 if (stat != ASN_OK) return stat;
25378
25379 invokeEndElement (pctxt, "tokens", -1);
25380 }
25381
25382 /* decode cryptoTokens */
25383
25384 if (pvalue->m.cryptoTokensPresent) {
25385 invokeStartElement (pctxt, "cryptoTokens", -1);
25386
25387 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25388 if (stat != ASN_OK) return stat;
25389
25390 invokeEndElement (pctxt, "cryptoTokens", -1);
25391 }
25392
25393 /* decode integrityCheckValue */
25394
25395 if (pvalue->m.integrityCheckValuePresent) {
25396 invokeStartElement (pctxt, "integrityCheckValue", -1);
25397
25398 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25399 if (stat != ASN_OK) return stat;
25400
25401 invokeEndElement (pctxt, "integrityCheckValue", -1);
25402 }
25403
25404 /* decode delay */
25405
25406 invokeStartElement (pctxt, "delay", -1);
25407
25408 stat = decodeConsUInt16 (pctxt, &pvalue->delay, 1U, 65535U);
25409 if (stat != ASN_OK) return stat;
25410 invokeUIntValue (pctxt, pvalue->delay);
25411
25412 invokeEndElement (pctxt, "delay", -1);
25413
25414 if (extbit) {
25415
25416 /* decode extension optional bits length */
25417
25418 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25419 if (stat != ASN_OK) return stat;
25420
25421 bitcnt += 1;
25422
25423 ZEROCONTEXT (&lctxt);
25424 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25425 if (stat != ASN_OK) return stat;
25426
25427 stat = moveBitCursor (pctxt, bitcnt);
25428 if (stat != ASN_OK) return stat;
25429
25430 for (i = 0; i < bitcnt; i++) {
25431 DECODEBIT (&lctxt, &optbit);
25432
25433 if (optbit) {
25434 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25435 if (stat != ASN_OK) return stat;
25436
25437 pctxt->buffer.byteIndex += openType.numocts;
25438 }
25439 }
25440 }
25441
25442 return (stat);
25443 }
25444
25445 /**************************************************************/
25446 /* */
25447 /* ResourcesAvailableIndicate */
25448 /* */
25449 /**************************************************************/
25450
25451 EXTERN int asn1PD_H225ResourcesAvailableIndicate (OOCTXT* pctxt, H225ResourcesAvailableIndicate* pvalue)
25452 {
25453 int stat = ASN_OK;
25454 OOCTXT lctxt;
25455 OOCTXT lctxt2;
25456 ASN1OpenType openType;
25457 ASN1UINT bitcnt;
25458 ASN1UINT i;
25459 ASN1BOOL optbit = 0;
25460 ASN1BOOL extbit = 0;
25461
25462 /* extension bit */
25463
25464 DECODEBIT (pctxt, &extbit);
25465
25466 /* optional bits */
25467
25468 memset (&pvalue->m, 0, sizeof(pvalue->m));
25469
25470 DECODEBIT (pctxt, &optbit);
25471 pvalue->m.nonStandardDataPresent = optbit;
25472
25473 DECODEBIT (pctxt, &optbit);
25474 pvalue->m.tokensPresent = optbit;
25475
25476 DECODEBIT (pctxt, &optbit);
25477 pvalue->m.cryptoTokensPresent = optbit;
25478
25479 DECODEBIT (pctxt, &optbit);
25480 pvalue->m.integrityCheckValuePresent = optbit;
25481
25482 /* decode requestSeqNum */
25483
25484 invokeStartElement (pctxt, "requestSeqNum", -1);
25485
25486 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25487 if (stat != ASN_OK) return stat;
25488
25489 invokeEndElement (pctxt, "requestSeqNum", -1);
25490
25491 /* decode protocolIdentifier */
25492
25493 invokeStartElement (pctxt, "protocolIdentifier", -1);
25494
25495 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
25496 if (stat != ASN_OK) return stat;
25497
25498 invokeEndElement (pctxt, "protocolIdentifier", -1);
25499
25500 /* decode nonStandardData */
25501
25502 if (pvalue->m.nonStandardDataPresent) {
25503 invokeStartElement (pctxt, "nonStandardData", -1);
25504
25505 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
25506 if (stat != ASN_OK) return stat;
25507
25508 invokeEndElement (pctxt, "nonStandardData", -1);
25509 }
25510
25511 /* decode endpointIdentifier */
25512
25513 invokeStartElement (pctxt, "endpointIdentifier", -1);
25514
25515 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
25516 if (stat != ASN_OK) return stat;
25517
25518 invokeEndElement (pctxt, "endpointIdentifier", -1);
25519
25520 /* decode protocols */
25521
25522 invokeStartElement (pctxt, "protocols", -1);
25523
25524 stat = asn1PD_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->protocols);
25525 if (stat != ASN_OK) return stat;
25526
25527 invokeEndElement (pctxt, "protocols", -1);
25528
25529 /* decode almostOutOfResources */
25530
25531 invokeStartElement (pctxt, "almostOutOfResources", -1);
25532
25533 stat = DECODEBIT (pctxt, &pvalue->almostOutOfResources);
25534 if (stat != ASN_OK) return stat;
25535 invokeBoolValue (pctxt, pvalue->almostOutOfResources);
25536
25537 invokeEndElement (pctxt, "almostOutOfResources", -1);
25538
25539 /* decode tokens */
25540
25541 if (pvalue->m.tokensPresent) {
25542 invokeStartElement (pctxt, "tokens", -1);
25543
25544 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25545 if (stat != ASN_OK) return stat;
25546
25547 invokeEndElement (pctxt, "tokens", -1);
25548 }
25549
25550 /* decode cryptoTokens */
25551
25552 if (pvalue->m.cryptoTokensPresent) {
25553 invokeStartElement (pctxt, "cryptoTokens", -1);
25554
25555 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25556 if (stat != ASN_OK) return stat;
25557
25558 invokeEndElement (pctxt, "cryptoTokens", -1);
25559 }
25560
25561 /* decode integrityCheckValue */
25562
25563 if (pvalue->m.integrityCheckValuePresent) {
25564 invokeStartElement (pctxt, "integrityCheckValue", -1);
25565
25566 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25567 if (stat != ASN_OK) return stat;
25568
25569 invokeEndElement (pctxt, "integrityCheckValue", -1);
25570 }
25571
25572 if (extbit) {
25573
25574 /* decode extension optional bits length */
25575
25576 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25577 if (stat != ASN_OK) return stat;
25578
25579 bitcnt += 1;
25580
25581 ZEROCONTEXT (&lctxt);
25582 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25583 if (stat != ASN_OK) return stat;
25584
25585 stat = moveBitCursor (pctxt, bitcnt);
25586 if (stat != ASN_OK) return stat;
25587
25588 for (i = 0; i < bitcnt; i++) {
25589 DECODEBIT (&lctxt, &optbit);
25590
25591 if (optbit) {
25592 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25593 if (stat != ASN_OK) return stat;
25594
25595 if (i < 2 && openType.numocts > 0) { /* known element */
25596 copyContext (&lctxt2, pctxt);
25597 initContextBuffer (pctxt, openType.data, openType.numocts);
25598
25599 switch (i) {
25600 case 0:
25601 pvalue->m.capacityPresent = 1;
25602
25603 invokeStartElement (pctxt, "capacity", -1);
25604
25605 stat = asn1PD_H225CallCapacity (pctxt, &pvalue->capacity);
25606 if (stat != ASN_OK) return stat;
25607
25608 invokeEndElement (pctxt, "capacity", -1);
25609 break;
25610
25611 case 1:
25612 pvalue->m.genericDataPresent = 1;
25613
25614 invokeStartElement (pctxt, "genericData", -1);
25615
25616 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
25617 if (stat != ASN_OK) return stat;
25618
25619 invokeEndElement (pctxt, "genericData", -1);
25620 break;
25621
25622 default:
25623 pctxt->buffer.byteIndex += openType.numocts;
25624 }
25625 copyContext (pctxt, &lctxt2);
25626 }
25627 else { /* unknown element */
25628 pctxt->buffer.byteIndex += openType.numocts;
25629 }
25630 }
25631 }
25632 }
25633
25634 return (stat);
25635 }
25636
25637 /**************************************************************/
25638 /* */
25639 /* ResourcesAvailableConfirm */
25640 /* */
25641 /**************************************************************/
25642
25643 EXTERN int asn1PD_H225ResourcesAvailableConfirm (OOCTXT* pctxt, H225ResourcesAvailableConfirm* pvalue)
25644 {
25645 int stat = ASN_OK;
25646 OOCTXT lctxt;
25647 OOCTXT lctxt2;
25648 ASN1OpenType openType;
25649 ASN1UINT bitcnt;
25650 ASN1UINT i;
25651 ASN1BOOL optbit = 0;
25652 ASN1BOOL extbit = 0;
25653
25654 /* extension bit */
25655
25656 DECODEBIT (pctxt, &extbit);
25657
25658 /* optional bits */
25659
25660 memset (&pvalue->m, 0, sizeof(pvalue->m));
25661
25662 DECODEBIT (pctxt, &optbit);
25663 pvalue->m.nonStandardDataPresent = optbit;
25664
25665 DECODEBIT (pctxt, &optbit);
25666 pvalue->m.tokensPresent = optbit;
25667
25668 DECODEBIT (pctxt, &optbit);
25669 pvalue->m.cryptoTokensPresent = optbit;
25670
25671 DECODEBIT (pctxt, &optbit);
25672 pvalue->m.integrityCheckValuePresent = optbit;
25673
25674 /* decode requestSeqNum */
25675
25676 invokeStartElement (pctxt, "requestSeqNum", -1);
25677
25678 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25679 if (stat != ASN_OK) return stat;
25680
25681 invokeEndElement (pctxt, "requestSeqNum", -1);
25682
25683 /* decode protocolIdentifier */
25684
25685 invokeStartElement (pctxt, "protocolIdentifier", -1);
25686
25687 stat = asn1PD_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
25688 if (stat != ASN_OK) return stat;
25689
25690 invokeEndElement (pctxt, "protocolIdentifier", -1);
25691
25692 /* decode nonStandardData */
25693
25694 if (pvalue->m.nonStandardDataPresent) {
25695 invokeStartElement (pctxt, "nonStandardData", -1);
25696
25697 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
25698 if (stat != ASN_OK) return stat;
25699
25700 invokeEndElement (pctxt, "nonStandardData", -1);
25701 }
25702
25703 /* decode tokens */
25704
25705 if (pvalue->m.tokensPresent) {
25706 invokeStartElement (pctxt, "tokens", -1);
25707
25708 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25709 if (stat != ASN_OK) return stat;
25710
25711 invokeEndElement (pctxt, "tokens", -1);
25712 }
25713
25714 /* decode cryptoTokens */
25715
25716 if (pvalue->m.cryptoTokensPresent) {
25717 invokeStartElement (pctxt, "cryptoTokens", -1);
25718
25719 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25720 if (stat != ASN_OK) return stat;
25721
25722 invokeEndElement (pctxt, "cryptoTokens", -1);
25723 }
25724
25725 /* decode integrityCheckValue */
25726
25727 if (pvalue->m.integrityCheckValuePresent) {
25728 invokeStartElement (pctxt, "integrityCheckValue", -1);
25729
25730 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25731 if (stat != ASN_OK) return stat;
25732
25733 invokeEndElement (pctxt, "integrityCheckValue", -1);
25734 }
25735
25736 if (extbit) {
25737
25738 /* decode extension optional bits length */
25739
25740 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25741 if (stat != ASN_OK) return stat;
25742
25743 bitcnt += 1;
25744
25745 ZEROCONTEXT (&lctxt);
25746 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25747 if (stat != ASN_OK) return stat;
25748
25749 stat = moveBitCursor (pctxt, bitcnt);
25750 if (stat != ASN_OK) return stat;
25751
25752 for (i = 0; i < bitcnt; i++) {
25753 DECODEBIT (&lctxt, &optbit);
25754
25755 if (optbit) {
25756 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25757 if (stat != ASN_OK) return stat;
25758
25759 if (i < 1 && openType.numocts > 0) { /* known element */
25760 copyContext (&lctxt2, pctxt);
25761 initContextBuffer (pctxt, openType.data, openType.numocts);
25762
25763 switch (i) {
25764 case 0:
25765 pvalue->m.genericDataPresent = 1;
25766
25767 invokeStartElement (pctxt, "genericData", -1);
25768
25769 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
25770 if (stat != ASN_OK) return stat;
25771
25772 invokeEndElement (pctxt, "genericData", -1);
25773 break;
25774
25775 default:
25776 pctxt->buffer.byteIndex += openType.numocts;
25777 }
25778 copyContext (pctxt, &lctxt2);
25779 }
25780 else { /* unknown element */
25781 pctxt->buffer.byteIndex += openType.numocts;
25782 }
25783 }
25784 }
25785 }
25786
25787 return (stat);
25788 }
25789
25790 /**************************************************************/
25791 /* */
25792 /* InfoRequestAck */
25793 /* */
25794 /**************************************************************/
25795
25796 EXTERN int asn1PD_H225InfoRequestAck (OOCTXT* pctxt, H225InfoRequestAck* pvalue)
25797 {
25798 int stat = ASN_OK;
25799 OOCTXT lctxt;
25800 ASN1OpenType openType;
25801 ASN1UINT bitcnt;
25802 ASN1UINT i;
25803 ASN1BOOL optbit = 0;
25804 ASN1BOOL extbit = 0;
25805
25806 /* extension bit */
25807
25808 DECODEBIT (pctxt, &extbit);
25809
25810 /* optional bits */
25811
25812 memset (&pvalue->m, 0, sizeof(pvalue->m));
25813
25814 DECODEBIT (pctxt, &optbit);
25815 pvalue->m.nonStandardDataPresent = optbit;
25816
25817 DECODEBIT (pctxt, &optbit);
25818 pvalue->m.tokensPresent = optbit;
25819
25820 DECODEBIT (pctxt, &optbit);
25821 pvalue->m.cryptoTokensPresent = optbit;
25822
25823 DECODEBIT (pctxt, &optbit);
25824 pvalue->m.integrityCheckValuePresent = optbit;
25825
25826 /* decode requestSeqNum */
25827
25828 invokeStartElement (pctxt, "requestSeqNum", -1);
25829
25830 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
25831 if (stat != ASN_OK) return stat;
25832
25833 invokeEndElement (pctxt, "requestSeqNum", -1);
25834
25835 /* decode nonStandardData */
25836
25837 if (pvalue->m.nonStandardDataPresent) {
25838 invokeStartElement (pctxt, "nonStandardData", -1);
25839
25840 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
25841 if (stat != ASN_OK) return stat;
25842
25843 invokeEndElement (pctxt, "nonStandardData", -1);
25844 }
25845
25846 /* decode tokens */
25847
25848 if (pvalue->m.tokensPresent) {
25849 invokeStartElement (pctxt, "tokens", -1);
25850
25851 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
25852 if (stat != ASN_OK) return stat;
25853
25854 invokeEndElement (pctxt, "tokens", -1);
25855 }
25856
25857 /* decode cryptoTokens */
25858
25859 if (pvalue->m.cryptoTokensPresent) {
25860 invokeStartElement (pctxt, "cryptoTokens", -1);
25861
25862 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
25863 if (stat != ASN_OK) return stat;
25864
25865 invokeEndElement (pctxt, "cryptoTokens", -1);
25866 }
25867
25868 /* decode integrityCheckValue */
25869
25870 if (pvalue->m.integrityCheckValuePresent) {
25871 invokeStartElement (pctxt, "integrityCheckValue", -1);
25872
25873 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
25874 if (stat != ASN_OK) return stat;
25875
25876 invokeEndElement (pctxt, "integrityCheckValue", -1);
25877 }
25878
25879 if (extbit) {
25880
25881 /* decode extension optional bits length */
25882
25883 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
25884 if (stat != ASN_OK) return stat;
25885
25886 bitcnt += 1;
25887
25888 ZEROCONTEXT (&lctxt);
25889 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
25890 if (stat != ASN_OK) return stat;
25891
25892 stat = moveBitCursor (pctxt, bitcnt);
25893 if (stat != ASN_OK) return stat;
25894
25895 for (i = 0; i < bitcnt; i++) {
25896 DECODEBIT (&lctxt, &optbit);
25897
25898 if (optbit) {
25899 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25900 if (stat != ASN_OK) return stat;
25901
25902 pctxt->buffer.byteIndex += openType.numocts;
25903 }
25904 }
25905 }
25906
25907 return (stat);
25908 }
25909
25910 /**************************************************************/
25911 /* */
25912 /* InfoRequestNakReason */
25913 /* */
25914 /**************************************************************/
25915
25916 EXTERN int asn1PD_H225InfoRequestNakReason (OOCTXT* pctxt, H225InfoRequestNakReason* pvalue)
25917 {
25918 int stat = ASN_OK;
25919 ASN1UINT ui;
25920 ASN1OpenType openType;
25921 ASN1BOOL extbit = 0;
25922 OOCTXT lctxt;
25923
25924 /* extension bit */
25925
25926 DECODEBIT (pctxt, &extbit);
25927
25928 if (!extbit) {
25929 stat = decodeConsUnsigned (pctxt, &ui, 0, 2);
25930 if (stat != ASN_OK) return stat;
25931 else pvalue->t = ui + 1;
25932
25933 switch (ui) {
25934 /* notRegistered */
25935 case 0:
25936 invokeStartElement (pctxt, "notRegistered", -1);
25937
25938 /* NULL */
25939 invokeNullValue (pctxt);
25940
25941 invokeEndElement (pctxt, "notRegistered", -1);
25942
25943 break;
25944
25945 /* securityDenial */
25946 case 1:
25947 invokeStartElement (pctxt, "securityDenial", -1);
25948
25949 /* NULL */
25950 invokeNullValue (pctxt);
25951
25952 invokeEndElement (pctxt, "securityDenial", -1);
25953
25954 break;
25955
25956 /* undefinedReason */
25957 case 2:
25958 invokeStartElement (pctxt, "undefinedReason", -1);
25959
25960 /* NULL */
25961 invokeNullValue (pctxt);
25962
25963 invokeEndElement (pctxt, "undefinedReason", -1);
25964
25965 break;
25966
25967 default:
25968 return ASN_E_INVOPT;
25969 }
25970 }
25971 else {
25972 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
25973 if (stat != ASN_OK) return stat;
25974 else pvalue->t = ui + 4;
25975
25976 stat = decodeByteAlign (pctxt);
25977 if (stat != ASN_OK) return stat;
25978
25979 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
25980 if (stat != ASN_OK) return stat;
25981
25982 copyContext (&lctxt, pctxt);
25983 initContextBuffer (pctxt, openType.data, openType.numocts);
25984
25985 switch (pvalue->t) {
25986 /* securityError */
25987 case 4:
25988 invokeStartElement (pctxt, "securityError", -1);
25989
25990 pvalue->u.securityError = ALLOC_ASN1ELEM (pctxt, H225SecurityErrors2);
25991
25992 stat = asn1PD_H225SecurityErrors2 (pctxt, pvalue->u.securityError);
25993 if (stat != ASN_OK) return stat;
25994
25995 invokeEndElement (pctxt, "securityError", -1);
25996
25997 break;
25998
25999 default:;
26000 }
26001
26002 copyContext (pctxt, &lctxt);
26003 }
26004
26005 return (stat);
26006 }
26007
26008 /**************************************************************/
26009 /* */
26010 /* InfoRequestNak */
26011 /* */
26012 /**************************************************************/
26013
26014 EXTERN int asn1PD_H225InfoRequestNak (OOCTXT* pctxt, H225InfoRequestNak* pvalue)
26015 {
26016 int stat = ASN_OK;
26017 OOCTXT lctxt;
26018 ASN1OpenType openType;
26019 ASN1UINT bitcnt;
26020 ASN1UINT i;
26021 ASN1BOOL optbit = 0;
26022 ASN1BOOL extbit = 0;
26023
26024 /* extension bit */
26025
26026 DECODEBIT (pctxt, &extbit);
26027
26028 /* optional bits */
26029
26030 memset (&pvalue->m, 0, sizeof(pvalue->m));
26031
26032 DECODEBIT (pctxt, &optbit);
26033 pvalue->m.nonStandardDataPresent = optbit;
26034
26035 DECODEBIT (pctxt, &optbit);
26036 pvalue->m.altGKInfoPresent = optbit;
26037
26038 DECODEBIT (pctxt, &optbit);
26039 pvalue->m.tokensPresent = optbit;
26040
26041 DECODEBIT (pctxt, &optbit);
26042 pvalue->m.cryptoTokensPresent = optbit;
26043
26044 DECODEBIT (pctxt, &optbit);
26045 pvalue->m.integrityCheckValuePresent = optbit;
26046
26047 /* decode requestSeqNum */
26048
26049 invokeStartElement (pctxt, "requestSeqNum", -1);
26050
26051 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
26052 if (stat != ASN_OK) return stat;
26053
26054 invokeEndElement (pctxt, "requestSeqNum", -1);
26055
26056 /* decode nonStandardData */
26057
26058 if (pvalue->m.nonStandardDataPresent) {
26059 invokeStartElement (pctxt, "nonStandardData", -1);
26060
26061 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
26062 if (stat != ASN_OK) return stat;
26063
26064 invokeEndElement (pctxt, "nonStandardData", -1);
26065 }
26066
26067 /* decode nakReason */
26068
26069 invokeStartElement (pctxt, "nakReason", -1);
26070
26071 stat = asn1PD_H225InfoRequestNakReason (pctxt, &pvalue->nakReason);
26072 if (stat != ASN_OK) return stat;
26073
26074 invokeEndElement (pctxt, "nakReason", -1);
26075
26076 /* decode altGKInfo */
26077
26078 if (pvalue->m.altGKInfoPresent) {
26079 invokeStartElement (pctxt, "altGKInfo", -1);
26080
26081 stat = asn1PD_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
26082 if (stat != ASN_OK) return stat;
26083
26084 invokeEndElement (pctxt, "altGKInfo", -1);
26085 }
26086
26087 /* decode tokens */
26088
26089 if (pvalue->m.tokensPresent) {
26090 invokeStartElement (pctxt, "tokens", -1);
26091
26092 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
26093 if (stat != ASN_OK) return stat;
26094
26095 invokeEndElement (pctxt, "tokens", -1);
26096 }
26097
26098 /* decode cryptoTokens */
26099
26100 if (pvalue->m.cryptoTokensPresent) {
26101 invokeStartElement (pctxt, "cryptoTokens", -1);
26102
26103 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
26104 if (stat != ASN_OK) return stat;
26105
26106 invokeEndElement (pctxt, "cryptoTokens", -1);
26107 }
26108
26109 /* decode integrityCheckValue */
26110
26111 if (pvalue->m.integrityCheckValuePresent) {
26112 invokeStartElement (pctxt, "integrityCheckValue", -1);
26113
26114 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
26115 if (stat != ASN_OK) return stat;
26116
26117 invokeEndElement (pctxt, "integrityCheckValue", -1);
26118 }
26119
26120 if (extbit) {
26121
26122 /* decode extension optional bits length */
26123
26124 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
26125 if (stat != ASN_OK) return stat;
26126
26127 bitcnt += 1;
26128
26129 ZEROCONTEXT (&lctxt);
26130 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
26131 if (stat != ASN_OK) return stat;
26132
26133 stat = moveBitCursor (pctxt, bitcnt);
26134 if (stat != ASN_OK) return stat;
26135
26136 for (i = 0; i < bitcnt; i++) {
26137 DECODEBIT (&lctxt, &optbit);
26138
26139 if (optbit) {
26140 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
26141 if (stat != ASN_OK) return stat;
26142
26143 pctxt->buffer.byteIndex += openType.numocts;
26144 }
26145 }
26146 }
26147
26148 return (stat);
26149 }
26150
26151 /**************************************************************/
26152 /* */
26153 /* ServiceControlIndication_callSpecific */
26154 /* */
26155 /**************************************************************/
26156
26157 EXTERN int asn1PD_H225ServiceControlIndication_callSpecific (OOCTXT* pctxt, H225ServiceControlIndication_callSpecific* pvalue)
26158 {
26159 int stat = ASN_OK;
26160 OOCTXT lctxt;
26161 ASN1OpenType openType;
26162 ASN1UINT bitcnt;
26163 ASN1UINT i;
26164 ASN1BOOL optbit = 0;
26165 ASN1BOOL extbit = 0;
26166
26167 /* extension bit */
26168
26169 DECODEBIT (pctxt, &extbit);
26170
26171 /* decode callIdentifier */
26172
26173 invokeStartElement (pctxt, "callIdentifier", -1);
26174
26175 stat = asn1PD_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
26176 if (stat != ASN_OK) return stat;
26177
26178 invokeEndElement (pctxt, "callIdentifier", -1);
26179
26180 /* decode conferenceID */
26181
26182 invokeStartElement (pctxt, "conferenceID", -1);
26183
26184 stat = asn1PD_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
26185 if (stat != ASN_OK) return stat;
26186
26187 invokeEndElement (pctxt, "conferenceID", -1);
26188
26189 /* decode answeredCall */
26190
26191 invokeStartElement (pctxt, "answeredCall", -1);
26192
26193 stat = DECODEBIT (pctxt, &pvalue->answeredCall);
26194 if (stat != ASN_OK) return stat;
26195 invokeBoolValue (pctxt, pvalue->answeredCall);
26196
26197 invokeEndElement (pctxt, "answeredCall", -1);
26198
26199 if (extbit) {
26200
26201 /* decode extension optional bits length */
26202
26203 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
26204 if (stat != ASN_OK) return stat;
26205
26206 bitcnt += 1;
26207
26208 ZEROCONTEXT (&lctxt);
26209 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
26210 if (stat != ASN_OK) return stat;
26211
26212 stat = moveBitCursor (pctxt, bitcnt);
26213 if (stat != ASN_OK) return stat;
26214
26215 for (i = 0; i < bitcnt; i++) {
26216 DECODEBIT (&lctxt, &optbit);
26217
26218 if (optbit) {
26219 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
26220 if (stat != ASN_OK) return stat;
26221
26222 pctxt->buffer.byteIndex += openType.numocts;
26223 }
26224 }
26225 }
26226
26227 return (stat);
26228 }
26229
26230 /**************************************************************/
26231 /* */
26232 /* ServiceControlIndication */
26233 /* */
26234 /**************************************************************/
26235
26236 EXTERN int asn1PD_H225ServiceControlIndication (OOCTXT* pctxt, H225ServiceControlIndication* pvalue)
26237 {
26238 int stat = ASN_OK;
26239 OOCTXT lctxt;
26240 ASN1OpenType openType;
26241 ASN1UINT bitcnt;
26242 ASN1UINT i;
26243 ASN1BOOL optbit = 0;
26244 ASN1BOOL extbit = 0;
26245
26246 /* extension bit */
26247
26248 DECODEBIT (pctxt, &extbit);
26249
26250 /* optional bits */
26251
26252 memset (&pvalue->m, 0, sizeof(pvalue->m));
26253
26254 DECODEBIT (pctxt, &optbit);
26255 pvalue->m.nonStandardDataPresent = optbit;
26256
26257 DECODEBIT (pctxt, &optbit);
26258 pvalue->m.endpointIdentifierPresent = optbit;
26259
26260 DECODEBIT (pctxt, &optbit);
26261 pvalue->m.callSpecificPresent = optbit;
26262
26263 DECODEBIT (pctxt, &optbit);
26264 pvalue->m.tokensPresent = optbit;
26265
26266 DECODEBIT (pctxt, &optbit);
26267 pvalue->m.cryptoTokensPresent = optbit;
26268
26269 DECODEBIT (pctxt, &optbit);
26270 pvalue->m.integrityCheckValuePresent = optbit;
26271
26272 DECODEBIT (pctxt, &optbit);
26273 pvalue->m.featureSetPresent = optbit;
26274
26275 DECODEBIT (pctxt, &optbit);
26276 pvalue->m.genericDataPresent = optbit;
26277
26278 /* decode requestSeqNum */
26279
26280 invokeStartElement (pctxt, "requestSeqNum", -1);
26281
26282 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
26283 if (stat != ASN_OK) return stat;
26284
26285 invokeEndElement (pctxt, "requestSeqNum", -1);
26286
26287 /* decode nonStandardData */
26288
26289 if (pvalue->m.nonStandardDataPresent) {
26290 invokeStartElement (pctxt, "nonStandardData", -1);
26291
26292 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
26293 if (stat != ASN_OK) return stat;
26294
26295 invokeEndElement (pctxt, "nonStandardData", -1);
26296 }
26297
26298 /* decode serviceControl */
26299
26300 invokeStartElement (pctxt, "serviceControl", -1);
26301
26302 stat = asn1PD_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
26303 if (stat != ASN_OK) return stat;
26304
26305 invokeEndElement (pctxt, "serviceControl", -1);
26306
26307 /* decode endpointIdentifier */
26308
26309 if (pvalue->m.endpointIdentifierPresent) {
26310 invokeStartElement (pctxt, "endpointIdentifier", -1);
26311
26312 stat = asn1PD_H225EndpointIdentifier (pctxt, &pvalue->endpointIdentifier);
26313 if (stat != ASN_OK) return stat;
26314
26315 invokeEndElement (pctxt, "endpointIdentifier", -1);
26316 }
26317
26318 /* decode callSpecific */
26319
26320 if (pvalue->m.callSpecificPresent) {
26321 invokeStartElement (pctxt, "callSpecific", -1);
26322
26323 stat = asn1PD_H225ServiceControlIndication_callSpecific (pctxt, &pvalue->callSpecific);
26324 if (stat != ASN_OK) return stat;
26325
26326 invokeEndElement (pctxt, "callSpecific", -1);
26327 }
26328
26329 /* decode tokens */
26330
26331 if (pvalue->m.tokensPresent) {
26332 invokeStartElement (pctxt, "tokens", -1);
26333
26334 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
26335 if (stat != ASN_OK) return stat;
26336
26337 invokeEndElement (pctxt, "tokens", -1);
26338 }
26339
26340 /* decode cryptoTokens */
26341
26342 if (pvalue->m.cryptoTokensPresent) {
26343 invokeStartElement (pctxt, "cryptoTokens", -1);
26344
26345 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
26346 if (stat != ASN_OK) return stat;
26347
26348 invokeEndElement (pctxt, "cryptoTokens", -1);
26349 }
26350
26351 /* decode integrityCheckValue */
26352
26353 if (pvalue->m.integrityCheckValuePresent) {
26354 invokeStartElement (pctxt, "integrityCheckValue", -1);
26355
26356 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
26357 if (stat != ASN_OK) return stat;
26358
26359 invokeEndElement (pctxt, "integrityCheckValue", -1);
26360 }
26361
26362 /* decode featureSet */
26363
26364 if (pvalue->m.featureSetPresent) {
26365 invokeStartElement (pctxt, "featureSet", -1);
26366
26367 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
26368 if (stat != ASN_OK) return stat;
26369
26370 invokeEndElement (pctxt, "featureSet", -1);
26371 }
26372
26373 /* decode genericData */
26374
26375 if (pvalue->m.genericDataPresent) {
26376 invokeStartElement (pctxt, "genericData", -1);
26377
26378 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
26379 if (stat != ASN_OK) return stat;
26380
26381 invokeEndElement (pctxt, "genericData", -1);
26382 }
26383
26384 if (extbit) {
26385
26386 /* decode extension optional bits length */
26387
26388 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
26389 if (stat != ASN_OK) return stat;
26390
26391 bitcnt += 1;
26392
26393 ZEROCONTEXT (&lctxt);
26394 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
26395 if (stat != ASN_OK) return stat;
26396
26397 stat = moveBitCursor (pctxt, bitcnt);
26398 if (stat != ASN_OK) return stat;
26399
26400 for (i = 0; i < bitcnt; i++) {
26401 DECODEBIT (&lctxt, &optbit);
26402
26403 if (optbit) {
26404 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
26405 if (stat != ASN_OK) return stat;
26406
26407 pctxt->buffer.byteIndex += openType.numocts;
26408 }
26409 }
26410 }
26411
26412 return (stat);
26413 }
26414
26415 /**************************************************************/
26416 /* */
26417 /* ServiceControlResponse_result */
26418 /* */
26419 /**************************************************************/
26420
26421 EXTERN int asn1PD_H225ServiceControlResponse_result (OOCTXT* pctxt, H225ServiceControlResponse_result* pvalue)
26422 {
26423 int stat = ASN_OK;
26424 ASN1UINT ui;
26425 ASN1OpenType openType;
26426 ASN1BOOL extbit = 0;
26427 extbit = 0;
26428
26429 /* extension bit */
26430
26431 DECODEBIT (pctxt, &extbit);
26432
26433 if (!extbit) {
26434 stat = decodeConsUnsigned (pctxt, &ui, 0, 4);
26435 if (stat != ASN_OK) return stat;
26436 else pvalue->t = ui + 1;
26437
26438 switch (ui) {
26439 /* started */
26440 case 0:
26441 invokeStartElement (pctxt, "started", -1);
26442
26443 /* NULL */
26444 invokeNullValue (pctxt);
26445
26446 invokeEndElement (pctxt, "started", -1);
26447
26448 break;
26449
26450 /* failed */
26451 case 1:
26452 invokeStartElement (pctxt, "failed", -1);
26453
26454 /* NULL */
26455 invokeNullValue (pctxt);
26456
26457 invokeEndElement (pctxt, "failed", -1);
26458
26459 break;
26460
26461 /* stopped */
26462 case 2:
26463 invokeStartElement (pctxt, "stopped", -1);
26464
26465 /* NULL */
26466 invokeNullValue (pctxt);
26467
26468 invokeEndElement (pctxt, "stopped", -1);
26469
26470 break;
26471
26472 /* notAvailable */
26473 case 3:
26474 invokeStartElement (pctxt, "notAvailable", -1);
26475
26476 /* NULL */
26477 invokeNullValue (pctxt);
26478
26479 invokeEndElement (pctxt, "notAvailable", -1);
26480
26481 break;
26482
26483 /* neededFeatureNotSupported */
26484 case 4:
26485 invokeStartElement (pctxt, "neededFeatureNotSupported", -1);
26486
26487 /* NULL */
26488 invokeNullValue (pctxt);
26489
26490 invokeEndElement (pctxt, "neededFeatureNotSupported", -1);
26491
26492 break;
26493
26494 default:
26495 return ASN_E_INVOPT;
26496 }
26497 }
26498 else {
26499 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
26500 if (stat != ASN_OK) return stat;
26501 else pvalue->t = ui + 6;
26502
26503 stat = decodeByteAlign (pctxt);
26504 if (stat != ASN_OK) return stat;
26505
26506 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
26507 if (stat != ASN_OK) return stat;
26508
26509 }
26510
26511 return (stat);
26512 }
26513
26514 /**************************************************************/
26515 /* */
26516 /* ServiceControlResponse */
26517 /* */
26518 /**************************************************************/
26519
26520 EXTERN int asn1PD_H225ServiceControlResponse (OOCTXT* pctxt, H225ServiceControlResponse* pvalue)
26521 {
26522 int stat = ASN_OK;
26523 OOCTXT lctxt;
26524 ASN1OpenType openType;
26525 ASN1UINT bitcnt;
26526 ASN1UINT i;
26527 ASN1BOOL optbit = 0;
26528 ASN1BOOL extbit = 0;
26529
26530 /* extension bit */
26531
26532 DECODEBIT (pctxt, &extbit);
26533
26534 /* optional bits */
26535
26536 memset (&pvalue->m, 0, sizeof(pvalue->m));
26537
26538 DECODEBIT (pctxt, &optbit);
26539 pvalue->m.resultPresent = optbit;
26540
26541 DECODEBIT (pctxt, &optbit);
26542 pvalue->m.nonStandardDataPresent = optbit;
26543
26544 DECODEBIT (pctxt, &optbit);
26545 pvalue->m.tokensPresent = optbit;
26546
26547 DECODEBIT (pctxt, &optbit);
26548 pvalue->m.cryptoTokensPresent = optbit;
26549
26550 DECODEBIT (pctxt, &optbit);
26551 pvalue->m.integrityCheckValuePresent = optbit;
26552
26553 DECODEBIT (pctxt, &optbit);
26554 pvalue->m.featureSetPresent = optbit;
26555
26556 DECODEBIT (pctxt, &optbit);
26557 pvalue->m.genericDataPresent = optbit;
26558
26559 /* decode requestSeqNum */
26560
26561 invokeStartElement (pctxt, "requestSeqNum", -1);
26562
26563 stat = asn1PD_H225RequestSeqNum (pctxt, &pvalue->requestSeqNum);
26564 if (stat != ASN_OK) return stat;
26565
26566 invokeEndElement (pctxt, "requestSeqNum", -1);
26567
26568 /* decode result */
26569
26570 if (pvalue->m.resultPresent) {
26571 invokeStartElement (pctxt, "result", -1);
26572
26573 stat = asn1PD_H225ServiceControlResponse_result (pctxt, &pvalue->result);
26574 if (stat != ASN_OK) return stat;
26575
26576 invokeEndElement (pctxt, "result", -1);
26577 }
26578
26579 /* decode nonStandardData */
26580
26581 if (pvalue->m.nonStandardDataPresent) {
26582 invokeStartElement (pctxt, "nonStandardData", -1);
26583
26584 stat = asn1PD_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
26585 if (stat != ASN_OK) return stat;
26586
26587 invokeEndElement (pctxt, "nonStandardData", -1);
26588 }
26589
26590 /* decode tokens */
26591
26592 if (pvalue->m.tokensPresent) {
26593 invokeStartElement (pctxt, "tokens", -1);
26594
26595 stat = asn1PD_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
26596 if (stat != ASN_OK) return stat;
26597
26598 invokeEndElement (pctxt, "tokens", -1);
26599 }
26600
26601 /* decode cryptoTokens */
26602
26603 if (pvalue->m.cryptoTokensPresent) {
26604 invokeStartElement (pctxt, "cryptoTokens", -1);
26605
26606 stat = asn1PD_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
26607 if (stat != ASN_OK) return stat;
26608
26609 invokeEndElement (pctxt, "cryptoTokens", -1);
26610 }
26611
26612 /* decode integrityCheckValue */
26613
26614 if (pvalue->m.integrityCheckValuePresent) {
26615 invokeStartElement (pctxt, "integrityCheckValue", -1);
26616
26617 stat = asn1PD_H225ICV (pctxt, &pvalue->integrityCheckValue);
26618 if (stat != ASN_OK) return stat;
26619
26620 invokeEndElement (pctxt, "integrityCheckValue", -1);
26621 }
26622
26623 /* decode featureSet */
26624
26625 if (pvalue->m.featureSetPresent) {
26626 invokeStartElement (pctxt, "featureSet", -1);
26627
26628 stat = asn1PD_H225FeatureSet (pctxt, &pvalue->featureSet);
26629 if (stat != ASN_OK) return stat;
26630
26631 invokeEndElement (pctxt, "featureSet", -1);
26632 }
26633
26634 /* decode genericData */
26635
26636 if (pvalue->m.genericDataPresent) {
26637 invokeStartElement (pctxt, "genericData", -1);
26638
26639 stat = asn1PD_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
26640 if (stat != ASN_OK) return stat;
26641
26642 invokeEndElement (pctxt, "genericData", -1);
26643 }
26644
26645 if (extbit) {
26646
26647 /* decode extension optional bits length */
26648
26649 stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt);
26650 if (stat != ASN_OK) return stat;
26651
26652 bitcnt += 1;
26653
26654 ZEROCONTEXT (&lctxt);
26655 stat = setPERBufferUsingCtxt (&lctxt, pctxt);
26656 if (stat != ASN_OK) return stat;
26657
26658 stat = moveBitCursor (pctxt, bitcnt);
26659 if (stat != ASN_OK) return stat;
26660
26661 for (i = 0; i < bitcnt; i++) {
26662 DECODEBIT (&lctxt, &optbit);
26663
26664 if (optbit) {
26665 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
26666 if (stat != ASN_OK) return stat;
26667
26668 pctxt->buffer.byteIndex += openType.numocts;
26669 }
26670 }
26671 }
26672
26673 return (stat);
26674 }
26675
26676 /**************************************************************/
26677 /* */
26678 /* _SeqOfH225AdmissionConfirm */
26679 /* */
26680 /**************************************************************/
26681
26682 EXTERN int asn1PD_H225_SeqOfH225AdmissionConfirm (OOCTXT* pctxt, H225_SeqOfH225AdmissionConfirm* pvalue)
26683 {
26684 int stat = ASN_OK;
26685 H225AdmissionConfirm* pdata;
26686 ASN1UINT count = 0;
26687 ASN1UINT xx1;
26688 int lstat;
26689
26690 dListInit (pvalue);
26691
26692 for (;;) {
26693 /* decode length determinant */
26694
26695 lstat = decodeLength (pctxt, &count);
26696 if (lstat != ASN_OK && lstat != ASN_OK_FRAG) {
26697 return lstat;
26698 }
26699
26700 /* decode elements */
26701
26702 for (xx1 = 0; xx1 < count; xx1++) {
26703 invokeStartElement (pctxt, "elem", xx1);
26704
26705 pdata = ALLOC_ASN1ELEMDNODE (pctxt, H225AdmissionConfirm);
26706
26707 stat = asn1PD_H225AdmissionConfirm (pctxt, pdata);
26708 if (stat != ASN_OK) return stat;
26709 invokeEndElement (pctxt, "elem", xx1);
26710
26711 dListAppendNode (pctxt, pvalue, pdata);
26712 }
26713
26714 if(lstat == ASN_OK) break;
26715 }
26716
26717 return (stat);
26718 }
26719
26720 /**************************************************************/
26721 /* */
26722 /* RasMessage */
26723 /* */
26724 /**************************************************************/
26725
26726 EXTERN int asn1PD_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
26727 {
26728 int stat = ASN_OK;
26729 ASN1UINT ui;
26730 ASN1OpenType openType;
26731 ASN1BOOL extbit = 0;
26732 OOCTXT lctxt;
26733
26734 /* extension bit */
26735
26736 DECODEBIT (pctxt, &extbit);
26737
26738 if (!extbit) {
26739 stat = decodeConsUnsigned (pctxt, &ui, 0, 24);
26740 if (stat != ASN_OK) return stat;
26741 else pvalue->t = ui + 1;
26742
26743 switch (ui) {
26744 /* gatekeeperRequest */
26745 case 0:
26746 invokeStartElement (pctxt, "gatekeeperRequest", -1);
26747
26748 pvalue->u.gatekeeperRequest = ALLOC_ASN1ELEM (pctxt, H225GatekeeperRequest);
26749
26750 stat = asn1PD_H225GatekeeperRequest (pctxt, pvalue->u.gatekeeperRequest);
26751 if (stat != ASN_OK) return stat;
26752
26753 invokeEndElement (pctxt, "gatekeeperRequest", -1);
26754
26755 break;
26756
26757 /* gatekeeperConfirm */
26758 case 1:
26759 invokeStartElement (pctxt, "gatekeeperConfirm", -1);
26760
26761 pvalue->u.gatekeeperConfirm = ALLOC_ASN1ELEM (pctxt, H225GatekeeperConfirm);
26762
26763 stat = asn1PD_H225GatekeeperConfirm (pctxt, pvalue->u.gatekeeperConfirm);
26764 if (stat != ASN_OK) return stat;
26765
26766 invokeEndElement (pctxt, "gatekeeperConfirm", -1);
26767
26768 break;
26769
26770 /* gatekeeperReject */
26771 case 2:
26772 invokeStartElement (pctxt, "gatekeeperReject", -1);
26773
26774 pvalue->u.gatekeeperReject = ALLOC_ASN1ELEM (pctxt, H225GatekeeperReject);
26775
26776 stat = asn1PD_H225GatekeeperReject (pctxt, pvalue->u.gatekeeperReject);
26777 if (stat != ASN_OK) return stat;
26778
26779 invokeEndElement (pctxt, "gatekeeperReject", -1);
26780
26781 break;
26782
26783 /* registrationRequest */
26784 case 3:
26785 invokeStartElement (pctxt, "registrationRequest", -1);
26786
26787 pvalue->u.registrationRequest = ALLOC_ASN1ELEM (pctxt, H225RegistrationRequest);
26788
26789 stat = asn1PD_H225RegistrationRequest (pctxt, pvalue->u.registrationRequest);
26790 if (stat != ASN_OK) return stat;
26791
26792 invokeEndElement (pctxt, "registrationRequest", -1);
26793
26794 break;
26795
26796 /* registrationConfirm */
26797 case 4:
26798 invokeStartElement (pctxt, "registrationConfirm", -1);
26799
26800 pvalue->u.registrationConfirm = ALLOC_ASN1ELEM (pctxt, H225RegistrationConfirm);
26801
26802 stat = asn1PD_H225RegistrationConfirm (pctxt, pvalue->u.registrationConfirm);
26803 if (stat != ASN_OK) return stat;
26804
26805 invokeEndElement (pctxt, "registrationConfirm", -1);
26806
26807 break;
26808
26809 /* registrationReject */
26810 case 5:
26811 invokeStartElement (pctxt, "registrationReject", -1);
26812
26813 pvalue->u.registrationReject = ALLOC_ASN1ELEM (pctxt, H225RegistrationReject);
26814
26815 stat = asn1PD_H225RegistrationReject (pctxt, pvalue->u.registrationReject);
26816 if (stat != ASN_OK) return stat;
26817
26818 invokeEndElement (pctxt, "registrationReject", -1);
26819
26820 break;
26821
26822 /* unregistrationRequest */
26823 case 6:
26824 invokeStartElement (pctxt, "unregistrationRequest", -1);
26825
26826 pvalue->u.unregistrationRequest = ALLOC_ASN1ELEM (pctxt, H225UnregistrationRequest);
26827
26828 stat = asn1PD_H225UnregistrationRequest (pctxt, pvalue->u.unregistrationRequest);
26829 if (stat != ASN_OK) return stat;
26830
26831 invokeEndElement (pctxt, "unregistrationRequest", -1);
26832
26833 break;
26834
26835 /* unregistrationConfirm */
26836 case 7:
26837 invokeStartElement (pctxt, "unregistrationConfirm", -1);
26838
26839 pvalue->u.unregistrationConfirm = ALLOC_ASN1ELEM (pctxt, H225UnregistrationConfirm);
26840
26841 stat = asn1PD_H225UnregistrationConfirm (pctxt, pvalue->u.unregistrationConfirm);
26842 if (stat != ASN_OK) return stat;
26843
26844 invokeEndElement (pctxt, "unregistrationConfirm", -1);
26845
26846 break;
26847
26848 /* unregistrationReject */
26849 case 8:
26850 invokeStartElement (pctxt, "unregistrationReject", -1);
26851
26852 pvalue->u.unregistrationReject = ALLOC_ASN1ELEM (pctxt, H225UnregistrationReject);
26853
26854 stat = asn1PD_H225UnregistrationReject (pctxt, pvalue->u.unregistrationReject);
26855 if (stat != ASN_OK) return stat;
26856
26857 invokeEndElement (pctxt, "unregistrationReject", -1);
26858
26859 break;
26860
26861 /* admissionRequest */
26862 case 9:
26863 invokeStartElement (pctxt, "admissionRequest", -1);
26864
26865 pvalue->u.admissionRequest = ALLOC_ASN1ELEM (pctxt, H225AdmissionRequest);
26866
26867 stat = asn1PD_H225AdmissionRequest (pctxt, pvalue->u.admissionRequest);
26868 if (stat != ASN_OK) return stat;
26869
26870 invokeEndElement (pctxt, "admissionRequest", -1);
26871
26872 break;
26873
26874 /* admissionConfirm */
26875 case 10:
26876 invokeStartElement (pctxt, "admissionConfirm", -1);
26877
26878 pvalue->u.admissionConfirm = ALLOC_ASN1ELEM (pctxt, H225AdmissionConfirm);
26879
26880 stat = asn1PD_H225AdmissionConfirm (pctxt, pvalue->u.admissionConfirm);
26881 if (stat != ASN_OK) return stat;
26882
26883 invokeEndElement (pctxt, "admissionConfirm", -1);
26884
26885 break;
26886
26887 /* admissionReject */
26888 case 11:
26889 invokeStartElement (pctxt, "admissionReject", -1);
26890
26891 pvalue->u.admissionReject = ALLOC_ASN1ELEM (pctxt, H225AdmissionReject);
26892
26893 stat = asn1PD_H225AdmissionReject (pctxt, pvalue->u.admissionReject);
26894 if (stat != ASN_OK) return stat;
26895
26896 invokeEndElement (pctxt, "admissionReject", -1);
26897
26898 break;
26899
26900 /* bandwidthRequest */
26901 case 12:
26902 invokeStartElement (pctxt, "bandwidthRequest", -1);
26903
26904 pvalue->u.bandwidthRequest = ALLOC_ASN1ELEM (pctxt, H225BandwidthRequest);
26905
26906 stat = asn1PD_H225BandwidthRequest (pctxt, pvalue->u.bandwidthRequest);
26907 if (stat != ASN_OK) return stat;
26908
26909 invokeEndElement (pctxt, "bandwidthRequest", -1);
26910
26911 break;
26912
26913 /* bandwidthConfirm */
26914 case 13:
26915 invokeStartElement (pctxt, "bandwidthConfirm", -1);
26916
26917 pvalue->u.bandwidthConfirm = ALLOC_ASN1ELEM (pctxt, H225BandwidthConfirm);
26918
26919 stat = asn1PD_H225BandwidthConfirm (pctxt, pvalue->u.bandwidthConfirm);
26920 if (stat != ASN_OK) return stat;
26921
26922 invokeEndElement (pctxt, "bandwidthConfirm", -1);
26923
26924 break;
26925
26926 /* bandwidthReject */
26927 case 14:
26928 invokeStartElement (pctxt, "bandwidthReject", -1);
26929
26930 pvalue->u.bandwidthReject = ALLOC_ASN1ELEM (pctxt, H225BandwidthReject);
26931
26932 stat = asn1PD_H225BandwidthReject (pctxt, pvalue->u.bandwidthReject);
26933 if (stat != ASN_OK) return stat;
26934
26935 invokeEndElement (pctxt, "bandwidthReject", -1);
26936
26937 break;
26938
26939 /* disengageRequest */
26940 case 15:
26941 invokeStartElement (pctxt, "disengageRequest", -1);
26942
26943 pvalue->u.disengageRequest = ALLOC_ASN1ELEM (pctxt, H225DisengageRequest);
26944
26945 stat = asn1PD_H225DisengageRequest (pctxt, pvalue->u.disengageRequest);
26946 if (stat != ASN_OK) return stat;
26947
26948 invokeEndElement (pctxt, "disengageRequest", -1);
26949
26950 break;
26951
26952 /* disengageConfirm */
26953 case 16:
26954 invokeStartElement (pctxt, "disengageConfirm", -1);
26955
26956 pvalue->u.disengageConfirm = ALLOC_ASN1ELEM (pctxt, H225DisengageConfirm);
26957
26958 stat = asn1PD_H225DisengageConfirm (pctxt, pvalue->u.disengageConfirm);
26959 if (stat != ASN_OK) return stat;
26960
26961 invokeEndElement (pctxt, "disengageConfirm", -1);
26962
26963 break;
26964
26965 /* disengageReject */
26966 case 17:
26967 invokeStartElement (pctxt, "disengageReject", -1);
26968
26969 pvalue->u.disengageReject = ALLOC_ASN1ELEM (pctxt, H225DisengageReject);
26970
26971 stat = asn1PD_H225DisengageReject (pctxt, pvalue->u.disengageReject);
26972 if (stat != ASN_OK) return stat;
26973
26974 invokeEndElement (pctxt, "disengageReject", -1);
26975
26976 break;
26977
26978 /* locationRequest */
26979 case 18:
26980 invokeStartElement (pctxt, "locationRequest", -1);
26981
26982 pvalue->u.locationRequest = ALLOC_ASN1ELEM (pctxt, H225LocationRequest);
26983
26984 stat = asn1PD_H225LocationRequest (pctxt, pvalue->u.locationRequest);
26985 if (stat != ASN_OK) return stat;
26986
26987 invokeEndElement (pctxt, "locationRequest", -1);
26988
26989 break;
26990
26991 /* locationConfirm */
26992 case 19:
26993 invokeStartElement (pctxt, "locationConfirm", -1);
26994
26995 pvalue->u.locationConfirm = ALLOC_ASN1ELEM (pctxt, H225LocationConfirm);
26996
26997 stat = asn1PD_H225LocationConfirm (pctxt, pvalue->u.locationConfirm);
26998 if (stat != ASN_OK) return stat;
26999
27000 invokeEndElement (pctxt, "locationConfirm", -1);
27001
27002 break;
27003
27004 /* locationReject */
27005 case 20:
27006 invokeStartElement (pctxt, "locationReject", -1);
27007
27008 pvalue->u.locationReject = ALLOC_ASN1ELEM (pctxt, H225LocationReject);
27009
27010 stat = asn1PD_H225LocationReject (pctxt, pvalue->u.locationReject);
27011 if (stat != ASN_OK) return stat;
27012
27013 invokeEndElement (pctxt, "locationReject", -1);
27014
27015 break;
27016
27017 /* infoRequest */
27018 case 21:
27019 invokeStartElement (pctxt, "infoRequest", -1);
27020
27021 pvalue->u.infoRequest = ALLOC_ASN1ELEM (pctxt, H225InfoRequest);
27022
27023 stat = asn1PD_H225InfoRequest (pctxt, pvalue->u.infoRequest);
27024 if (stat != ASN_OK) return stat;
27025
27026 invokeEndElement (pctxt, "infoRequest", -1);
27027
27028 break;
27029
27030 /* infoRequestResponse */
27031 case 22:
27032 invokeStartElement (pctxt, "infoRequestResponse", -1);
27033
27034 pvalue->u.infoRequestResponse = ALLOC_ASN1ELEM (pctxt, H225InfoRequestResponse);
27035
27036 stat = asn1PD_H225InfoRequestResponse (pctxt, pvalue->u.infoRequestResponse);
27037 if (stat != ASN_OK) return stat;
27038
27039 invokeEndElement (pctxt, "infoRequestResponse", -1);
27040
27041 break;
27042
27043 /* nonStandardMessage */
27044 case 23:
27045 invokeStartElement (pctxt, "nonStandardMessage", -1);
27046
27047 pvalue->u.nonStandardMessage = ALLOC_ASN1ELEM (pctxt, H225NonStandardMessage);
27048
27049 stat = asn1PD_H225NonStandardMessage (pctxt, pvalue->u.nonStandardMessage);
27050 if (stat != ASN_OK) return stat;
27051
27052 invokeEndElement (pctxt, "nonStandardMessage", -1);
27053
27054 break;
27055
27056 /* unknownMessageResponse */
27057 case 24:
27058 invokeStartElement (pctxt, "unknownMessageResponse", -1);
27059
27060 pvalue->u.unknownMessageResponse = ALLOC_ASN1ELEM (pctxt, H225UnknownMessageResponse);
27061
27062 stat = asn1PD_H225UnknownMessageResponse (pctxt, pvalue->u.unknownMessageResponse);
27063 if (stat != ASN_OK) return stat;
27064
27065 invokeEndElement (pctxt, "unknownMessageResponse", -1);
27066
27067 break;
27068
27069 default:
27070 return ASN_E_INVOPT;
27071 }
27072 }
27073 else {
27074 stat = decodeSmallNonNegWholeNumber (pctxt, &ui);
27075 if (stat != ASN_OK) return stat;
27076 else pvalue->t = ui + 26;
27077
27078 stat = decodeByteAlign (pctxt);
27079 if (stat != ASN_OK) return stat;
27080
27081 stat = decodeOpenType (pctxt, &openType.data, &openType.numocts);
27082 if (stat != ASN_OK) return stat;
27083
27084 copyContext (&lctxt, pctxt);
27085 initContextBuffer (pctxt, openType.data, openType.numocts);
27086
27087 switch (pvalue->t) {
27088 /* requestInProgress */
27089 case 26:
27090 invokeStartElement (pctxt, "requestInProgress", -1);
27091
27092 pvalue->u.requestInProgress = ALLOC_ASN1ELEM (pctxt, H225RequestInProgress);
27093
27094 stat = asn1PD_H225RequestInProgress (pctxt, pvalue->u.requestInProgress);
27095 if (stat != ASN_OK) return stat;
27096
27097 invokeEndElement (pctxt, "requestInProgress", -1);
27098
27099 break;
27100
27101 /* resourcesAvailableIndicate */
27102 case 27:
27103 invokeStartElement (pctxt, "resourcesAvailableIndicate", -1);
27104
27105 pvalue->u.resourcesAvailableIndicate = ALLOC_ASN1ELEM (pctxt, H225ResourcesAvailableIndicate);
27106
27107 stat = asn1PD_H225ResourcesAvailableIndicate (pctxt, pvalue->u.resourcesAvailableIndicate);
27108 if (stat != ASN_OK) return stat;
27109
27110 invokeEndElement (pctxt, "resourcesAvailableIndicate", -1);
27111
27112 break;
27113
27114 /* resourcesAvailableConfirm */
27115 case 28:
27116 invokeStartElement (pctxt, "resourcesAvailableConfirm", -1);
27117
27118 pvalue->u.resourcesAvailableConfirm = ALLOC_ASN1ELEM (pctxt, H225ResourcesAvailableConfirm);
27119
27120 stat = asn1PD_H225ResourcesAvailableConfirm (pctxt, pvalue->u.resourcesAvailableConfirm);
27121 if (stat != ASN_OK) return stat;
27122
27123 invokeEndElement (pctxt, "resourcesAvailableConfirm", -1);
27124
27125 break;
27126
27127 /* infoRequestAck */
27128 case 29:
27129 invokeStartElement (pctxt, "infoRequestAck", -1);
27130
27131 pvalue->u.infoRequestAck = ALLOC_ASN1ELEM (pctxt, H225InfoRequestAck);
27132
27133 stat = asn1PD_H225InfoRequestAck (pctxt, pvalue->u.infoRequestAck);
27134 if (stat != ASN_OK) return stat;
27135
27136 invokeEndElement (pctxt, "infoRequestAck", -1);
27137
27138 break;
27139
27140 /* infoRequestNak */
27141 case 30:
27142 invokeStartElement (pctxt, "infoRequestNak", -1);
27143
27144 pvalue->u.infoRequestNak = ALLOC_ASN1ELEM (pctxt, H225InfoRequestNak);
27145
27146 stat = asn1PD_H225InfoRequestNak (pctxt, pvalue->u.infoRequestNak);
27147 if (stat != ASN_OK) return stat;
27148
27149 invokeEndElement (pctxt, "infoRequestNak", -1);
27150
27151 break;
27152
27153 /* serviceControlIndication */
27154 case 31:
27155 invokeStartElement (pctxt, "serviceControlIndication", -1);
27156
27157 pvalue->u.serviceControlIndication = ALLOC_ASN1ELEM (pctxt, H225ServiceControlIndication);
27158
27159 stat = asn1PD_H225ServiceControlIndication (pctxt, pvalue->u.serviceControlIndication);
27160 if (stat != ASN_OK) return stat;
27161
27162 invokeEndElement (pctxt, "serviceControlIndication", -1);
27163
27164 break;
27165
27166 /* serviceControlResponse */
27167 case 32:
27168 invokeStartElement (pctxt, "serviceControlResponse", -1);
27169
27170 pvalue->u.serviceControlResponse = ALLOC_ASN1ELEM (pctxt, H225ServiceControlResponse);
27171
27172 stat = asn1PD_H225ServiceControlResponse (pctxt, pvalue->u.serviceControlResponse);
27173 if (stat != ASN_OK) return stat;
27174
27175 invokeEndElement (pctxt, "serviceControlResponse", -1);
27176
27177 break;
27178
27179 /* admissionConfirmSequence */
27180 case 33:
27181 invokeStartElement (pctxt, "admissionConfirmSequence", -1);
27182
27183 pvalue->u.admissionConfirmSequence = ALLOC_ASN1ELEM (pctxt, H225_SeqOfH225AdmissionConfirm);
27184
27185 stat = asn1PD_H225_SeqOfH225AdmissionConfirm (pctxt, pvalue->u.admissionConfirmSequence);
27186 if (stat != ASN_OK) return stat;
27187
27188 invokeEndElement (pctxt, "admissionConfirmSequence", -1);
27189
27190 break;
27191
27192 default:;
27193 }
27194
27195 copyContext (pctxt, &lctxt);
27196 }
27197
27198 return (stat);
27199 }