Debian Codegraph @

addons/ooh323c/src/h323/H323-MESSAGESEnc.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 * This file was generated by the Objective Systems ASN1C Compiler
18 * (http://www.obj-sys.com). Version: 5.72, Date: 22-Mar-2005.
19 */
20 #include "ooasn1.h"
21 #include "H323-MESSAGES.h"
22
23 /**************************************************************/
24 /* */
25 /* ScreeningIndicator */
26 /* */
27 /**************************************************************/
28
29 EXTERN int asn1PE_H225ScreeningIndicator (OOCTXT* pctxt, H225ScreeningIndicator value)
30 {
31 int stat = ASN_OK;
32 ASN1UINT ui;
33 ASN1BOOL extbit;
34
35 extbit = 0;
36
37 switch (value) {
38 case userProvidedNotScreened: ui = 0; break;
39 case userProvidedVerifiedAndPassed: ui = 1; break;
40 case userProvidedVerifiedAndFailed: ui = 2; break;
41 case networkProvided: ui = 3; break;
42 default: ui = value; extbit = 1;
43 }
44
45 /* extension bit */
46
47 encodeBit (pctxt, extbit);
48
49 if (extbit) {
50 stat = encodeSmallNonNegWholeNumber (pctxt, ui);
51 }
52 else {
53 stat = encodeConsUnsigned (pctxt, ui, 0, 3);
54 if (stat != ASN_OK) return stat;
55 }
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 asn1PE_H225NumberDigits (OOCTXT* pctxt, H225NumberDigits value)
69 {
70 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
71 int stat = ASN_OK;
72
73 addSizeConstraint (pctxt, &lsize1);
74
75 stat = encodeConstrainedStringEx (pctxt, value, gs_H323_MESSAGES_NumberDigits_CharSet, 4, 4, 7);
76 if (stat != ASN_OK) return stat;
77
78 return (stat);
79 }
80
81 /**************************************************************/
82 /* */
83 /* TBCD_STRING */
84 /* */
85 /**************************************************************/
86
87 extern EXTERN const char* gs_H323_MESSAGES_TBCD_STRING_CharSet;
88
89 EXTERN int asn1PE_H225TBCD_STRING (OOCTXT* pctxt, H225TBCD_STRING value)
90 {
91 int stat = ASN_OK;
92
93 stat = encodeConstrainedStringEx (pctxt, value, gs_H323_MESSAGES_TBCD_STRING_CharSet, 4, 4, 7);
94 if (stat != ASN_OK) return stat;
95
96 return (stat);
97 }
98
99 /**************************************************************/
100 /* */
101 /* GloballyUniqueID */
102 /* */
103 /**************************************************************/
104
105 EXTERN int asn1PE_H225GloballyUniqueID (OOCTXT* pctxt, H225GloballyUniqueID* pvalue)
106 {
107 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
108 int stat = ASN_OK;
109
110 addSizeConstraint (pctxt, &lsize1);
111
112 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
113 if (stat != ASN_OK) return stat;
114
115 return (stat);
116 }
117
118 /**************************************************************/
119 /* */
120 /* ConferenceIdentifier */
121 /* */
122 /**************************************************************/
123
124 EXTERN int asn1PE_H225ConferenceIdentifier (OOCTXT* pctxt, H225ConferenceIdentifier* pvalue)
125 {
126 int stat = ASN_OK;
127
128 stat = asn1PE_H225GloballyUniqueID (pctxt, pvalue);
129 if (stat != ASN_OK) return stat;
130
131 return (stat);
132 }
133
134 /**************************************************************/
135 /* */
136 /* RequestSeqNum */
137 /* */
138 /**************************************************************/
139
140 EXTERN int asn1PE_H225RequestSeqNum (OOCTXT* pctxt, H225RequestSeqNum value)
141 {
142 int stat = ASN_OK;
143
144 stat = encodeConsUnsigned (pctxt, value, 1U, 65535U);
145 if (stat != ASN_OK) return stat;
146
147 return (stat);
148 }
149
150 /**************************************************************/
151 /* */
152 /* GatekeeperIdentifier */
153 /* */
154 /**************************************************************/
155
156 EXTERN int asn1PE_H225GatekeeperIdentifier (OOCTXT* pctxt, H225GatekeeperIdentifier value)
157 {
158 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
159 int stat = ASN_OK;
160
161 addSizeConstraint (pctxt, &lsize1);
162
163 stat = encodeBMPString (pctxt, value, 0);
164 if (stat != ASN_OK) return stat;
165
166 return (stat);
167 }
168
169 /**************************************************************/
170 /* */
171 /* BandWidth */
172 /* */
173 /**************************************************************/
174
175 EXTERN int asn1PE_H225BandWidth (OOCTXT* pctxt, H225BandWidth value)
176 {
177 int stat = ASN_OK;
178
179 stat = encodeConsUnsigned (pctxt, value, 0U, ASN1UINT_MAX);
180 if (stat != ASN_OK) return stat;
181
182 return (stat);
183 }
184
185 /**************************************************************/
186 /* */
187 /* CallReferenceValue */
188 /* */
189 /**************************************************************/
190
191 EXTERN int asn1PE_H225CallReferenceValue (OOCTXT* pctxt, H225CallReferenceValue value)
192 {
193 int stat = ASN_OK;
194
195 stat = encodeConsUnsigned (pctxt, value, 0U, 65535U);
196 if (stat != ASN_OK) return stat;
197
198 return (stat);
199 }
200
201 /**************************************************************/
202 /* */
203 /* EndpointIdentifier */
204 /* */
205 /**************************************************************/
206
207 EXTERN int asn1PE_H225EndpointIdentifier (OOCTXT* pctxt, H225EndpointIdentifier value)
208 {
209 static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
210 int stat = ASN_OK;
211
212 addSizeConstraint (pctxt, &lsize1);
213
214 stat = encodeBMPString (pctxt, value, 0);
215 if (stat != ASN_OK) return stat;
216
217 return (stat);
218 }
219
220 /**************************************************************/
221 /* */
222 /* ProtocolIdentifier */
223 /* */
224 /**************************************************************/
225
226 EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* value)
227 {
228 int stat = ASN_OK;
229
230 stat = encodeObjectIdentifier (pctxt, value);
231 if (stat != ASN_OK) return stat;
232
233 return (stat);
234 }
235
236 /**************************************************************/
237 /* */
238 /* TimeToLive */
239 /* */
240 /**************************************************************/
241
242 EXTERN int asn1PE_H225TimeToLive (OOCTXT* pctxt, H225TimeToLive value)
243 {
244 int stat = ASN_OK;
245
246 stat = encodeConsUnsigned (pctxt, value, 1U, ASN1UINT_MAX);
247 if (stat != ASN_OK) return stat;
248
249 return (stat);
250 }
251
252 /**************************************************************/
253 /* */
254 /* H248PackagesDescriptor */
255 /* */
256 /**************************************************************/
257
258 EXTERN int asn1PE_H225H248PackagesDescriptor (OOCTXT* pctxt, H225H248PackagesDescriptor value)
259 {
260 int stat = ASN_OK;
261
262 stat = encodeOctetString (pctxt, value.numocts, value.data);
263 if (stat != ASN_OK) return stat;
264
265 return (stat);
266 }
267
268 /**************************************************************/
269 /* */
270 /* H248SignalsDescriptor */
271 /* */
272 /**************************************************************/
273
274 EXTERN int asn1PE_H225H248SignalsDescriptor (OOCTXT* pctxt, H225H248SignalsDescriptor value)
275 {
276 int stat = ASN_OK;
277
278 stat = encodeOctetString (pctxt, value.numocts, value.data);
279 if (stat != ASN_OK) return stat;
280
281 return (stat);
282 }
283
284 /**************************************************************/
285 /* */
286 /* GenericIdentifier */
287 /* */
288 /**************************************************************/
289
290 EXTERN int asn1PE_H225GenericIdentifier (OOCTXT* pctxt, H225GenericIdentifier* pvalue)
291 {
292 int stat = ASN_OK;
293 ASN1BOOL extbit;
294
295 /* extension bit */
296
297 extbit = (ASN1BOOL)(pvalue->t > 3);
298
299 encodeBit (pctxt, extbit);
300
301 if (!extbit) {
302
303 /* Encode choice index value */
304
305 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
306 if (stat != ASN_OK) return stat;
307
308 /* Encode root element data value */
309
310 switch (pvalue->t)
311 {
312 /* standard */
313 case 1:
314 if ( (pvalue->u.standard >= 0 && pvalue->u.standard <= 16383) ) {
315 extbit = 0;
316 }
317 else extbit = 1;
318
319 /* extension bit */
320
321 encodeBit (pctxt, extbit);
322
323 if (extbit) {
324 stat = encodeUnconsInteger (pctxt, pvalue->u.standard);
325 if (stat != ASN_OK) return stat;
326 }
327 else {
328 stat = encodeConsInteger (pctxt, pvalue->u.standard, 0, 16383);
329 if (stat != ASN_OK) return stat;
330 }
331 break;
332
333 /* oid */
334 case 2:
335 stat = encodeObjectIdentifier (pctxt, pvalue->u.oid);
336 if (stat != ASN_OK) return stat;
337 break;
338
339 /* nonStandard */
340 case 3:
341 stat = asn1PE_H225GloballyUniqueID (pctxt, pvalue->u.nonStandard);
342 if (stat != ASN_OK) return stat;
343 break;
344
345 default:
346 return ASN_E_INVOPT;
347 }
348 }
349 else {
350 /* Encode extension choice index value */
351
352 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
353 if (stat != ASN_OK) return stat;
354
355 /* Encode extension element data value */
356
357 }
358
359 return (stat);
360 }
361
362 /**************************************************************/
363 /* */
364 /* TransportAddress_ipAddress_ip */
365 /* */
366 /**************************************************************/
367
368 EXTERN int asn1PE_H225TransportAddress_ipAddress_ip (OOCTXT* pctxt, H225TransportAddress_ipAddress_ip* pvalue)
369 {
370 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
371 int stat = ASN_OK;
372
373 addSizeConstraint (pctxt, &lsize1);
374
375 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
376 if (stat != ASN_OK) return stat;
377
378 return (stat);
379 }
380
381 /**************************************************************/
382 /* */
383 /* TransportAddress_ipAddress */
384 /* */
385 /**************************************************************/
386
387 EXTERN int asn1PE_H225TransportAddress_ipAddress (OOCTXT* pctxt, H225TransportAddress_ipAddress* pvalue)
388 {
389 int stat = ASN_OK;
390
391 /* encode ip */
392
393 stat = asn1PE_H225TransportAddress_ipAddress_ip (pctxt, &pvalue->ip);
394 if (stat != ASN_OK) return stat;
395
396 /* encode port */
397
398 stat = encodeConsUnsigned (pctxt, pvalue->port, 0U, 65535U);
399 if (stat != ASN_OK) return stat;
400
401 return (stat);
402 }
403
404 /**************************************************************/
405 /* */
406 /* TransportAddress_ipSourceRoute_ip */
407 /* */
408 /**************************************************************/
409
410 EXTERN int asn1PE_H225TransportAddress_ipSourceRoute_ip (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_ip* pvalue)
411 {
412 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
413 int stat = ASN_OK;
414
415 addSizeConstraint (pctxt, &lsize1);
416
417 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
418 if (stat != ASN_OK) return stat;
419
420 return (stat);
421 }
422
423 /**************************************************************/
424 /* */
425 /* TransportAddress_ipSourceRoute_route_element */
426 /* */
427 /**************************************************************/
428
429 EXTERN int asn1PE_H225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_route_element* pvalue)
430 {
431 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
432 int stat = ASN_OK;
433
434 addSizeConstraint (pctxt, &lsize1);
435
436 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
437 if (stat != ASN_OK) return stat;
438
439 return (stat);
440 }
441
442 /**************************************************************/
443 /* */
444 /* _SeqOfH225TransportAddress_ipSourceRoute_route_element */
445 /* */
446 /**************************************************************/
447
448 EXTERN int asn1PE_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225_SeqOfH225TransportAddress_ipSourceRoute_route_element* pvalue)
449 {
450 int stat = ASN_OK;
451 ASN1UINT xx1;
452
453 /* encode length determinant */
454
455 stat = encodeLength (pctxt, pvalue->n);
456 if (stat < 0) return stat;
457
458 /* encode elements */
459
460 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
461 stat = asn1PE_H225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->elem[xx1]);
462 if (stat != ASN_OK) return stat;
463 }
464
465 return (stat);
466 }
467
468 /**************************************************************/
469 /* */
470 /* TransportAddress_ipSourceRoute_routing */
471 /* */
472 /**************************************************************/
473
474 EXTERN int asn1PE_H225TransportAddress_ipSourceRoute_routing (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_routing* pvalue)
475 {
476 int stat = ASN_OK;
477 ASN1BOOL extbit;
478
479 /* extension bit */
480
481 extbit = (ASN1BOOL)(pvalue->t > 2);
482
483 encodeBit (pctxt, extbit);
484
485 if (!extbit) {
486
487 /* Encode choice index value */
488
489 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
490 if (stat != ASN_OK) return stat;
491
492 /* Encode root element data value */
493
494 switch (pvalue->t)
495 {
496 /* strict */
497 case 1:
498 /* NULL */
499 break;
500
501 /* loose */
502 case 2:
503 /* NULL */
504 break;
505
506 default:
507 return ASN_E_INVOPT;
508 }
509 }
510 else {
511 /* Encode extension choice index value */
512
513 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
514 if (stat != ASN_OK) return stat;
515
516 /* Encode extension element data value */
517
518 }
519
520 return (stat);
521 }
522
523 /**************************************************************/
524 /* */
525 /* TransportAddress_ipSourceRoute */
526 /* */
527 /**************************************************************/
528
529 EXTERN int asn1PE_H225TransportAddress_ipSourceRoute (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute* pvalue)
530 {
531 int stat = ASN_OK;
532 ASN1BOOL extbit;
533
534 /* extension bit */
535
536 extbit = 0;
537
538 encodeBit (pctxt, extbit);
539
540 /* encode ip */
541
542 stat = asn1PE_H225TransportAddress_ipSourceRoute_ip (pctxt, &pvalue->ip);
543 if (stat != ASN_OK) return stat;
544
545 /* encode port */
546
547 stat = encodeConsUnsigned (pctxt, pvalue->port, 0U, 65535U);
548 if (stat != ASN_OK) return stat;
549
550 /* encode route */
551
552 stat = asn1PE_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->route);
553 if (stat != ASN_OK) return stat;
554
555 /* encode routing */
556
557 stat = asn1PE_H225TransportAddress_ipSourceRoute_routing (pctxt, &pvalue->routing);
558 if (stat != ASN_OK) return stat;
559
560 return (stat);
561 }
562
563 /**************************************************************/
564 /* */
565 /* TransportAddress_ipxAddress_node */
566 /* */
567 /**************************************************************/
568
569 EXTERN int asn1PE_H225TransportAddress_ipxAddress_node (OOCTXT* pctxt, H225TransportAddress_ipxAddress_node* pvalue)
570 {
571 static Asn1SizeCnst lsize1 = { 0, 6, 6, 0 };
572 int stat = ASN_OK;
573
574 addSizeConstraint (pctxt, &lsize1);
575
576 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
577 if (stat != ASN_OK) return stat;
578
579 return (stat);
580 }
581
582 /**************************************************************/
583 /* */
584 /* TransportAddress_ipxAddress_netnum */
585 /* */
586 /**************************************************************/
587
588 EXTERN int asn1PE_H225TransportAddress_ipxAddress_netnum (OOCTXT* pctxt, H225TransportAddress_ipxAddress_netnum* pvalue)
589 {
590 static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 };
591 int stat = ASN_OK;
592
593 addSizeConstraint (pctxt, &lsize1);
594
595 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
596 if (stat != ASN_OK) return stat;
597
598 return (stat);
599 }
600
601 /**************************************************************/
602 /* */
603 /* TransportAddress_ipxAddress_port */
604 /* */
605 /**************************************************************/
606
607 EXTERN int asn1PE_H225TransportAddress_ipxAddress_port (OOCTXT* pctxt, H225TransportAddress_ipxAddress_port* pvalue)
608 {
609 static Asn1SizeCnst lsize1 = { 0, 2, 2, 0 };
610 int stat = ASN_OK;
611
612 addSizeConstraint (pctxt, &lsize1);
613
614 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
615 if (stat != ASN_OK) return stat;
616
617 return (stat);
618 }
619
620 /**************************************************************/
621 /* */
622 /* TransportAddress_ipxAddress */
623 /* */
624 /**************************************************************/
625
626 EXTERN int asn1PE_H225TransportAddress_ipxAddress (OOCTXT* pctxt, H225TransportAddress_ipxAddress* pvalue)
627 {
628 int stat = ASN_OK;
629
630 /* encode node */
631
632 stat = asn1PE_H225TransportAddress_ipxAddress_node (pctxt, &pvalue->node);
633 if (stat != ASN_OK) return stat;
634
635 /* encode netnum */
636
637 stat = asn1PE_H225TransportAddress_ipxAddress_netnum (pctxt, &pvalue->netnum);
638 if (stat != ASN_OK) return stat;
639
640 /* encode port */
641
642 stat = asn1PE_H225TransportAddress_ipxAddress_port (pctxt, &pvalue->port);
643 if (stat != ASN_OK) return stat;
644
645 return (stat);
646 }
647
648 /**************************************************************/
649 /* */
650 /* TransportAddress_ip6Address_ip */
651 /* */
652 /**************************************************************/
653
654 EXTERN int asn1PE_H225TransportAddress_ip6Address_ip (OOCTXT* pctxt, H225TransportAddress_ip6Address_ip* pvalue)
655 {
656 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
657 int stat = ASN_OK;
658
659 addSizeConstraint (pctxt, &lsize1);
660
661 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
662 if (stat != ASN_OK) return stat;
663
664 return (stat);
665 }
666
667 /**************************************************************/
668 /* */
669 /* TransportAddress_ip6Address */
670 /* */
671 /**************************************************************/
672
673 EXTERN int asn1PE_H225TransportAddress_ip6Address (OOCTXT* pctxt, H225TransportAddress_ip6Address* pvalue)
674 {
675 int stat = ASN_OK;
676 ASN1BOOL extbit;
677
678 /* extension bit */
679
680 extbit = 0;
681
682 encodeBit (pctxt, extbit);
683
684 /* encode ip */
685
686 stat = asn1PE_H225TransportAddress_ip6Address_ip (pctxt, &pvalue->ip);
687 if (stat != ASN_OK) return stat;
688
689 /* encode port */
690
691 stat = encodeConsUnsigned (pctxt, pvalue->port, 0U, 65535U);
692 if (stat != ASN_OK) return stat;
693
694 return (stat);
695 }
696
697 /**************************************************************/
698 /* */
699 /* TransportAddress_netBios */
700 /* */
701 /**************************************************************/
702
703 EXTERN int asn1PE_H225TransportAddress_netBios (OOCTXT* pctxt, H225TransportAddress_netBios* pvalue)
704 {
705 static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 };
706 int stat = ASN_OK;
707
708 addSizeConstraint (pctxt, &lsize1);
709
710 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
711 if (stat != ASN_OK) return stat;
712
713 return (stat);
714 }
715
716 /**************************************************************/
717 /* */
718 /* TransportAddress_nsap */
719 /* */
720 /**************************************************************/
721
722 EXTERN int asn1PE_H225TransportAddress_nsap (OOCTXT* pctxt, H225TransportAddress_nsap* pvalue)
723 {
724 static Asn1SizeCnst lsize1 = { 0, 1, 20, 0 };
725 int stat = ASN_OK;
726
727 addSizeConstraint (pctxt, &lsize1);
728
729 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
730 if (stat != ASN_OK) return stat;
731
732 return (stat);
733 }
734
735 /**************************************************************/
736 /* */
737 /* H221NonStandard */
738 /* */
739 /**************************************************************/
740
741 EXTERN int asn1PE_H225H221NonStandard (OOCTXT* pctxt, H225H221NonStandard* pvalue)
742 {
743 int stat = ASN_OK;
744 ASN1BOOL extbit;
745
746 /* extension bit */
747
748 extbit = 0;
749
750 encodeBit (pctxt, extbit);
751
752 /* encode t35CountryCode */
753
754 stat = encodeConsUnsigned (pctxt, pvalue->t35CountryCode, 0U, 255U);
755 if (stat != ASN_OK) return stat;
756
757 /* encode t35Extension */
758
759 stat = encodeConsUnsigned (pctxt, pvalue->t35Extension, 0U, 255U);
760 if (stat != ASN_OK) return stat;
761
762 /* encode manufacturerCode */
763
764 stat = encodeConsUnsigned (pctxt, pvalue->manufacturerCode, 0U, 65535U);
765 if (stat != ASN_OK) return stat;
766
767 return (stat);
768 }
769
770 /**************************************************************/
771 /* */
772 /* NonStandardIdentifier */
773 /* */
774 /**************************************************************/
775
776 EXTERN int asn1PE_H225NonStandardIdentifier (OOCTXT* pctxt, H225NonStandardIdentifier* pvalue)
777 {
778 int stat = ASN_OK;
779 ASN1BOOL extbit;
780
781 /* extension bit */
782
783 extbit = (ASN1BOOL)(pvalue->t > 2);
784
785 encodeBit (pctxt, extbit);
786
787 if (!extbit) {
788
789 /* Encode choice index value */
790
791 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
792 if (stat != ASN_OK) return stat;
793
794 /* Encode root element data value */
795
796 switch (pvalue->t)
797 {
798 /* object */
799 case 1:
800 stat = encodeObjectIdentifier (pctxt, pvalue->u.object);
801 if (stat != ASN_OK) return stat;
802 break;
803
804 /* h221NonStandard */
805 case 2:
806 stat = asn1PE_H225H221NonStandard (pctxt, pvalue->u.h221NonStandard);
807 if (stat != ASN_OK) return stat;
808 break;
809
810 default:
811 return ASN_E_INVOPT;
812 }
813 }
814 else {
815 /* Encode extension choice index value */
816
817 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
818 if (stat != ASN_OK) return stat;
819
820 /* Encode extension element data value */
821
822 }
823
824 return (stat);
825 }
826
827 /**************************************************************/
828 /* */
829 /* NonStandardParameter */
830 /* */
831 /**************************************************************/
832
833 EXTERN int asn1PE_H225NonStandardParameter (OOCTXT* pctxt, H225NonStandardParameter* pvalue)
834 {
835 int stat = ASN_OK;
836
837 /* encode nonStandardIdentifier */
838
839 stat = asn1PE_H225NonStandardIdentifier (pctxt, &pvalue->nonStandardIdentifier);
840 if (stat != ASN_OK) return stat;
841
842 /* encode data */
843
844 stat = encodeOctetString (pctxt, pvalue->data.numocts, pvalue->data.data);
845 if (stat != ASN_OK) return stat;
846
847 return (stat);
848 }
849
850 /**************************************************************/
851 /* */
852 /* TransportAddress */
853 /* */
854 /**************************************************************/
855
856 EXTERN int asn1PE_H225TransportAddress (OOCTXT* pctxt, H225TransportAddress* pvalue)
857 {
858 int stat = ASN_OK;
859 ASN1BOOL extbit;
860
861 /* extension bit */
862
863 extbit = (ASN1BOOL)(pvalue->t > 7);
864
865 encodeBit (pctxt, extbit);
866
867 if (!extbit) {
868
869 /* Encode choice index value */
870
871 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 6);
872 if (stat != ASN_OK) return stat;
873
874 /* Encode root element data value */
875
876 switch (pvalue->t)
877 {
878 /* ipAddress */
879 case 1:
880 stat = asn1PE_H225TransportAddress_ipAddress (pctxt, pvalue->u.ipAddress);
881 if (stat != ASN_OK) return stat;
882 break;
883
884 /* ipSourceRoute */
885 case 2:
886 stat = asn1PE_H225TransportAddress_ipSourceRoute (pctxt, pvalue->u.ipSourceRoute);
887 if (stat != ASN_OK) return stat;
888 break;
889
890 /* ipxAddress */
891 case 3:
892 stat = asn1PE_H225TransportAddress_ipxAddress (pctxt, pvalue->u.ipxAddress);
893 if (stat != ASN_OK) return stat;
894 break;
895
896 /* ip6Address */
897 case 4:
898 stat = asn1PE_H225TransportAddress_ip6Address (pctxt, pvalue->u.ip6Address);
899 if (stat != ASN_OK) return stat;
900 break;
901
902 /* netBios */
903 case 5:
904 stat = asn1PE_H225TransportAddress_netBios (pctxt, pvalue->u.netBios);
905 if (stat != ASN_OK) return stat;
906 break;
907
908 /* nsap */
909 case 6:
910 stat = asn1PE_H225TransportAddress_nsap (pctxt, pvalue->u.nsap);
911 if (stat != ASN_OK) return stat;
912 break;
913
914 /* nonStandardAddress */
915 case 7:
916 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandardAddress);
917 if (stat != ASN_OK) return stat;
918 break;
919
920 default:
921 return ASN_E_INVOPT;
922 }
923 }
924 else {
925 /* Encode extension choice index value */
926
927 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 8);
928 if (stat != ASN_OK) return stat;
929
930 /* Encode extension element data value */
931
932 }
933
934 return (stat);
935 }
936
937 /**************************************************************/
938 /* */
939 /* PublicTypeOfNumber */
940 /* */
941 /**************************************************************/
942
943 EXTERN int asn1PE_H225PublicTypeOfNumber (OOCTXT* pctxt, H225PublicTypeOfNumber* pvalue)
944 {
945 int stat = ASN_OK;
946 ASN1BOOL extbit;
947
948 /* extension bit */
949
950 extbit = (ASN1BOOL)(pvalue->t > 6);
951
952 encodeBit (pctxt, extbit);
953
954 if (!extbit) {
955
956 /* Encode choice index value */
957
958 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 5);
959 if (stat != ASN_OK) return stat;
960
961 /* Encode root element data value */
962
963 switch (pvalue->t)
964 {
965 /* unknown */
966 case 1:
967 /* NULL */
968 break;
969
970 /* internationalNumber */
971 case 2:
972 /* NULL */
973 break;
974
975 /* nationalNumber */
976 case 3:
977 /* NULL */
978 break;
979
980 /* networkSpecificNumber */
981 case 4:
982 /* NULL */
983 break;
984
985 /* subscriberNumber */
986 case 5:
987 /* NULL */
988 break;
989
990 /* abbreviatedNumber */
991 case 6:
992 /* NULL */
993 break;
994
995 default:
996 return ASN_E_INVOPT;
997 }
998 }
999 else {
1000 /* Encode extension choice index value */
1001
1002 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 7);
1003 if (stat != ASN_OK) return stat;
1004
1005 /* Encode extension element data value */
1006
1007 }
1008
1009 return (stat);
1010 }
1011
1012 /**************************************************************/
1013 /* */
1014 /* PublicPartyNumber */
1015 /* */
1016 /**************************************************************/
1017
1018 EXTERN int asn1PE_H225PublicPartyNumber (OOCTXT* pctxt, H225PublicPartyNumber* pvalue)
1019 {
1020 int stat = ASN_OK;
1021
1022 /* encode publicTypeOfNumber */
1023
1024 stat = asn1PE_H225PublicTypeOfNumber (pctxt, &pvalue->publicTypeOfNumber);
1025 if (stat != ASN_OK) return stat;
1026
1027 /* encode publicNumberDigits */
1028
1029 stat = asn1PE_H225NumberDigits (pctxt, pvalue->publicNumberDigits);
1030 if (stat != ASN_OK) return stat;
1031
1032 return (stat);
1033 }
1034
1035 /**************************************************************/
1036 /* */
1037 /* PrivateTypeOfNumber */
1038 /* */
1039 /**************************************************************/
1040
1041 EXTERN int asn1PE_H225PrivateTypeOfNumber (OOCTXT* pctxt, H225PrivateTypeOfNumber* pvalue)
1042 {
1043 int stat = ASN_OK;
1044 ASN1BOOL extbit;
1045
1046 /* extension bit */
1047
1048 extbit = (ASN1BOOL)(pvalue->t > 6);
1049
1050 encodeBit (pctxt, extbit);
1051
1052 if (!extbit) {
1053
1054 /* Encode choice index value */
1055
1056 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 5);
1057 if (stat != ASN_OK) return stat;
1058
1059 /* Encode root element data value */
1060
1061 switch (pvalue->t)
1062 {
1063 /* unknown */
1064 case 1:
1065 /* NULL */
1066 break;
1067
1068 /* level2RegionalNumber */
1069 case 2:
1070 /* NULL */
1071 break;
1072
1073 /* level1RegionalNumber */
1074 case 3:
1075 /* NULL */
1076 break;
1077
1078 /* pISNSpecificNumber */
1079 case 4:
1080 /* NULL */
1081 break;
1082
1083 /* localNumber */
1084 case 5:
1085 /* NULL */
1086 break;
1087
1088 /* abbreviatedNumber */
1089 case 6:
1090 /* NULL */
1091 break;
1092
1093 default:
1094 return ASN_E_INVOPT;
1095 }
1096 }
1097 else {
1098 /* Encode extension choice index value */
1099
1100 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 7);
1101 if (stat != ASN_OK) return stat;
1102
1103 /* Encode extension element data value */
1104
1105 }
1106
1107 return (stat);
1108 }
1109
1110 /**************************************************************/
1111 /* */
1112 /* PrivatePartyNumber */
1113 /* */
1114 /**************************************************************/
1115
1116 EXTERN int asn1PE_H225PrivatePartyNumber (OOCTXT* pctxt, H225PrivatePartyNumber* pvalue)
1117 {
1118 int stat = ASN_OK;
1119
1120 /* encode privateTypeOfNumber */
1121
1122 stat = asn1PE_H225PrivateTypeOfNumber (pctxt, &pvalue->privateTypeOfNumber);
1123 if (stat != ASN_OK) return stat;
1124
1125 /* encode privateNumberDigits */
1126
1127 stat = asn1PE_H225NumberDigits (pctxt, pvalue->privateNumberDigits);
1128 if (stat != ASN_OK) return stat;
1129
1130 return (stat);
1131 }
1132
1133 /**************************************************************/
1134 /* */
1135 /* PartyNumber */
1136 /* */
1137 /**************************************************************/
1138
1139 EXTERN int asn1PE_H225PartyNumber (OOCTXT* pctxt, H225PartyNumber* pvalue)
1140 {
1141 int stat = ASN_OK;
1142 ASN1BOOL extbit;
1143
1144 /* extension bit */
1145
1146 extbit = (ASN1BOOL)(pvalue->t > 5);
1147
1148 encodeBit (pctxt, extbit);
1149
1150 if (!extbit) {
1151
1152 /* Encode choice index value */
1153
1154 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 4);
1155 if (stat != ASN_OK) return stat;
1156
1157 /* Encode root element data value */
1158
1159 switch (pvalue->t)
1160 {
1161 /* e164Number */
1162 case 1:
1163 stat = asn1PE_H225PublicPartyNumber (pctxt, pvalue->u.e164Number);
1164 if (stat != ASN_OK) return stat;
1165 break;
1166
1167 /* dataPartyNumber */
1168 case 2:
1169 stat = asn1PE_H225NumberDigits (pctxt, pvalue->u.dataPartyNumber);
1170 if (stat != ASN_OK) return stat;
1171 break;
1172
1173 /* telexPartyNumber */
1174 case 3:
1175 stat = asn1PE_H225NumberDigits (pctxt, pvalue->u.telexPartyNumber);
1176 if (stat != ASN_OK) return stat;
1177 break;
1178
1179 /* privateNumber */
1180 case 4:
1181 stat = asn1PE_H225PrivatePartyNumber (pctxt, pvalue->u.privateNumber);
1182 if (stat != ASN_OK) return stat;
1183 break;
1184
1185 /* nationalStandardPartyNumber */
1186 case 5:
1187 stat = asn1PE_H225NumberDigits (pctxt, pvalue->u.nationalStandardPartyNumber);
1188 if (stat != ASN_OK) return stat;
1189 break;
1190
1191 default:
1192 return ASN_E_INVOPT;
1193 }
1194 }
1195 else {
1196 /* Encode extension choice index value */
1197
1198 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 6);
1199 if (stat != ASN_OK) return stat;
1200
1201 /* Encode extension element data value */
1202
1203 }
1204
1205 return (stat);
1206 }
1207
1208 /**************************************************************/
1209 /* */
1210 /* ANSI_41_UIM_system_id */
1211 /* */
1212 /**************************************************************/
1213
1214 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_system_id_sid_CharSet;
1215
1216 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_system_id_mid_CharSet;
1217
1218 EXTERN int asn1PE_H225ANSI_41_UIM_system_id (OOCTXT* pctxt, H225ANSI_41_UIM_system_id* pvalue)
1219 {
1220 static Asn1SizeCnst sid_lsize1 = { 0, 1, 4, 0 };
1221 static Asn1SizeCnst mid_lsize1 = { 0, 1, 4, 0 };
1222 int stat = ASN_OK;
1223 ASN1BOOL extbit;
1224
1225 /* extension bit */
1226
1227 extbit = (ASN1BOOL)(pvalue->t > 2);
1228
1229 encodeBit (pctxt, extbit);
1230
1231 if (!extbit) {
1232
1233 /* Encode choice index value */
1234
1235 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
1236 if (stat != ASN_OK) return stat;
1237
1238 /* Encode root element data value */
1239
1240 switch (pvalue->t)
1241 {
1242 /* sid */
1243 case 1:
1244 addSizeConstraint (pctxt, &sid_lsize1);
1245
1246 stat = encodeConstrainedStringEx (pctxt, pvalue->u.sid, gs_H323_MESSAGES_ANSI_41_UIM_system_id_sid_CharSet, 4, 4, 7);
1247 if (stat != ASN_OK) return stat;
1248 break;
1249
1250 /* mid */
1251 case 2:
1252 addSizeConstraint (pctxt, &mid_lsize1);
1253
1254 stat = encodeConstrainedStringEx (pctxt, pvalue->u.mid, gs_H323_MESSAGES_ANSI_41_UIM_system_id_mid_CharSet, 4, 4, 7);
1255 if (stat != ASN_OK) return stat;
1256 break;
1257
1258 default:
1259 return ASN_E_INVOPT;
1260 }
1261 }
1262 else {
1263 /* Encode extension choice index value */
1264
1265 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
1266 if (stat != ASN_OK) return stat;
1267
1268 /* Encode extension element data value */
1269
1270 }
1271
1272 return (stat);
1273 }
1274
1275 /**************************************************************/
1276 /* */
1277 /* ANSI_41_UIM_systemMyTypeCode */
1278 /* */
1279 /**************************************************************/
1280
1281 EXTERN int asn1PE_H225ANSI_41_UIM_systemMyTypeCode (OOCTXT* pctxt, H225ANSI_41_UIM_systemMyTypeCode* pvalue)
1282 {
1283 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1284 int stat = ASN_OK;
1285
1286 addSizeConstraint (pctxt, &lsize1);
1287
1288 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
1289 if (stat != ASN_OK) return stat;
1290
1291 return (stat);
1292 }
1293
1294 /**************************************************************/
1295 /* */
1296 /* ANSI_41_UIM_systemAccessType */
1297 /* */
1298 /**************************************************************/
1299
1300 EXTERN int asn1PE_H225ANSI_41_UIM_systemAccessType (OOCTXT* pctxt, H225ANSI_41_UIM_systemAccessType* pvalue)
1301 {
1302 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1303 int stat = ASN_OK;
1304
1305 addSizeConstraint (pctxt, &lsize1);
1306
1307 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
1308 if (stat != ASN_OK) return stat;
1309
1310 return (stat);
1311 }
1312
1313 /**************************************************************/
1314 /* */
1315 /* ANSI_41_UIM_qualificationInformationCode */
1316 /* */
1317 /**************************************************************/
1318
1319 EXTERN int asn1PE_H225ANSI_41_UIM_qualificationInformationCode (OOCTXT* pctxt, H225ANSI_41_UIM_qualificationInformationCode* pvalue)
1320 {
1321 static Asn1SizeCnst lsize1 = { 0, 1, 1, 0 };
1322 int stat = ASN_OK;
1323
1324 addSizeConstraint (pctxt, &lsize1);
1325
1326 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
1327 if (stat != ASN_OK) return stat;
1328
1329 return (stat);
1330 }
1331
1332 /**************************************************************/
1333 /* */
1334 /* ANSI_41_UIM */
1335 /* */
1336 /**************************************************************/
1337
1338 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_imsi_CharSet;
1339
1340 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_min_CharSet;
1341
1342 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_mdn_CharSet;
1343
1344 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_msisdn_CharSet;
1345
1346 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_esn_CharSet;
1347
1348 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_mscid_CharSet;
1349
1350 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_sesn_CharSet;
1351
1352 extern EXTERN const char* gs_H323_MESSAGES_ANSI_41_UIM_soc_CharSet;
1353
1354 EXTERN int asn1PE_H225ANSI_41_UIM (OOCTXT* pctxt, H225ANSI_41_UIM* pvalue)
1355 {
1356 static Asn1SizeCnst imsi_lsize1 = { 0, 3, 16, 0 };
1357 static Asn1SizeCnst min_lsize1 = { 0, 3, 16, 0 };
1358 static Asn1SizeCnst mdn_lsize1 = { 0, 3, 16, 0 };
1359 static Asn1SizeCnst msisdn_lsize1 = { 0, 3, 16, 0 };
1360 static Asn1SizeCnst esn_lsize1 = { 0, 16, 16, 0 };
1361 static Asn1SizeCnst mscid_lsize1 = { 0, 3, 16, 0 };
1362 static Asn1SizeCnst sesn_lsize1 = { 0, 16, 16, 0 };
1363 static Asn1SizeCnst soc_lsize1 = { 0, 3, 16, 0 };
1364 int stat = ASN_OK;
1365 ASN1BOOL extbit;
1366
1367 /* extension bit */
1368
1369 extbit = 0;
1370
1371 encodeBit (pctxt, extbit);
1372
1373 encodeBit (pctxt, (ASN1BOOL)pvalue->m.imsiPresent);
1374
1375 encodeBit (pctxt, (ASN1BOOL)pvalue->m.minPresent);
1376
1377 encodeBit (pctxt, (ASN1BOOL)pvalue->m.mdnPresent);
1378
1379 encodeBit (pctxt, (ASN1BOOL)pvalue->m.msisdnPresent);
1380
1381 encodeBit (pctxt, (ASN1BOOL)pvalue->m.esnPresent);
1382
1383 encodeBit (pctxt, (ASN1BOOL)pvalue->m.mscidPresent);
1384
1385 encodeBit (pctxt, (ASN1BOOL)pvalue->m.systemMyTypeCodePresent);
1386
1387 encodeBit (pctxt, (ASN1BOOL)pvalue->m.systemAccessTypePresent);
1388
1389 encodeBit (pctxt, (ASN1BOOL)pvalue->m.qualificationInformationCodePresent);
1390
1391 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sesnPresent);
1392
1393 encodeBit (pctxt, (ASN1BOOL)pvalue->m.socPresent);
1394
1395 /* encode imsi */
1396
1397 if (pvalue->m.imsiPresent) {
1398 addSizeConstraint (pctxt, &imsi_lsize1);
1399
1400 stat = encodeConstrainedStringEx (pctxt, pvalue->imsi, gs_H323_MESSAGES_ANSI_41_UIM_imsi_CharSet, 4, 4, 7);
1401 if (stat != ASN_OK) return stat;
1402 }
1403
1404 /* encode min */
1405
1406 if (pvalue->m.minPresent) {
1407 addSizeConstraint (pctxt, &min_lsize1);
1408
1409 stat = encodeConstrainedStringEx (pctxt, pvalue->min, gs_H323_MESSAGES_ANSI_41_UIM_min_CharSet, 4, 4, 7);
1410 if (stat != ASN_OK) return stat;
1411 }
1412
1413 /* encode mdn */
1414
1415 if (pvalue->m.mdnPresent) {
1416 addSizeConstraint (pctxt, &mdn_lsize1);
1417
1418 stat = encodeConstrainedStringEx (pctxt, pvalue->mdn, gs_H323_MESSAGES_ANSI_41_UIM_mdn_CharSet, 4, 4, 7);
1419 if (stat != ASN_OK) return stat;
1420 }
1421
1422 /* encode msisdn */
1423
1424 if (pvalue->m.msisdnPresent) {
1425 addSizeConstraint (pctxt, &msisdn_lsize1);
1426
1427 stat = encodeConstrainedStringEx (pctxt, pvalue->msisdn, gs_H323_MESSAGES_ANSI_41_UIM_msisdn_CharSet, 4, 4, 7);
1428 if (stat != ASN_OK) return stat;
1429 }
1430
1431 /* encode esn */
1432
1433 if (pvalue->m.esnPresent) {
1434 addSizeConstraint (pctxt, &esn_lsize1);
1435
1436 stat = encodeConstrainedStringEx (pctxt, pvalue->esn, gs_H323_MESSAGES_ANSI_41_UIM_esn_CharSet, 4, 4, 7);
1437 if (stat != ASN_OK) return stat;
1438 }
1439
1440 /* encode mscid */
1441
1442 if (pvalue->m.mscidPresent) {
1443 addSizeConstraint (pctxt, &mscid_lsize1);
1444
1445 stat = encodeConstrainedStringEx (pctxt, pvalue->mscid, gs_H323_MESSAGES_ANSI_41_UIM_mscid_CharSet, 4, 4, 7);
1446 if (stat != ASN_OK) return stat;
1447 }
1448
1449 /* encode system_id */
1450
1451 stat = asn1PE_H225ANSI_41_UIM_system_id (pctxt, &pvalue->system_id);
1452 if (stat != ASN_OK) return stat;
1453
1454 /* encode systemMyTypeCode */
1455
1456 if (pvalue->m.systemMyTypeCodePresent) {
1457 stat = asn1PE_H225ANSI_41_UIM_systemMyTypeCode (pctxt, &pvalue->systemMyTypeCode);
1458 if (stat != ASN_OK) return stat;
1459 }
1460
1461 /* encode systemAccessType */
1462
1463 if (pvalue->m.systemAccessTypePresent) {
1464 stat = asn1PE_H225ANSI_41_UIM_systemAccessType (pctxt, &pvalue->systemAccessType);
1465 if (stat != ASN_OK) return stat;
1466 }
1467
1468 /* encode qualificationInformationCode */
1469
1470 if (pvalue->m.qualificationInformationCodePresent) {
1471 stat = asn1PE_H225ANSI_41_UIM_qualificationInformationCode (pctxt, &pvalue->qualificationInformationCode);
1472 if (stat != ASN_OK) return stat;
1473 }
1474
1475 /* encode sesn */
1476
1477 if (pvalue->m.sesnPresent) {
1478 addSizeConstraint (pctxt, &sesn_lsize1);
1479
1480 stat = encodeConstrainedStringEx (pctxt, pvalue->sesn, gs_H323_MESSAGES_ANSI_41_UIM_sesn_CharSet, 4, 4, 7);
1481 if (stat != ASN_OK) return stat;
1482 }
1483
1484 /* encode soc */
1485
1486 if (pvalue->m.socPresent) {
1487 addSizeConstraint (pctxt, &soc_lsize1);
1488
1489 stat = encodeConstrainedStringEx (pctxt, pvalue->soc, gs_H323_MESSAGES_ANSI_41_UIM_soc_CharSet, 4, 4, 7);
1490 if (stat != ASN_OK) return stat;
1491 }
1492
1493 return (stat);
1494 }
1495
1496 /**************************************************************/
1497 /* */
1498 /* GSM_UIM_tmsi */
1499 /* */
1500 /**************************************************************/
1501
1502 EXTERN int asn1PE_H225GSM_UIM_tmsi (OOCTXT* pctxt, H225GSM_UIM_tmsi* pvalue)
1503 {
1504 static Asn1SizeCnst lsize1 = { 0, 1, 4, 0 };
1505 int stat = ASN_OK;
1506
1507 addSizeConstraint (pctxt, &lsize1);
1508
1509 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
1510 if (stat != ASN_OK) return stat;
1511
1512 return (stat);
1513 }
1514
1515 /**************************************************************/
1516 /* */
1517 /* GSM_UIM */
1518 /* */
1519 /**************************************************************/
1520
1521 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_imsi_CharSet;
1522
1523 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_msisdn_CharSet;
1524
1525 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_imei_CharSet;
1526
1527 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_hplmn_CharSet;
1528
1529 extern EXTERN const char* gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet;
1530
1531 EXTERN int asn1PE_H225GSM_UIM (OOCTXT* pctxt, H225GSM_UIM* pvalue)
1532 {
1533 static Asn1SizeCnst imsi_lsize1 = { 0, 3, 16, 0 };
1534 static Asn1SizeCnst msisdn_lsize1 = { 0, 3, 16, 0 };
1535 static Asn1SizeCnst imei_lsize1 = { 0, 15, 16, 0 };
1536 static Asn1SizeCnst hplmn_lsize1 = { 0, 1, 4, 0 };
1537 static Asn1SizeCnst vplmn_lsize1 = { 0, 1, 4, 0 };
1538 int stat = ASN_OK;
1539 ASN1BOOL extbit;
1540
1541 /* extension bit */
1542
1543 extbit = 0;
1544
1545 encodeBit (pctxt, extbit);
1546
1547 encodeBit (pctxt, (ASN1BOOL)pvalue->m.imsiPresent);
1548
1549 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tmsiPresent);
1550
1551 encodeBit (pctxt, (ASN1BOOL)pvalue->m.msisdnPresent);
1552
1553 encodeBit (pctxt, (ASN1BOOL)pvalue->m.imeiPresent);
1554
1555 encodeBit (pctxt, (ASN1BOOL)pvalue->m.hplmnPresent);
1556
1557 encodeBit (pctxt, (ASN1BOOL)pvalue->m.vplmnPresent);
1558
1559 /* encode imsi */
1560
1561 if (pvalue->m.imsiPresent) {
1562 addSizeConstraint (pctxt, &imsi_lsize1);
1563
1564 stat = encodeConstrainedStringEx (pctxt, pvalue->imsi, gs_H323_MESSAGES_GSM_UIM_imsi_CharSet, 4, 4, 7);
1565 if (stat != ASN_OK) return stat;
1566 }
1567
1568 /* encode tmsi */
1569
1570 if (pvalue->m.tmsiPresent) {
1571 stat = asn1PE_H225GSM_UIM_tmsi (pctxt, &pvalue->tmsi);
1572 if (stat != ASN_OK) return stat;
1573 }
1574
1575 /* encode msisdn */
1576
1577 if (pvalue->m.msisdnPresent) {
1578 addSizeConstraint (pctxt, &msisdn_lsize1);
1579
1580 stat = encodeConstrainedStringEx (pctxt, pvalue->msisdn, gs_H323_MESSAGES_GSM_UIM_msisdn_CharSet, 4, 4, 7);
1581 if (stat != ASN_OK) return stat;
1582 }
1583
1584 /* encode imei */
1585
1586 if (pvalue->m.imeiPresent) {
1587 addSizeConstraint (pctxt, &imei_lsize1);
1588
1589 stat = encodeConstrainedStringEx (pctxt, pvalue->imei, gs_H323_MESSAGES_GSM_UIM_imei_CharSet, 4, 4, 7);
1590 if (stat != ASN_OK) return stat;
1591 }
1592
1593 /* encode hplmn */
1594
1595 if (pvalue->m.hplmnPresent) {
1596 addSizeConstraint (pctxt, &hplmn_lsize1);
1597
1598 stat = encodeConstrainedStringEx (pctxt, pvalue->hplmn, gs_H323_MESSAGES_GSM_UIM_hplmn_CharSet, 4, 4, 7);
1599 if (stat != ASN_OK) return stat;
1600 }
1601
1602 /* encode vplmn */
1603
1604 if (pvalue->m.vplmnPresent) {
1605 addSizeConstraint (pctxt, &vplmn_lsize1);
1606
1607 stat = encodeConstrainedStringEx (pctxt, pvalue->vplmn, gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet, 4, 4, 7);
1608 if (stat != ASN_OK) return stat;
1609 }
1610
1611 return (stat);
1612 }
1613
1614 /**************************************************************/
1615 /* */
1616 /* MobileUIM */
1617 /* */
1618 /**************************************************************/
1619
1620 EXTERN int asn1PE_H225MobileUIM (OOCTXT* pctxt, H225MobileUIM* pvalue)
1621 {
1622 int stat = ASN_OK;
1623 ASN1BOOL extbit;
1624
1625 /* extension bit */
1626
1627 extbit = (ASN1BOOL)(pvalue->t > 2);
1628
1629 encodeBit (pctxt, extbit);
1630
1631 if (!extbit) {
1632
1633 /* Encode choice index value */
1634
1635 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
1636 if (stat != ASN_OK) return stat;
1637
1638 /* Encode root element data value */
1639
1640 switch (pvalue->t)
1641 {
1642 /* ansi_41_uim */
1643 case 1:
1644 stat = asn1PE_H225ANSI_41_UIM (pctxt, pvalue->u.ansi_41_uim);
1645 if (stat != ASN_OK) return stat;
1646 break;
1647
1648 /* gsm_uim */
1649 case 2:
1650 stat = asn1PE_H225GSM_UIM (pctxt, pvalue->u.gsm_uim);
1651 if (stat != ASN_OK) return stat;
1652 break;
1653
1654 default:
1655 return ASN_E_INVOPT;
1656 }
1657 }
1658 else {
1659 /* Encode extension choice index value */
1660
1661 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
1662 if (stat != ASN_OK) return stat;
1663
1664 /* Encode extension element data value */
1665
1666 }
1667
1668 return (stat);
1669 }
1670
1671 /**************************************************************/
1672 /* */
1673 /* AliasAddress */
1674 /* */
1675 /**************************************************************/
1676
1677 extern EXTERN const char* gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet;
1678
1679 EXTERN int asn1PE_H225AliasAddress (OOCTXT* pctxt, H225AliasAddress* pvalue)
1680 {
1681 static Asn1SizeCnst dialedDigits_lsize1 = { 0, 1, 128, 0 };
1682 static Asn1SizeCnst h323_ID_lsize1 = { 0, 1, 256, 0 };
1683 static Asn1SizeCnst url_ID_lsize1 = { 0, 1, 512, 0 };
1684 static Asn1SizeCnst email_ID_lsize1 = { 0, 1, 512, 0 };
1685 int stat = ASN_OK;
1686 OOCTXT lctxt;
1687 ASN1OpenType openType;
1688 ASN1BOOL extbit;
1689
1690 /* extension bit */
1691
1692 extbit = (ASN1BOOL)(pvalue->t > 2);
1693
1694 encodeBit (pctxt, extbit);
1695
1696 if (!extbit) {
1697
1698 /* Encode choice index value */
1699
1700 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
1701 if (stat != ASN_OK) return stat;
1702
1703 /* Encode root element data value */
1704
1705 switch (pvalue->t)
1706 {
1707 /* dialedDigits */
1708 case 1:
1709 addSizeConstraint (pctxt, &dialedDigits_lsize1);
1710
1711 stat = encodeConstrainedStringEx (pctxt, pvalue->u.dialedDigits, gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet, 4, 4, 7);
1712 if (stat != ASN_OK) return stat;
1713 break;
1714
1715 /* h323_ID */
1716 case 2:
1717 addSizeConstraint (pctxt, &h323_ID_lsize1);
1718
1719 stat = encodeBMPString (pctxt, pvalue->u.h323_ID, 0);
1720 if (stat != ASN_OK) return stat;
1721 break;
1722
1723 default:
1724 return ASN_E_INVOPT;
1725 }
1726 }
1727 else {
1728 /* Encode extension choice index value */
1729
1730 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
1731 if (stat != ASN_OK) return stat;
1732
1733 /* Encode extension element data value */
1734
1735 initContext (&lctxt);
1736 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
1737 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1738
1739 switch (pvalue->t)
1740 {
1741 /* url_ID */
1742 case 3:
1743 addSizeConstraint (&lctxt, &url_ID_lsize1);
1744
1745 stat = encodeConstrainedStringEx (&lctxt, pvalue->u.url_ID, 0, 8, 7, 7);
1746 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1747 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
1748 break;
1749
1750 /* transportID */
1751 case 4:
1752 stat = asn1PE_H225TransportAddress (&lctxt, pvalue->u.transportID);
1753 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1754 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
1755 break;
1756
1757 /* email_ID */
1758 case 5:
1759 addSizeConstraint (&lctxt, &email_ID_lsize1);
1760
1761 stat = encodeConstrainedStringEx (&lctxt, pvalue->u.email_ID, 0, 8, 7, 7);
1762 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1763 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
1764 break;
1765
1766 /* partyNumber */
1767 case 6:
1768 stat = asn1PE_H225PartyNumber (&lctxt, pvalue->u.partyNumber);
1769 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1770 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
1771 break;
1772
1773 /* mobileUIM */
1774 case 7:
1775 stat = asn1PE_H225MobileUIM (&lctxt, pvalue->u.mobileUIM);
1776 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1777 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
1778 break;
1779
1780 default:
1781 ;
1782 }
1783
1784 stat = encodeByteAlign (pctxt);
1785 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1786
1787 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
1788 if (stat != ASN_OK) return freeContext (&lctxt), stat;
1789
1790 freeContext (&lctxt);
1791 }
1792
1793 return (stat);
1794 }
1795
1796 /**************************************************************/
1797 /* */
1798 /* Content_compound */
1799 /* */
1800 /**************************************************************/
1801
1802 EXTERN int asn1PE_H225Content_compound (OOCTXT* pctxt, H225Content_compound* pvalue)
1803 {
1804 static Asn1SizeCnst lsize1 = { 0, 1, 512, 0 };
1805 int stat = ASN_OK;
1806 DListNode* pnode;
1807 ASN1UINT xx1;
1808
1809 /* encode length determinant */
1810
1811 addSizeConstraint (pctxt, &lsize1);
1812
1813 stat = encodeLength (pctxt, pvalue->count);
1814 if (stat < 0) return stat;
1815
1816 /* encode elements */
1817 pnode = pvalue->head;
1818
1819 for (xx1 = 0; xx1 < pvalue->count; xx1++) {
1820 stat = asn1PE_H225EnumeratedParameter (pctxt, (H225EnumeratedParameter*)((H225EnumeratedParameter*)pnode->data));
1821 if (stat != ASN_OK) return stat;
1822 pnode = pnode->next;
1823 }
1824
1825 return (stat);
1826 }
1827
1828 /**************************************************************/
1829 /* */
1830 /* Content_nested */
1831 /* */
1832 /**************************************************************/
1833
1834 EXTERN int asn1PE_H225Content_nested (OOCTXT* pctxt, H225Content_nested* pvalue)
1835 {
1836 static Asn1SizeCnst lsize1 = { 0, 1, 16, 0 };
1837 int stat = ASN_OK;
1838 DListNode* pnode;
1839 ASN1UINT xx1;
1840
1841 /* encode length determinant */
1842
1843 addSizeConstraint (pctxt, &lsize1);
1844
1845 stat = encodeLength (pctxt, pvalue->count);
1846 if (stat < 0) return stat;
1847
1848 /* encode elements */
1849 pnode = pvalue->head;
1850
1851 for (xx1 = 0; xx1 < pvalue->count; xx1++) {
1852 stat = asn1PE_H225GenericData (pctxt, (H225GenericData*)((H225GenericData*)pnode->data));
1853 if (stat != ASN_OK) return stat;
1854 pnode = pnode->next;
1855 }
1856
1857 return (stat);
1858 }
1859
1860 /**************************************************************/
1861 /* */
1862 /* Content */
1863 /* */
1864 /**************************************************************/
1865
1866 EXTERN int asn1PE_H225Content (OOCTXT* pctxt, H225Content* pvalue)
1867 {
1868 int stat = ASN_OK;
1869 ASN1BOOL extbit;
1870
1871 /* extension bit */
1872
1873 extbit = (ASN1BOOL)(pvalue->t > 12);
1874
1875 encodeBit (pctxt, extbit);
1876
1877 if (!extbit) {
1878
1879 /* Encode choice index value */
1880
1881 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 11);
1882 if (stat != ASN_OK) return stat;
1883
1884 /* Encode root element data value */
1885
1886 switch (pvalue->t)
1887 {
1888 /* raw */
1889 case 1:
1890 stat = encodeOctetString (pctxt, pvalue->u.raw->numocts, pvalue->u.raw->data);
1891 if (stat != ASN_OK) return stat;
1892 break;
1893
1894 /* text */
1895 case 2:
1896 stat = encodeConstrainedStringEx (pctxt, pvalue->u.text, 0, 8, 7, 7);
1897 if (stat != ASN_OK) return stat;
1898 break;
1899
1900 /* unicode */
1901 case 3:
1902 stat = encodeBMPString (pctxt, pvalue->u.unicode, 0);
1903 if (stat != ASN_OK) return stat;
1904 break;
1905
1906 /* bool_ */
1907 case 4:
1908 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->u.bool_);
1909 if (stat != ASN_OK) return stat;
1910 break;
1911
1912 /* number8 */
1913 case 5:
1914 stat = encodeConsUnsigned (pctxt, pvalue->u.number8, 0U, 255U);
1915 if (stat != ASN_OK) return stat;
1916
1917 break;
1918
1919 /* number16 */
1920 case 6:
1921 stat = encodeConsUnsigned (pctxt, pvalue->u.number16, 0U, 65535U);
1922 if (stat != ASN_OK) return stat;
1923
1924 break;
1925
1926 /* number32 */
1927 case 7:
1928 stat = encodeConsUnsigned (pctxt, pvalue->u.number32, 0U, ASN1UINT_MAX);
1929 if (stat != ASN_OK) return stat;
1930
1931 break;
1932
1933 /* id */
1934 case 8:
1935 stat = asn1PE_H225GenericIdentifier (pctxt, pvalue->u.id);
1936 if (stat != ASN_OK) return stat;
1937 break;
1938
1939 /* alias */
1940 case 9:
1941 stat = asn1PE_H225AliasAddress (pctxt, pvalue->u.alias);
1942 if (stat != ASN_OK) return stat;
1943 break;
1944
1945 /* transport */
1946 case 10:
1947 stat = asn1PE_H225TransportAddress (pctxt, pvalue->u.transport);
1948 if (stat != ASN_OK) return stat;
1949 break;
1950
1951 /* compound */
1952 case 11:
1953 stat = asn1PE_H225Content_compound (pctxt, pvalue->u.compound);
1954 if (stat != ASN_OK) return stat;
1955 break;
1956
1957 /* nested */
1958 case 12:
1959 stat = asn1PE_H225Content_nested (pctxt, pvalue->u.nested);
1960 if (stat != ASN_OK) return stat;
1961 break;
1962
1963 default:
1964 return ASN_E_INVOPT;
1965 }
1966 }
1967 else {
1968 /* Encode extension choice index value */
1969
1970 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 13);
1971 if (stat != ASN_OK) return stat;
1972
1973 /* Encode extension element data value */
1974
1975 }
1976
1977 return (stat);
1978 }
1979
1980 /**************************************************************/
1981 /* */
1982 /* EnumeratedParameter */
1983 /* */
1984 /**************************************************************/
1985
1986 EXTERN int asn1PE_H225EnumeratedParameter (OOCTXT* pctxt, H225EnumeratedParameter* pvalue)
1987 {
1988 int stat = ASN_OK;
1989 ASN1BOOL extbit;
1990
1991 /* extension bit */
1992
1993 extbit = 0;
1994
1995 encodeBit (pctxt, extbit);
1996
1997 encodeBit (pctxt, (ASN1BOOL)pvalue->m.contentPresent);
1998
1999 /* encode id */
2000
2001 stat = asn1PE_H225GenericIdentifier (pctxt, &pvalue->id);
2002 if (stat != ASN_OK) return stat;
2003
2004 /* encode content */
2005
2006 if (pvalue->m.contentPresent) {
2007 stat = asn1PE_H225Content (pctxt, &pvalue->content);
2008 if (stat != ASN_OK) return stat;
2009 }
2010
2011 return (stat);
2012 }
2013
2014 /**************************************************************/
2015 /* */
2016 /* GenericData_parameters */
2017 /* */
2018 /**************************************************************/
2019
2020 EXTERN int asn1PE_H225GenericData_parameters (OOCTXT* pctxt, H225GenericData_parameters* pvalue)
2021 {
2022 static Asn1SizeCnst lsize1 = { 0, 1, 512, 0 };
2023 int stat = ASN_OK;
2024 DListNode* pnode;
2025 ASN1UINT xx1;
2026
2027 /* encode length determinant */
2028
2029 addSizeConstraint (pctxt, &lsize1);
2030
2031 stat = encodeLength (pctxt, pvalue->count);
2032 if (stat < 0) return stat;
2033
2034 /* encode elements */
2035 pnode = pvalue->head;
2036
2037 for (xx1 = 0; xx1 < pvalue->count; xx1++) {
2038 stat = asn1PE_H225EnumeratedParameter (pctxt, ((H225EnumeratedParameter*)pnode->data));
2039 if (stat != ASN_OK) return stat;
2040 pnode = pnode->next;
2041 }
2042
2043 return (stat);
2044 }
2045
2046 /**************************************************************/
2047 /* */
2048 /* GenericData */
2049 /* */
2050 /**************************************************************/
2051
2052 EXTERN int asn1PE_H225GenericData (OOCTXT* pctxt, H225GenericData* pvalue)
2053 {
2054 int stat = ASN_OK;
2055 ASN1BOOL extbit;
2056
2057 /* extension bit */
2058
2059 extbit = 0;
2060
2061 encodeBit (pctxt, extbit);
2062
2063 encodeBit (pctxt, (ASN1BOOL)pvalue->m.parametersPresent);
2064
2065 /* encode id */
2066
2067 stat = asn1PE_H225GenericIdentifier (pctxt, &pvalue->id);
2068 if (stat != ASN_OK) return stat;
2069
2070 /* encode parameters */
2071
2072 if (pvalue->m.parametersPresent) {
2073 stat = asn1PE_H225GenericData_parameters (pctxt, &pvalue->parameters);
2074 if (stat != ASN_OK) return stat;
2075 }
2076
2077 return (stat);
2078 }
2079
2080 /**************************************************************/
2081 /* */
2082 /* FeatureDescriptor */
2083 /* */
2084 /**************************************************************/
2085
2086 EXTERN int asn1PE_H225FeatureDescriptor (OOCTXT* pctxt, H225FeatureDescriptor* pvalue)
2087 {
2088 int stat = ASN_OK;
2089
2090 stat = asn1PE_H225GenericData (pctxt, pvalue);
2091 if (stat != ASN_OK) return stat;
2092
2093 return (stat);
2094 }
2095
2096 /**************************************************************/
2097 /* */
2098 /* FastStartToken */
2099 /* */
2100 /**************************************************************/
2101
2102 EXTERN int asn1PE_H225FastStartToken (OOCTXT* pctxt, H225FastStartToken* pvalue)
2103 {
2104 int stat = ASN_OK;
2105
2106 stat = asn1PE_H235ClearToken (pctxt, pvalue);
2107 if (stat != ASN_OK) return stat;
2108
2109 return (stat);
2110 }
2111
2112 /**************************************************************/
2113 /* */
2114 /* EncodedFastStartToken */
2115 /* */
2116 /**************************************************************/
2117
2118 EXTERN int asn1PE_H225EncodedFastStartToken (OOCTXT* pctxt, H225EncodedFastStartToken value)
2119 {
2120 int stat = ASN_OK;
2121
2122 stat = encodeOpenType (pctxt, value.numocts, value.data);
2123 if (stat != ASN_OK) return stat;
2124
2125 return (stat);
2126 }
2127
2128 /**************************************************************/
2129 /* */
2130 /* H323_UserInformation_user_data_user_information */
2131 /* */
2132 /**************************************************************/
2133
2134 EXTERN int asn1PE_H225H323_UserInformation_user_data_user_information (OOCTXT* pctxt, H225H323_UserInformation_user_data_user_information* pvalue)
2135 {
2136 static Asn1SizeCnst lsize1 = { 0, 1, 131, 0 };
2137 int stat = ASN_OK;
2138
2139 addSizeConstraint (pctxt, &lsize1);
2140
2141 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2142 if (stat != ASN_OK) return stat;
2143
2144 return (stat);
2145 }
2146
2147 /**************************************************************/
2148 /* */
2149 /* EndpointType_set */
2150 /* */
2151 /**************************************************************/
2152
2153 EXTERN int asn1PE_H225EndpointType_set (OOCTXT* pctxt, H225EndpointType_set* pvalue)
2154 {
2155 static Asn1SizeCnst lsize1 = { 0, 32, 32, 0 };
2156 int stat = ASN_OK;
2157
2158 addSizeConstraint (pctxt, &lsize1);
2159
2160 stat = encodeBitString (pctxt, pvalue->numbits, pvalue->data);
2161 if (stat != ASN_OK) return stat;
2162
2163 return (stat);
2164 }
2165
2166 /**************************************************************/
2167 /* */
2168 /* VendorIdentifier_productId */
2169 /* */
2170 /**************************************************************/
2171
2172 EXTERN int asn1PE_H225VendorIdentifier_productId (OOCTXT* pctxt, H225VendorIdentifier_productId* pvalue)
2173 {
2174 static Asn1SizeCnst lsize1 = { 0, 1, 256, 0 };
2175 int stat = ASN_OK;
2176
2177 addSizeConstraint (pctxt, &lsize1);
2178
2179 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2180 if (stat != ASN_OK) return stat;
2181
2182 return (stat);
2183 }
2184
2185 /**************************************************************/
2186 /* */
2187 /* VendorIdentifier_versionId */
2188 /* */
2189 /**************************************************************/
2190
2191 EXTERN int asn1PE_H225VendorIdentifier_versionId (OOCTXT* pctxt, H225VendorIdentifier_versionId* pvalue)
2192 {
2193 static Asn1SizeCnst lsize1 = { 0, 1, 256, 0 };
2194 int stat = ASN_OK;
2195
2196 addSizeConstraint (pctxt, &lsize1);
2197
2198 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2199 if (stat != ASN_OK) return stat;
2200
2201 return (stat);
2202 }
2203
2204 /**************************************************************/
2205 /* */
2206 /* CicInfo_cic_element */
2207 /* */
2208 /**************************************************************/
2209
2210 EXTERN int asn1PE_H225CicInfo_cic_element (OOCTXT* pctxt, H225CicInfo_cic_element* pvalue)
2211 {
2212 static Asn1SizeCnst lsize1 = { 0, 2, 4, 0 };
2213 int stat = ASN_OK;
2214
2215 addSizeConstraint (pctxt, &lsize1);
2216
2217 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2218 if (stat != ASN_OK) return stat;
2219
2220 return (stat);
2221 }
2222
2223 /**************************************************************/
2224 /* */
2225 /* CicInfo_pointCode */
2226 /* */
2227 /**************************************************************/
2228
2229 EXTERN int asn1PE_H225CicInfo_pointCode (OOCTXT* pctxt, H225CicInfo_pointCode* pvalue)
2230 {
2231 static Asn1SizeCnst lsize1 = { 0, 2, 5, 0 };
2232 int stat = ASN_OK;
2233
2234 addSizeConstraint (pctxt, &lsize1);
2235
2236 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2237 if (stat != ASN_OK) return stat;
2238
2239 return (stat);
2240 }
2241
2242 /**************************************************************/
2243 /* */
2244 /* CarrierInfo_carrierIdentificationCode */
2245 /* */
2246 /**************************************************************/
2247
2248 EXTERN int asn1PE_H225CarrierInfo_carrierIdentificationCode (OOCTXT* pctxt, H225CarrierInfo_carrierIdentificationCode* pvalue)
2249 {
2250 static Asn1SizeCnst lsize1 = { 0, 3, 4, 0 };
2251 int stat = ASN_OK;
2252
2253 addSizeConstraint (pctxt, &lsize1);
2254
2255 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2256 if (stat != ASN_OK) return stat;
2257
2258 return (stat);
2259 }
2260
2261 /**************************************************************/
2262 /* */
2263 /* CallTerminationCause_releaseCompleteCauseIE */
2264 /* */
2265 /**************************************************************/
2266
2267 EXTERN int asn1PE_H225CallTerminationCause_releaseCompleteCauseIE (OOCTXT* pctxt, H225CallTerminationCause_releaseCompleteCauseIE* pvalue)
2268 {
2269 static Asn1SizeCnst lsize1 = { 0, 2, 32, 0 };
2270 int stat = ASN_OK;
2271
2272 addSizeConstraint (pctxt, &lsize1);
2273
2274 stat = encodeOctetString (pctxt, pvalue->numocts, pvalue->data);
2275 if (stat != ASN_OK) return stat;
2276
2277 return (stat);
2278 }
2279
2280 /**************************************************************/
2281 /* */
2282 /* _SeqOfH225AliasAddress */
2283 /* */
2284 /**************************************************************/
2285
2286 EXTERN int asn1PE_H225_SeqOfH225AliasAddress (OOCTXT* pctxt, H225_SeqOfH225AliasAddress* pvalue)
2287 {
2288 int stat = ASN_OK;
2289 DListNode* pnode;
2290 ASN1UINT xx1;
2291 ASN1UINT enclen, fraglen;
2292
2293 enclen = fraglen = xx1 = 0;
2294 pnode = pvalue->head;
2295 for (;;) {
2296 /* encode length determinant */
2297
2298 stat = encodeLength (pctxt, (pvalue->count - enclen));
2299 if (stat < 0) return stat;
2300
2301 fraglen = stat;
2302 enclen += fraglen;
2303 /* encode elements */
2304
2305 for (; xx1 < enclen; xx1++) {
2306 stat = asn1PE_H225AliasAddress (pctxt, ((H225AliasAddress*)pnode->data));
2307 if (stat != ASN_OK) return stat;
2308 pnode = pnode->next;
2309 }
2310 if ( pvalue->count == enclen && fraglen < 16384) {
2311 break;
2312 }
2313 }
2314
2315 return (stat);
2316 }
2317
2318 /**************************************************************/
2319 /* */
2320 /* VendorIdentifier */
2321 /* */
2322 /**************************************************************/
2323
2324 EXTERN int asn1PE_H225VendorIdentifier (OOCTXT* pctxt, H225VendorIdentifier* pvalue)
2325 {
2326 int stat = ASN_OK;
2327 ASN1BOOL extbit;
2328 ASN1OpenType openType;
2329 OOCTXT lctxt;
2330
2331 /* extension bit */
2332
2333 extbit = (ASN1BOOL)(pvalue->m.enterpriseNumberPresent);
2334
2335 encodeBit (pctxt, extbit);
2336
2337 encodeBit (pctxt, (ASN1BOOL)pvalue->m.productIdPresent);
2338
2339 encodeBit (pctxt, (ASN1BOOL)pvalue->m.versionIdPresent);
2340
2341 /* encode vendor */
2342
2343 stat = asn1PE_H225H221NonStandard (pctxt, &pvalue->vendor);
2344 if (stat != ASN_OK) return stat;
2345
2346 /* encode productId */
2347
2348 if (pvalue->m.productIdPresent) {
2349 stat = asn1PE_H225VendorIdentifier_productId (pctxt, &pvalue->productId);
2350 if (stat != ASN_OK) return stat;
2351 }
2352
2353 /* encode versionId */
2354
2355 if (pvalue->m.versionIdPresent) {
2356 stat = asn1PE_H225VendorIdentifier_versionId (pctxt, &pvalue->versionId);
2357 if (stat != ASN_OK) return stat;
2358 }
2359
2360 if (extbit) {
2361
2362 /* encode extension optional bits length */
2363
2364 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
2365 if (stat != ASN_OK) return stat;
2366
2367 /* encode optional bits */
2368
2369 encodeBit (pctxt, (ASN1BOOL)pvalue->m.enterpriseNumberPresent);
2370 /* encode extension elements */
2371
2372 if (pvalue->m.enterpriseNumberPresent) {
2373 initContext (&lctxt);
2374 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2375 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2376
2377 stat = encodeObjectIdentifier (&lctxt, &pvalue->enterpriseNumber);
2378 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2379
2380 stat = encodeByteAlign (&lctxt);
2381 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2382
2383 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2384
2385 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2386 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2387
2388 freeContext (&lctxt);
2389 }
2390
2391 }
2392
2393 return (stat);
2394 }
2395
2396 /**************************************************************/
2397 /* */
2398 /* GatekeeperInfo */
2399 /* */
2400 /**************************************************************/
2401
2402 EXTERN int asn1PE_H225GatekeeperInfo (OOCTXT* pctxt, H225GatekeeperInfo* pvalue)
2403 {
2404 int stat = ASN_OK;
2405 ASN1BOOL extbit;
2406
2407 /* extension bit */
2408
2409 extbit = 0;
2410
2411 encodeBit (pctxt, extbit);
2412
2413 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2414
2415 /* encode nonStandardData */
2416
2417 if (pvalue->m.nonStandardDataPresent) {
2418 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2419 if (stat != ASN_OK) return stat;
2420 }
2421
2422 return (stat);
2423 }
2424
2425 /**************************************************************/
2426 /* */
2427 /* DataRate */
2428 /* */
2429 /**************************************************************/
2430
2431 EXTERN int asn1PE_H225DataRate (OOCTXT* pctxt, H225DataRate* pvalue)
2432 {
2433 int stat = ASN_OK;
2434 ASN1BOOL extbit;
2435
2436 /* extension bit */
2437
2438 extbit = 0;
2439
2440 encodeBit (pctxt, extbit);
2441
2442 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2443
2444 encodeBit (pctxt, (ASN1BOOL)pvalue->m.channelMultiplierPresent);
2445
2446 /* encode nonStandardData */
2447
2448 if (pvalue->m.nonStandardDataPresent) {
2449 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2450 if (stat != ASN_OK) return stat;
2451 }
2452
2453 /* encode channelRate */
2454
2455 stat = asn1PE_H225BandWidth (pctxt, pvalue->channelRate);
2456 if (stat != ASN_OK) return stat;
2457
2458 /* encode channelMultiplier */
2459
2460 if (pvalue->m.channelMultiplierPresent) {
2461 stat = encodeConsUnsigned (pctxt, pvalue->channelMultiplier, 1U, 256U);
2462 if (stat != ASN_OK) return stat;
2463
2464 }
2465
2466 return (stat);
2467 }
2468
2469 /**************************************************************/
2470 /* */
2471 /* _SeqOfH225DataRate */
2472 /* */
2473 /**************************************************************/
2474
2475 EXTERN int asn1PE_H225_SeqOfH225DataRate (OOCTXT* pctxt, H225_SeqOfH225DataRate* pvalue)
2476 {
2477 int stat = ASN_OK;
2478 DListNode* pnode;
2479 ASN1UINT xx1;
2480 ASN1UINT enclen, fraglen;
2481
2482 enclen = fraglen = xx1 = 0;
2483 pnode = pvalue->head;
2484 for (;;) {
2485 /* encode length determinant */
2486
2487 stat = encodeLength (pctxt, (pvalue->count - enclen));
2488 if (stat < 0) return stat;
2489
2490 fraglen = stat;
2491 enclen += fraglen;
2492 /* encode elements */
2493
2494 for (; xx1 < enclen; xx1++) {
2495 stat = asn1PE_H225DataRate (pctxt, ((H225DataRate*)pnode->data));
2496 if (stat != ASN_OK) return stat;
2497 pnode = pnode->next;
2498 }
2499 if ( pvalue->count == enclen && fraglen < 16384) {
2500 break;
2501 }
2502 }
2503
2504 return (stat);
2505 }
2506
2507 /**************************************************************/
2508 /* */
2509 /* SupportedPrefix */
2510 /* */
2511 /**************************************************************/
2512
2513 EXTERN int asn1PE_H225SupportedPrefix (OOCTXT* pctxt, H225SupportedPrefix* pvalue)
2514 {
2515 int stat = ASN_OK;
2516 ASN1BOOL extbit;
2517
2518 /* extension bit */
2519
2520 extbit = 0;
2521
2522 encodeBit (pctxt, extbit);
2523
2524 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2525
2526 /* encode nonStandardData */
2527
2528 if (pvalue->m.nonStandardDataPresent) {
2529 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2530 if (stat != ASN_OK) return stat;
2531 }
2532
2533 /* encode prefix */
2534
2535 stat = asn1PE_H225AliasAddress (pctxt, &pvalue->prefix);
2536 if (stat != ASN_OK) return stat;
2537
2538 return (stat);
2539 }
2540
2541 /**************************************************************/
2542 /* */
2543 /* _SeqOfH225SupportedPrefix */
2544 /* */
2545 /**************************************************************/
2546
2547 EXTERN int asn1PE_H225_SeqOfH225SupportedPrefix (OOCTXT* pctxt, H225_SeqOfH225SupportedPrefix* pvalue)
2548 {
2549 int stat = ASN_OK;
2550 DListNode* pnode;
2551 ASN1UINT xx1;
2552 ASN1UINT enclen, fraglen;
2553
2554 enclen = fraglen = xx1 = 0;
2555 pnode = pvalue->head;
2556 for (;;) {
2557 /* encode length determinant */
2558
2559 stat = encodeLength (pctxt, (pvalue->count - enclen));
2560 if (stat < 0) return stat;
2561
2562 fraglen = stat;
2563 enclen += fraglen;
2564 /* encode elements */
2565
2566 for (; xx1 < enclen; xx1++) {
2567 stat = asn1PE_H225SupportedPrefix (pctxt, ((H225SupportedPrefix*)pnode->data));
2568 if (stat != ASN_OK) return stat;
2569 pnode = pnode->next;
2570 }
2571 if ( pvalue->count == enclen && fraglen < 16384) {
2572 break;
2573 }
2574 }
2575
2576 return (stat);
2577 }
2578
2579 /**************************************************************/
2580 /* */
2581 /* H310Caps */
2582 /* */
2583 /**************************************************************/
2584
2585 EXTERN int asn1PE_H225H310Caps (OOCTXT* pctxt, H225H310Caps* pvalue)
2586 {
2587 int stat = ASN_OK;
2588 ASN1BOOL extbit;
2589 ASN1OpenType openType;
2590 OOCTXT lctxt;
2591
2592 /* extension bit */
2593
2594 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
2595 pvalue->m.supportedPrefixesPresent);
2596
2597 encodeBit (pctxt, extbit);
2598
2599 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2600
2601 /* encode nonStandardData */
2602
2603 if (pvalue->m.nonStandardDataPresent) {
2604 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2605 if (stat != ASN_OK) return stat;
2606 }
2607
2608 if (extbit) {
2609
2610 /* encode extension optional bits length */
2611
2612 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
2613 if (stat != ASN_OK) return stat;
2614
2615 /* encode optional bits */
2616
2617 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
2618 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
2619 /* encode extension elements */
2620
2621 if (pvalue->m.dataRatesSupportedPresent) {
2622 initContext (&lctxt);
2623 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2624 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2625
2626 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
2627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2628
2629 stat = encodeByteAlign (&lctxt);
2630 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2631
2632 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2633
2634 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2635 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2636
2637 freeContext (&lctxt);
2638 }
2639
2640 if (pvalue->m.supportedPrefixesPresent) {
2641 initContext (&lctxt);
2642 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2643 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2644
2645 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
2646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2647
2648 stat = encodeByteAlign (&lctxt);
2649 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2650
2651 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2652
2653 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2654 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2655
2656 freeContext (&lctxt);
2657 }
2658
2659 }
2660
2661 return (stat);
2662 }
2663
2664 /**************************************************************/
2665 /* */
2666 /* H320Caps */
2667 /* */
2668 /**************************************************************/
2669
2670 EXTERN int asn1PE_H225H320Caps (OOCTXT* pctxt, H225H320Caps* pvalue)
2671 {
2672 int stat = ASN_OK;
2673 ASN1BOOL extbit;
2674 ASN1OpenType openType;
2675 OOCTXT lctxt;
2676
2677 /* extension bit */
2678
2679 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
2680 pvalue->m.supportedPrefixesPresent);
2681
2682 encodeBit (pctxt, extbit);
2683
2684 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2685
2686 /* encode nonStandardData */
2687
2688 if (pvalue->m.nonStandardDataPresent) {
2689 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2690 if (stat != ASN_OK) return stat;
2691 }
2692
2693 if (extbit) {
2694
2695 /* encode extension optional bits length */
2696
2697 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
2698 if (stat != ASN_OK) return stat;
2699
2700 /* encode optional bits */
2701
2702 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
2703 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
2704 /* encode extension elements */
2705
2706 if (pvalue->m.dataRatesSupportedPresent) {
2707 initContext (&lctxt);
2708 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2709 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2710
2711 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
2712 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2713
2714 stat = encodeByteAlign (&lctxt);
2715 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2716
2717 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2718
2719 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2720 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2721
2722 freeContext (&lctxt);
2723 }
2724
2725 if (pvalue->m.supportedPrefixesPresent) {
2726 initContext (&lctxt);
2727 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2728 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2729
2730 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
2731 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2732
2733 stat = encodeByteAlign (&lctxt);
2734 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2735
2736 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2737
2738 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2739 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2740
2741 freeContext (&lctxt);
2742 }
2743
2744 }
2745
2746 return (stat);
2747 }
2748
2749 /**************************************************************/
2750 /* */
2751 /* H321Caps */
2752 /* */
2753 /**************************************************************/
2754
2755 EXTERN int asn1PE_H225H321Caps (OOCTXT* pctxt, H225H321Caps* pvalue)
2756 {
2757 int stat = ASN_OK;
2758 ASN1BOOL extbit;
2759 ASN1OpenType openType;
2760 OOCTXT lctxt;
2761
2762 /* extension bit */
2763
2764 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
2765 pvalue->m.supportedPrefixesPresent);
2766
2767 encodeBit (pctxt, extbit);
2768
2769 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2770
2771 /* encode nonStandardData */
2772
2773 if (pvalue->m.nonStandardDataPresent) {
2774 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2775 if (stat != ASN_OK) return stat;
2776 }
2777
2778 if (extbit) {
2779
2780 /* encode extension optional bits length */
2781
2782 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
2783 if (stat != ASN_OK) return stat;
2784
2785 /* encode optional bits */
2786
2787 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
2788 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
2789 /* encode extension elements */
2790
2791 if (pvalue->m.dataRatesSupportedPresent) {
2792 initContext (&lctxt);
2793 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2794 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2795
2796 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
2797 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2798
2799 stat = encodeByteAlign (&lctxt);
2800 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2801
2802 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2803
2804 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2805 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2806
2807 freeContext (&lctxt);
2808 }
2809
2810 if (pvalue->m.supportedPrefixesPresent) {
2811 initContext (&lctxt);
2812 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2813 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2814
2815 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
2816 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2817
2818 stat = encodeByteAlign (&lctxt);
2819 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2820
2821 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2822
2823 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2824 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2825
2826 freeContext (&lctxt);
2827 }
2828
2829 }
2830
2831 return (stat);
2832 }
2833
2834 /**************************************************************/
2835 /* */
2836 /* H322Caps */
2837 /* */
2838 /**************************************************************/
2839
2840 EXTERN int asn1PE_H225H322Caps (OOCTXT* pctxt, H225H322Caps* pvalue)
2841 {
2842 int stat = ASN_OK;
2843 ASN1BOOL extbit;
2844 ASN1OpenType openType;
2845 OOCTXT lctxt;
2846
2847 /* extension bit */
2848
2849 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
2850 pvalue->m.supportedPrefixesPresent);
2851
2852 encodeBit (pctxt, extbit);
2853
2854 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2855
2856 /* encode nonStandardData */
2857
2858 if (pvalue->m.nonStandardDataPresent) {
2859 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2860 if (stat != ASN_OK) return stat;
2861 }
2862
2863 if (extbit) {
2864
2865 /* encode extension optional bits length */
2866
2867 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
2868 if (stat != ASN_OK) return stat;
2869
2870 /* encode optional bits */
2871
2872 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
2873 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
2874 /* encode extension elements */
2875
2876 if (pvalue->m.dataRatesSupportedPresent) {
2877 initContext (&lctxt);
2878 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2879 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2880
2881 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
2882 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2883
2884 stat = encodeByteAlign (&lctxt);
2885 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2886
2887 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2888
2889 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2890 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2891
2892 freeContext (&lctxt);
2893 }
2894
2895 if (pvalue->m.supportedPrefixesPresent) {
2896 initContext (&lctxt);
2897 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2898 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2899
2900 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
2901 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2902
2903 stat = encodeByteAlign (&lctxt);
2904 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2905
2906 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2907
2908 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2909 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2910
2911 freeContext (&lctxt);
2912 }
2913
2914 }
2915
2916 return (stat);
2917 }
2918
2919 /**************************************************************/
2920 /* */
2921 /* H323Caps */
2922 /* */
2923 /**************************************************************/
2924
2925 EXTERN int asn1PE_H225H323Caps (OOCTXT* pctxt, H225H323Caps* pvalue)
2926 {
2927 int stat = ASN_OK;
2928 ASN1BOOL extbit;
2929 ASN1OpenType openType;
2930 OOCTXT lctxt;
2931
2932 /* extension bit */
2933
2934 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
2935 pvalue->m.supportedPrefixesPresent);
2936
2937 encodeBit (pctxt, extbit);
2938
2939 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
2940
2941 /* encode nonStandardData */
2942
2943 if (pvalue->m.nonStandardDataPresent) {
2944 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
2945 if (stat != ASN_OK) return stat;
2946 }
2947
2948 if (extbit) {
2949
2950 /* encode extension optional bits length */
2951
2952 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
2953 if (stat != ASN_OK) return stat;
2954
2955 /* encode optional bits */
2956
2957 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
2958 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
2959 /* encode extension elements */
2960
2961 if (pvalue->m.dataRatesSupportedPresent) {
2962 initContext (&lctxt);
2963 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2964 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2965
2966 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
2967 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2968
2969 stat = encodeByteAlign (&lctxt);
2970 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2971
2972 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2973
2974 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2975 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2976
2977 freeContext (&lctxt);
2978 }
2979
2980 if (pvalue->m.supportedPrefixesPresent) {
2981 initContext (&lctxt);
2982 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
2983 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2984
2985 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
2986 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2987
2988 stat = encodeByteAlign (&lctxt);
2989 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2990
2991 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
2992
2993 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
2994 if (stat != ASN_OK) return freeContext (&lctxt), stat;
2995
2996 freeContext (&lctxt);
2997 }
2998
2999 }
3000
3001 return (stat);
3002 }
3003
3004 /**************************************************************/
3005 /* */
3006 /* H324Caps */
3007 /* */
3008 /**************************************************************/
3009
3010 EXTERN int asn1PE_H225H324Caps (OOCTXT* pctxt, H225H324Caps* pvalue)
3011 {
3012 int stat = ASN_OK;
3013 ASN1BOOL extbit;
3014 ASN1OpenType openType;
3015 OOCTXT lctxt;
3016
3017 /* extension bit */
3018
3019 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
3020 pvalue->m.supportedPrefixesPresent);
3021
3022 encodeBit (pctxt, extbit);
3023
3024 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3025
3026 /* encode nonStandardData */
3027
3028 if (pvalue->m.nonStandardDataPresent) {
3029 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3030 if (stat != ASN_OK) return stat;
3031 }
3032
3033 if (extbit) {
3034
3035 /* encode extension optional bits length */
3036
3037 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
3038 if (stat != ASN_OK) return stat;
3039
3040 /* encode optional bits */
3041
3042 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3043 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
3044 /* encode extension elements */
3045
3046 if (pvalue->m.dataRatesSupportedPresent) {
3047 initContext (&lctxt);
3048 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3049 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3050
3051 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
3052 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3053
3054 stat = encodeByteAlign (&lctxt);
3055 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3056
3057 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3058
3059 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3060 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3061
3062 freeContext (&lctxt);
3063 }
3064
3065 if (pvalue->m.supportedPrefixesPresent) {
3066 initContext (&lctxt);
3067 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3068 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3069
3070 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
3071 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3072
3073 stat = encodeByteAlign (&lctxt);
3074 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3075
3076 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3077
3078 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3079 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3080
3081 freeContext (&lctxt);
3082 }
3083
3084 }
3085
3086 return (stat);
3087 }
3088
3089 /**************************************************************/
3090 /* */
3091 /* VoiceCaps */
3092 /* */
3093 /**************************************************************/
3094
3095 EXTERN int asn1PE_H225VoiceCaps (OOCTXT* pctxt, H225VoiceCaps* pvalue)
3096 {
3097 int stat = ASN_OK;
3098 ASN1BOOL extbit;
3099 ASN1OpenType openType;
3100 OOCTXT lctxt;
3101
3102 /* extension bit */
3103
3104 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
3105 pvalue->m.supportedPrefixesPresent);
3106
3107 encodeBit (pctxt, extbit);
3108
3109 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3110
3111 /* encode nonStandardData */
3112
3113 if (pvalue->m.nonStandardDataPresent) {
3114 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3115 if (stat != ASN_OK) return stat;
3116 }
3117
3118 if (extbit) {
3119
3120 /* encode extension optional bits length */
3121
3122 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
3123 if (stat != ASN_OK) return stat;
3124
3125 /* encode optional bits */
3126
3127 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3128 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
3129 /* encode extension elements */
3130
3131 if (pvalue->m.dataRatesSupportedPresent) {
3132 initContext (&lctxt);
3133 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3134 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3135
3136 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
3137 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3138
3139 stat = encodeByteAlign (&lctxt);
3140 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3141
3142 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3143
3144 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3145 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3146
3147 freeContext (&lctxt);
3148 }
3149
3150 if (pvalue->m.supportedPrefixesPresent) {
3151 initContext (&lctxt);
3152 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3153 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3154
3155 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
3156 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3157
3158 stat = encodeByteAlign (&lctxt);
3159 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3160
3161 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3162
3163 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3164 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3165
3166 freeContext (&lctxt);
3167 }
3168
3169 }
3170
3171 return (stat);
3172 }
3173
3174 /**************************************************************/
3175 /* */
3176 /* T120OnlyCaps */
3177 /* */
3178 /**************************************************************/
3179
3180 EXTERN int asn1PE_H225T120OnlyCaps (OOCTXT* pctxt, H225T120OnlyCaps* pvalue)
3181 {
3182 int stat = ASN_OK;
3183 ASN1BOOL extbit;
3184 ASN1OpenType openType;
3185 OOCTXT lctxt;
3186
3187 /* extension bit */
3188
3189 extbit = (ASN1BOOL)(pvalue->m.dataRatesSupportedPresent ||
3190 pvalue->m.supportedPrefixesPresent);
3191
3192 encodeBit (pctxt, extbit);
3193
3194 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3195
3196 /* encode nonStandardData */
3197
3198 if (pvalue->m.nonStandardDataPresent) {
3199 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3200 if (stat != ASN_OK) return stat;
3201 }
3202
3203 if (extbit) {
3204
3205 /* encode extension optional bits length */
3206
3207 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
3208 if (stat != ASN_OK) return stat;
3209
3210 /* encode optional bits */
3211
3212 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3213 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
3214 /* encode extension elements */
3215
3216 if (pvalue->m.dataRatesSupportedPresent) {
3217 initContext (&lctxt);
3218 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3219 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3220
3221 stat = asn1PE_H225_SeqOfH225DataRate (&lctxt, &pvalue->dataRatesSupported);
3222 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3223
3224 stat = encodeByteAlign (&lctxt);
3225 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3226
3227 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3228
3229 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3230 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3231
3232 freeContext (&lctxt);
3233 }
3234
3235 if (pvalue->m.supportedPrefixesPresent) {
3236 initContext (&lctxt);
3237 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3238 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3239
3240 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
3241 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3242
3243 stat = encodeByteAlign (&lctxt);
3244 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3245
3246 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3247
3248 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3249 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3250
3251 freeContext (&lctxt);
3252 }
3253
3254 }
3255
3256 return (stat);
3257 }
3258
3259 /**************************************************************/
3260 /* */
3261 /* NonStandardProtocol */
3262 /* */
3263 /**************************************************************/
3264
3265 EXTERN int asn1PE_H225NonStandardProtocol (OOCTXT* pctxt, H225NonStandardProtocol* pvalue)
3266 {
3267 int stat = ASN_OK;
3268 ASN1BOOL extbit;
3269
3270 /* extension bit */
3271
3272 extbit = 0;
3273
3274 encodeBit (pctxt, extbit);
3275
3276 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3277
3278 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3279
3280 /* encode nonStandardData */
3281
3282 if (pvalue->m.nonStandardDataPresent) {
3283 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3284 if (stat != ASN_OK) return stat;
3285 }
3286
3287 /* encode dataRatesSupported */
3288
3289 if (pvalue->m.dataRatesSupportedPresent) {
3290 stat = asn1PE_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3291 if (stat != ASN_OK) return stat;
3292 }
3293
3294 /* encode supportedPrefixes */
3295
3296 stat = asn1PE_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3297 if (stat != ASN_OK) return stat;
3298
3299 return (stat);
3300 }
3301
3302 /**************************************************************/
3303 /* */
3304 /* T38FaxAnnexbOnlyCaps */
3305 /* */
3306 /**************************************************************/
3307
3308 EXTERN int asn1PE_H225T38FaxAnnexbOnlyCaps (OOCTXT* pctxt, H225T38FaxAnnexbOnlyCaps* pvalue)
3309 {
3310 int stat = ASN_OK;
3311 ASN1BOOL extbit;
3312
3313 /* extension bit */
3314
3315 extbit = 0;
3316
3317 encodeBit (pctxt, extbit);
3318
3319 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3320
3321 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3322
3323 /* encode nonStandardData */
3324
3325 if (pvalue->m.nonStandardDataPresent) {
3326 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3327 if (stat != ASN_OK) return stat;
3328 }
3329
3330 /* encode dataRatesSupported */
3331
3332 if (pvalue->m.dataRatesSupportedPresent) {
3333 stat = asn1PE_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3334 if (stat != ASN_OK) return stat;
3335 }
3336
3337 /* encode supportedPrefixes */
3338
3339 stat = asn1PE_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3340 if (stat != ASN_OK) return stat;
3341
3342 /* encode t38FaxProtocol */
3343
3344 stat = asn1PE_H245DataProtocolCapability (pctxt, &pvalue->t38FaxProtocol);
3345 if (stat != ASN_OK) return stat;
3346
3347 /* encode t38FaxProfile */
3348
3349 stat = asn1PE_H245T38FaxProfile (pctxt, &pvalue->t38FaxProfile);
3350 if (stat != ASN_OK) return stat;
3351
3352 return (stat);
3353 }
3354
3355 /**************************************************************/
3356 /* */
3357 /* SIPCaps */
3358 /* */
3359 /**************************************************************/
3360
3361 EXTERN int asn1PE_H225SIPCaps (OOCTXT* pctxt, H225SIPCaps* pvalue)
3362 {
3363 int stat = ASN_OK;
3364 ASN1BOOL extbit;
3365
3366 /* extension bit */
3367
3368 extbit = 0;
3369
3370 encodeBit (pctxt, extbit);
3371
3372 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3373
3374 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataRatesSupportedPresent);
3375
3376 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
3377
3378 /* encode nonStandardData */
3379
3380 if (pvalue->m.nonStandardDataPresent) {
3381 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3382 if (stat != ASN_OK) return stat;
3383 }
3384
3385 /* encode dataRatesSupported */
3386
3387 if (pvalue->m.dataRatesSupportedPresent) {
3388 stat = asn1PE_H225_SeqOfH225DataRate (pctxt, &pvalue->dataRatesSupported);
3389 if (stat != ASN_OK) return stat;
3390 }
3391
3392 /* encode supportedPrefixes */
3393
3394 if (pvalue->m.supportedPrefixesPresent) {
3395 stat = asn1PE_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
3396 if (stat != ASN_OK) return stat;
3397 }
3398
3399 return (stat);
3400 }
3401
3402 /**************************************************************/
3403 /* */
3404 /* SupportedProtocols */
3405 /* */
3406 /**************************************************************/
3407
3408 EXTERN int asn1PE_H225SupportedProtocols (OOCTXT* pctxt, H225SupportedProtocols* pvalue)
3409 {
3410 int stat = ASN_OK;
3411 OOCTXT lctxt;
3412 ASN1OpenType openType;
3413 ASN1BOOL extbit;
3414
3415 /* extension bit */
3416
3417 extbit = (ASN1BOOL)(pvalue->t > 9);
3418
3419 encodeBit (pctxt, extbit);
3420
3421 if (!extbit) {
3422
3423 /* Encode choice index value */
3424
3425 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 8);
3426 if (stat != ASN_OK) return stat;
3427
3428 /* Encode root element data value */
3429
3430 switch (pvalue->t)
3431 {
3432 /* nonStandardData */
3433 case 1:
3434 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandardData);
3435 if (stat != ASN_OK) return stat;
3436 break;
3437
3438 /* h310 */
3439 case 2:
3440 stat = asn1PE_H225H310Caps (pctxt, pvalue->u.h310);
3441 if (stat != ASN_OK) return stat;
3442 break;
3443
3444 /* h320 */
3445 case 3:
3446 stat = asn1PE_H225H320Caps (pctxt, pvalue->u.h320);
3447 if (stat != ASN_OK) return stat;
3448 break;
3449
3450 /* h321 */
3451 case 4:
3452 stat = asn1PE_H225H321Caps (pctxt, pvalue->u.h321);
3453 if (stat != ASN_OK) return stat;
3454 break;
3455
3456 /* h322 */
3457 case 5:
3458 stat = asn1PE_H225H322Caps (pctxt, pvalue->u.h322);
3459 if (stat != ASN_OK) return stat;
3460 break;
3461
3462 /* h323 */
3463 case 6:
3464 stat = asn1PE_H225H323Caps (pctxt, pvalue->u.h323);
3465 if (stat != ASN_OK) return stat;
3466 break;
3467
3468 /* h324 */
3469 case 7:
3470 stat = asn1PE_H225H324Caps (pctxt, pvalue->u.h324);
3471 if (stat != ASN_OK) return stat;
3472 break;
3473
3474 /* voice */
3475 case 8:
3476 stat = asn1PE_H225VoiceCaps (pctxt, pvalue->u.voice);
3477 if (stat != ASN_OK) return stat;
3478 break;
3479
3480 /* t120_only */
3481 case 9:
3482 stat = asn1PE_H225T120OnlyCaps (pctxt, pvalue->u.t120_only);
3483 if (stat != ASN_OK) return stat;
3484 break;
3485
3486 default:
3487 return ASN_E_INVOPT;
3488 }
3489 }
3490 else {
3491 /* Encode extension choice index value */
3492
3493 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 10);
3494 if (stat != ASN_OK) return stat;
3495
3496 /* Encode extension element data value */
3497
3498 initContext (&lctxt);
3499 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3500 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3501
3502 switch (pvalue->t)
3503 {
3504 /* nonStandardProtocol */
3505 case 10:
3506 stat = asn1PE_H225NonStandardProtocol (&lctxt, pvalue->u.nonStandardProtocol);
3507 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3508 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3509 break;
3510
3511 /* t38FaxAnnexbOnly */
3512 case 11:
3513 stat = asn1PE_H225T38FaxAnnexbOnlyCaps (&lctxt, pvalue->u.t38FaxAnnexbOnly);
3514 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3515 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3516 break;
3517
3518 /* sip */
3519 case 12:
3520 stat = asn1PE_H225SIPCaps (&lctxt, pvalue->u.sip);
3521 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3522 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3523 break;
3524
3525 default:
3526 ;
3527 }
3528
3529 stat = encodeByteAlign (pctxt);
3530 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3531
3532 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3533 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3534
3535 freeContext (&lctxt);
3536 }
3537
3538 return (stat);
3539 }
3540
3541 /**************************************************************/
3542 /* */
3543 /* _SeqOfH225SupportedProtocols */
3544 /* */
3545 /**************************************************************/
3546
3547 EXTERN int asn1PE_H225_SeqOfH225SupportedProtocols (OOCTXT* pctxt, H225_SeqOfH225SupportedProtocols* pvalue)
3548 {
3549 int stat = ASN_OK;
3550 DListNode* pnode;
3551 ASN1UINT xx1;
3552 ASN1UINT enclen, fraglen;
3553
3554 enclen = fraglen = xx1 = 0;
3555 pnode = pvalue->head;
3556 for (;;) {
3557 /* encode length determinant */
3558
3559 stat = encodeLength (pctxt, (pvalue->count - enclen));
3560 if (stat < 0) return stat;
3561
3562 fraglen = stat;
3563 enclen += fraglen;
3564 /* encode elements */
3565
3566 for (; xx1 < enclen; xx1++) {
3567 stat = asn1PE_H225SupportedProtocols (pctxt, ((H225SupportedProtocols*)pnode->data));
3568 if (stat != ASN_OK) return stat;
3569 pnode = pnode->next;
3570 }
3571 if ( pvalue->count == enclen && fraglen < 16384) {
3572 break;
3573 }
3574 }
3575
3576 return (stat);
3577 }
3578
3579 /**************************************************************/
3580 /* */
3581 /* GatewayInfo */
3582 /* */
3583 /**************************************************************/
3584
3585 EXTERN int asn1PE_H225GatewayInfo (OOCTXT* pctxt, H225GatewayInfo* pvalue)
3586 {
3587 int stat = ASN_OK;
3588 ASN1BOOL extbit;
3589
3590 /* extension bit */
3591
3592 extbit = 0;
3593
3594 encodeBit (pctxt, extbit);
3595
3596 encodeBit (pctxt, (ASN1BOOL)pvalue->m.protocolPresent);
3597
3598 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3599
3600 /* encode protocol */
3601
3602 if (pvalue->m.protocolPresent) {
3603 stat = asn1PE_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->protocol);
3604 if (stat != ASN_OK) return stat;
3605 }
3606
3607 /* encode nonStandardData */
3608
3609 if (pvalue->m.nonStandardDataPresent) {
3610 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3611 if (stat != ASN_OK) return stat;
3612 }
3613
3614 return (stat);
3615 }
3616
3617 /**************************************************************/
3618 /* */
3619 /* McuInfo */
3620 /* */
3621 /**************************************************************/
3622
3623 EXTERN int asn1PE_H225McuInfo (OOCTXT* pctxt, H225McuInfo* pvalue)
3624 {
3625 int stat = ASN_OK;
3626 ASN1BOOL extbit;
3627 ASN1OpenType openType;
3628 OOCTXT lctxt;
3629
3630 /* extension bit */
3631
3632 extbit = (ASN1BOOL)(pvalue->m.protocolPresent);
3633
3634 encodeBit (pctxt, extbit);
3635
3636 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3637
3638 /* encode nonStandardData */
3639
3640 if (pvalue->m.nonStandardDataPresent) {
3641 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3642 if (stat != ASN_OK) return stat;
3643 }
3644
3645 if (extbit) {
3646
3647 /* encode extension optional bits length */
3648
3649 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
3650 if (stat != ASN_OK) return stat;
3651
3652 /* encode optional bits */
3653
3654 encodeBit (pctxt, (ASN1BOOL)pvalue->m.protocolPresent);
3655 /* encode extension elements */
3656
3657 if (pvalue->m.protocolPresent) {
3658 initContext (&lctxt);
3659 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3660 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3661
3662 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->protocol);
3663 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3664
3665 stat = encodeByteAlign (&lctxt);
3666 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3667
3668 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3669
3670 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3671 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3672
3673 freeContext (&lctxt);
3674 }
3675
3676 }
3677
3678 return (stat);
3679 }
3680
3681 /**************************************************************/
3682 /* */
3683 /* TerminalInfo */
3684 /* */
3685 /**************************************************************/
3686
3687 EXTERN int asn1PE_H225TerminalInfo (OOCTXT* pctxt, H225TerminalInfo* pvalue)
3688 {
3689 int stat = ASN_OK;
3690 ASN1BOOL extbit;
3691
3692 /* extension bit */
3693
3694 extbit = 0;
3695
3696 encodeBit (pctxt, extbit);
3697
3698 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3699
3700 /* encode nonStandardData */
3701
3702 if (pvalue->m.nonStandardDataPresent) {
3703 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3704 if (stat != ASN_OK) return stat;
3705 }
3706
3707 return (stat);
3708 }
3709
3710 /**************************************************************/
3711 /* */
3712 /* TunnelledProtocolAlternateIdentifier */
3713 /* */
3714 /**************************************************************/
3715
3716 EXTERN int asn1PE_H225TunnelledProtocolAlternateIdentifier (OOCTXT* pctxt, H225TunnelledProtocolAlternateIdentifier* pvalue)
3717 {
3718 static Asn1SizeCnst protocolType_lsize1 = { 0, 1, 64, 0 };
3719 static Asn1SizeCnst protocolVariant_lsize1 = { 0, 1, 64, 0 };
3720 int stat = ASN_OK;
3721 ASN1BOOL extbit;
3722
3723 /* extension bit */
3724
3725 extbit = 0;
3726
3727 encodeBit (pctxt, extbit);
3728
3729 encodeBit (pctxt, (ASN1BOOL)pvalue->m.protocolVariantPresent);
3730
3731 /* encode protocolType */
3732
3733 addSizeConstraint (pctxt, &protocolType_lsize1);
3734
3735 stat = encodeConstrainedStringEx (pctxt, pvalue->protocolType, 0, 8, 7, 7);
3736 if (stat != ASN_OK) return stat;
3737
3738 /* encode protocolVariant */
3739
3740 if (pvalue->m.protocolVariantPresent) {
3741 addSizeConstraint (pctxt, &protocolVariant_lsize1);
3742
3743 stat = encodeConstrainedStringEx (pctxt, pvalue->protocolVariant, 0, 8, 7, 7);
3744 if (stat != ASN_OK) return stat;
3745 }
3746
3747 return (stat);
3748 }
3749
3750 /**************************************************************/
3751 /* */
3752 /* TunnelledProtocol_id */
3753 /* */
3754 /**************************************************************/
3755
3756 EXTERN int asn1PE_H225TunnelledProtocol_id (OOCTXT* pctxt, H225TunnelledProtocol_id* pvalue)
3757 {
3758 int stat = ASN_OK;
3759 ASN1BOOL extbit;
3760
3761 /* extension bit */
3762
3763 extbit = (ASN1BOOL)(pvalue->t > 2);
3764
3765 encodeBit (pctxt, extbit);
3766
3767 if (!extbit) {
3768
3769 /* Encode choice index value */
3770
3771 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
3772 if (stat != ASN_OK) return stat;
3773
3774 /* Encode root element data value */
3775
3776 switch (pvalue->t)
3777 {
3778 /* tunnelledProtocolObjectID */
3779 case 1:
3780 stat = encodeObjectIdentifier (pctxt, pvalue->u.tunnelledProtocolObjectID);
3781 if (stat != ASN_OK) return stat;
3782 break;
3783
3784 /* tunnelledProtocolAlternateID */
3785 case 2:
3786 stat = asn1PE_H225TunnelledProtocolAlternateIdentifier (pctxt, pvalue->u.tunnelledProtocolAlternateID);
3787 if (stat != ASN_OK) return stat;
3788 break;
3789
3790 default:
3791 return ASN_E_INVOPT;
3792 }
3793 }
3794 else {
3795 /* Encode extension choice index value */
3796
3797 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
3798 if (stat != ASN_OK) return stat;
3799
3800 /* Encode extension element data value */
3801
3802 }
3803
3804 return (stat);
3805 }
3806
3807 /**************************************************************/
3808 /* */
3809 /* TunnelledProtocol */
3810 /* */
3811 /**************************************************************/
3812
3813 EXTERN int asn1PE_H225TunnelledProtocol (OOCTXT* pctxt, H225TunnelledProtocol* pvalue)
3814 {
3815 static Asn1SizeCnst subIdentifier_lsize1 = { 0, 1, 64, 0 };
3816 int stat = ASN_OK;
3817 ASN1BOOL extbit;
3818
3819 /* extension bit */
3820
3821 extbit = 0;
3822
3823 encodeBit (pctxt, extbit);
3824
3825 encodeBit (pctxt, (ASN1BOOL)pvalue->m.subIdentifierPresent);
3826
3827 /* encode id */
3828
3829 stat = asn1PE_H225TunnelledProtocol_id (pctxt, &pvalue->id);
3830 if (stat != ASN_OK) return stat;
3831
3832 /* encode subIdentifier */
3833
3834 if (pvalue->m.subIdentifierPresent) {
3835 addSizeConstraint (pctxt, &subIdentifier_lsize1);
3836
3837 stat = encodeConstrainedStringEx (pctxt, pvalue->subIdentifier, 0, 8, 7, 7);
3838 if (stat != ASN_OK) return stat;
3839 }
3840
3841 return (stat);
3842 }
3843
3844 /**************************************************************/
3845 /* */
3846 /* _SeqOfH225TunnelledProtocol */
3847 /* */
3848 /**************************************************************/
3849
3850 EXTERN int asn1PE_H225_SeqOfH225TunnelledProtocol (OOCTXT* pctxt, H225_SeqOfH225TunnelledProtocol* pvalue)
3851 {
3852 int stat = ASN_OK;
3853 DListNode* pnode;
3854 ASN1UINT xx1;
3855 ASN1UINT enclen, fraglen;
3856
3857 enclen = fraglen = xx1 = 0;
3858 pnode = pvalue->head;
3859 for (;;) {
3860 /* encode length determinant */
3861
3862 stat = encodeLength (pctxt, (pvalue->count - enclen));
3863 if (stat < 0) return stat;
3864
3865 fraglen = stat;
3866 enclen += fraglen;
3867 /* encode elements */
3868
3869 for (; xx1 < enclen; xx1++) {
3870 stat = asn1PE_H225TunnelledProtocol (pctxt, ((H225TunnelledProtocol*)pnode->data));
3871 if (stat != ASN_OK) return stat;
3872 pnode = pnode->next;
3873 }
3874 if ( pvalue->count == enclen && fraglen < 16384) {
3875 break;
3876 }
3877 }
3878
3879 return (stat);
3880 }
3881
3882 /**************************************************************/
3883 /* */
3884 /* EndpointType */
3885 /* */
3886 /**************************************************************/
3887
3888 EXTERN int asn1PE_H225EndpointType (OOCTXT* pctxt, H225EndpointType* pvalue)
3889 {
3890 int stat = ASN_OK;
3891 ASN1BOOL extbit;
3892 ASN1OpenType openType;
3893 OOCTXT lctxt;
3894
3895 /* extension bit */
3896
3897 extbit = (ASN1BOOL)(pvalue->m.setPresent ||
3898 pvalue->m.supportedTunnelledProtocolsPresent);
3899
3900 encodeBit (pctxt, extbit);
3901
3902 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
3903
3904 encodeBit (pctxt, (ASN1BOOL)pvalue->m.vendorPresent);
3905
3906 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperPresent);
3907
3908 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatewayPresent);
3909
3910 encodeBit (pctxt, (ASN1BOOL)pvalue->m.mcuPresent);
3911
3912 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalPresent);
3913
3914 /* encode nonStandardData */
3915
3916 if (pvalue->m.nonStandardDataPresent) {
3917 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
3918 if (stat != ASN_OK) return stat;
3919 }
3920
3921 /* encode vendor */
3922
3923 if (pvalue->m.vendorPresent) {
3924 stat = asn1PE_H225VendorIdentifier (pctxt, &pvalue->vendor);
3925 if (stat != ASN_OK) return stat;
3926 }
3927
3928 /* encode gatekeeper */
3929
3930 if (pvalue->m.gatekeeperPresent) {
3931 stat = asn1PE_H225GatekeeperInfo (pctxt, &pvalue->gatekeeper);
3932 if (stat != ASN_OK) return stat;
3933 }
3934
3935 /* encode gateway */
3936
3937 if (pvalue->m.gatewayPresent) {
3938 stat = asn1PE_H225GatewayInfo (pctxt, &pvalue->gateway);
3939 if (stat != ASN_OK) return stat;
3940 }
3941
3942 /* encode mcu */
3943
3944 if (pvalue->m.mcuPresent) {
3945 stat = asn1PE_H225McuInfo (pctxt, &pvalue->mcu);
3946 if (stat != ASN_OK) return stat;
3947 }
3948
3949 /* encode terminal */
3950
3951 if (pvalue->m.terminalPresent) {
3952 stat = asn1PE_H225TerminalInfo (pctxt, &pvalue->terminal);
3953 if (stat != ASN_OK) return stat;
3954 }
3955
3956 /* encode mc */
3957
3958 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->mc);
3959 if (stat != ASN_OK) return stat;
3960
3961 /* encode undefinedNode */
3962
3963 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->undefinedNode);
3964 if (stat != ASN_OK) return stat;
3965
3966 if (extbit) {
3967
3968 /* encode extension optional bits length */
3969
3970 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
3971 if (stat != ASN_OK) return stat;
3972
3973 /* encode optional bits */
3974
3975 encodeBit (pctxt, (ASN1BOOL)pvalue->m.setPresent);
3976 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedTunnelledProtocolsPresent);
3977 /* encode extension elements */
3978
3979 if (pvalue->m.setPresent) {
3980 initContext (&lctxt);
3981 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
3982 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3983
3984 stat = asn1PE_H225EndpointType_set (&lctxt, &pvalue->set);
3985 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3986
3987 stat = encodeByteAlign (&lctxt);
3988 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3989
3990 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
3991
3992 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
3993 if (stat != ASN_OK) return freeContext (&lctxt), stat;
3994
3995 freeContext (&lctxt);
3996 }
3997
3998 if (pvalue->m.supportedTunnelledProtocolsPresent) {
3999 initContext (&lctxt);
4000 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
4001 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4002
4003 stat = asn1PE_H225_SeqOfH225TunnelledProtocol (&lctxt, &pvalue->supportedTunnelledProtocols);
4004 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4005
4006 stat = encodeByteAlign (&lctxt);
4007 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4008
4009 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
4010
4011 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
4012 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4013
4014 freeContext (&lctxt);
4015 }
4016
4017 }
4018
4019 return (stat);
4020 }
4021
4022 /**************************************************************/
4023 /* */
4024 /* _SeqOfH225CallReferenceValue */
4025 /* */
4026 /**************************************************************/
4027
4028 EXTERN int asn1PE_H225_SeqOfH225CallReferenceValue (OOCTXT* pctxt, H225_SeqOfH225CallReferenceValue* pvalue)
4029 {
4030 int stat = ASN_OK;
4031 ASN1UINT xx1;
4032
4033 /* encode length determinant */
4034
4035 stat = encodeLength (pctxt, pvalue->n);
4036 if (stat < 0) return stat;
4037
4038 /* encode elements */
4039
4040 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
4041 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->elem[xx1]);
4042 if (stat != ASN_OK) return stat;
4043 }
4044
4045 return (stat);
4046 }
4047
4048 /**************************************************************/
4049 /* */
4050 /* Setup_UUIE_conferenceGoal */
4051 /* */
4052 /**************************************************************/
4053
4054 EXTERN int asn1PE_H225Setup_UUIE_conferenceGoal (OOCTXT* pctxt, H225Setup_UUIE_conferenceGoal* pvalue)
4055 {
4056 int stat = ASN_OK;
4057 OOCTXT lctxt;
4058 ASN1OpenType openType;
4059 ASN1BOOL extbit;
4060
4061 /* extension bit */
4062
4063 extbit = (ASN1BOOL)(pvalue->t > 3);
4064
4065 encodeBit (pctxt, extbit);
4066
4067 if (!extbit) {
4068
4069 /* Encode choice index value */
4070
4071 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
4072 if (stat != ASN_OK) return stat;
4073
4074 /* Encode root element data value */
4075
4076 switch (pvalue->t)
4077 {
4078 /* create */
4079 case 1:
4080 /* NULL */
4081 break;
4082
4083 /* join */
4084 case 2:
4085 /* NULL */
4086 break;
4087
4088 /* invite */
4089 case 3:
4090 /* NULL */
4091 break;
4092
4093 default:
4094 return ASN_E_INVOPT;
4095 }
4096 }
4097 else {
4098 /* Encode extension choice index value */
4099
4100 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
4101 if (stat != ASN_OK) return stat;
4102
4103 /* Encode extension element data value */
4104
4105 initContext (&lctxt);
4106 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
4107 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4108
4109 switch (pvalue->t)
4110 {
4111 /* capability_negotiation */
4112 case 4:
4113 /* NULL */
4114 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
4115 break;
4116
4117 /* callIndependentSupplementaryService */
4118 case 5:
4119 /* NULL */
4120 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
4121 break;
4122
4123 default:
4124 ;
4125 }
4126
4127 stat = encodeByteAlign (pctxt);
4128 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4129
4130 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
4131 if (stat != ASN_OK) return freeContext (&lctxt), stat;
4132
4133 freeContext (&lctxt);
4134 }
4135
4136 return (stat);
4137 }
4138
4139 /**************************************************************/
4140 /* */
4141 /* Q954Details */
4142 /* */
4143 /**************************************************************/
4144
4145 EXTERN int asn1PE_H225Q954Details (OOCTXT* pctxt, H225Q954Details* pvalue)
4146 {
4147 int stat = ASN_OK;
4148 ASN1BOOL extbit;
4149
4150 /* extension bit */
4151
4152 extbit = 0;
4153
4154 encodeBit (pctxt, extbit);
4155
4156 /* encode conferenceCalling */
4157
4158 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->conferenceCalling);
4159 if (stat != ASN_OK) return stat;
4160
4161 /* encode threePartyService */
4162
4163 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->threePartyService);
4164 if (stat != ASN_OK) return stat;
4165
4166 return (stat);
4167 }
4168
4169 /**************************************************************/
4170 /* */
4171 /* QseriesOptions */
4172 /* */
4173 /**************************************************************/
4174
4175 EXTERN int asn1PE_H225QseriesOptions (OOCTXT* pctxt, H225QseriesOptions* pvalue)
4176 {
4177 int stat = ASN_OK;
4178 ASN1BOOL extbit;
4179
4180 /* extension bit */
4181
4182 extbit = 0;
4183
4184 encodeBit (pctxt, extbit);
4185
4186 /* encode q932Full */
4187
4188 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q932Full);
4189 if (stat != ASN_OK) return stat;
4190
4191 /* encode q951Full */
4192
4193 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q951Full);
4194 if (stat != ASN_OK) return stat;
4195
4196 /* encode q952Full */
4197
4198 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q952Full);
4199 if (stat != ASN_OK) return stat;
4200
4201 /* encode q953Full */
4202
4203 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q953Full);
4204 if (stat != ASN_OK) return stat;
4205
4206 /* encode q955Full */
4207
4208 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q955Full);
4209 if (stat != ASN_OK) return stat;
4210
4211 /* encode q956Full */
4212
4213 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q956Full);
4214 if (stat != ASN_OK) return stat;
4215
4216 /* encode q957Full */
4217
4218 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->q957Full);
4219 if (stat != ASN_OK) return stat;
4220
4221 /* encode q954Info */
4222
4223 stat = asn1PE_H225Q954Details (pctxt, &pvalue->q954Info);
4224 if (stat != ASN_OK) return stat;
4225
4226 return (stat);
4227 }
4228
4229 /**************************************************************/
4230 /* */
4231 /* CallType */
4232 /* */
4233 /**************************************************************/
4234
4235 EXTERN int asn1PE_H225CallType (OOCTXT* pctxt, H225CallType* pvalue)
4236 {
4237 int stat = ASN_OK;
4238 ASN1BOOL extbit;
4239
4240 /* extension bit */
4241
4242 extbit = (ASN1BOOL)(pvalue->t > 4);
4243
4244 encodeBit (pctxt, extbit);
4245
4246 if (!extbit) {
4247
4248 /* Encode choice index value */
4249
4250 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
4251 if (stat != ASN_OK) return stat;
4252
4253 /* Encode root element data value */
4254
4255 switch (pvalue->t)
4256 {
4257 /* pointToPoint */
4258 case 1:
4259 /* NULL */
4260 break;
4261
4262 /* oneToN */
4263 case 2:
4264 /* NULL */
4265 break;
4266
4267 /* nToOne */
4268 case 3:
4269 /* NULL */
4270 break;
4271
4272 /* nToN */
4273 case 4:
4274 /* NULL */
4275 break;
4276
4277 default:
4278 return ASN_E_INVOPT;
4279 }
4280 }
4281 else {
4282 /* Encode extension choice index value */
4283
4284 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
4285 if (stat != ASN_OK) return stat;
4286
4287 /* Encode extension element data value */
4288
4289 }
4290
4291 return (stat);
4292 }
4293
4294 /**************************************************************/
4295 /* */
4296 /* CallIdentifier */
4297 /* */
4298 /**************************************************************/
4299
4300 EXTERN int asn1PE_H225CallIdentifier (OOCTXT* pctxt, H225CallIdentifier* pvalue)
4301 {
4302 int stat = ASN_OK;
4303 ASN1BOOL extbit;
4304
4305 /* extension bit */
4306
4307 extbit = 0;
4308
4309 encodeBit (pctxt, extbit);
4310
4311 /* encode guid */
4312
4313 stat = asn1PE_H225GloballyUniqueID (pctxt, &pvalue->guid);
4314 if (stat != ASN_OK) return stat;
4315
4316 return (stat);
4317 }
4318
4319 /**************************************************************/
4320 /* */
4321 /* SecurityServiceMode */
4322 /* */
4323 /**************************************************************/
4324
4325 EXTERN int asn1PE_H225SecurityServiceMode (OOCTXT* pctxt, H225SecurityServiceMode* pvalue)
4326 {
4327 int stat = ASN_OK;
4328 ASN1BOOL extbit;
4329
4330 /* extension bit */
4331
4332 extbit = (ASN1BOOL)(pvalue->t > 3);
4333
4334 encodeBit (pctxt, extbit);
4335
4336 if (!extbit) {
4337
4338 /* Encode choice index value */
4339
4340 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
4341 if (stat != ASN_OK) return stat;
4342
4343 /* Encode root element data value */
4344
4345 switch (pvalue->t)
4346 {
4347 /* nonStandard */
4348 case 1:
4349 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
4350 if (stat != ASN_OK) return stat;
4351 break;
4352
4353 /* none */
4354 case 2:
4355 /* NULL */
4356 break;
4357
4358 /* default_ */
4359 case 3:
4360 /* NULL */
4361 break;
4362
4363 default:
4364 return ASN_E_INVOPT;
4365 }
4366 }
4367 else {
4368 /* Encode extension choice index value */
4369
4370 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
4371 if (stat != ASN_OK) return stat;
4372
4373 /* Encode extension element data value */
4374
4375 }
4376
4377 return (stat);
4378 }
4379
4380 /**************************************************************/
4381 /* */
4382 /* SecurityCapabilities */
4383 /* */
4384 /**************************************************************/
4385
4386 EXTERN int asn1PE_H225SecurityCapabilities (OOCTXT* pctxt, H225SecurityCapabilities* pvalue)
4387 {
4388 int stat = ASN_OK;
4389 ASN1BOOL extbit;
4390
4391 /* extension bit */
4392
4393 extbit = 0;
4394
4395 encodeBit (pctxt, extbit);
4396
4397 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardPresent);
4398
4399 /* encode nonStandard */
4400
4401 if (pvalue->m.nonStandardPresent) {
4402 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandard);
4403 if (stat != ASN_OK) return stat;
4404 }
4405
4406 /* encode encryption */
4407
4408 stat = asn1PE_H225SecurityServiceMode (pctxt, &pvalue->encryption);
4409 if (stat != ASN_OK) return stat;
4410
4411 /* encode authentication */
4412
4413 stat = asn1PE_H225SecurityServiceMode (pctxt, &pvalue->authentication);
4414 if (stat != ASN_OK) return stat;
4415
4416 /* encode integrity */
4417
4418 stat = asn1PE_H225SecurityServiceMode (pctxt, &pvalue->integrity);
4419 if (stat != ASN_OK) return stat;
4420
4421 return (stat);
4422 }
4423
4424 /**************************************************************/
4425 /* */
4426 /* H245Security */
4427 /* */
4428 /**************************************************************/
4429
4430 EXTERN int asn1PE_H225H245Security (OOCTXT* pctxt, H225H245Security* pvalue)
4431 {
4432 int stat = ASN_OK;
4433 ASN1BOOL extbit;
4434
4435 /* extension bit */
4436
4437 extbit = (ASN1BOOL)(pvalue->t > 4);
4438
4439 encodeBit (pctxt, extbit);
4440
4441 if (!extbit) {
4442
4443 /* Encode choice index value */
4444
4445 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
4446 if (stat != ASN_OK) return stat;
4447
4448 /* Encode root element data value */
4449
4450 switch (pvalue->t)
4451 {
4452 /* nonStandard */
4453 case 1:
4454 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
4455 if (stat != ASN_OK) return stat;
4456 break;
4457
4458 /* noSecurity */
4459 case 2:
4460 /* NULL */
4461 break;
4462
4463 /* tls */
4464 case 3:
4465 stat = asn1PE_H225SecurityCapabilities (pctxt, pvalue->u.tls);
4466 if (stat != ASN_OK) return stat;
4467 break;
4468
4469 /* ipsec */
4470 case 4:
4471 stat = asn1PE_H225SecurityCapabilities (pctxt, pvalue->u.ipsec);
4472 if (stat != ASN_OK) return stat;
4473 break;
4474
4475 default:
4476 return ASN_E_INVOPT;
4477 }
4478 }
4479 else {
4480 /* Encode extension choice index value */
4481
4482 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
4483 if (stat != ASN_OK) return stat;
4484
4485 /* Encode extension element data value */
4486
4487 }
4488
4489 return (stat);
4490 }
4491
4492 /**************************************************************/
4493 /* */
4494 /* _SeqOfH225H245Security */
4495 /* */
4496 /**************************************************************/
4497
4498 EXTERN int asn1PE_H225_SeqOfH225H245Security (OOCTXT* pctxt, H225_SeqOfH225H245Security* pvalue)
4499 {
4500 int stat = ASN_OK;
4501 DListNode* pnode;
4502 ASN1UINT xx1;
4503 ASN1UINT enclen, fraglen;
4504
4505 enclen = fraglen = xx1 = 0;
4506 pnode = pvalue->head;
4507 for (;;) {
4508 /* encode length determinant */
4509
4510 stat = encodeLength (pctxt, (pvalue->count - enclen));
4511 if (stat < 0) return stat;
4512
4513 fraglen = stat;
4514 enclen += fraglen;
4515 /* encode elements */
4516
4517 for (; xx1 < enclen; xx1++) {
4518 stat = asn1PE_H225H245Security (pctxt, ((H225H245Security*)pnode->data));
4519 if (stat != ASN_OK) return stat;
4520 pnode = pnode->next;
4521 }
4522 if ( pvalue->count == enclen && fraglen < 16384) {
4523 break;
4524 }
4525 }
4526
4527 return (stat);
4528 }
4529
4530 /**************************************************************/
4531 /* */
4532 /* _SeqOfH225ClearToken */
4533 /* */
4534 /**************************************************************/
4535
4536 EXTERN int asn1PE_H225_SeqOfH225ClearToken (OOCTXT* pctxt, H225_SeqOfH225ClearToken* pvalue)
4537 {
4538 int stat = ASN_OK;
4539 DListNode* pnode;
4540 ASN1UINT xx1;
4541 ASN1UINT enclen, fraglen;
4542
4543 enclen = fraglen = xx1 = 0;
4544 pnode = pvalue->head;
4545 for (;;) {
4546 /* encode length determinant */
4547
4548 stat = encodeLength (pctxt, (pvalue->count - enclen));
4549 if (stat < 0) return stat;
4550
4551 fraglen = stat;
4552 enclen += fraglen;
4553 /* encode elements */
4554
4555 for (; xx1 < enclen; xx1++) {
4556 stat = asn1PE_H235ClearToken (pctxt, ((H235ClearToken*)pnode->data));
4557 if (stat != ASN_OK) return stat;
4558 pnode = pnode->next;
4559 }
4560 if ( pvalue->count == enclen && fraglen < 16384) {
4561 break;
4562 }
4563 }
4564
4565 return (stat);
4566 }
4567
4568 /**************************************************************/
4569 /* */
4570 /* CryptoH323Token_cryptoEPPwdHash */
4571 /* */
4572 /**************************************************************/
4573
4574 EXTERN int asn1PE_H225CryptoH323Token_cryptoEPPwdHash (OOCTXT* pctxt, H225CryptoH323Token_cryptoEPPwdHash* pvalue)
4575 {
4576 int stat = ASN_OK;
4577
4578 /* encode alias */
4579
4580 stat = asn1PE_H225AliasAddress (pctxt, &pvalue->alias);
4581 if (stat != ASN_OK) return stat;
4582
4583 /* encode timeStamp */
4584
4585 stat = asn1PE_H235TimeStamp (pctxt, pvalue->timeStamp);
4586 if (stat != ASN_OK) return stat;
4587
4588 /* encode token */
4589
4590 stat = asn1PE_H235HASHED (pctxt, &pvalue->token);
4591 if (stat != ASN_OK) return stat;
4592
4593 return (stat);
4594 }
4595
4596 /**************************************************************/
4597 /* */
4598 /* CryptoH323Token_cryptoGKPwdHash */
4599 /* */
4600 /**************************************************************/
4601
4602 EXTERN int asn1PE_H225CryptoH323Token_cryptoGKPwdHash (OOCTXT* pctxt, H225CryptoH323Token_cryptoGKPwdHash* pvalue)
4603 {
4604 int stat = ASN_OK;
4605
4606 /* encode gatekeeperId */
4607
4608 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperId);
4609 if (stat != ASN_OK) return stat;
4610
4611 /* encode timeStamp */
4612
4613 stat = asn1PE_H235TimeStamp (pctxt, pvalue->timeStamp);
4614 if (stat != ASN_OK) return stat;
4615
4616 /* encode token */
4617
4618 stat = asn1PE_H235HASHED (pctxt, &pvalue->token);
4619 if (stat != ASN_OK) return stat;
4620
4621 return (stat);
4622 }
4623
4624 /**************************************************************/
4625 /* */
4626 /* CryptoH323Token_cryptoEPCert */
4627 /* */
4628 /**************************************************************/
4629
4630 EXTERN int asn1PE_H225CryptoH323Token_cryptoEPCert (OOCTXT* pctxt, H225CryptoH323Token_cryptoEPCert* pvalue)
4631 {
4632 int stat = ASN_OK;
4633
4634 /* encode toBeSigned */
4635
4636 stat = asn1PE_H235EncodedPwdCertToken (pctxt, pvalue->toBeSigned);
4637 if (stat != ASN_OK) return stat;
4638
4639 /* encode algorithmOID */
4640
4641 stat = encodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
4642 if (stat != ASN_OK) return stat;
4643
4644 /* encode paramS */
4645
4646 stat = asn1PE_H235Params (pctxt, &pvalue->paramS);
4647 if (stat != ASN_OK) return stat;
4648
4649 /* encode signature */
4650
4651 stat = encodeBitString (pctxt, pvalue->signature.numbits, pvalue->signature.data);
4652 if (stat != ASN_OK) return stat;
4653
4654 return (stat);
4655 }
4656
4657 /**************************************************************/
4658 /* */
4659 /* CryptoH323Token_cryptoGKCert */
4660 /* */
4661 /**************************************************************/
4662
4663 EXTERN int asn1PE_H225CryptoH323Token_cryptoGKCert (OOCTXT* pctxt, H225CryptoH323Token_cryptoGKCert* pvalue)
4664 {
4665 int stat = ASN_OK;
4666
4667 /* encode toBeSigned */
4668
4669 stat = asn1PE_H235EncodedPwdCertToken (pctxt, pvalue->toBeSigned);
4670 if (stat != ASN_OK) return stat;
4671
4672 /* encode algorithmOID */
4673
4674 stat = encodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
4675 if (stat != ASN_OK) return stat;
4676
4677 /* encode paramS */
4678
4679 stat = asn1PE_H235Params (pctxt, &pvalue->paramS);
4680 if (stat != ASN_OK) return stat;
4681
4682 /* encode signature */
4683
4684 stat = encodeBitString (pctxt, pvalue->signature.numbits, pvalue->signature.data);
4685 if (stat != ASN_OK) return stat;
4686
4687 return (stat);
4688 }
4689
4690 /**************************************************************/
4691 /* */
4692 /* CryptoH323Token_cryptoFastStart */
4693 /* */
4694 /**************************************************************/
4695
4696 EXTERN int asn1PE_H225CryptoH323Token_cryptoFastStart (OOCTXT* pctxt, H225CryptoH323Token_cryptoFastStart* pvalue)
4697 {
4698 int stat = ASN_OK;
4699
4700 /* encode toBeSigned */
4701
4702 stat = asn1PE_H225EncodedFastStartToken (pctxt, pvalue->toBeSigned);
4703 if (stat != ASN_OK) return stat;
4704
4705 /* encode algorithmOID */
4706
4707 stat = encodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
4708 if (stat != ASN_OK) return stat;
4709
4710 /* encode paramS */
4711
4712 stat = asn1PE_H235Params (pctxt, &pvalue->paramS);
4713 if (stat != ASN_OK) return stat;
4714
4715 /* encode signature */
4716
4717 stat = encodeBitString (pctxt, pvalue->signature.numbits, pvalue->signature.data);
4718 if (stat != ASN_OK) return stat;
4719
4720 return (stat);
4721 }
4722
4723 /**************************************************************/
4724 /* */
4725 /* CryptoH323Token */
4726 /* */
4727 /**************************************************************/
4728
4729 EXTERN int asn1PE_H225CryptoH323Token (OOCTXT* pctxt, H225CryptoH323Token* pvalue)
4730 {
4731 int stat = ASN_OK;
4732 ASN1BOOL extbit;
4733
4734 /* extension bit */
4735
4736 extbit = (ASN1BOOL)(pvalue->t > 8);
4737
4738 encodeBit (pctxt, extbit);
4739
4740 if (!extbit) {
4741
4742 /* Encode choice index value */
4743
4744 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 7);
4745 if (stat != ASN_OK) return stat;
4746
4747 /* Encode root element data value */
4748
4749 switch (pvalue->t)
4750 {
4751 /* cryptoEPPwdHash */
4752 case 1:
4753 stat = asn1PE_H225CryptoH323Token_cryptoEPPwdHash (pctxt, pvalue->u.cryptoEPPwdHash);
4754 if (stat != ASN_OK) return stat;
4755 break;
4756
4757 /* cryptoGKPwdHash */
4758 case 2:
4759 stat = asn1PE_H225CryptoH323Token_cryptoGKPwdHash (pctxt, pvalue->u.cryptoGKPwdHash);
4760 if (stat != ASN_OK) return stat;
4761 break;
4762
4763 /* cryptoEPPwdEncr */
4764 case 3:
4765 stat = asn1PE_H235ENCRYPTED (pctxt, pvalue->u.cryptoEPPwdEncr);
4766 if (stat != ASN_OK) return stat;
4767 break;
4768
4769 /* cryptoGKPwdEncr */
4770 case 4:
4771 stat = asn1PE_H235ENCRYPTED (pctxt, pvalue->u.cryptoGKPwdEncr);
4772 if (stat != ASN_OK) return stat;
4773 break;
4774
4775 /* cryptoEPCert */
4776 case 5:
4777 stat = asn1PE_H225CryptoH323Token_cryptoEPCert (pctxt, pvalue->u.cryptoEPCert);
4778 if (stat != ASN_OK) return stat;
4779 break;
4780
4781 /* cryptoGKCert */
4782 case 6:
4783 stat = asn1PE_H225CryptoH323Token_cryptoGKCert (pctxt, pvalue->u.cryptoGKCert);
4784 if (stat != ASN_OK) return stat;
4785 break;
4786
4787 /* cryptoFastStart */
4788 case 7:
4789 stat = asn1PE_H225CryptoH323Token_cryptoFastStart (pctxt, pvalue->u.cryptoFastStart);
4790 if (stat != ASN_OK) return stat;
4791 break;
4792
4793 /* nestedcryptoToken */
4794 case 8:
4795 stat = asn1PE_H235CryptoToken (pctxt, pvalue->u.nestedcryptoToken);
4796 if (stat != ASN_OK) return stat;
4797 break;
4798
4799 default:
4800 return ASN_E_INVOPT;
4801 }
4802 }
4803 else {
4804 /* Encode extension choice index value */
4805
4806 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 9);
4807 if (stat != ASN_OK) return stat;
4808
4809 /* Encode extension element data value */
4810
4811 }
4812
4813 return (stat);
4814 }
4815
4816 /**************************************************************/
4817 /* */
4818 /* _SeqOfH225CryptoH323Token */
4819 /* */
4820 /**************************************************************/
4821
4822 EXTERN int asn1PE_H225_SeqOfH225CryptoH323Token (OOCTXT* pctxt, H225_SeqOfH225CryptoH323Token* pvalue)
4823 {
4824 int stat = ASN_OK;
4825 DListNode* pnode;
4826 ASN1UINT xx1;
4827 ASN1UINT enclen, fraglen;
4828
4829 enclen = fraglen = xx1 = 0;
4830 pnode = pvalue->head;
4831 for (;;) {
4832 /* encode length determinant */
4833
4834 stat = encodeLength (pctxt, (pvalue->count - enclen));
4835 if (stat < 0) return stat;
4836
4837 fraglen = stat;
4838 enclen += fraglen;
4839 /* encode elements */
4840
4841 for (; xx1 < enclen; xx1++) {
4842 stat = asn1PE_H225CryptoH323Token (pctxt, ((H225CryptoH323Token*)pnode->data));
4843 if (stat != ASN_OK) return stat;
4844 pnode = pnode->next;
4845 }
4846 if ( pvalue->count == enclen && fraglen < 16384) {
4847 break;
4848 }
4849 }
4850
4851 return (stat);
4852 }
4853
4854 /**************************************************************/
4855 /* */
4856 /* Setup_UUIE_fastStart */
4857 /* */
4858 /**************************************************************/
4859
4860 EXTERN int asn1PE_H225Setup_UUIE_fastStart (OOCTXT* pctxt, H225Setup_UUIE_fastStart* pvalue)
4861 {
4862 int stat = ASN_OK;
4863 ASN1UINT xx1;
4864
4865 /* encode length determinant */
4866
4867 stat = encodeLength (pctxt, pvalue->n);
4868 if (stat < 0) return stat;
4869
4870 /* encode elements */
4871
4872 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
4873 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
4874 if (stat != ASN_OK) return stat;
4875 }
4876
4877 return (stat);
4878 }
4879
4880 /**************************************************************/
4881 /* */
4882 /* ScnConnectionType */
4883 /* */
4884 /**************************************************************/
4885
4886 EXTERN int asn1PE_H225ScnConnectionType (OOCTXT* pctxt, H225ScnConnectionType* pvalue)
4887 {
4888 int stat = ASN_OK;
4889 ASN1BOOL extbit;
4890
4891 /* extension bit */
4892
4893 extbit = (ASN1BOOL)(pvalue->t > 7);
4894
4895 encodeBit (pctxt, extbit);
4896
4897 if (!extbit) {
4898
4899 /* Encode choice index value */
4900
4901 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 6);
4902 if (stat != ASN_OK) return stat;
4903
4904 /* Encode root element data value */
4905
4906 switch (pvalue->t)
4907 {
4908 /* unknown */
4909 case 1:
4910 /* NULL */
4911 break;
4912
4913 /* bChannel */
4914 case 2:
4915 /* NULL */
4916 break;
4917
4918 /* hybrid2x64 */
4919 case 3:
4920 /* NULL */
4921 break;
4922
4923 /* hybrid384 */
4924 case 4:
4925 /* NULL */
4926 break;
4927
4928 /* hybrid1536 */
4929 case 5:
4930 /* NULL */
4931 break;
4932
4933 /* hybrid1920 */
4934 case 6:
4935 /* NULL */
4936 break;
4937
4938 /* multirate */
4939 case 7:
4940 /* NULL */
4941 break;
4942
4943 default:
4944 return ASN_E_INVOPT;
4945 }
4946 }
4947 else {
4948 /* Encode extension choice index value */
4949
4950 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 8);
4951 if (stat != ASN_OK) return stat;
4952
4953 /* Encode extension element data value */
4954
4955 }
4956
4957 return (stat);
4958 }
4959
4960 /**************************************************************/
4961 /* */
4962 /* ScnConnectionAggregation */
4963 /* */
4964 /**************************************************************/
4965
4966 EXTERN int asn1PE_H225ScnConnectionAggregation (OOCTXT* pctxt, H225ScnConnectionAggregation* pvalue)
4967 {
4968 int stat = ASN_OK;
4969 ASN1BOOL extbit;
4970
4971 /* extension bit */
4972
4973 extbit = (ASN1BOOL)(pvalue->t > 6);
4974
4975 encodeBit (pctxt, extbit);
4976
4977 if (!extbit) {
4978
4979 /* Encode choice index value */
4980
4981 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 5);
4982 if (stat != ASN_OK) return stat;
4983
4984 /* Encode root element data value */
4985
4986 switch (pvalue->t)
4987 {
4988 /* auto_ */
4989 case 1:
4990 /* NULL */
4991 break;
4992
4993 /* none */
4994 case 2:
4995 /* NULL */
4996 break;
4997
4998 /* h221 */
4999 case 3:
5000 /* NULL */
5001 break;
5002
5003 /* bonded_mode1 */
5004 case 4:
5005 /* NULL */
5006 break;
5007
5008 /* bonded_mode2 */
5009 case 5:
5010 /* NULL */
5011 break;
5012
5013 /* bonded_mode3 */
5014 case 6:
5015 /* NULL */
5016 break;
5017
5018 default:
5019 return ASN_E_INVOPT;
5020 }
5021 }
5022 else {
5023 /* Encode extension choice index value */
5024
5025 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 7);
5026 if (stat != ASN_OK) return stat;
5027
5028 /* Encode extension element data value */
5029
5030 }
5031
5032 return (stat);
5033 }
5034
5035 /**************************************************************/
5036 /* */
5037 /* Setup_UUIE_connectionParameters */
5038 /* */
5039 /**************************************************************/
5040
5041 EXTERN int asn1PE_H225Setup_UUIE_connectionParameters (OOCTXT* pctxt, H225Setup_UUIE_connectionParameters* pvalue)
5042 {
5043 int stat = ASN_OK;
5044 ASN1BOOL extbit;
5045
5046 /* extension bit */
5047
5048 extbit = 0;
5049
5050 encodeBit (pctxt, extbit);
5051
5052 /* encode connectionType */
5053
5054 stat = asn1PE_H225ScnConnectionType (pctxt, &pvalue->connectionType);
5055 if (stat != ASN_OK) return stat;
5056
5057 /* encode numberOfScnConnections */
5058
5059 stat = encodeConsUnsigned (pctxt, pvalue->numberOfScnConnections, 0U, 65535U);
5060 if (stat != ASN_OK) return stat;
5061
5062 /* encode connectionAggregation */
5063
5064 stat = asn1PE_H225ScnConnectionAggregation (pctxt, &pvalue->connectionAggregation);
5065 if (stat != ASN_OK) return stat;
5066
5067 return (stat);
5068 }
5069
5070 /**************************************************************/
5071 /* */
5072 /* Setup_UUIE_language */
5073 /* */
5074 /**************************************************************/
5075
5076 EXTERN int asn1PE_H225Setup_UUIE_language (OOCTXT* pctxt, H225Setup_UUIE_language* pvalue)
5077 {
5078 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
5079 int stat = ASN_OK;
5080 ASN1UINT xx1;
5081
5082 /* encode length determinant */
5083
5084 stat = encodeLength (pctxt, pvalue->n);
5085 if (stat < 0) return stat;
5086
5087 /* encode elements */
5088
5089 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
5090 addSizeConstraint (pctxt, &element_lsize1);
5091
5092 stat = encodeConstrainedStringEx (pctxt, pvalue->elem[xx1], 0, 8, 7, 7);
5093 if (stat != ASN_OK) return stat;
5094 }
5095
5096 return (stat);
5097 }
5098
5099 /**************************************************************/
5100 /* */
5101 /* PresentationIndicator */
5102 /* */
5103 /**************************************************************/
5104
5105 EXTERN int asn1PE_H225PresentationIndicator (OOCTXT* pctxt, H225PresentationIndicator* pvalue)
5106 {
5107 int stat = ASN_OK;
5108 ASN1BOOL extbit;
5109
5110 /* extension bit */
5111
5112 extbit = (ASN1BOOL)(pvalue->t > 3);
5113
5114 encodeBit (pctxt, extbit);
5115
5116 if (!extbit) {
5117
5118 /* Encode choice index value */
5119
5120 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
5121 if (stat != ASN_OK) return stat;
5122
5123 /* Encode root element data value */
5124
5125 switch (pvalue->t)
5126 {
5127 /* presentationAllowed */
5128 case 1:
5129 /* NULL */
5130 break;
5131
5132 /* presentationRestricted */
5133 case 2:
5134 /* NULL */
5135 break;
5136
5137 /* addressNotAvailable */
5138 case 3:
5139 /* NULL */
5140 break;
5141
5142 default:
5143 return ASN_E_INVOPT;
5144 }
5145 }
5146 else {
5147 /* Encode extension choice index value */
5148
5149 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
5150 if (stat != ASN_OK) return stat;
5151
5152 /* Encode extension element data value */
5153
5154 }
5155
5156 return (stat);
5157 }
5158
5159 /**************************************************************/
5160 /* */
5161 /* CallCreditServiceControl_billingMode */
5162 /* */
5163 /**************************************************************/
5164
5165 EXTERN int asn1PE_H225CallCreditServiceControl_billingMode (OOCTXT* pctxt, H225CallCreditServiceControl_billingMode* pvalue)
5166 {
5167 int stat = ASN_OK;
5168 ASN1BOOL extbit;
5169
5170 /* extension bit */
5171
5172 extbit = (ASN1BOOL)(pvalue->t > 2);
5173
5174 encodeBit (pctxt, extbit);
5175
5176 if (!extbit) {
5177
5178 /* Encode choice index value */
5179
5180 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
5181 if (stat != ASN_OK) return stat;
5182
5183 /* Encode root element data value */
5184
5185 switch (pvalue->t)
5186 {
5187 /* credit */
5188 case 1:
5189 /* NULL */
5190 break;
5191
5192 /* debit */
5193 case 2:
5194 /* NULL */
5195 break;
5196
5197 default:
5198 return ASN_E_INVOPT;
5199 }
5200 }
5201 else {
5202 /* Encode extension choice index value */
5203
5204 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
5205 if (stat != ASN_OK) return stat;
5206
5207 /* Encode extension element data value */
5208
5209 }
5210
5211 return (stat);
5212 }
5213
5214 /**************************************************************/
5215 /* */
5216 /* CallCreditServiceControl_callStartingPoint */
5217 /* */
5218 /**************************************************************/
5219
5220 EXTERN int asn1PE_H225CallCreditServiceControl_callStartingPoint (OOCTXT* pctxt, H225CallCreditServiceControl_callStartingPoint* pvalue)
5221 {
5222 int stat = ASN_OK;
5223 ASN1BOOL extbit;
5224
5225 /* extension bit */
5226
5227 extbit = (ASN1BOOL)(pvalue->t > 2);
5228
5229 encodeBit (pctxt, extbit);
5230
5231 if (!extbit) {
5232
5233 /* Encode choice index value */
5234
5235 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
5236 if (stat != ASN_OK) return stat;
5237
5238 /* Encode root element data value */
5239
5240 switch (pvalue->t)
5241 {
5242 /* alerting */
5243 case 1:
5244 /* NULL */
5245 break;
5246
5247 /* connect */
5248 case 2:
5249 /* NULL */
5250 break;
5251
5252 default:
5253 return ASN_E_INVOPT;
5254 }
5255 }
5256 else {
5257 /* Encode extension choice index value */
5258
5259 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
5260 if (stat != ASN_OK) return stat;
5261
5262 /* Encode extension element data value */
5263
5264 }
5265
5266 return (stat);
5267 }
5268
5269 /**************************************************************/
5270 /* */
5271 /* CallCreditServiceControl */
5272 /* */
5273 /**************************************************************/
5274
5275 EXTERN int asn1PE_H225CallCreditServiceControl (OOCTXT* pctxt, H225CallCreditServiceControl* pvalue)
5276 {
5277 static Asn1SizeCnst amountString_lsize1 = { 0, 1, 512, 0 };
5278 int stat = ASN_OK;
5279 ASN1BOOL extbit;
5280
5281 /* extension bit */
5282
5283 extbit = 0;
5284
5285 encodeBit (pctxt, extbit);
5286
5287 encodeBit (pctxt, (ASN1BOOL)pvalue->m.amountStringPresent);
5288
5289 encodeBit (pctxt, (ASN1BOOL)pvalue->m.billingModePresent);
5290
5291 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callDurationLimitPresent);
5292
5293 encodeBit (pctxt, (ASN1BOOL)pvalue->m.enforceCallDurationLimitPresent);
5294
5295 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callStartingPointPresent);
5296
5297 /* encode amountString */
5298
5299 if (pvalue->m.amountStringPresent) {
5300 addSizeConstraint (pctxt, &amountString_lsize1);
5301
5302 stat = encodeBMPString (pctxt, pvalue->amountString, 0);
5303 if (stat != ASN_OK) return stat;
5304 }
5305
5306 /* encode billingMode */
5307
5308 if (pvalue->m.billingModePresent) {
5309 stat = asn1PE_H225CallCreditServiceControl_billingMode (pctxt, &pvalue->billingMode);
5310 if (stat != ASN_OK) return stat;
5311 }
5312
5313 /* encode callDurationLimit */
5314
5315 if (pvalue->m.callDurationLimitPresent) {
5316 stat = encodeConsUnsigned (pctxt, pvalue->callDurationLimit, 1U, ASN1UINT_MAX);
5317 if (stat != ASN_OK) return stat;
5318
5319 }
5320
5321 /* encode enforceCallDurationLimit */
5322
5323 if (pvalue->m.enforceCallDurationLimitPresent) {
5324 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->enforceCallDurationLimit);
5325 if (stat != ASN_OK) return stat;
5326 }
5327
5328 /* encode callStartingPoint */
5329
5330 if (pvalue->m.callStartingPointPresent) {
5331 stat = asn1PE_H225CallCreditServiceControl_callStartingPoint (pctxt, &pvalue->callStartingPoint);
5332 if (stat != ASN_OK) return stat;
5333 }
5334
5335 return (stat);
5336 }
5337
5338 /**************************************************************/
5339 /* */
5340 /* ServiceControlDescriptor */
5341 /* */
5342 /**************************************************************/
5343
5344 EXTERN int asn1PE_H225ServiceControlDescriptor (OOCTXT* pctxt, H225ServiceControlDescriptor* pvalue)
5345 {
5346 static Asn1SizeCnst url_lsize1 = { 0, 0, 512, 0 };
5347 int stat = ASN_OK;
5348 ASN1BOOL extbit;
5349
5350 /* extension bit */
5351
5352 extbit = (ASN1BOOL)(pvalue->t > 4);
5353
5354 encodeBit (pctxt, extbit);
5355
5356 if (!extbit) {
5357
5358 /* Encode choice index value */
5359
5360 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
5361 if (stat != ASN_OK) return stat;
5362
5363 /* Encode root element data value */
5364
5365 switch (pvalue->t)
5366 {
5367 /* url */
5368 case 1:
5369 addSizeConstraint (pctxt, &url_lsize1);
5370
5371 stat = encodeConstrainedStringEx (pctxt, pvalue->u.url, 0, 8, 7, 7);
5372 if (stat != ASN_OK) return stat;
5373 break;
5374
5375 /* signal */
5376 case 2:
5377 stat = asn1PE_H225H248SignalsDescriptor (pctxt, *pvalue->u.signal);
5378 if (stat != ASN_OK) return stat;
5379 break;
5380
5381 /* nonStandard */
5382 case 3:
5383 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
5384 if (stat != ASN_OK) return stat;
5385 break;
5386
5387 /* callCreditServiceControl */
5388 case 4:
5389 stat = asn1PE_H225CallCreditServiceControl (pctxt, pvalue->u.callCreditServiceControl);
5390 if (stat != ASN_OK) return stat;
5391 break;
5392
5393 default:
5394 return ASN_E_INVOPT;
5395 }
5396 }
5397 else {
5398 /* Encode extension choice index value */
5399
5400 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
5401 if (stat != ASN_OK) return stat;
5402
5403 /* Encode extension element data value */
5404
5405 }
5406
5407 return (stat);
5408 }
5409
5410 /**************************************************************/
5411 /* */
5412 /* ServiceControlSession_reason */
5413 /* */
5414 /**************************************************************/
5415
5416 EXTERN int asn1PE_H225ServiceControlSession_reason (OOCTXT* pctxt, H225ServiceControlSession_reason* pvalue)
5417 {
5418 int stat = ASN_OK;
5419 ASN1BOOL extbit;
5420
5421 /* extension bit */
5422
5423 extbit = (ASN1BOOL)(pvalue->t > 3);
5424
5425 encodeBit (pctxt, extbit);
5426
5427 if (!extbit) {
5428
5429 /* Encode choice index value */
5430
5431 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
5432 if (stat != ASN_OK) return stat;
5433
5434 /* Encode root element data value */
5435
5436 switch (pvalue->t)
5437 {
5438 /* open */
5439 case 1:
5440 /* NULL */
5441 break;
5442
5443 /* refresh */
5444 case 2:
5445 /* NULL */
5446 break;
5447
5448 /* close */
5449 case 3:
5450 /* NULL */
5451 break;
5452
5453 default:
5454 return ASN_E_INVOPT;
5455 }
5456 }
5457 else {
5458 /* Encode extension choice index value */
5459
5460 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
5461 if (stat != ASN_OK) return stat;
5462
5463 /* Encode extension element data value */
5464
5465 }
5466
5467 return (stat);
5468 }
5469
5470 /**************************************************************/
5471 /* */
5472 /* ServiceControlSession */
5473 /* */
5474 /**************************************************************/
5475
5476 EXTERN int asn1PE_H225ServiceControlSession (OOCTXT* pctxt, H225ServiceControlSession* pvalue)
5477 {
5478 int stat = ASN_OK;
5479 ASN1BOOL extbit;
5480
5481 /* extension bit */
5482
5483 extbit = 0;
5484
5485 encodeBit (pctxt, extbit);
5486
5487 encodeBit (pctxt, (ASN1BOOL)pvalue->m.contentsPresent);
5488
5489 /* encode sessionId */
5490
5491 stat = encodeConsUnsigned (pctxt, pvalue->sessionId, 0U, 255U);
5492 if (stat != ASN_OK) return stat;
5493
5494 /* encode contents */
5495
5496 if (pvalue->m.contentsPresent) {
5497 stat = asn1PE_H225ServiceControlDescriptor (pctxt, &pvalue->contents);
5498 if (stat != ASN_OK) return stat;
5499 }
5500
5501 /* encode reason */
5502
5503 stat = asn1PE_H225ServiceControlSession_reason (pctxt, &pvalue->reason);
5504 if (stat != ASN_OK) return stat;
5505
5506 return (stat);
5507 }
5508
5509 /**************************************************************/
5510 /* */
5511 /* _SeqOfH225ServiceControlSession */
5512 /* */
5513 /**************************************************************/
5514
5515 EXTERN int asn1PE_H225_SeqOfH225ServiceControlSession (OOCTXT* pctxt, H225_SeqOfH225ServiceControlSession* pvalue)
5516 {
5517 int stat = ASN_OK;
5518 DListNode* pnode;
5519 ASN1UINT xx1;
5520 ASN1UINT enclen, fraglen;
5521
5522 enclen = fraglen = xx1 = 0;
5523 pnode = pvalue->head;
5524 for (;;) {
5525 /* encode length determinant */
5526
5527 stat = encodeLength (pctxt, (pvalue->count - enclen));
5528 if (stat < 0) return stat;
5529
5530 fraglen = stat;
5531 enclen += fraglen;
5532 /* encode elements */
5533
5534 for (; xx1 < enclen; xx1++) {
5535 stat = asn1PE_H225ServiceControlSession (pctxt, ((H225ServiceControlSession*)pnode->data));
5536 if (stat != ASN_OK) return stat;
5537 pnode = pnode->next;
5538 }
5539 if ( pvalue->count == enclen && fraglen < 16384) {
5540 break;
5541 }
5542 }
5543
5544 return (stat);
5545 }
5546
5547 /**************************************************************/
5548 /* */
5549 /* CarrierInfo */
5550 /* */
5551 /**************************************************************/
5552
5553 EXTERN int asn1PE_H225CarrierInfo (OOCTXT* pctxt, H225CarrierInfo* pvalue)
5554 {
5555 static Asn1SizeCnst carrierName_lsize1 = { 0, 1, 128, 0 };
5556 int stat = ASN_OK;
5557 ASN1BOOL extbit;
5558
5559 /* extension bit */
5560
5561 extbit = 0;
5562
5563 encodeBit (pctxt, extbit);
5564
5565 encodeBit (pctxt, (ASN1BOOL)pvalue->m.carrierIdentificationCodePresent);
5566
5567 encodeBit (pctxt, (ASN1BOOL)pvalue->m.carrierNamePresent);
5568
5569 /* encode carrierIdentificationCode */
5570
5571 if (pvalue->m.carrierIdentificationCodePresent) {
5572 stat = asn1PE_H225CarrierInfo_carrierIdentificationCode (pctxt, &pvalue->carrierIdentificationCode);
5573 if (stat != ASN_OK) return stat;
5574 }
5575
5576 /* encode carrierName */
5577
5578 if (pvalue->m.carrierNamePresent) {
5579 addSizeConstraint (pctxt, &carrierName_lsize1);
5580
5581 stat = encodeConstrainedStringEx (pctxt, pvalue->carrierName, 0, 8, 7, 7);
5582 if (stat != ASN_OK) return stat;
5583 }
5584
5585 return (stat);
5586 }
5587
5588 /**************************************************************/
5589 /* */
5590 /* CallsAvailable */
5591 /* */
5592 /**************************************************************/
5593
5594 EXTERN int asn1PE_H225CallsAvailable (OOCTXT* pctxt, H225CallsAvailable* pvalue)
5595 {
5596 static Asn1SizeCnst group_lsize1 = { 0, 1, 128, 0 };
5597 int stat = ASN_OK;
5598 ASN1BOOL extbit;
5599 ASN1OpenType openType;
5600 OOCTXT lctxt;
5601
5602 /* extension bit */
5603
5604 extbit = (ASN1BOOL)(pvalue->m.carrierPresent);
5605
5606 encodeBit (pctxt, extbit);
5607
5608 encodeBit (pctxt, (ASN1BOOL)pvalue->m.groupPresent);
5609
5610 /* encode calls */
5611
5612 stat = encodeConsUnsigned (pctxt, pvalue->calls, 0U, ASN1UINT_MAX);
5613 if (stat != ASN_OK) return stat;
5614
5615 /* encode group */
5616
5617 if (pvalue->m.groupPresent) {
5618 addSizeConstraint (pctxt, &group_lsize1);
5619
5620 stat = encodeConstrainedStringEx (pctxt, pvalue->group, 0, 8, 7, 7);
5621 if (stat != ASN_OK) return stat;
5622 }
5623
5624 if (extbit) {
5625
5626 /* encode extension optional bits length */
5627
5628 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
5629 if (stat != ASN_OK) return stat;
5630
5631 /* encode optional bits */
5632
5633 encodeBit (pctxt, (ASN1BOOL)pvalue->m.carrierPresent);
5634 /* encode extension elements */
5635
5636 if (pvalue->m.carrierPresent) {
5637 initContext (&lctxt);
5638 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
5639 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5640
5641 stat = asn1PE_H225CarrierInfo (&lctxt, &pvalue->carrier);
5642 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5643
5644 stat = encodeByteAlign (&lctxt);
5645 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5646
5647 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
5648
5649 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
5650 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5651
5652 freeContext (&lctxt);
5653 }
5654
5655 }
5656
5657 return (stat);
5658 }
5659
5660 /**************************************************************/
5661 /* */
5662 /* _SeqOfH225CallsAvailable */
5663 /* */
5664 /**************************************************************/
5665
5666 EXTERN int asn1PE_H225_SeqOfH225CallsAvailable (OOCTXT* pctxt, H225_SeqOfH225CallsAvailable* pvalue)
5667 {
5668 int stat = ASN_OK;
5669 DListNode* pnode;
5670 ASN1UINT xx1;
5671 ASN1UINT enclen, fraglen;
5672
5673 enclen = fraglen = xx1 = 0;
5674 pnode = pvalue->head;
5675 for (;;) {
5676 /* encode length determinant */
5677
5678 stat = encodeLength (pctxt, (pvalue->count - enclen));
5679 if (stat < 0) return stat;
5680
5681 fraglen = stat;
5682 enclen += fraglen;
5683 /* encode elements */
5684
5685 for (; xx1 < enclen; xx1++) {
5686 stat = asn1PE_H225CallsAvailable (pctxt, ((H225CallsAvailable*)pnode->data));
5687 if (stat != ASN_OK) return stat;
5688 pnode = pnode->next;
5689 }
5690 if ( pvalue->count == enclen && fraglen < 16384) {
5691 break;
5692 }
5693 }
5694
5695 return (stat);
5696 }
5697
5698 /**************************************************************/
5699 /* */
5700 /* CallCapacityInfo */
5701 /* */
5702 /**************************************************************/
5703
5704 EXTERN int asn1PE_H225CallCapacityInfo (OOCTXT* pctxt, H225CallCapacityInfo* pvalue)
5705 {
5706 int stat = ASN_OK;
5707 ASN1BOOL extbit;
5708 ASN1OpenType openType;
5709 OOCTXT lctxt;
5710
5711 /* extension bit */
5712
5713 extbit = (ASN1BOOL)(pvalue->m.sipGwCallsAvailablePresent);
5714
5715 encodeBit (pctxt, extbit);
5716
5717 encodeBit (pctxt, (ASN1BOOL)pvalue->m.voiceGwCallsAvailablePresent);
5718
5719 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h310GwCallsAvailablePresent);
5720
5721 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h320GwCallsAvailablePresent);
5722
5723 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h321GwCallsAvailablePresent);
5724
5725 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h322GwCallsAvailablePresent);
5726
5727 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h323GwCallsAvailablePresent);
5728
5729 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h324GwCallsAvailablePresent);
5730
5731 encodeBit (pctxt, (ASN1BOOL)pvalue->m.t120OnlyGwCallsAvailablePresent);
5732
5733 encodeBit (pctxt, (ASN1BOOL)pvalue->m.t38FaxAnnexbOnlyGwCallsAvailablePresent);
5734
5735 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalCallsAvailablePresent);
5736
5737 encodeBit (pctxt, (ASN1BOOL)pvalue->m.mcuCallsAvailablePresent);
5738
5739 /* encode voiceGwCallsAvailable */
5740
5741 if (pvalue->m.voiceGwCallsAvailablePresent) {
5742 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->voiceGwCallsAvailable);
5743 if (stat != ASN_OK) return stat;
5744 }
5745
5746 /* encode h310GwCallsAvailable */
5747
5748 if (pvalue->m.h310GwCallsAvailablePresent) {
5749 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h310GwCallsAvailable);
5750 if (stat != ASN_OK) return stat;
5751 }
5752
5753 /* encode h320GwCallsAvailable */
5754
5755 if (pvalue->m.h320GwCallsAvailablePresent) {
5756 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h320GwCallsAvailable);
5757 if (stat != ASN_OK) return stat;
5758 }
5759
5760 /* encode h321GwCallsAvailable */
5761
5762 if (pvalue->m.h321GwCallsAvailablePresent) {
5763 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h321GwCallsAvailable);
5764 if (stat != ASN_OK) return stat;
5765 }
5766
5767 /* encode h322GwCallsAvailable */
5768
5769 if (pvalue->m.h322GwCallsAvailablePresent) {
5770 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h322GwCallsAvailable);
5771 if (stat != ASN_OK) return stat;
5772 }
5773
5774 /* encode h323GwCallsAvailable */
5775
5776 if (pvalue->m.h323GwCallsAvailablePresent) {
5777 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h323GwCallsAvailable);
5778 if (stat != ASN_OK) return stat;
5779 }
5780
5781 /* encode h324GwCallsAvailable */
5782
5783 if (pvalue->m.h324GwCallsAvailablePresent) {
5784 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->h324GwCallsAvailable);
5785 if (stat != ASN_OK) return stat;
5786 }
5787
5788 /* encode t120OnlyGwCallsAvailable */
5789
5790 if (pvalue->m.t120OnlyGwCallsAvailablePresent) {
5791 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->t120OnlyGwCallsAvailable);
5792 if (stat != ASN_OK) return stat;
5793 }
5794
5795 /* encode t38FaxAnnexbOnlyGwCallsAvailable */
5796
5797 if (pvalue->m.t38FaxAnnexbOnlyGwCallsAvailablePresent) {
5798 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->t38FaxAnnexbOnlyGwCallsAvailable);
5799 if (stat != ASN_OK) return stat;
5800 }
5801
5802 /* encode terminalCallsAvailable */
5803
5804 if (pvalue->m.terminalCallsAvailablePresent) {
5805 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->terminalCallsAvailable);
5806 if (stat != ASN_OK) return stat;
5807 }
5808
5809 /* encode mcuCallsAvailable */
5810
5811 if (pvalue->m.mcuCallsAvailablePresent) {
5812 stat = asn1PE_H225_SeqOfH225CallsAvailable (pctxt, &pvalue->mcuCallsAvailable);
5813 if (stat != ASN_OK) return stat;
5814 }
5815
5816 if (extbit) {
5817
5818 /* encode extension optional bits length */
5819
5820 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
5821 if (stat != ASN_OK) return stat;
5822
5823 /* encode optional bits */
5824
5825 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sipGwCallsAvailablePresent);
5826 /* encode extension elements */
5827
5828 if (pvalue->m.sipGwCallsAvailablePresent) {
5829 initContext (&lctxt);
5830 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
5831 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5832
5833 stat = asn1PE_H225_SeqOfH225CallsAvailable (&lctxt, &pvalue->sipGwCallsAvailable);
5834 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5835
5836 stat = encodeByteAlign (&lctxt);
5837 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5838
5839 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
5840
5841 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
5842 if (stat != ASN_OK) return freeContext (&lctxt), stat;
5843
5844 freeContext (&lctxt);
5845 }
5846
5847 }
5848
5849 return (stat);
5850 }
5851
5852 /**************************************************************/
5853 /* */
5854 /* CallCapacity */
5855 /* */
5856 /**************************************************************/
5857
5858 EXTERN int asn1PE_H225CallCapacity (OOCTXT* pctxt, H225CallCapacity* pvalue)
5859 {
5860 int stat = ASN_OK;
5861 ASN1BOOL extbit;
5862
5863 /* extension bit */
5864
5865 extbit = 0;
5866
5867 encodeBit (pctxt, extbit);
5868
5869 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maximumCallCapacityPresent);
5870
5871 encodeBit (pctxt, (ASN1BOOL)pvalue->m.currentCallCapacityPresent);
5872
5873 /* encode maximumCallCapacity */
5874
5875 if (pvalue->m.maximumCallCapacityPresent) {
5876 stat = asn1PE_H225CallCapacityInfo (pctxt, &pvalue->maximumCallCapacity);
5877 if (stat != ASN_OK) return stat;
5878 }
5879
5880 /* encode currentCallCapacity */
5881
5882 if (pvalue->m.currentCallCapacityPresent) {
5883 stat = asn1PE_H225CallCapacityInfo (pctxt, &pvalue->currentCallCapacity);
5884 if (stat != ASN_OK) return stat;
5885 }
5886
5887 return (stat);
5888 }
5889
5890 /**************************************************************/
5891 /* */
5892 /* _SeqOfH225CicInfo_cic_element */
5893 /* */
5894 /**************************************************************/
5895
5896 EXTERN int asn1PE_H225_SeqOfH225CicInfo_cic_element (OOCTXT* pctxt, H225_SeqOfH225CicInfo_cic_element* pvalue)
5897 {
5898 int stat = ASN_OK;
5899 ASN1UINT xx1;
5900
5901 /* encode length determinant */
5902
5903 stat = encodeLength (pctxt, pvalue->n);
5904 if (stat < 0) return stat;
5905
5906 /* encode elements */
5907
5908 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
5909 stat = asn1PE_H225CicInfo_cic_element (pctxt, &pvalue->elem[xx1]);
5910 if (stat != ASN_OK) return stat;
5911 }
5912
5913 return (stat);
5914 }
5915
5916 /**************************************************************/
5917 /* */
5918 /* CicInfo */
5919 /* */
5920 /**************************************************************/
5921
5922 EXTERN int asn1PE_H225CicInfo (OOCTXT* pctxt, H225CicInfo* pvalue)
5923 {
5924 int stat = ASN_OK;
5925 ASN1BOOL extbit;
5926
5927 /* extension bit */
5928
5929 extbit = 0;
5930
5931 encodeBit (pctxt, extbit);
5932
5933 /* encode cic */
5934
5935 stat = asn1PE_H225_SeqOfH225CicInfo_cic_element (pctxt, &pvalue->cic);
5936 if (stat != ASN_OK) return stat;
5937
5938 /* encode pointCode */
5939
5940 stat = asn1PE_H225CicInfo_pointCode (pctxt, &pvalue->pointCode);
5941 if (stat != ASN_OK) return stat;
5942
5943 return (stat);
5944 }
5945
5946 /**************************************************************/
5947 /* */
5948 /* GroupID_member */
5949 /* */
5950 /**************************************************************/
5951
5952 EXTERN int asn1PE_H225GroupID_member (OOCTXT* pctxt, H225GroupID_member* pvalue)
5953 {
5954 int stat = ASN_OK;
5955 ASN1UINT xx1;
5956
5957 /* encode length determinant */
5958
5959 stat = encodeLength (pctxt, pvalue->n);
5960 if (stat < 0) return stat;
5961
5962 /* encode elements */
5963
5964 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
5965 stat = encodeConsUnsigned (pctxt, pvalue->elem[xx1], 0U, 65535U);
5966 if (stat != ASN_OK) return stat;
5967
5968 }
5969
5970 return (stat);
5971 }
5972
5973 /**************************************************************/
5974 /* */
5975 /* GroupID */
5976 /* */
5977 /**************************************************************/
5978
5979 EXTERN int asn1PE_H225GroupID (OOCTXT* pctxt, H225GroupID* pvalue)
5980 {
5981 static Asn1SizeCnst group_lsize1 = { 0, 1, 128, 0 };
5982 int stat = ASN_OK;
5983 ASN1BOOL extbit;
5984
5985 /* extension bit */
5986
5987 extbit = 0;
5988
5989 encodeBit (pctxt, extbit);
5990
5991 encodeBit (pctxt, (ASN1BOOL)pvalue->m.memberPresent);
5992
5993 /* encode member */
5994
5995 if (pvalue->m.memberPresent) {
5996 stat = asn1PE_H225GroupID_member (pctxt, &pvalue->member);
5997 if (stat != ASN_OK) return stat;
5998 }
5999
6000 /* encode group */
6001
6002 addSizeConstraint (pctxt, &group_lsize1);
6003
6004 stat = encodeConstrainedStringEx (pctxt, pvalue->group, 0, 8, 7, 7);
6005 if (stat != ASN_OK) return stat;
6006
6007 return (stat);
6008 }
6009
6010 /**************************************************************/
6011 /* */
6012 /* CircuitIdentifier */
6013 /* */
6014 /**************************************************************/
6015
6016 EXTERN int asn1PE_H225CircuitIdentifier (OOCTXT* pctxt, H225CircuitIdentifier* pvalue)
6017 {
6018 int stat = ASN_OK;
6019 ASN1BOOL extbit;
6020 ASN1OpenType openType;
6021 OOCTXT lctxt;
6022
6023 /* extension bit */
6024
6025 extbit = (ASN1BOOL)(pvalue->m.carrierPresent);
6026
6027 encodeBit (pctxt, extbit);
6028
6029 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cicPresent);
6030
6031 encodeBit (pctxt, (ASN1BOOL)pvalue->m.groupPresent);
6032
6033 /* encode cic */
6034
6035 if (pvalue->m.cicPresent) {
6036 stat = asn1PE_H225CicInfo (pctxt, &pvalue->cic);
6037 if (stat != ASN_OK) return stat;
6038 }
6039
6040 /* encode group */
6041
6042 if (pvalue->m.groupPresent) {
6043 stat = asn1PE_H225GroupID (pctxt, &pvalue->group);
6044 if (stat != ASN_OK) return stat;
6045 }
6046
6047 if (extbit) {
6048
6049 /* encode extension optional bits length */
6050
6051 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
6052 if (stat != ASN_OK) return stat;
6053
6054 /* encode optional bits */
6055
6056 encodeBit (pctxt, (ASN1BOOL)pvalue->m.carrierPresent);
6057 /* encode extension elements */
6058
6059 if (pvalue->m.carrierPresent) {
6060 initContext (&lctxt);
6061 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6062 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6063
6064 stat = asn1PE_H225CarrierInfo (&lctxt, &pvalue->carrier);
6065 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6066
6067 stat = encodeByteAlign (&lctxt);
6068 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6069
6070 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6071
6072 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6073 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6074
6075 freeContext (&lctxt);
6076 }
6077
6078 }
6079
6080 return (stat);
6081 }
6082
6083 /**************************************************************/
6084 /* */
6085 /* _SeqOfH225GenericData */
6086 /* */
6087 /**************************************************************/
6088
6089 EXTERN int asn1PE_H225_SeqOfH225GenericData (OOCTXT* pctxt, H225_SeqOfH225GenericData* pvalue)
6090 {
6091 int stat = ASN_OK;
6092 DListNode* pnode;
6093 ASN1UINT xx1;
6094 ASN1UINT enclen, fraglen;
6095
6096 enclen = fraglen = xx1 = 0;
6097 pnode = pvalue->head;
6098 for (;;) {
6099 /* encode length determinant */
6100
6101 stat = encodeLength (pctxt, (pvalue->count - enclen));
6102 if (stat < 0) return stat;
6103
6104 fraglen = stat;
6105 enclen += fraglen;
6106 /* encode elements */
6107
6108 for (; xx1 < enclen; xx1++) {
6109 stat = asn1PE_H225GenericData (pctxt, ((H225GenericData*)pnode->data));
6110 if (stat != ASN_OK) return stat;
6111 pnode = pnode->next;
6112 }
6113 if ( pvalue->count == enclen && fraglen < 16384) {
6114 break;
6115 }
6116 }
6117
6118 return (stat);
6119 }
6120
6121 /**************************************************************/
6122 /* */
6123 /* CircuitInfo */
6124 /* */
6125 /**************************************************************/
6126
6127 EXTERN int asn1PE_H225CircuitInfo (OOCTXT* pctxt, H225CircuitInfo* pvalue)
6128 {
6129 int stat = ASN_OK;
6130 ASN1BOOL extbit;
6131
6132 /* extension bit */
6133
6134 extbit = 0;
6135
6136 encodeBit (pctxt, extbit);
6137
6138 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sourceCircuitIDPresent);
6139
6140 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationCircuitIDPresent);
6141
6142 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
6143
6144 /* encode sourceCircuitID */
6145
6146 if (pvalue->m.sourceCircuitIDPresent) {
6147 stat = asn1PE_H225CircuitIdentifier (pctxt, &pvalue->sourceCircuitID);
6148 if (stat != ASN_OK) return stat;
6149 }
6150
6151 /* encode destinationCircuitID */
6152
6153 if (pvalue->m.destinationCircuitIDPresent) {
6154 stat = asn1PE_H225CircuitIdentifier (pctxt, &pvalue->destinationCircuitID);
6155 if (stat != ASN_OK) return stat;
6156 }
6157
6158 /* encode genericData */
6159
6160 if (pvalue->m.genericDataPresent) {
6161 stat = asn1PE_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
6162 if (stat != ASN_OK) return stat;
6163 }
6164
6165 return (stat);
6166 }
6167
6168 /**************************************************************/
6169 /* */
6170 /* _SeqOfH225FeatureDescriptor */
6171 /* */
6172 /**************************************************************/
6173
6174 EXTERN int asn1PE_H225_SeqOfH225FeatureDescriptor (OOCTXT* pctxt, H225_SeqOfH225FeatureDescriptor* pvalue)
6175 {
6176 int stat = ASN_OK;
6177 DListNode* pnode;
6178 ASN1UINT xx1;
6179 ASN1UINT enclen, fraglen;
6180
6181 enclen = fraglen = xx1 = 0;
6182 pnode = pvalue->head;
6183 for (;;) {
6184 /* encode length determinant */
6185
6186 stat = encodeLength (pctxt, (pvalue->count - enclen));
6187 if (stat < 0) return stat;
6188
6189 fraglen = stat;
6190 enclen += fraglen;
6191 /* encode elements */
6192
6193 for (; xx1 < enclen; xx1++) {
6194 stat = asn1PE_H225FeatureDescriptor (pctxt, ((H225FeatureDescriptor*)pnode->data));
6195 if (stat != ASN_OK) return stat;
6196 pnode = pnode->next;
6197 }
6198 if ( pvalue->count == enclen && fraglen < 16384) {
6199 break;
6200 }
6201 }
6202
6203 return (stat);
6204 }
6205
6206 /**************************************************************/
6207 /* */
6208 /* Setup_UUIE_parallelH245Control */
6209 /* */
6210 /**************************************************************/
6211
6212 EXTERN int asn1PE_H225Setup_UUIE_parallelH245Control (OOCTXT* pctxt, H225Setup_UUIE_parallelH245Control* pvalue)
6213 {
6214 int stat = ASN_OK;
6215 ASN1UINT xx1;
6216
6217 /* encode length determinant */
6218
6219 stat = encodeLength (pctxt, pvalue->n);
6220 if (stat < 0) return stat;
6221
6222 /* encode elements */
6223
6224 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
6225 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
6226 if (stat != ASN_OK) return stat;
6227 }
6228
6229 return (stat);
6230 }
6231
6232 /**************************************************************/
6233 /* */
6234 /* ExtendedAliasAddress */
6235 /* */
6236 /**************************************************************/
6237
6238 EXTERN int asn1PE_H225ExtendedAliasAddress (OOCTXT* pctxt, H225ExtendedAliasAddress* pvalue)
6239 {
6240 int stat = ASN_OK;
6241 ASN1BOOL extbit;
6242
6243 /* extension bit */
6244
6245 extbit = 0;
6246
6247 encodeBit (pctxt, extbit);
6248
6249 encodeBit (pctxt, (ASN1BOOL)pvalue->m.presentationIndicatorPresent);
6250
6251 encodeBit (pctxt, (ASN1BOOL)pvalue->m.screeningIndicatorPresent);
6252
6253 /* encode address */
6254
6255 stat = asn1PE_H225AliasAddress (pctxt, &pvalue->address);
6256 if (stat != ASN_OK) return stat;
6257
6258 /* encode presentationIndicator */
6259
6260 if (pvalue->m.presentationIndicatorPresent) {
6261 stat = asn1PE_H225PresentationIndicator (pctxt, &pvalue->presentationIndicator);
6262 if (stat != ASN_OK) return stat;
6263 }
6264
6265 /* encode screeningIndicator */
6266
6267 if (pvalue->m.screeningIndicatorPresent) {
6268 stat = asn1PE_H225ScreeningIndicator (pctxt, pvalue->screeningIndicator);
6269 if (stat != ASN_OK) return stat;
6270 }
6271
6272 return (stat);
6273 }
6274
6275 /**************************************************************/
6276 /* */
6277 /* _SeqOfH225ExtendedAliasAddress */
6278 /* */
6279 /**************************************************************/
6280
6281 EXTERN int asn1PE_H225_SeqOfH225ExtendedAliasAddress (OOCTXT* pctxt, H225_SeqOfH225ExtendedAliasAddress* pvalue)
6282 {
6283 int stat = ASN_OK;
6284 DListNode* pnode;
6285 ASN1UINT xx1;
6286 ASN1UINT enclen, fraglen;
6287
6288 enclen = fraglen = xx1 = 0;
6289 pnode = pvalue->head;
6290 for (;;) {
6291 /* encode length determinant */
6292
6293 stat = encodeLength (pctxt, (pvalue->count - enclen));
6294 if (stat < 0) return stat;
6295
6296 fraglen = stat;
6297 enclen += fraglen;
6298 /* encode elements */
6299
6300 for (; xx1 < enclen; xx1++) {
6301 stat = asn1PE_H225ExtendedAliasAddress (pctxt, ((H225ExtendedAliasAddress*)pnode->data));
6302 if (stat != ASN_OK) return stat;
6303 pnode = pnode->next;
6304 }
6305 if ( pvalue->count == enclen && fraglen < 16384) {
6306 break;
6307 }
6308 }
6309
6310 return (stat);
6311 }
6312
6313 /**************************************************************/
6314 /* */
6315 /* Setup_UUIE */
6316 /* */
6317 /**************************************************************/
6318
6319 EXTERN int asn1PE_H225Setup_UUIE (OOCTXT* pctxt, H225Setup_UUIE* pvalue)
6320 {
6321 int stat = ASN_OK;
6322 ASN1BOOL extbit;
6323 ASN1OpenType openType;
6324 OOCTXT lctxt;
6325
6326 /* extension bit */
6327
6328 extbit = (ASN1BOOL)(pvalue->m.sourceCallSignalAddressPresent ||
6329 pvalue->m.remoteExtensionAddressPresent ||
6330 pvalue->m.callIdentifierPresent ||
6331 pvalue->m.h245SecurityCapabilityPresent ||
6332 pvalue->m.tokensPresent ||
6333 pvalue->m.cryptoTokensPresent ||
6334 pvalue->m.fastStartPresent ||
6335 pvalue->m.mediaWaitForConnectPresent ||
6336 pvalue->m.canOverlapSendPresent ||
6337 pvalue->m.endpointIdentifierPresent ||
6338 pvalue->m.multipleCallsPresent ||
6339 pvalue->m.maintainConnectionPresent ||
6340 pvalue->m.connectionParametersPresent ||
6341 pvalue->m.languagePresent ||
6342 pvalue->m.presentationIndicatorPresent ||
6343 pvalue->m.screeningIndicatorPresent ||
6344 pvalue->m.serviceControlPresent ||
6345 pvalue->m.symmetricOperationRequiredPresent ||
6346 pvalue->m.capacityPresent ||
6347 pvalue->m.circuitInfoPresent ||
6348 pvalue->m.desiredProtocolsPresent ||
6349 pvalue->m.neededFeaturesPresent ||
6350 pvalue->m.desiredFeaturesPresent ||
6351 pvalue->m.supportedFeaturesPresent ||
6352 pvalue->m.parallelH245ControlPresent ||
6353 pvalue->m.additionalSourceAddressesPresent ||
6354 pvalue->m.hopCountPresent);
6355
6356 encodeBit (pctxt, extbit);
6357
6358 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
6359
6360 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sourceAddressPresent);
6361
6362 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationAddressPresent);
6363
6364 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destCallSignalAddressPresent);
6365
6366 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
6367
6368 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCRVPresent);
6369
6370 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callServicesPresent);
6371
6372 /* encode protocolIdentifier */
6373
6374 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
6375 if (stat != ASN_OK) return stat;
6376
6377 /* encode h245Address */
6378
6379 if (pvalue->m.h245AddressPresent) {
6380 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->h245Address);
6381 if (stat != ASN_OK) return stat;
6382 }
6383
6384 /* encode sourceAddress */
6385
6386 if (pvalue->m.sourceAddressPresent) {
6387 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->sourceAddress);
6388 if (stat != ASN_OK) return stat;
6389 }
6390
6391 /* encode sourceInfo */
6392
6393 stat = asn1PE_H225EndpointType (pctxt, &pvalue->sourceInfo);
6394 if (stat != ASN_OK) return stat;
6395
6396 /* encode destinationAddress */
6397
6398 if (pvalue->m.destinationAddressPresent) {
6399 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationAddress);
6400 if (stat != ASN_OK) return stat;
6401 }
6402
6403 /* encode destCallSignalAddress */
6404
6405 if (pvalue->m.destCallSignalAddressPresent) {
6406 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
6407 if (stat != ASN_OK) return stat;
6408 }
6409
6410 /* encode destExtraCallInfo */
6411
6412 if (pvalue->m.destExtraCallInfoPresent) {
6413 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
6414 if (stat != ASN_OK) return stat;
6415 }
6416
6417 /* encode destExtraCRV */
6418
6419 if (pvalue->m.destExtraCRVPresent) {
6420 stat = asn1PE_H225_SeqOfH225CallReferenceValue (pctxt, &pvalue->destExtraCRV);
6421 if (stat != ASN_OK) return stat;
6422 }
6423
6424 /* encode activeMC */
6425
6426 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->activeMC);
6427 if (stat != ASN_OK) return stat;
6428
6429 /* encode conferenceID */
6430
6431 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
6432 if (stat != ASN_OK) return stat;
6433
6434 /* encode conferenceGoal */
6435
6436 stat = asn1PE_H225Setup_UUIE_conferenceGoal (pctxt, &pvalue->conferenceGoal);
6437 if (stat != ASN_OK) return stat;
6438
6439 /* encode callServices */
6440
6441 if (pvalue->m.callServicesPresent) {
6442 stat = asn1PE_H225QseriesOptions (pctxt, &pvalue->callServices);
6443 if (stat != ASN_OK) return stat;
6444 }
6445
6446 /* encode callType */
6447
6448 stat = asn1PE_H225CallType (pctxt, &pvalue->callType);
6449 if (stat != ASN_OK) return stat;
6450
6451 if (extbit) {
6452
6453 /* encode extension optional bits length */
6454
6455 stat = encodeSmallNonNegWholeNumber (pctxt, 26);
6456 if (stat != ASN_OK) return stat;
6457
6458 /* encode optional bits */
6459
6460 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sourceCallSignalAddressPresent);
6461 encodeBit (pctxt, (ASN1BOOL)pvalue->m.remoteExtensionAddressPresent);
6462 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
6463 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityCapabilityPresent);
6464 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
6465 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
6466 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
6467 encodeBit (pctxt, (ASN1BOOL)pvalue->m.mediaWaitForConnectPresent);
6468 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canOverlapSendPresent);
6469 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointIdentifierPresent);
6470 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
6471 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
6472 encodeBit (pctxt, (ASN1BOOL)pvalue->m.connectionParametersPresent);
6473 encodeBit (pctxt, (ASN1BOOL)pvalue->m.languagePresent);
6474 encodeBit (pctxt, (ASN1BOOL)pvalue->m.presentationIndicatorPresent);
6475 encodeBit (pctxt, (ASN1BOOL)pvalue->m.screeningIndicatorPresent);
6476 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
6477 encodeBit (pctxt, (ASN1BOOL)pvalue->m.symmetricOperationRequiredPresent);
6478 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
6479 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
6480 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredProtocolsPresent);
6481 encodeBit (pctxt, (ASN1BOOL)pvalue->m.neededFeaturesPresent);
6482 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredFeaturesPresent);
6483 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedFeaturesPresent);
6484 encodeBit (pctxt, (ASN1BOOL)pvalue->m.parallelH245ControlPresent);
6485 encodeBit (pctxt, (ASN1BOOL)pvalue->m.additionalSourceAddressesPresent);
6486 encodeBit (pctxt, (ASN1BOOL)pvalue->m.hopCountPresent);
6487 /* encode extension elements */
6488
6489 if (pvalue->m.sourceCallSignalAddressPresent) {
6490 initContext (&lctxt);
6491 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6492 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6493
6494 stat = asn1PE_H225TransportAddress (&lctxt, &pvalue->sourceCallSignalAddress);
6495 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6496
6497 stat = encodeByteAlign (&lctxt);
6498 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6499
6500 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6501
6502 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6503 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6504
6505 freeContext (&lctxt);
6506 }
6507
6508 if (pvalue->m.remoteExtensionAddressPresent) {
6509 initContext (&lctxt);
6510 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6511 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6512
6513 stat = asn1PE_H225AliasAddress (&lctxt, &pvalue->remoteExtensionAddress);
6514 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6515
6516 stat = encodeByteAlign (&lctxt);
6517 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6518
6519 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6520
6521 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6522 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6523
6524 freeContext (&lctxt);
6525 }
6526
6527 if (pvalue->m.callIdentifierPresent) {
6528 initContext (&lctxt);
6529 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6530 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6531
6532 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
6533 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6534
6535 stat = encodeByteAlign (&lctxt);
6536 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6537
6538 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6539
6540 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6541 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6542
6543 freeContext (&lctxt);
6544 }
6545
6546 if (pvalue->m.h245SecurityCapabilityPresent) {
6547 initContext (&lctxt);
6548 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6549 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6550
6551 stat = asn1PE_H225_SeqOfH225H245Security (&lctxt, &pvalue->h245SecurityCapability);
6552 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6553
6554 stat = encodeByteAlign (&lctxt);
6555 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6556
6557 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6558
6559 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6560 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6561
6562 freeContext (&lctxt);
6563 }
6564
6565 if (pvalue->m.tokensPresent) {
6566 initContext (&lctxt);
6567 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6568 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6569
6570 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
6571 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6572
6573 stat = encodeByteAlign (&lctxt);
6574 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6575
6576 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6577
6578 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6579 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6580
6581 freeContext (&lctxt);
6582 }
6583
6584 if (pvalue->m.cryptoTokensPresent) {
6585 initContext (&lctxt);
6586 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6587 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6588
6589 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
6590 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6591
6592 stat = encodeByteAlign (&lctxt);
6593 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6594
6595 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6596
6597 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6598 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6599
6600 freeContext (&lctxt);
6601 }
6602
6603 if (pvalue->m.fastStartPresent) {
6604 initContext (&lctxt);
6605 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6606 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6607
6608 stat = asn1PE_H225Setup_UUIE_fastStart (&lctxt, &pvalue->fastStart);
6609 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6610
6611 stat = encodeByteAlign (&lctxt);
6612 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6613
6614 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6615
6616 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6617 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6618
6619 freeContext (&lctxt);
6620 }
6621
6622 if (pvalue->m.mediaWaitForConnectPresent) {
6623 initContext (&lctxt);
6624 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6625 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6626
6627 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->mediaWaitForConnect);
6628 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6629
6630 stat = encodeByteAlign (&lctxt);
6631 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6632
6633 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6634
6635 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6636 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6637
6638 freeContext (&lctxt);
6639 }
6640
6641 if (pvalue->m.canOverlapSendPresent) {
6642 initContext (&lctxt);
6643 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6644 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6645
6646 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->canOverlapSend);
6647 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6648
6649 stat = encodeByteAlign (&lctxt);
6650 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6651
6652 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6653
6654 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6655 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6656
6657 freeContext (&lctxt);
6658 }
6659
6660 if (pvalue->m.endpointIdentifierPresent) {
6661 initContext (&lctxt);
6662 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6663 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6664
6665 stat = asn1PE_H225EndpointIdentifier (&lctxt, pvalue->endpointIdentifier);
6666 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6667
6668 stat = encodeByteAlign (&lctxt);
6669 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6670
6671 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6672
6673 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6674 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6675
6676 freeContext (&lctxt);
6677 }
6678
6679 if (pvalue->m.multipleCallsPresent) {
6680 initContext (&lctxt);
6681 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6682 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6683
6684 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
6685 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6686
6687 stat = encodeByteAlign (&lctxt);
6688 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6689
6690 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6691
6692 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6693 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6694
6695 freeContext (&lctxt);
6696 }
6697
6698 if (pvalue->m.maintainConnectionPresent) {
6699 initContext (&lctxt);
6700 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6701 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6702
6703 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
6704 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6705
6706 stat = encodeByteAlign (&lctxt);
6707 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6708
6709 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6710
6711 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6712 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6713
6714 freeContext (&lctxt);
6715 }
6716
6717 if (pvalue->m.connectionParametersPresent) {
6718 initContext (&lctxt);
6719 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6720 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6721
6722 stat = asn1PE_H225Setup_UUIE_connectionParameters (&lctxt, &pvalue->connectionParameters);
6723 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6724
6725 stat = encodeByteAlign (&lctxt);
6726 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6727
6728 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6729
6730 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6731 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6732
6733 freeContext (&lctxt);
6734 }
6735
6736 if (pvalue->m.languagePresent) {
6737 initContext (&lctxt);
6738 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6739 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6740
6741 stat = asn1PE_H225Setup_UUIE_language (&lctxt, &pvalue->language);
6742 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6743
6744 stat = encodeByteAlign (&lctxt);
6745 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6746
6747 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6748
6749 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6750 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6751
6752 freeContext (&lctxt);
6753 }
6754
6755 if (pvalue->m.presentationIndicatorPresent) {
6756 initContext (&lctxt);
6757 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6758 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6759
6760 stat = asn1PE_H225PresentationIndicator (&lctxt, &pvalue->presentationIndicator);
6761 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6762
6763 stat = encodeByteAlign (&lctxt);
6764 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6765
6766 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6767
6768 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6769 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6770
6771 freeContext (&lctxt);
6772 }
6773
6774 if (pvalue->m.screeningIndicatorPresent) {
6775 initContext (&lctxt);
6776 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6777 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6778
6779 stat = asn1PE_H225ScreeningIndicator (&lctxt, pvalue->screeningIndicator);
6780 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6781
6782 stat = encodeByteAlign (&lctxt);
6783 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6784
6785 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6786
6787 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6788 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6789
6790 freeContext (&lctxt);
6791 }
6792
6793 if (pvalue->m.serviceControlPresent) {
6794 initContext (&lctxt);
6795 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6796 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6797
6798 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
6799 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6800
6801 stat = encodeByteAlign (&lctxt);
6802 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6803
6804 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6805
6806 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6807 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6808
6809 freeContext (&lctxt);
6810 }
6811
6812 if (pvalue->m.symmetricOperationRequiredPresent) {
6813 initContext (&lctxt);
6814 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6815 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6816
6817 /* NULL */
6818
6819 stat = encodeByteAlign (&lctxt);
6820 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6821
6822 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6823
6824 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6825 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6826
6827 freeContext (&lctxt);
6828 }
6829
6830 if (pvalue->m.capacityPresent) {
6831 initContext (&lctxt);
6832 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6833 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6834
6835 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
6836 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6837
6838 stat = encodeByteAlign (&lctxt);
6839 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6840
6841 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6842
6843 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6844 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6845
6846 freeContext (&lctxt);
6847 }
6848
6849 if (pvalue->m.circuitInfoPresent) {
6850 initContext (&lctxt);
6851 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6852 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6853
6854 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
6855 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6856
6857 stat = encodeByteAlign (&lctxt);
6858 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6859
6860 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6861
6862 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6863 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6864
6865 freeContext (&lctxt);
6866 }
6867
6868 if (pvalue->m.desiredProtocolsPresent) {
6869 initContext (&lctxt);
6870 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6871 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6872
6873 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->desiredProtocols);
6874 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6875
6876 stat = encodeByteAlign (&lctxt);
6877 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6878
6879 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6880
6881 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6882 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6883
6884 freeContext (&lctxt);
6885 }
6886
6887 if (pvalue->m.neededFeaturesPresent) {
6888 initContext (&lctxt);
6889 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6890 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6891
6892 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (&lctxt, &pvalue->neededFeatures);
6893 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6894
6895 stat = encodeByteAlign (&lctxt);
6896 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6897
6898 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6899
6900 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6901 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6902
6903 freeContext (&lctxt);
6904 }
6905
6906 if (pvalue->m.desiredFeaturesPresent) {
6907 initContext (&lctxt);
6908 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6909 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6910
6911 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (&lctxt, &pvalue->desiredFeatures);
6912 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6913
6914 stat = encodeByteAlign (&lctxt);
6915 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6916
6917 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6918
6919 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6920 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6921
6922 freeContext (&lctxt);
6923 }
6924
6925 if (pvalue->m.supportedFeaturesPresent) {
6926 initContext (&lctxt);
6927 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6928 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6929
6930 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (&lctxt, &pvalue->supportedFeatures);
6931 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6932
6933 stat = encodeByteAlign (&lctxt);
6934 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6935
6936 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6937
6938 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6939 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6940
6941 freeContext (&lctxt);
6942 }
6943
6944 if (pvalue->m.parallelH245ControlPresent) {
6945 initContext (&lctxt);
6946 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6947 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6948
6949 stat = asn1PE_H225Setup_UUIE_parallelH245Control (&lctxt, &pvalue->parallelH245Control);
6950 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6951
6952 stat = encodeByteAlign (&lctxt);
6953 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6954
6955 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6956
6957 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6958 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6959
6960 freeContext (&lctxt);
6961 }
6962
6963 if (pvalue->m.additionalSourceAddressesPresent) {
6964 initContext (&lctxt);
6965 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6966 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6967
6968 stat = asn1PE_H225_SeqOfH225ExtendedAliasAddress (&lctxt, &pvalue->additionalSourceAddresses);
6969 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6970
6971 stat = encodeByteAlign (&lctxt);
6972 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6973
6974 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6975
6976 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6977 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6978
6979 freeContext (&lctxt);
6980 }
6981
6982 if (pvalue->m.hopCountPresent) {
6983 initContext (&lctxt);
6984 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
6985 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6986
6987 stat = encodeConsUnsigned (&lctxt, pvalue->hopCount, 1U, 31U);
6988 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6989
6990 stat = encodeByteAlign (&lctxt);
6991 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6992
6993 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
6994
6995 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
6996 if (stat != ASN_OK) return freeContext (&lctxt), stat;
6997
6998 freeContext (&lctxt);
6999 }
7000
7001 }
7002
7003 return (stat);
7004 }
7005
7006 /**************************************************************/
7007 /* */
7008 /* CallProceeding_UUIE_fastStart */
7009 /* */
7010 /**************************************************************/
7011
7012 EXTERN int asn1PE_H225CallProceeding_UUIE_fastStart (OOCTXT* pctxt, H225CallProceeding_UUIE_fastStart* pvalue)
7013 {
7014 int stat = ASN_OK;
7015 ASN1UINT xx1;
7016
7017 /* encode length determinant */
7018
7019 stat = encodeLength (pctxt, pvalue->n);
7020 if (stat < 0) return stat;
7021
7022 /* encode elements */
7023
7024 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7025 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
7026 if (stat != ASN_OK) return stat;
7027 }
7028
7029 return (stat);
7030 }
7031
7032 /**************************************************************/
7033 /* */
7034 /* FeatureSet */
7035 /* */
7036 /**************************************************************/
7037
7038 EXTERN int asn1PE_H225FeatureSet (OOCTXT* pctxt, H225FeatureSet* pvalue)
7039 {
7040 int stat = ASN_OK;
7041 ASN1BOOL extbit;
7042
7043 /* extension bit */
7044
7045 extbit = 0;
7046
7047 encodeBit (pctxt, extbit);
7048
7049 encodeBit (pctxt, (ASN1BOOL)pvalue->m.neededFeaturesPresent);
7050
7051 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredFeaturesPresent);
7052
7053 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedFeaturesPresent);
7054
7055 /* encode replacementFeatureSet */
7056
7057 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->replacementFeatureSet);
7058 if (stat != ASN_OK) return stat;
7059
7060 /* encode neededFeatures */
7061
7062 if (pvalue->m.neededFeaturesPresent) {
7063 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->neededFeatures);
7064 if (stat != ASN_OK) return stat;
7065 }
7066
7067 /* encode desiredFeatures */
7068
7069 if (pvalue->m.desiredFeaturesPresent) {
7070 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->desiredFeatures);
7071 if (stat != ASN_OK) return stat;
7072 }
7073
7074 /* encode supportedFeatures */
7075
7076 if (pvalue->m.supportedFeaturesPresent) {
7077 stat = asn1PE_H225_SeqOfH225FeatureDescriptor (pctxt, &pvalue->supportedFeatures);
7078 if (stat != ASN_OK) return stat;
7079 }
7080
7081 return (stat);
7082 }
7083
7084 /**************************************************************/
7085 /* */
7086 /* CallProceeding_UUIE */
7087 /* */
7088 /**************************************************************/
7089
7090 EXTERN int asn1PE_H225CallProceeding_UUIE (OOCTXT* pctxt, H225CallProceeding_UUIE* pvalue)
7091 {
7092 int stat = ASN_OK;
7093 ASN1BOOL extbit;
7094 ASN1OpenType openType;
7095 OOCTXT lctxt;
7096
7097 /* extension bit */
7098
7099 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
7100 pvalue->m.h245SecurityModePresent ||
7101 pvalue->m.tokensPresent ||
7102 pvalue->m.cryptoTokensPresent ||
7103 pvalue->m.fastStartPresent ||
7104 pvalue->m.multipleCallsPresent ||
7105 pvalue->m.maintainConnectionPresent ||
7106 pvalue->m.fastConnectRefusedPresent ||
7107 pvalue->m.featureSetPresent);
7108
7109 encodeBit (pctxt, extbit);
7110
7111 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
7112
7113 /* encode protocolIdentifier */
7114
7115 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
7116 if (stat != ASN_OK) return stat;
7117
7118 /* encode destinationInfo */
7119
7120 stat = asn1PE_H225EndpointType (pctxt, &pvalue->destinationInfo);
7121 if (stat != ASN_OK) return stat;
7122
7123 /* encode h245Address */
7124
7125 if (pvalue->m.h245AddressPresent) {
7126 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->h245Address);
7127 if (stat != ASN_OK) return stat;
7128 }
7129
7130 if (extbit) {
7131
7132 /* encode extension optional bits length */
7133
7134 stat = encodeSmallNonNegWholeNumber (pctxt, 8);
7135 if (stat != ASN_OK) return stat;
7136
7137 /* encode optional bits */
7138
7139 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
7140 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityModePresent);
7141 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
7142 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
7143 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
7144 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
7145 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
7146 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
7147 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
7148 /* encode extension elements */
7149
7150 if (pvalue->m.callIdentifierPresent) {
7151 initContext (&lctxt);
7152 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7153 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7154
7155 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
7156 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7157
7158 stat = encodeByteAlign (&lctxt);
7159 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7160
7161 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7162
7163 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7164 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7165
7166 freeContext (&lctxt);
7167 }
7168
7169 if (pvalue->m.h245SecurityModePresent) {
7170 initContext (&lctxt);
7171 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7172 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7173
7174 stat = asn1PE_H225H245Security (&lctxt, &pvalue->h245SecurityMode);
7175 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7176
7177 stat = encodeByteAlign (&lctxt);
7178 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7179
7180 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7181
7182 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7183 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7184
7185 freeContext (&lctxt);
7186 }
7187
7188 if (pvalue->m.tokensPresent) {
7189 initContext (&lctxt);
7190 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7191 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7192
7193 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
7194 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7195
7196 stat = encodeByteAlign (&lctxt);
7197 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7198
7199 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7200
7201 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7202 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7203
7204 freeContext (&lctxt);
7205 }
7206
7207 if (pvalue->m.cryptoTokensPresent) {
7208 initContext (&lctxt);
7209 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7210 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7211
7212 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
7213 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7214
7215 stat = encodeByteAlign (&lctxt);
7216 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7217
7218 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7219
7220 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7221 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7222
7223 freeContext (&lctxt);
7224 }
7225
7226 if (pvalue->m.fastStartPresent) {
7227 initContext (&lctxt);
7228 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7229 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7230
7231 stat = asn1PE_H225CallProceeding_UUIE_fastStart (&lctxt, &pvalue->fastStart);
7232 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7233
7234 stat = encodeByteAlign (&lctxt);
7235 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7236
7237 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7238
7239 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7240 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7241
7242 freeContext (&lctxt);
7243 }
7244
7245 if (pvalue->m.multipleCallsPresent) {
7246 initContext (&lctxt);
7247 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7248 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7249
7250 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
7251 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7252
7253 stat = encodeByteAlign (&lctxt);
7254 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7255
7256 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7257
7258 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7259 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7260
7261 freeContext (&lctxt);
7262 }
7263
7264 if (pvalue->m.maintainConnectionPresent) {
7265 initContext (&lctxt);
7266 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7267 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7268
7269 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
7270 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7271
7272 stat = encodeByteAlign (&lctxt);
7273 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7274
7275 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7276
7277 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7278 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7279
7280 freeContext (&lctxt);
7281 }
7282
7283 if (pvalue->m.fastConnectRefusedPresent) {
7284 initContext (&lctxt);
7285 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7286 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7287
7288 /* NULL */
7289
7290 stat = encodeByteAlign (&lctxt);
7291 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7292
7293 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7294
7295 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7296 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7297
7298 freeContext (&lctxt);
7299 }
7300
7301 if (pvalue->m.featureSetPresent) {
7302 initContext (&lctxt);
7303 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7304 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7305
7306 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
7307 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7308
7309 stat = encodeByteAlign (&lctxt);
7310 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7311
7312 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7313
7314 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7315 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7316
7317 freeContext (&lctxt);
7318 }
7319
7320 }
7321
7322 return (stat);
7323 }
7324
7325 /**************************************************************/
7326 /* */
7327 /* Connect_UUIE_fastStart */
7328 /* */
7329 /**************************************************************/
7330
7331 EXTERN int asn1PE_H225Connect_UUIE_fastStart (OOCTXT* pctxt, H225Connect_UUIE_fastStart* pvalue)
7332 {
7333 int stat = ASN_OK;
7334 ASN1UINT xx1;
7335
7336 /* encode length determinant */
7337
7338 stat = encodeLength (pctxt, pvalue->n);
7339 if (stat < 0) return stat;
7340
7341 /* encode elements */
7342
7343 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7344 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
7345 if (stat != ASN_OK) return stat;
7346 }
7347
7348 return (stat);
7349 }
7350
7351 /**************************************************************/
7352 /* */
7353 /* Connect_UUIE_language */
7354 /* */
7355 /**************************************************************/
7356
7357 EXTERN int asn1PE_H225Connect_UUIE_language (OOCTXT* pctxt, H225Connect_UUIE_language* pvalue)
7358 {
7359 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
7360 int stat = ASN_OK;
7361 ASN1UINT xx1;
7362
7363 /* encode length determinant */
7364
7365 stat = encodeLength (pctxt, pvalue->n);
7366 if (stat < 0) return stat;
7367
7368 /* encode elements */
7369
7370 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7371 addSizeConstraint (pctxt, &element_lsize1);
7372
7373 stat = encodeConstrainedStringEx (pctxt, pvalue->elem[xx1], 0, 8, 7, 7);
7374 if (stat != ASN_OK) return stat;
7375 }
7376
7377 return (stat);
7378 }
7379
7380 /**************************************************************/
7381 /* */
7382 /* Connect_UUIE */
7383 /* */
7384 /**************************************************************/
7385
7386 EXTERN int asn1PE_H225Connect_UUIE (OOCTXT* pctxt, H225Connect_UUIE* pvalue)
7387 {
7388 int stat = ASN_OK;
7389 ASN1BOOL extbit;
7390 ASN1OpenType openType;
7391 OOCTXT lctxt;
7392
7393 /* extension bit */
7394
7395 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
7396 pvalue->m.h245SecurityModePresent ||
7397 pvalue->m.tokensPresent ||
7398 pvalue->m.cryptoTokensPresent ||
7399 pvalue->m.fastStartPresent ||
7400 pvalue->m.multipleCallsPresent ||
7401 pvalue->m.maintainConnectionPresent ||
7402 pvalue->m.languagePresent ||
7403 pvalue->m.connectedAddressPresent ||
7404 pvalue->m.presentationIndicatorPresent ||
7405 pvalue->m.screeningIndicatorPresent ||
7406 pvalue->m.fastConnectRefusedPresent ||
7407 pvalue->m.serviceControlPresent ||
7408 pvalue->m.capacityPresent ||
7409 pvalue->m.featureSetPresent);
7410
7411 encodeBit (pctxt, extbit);
7412
7413 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
7414
7415 /* encode protocolIdentifier */
7416
7417 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
7418 if (stat != ASN_OK) return stat;
7419
7420 /* encode h245Address */
7421
7422 if (pvalue->m.h245AddressPresent) {
7423 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->h245Address);
7424 if (stat != ASN_OK) return stat;
7425 }
7426
7427 /* encode destinationInfo */
7428
7429 stat = asn1PE_H225EndpointType (pctxt, &pvalue->destinationInfo);
7430 if (stat != ASN_OK) return stat;
7431
7432 /* encode conferenceID */
7433
7434 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
7435 if (stat != ASN_OK) return stat;
7436
7437 if (extbit) {
7438
7439 /* encode extension optional bits length */
7440
7441 stat = encodeSmallNonNegWholeNumber (pctxt, 14);
7442 if (stat != ASN_OK) return stat;
7443
7444 /* encode optional bits */
7445
7446 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
7447 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityModePresent);
7448 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
7449 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
7450 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
7451 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
7452 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
7453 encodeBit (pctxt, (ASN1BOOL)pvalue->m.languagePresent);
7454 encodeBit (pctxt, (ASN1BOOL)pvalue->m.connectedAddressPresent);
7455 encodeBit (pctxt, (ASN1BOOL)pvalue->m.presentationIndicatorPresent);
7456 encodeBit (pctxt, (ASN1BOOL)pvalue->m.screeningIndicatorPresent);
7457 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
7458 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
7459 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
7460 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
7461 /* encode extension elements */
7462
7463 if (pvalue->m.callIdentifierPresent) {
7464 initContext (&lctxt);
7465 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7466 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7467
7468 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
7469 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7470
7471 stat = encodeByteAlign (&lctxt);
7472 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7473
7474 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7475
7476 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7477 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7478
7479 freeContext (&lctxt);
7480 }
7481
7482 if (pvalue->m.h245SecurityModePresent) {
7483 initContext (&lctxt);
7484 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7485 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7486
7487 stat = asn1PE_H225H245Security (&lctxt, &pvalue->h245SecurityMode);
7488 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7489
7490 stat = encodeByteAlign (&lctxt);
7491 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7492
7493 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7494
7495 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7496 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7497
7498 freeContext (&lctxt);
7499 }
7500
7501 if (pvalue->m.tokensPresent) {
7502 initContext (&lctxt);
7503 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7504 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7505
7506 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
7507 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7508
7509 stat = encodeByteAlign (&lctxt);
7510 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7511
7512 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7513
7514 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7515 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7516
7517 freeContext (&lctxt);
7518 }
7519
7520 if (pvalue->m.cryptoTokensPresent) {
7521 initContext (&lctxt);
7522 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7523 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7524
7525 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
7526 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7527
7528 stat = encodeByteAlign (&lctxt);
7529 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7530
7531 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7532
7533 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7534 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7535
7536 freeContext (&lctxt);
7537 }
7538
7539 if (pvalue->m.fastStartPresent) {
7540 initContext (&lctxt);
7541 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7542 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7543
7544 stat = asn1PE_H225Connect_UUIE_fastStart (&lctxt, &pvalue->fastStart);
7545 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7546
7547 stat = encodeByteAlign (&lctxt);
7548 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7549
7550 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7551
7552 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7553 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7554
7555 freeContext (&lctxt);
7556 }
7557
7558 if (pvalue->m.multipleCallsPresent) {
7559 initContext (&lctxt);
7560 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7561 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7562
7563 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
7564 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7565
7566 stat = encodeByteAlign (&lctxt);
7567 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7568
7569 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7570
7571 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7572 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7573
7574 freeContext (&lctxt);
7575 }
7576
7577 if (pvalue->m.maintainConnectionPresent) {
7578 initContext (&lctxt);
7579 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7580 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7581
7582 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
7583 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7584
7585 stat = encodeByteAlign (&lctxt);
7586 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7587
7588 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7589
7590 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7591 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7592
7593 freeContext (&lctxt);
7594 }
7595
7596 if (pvalue->m.languagePresent) {
7597 initContext (&lctxt);
7598 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7599 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7600
7601 stat = asn1PE_H225Connect_UUIE_language (&lctxt, &pvalue->language);
7602 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7603
7604 stat = encodeByteAlign (&lctxt);
7605 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7606
7607 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7608
7609 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7610 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7611
7612 freeContext (&lctxt);
7613 }
7614
7615 if (pvalue->m.connectedAddressPresent) {
7616 initContext (&lctxt);
7617 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7618 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7619
7620 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->connectedAddress);
7621 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7622
7623 stat = encodeByteAlign (&lctxt);
7624 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7625
7626 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7627
7628 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7629 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7630
7631 freeContext (&lctxt);
7632 }
7633
7634 if (pvalue->m.presentationIndicatorPresent) {
7635 initContext (&lctxt);
7636 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7637 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7638
7639 stat = asn1PE_H225PresentationIndicator (&lctxt, &pvalue->presentationIndicator);
7640 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7641
7642 stat = encodeByteAlign (&lctxt);
7643 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7644
7645 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7646
7647 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7648 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7649
7650 freeContext (&lctxt);
7651 }
7652
7653 if (pvalue->m.screeningIndicatorPresent) {
7654 initContext (&lctxt);
7655 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7656 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7657
7658 stat = asn1PE_H225ScreeningIndicator (&lctxt, pvalue->screeningIndicator);
7659 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7660
7661 stat = encodeByteAlign (&lctxt);
7662 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7663
7664 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7665
7666 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7667 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7668
7669 freeContext (&lctxt);
7670 }
7671
7672 if (pvalue->m.fastConnectRefusedPresent) {
7673 initContext (&lctxt);
7674 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7675 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7676
7677 /* NULL */
7678
7679 stat = encodeByteAlign (&lctxt);
7680 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7681
7682 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7683
7684 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7685 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7686
7687 freeContext (&lctxt);
7688 }
7689
7690 if (pvalue->m.serviceControlPresent) {
7691 initContext (&lctxt);
7692 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7693 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7694
7695 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
7696 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7697
7698 stat = encodeByteAlign (&lctxt);
7699 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7700
7701 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7702
7703 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7704 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7705
7706 freeContext (&lctxt);
7707 }
7708
7709 if (pvalue->m.capacityPresent) {
7710 initContext (&lctxt);
7711 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7712 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7713
7714 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
7715 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7716
7717 stat = encodeByteAlign (&lctxt);
7718 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7719
7720 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7721
7722 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7723 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7724
7725 freeContext (&lctxt);
7726 }
7727
7728 if (pvalue->m.featureSetPresent) {
7729 initContext (&lctxt);
7730 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7731 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7732
7733 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
7734 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7735
7736 stat = encodeByteAlign (&lctxt);
7737 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7738
7739 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7740
7741 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7742 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7743
7744 freeContext (&lctxt);
7745 }
7746
7747 }
7748
7749 return (stat);
7750 }
7751
7752 /**************************************************************/
7753 /* */
7754 /* Alerting_UUIE_fastStart */
7755 /* */
7756 /**************************************************************/
7757
7758 EXTERN int asn1PE_H225Alerting_UUIE_fastStart (OOCTXT* pctxt, H225Alerting_UUIE_fastStart* pvalue)
7759 {
7760 int stat = ASN_OK;
7761 ASN1UINT xx1;
7762
7763 /* encode length determinant */
7764
7765 stat = encodeLength (pctxt, pvalue->n);
7766 if (stat < 0) return stat;
7767
7768 /* encode elements */
7769
7770 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
7771 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
7772 if (stat != ASN_OK) return stat;
7773 }
7774
7775 return (stat);
7776 }
7777
7778 /**************************************************************/
7779 /* */
7780 /* Alerting_UUIE */
7781 /* */
7782 /**************************************************************/
7783
7784 EXTERN int asn1PE_H225Alerting_UUIE (OOCTXT* pctxt, H225Alerting_UUIE* pvalue)
7785 {
7786 int stat = ASN_OK;
7787 ASN1BOOL extbit;
7788 ASN1OpenType openType;
7789 OOCTXT lctxt;
7790
7791 /* extension bit */
7792
7793 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
7794 pvalue->m.h245SecurityModePresent ||
7795 pvalue->m.tokensPresent ||
7796 pvalue->m.cryptoTokensPresent ||
7797 pvalue->m.fastStartPresent ||
7798 pvalue->m.multipleCallsPresent ||
7799 pvalue->m.maintainConnectionPresent ||
7800 pvalue->m.alertingAddressPresent ||
7801 pvalue->m.presentationIndicatorPresent ||
7802 pvalue->m.screeningIndicatorPresent ||
7803 pvalue->m.fastConnectRefusedPresent ||
7804 pvalue->m.serviceControlPresent ||
7805 pvalue->m.capacityPresent ||
7806 pvalue->m.featureSetPresent);
7807
7808 encodeBit (pctxt, extbit);
7809
7810 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
7811
7812 /* encode protocolIdentifier */
7813
7814 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
7815 if (stat != ASN_OK) return stat;
7816
7817 /* encode destinationInfo */
7818
7819 stat = asn1PE_H225EndpointType (pctxt, &pvalue->destinationInfo);
7820 if (stat != ASN_OK) return stat;
7821
7822 /* encode h245Address */
7823
7824 if (pvalue->m.h245AddressPresent) {
7825 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->h245Address);
7826 if (stat != ASN_OK) return stat;
7827 }
7828
7829 if (extbit) {
7830
7831 /* encode extension optional bits length */
7832
7833 stat = encodeSmallNonNegWholeNumber (pctxt, 13);
7834 if (stat != ASN_OK) return stat;
7835
7836 /* encode optional bits */
7837
7838 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
7839 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityModePresent);
7840 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
7841 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
7842 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
7843 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
7844 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
7845 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alertingAddressPresent);
7846 encodeBit (pctxt, (ASN1BOOL)pvalue->m.presentationIndicatorPresent);
7847 encodeBit (pctxt, (ASN1BOOL)pvalue->m.screeningIndicatorPresent);
7848 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
7849 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
7850 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
7851 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
7852 /* encode extension elements */
7853
7854 if (pvalue->m.callIdentifierPresent) {
7855 initContext (&lctxt);
7856 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7857 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7858
7859 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
7860 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7861
7862 stat = encodeByteAlign (&lctxt);
7863 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7864
7865 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7866
7867 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7868 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7869
7870 freeContext (&lctxt);
7871 }
7872
7873 if (pvalue->m.h245SecurityModePresent) {
7874 initContext (&lctxt);
7875 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7876 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7877
7878 stat = asn1PE_H225H245Security (&lctxt, &pvalue->h245SecurityMode);
7879 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7880
7881 stat = encodeByteAlign (&lctxt);
7882 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7883
7884 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7885
7886 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7887 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7888
7889 freeContext (&lctxt);
7890 }
7891
7892 if (pvalue->m.tokensPresent) {
7893 initContext (&lctxt);
7894 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7895 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7896
7897 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
7898 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7899
7900 stat = encodeByteAlign (&lctxt);
7901 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7902
7903 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7904
7905 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7906 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7907
7908 freeContext (&lctxt);
7909 }
7910
7911 if (pvalue->m.cryptoTokensPresent) {
7912 initContext (&lctxt);
7913 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7914 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7915
7916 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
7917 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7918
7919 stat = encodeByteAlign (&lctxt);
7920 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7921
7922 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7923
7924 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7925 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7926
7927 freeContext (&lctxt);
7928 }
7929
7930 if (pvalue->m.fastStartPresent) {
7931 initContext (&lctxt);
7932 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7933 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7934
7935 stat = asn1PE_H225Alerting_UUIE_fastStart (&lctxt, &pvalue->fastStart);
7936 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7937
7938 stat = encodeByteAlign (&lctxt);
7939 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7940
7941 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7942
7943 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7944 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7945
7946 freeContext (&lctxt);
7947 }
7948
7949 if (pvalue->m.multipleCallsPresent) {
7950 initContext (&lctxt);
7951 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7952 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7953
7954 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
7955 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7956
7957 stat = encodeByteAlign (&lctxt);
7958 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7959
7960 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7961
7962 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7963 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7964
7965 freeContext (&lctxt);
7966 }
7967
7968 if (pvalue->m.maintainConnectionPresent) {
7969 initContext (&lctxt);
7970 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7971 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7972
7973 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
7974 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7975
7976 stat = encodeByteAlign (&lctxt);
7977 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7978
7979 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7980
7981 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
7982 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7983
7984 freeContext (&lctxt);
7985 }
7986
7987 if (pvalue->m.alertingAddressPresent) {
7988 initContext (&lctxt);
7989 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
7990 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7991
7992 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->alertingAddress);
7993 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7994
7995 stat = encodeByteAlign (&lctxt);
7996 if (stat != ASN_OK) return freeContext (&lctxt), stat;
7997
7998 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
7999
8000 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8001 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8002
8003 freeContext (&lctxt);
8004 }
8005
8006 if (pvalue->m.presentationIndicatorPresent) {
8007 initContext (&lctxt);
8008 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8009 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8010
8011 stat = asn1PE_H225PresentationIndicator (&lctxt, &pvalue->presentationIndicator);
8012 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8013
8014 stat = encodeByteAlign (&lctxt);
8015 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8016
8017 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8018
8019 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8020 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8021
8022 freeContext (&lctxt);
8023 }
8024
8025 if (pvalue->m.screeningIndicatorPresent) {
8026 initContext (&lctxt);
8027 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8028 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8029
8030 stat = asn1PE_H225ScreeningIndicator (&lctxt, pvalue->screeningIndicator);
8031 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8032
8033 stat = encodeByteAlign (&lctxt);
8034 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8035
8036 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8037
8038 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8039 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8040
8041 freeContext (&lctxt);
8042 }
8043
8044 if (pvalue->m.fastConnectRefusedPresent) {
8045 initContext (&lctxt);
8046 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8047 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8048
8049 /* NULL */
8050
8051 stat = encodeByteAlign (&lctxt);
8052 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8053
8054 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8055
8056 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8057 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8058
8059 freeContext (&lctxt);
8060 }
8061
8062 if (pvalue->m.serviceControlPresent) {
8063 initContext (&lctxt);
8064 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8065 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8066
8067 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
8068 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8069
8070 stat = encodeByteAlign (&lctxt);
8071 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8072
8073 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8074
8075 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8076 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8077
8078 freeContext (&lctxt);
8079 }
8080
8081 if (pvalue->m.capacityPresent) {
8082 initContext (&lctxt);
8083 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8084 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8085
8086 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
8087 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8088
8089 stat = encodeByteAlign (&lctxt);
8090 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8091
8092 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8093
8094 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8095 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8096
8097 freeContext (&lctxt);
8098 }
8099
8100 if (pvalue->m.featureSetPresent) {
8101 initContext (&lctxt);
8102 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8103 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8104
8105 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
8106 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8107
8108 stat = encodeByteAlign (&lctxt);
8109 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8110
8111 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8112
8113 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8114 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8115
8116 freeContext (&lctxt);
8117 }
8118
8119 }
8120
8121 return (stat);
8122 }
8123
8124 /**************************************************************/
8125 /* */
8126 /* Information_UUIE_fastStart */
8127 /* */
8128 /**************************************************************/
8129
8130 EXTERN int asn1PE_H225Information_UUIE_fastStart (OOCTXT* pctxt, H225Information_UUIE_fastStart* pvalue)
8131 {
8132 int stat = ASN_OK;
8133 ASN1UINT xx1;
8134
8135 /* encode length determinant */
8136
8137 stat = encodeLength (pctxt, pvalue->n);
8138 if (stat < 0) return stat;
8139
8140 /* encode elements */
8141
8142 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
8143 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
8144 if (stat != ASN_OK) return stat;
8145 }
8146
8147 return (stat);
8148 }
8149
8150 /**************************************************************/
8151 /* */
8152 /* Information_UUIE */
8153 /* */
8154 /**************************************************************/
8155
8156 EXTERN int asn1PE_H225Information_UUIE (OOCTXT* pctxt, H225Information_UUIE* pvalue)
8157 {
8158 int stat = ASN_OK;
8159 ASN1BOOL extbit;
8160 ASN1OpenType openType;
8161 OOCTXT lctxt;
8162
8163 /* extension bit */
8164
8165 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
8166 pvalue->m.tokensPresent ||
8167 pvalue->m.cryptoTokensPresent ||
8168 pvalue->m.fastStartPresent ||
8169 pvalue->m.fastConnectRefusedPresent ||
8170 pvalue->m.circuitInfoPresent);
8171
8172 encodeBit (pctxt, extbit);
8173
8174 /* encode protocolIdentifier */
8175
8176 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
8177 if (stat != ASN_OK) return stat;
8178
8179 if (extbit) {
8180
8181 /* encode extension optional bits length */
8182
8183 stat = encodeSmallNonNegWholeNumber (pctxt, 5);
8184 if (stat != ASN_OK) return stat;
8185
8186 /* encode optional bits */
8187
8188 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
8189 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
8190 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
8191 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
8192 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
8193 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
8194 /* encode extension elements */
8195
8196 if (pvalue->m.callIdentifierPresent) {
8197 initContext (&lctxt);
8198 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8199 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8200
8201 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
8202 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8203
8204 stat = encodeByteAlign (&lctxt);
8205 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8206
8207 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8208
8209 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8210 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8211
8212 freeContext (&lctxt);
8213 }
8214
8215 if (pvalue->m.tokensPresent) {
8216 initContext (&lctxt);
8217 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8218 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8219
8220 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
8221 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8222
8223 stat = encodeByteAlign (&lctxt);
8224 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8225
8226 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8227
8228 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8229 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8230
8231 freeContext (&lctxt);
8232 }
8233
8234 if (pvalue->m.cryptoTokensPresent) {
8235 initContext (&lctxt);
8236 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8237 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8238
8239 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
8240 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8241
8242 stat = encodeByteAlign (&lctxt);
8243 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8244
8245 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8246
8247 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8248 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8249
8250 freeContext (&lctxt);
8251 }
8252
8253 if (pvalue->m.fastStartPresent) {
8254 initContext (&lctxt);
8255 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8256 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8257
8258 stat = asn1PE_H225Information_UUIE_fastStart (&lctxt, &pvalue->fastStart);
8259 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8260
8261 stat = encodeByteAlign (&lctxt);
8262 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8263
8264 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8265
8266 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8267 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8268
8269 freeContext (&lctxt);
8270 }
8271
8272 if (pvalue->m.fastConnectRefusedPresent) {
8273 initContext (&lctxt);
8274 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8275 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8276
8277 /* NULL */
8278
8279 stat = encodeByteAlign (&lctxt);
8280 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8281
8282 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8283
8284 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8285 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8286
8287 freeContext (&lctxt);
8288 }
8289
8290 if (pvalue->m.circuitInfoPresent) {
8291 initContext (&lctxt);
8292 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8293 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8294
8295 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
8296 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8297
8298 stat = encodeByteAlign (&lctxt);
8299 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8300
8301 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8302
8303 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8304 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8305
8306 freeContext (&lctxt);
8307 }
8308
8309 }
8310
8311 return (stat);
8312 }
8313
8314 /**************************************************************/
8315 /* */
8316 /* SecurityErrors */
8317 /* */
8318 /**************************************************************/
8319
8320 EXTERN int asn1PE_H225SecurityErrors (OOCTXT* pctxt, H225SecurityErrors* pvalue)
8321 {
8322 int stat = ASN_OK;
8323 ASN1BOOL extbit;
8324
8325 /* extension bit */
8326
8327 extbit = (ASN1BOOL)(pvalue->t > 16);
8328
8329 encodeBit (pctxt, extbit);
8330
8331 if (!extbit) {
8332
8333 /* Encode choice index value */
8334
8335 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 15);
8336 if (stat != ASN_OK) return stat;
8337
8338 /* Encode root element data value */
8339
8340 switch (pvalue->t)
8341 {
8342 /* securityWrongSyncTime */
8343 case 1:
8344 /* NULL */
8345 break;
8346
8347 /* securityReplay */
8348 case 2:
8349 /* NULL */
8350 break;
8351
8352 /* securityWrongGeneralID */
8353 case 3:
8354 /* NULL */
8355 break;
8356
8357 /* securityWrongSendersID */
8358 case 4:
8359 /* NULL */
8360 break;
8361
8362 /* securityIntegrityFailed */
8363 case 5:
8364 /* NULL */
8365 break;
8366
8367 /* securityWrongOID */
8368 case 6:
8369 /* NULL */
8370 break;
8371
8372 /* securityDHmismatch */
8373 case 7:
8374 /* NULL */
8375 break;
8376
8377 /* securityCertificateExpired */
8378 case 8:
8379 /* NULL */
8380 break;
8381
8382 /* securityCertificateDateInvalid */
8383 case 9:
8384 /* NULL */
8385 break;
8386
8387 /* securityCertificateRevoked */
8388 case 10:
8389 /* NULL */
8390 break;
8391
8392 /* securityCertificateNotReadable */
8393 case 11:
8394 /* NULL */
8395 break;
8396
8397 /* securityCertificateSignatureInvalid */
8398 case 12:
8399 /* NULL */
8400 break;
8401
8402 /* securityCertificateMissing */
8403 case 13:
8404 /* NULL */
8405 break;
8406
8407 /* securityCertificateIncomplete */
8408 case 14:
8409 /* NULL */
8410 break;
8411
8412 /* securityUnsupportedCertificateAlgOID */
8413 case 15:
8414 /* NULL */
8415 break;
8416
8417 /* securityUnknownCA */
8418 case 16:
8419 /* NULL */
8420 break;
8421
8422 default:
8423 return ASN_E_INVOPT;
8424 }
8425 }
8426 else {
8427 /* Encode extension choice index value */
8428
8429 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 17);
8430 if (stat != ASN_OK) return stat;
8431
8432 /* Encode extension element data value */
8433
8434 }
8435
8436 return (stat);
8437 }
8438
8439 /**************************************************************/
8440 /* */
8441 /* ReleaseCompleteReason */
8442 /* */
8443 /**************************************************************/
8444
8445 EXTERN int asn1PE_H225ReleaseCompleteReason (OOCTXT* pctxt, H225ReleaseCompleteReason* pvalue)
8446 {
8447 int stat = ASN_OK;
8448 OOCTXT lctxt;
8449 ASN1OpenType openType;
8450 ASN1BOOL extbit;
8451
8452 /* extension bit */
8453
8454 extbit = (ASN1BOOL)(pvalue->t > 12);
8455
8456 encodeBit (pctxt, extbit);
8457
8458 if (!extbit) {
8459
8460 /* Encode choice index value */
8461
8462 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 11);
8463 if (stat != ASN_OK) return stat;
8464
8465 /* Encode root element data value */
8466
8467 switch (pvalue->t)
8468 {
8469 /* noBandwidth */
8470 case 1:
8471 /* NULL */
8472 break;
8473
8474 /* gatekeeperResources */
8475 case 2:
8476 /* NULL */
8477 break;
8478
8479 /* unreachableDestination */
8480 case 3:
8481 /* NULL */
8482 break;
8483
8484 /* destinationRejection */
8485 case 4:
8486 /* NULL */
8487 break;
8488
8489 /* invalidRevision */
8490 case 5:
8491 /* NULL */
8492 break;
8493
8494 /* noPermission */
8495 case 6:
8496 /* NULL */
8497 break;
8498
8499 /* unreachableGatekeeper */
8500 case 7:
8501 /* NULL */
8502 break;
8503
8504 /* gatewayResources */
8505 case 8:
8506 /* NULL */
8507 break;
8508
8509 /* badFormatAddress */
8510 case 9:
8511 /* NULL */
8512 break;
8513
8514 /* adaptiveBusy */
8515 case 10:
8516 /* NULL */
8517 break;
8518
8519 /* inConf */
8520 case 11:
8521 /* NULL */
8522 break;
8523
8524 /* undefinedReason */
8525 case 12:
8526 /* NULL */
8527 break;
8528
8529 default:
8530 return ASN_E_INVOPT;
8531 }
8532 }
8533 else {
8534 /* Encode extension choice index value */
8535
8536 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 13);
8537 if (stat != ASN_OK) return stat;
8538
8539 /* Encode extension element data value */
8540
8541 initContext (&lctxt);
8542 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8543 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8544
8545 switch (pvalue->t)
8546 {
8547 /* facilityCallDeflection */
8548 case 13:
8549 /* NULL */
8550 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8551 break;
8552
8553 /* securityDenied */
8554 case 14:
8555 /* NULL */
8556 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8557 break;
8558
8559 /* calledPartyNotRegistered */
8560 case 15:
8561 /* NULL */
8562 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8563 break;
8564
8565 /* callerNotRegistered */
8566 case 16:
8567 /* NULL */
8568 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8569 break;
8570
8571 /* newConnectionNeeded */
8572 case 17:
8573 /* NULL */
8574 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8575 break;
8576
8577 /* nonStandardReason */
8578 case 18:
8579 stat = asn1PE_H225NonStandardParameter (&lctxt, pvalue->u.nonStandardReason);
8580 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8581 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8582 break;
8583
8584 /* replaceWithConferenceInvite */
8585 case 19:
8586 stat = asn1PE_H225ConferenceIdentifier (&lctxt, pvalue->u.replaceWithConferenceInvite);
8587 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8588 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8589 break;
8590
8591 /* genericDataReason */
8592 case 20:
8593 /* NULL */
8594 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8595 break;
8596
8597 /* neededFeatureNotSupported */
8598 case 21:
8599 /* NULL */
8600 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8601 break;
8602
8603 /* tunnelledSignallingRejected */
8604 case 22:
8605 /* NULL */
8606 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8607 break;
8608
8609 /* invalidCID */
8610 case 23:
8611 /* NULL */
8612 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8613 break;
8614
8615 /* securityError */
8616 case 24:
8617 stat = asn1PE_H225SecurityErrors (&lctxt, pvalue->u.securityError);
8618 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8619 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8620 break;
8621
8622 /* hopCountExceeded */
8623 case 25:
8624 /* NULL */
8625 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8626 break;
8627
8628 default:
8629 ;
8630 }
8631
8632 stat = encodeByteAlign (pctxt);
8633 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8634
8635 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8636 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8637
8638 freeContext (&lctxt);
8639 }
8640
8641 return (stat);
8642 }
8643
8644 /**************************************************************/
8645 /* */
8646 /* ReleaseComplete_UUIE */
8647 /* */
8648 /**************************************************************/
8649
8650 EXTERN int asn1PE_H225ReleaseComplete_UUIE (OOCTXT* pctxt, H225ReleaseComplete_UUIE* pvalue)
8651 {
8652 int stat = ASN_OK;
8653 ASN1BOOL extbit;
8654 ASN1OpenType openType;
8655 OOCTXT lctxt;
8656
8657 /* extension bit */
8658
8659 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
8660 pvalue->m.tokensPresent ||
8661 pvalue->m.cryptoTokensPresent ||
8662 pvalue->m.busyAddressPresent ||
8663 pvalue->m.presentationIndicatorPresent ||
8664 pvalue->m.screeningIndicatorPresent ||
8665 pvalue->m.capacityPresent ||
8666 pvalue->m.serviceControlPresent ||
8667 pvalue->m.featureSetPresent);
8668
8669 encodeBit (pctxt, extbit);
8670
8671 encodeBit (pctxt, (ASN1BOOL)pvalue->m.reasonPresent);
8672
8673 /* encode protocolIdentifier */
8674
8675 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
8676 if (stat != ASN_OK) return stat;
8677
8678 /* encode reason */
8679
8680 if (pvalue->m.reasonPresent) {
8681 stat = asn1PE_H225ReleaseCompleteReason (pctxt, &pvalue->reason);
8682 if (stat != ASN_OK) return stat;
8683 }
8684
8685 if (extbit) {
8686
8687 /* encode extension optional bits length */
8688
8689 stat = encodeSmallNonNegWholeNumber (pctxt, 8);
8690 if (stat != ASN_OK) return stat;
8691
8692 /* encode optional bits */
8693
8694 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
8695 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
8696 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
8697 encodeBit (pctxt, (ASN1BOOL)pvalue->m.busyAddressPresent);
8698 encodeBit (pctxt, (ASN1BOOL)pvalue->m.presentationIndicatorPresent);
8699 encodeBit (pctxt, (ASN1BOOL)pvalue->m.screeningIndicatorPresent);
8700 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
8701 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
8702 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
8703 /* encode extension elements */
8704
8705 if (pvalue->m.callIdentifierPresent) {
8706 initContext (&lctxt);
8707 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8708 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8709
8710 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
8711 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8712
8713 stat = encodeByteAlign (&lctxt);
8714 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8715
8716 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8717
8718 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8719 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8720
8721 freeContext (&lctxt);
8722 }
8723
8724 if (pvalue->m.tokensPresent) {
8725 initContext (&lctxt);
8726 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8727 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8728
8729 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
8730 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8731
8732 stat = encodeByteAlign (&lctxt);
8733 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8734
8735 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8736
8737 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8738 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8739
8740 freeContext (&lctxt);
8741 }
8742
8743 if (pvalue->m.cryptoTokensPresent) {
8744 initContext (&lctxt);
8745 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8746 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8747
8748 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
8749 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8750
8751 stat = encodeByteAlign (&lctxt);
8752 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8753
8754 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8755
8756 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8757 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8758
8759 freeContext (&lctxt);
8760 }
8761
8762 if (pvalue->m.busyAddressPresent) {
8763 initContext (&lctxt);
8764 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8765 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8766
8767 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->busyAddress);
8768 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8769
8770 stat = encodeByteAlign (&lctxt);
8771 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8772
8773 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8774
8775 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8776 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8777
8778 freeContext (&lctxt);
8779 }
8780
8781 if (pvalue->m.presentationIndicatorPresent) {
8782 initContext (&lctxt);
8783 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8784 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8785
8786 stat = asn1PE_H225PresentationIndicator (&lctxt, &pvalue->presentationIndicator);
8787 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8788
8789 stat = encodeByteAlign (&lctxt);
8790 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8791
8792 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8793
8794 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8795 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8796
8797 freeContext (&lctxt);
8798 }
8799
8800 if (pvalue->m.screeningIndicatorPresent) {
8801 initContext (&lctxt);
8802 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8803 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8804
8805 stat = asn1PE_H225ScreeningIndicator (&lctxt, pvalue->screeningIndicator);
8806 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8807
8808 stat = encodeByteAlign (&lctxt);
8809 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8810
8811 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8812
8813 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8814 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8815
8816 freeContext (&lctxt);
8817 }
8818
8819 if (pvalue->m.capacityPresent) {
8820 initContext (&lctxt);
8821 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8822 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8823
8824 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
8825 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8826
8827 stat = encodeByteAlign (&lctxt);
8828 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8829
8830 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8831
8832 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8833 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8834
8835 freeContext (&lctxt);
8836 }
8837
8838 if (pvalue->m.serviceControlPresent) {
8839 initContext (&lctxt);
8840 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8841 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8842
8843 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
8844 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8845
8846 stat = encodeByteAlign (&lctxt);
8847 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8848
8849 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8850
8851 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8852 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8853
8854 freeContext (&lctxt);
8855 }
8856
8857 if (pvalue->m.featureSetPresent) {
8858 initContext (&lctxt);
8859 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8860 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8861
8862 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
8863 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8864
8865 stat = encodeByteAlign (&lctxt);
8866 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8867
8868 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8869
8870 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8871 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8872
8873 freeContext (&lctxt);
8874 }
8875
8876 }
8877
8878 return (stat);
8879 }
8880
8881 /**************************************************************/
8882 /* */
8883 /* FacilityReason */
8884 /* */
8885 /**************************************************************/
8886
8887 EXTERN int asn1PE_H225FacilityReason (OOCTXT* pctxt, H225FacilityReason* pvalue)
8888 {
8889 int stat = ASN_OK;
8890 OOCTXT lctxt;
8891 ASN1OpenType openType;
8892 ASN1BOOL extbit;
8893
8894 /* extension bit */
8895
8896 extbit = (ASN1BOOL)(pvalue->t > 4);
8897
8898 encodeBit (pctxt, extbit);
8899
8900 if (!extbit) {
8901
8902 /* Encode choice index value */
8903
8904 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
8905 if (stat != ASN_OK) return stat;
8906
8907 /* Encode root element data value */
8908
8909 switch (pvalue->t)
8910 {
8911 /* routeCallToGatekeeper */
8912 case 1:
8913 /* NULL */
8914 break;
8915
8916 /* callForwarded */
8917 case 2:
8918 /* NULL */
8919 break;
8920
8921 /* routeCallToMC */
8922 case 3:
8923 /* NULL */
8924 break;
8925
8926 /* undefinedReason */
8927 case 4:
8928 /* NULL */
8929 break;
8930
8931 default:
8932 return ASN_E_INVOPT;
8933 }
8934 }
8935 else {
8936 /* Encode extension choice index value */
8937
8938 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
8939 if (stat != ASN_OK) return stat;
8940
8941 /* Encode extension element data value */
8942
8943 initContext (&lctxt);
8944 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
8945 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8946
8947 switch (pvalue->t)
8948 {
8949 /* conferenceListChoice */
8950 case 5:
8951 /* NULL */
8952 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8953 break;
8954
8955 /* startH245 */
8956 case 6:
8957 /* NULL */
8958 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8959 break;
8960
8961 /* noH245 */
8962 case 7:
8963 /* NULL */
8964 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8965 break;
8966
8967 /* newTokens */
8968 case 8:
8969 /* NULL */
8970 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8971 break;
8972
8973 /* featureSetUpdate */
8974 case 9:
8975 /* NULL */
8976 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8977 break;
8978
8979 /* forwardedElements */
8980 case 10:
8981 /* NULL */
8982 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8983 break;
8984
8985 /* transportedInformation */
8986 case 11:
8987 /* NULL */
8988 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
8989 break;
8990
8991 default:
8992 ;
8993 }
8994
8995 stat = encodeByteAlign (pctxt);
8996 if (stat != ASN_OK) return freeContext (&lctxt), stat;
8997
8998 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
8999 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9000
9001 freeContext (&lctxt);
9002 }
9003
9004 return (stat);
9005 }
9006
9007 /**************************************************************/
9008 /* */
9009 /* ConferenceList */
9010 /* */
9011 /**************************************************************/
9012
9013 EXTERN int asn1PE_H225ConferenceList (OOCTXT* pctxt, H225ConferenceList* pvalue)
9014 {
9015 int stat = ASN_OK;
9016 ASN1BOOL extbit;
9017
9018 /* extension bit */
9019
9020 extbit = 0;
9021
9022 encodeBit (pctxt, extbit);
9023
9024 encodeBit (pctxt, (ASN1BOOL)pvalue->m.conferenceIDPresent);
9025
9026 encodeBit (pctxt, (ASN1BOOL)pvalue->m.conferenceAliasPresent);
9027
9028 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
9029
9030 /* encode conferenceID */
9031
9032 if (pvalue->m.conferenceIDPresent) {
9033 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
9034 if (stat != ASN_OK) return stat;
9035 }
9036
9037 /* encode conferenceAlias */
9038
9039 if (pvalue->m.conferenceAliasPresent) {
9040 stat = asn1PE_H225AliasAddress (pctxt, &pvalue->conferenceAlias);
9041 if (stat != ASN_OK) return stat;
9042 }
9043
9044 /* encode nonStandardData */
9045
9046 if (pvalue->m.nonStandardDataPresent) {
9047 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
9048 if (stat != ASN_OK) return stat;
9049 }
9050
9051 return (stat);
9052 }
9053
9054 /**************************************************************/
9055 /* */
9056 /* _SeqOfH225ConferenceList */
9057 /* */
9058 /**************************************************************/
9059
9060 EXTERN int asn1PE_H225_SeqOfH225ConferenceList (OOCTXT* pctxt, H225_SeqOfH225ConferenceList* pvalue)
9061 {
9062 int stat = ASN_OK;
9063 DListNode* pnode;
9064 ASN1UINT xx1;
9065 ASN1UINT enclen, fraglen;
9066
9067 enclen = fraglen = xx1 = 0;
9068 pnode = pvalue->head;
9069 for (;;) {
9070 /* encode length determinant */
9071
9072 stat = encodeLength (pctxt, (pvalue->count - enclen));
9073 if (stat < 0) return stat;
9074
9075 fraglen = stat;
9076 enclen += fraglen;
9077 /* encode elements */
9078
9079 for (; xx1 < enclen; xx1++) {
9080 stat = asn1PE_H225ConferenceList (pctxt, ((H225ConferenceList*)pnode->data));
9081 if (stat != ASN_OK) return stat;
9082 pnode = pnode->next;
9083 }
9084 if ( pvalue->count == enclen && fraglen < 16384) {
9085 break;
9086 }
9087 }
9088
9089 return (stat);
9090 }
9091
9092 /**************************************************************/
9093 /* */
9094 /* Facility_UUIE_fastStart */
9095 /* */
9096 /**************************************************************/
9097
9098 EXTERN int asn1PE_H225Facility_UUIE_fastStart (OOCTXT* pctxt, H225Facility_UUIE_fastStart* pvalue)
9099 {
9100 int stat = ASN_OK;
9101 ASN1UINT xx1;
9102
9103 /* encode length determinant */
9104
9105 stat = encodeLength (pctxt, pvalue->n);
9106 if (stat < 0) return stat;
9107
9108 /* encode elements */
9109
9110 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
9111 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
9112 if (stat != ASN_OK) return stat;
9113 }
9114
9115 return (stat);
9116 }
9117
9118 /**************************************************************/
9119 /* */
9120 /* Facility_UUIE */
9121 /* */
9122 /**************************************************************/
9123
9124 EXTERN int asn1PE_H225Facility_UUIE (OOCTXT* pctxt, H225Facility_UUIE* pvalue)
9125 {
9126 int stat = ASN_OK;
9127 ASN1BOOL extbit;
9128 ASN1OpenType openType;
9129 OOCTXT lctxt;
9130
9131 /* extension bit */
9132
9133 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
9134 pvalue->m.destExtraCallInfoPresent ||
9135 pvalue->m.remoteExtensionAddressPresent ||
9136 pvalue->m.tokensPresent ||
9137 pvalue->m.cryptoTokensPresent ||
9138 pvalue->m.conferencesPresent ||
9139 pvalue->m.h245AddressPresent ||
9140 pvalue->m.fastStartPresent ||
9141 pvalue->m.multipleCallsPresent ||
9142 pvalue->m.maintainConnectionPresent ||
9143 pvalue->m.fastConnectRefusedPresent ||
9144 pvalue->m.serviceControlPresent ||
9145 pvalue->m.circuitInfoPresent ||
9146 pvalue->m.featureSetPresent ||
9147 pvalue->m.destinationInfoPresent ||
9148 pvalue->m.h245SecurityModePresent);
9149
9150 encodeBit (pctxt, extbit);
9151
9152 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternativeAddressPresent);
9153
9154 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternativeAliasAddressPresent);
9155
9156 encodeBit (pctxt, (ASN1BOOL)pvalue->m.conferenceIDPresent);
9157
9158 /* encode protocolIdentifier */
9159
9160 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9161 if (stat != ASN_OK) return stat;
9162
9163 /* encode alternativeAddress */
9164
9165 if (pvalue->m.alternativeAddressPresent) {
9166 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->alternativeAddress);
9167 if (stat != ASN_OK) return stat;
9168 }
9169
9170 /* encode alternativeAliasAddress */
9171
9172 if (pvalue->m.alternativeAliasAddressPresent) {
9173 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->alternativeAliasAddress);
9174 if (stat != ASN_OK) return stat;
9175 }
9176
9177 /* encode conferenceID */
9178
9179 if (pvalue->m.conferenceIDPresent) {
9180 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
9181 if (stat != ASN_OK) return stat;
9182 }
9183
9184 /* encode reason */
9185
9186 stat = asn1PE_H225FacilityReason (pctxt, &pvalue->reason);
9187 if (stat != ASN_OK) return stat;
9188
9189 if (extbit) {
9190
9191 /* encode extension optional bits length */
9192
9193 stat = encodeSmallNonNegWholeNumber (pctxt, 15);
9194 if (stat != ASN_OK) return stat;
9195
9196 /* encode optional bits */
9197
9198 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
9199 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
9200 encodeBit (pctxt, (ASN1BOOL)pvalue->m.remoteExtensionAddressPresent);
9201 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9202 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9203 encodeBit (pctxt, (ASN1BOOL)pvalue->m.conferencesPresent);
9204 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
9205 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
9206 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
9207 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
9208 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
9209 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
9210 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
9211 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
9212 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationInfoPresent);
9213 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityModePresent);
9214 /* encode extension elements */
9215
9216 if (pvalue->m.callIdentifierPresent) {
9217 initContext (&lctxt);
9218 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9219 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9220
9221 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
9222 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9223
9224 stat = encodeByteAlign (&lctxt);
9225 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9226
9227 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9228
9229 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9230 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9231
9232 freeContext (&lctxt);
9233 }
9234
9235 if (pvalue->m.destExtraCallInfoPresent) {
9236 initContext (&lctxt);
9237 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9238 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9239
9240 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->destExtraCallInfo);
9241 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9242
9243 stat = encodeByteAlign (&lctxt);
9244 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9245
9246 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9247
9248 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9249 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9250
9251 freeContext (&lctxt);
9252 }
9253
9254 if (pvalue->m.remoteExtensionAddressPresent) {
9255 initContext (&lctxt);
9256 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9257 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9258
9259 stat = asn1PE_H225AliasAddress (&lctxt, &pvalue->remoteExtensionAddress);
9260 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9261
9262 stat = encodeByteAlign (&lctxt);
9263 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9264
9265 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9266
9267 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9268 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9269
9270 freeContext (&lctxt);
9271 }
9272
9273 if (pvalue->m.tokensPresent) {
9274 initContext (&lctxt);
9275 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9276 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9277
9278 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
9279 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9280
9281 stat = encodeByteAlign (&lctxt);
9282 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9283
9284 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9285
9286 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9287 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9288
9289 freeContext (&lctxt);
9290 }
9291
9292 if (pvalue->m.cryptoTokensPresent) {
9293 initContext (&lctxt);
9294 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9295 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9296
9297 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
9298 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9299
9300 stat = encodeByteAlign (&lctxt);
9301 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9302
9303 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9304
9305 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9306 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9307
9308 freeContext (&lctxt);
9309 }
9310
9311 if (pvalue->m.conferencesPresent) {
9312 initContext (&lctxt);
9313 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9314 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9315
9316 stat = asn1PE_H225_SeqOfH225ConferenceList (&lctxt, &pvalue->conferences);
9317 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9318
9319 stat = encodeByteAlign (&lctxt);
9320 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9321
9322 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9323
9324 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9325 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9326
9327 freeContext (&lctxt);
9328 }
9329
9330 if (pvalue->m.h245AddressPresent) {
9331 initContext (&lctxt);
9332 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9333 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9334
9335 stat = asn1PE_H225TransportAddress (&lctxt, &pvalue->h245Address);
9336 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9337
9338 stat = encodeByteAlign (&lctxt);
9339 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9340
9341 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9342
9343 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9344 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9345
9346 freeContext (&lctxt);
9347 }
9348
9349 if (pvalue->m.fastStartPresent) {
9350 initContext (&lctxt);
9351 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9352 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9353
9354 stat = asn1PE_H225Facility_UUIE_fastStart (&lctxt, &pvalue->fastStart);
9355 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9356
9357 stat = encodeByteAlign (&lctxt);
9358 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9359
9360 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9361
9362 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9363 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9364
9365 freeContext (&lctxt);
9366 }
9367
9368 if (pvalue->m.multipleCallsPresent) {
9369 initContext (&lctxt);
9370 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9371 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9372
9373 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
9374 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9375
9376 stat = encodeByteAlign (&lctxt);
9377 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9378
9379 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9380
9381 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9382 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9383
9384 freeContext (&lctxt);
9385 }
9386
9387 if (pvalue->m.maintainConnectionPresent) {
9388 initContext (&lctxt);
9389 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9390 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9391
9392 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
9393 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9394
9395 stat = encodeByteAlign (&lctxt);
9396 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9397
9398 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9399
9400 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9401 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9402
9403 freeContext (&lctxt);
9404 }
9405
9406 if (pvalue->m.fastConnectRefusedPresent) {
9407 initContext (&lctxt);
9408 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9409 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9410
9411 /* NULL */
9412
9413 stat = encodeByteAlign (&lctxt);
9414 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9415
9416 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9417
9418 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9419 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9420
9421 freeContext (&lctxt);
9422 }
9423
9424 if (pvalue->m.serviceControlPresent) {
9425 initContext (&lctxt);
9426 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9427 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9428
9429 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
9430 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9431
9432 stat = encodeByteAlign (&lctxt);
9433 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9434
9435 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9436
9437 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9438 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9439
9440 freeContext (&lctxt);
9441 }
9442
9443 if (pvalue->m.circuitInfoPresent) {
9444 initContext (&lctxt);
9445 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9446 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9447
9448 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
9449 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9450
9451 stat = encodeByteAlign (&lctxt);
9452 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9453
9454 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9455
9456 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9457 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9458
9459 freeContext (&lctxt);
9460 }
9461
9462 if (pvalue->m.featureSetPresent) {
9463 initContext (&lctxt);
9464 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9465 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9466
9467 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
9468 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9469
9470 stat = encodeByteAlign (&lctxt);
9471 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9472
9473 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9474
9475 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9476 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9477
9478 freeContext (&lctxt);
9479 }
9480
9481 if (pvalue->m.destinationInfoPresent) {
9482 initContext (&lctxt);
9483 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9484 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9485
9486 stat = asn1PE_H225EndpointType (&lctxt, &pvalue->destinationInfo);
9487 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9488
9489 stat = encodeByteAlign (&lctxt);
9490 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9491
9492 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9493
9494 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9495 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9496
9497 freeContext (&lctxt);
9498 }
9499
9500 if (pvalue->m.h245SecurityModePresent) {
9501 initContext (&lctxt);
9502 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9503 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9504
9505 stat = asn1PE_H225H245Security (&lctxt, &pvalue->h245SecurityMode);
9506 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9507
9508 stat = encodeByteAlign (&lctxt);
9509 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9510
9511 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9512
9513 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9514 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9515
9516 freeContext (&lctxt);
9517 }
9518
9519 }
9520
9521 return (stat);
9522 }
9523
9524 /**************************************************************/
9525 /* */
9526 /* Progress_UUIE_fastStart */
9527 /* */
9528 /**************************************************************/
9529
9530 EXTERN int asn1PE_H225Progress_UUIE_fastStart (OOCTXT* pctxt, H225Progress_UUIE_fastStart* pvalue)
9531 {
9532 int stat = ASN_OK;
9533 ASN1UINT xx1;
9534
9535 /* encode length determinant */
9536
9537 stat = encodeLength (pctxt, pvalue->n);
9538 if (stat < 0) return stat;
9539
9540 /* encode elements */
9541
9542 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
9543 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
9544 if (stat != ASN_OK) return stat;
9545 }
9546
9547 return (stat);
9548 }
9549
9550 /**************************************************************/
9551 /* */
9552 /* Progress_UUIE */
9553 /* */
9554 /**************************************************************/
9555
9556 EXTERN int asn1PE_H225Progress_UUIE (OOCTXT* pctxt, H225Progress_UUIE* pvalue)
9557 {
9558 int stat = ASN_OK;
9559 ASN1BOOL extbit;
9560 ASN1OpenType openType;
9561 OOCTXT lctxt;
9562
9563 /* extension bit */
9564
9565 extbit = (ASN1BOOL)(pvalue->m.multipleCallsPresent ||
9566 pvalue->m.maintainConnectionPresent ||
9567 pvalue->m.fastConnectRefusedPresent);
9568
9569 encodeBit (pctxt, extbit);
9570
9571 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245AddressPresent);
9572
9573 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245SecurityModePresent);
9574
9575 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9576
9577 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9578
9579 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastStartPresent);
9580
9581 /* encode protocolIdentifier */
9582
9583 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9584 if (stat != ASN_OK) return stat;
9585
9586 /* encode destinationInfo */
9587
9588 stat = asn1PE_H225EndpointType (pctxt, &pvalue->destinationInfo);
9589 if (stat != ASN_OK) return stat;
9590
9591 /* encode h245Address */
9592
9593 if (pvalue->m.h245AddressPresent) {
9594 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->h245Address);
9595 if (stat != ASN_OK) return stat;
9596 }
9597
9598 /* encode callIdentifier */
9599
9600 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9601 if (stat != ASN_OK) return stat;
9602
9603 /* encode h245SecurityMode */
9604
9605 if (pvalue->m.h245SecurityModePresent) {
9606 stat = asn1PE_H225H245Security (pctxt, &pvalue->h245SecurityMode);
9607 if (stat != ASN_OK) return stat;
9608 }
9609
9610 /* encode tokens */
9611
9612 if (pvalue->m.tokensPresent) {
9613 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9614 if (stat != ASN_OK) return stat;
9615 }
9616
9617 /* encode cryptoTokens */
9618
9619 if (pvalue->m.cryptoTokensPresent) {
9620 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9621 if (stat != ASN_OK) return stat;
9622 }
9623
9624 /* encode fastStart */
9625
9626 if (pvalue->m.fastStartPresent) {
9627 stat = asn1PE_H225Progress_UUIE_fastStart (pctxt, &pvalue->fastStart);
9628 if (stat != ASN_OK) return stat;
9629 }
9630
9631 if (extbit) {
9632
9633 /* encode extension optional bits length */
9634
9635 stat = encodeSmallNonNegWholeNumber (pctxt, 2);
9636 if (stat != ASN_OK) return stat;
9637
9638 /* encode optional bits */
9639
9640 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
9641 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
9642 encodeBit (pctxt, (ASN1BOOL)pvalue->m.fastConnectRefusedPresent);
9643 /* encode extension elements */
9644
9645 if (pvalue->m.multipleCallsPresent) {
9646 initContext (&lctxt);
9647 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9648 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9649
9650 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
9651 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9652
9653 stat = encodeByteAlign (&lctxt);
9654 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9655
9656 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9657
9658 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9659 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9660
9661 freeContext (&lctxt);
9662 }
9663
9664 if (pvalue->m.maintainConnectionPresent) {
9665 initContext (&lctxt);
9666 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9667 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9668
9669 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
9670 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9671
9672 stat = encodeByteAlign (&lctxt);
9673 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9674
9675 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9676
9677 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9678 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9679
9680 freeContext (&lctxt);
9681 }
9682
9683 if (pvalue->m.fastConnectRefusedPresent) {
9684 initContext (&lctxt);
9685 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9686 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9687
9688 /* NULL */
9689
9690 stat = encodeByteAlign (&lctxt);
9691 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9692
9693 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9694
9695 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
9696 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9697
9698 freeContext (&lctxt);
9699 }
9700
9701 }
9702
9703 return (stat);
9704 }
9705
9706 /**************************************************************/
9707 /* */
9708 /* Status_UUIE */
9709 /* */
9710 /**************************************************************/
9711
9712 EXTERN int asn1PE_H225Status_UUIE (OOCTXT* pctxt, H225Status_UUIE* pvalue)
9713 {
9714 int stat = ASN_OK;
9715 ASN1BOOL extbit;
9716
9717 /* extension bit */
9718
9719 extbit = 0;
9720
9721 encodeBit (pctxt, extbit);
9722
9723 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9724
9725 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9726
9727 /* encode protocolIdentifier */
9728
9729 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9730 if (stat != ASN_OK) return stat;
9731
9732 /* encode callIdentifier */
9733
9734 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9735 if (stat != ASN_OK) return stat;
9736
9737 /* encode tokens */
9738
9739 if (pvalue->m.tokensPresent) {
9740 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9741 if (stat != ASN_OK) return stat;
9742 }
9743
9744 /* encode cryptoTokens */
9745
9746 if (pvalue->m.cryptoTokensPresent) {
9747 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9748 if (stat != ASN_OK) return stat;
9749 }
9750
9751 return (stat);
9752 }
9753
9754 /**************************************************************/
9755 /* */
9756 /* StatusInquiry_UUIE */
9757 /* */
9758 /**************************************************************/
9759
9760 EXTERN int asn1PE_H225StatusInquiry_UUIE (OOCTXT* pctxt, H225StatusInquiry_UUIE* pvalue)
9761 {
9762 int stat = ASN_OK;
9763 ASN1BOOL extbit;
9764
9765 /* extension bit */
9766
9767 extbit = 0;
9768
9769 encodeBit (pctxt, extbit);
9770
9771 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9772
9773 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9774
9775 /* encode protocolIdentifier */
9776
9777 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9778 if (stat != ASN_OK) return stat;
9779
9780 /* encode callIdentifier */
9781
9782 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9783 if (stat != ASN_OK) return stat;
9784
9785 /* encode tokens */
9786
9787 if (pvalue->m.tokensPresent) {
9788 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9789 if (stat != ASN_OK) return stat;
9790 }
9791
9792 /* encode cryptoTokens */
9793
9794 if (pvalue->m.cryptoTokensPresent) {
9795 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9796 if (stat != ASN_OK) return stat;
9797 }
9798
9799 return (stat);
9800 }
9801
9802 /**************************************************************/
9803 /* */
9804 /* SetupAcknowledge_UUIE */
9805 /* */
9806 /**************************************************************/
9807
9808 EXTERN int asn1PE_H225SetupAcknowledge_UUIE (OOCTXT* pctxt, H225SetupAcknowledge_UUIE* pvalue)
9809 {
9810 int stat = ASN_OK;
9811 ASN1BOOL extbit;
9812
9813 /* extension bit */
9814
9815 extbit = 0;
9816
9817 encodeBit (pctxt, extbit);
9818
9819 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9820
9821 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9822
9823 /* encode protocolIdentifier */
9824
9825 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9826 if (stat != ASN_OK) return stat;
9827
9828 /* encode callIdentifier */
9829
9830 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9831 if (stat != ASN_OK) return stat;
9832
9833 /* encode tokens */
9834
9835 if (pvalue->m.tokensPresent) {
9836 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9837 if (stat != ASN_OK) return stat;
9838 }
9839
9840 /* encode cryptoTokens */
9841
9842 if (pvalue->m.cryptoTokensPresent) {
9843 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9844 if (stat != ASN_OK) return stat;
9845 }
9846
9847 return (stat);
9848 }
9849
9850 /**************************************************************/
9851 /* */
9852 /* Notify_UUIE */
9853 /* */
9854 /**************************************************************/
9855
9856 EXTERN int asn1PE_H225Notify_UUIE (OOCTXT* pctxt, H225Notify_UUIE* pvalue)
9857 {
9858 int stat = ASN_OK;
9859 ASN1BOOL extbit;
9860
9861 /* extension bit */
9862
9863 extbit = 0;
9864
9865 encodeBit (pctxt, extbit);
9866
9867 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
9868
9869 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
9870
9871 /* encode protocolIdentifier */
9872
9873 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
9874 if (stat != ASN_OK) return stat;
9875
9876 /* encode callIdentifier */
9877
9878 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
9879 if (stat != ASN_OK) return stat;
9880
9881 /* encode tokens */
9882
9883 if (pvalue->m.tokensPresent) {
9884 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
9885 if (stat != ASN_OK) return stat;
9886 }
9887
9888 /* encode cryptoTokens */
9889
9890 if (pvalue->m.cryptoTokensPresent) {
9891 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
9892 if (stat != ASN_OK) return stat;
9893 }
9894
9895 return (stat);
9896 }
9897
9898 /**************************************************************/
9899 /* */
9900 /* H323_UU_PDU_h323_message_body */
9901 /* */
9902 /**************************************************************/
9903
9904 EXTERN int asn1PE_H225H323_UU_PDU_h323_message_body (OOCTXT* pctxt, H225H323_UU_PDU_h323_message_body* pvalue)
9905 {
9906 int stat = ASN_OK;
9907 OOCTXT lctxt;
9908 ASN1OpenType openType;
9909 ASN1BOOL extbit;
9910
9911 /* extension bit */
9912
9913 extbit = (ASN1BOOL)(pvalue->t > 7);
9914
9915 encodeBit (pctxt, extbit);
9916
9917 if (!extbit) {
9918
9919 /* Encode choice index value */
9920
9921 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 6);
9922 if (stat != ASN_OK) return stat;
9923
9924 /* Encode root element data value */
9925
9926 switch (pvalue->t)
9927 {
9928 /* setup */
9929 case 1:
9930 stat = asn1PE_H225Setup_UUIE (pctxt, pvalue->u.setup);
9931 if (stat != ASN_OK) return stat;
9932 break;
9933
9934 /* callProceeding */
9935 case 2:
9936 stat = asn1PE_H225CallProceeding_UUIE (pctxt, pvalue->u.callProceeding);
9937 if (stat != ASN_OK) return stat;
9938 break;
9939
9940 /* connect */
9941 case 3:
9942 stat = asn1PE_H225Connect_UUIE (pctxt, pvalue->u.connect);
9943 if (stat != ASN_OK) return stat;
9944 break;
9945
9946 /* alerting */
9947 case 4:
9948 stat = asn1PE_H225Alerting_UUIE (pctxt, pvalue->u.alerting);
9949 if (stat != ASN_OK) return stat;
9950 break;
9951
9952 /* information */
9953 case 5:
9954 stat = asn1PE_H225Information_UUIE (pctxt, pvalue->u.information);
9955 if (stat != ASN_OK) return stat;
9956 break;
9957
9958 /* releaseComplete */
9959 case 6:
9960 stat = asn1PE_H225ReleaseComplete_UUIE (pctxt, pvalue->u.releaseComplete);
9961 if (stat != ASN_OK) return stat;
9962 break;
9963
9964 /* facility */
9965 case 7:
9966 stat = asn1PE_H225Facility_UUIE (pctxt, pvalue->u.facility);
9967 if (stat != ASN_OK) return stat;
9968 break;
9969
9970 default:
9971 return ASN_E_INVOPT;
9972 }
9973 }
9974 else {
9975 /* Encode extension choice index value */
9976
9977 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 8);
9978 if (stat != ASN_OK) return stat;
9979
9980 /* Encode extension element data value */
9981
9982 initContext (&lctxt);
9983 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
9984 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9985
9986 switch (pvalue->t)
9987 {
9988 /* progress */
9989 case 8:
9990 stat = asn1PE_H225Progress_UUIE (&lctxt, pvalue->u.progress);
9991 if (stat != ASN_OK) return freeContext (&lctxt), stat;
9992 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9993 break;
9994
9995 /* empty */
9996 case 9:
9997 /* NULL */
9998 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
9999 break;
10000
10001 /* status */
10002 case 10:
10003 stat = asn1PE_H225Status_UUIE (&lctxt, pvalue->u.status);
10004 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10005 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10006 break;
10007
10008 /* statusInquiry */
10009 case 11:
10010 stat = asn1PE_H225StatusInquiry_UUIE (&lctxt, pvalue->u.statusInquiry);
10011 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10012 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10013 break;
10014
10015 /* setupAcknowledge */
10016 case 12:
10017 stat = asn1PE_H225SetupAcknowledge_UUIE (&lctxt, pvalue->u.setupAcknowledge);
10018 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10019 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10020 break;
10021
10022 /* notify */
10023 case 13:
10024 stat = asn1PE_H225Notify_UUIE (&lctxt, pvalue->u.notify);
10025 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10026 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10027 break;
10028
10029 default:
10030 ;
10031 }
10032
10033 stat = encodeByteAlign (pctxt);
10034 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10035
10036 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10037 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10038
10039 freeContext (&lctxt);
10040 }
10041
10042 return (stat);
10043 }
10044
10045 /**************************************************************/
10046 /* */
10047 /* H323_UU_PDU_h4501SupplementaryService */
10048 /* */
10049 /**************************************************************/
10050
10051 EXTERN int asn1PE_H225H323_UU_PDU_h4501SupplementaryService (OOCTXT* pctxt, H225H323_UU_PDU_h4501SupplementaryService* pvalue)
10052 {
10053 int stat = ASN_OK;
10054 ASN1UINT xx1;
10055
10056 /* encode length determinant */
10057
10058 stat = encodeLength (pctxt, pvalue->n);
10059 if (stat < 0) return stat;
10060
10061 /* encode elements */
10062
10063 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10064 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10065 if (stat != ASN_OK) return stat;
10066 }
10067
10068 return (stat);
10069 }
10070
10071 /**************************************************************/
10072 /* */
10073 /* H323_UU_PDU_h245Control */
10074 /* */
10075 /**************************************************************/
10076
10077 EXTERN int asn1PE_H225H323_UU_PDU_h245Control (OOCTXT* pctxt, H225H323_UU_PDU_h245Control* pvalue)
10078 {
10079 int stat = ASN_OK;
10080 ASN1UINT xx1;
10081
10082 /* encode length determinant */
10083
10084 stat = encodeLength (pctxt, pvalue->n);
10085 if (stat < 0) return stat;
10086
10087 /* encode elements */
10088
10089 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10090 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10091 if (stat != ASN_OK) return stat;
10092 }
10093
10094 return (stat);
10095 }
10096
10097 /**************************************************************/
10098 /* */
10099 /* _SeqOfH225NonStandardParameter */
10100 /* */
10101 /**************************************************************/
10102
10103 EXTERN int asn1PE_H225_SeqOfH225NonStandardParameter (OOCTXT* pctxt, H225_SeqOfH225NonStandardParameter* pvalue)
10104 {
10105 int stat = ASN_OK;
10106 DListNode* pnode;
10107 ASN1UINT xx1;
10108 ASN1UINT enclen, fraglen;
10109
10110 enclen = fraglen = xx1 = 0;
10111 pnode = pvalue->head;
10112 for (;;) {
10113 /* encode length determinant */
10114
10115 stat = encodeLength (pctxt, (pvalue->count - enclen));
10116 if (stat < 0) return stat;
10117
10118 fraglen = stat;
10119 enclen += fraglen;
10120 /* encode elements */
10121
10122 for (; xx1 < enclen; xx1++) {
10123 stat = asn1PE_H225NonStandardParameter (pctxt, ((H225NonStandardParameter*)pnode->data));
10124 if (stat != ASN_OK) return stat;
10125 pnode = pnode->next;
10126 }
10127 if ( pvalue->count == enclen && fraglen < 16384) {
10128 break;
10129 }
10130 }
10131
10132 return (stat);
10133 }
10134
10135 /**************************************************************/
10136 /* */
10137 /* CallLinkage */
10138 /* */
10139 /**************************************************************/
10140
10141 EXTERN int asn1PE_H225CallLinkage (OOCTXT* pctxt, H225CallLinkage* pvalue)
10142 {
10143 int stat = ASN_OK;
10144 ASN1BOOL extbit;
10145
10146 /* extension bit */
10147
10148 extbit = 0;
10149
10150 encodeBit (pctxt, extbit);
10151
10152 encodeBit (pctxt, (ASN1BOOL)pvalue->m.globalCallIdPresent);
10153
10154 encodeBit (pctxt, (ASN1BOOL)pvalue->m.threadIdPresent);
10155
10156 /* encode globalCallId */
10157
10158 if (pvalue->m.globalCallIdPresent) {
10159 stat = asn1PE_H225GloballyUniqueID (pctxt, &pvalue->globalCallId);
10160 if (stat != ASN_OK) return stat;
10161 }
10162
10163 /* encode threadId */
10164
10165 if (pvalue->m.threadIdPresent) {
10166 stat = asn1PE_H225GloballyUniqueID (pctxt, &pvalue->threadId);
10167 if (stat != ASN_OK) return stat;
10168 }
10169
10170 return (stat);
10171 }
10172
10173 /**************************************************************/
10174 /* */
10175 /* H323_UU_PDU_tunnelledSignallingMessage_messageContent */
10176 /* */
10177 /**************************************************************/
10178
10179 EXTERN int asn1PE_H225H323_UU_PDU_tunnelledSignallingMessage_messageContent (OOCTXT* pctxt, H225H323_UU_PDU_tunnelledSignallingMessage_messageContent* pvalue)
10180 {
10181 int stat = ASN_OK;
10182 ASN1UINT xx1;
10183
10184 /* encode length determinant */
10185
10186 stat = encodeLength (pctxt, pvalue->n);
10187 if (stat < 0) return stat;
10188
10189 /* encode elements */
10190
10191 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
10192 stat = encodeOctetString (pctxt, pvalue->elem[xx1].numocts, pvalue->elem[xx1].data);
10193 if (stat != ASN_OK) return stat;
10194 }
10195
10196 return (stat);
10197 }
10198
10199 /**************************************************************/
10200 /* */
10201 /* H323_UU_PDU_tunnelledSignallingMessage */
10202 /* */
10203 /**************************************************************/
10204
10205 EXTERN int asn1PE_H225H323_UU_PDU_tunnelledSignallingMessage (OOCTXT* pctxt, H225H323_UU_PDU_tunnelledSignallingMessage* pvalue)
10206 {
10207 int stat = ASN_OK;
10208 ASN1BOOL extbit;
10209
10210 /* extension bit */
10211
10212 extbit = 0;
10213
10214 encodeBit (pctxt, extbit);
10215
10216 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tunnellingRequiredPresent);
10217
10218 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
10219
10220 /* encode tunnelledProtocolID */
10221
10222 stat = asn1PE_H225TunnelledProtocol (pctxt, &pvalue->tunnelledProtocolID);
10223 if (stat != ASN_OK) return stat;
10224
10225 /* encode messageContent */
10226
10227 stat = asn1PE_H225H323_UU_PDU_tunnelledSignallingMessage_messageContent (pctxt, &pvalue->messageContent);
10228 if (stat != ASN_OK) return stat;
10229
10230 /* encode tunnellingRequired */
10231
10232 if (pvalue->m.tunnellingRequiredPresent) {
10233 /* NULL */
10234 }
10235
10236 /* encode nonStandardData */
10237
10238 if (pvalue->m.nonStandardDataPresent) {
10239 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
10240 if (stat != ASN_OK) return stat;
10241 }
10242
10243 return (stat);
10244 }
10245
10246 /**************************************************************/
10247 /* */
10248 /* StimulusControl */
10249 /* */
10250 /**************************************************************/
10251
10252 EXTERN int asn1PE_H225StimulusControl (OOCTXT* pctxt, H225StimulusControl* pvalue)
10253 {
10254 int stat = ASN_OK;
10255 ASN1BOOL extbit;
10256
10257 /* extension bit */
10258
10259 extbit = 0;
10260
10261 encodeBit (pctxt, extbit);
10262
10263 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardPresent);
10264
10265 encodeBit (pctxt, (ASN1BOOL)pvalue->m.isTextPresent);
10266
10267 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h248MessagePresent);
10268
10269 /* encode nonStandard */
10270
10271 if (pvalue->m.nonStandardPresent) {
10272 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandard);
10273 if (stat != ASN_OK) return stat;
10274 }
10275
10276 /* encode isText */
10277
10278 if (pvalue->m.isTextPresent) {
10279 /* NULL */
10280 }
10281
10282 /* encode h248Message */
10283
10284 if (pvalue->m.h248MessagePresent) {
10285 stat = encodeOctetString (pctxt, pvalue->h248Message.numocts, pvalue->h248Message.data);
10286 if (stat != ASN_OK) return stat;
10287 }
10288
10289 return (stat);
10290 }
10291
10292 /**************************************************************/
10293 /* */
10294 /* H323_UU_PDU */
10295 /* */
10296 /**************************************************************/
10297
10298 EXTERN int asn1PE_H225H323_UU_PDU (OOCTXT* pctxt, H225H323_UU_PDU* pvalue)
10299 {
10300 int stat = ASN_OK;
10301 ASN1BOOL extbit;
10302 ASN1OpenType openType;
10303 OOCTXT lctxt;
10304
10305 /* extension bit */
10306
10307 extbit = (ASN1BOOL)(pvalue->m.h4501SupplementaryServicePresent ||
10308 pvalue->m.h245TunnelingPresent ||
10309 pvalue->m.h245ControlPresent ||
10310 pvalue->m.nonStandardControlPresent ||
10311 pvalue->m.callLinkagePresent ||
10312 pvalue->m.tunnelledSignallingMessagePresent ||
10313 pvalue->m.provisionalRespToH245TunnelingPresent ||
10314 pvalue->m.stimulusControlPresent ||
10315 pvalue->m.genericDataPresent);
10316
10317 encodeBit (pctxt, extbit);
10318
10319 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
10320
10321 /* encode h323_message_body */
10322
10323 stat = asn1PE_H225H323_UU_PDU_h323_message_body (pctxt, &pvalue->h323_message_body);
10324 if (stat != ASN_OK) return stat;
10325
10326 /* encode nonStandardData */
10327
10328 if (pvalue->m.nonStandardDataPresent) {
10329 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
10330 if (stat != ASN_OK) return stat;
10331 }
10332
10333 if (extbit) {
10334
10335 /* encode extension optional bits length */
10336
10337 stat = encodeSmallNonNegWholeNumber (pctxt, 8);
10338 if (stat != ASN_OK) return stat;
10339
10340 /* encode optional bits */
10341
10342 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h4501SupplementaryServicePresent);
10343 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245TunnelingPresent);
10344 encodeBit (pctxt, (ASN1BOOL)pvalue->m.h245ControlPresent);
10345 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardControlPresent);
10346 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
10347 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tunnelledSignallingMessagePresent);
10348 encodeBit (pctxt, (ASN1BOOL)pvalue->m.provisionalRespToH245TunnelingPresent);
10349 encodeBit (pctxt, (ASN1BOOL)pvalue->m.stimulusControlPresent);
10350 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
10351 /* encode extension elements */
10352
10353 if (pvalue->m.h4501SupplementaryServicePresent) {
10354 initContext (&lctxt);
10355 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10356 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10357
10358 stat = asn1PE_H225H323_UU_PDU_h4501SupplementaryService (&lctxt, &pvalue->h4501SupplementaryService);
10359 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10360
10361 stat = encodeByteAlign (&lctxt);
10362 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10363
10364 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10365
10366 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10367 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10368
10369 freeContext (&lctxt);
10370 }
10371
10372 if (pvalue->m.h245TunnelingPresent) {
10373 initContext (&lctxt);
10374 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10375 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10376
10377 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->h245Tunneling);
10378 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10379
10380 stat = encodeByteAlign (&lctxt);
10381 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10382
10383 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10384
10385 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10386 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10387
10388 freeContext (&lctxt);
10389 }
10390
10391 if (pvalue->m.h245ControlPresent) {
10392 initContext (&lctxt);
10393 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10394 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10395
10396 stat = asn1PE_H225H323_UU_PDU_h245Control (&lctxt, &pvalue->h245Control);
10397 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10398
10399 stat = encodeByteAlign (&lctxt);
10400 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10401
10402 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10403
10404 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10405 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10406
10407 freeContext (&lctxt);
10408 }
10409
10410 if (pvalue->m.nonStandardControlPresent) {
10411 initContext (&lctxt);
10412 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10413 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10414
10415 stat = asn1PE_H225_SeqOfH225NonStandardParameter (&lctxt, &pvalue->nonStandardControl);
10416 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10417
10418 stat = encodeByteAlign (&lctxt);
10419 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10420
10421 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10422
10423 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10424 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10425
10426 freeContext (&lctxt);
10427 }
10428
10429 if (pvalue->m.callLinkagePresent) {
10430 initContext (&lctxt);
10431 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10432 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10433
10434 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
10435 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10436
10437 stat = encodeByteAlign (&lctxt);
10438 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10439
10440 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10441
10442 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10443 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10444
10445 freeContext (&lctxt);
10446 }
10447
10448 if (pvalue->m.tunnelledSignallingMessagePresent) {
10449 initContext (&lctxt);
10450 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10451 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10452
10453 stat = asn1PE_H225H323_UU_PDU_tunnelledSignallingMessage (&lctxt, &pvalue->tunnelledSignallingMessage);
10454 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10455
10456 stat = encodeByteAlign (&lctxt);
10457 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10458
10459 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10460
10461 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10462 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10463
10464 freeContext (&lctxt);
10465 }
10466
10467 if (pvalue->m.provisionalRespToH245TunnelingPresent) {
10468 initContext (&lctxt);
10469 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10470 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10471
10472 /* NULL */
10473
10474 stat = encodeByteAlign (&lctxt);
10475 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10476
10477 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10478
10479 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10480 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10481
10482 freeContext (&lctxt);
10483 }
10484
10485 if (pvalue->m.stimulusControlPresent) {
10486 initContext (&lctxt);
10487 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10488 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10489
10490 stat = asn1PE_H225StimulusControl (&lctxt, &pvalue->stimulusControl);
10491 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10492
10493 stat = encodeByteAlign (&lctxt);
10494 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10495
10496 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10497
10498 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10499 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10500
10501 freeContext (&lctxt);
10502 }
10503
10504 if (pvalue->m.genericDataPresent) {
10505 initContext (&lctxt);
10506 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10507 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10508
10509 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
10510 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10511
10512 stat = encodeByteAlign (&lctxt);
10513 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10514
10515 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10516
10517 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10518 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10519
10520 freeContext (&lctxt);
10521 }
10522
10523 }
10524
10525 return (stat);
10526 }
10527
10528 /**************************************************************/
10529 /* */
10530 /* H323_UserInformation_user_data */
10531 /* */
10532 /**************************************************************/
10533
10534 EXTERN int asn1PE_H225H323_UserInformation_user_data (OOCTXT* pctxt, H225H323_UserInformation_user_data* pvalue)
10535 {
10536 int stat = ASN_OK;
10537 ASN1BOOL extbit;
10538
10539 /* extension bit */
10540
10541 extbit = 0;
10542
10543 encodeBit (pctxt, extbit);
10544
10545 /* encode protocol_discriminator */
10546
10547 stat = encodeConsUnsigned (pctxt, pvalue->protocol_discriminator, 0U, 255U);
10548 if (stat != ASN_OK) return stat;
10549
10550 /* encode user_information */
10551
10552 stat = asn1PE_H225H323_UserInformation_user_data_user_information (pctxt, &pvalue->user_information);
10553 if (stat != ASN_OK) return stat;
10554
10555 return (stat);
10556 }
10557
10558 /**************************************************************/
10559 /* */
10560 /* H323_UserInformation */
10561 /* */
10562 /**************************************************************/
10563
10564 EXTERN int asn1PE_H225H323_UserInformation (OOCTXT* pctxt, H225H323_UserInformation* pvalue)
10565 {
10566 int stat = ASN_OK;
10567 ASN1BOOL extbit;
10568
10569 /* extension bit */
10570
10571 extbit = 0;
10572
10573 encodeBit (pctxt, extbit);
10574
10575 encodeBit (pctxt, (ASN1BOOL)pvalue->m.user_dataPresent);
10576
10577 /* encode h323_uu_pdu */
10578
10579 stat = asn1PE_H225H323_UU_PDU (pctxt, &pvalue->h323_uu_pdu);
10580 if (stat != ASN_OK) return stat;
10581
10582 /* encode user_data */
10583
10584 if (pvalue->m.user_dataPresent) {
10585 stat = asn1PE_H225H323_UserInformation_user_data (pctxt, &pvalue->user_data);
10586 if (stat != ASN_OK) return stat;
10587 }
10588
10589 return (stat);
10590 }
10591
10592 /**************************************************************/
10593 /* */
10594 /* AddressPattern_range */
10595 /* */
10596 /**************************************************************/
10597
10598 EXTERN int asn1PE_H225AddressPattern_range (OOCTXT* pctxt, H225AddressPattern_range* pvalue)
10599 {
10600 int stat = ASN_OK;
10601
10602 /* encode startOfRange */
10603
10604 stat = asn1PE_H225PartyNumber (pctxt, &pvalue->startOfRange);
10605 if (stat != ASN_OK) return stat;
10606
10607 /* encode endOfRange */
10608
10609 stat = asn1PE_H225PartyNumber (pctxt, &pvalue->endOfRange);
10610 if (stat != ASN_OK) return stat;
10611
10612 return (stat);
10613 }
10614
10615 /**************************************************************/
10616 /* */
10617 /* AddressPattern */
10618 /* */
10619 /**************************************************************/
10620
10621 EXTERN int asn1PE_H225AddressPattern (OOCTXT* pctxt, H225AddressPattern* pvalue)
10622 {
10623 int stat = ASN_OK;
10624 ASN1BOOL extbit;
10625
10626 /* extension bit */
10627
10628 extbit = (ASN1BOOL)(pvalue->t > 2);
10629
10630 encodeBit (pctxt, extbit);
10631
10632 if (!extbit) {
10633
10634 /* Encode choice index value */
10635
10636 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
10637 if (stat != ASN_OK) return stat;
10638
10639 /* Encode root element data value */
10640
10641 switch (pvalue->t)
10642 {
10643 /* wildcard */
10644 case 1:
10645 stat = asn1PE_H225AliasAddress (pctxt, pvalue->u.wildcard);
10646 if (stat != ASN_OK) return stat;
10647 break;
10648
10649 /* range */
10650 case 2:
10651 stat = asn1PE_H225AddressPattern_range (pctxt, pvalue->u.range);
10652 if (stat != ASN_OK) return stat;
10653 break;
10654
10655 default:
10656 return ASN_E_INVOPT;
10657 }
10658 }
10659 else {
10660 /* Encode extension choice index value */
10661
10662 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
10663 if (stat != ASN_OK) return stat;
10664
10665 /* Encode extension element data value */
10666
10667 }
10668
10669 return (stat);
10670 }
10671
10672 /**************************************************************/
10673 /* */
10674 /* _SeqOfH225TransportAddress */
10675 /* */
10676 /**************************************************************/
10677
10678 EXTERN int asn1PE_H225_SeqOfH225TransportAddress (OOCTXT* pctxt, H225_SeqOfH225TransportAddress* pvalue)
10679 {
10680 int stat = ASN_OK;
10681 DListNode* pnode;
10682 ASN1UINT xx1;
10683 ASN1UINT enclen, fraglen;
10684
10685 enclen = fraglen = xx1 = 0;
10686 pnode = pvalue->head;
10687 for (;;) {
10688 /* encode length determinant */
10689
10690 stat = encodeLength (pctxt, (pvalue->count - enclen));
10691 if (stat < 0) return stat;
10692
10693 fraglen = stat;
10694 enclen += fraglen;
10695 /* encode elements */
10696
10697 for (; xx1 < enclen; xx1++) {
10698 stat = asn1PE_H225TransportAddress (pctxt, ((H225TransportAddress*)pnode->data));
10699 if (stat != ASN_OK) return stat;
10700 pnode = pnode->next;
10701 }
10702 if ( pvalue->count == enclen && fraglen < 16384) {
10703 break;
10704 }
10705 }
10706
10707 return (stat);
10708 }
10709
10710 /**************************************************************/
10711 /* */
10712 /* AlternateTransportAddresses */
10713 /* */
10714 /**************************************************************/
10715
10716 EXTERN int asn1PE_H225AlternateTransportAddresses (OOCTXT* pctxt, H225AlternateTransportAddresses* pvalue)
10717 {
10718 int stat = ASN_OK;
10719 ASN1BOOL extbit;
10720 ASN1OpenType openType;
10721 OOCTXT lctxt;
10722
10723 /* extension bit */
10724
10725 extbit = (ASN1BOOL)(pvalue->m.sctpPresent);
10726
10727 encodeBit (pctxt, extbit);
10728
10729 encodeBit (pctxt, (ASN1BOOL)pvalue->m.annexEPresent);
10730
10731 /* encode annexE */
10732
10733 if (pvalue->m.annexEPresent) {
10734 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->annexE);
10735 if (stat != ASN_OK) return stat;
10736 }
10737
10738 if (extbit) {
10739
10740 /* encode extension optional bits length */
10741
10742 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
10743 if (stat != ASN_OK) return stat;
10744
10745 /* encode optional bits */
10746
10747 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sctpPresent);
10748 /* encode extension elements */
10749
10750 if (pvalue->m.sctpPresent) {
10751 initContext (&lctxt);
10752 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10753 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10754
10755 stat = asn1PE_H225_SeqOfH225TransportAddress (&lctxt, &pvalue->sctp);
10756 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10757
10758 stat = encodeByteAlign (&lctxt);
10759 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10760
10761 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10762
10763 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10764 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10765
10766 freeContext (&lctxt);
10767 }
10768
10769 }
10770
10771 return (stat);
10772 }
10773
10774 /**************************************************************/
10775 /* */
10776 /* Endpoint */
10777 /* */
10778 /**************************************************************/
10779
10780 EXTERN int asn1PE_H225Endpoint (OOCTXT* pctxt, H225Endpoint* pvalue)
10781 {
10782 int stat = ASN_OK;
10783 ASN1BOOL extbit;
10784 ASN1OpenType openType;
10785 OOCTXT lctxt;
10786
10787 /* extension bit */
10788
10789 extbit = (ASN1BOOL)(pvalue->m.alternateTransportAddressesPresent ||
10790 pvalue->m.circuitInfoPresent ||
10791 pvalue->m.featureSetPresent);
10792
10793 encodeBit (pctxt, extbit);
10794
10795 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
10796
10797 encodeBit (pctxt, (ASN1BOOL)pvalue->m.aliasAddressPresent);
10798
10799 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callSignalAddressPresent);
10800
10801 encodeBit (pctxt, (ASN1BOOL)pvalue->m.rasAddressPresent);
10802
10803 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointTypePresent);
10804
10805 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
10806
10807 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
10808
10809 encodeBit (pctxt, (ASN1BOOL)pvalue->m.priorityPresent);
10810
10811 encodeBit (pctxt, (ASN1BOOL)pvalue->m.remoteExtensionAddressPresent);
10812
10813 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
10814
10815 /* encode nonStandardData */
10816
10817 if (pvalue->m.nonStandardDataPresent) {
10818 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
10819 if (stat != ASN_OK) return stat;
10820 }
10821
10822 /* encode aliasAddress */
10823
10824 if (pvalue->m.aliasAddressPresent) {
10825 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->aliasAddress);
10826 if (stat != ASN_OK) return stat;
10827 }
10828
10829 /* encode callSignalAddress */
10830
10831 if (pvalue->m.callSignalAddressPresent) {
10832 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
10833 if (stat != ASN_OK) return stat;
10834 }
10835
10836 /* encode rasAddress */
10837
10838 if (pvalue->m.rasAddressPresent) {
10839 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->rasAddress);
10840 if (stat != ASN_OK) return stat;
10841 }
10842
10843 /* encode endpointType */
10844
10845 if (pvalue->m.endpointTypePresent) {
10846 stat = asn1PE_H225EndpointType (pctxt, &pvalue->endpointType);
10847 if (stat != ASN_OK) return stat;
10848 }
10849
10850 /* encode tokens */
10851
10852 if (pvalue->m.tokensPresent) {
10853 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
10854 if (stat != ASN_OK) return stat;
10855 }
10856
10857 /* encode cryptoTokens */
10858
10859 if (pvalue->m.cryptoTokensPresent) {
10860 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
10861 if (stat != ASN_OK) return stat;
10862 }
10863
10864 /* encode priority */
10865
10866 if (pvalue->m.priorityPresent) {
10867 stat = encodeConsUnsigned (pctxt, pvalue->priority, 0U, 127U);
10868 if (stat != ASN_OK) return stat;
10869
10870 }
10871
10872 /* encode remoteExtensionAddress */
10873
10874 if (pvalue->m.remoteExtensionAddressPresent) {
10875 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->remoteExtensionAddress);
10876 if (stat != ASN_OK) return stat;
10877 }
10878
10879 /* encode destExtraCallInfo */
10880
10881 if (pvalue->m.destExtraCallInfoPresent) {
10882 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
10883 if (stat != ASN_OK) return stat;
10884 }
10885
10886 if (extbit) {
10887
10888 /* encode extension optional bits length */
10889
10890 stat = encodeSmallNonNegWholeNumber (pctxt, 2);
10891 if (stat != ASN_OK) return stat;
10892
10893 /* encode optional bits */
10894
10895 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateTransportAddressesPresent);
10896 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
10897 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
10898 /* encode extension elements */
10899
10900 if (pvalue->m.alternateTransportAddressesPresent) {
10901 initContext (&lctxt);
10902 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10903 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10904
10905 stat = asn1PE_H225AlternateTransportAddresses (&lctxt, &pvalue->alternateTransportAddresses);
10906 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10907
10908 stat = encodeByteAlign (&lctxt);
10909 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10910
10911 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10912
10913 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10914 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10915
10916 freeContext (&lctxt);
10917 }
10918
10919 if (pvalue->m.circuitInfoPresent) {
10920 initContext (&lctxt);
10921 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10922 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10923
10924 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
10925 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10926
10927 stat = encodeByteAlign (&lctxt);
10928 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10929
10930 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10931
10932 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10933 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10934
10935 freeContext (&lctxt);
10936 }
10937
10938 if (pvalue->m.featureSetPresent) {
10939 initContext (&lctxt);
10940 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
10941 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10942
10943 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
10944 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10945
10946 stat = encodeByteAlign (&lctxt);
10947 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10948
10949 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
10950
10951 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
10952 if (stat != ASN_OK) return freeContext (&lctxt), stat;
10953
10954 freeContext (&lctxt);
10955 }
10956
10957 }
10958
10959 return (stat);
10960 }
10961
10962 /**************************************************************/
10963 /* */
10964 /* UseSpecifiedTransport */
10965 /* */
10966 /**************************************************************/
10967
10968 EXTERN int asn1PE_H225UseSpecifiedTransport (OOCTXT* pctxt, H225UseSpecifiedTransport* pvalue)
10969 {
10970 int stat = ASN_OK;
10971 OOCTXT lctxt;
10972 ASN1OpenType openType;
10973 ASN1BOOL extbit;
10974
10975 /* extension bit */
10976
10977 extbit = (ASN1BOOL)(pvalue->t > 2);
10978
10979 encodeBit (pctxt, extbit);
10980
10981 if (!extbit) {
10982
10983 /* Encode choice index value */
10984
10985 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
10986 if (stat != ASN_OK) return stat;
10987
10988 /* Encode root element data value */
10989
10990 switch (pvalue->t)
10991 {
10992 /* tcp */
10993 case 1:
10994 /* NULL */
10995 break;
10996
10997 /* annexE */
10998 case 2:
10999 /* NULL */
11000 break;
11001
11002 default:
11003 return ASN_E_INVOPT;
11004 }
11005 }
11006 else {
11007 /* Encode extension choice index value */
11008
11009 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
11010 if (stat != ASN_OK) return stat;
11011
11012 /* Encode extension element data value */
11013
11014 initContext (&lctxt);
11015 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
11016 if (stat != ASN_OK) return freeContext (&lctxt), stat;
11017
11018 switch (pvalue->t)
11019 {
11020 /* sctp */
11021 case 3:
11022 /* NULL */
11023 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
11024 break;
11025
11026 default:
11027 ;
11028 }
11029
11030 stat = encodeByteAlign (pctxt);
11031 if (stat != ASN_OK) return freeContext (&lctxt), stat;
11032
11033 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
11034 if (stat != ASN_OK) return freeContext (&lctxt), stat;
11035
11036 freeContext (&lctxt);
11037 }
11038
11039 return (stat);
11040 }
11041
11042 /**************************************************************/
11043 /* */
11044 /* AlternateGK */
11045 /* */
11046 /**************************************************************/
11047
11048 EXTERN int asn1PE_H225AlternateGK (OOCTXT* pctxt, H225AlternateGK* pvalue)
11049 {
11050 int stat = ASN_OK;
11051 ASN1BOOL extbit;
11052
11053 /* extension bit */
11054
11055 extbit = 0;
11056
11057 encodeBit (pctxt, extbit);
11058
11059 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
11060
11061 /* encode rasAddress */
11062
11063 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->rasAddress);
11064 if (stat != ASN_OK) return stat;
11065
11066 /* encode gatekeeperIdentifier */
11067
11068 if (pvalue->m.gatekeeperIdentifierPresent) {
11069 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
11070 if (stat != ASN_OK) return stat;
11071 }
11072
11073 /* encode needToRegister */
11074
11075 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->needToRegister);
11076 if (stat != ASN_OK) return stat;
11077
11078 /* encode priority */
11079
11080 stat = encodeConsUnsigned (pctxt, pvalue->priority, 0U, 127U);
11081 if (stat != ASN_OK) return stat;
11082
11083 return (stat);
11084 }
11085
11086 /**************************************************************/
11087 /* */
11088 /* _SeqOfH225AlternateGK */
11089 /* */
11090 /**************************************************************/
11091
11092 EXTERN int asn1PE_H225_SeqOfH225AlternateGK (OOCTXT* pctxt, H225_SeqOfH225AlternateGK* pvalue)
11093 {
11094 int stat = ASN_OK;
11095 DListNode* pnode;
11096 ASN1UINT xx1;
11097 ASN1UINT enclen, fraglen;
11098
11099 enclen = fraglen = xx1 = 0;
11100 pnode = pvalue->head;
11101 for (;;) {
11102 /* encode length determinant */
11103
11104 stat = encodeLength (pctxt, (pvalue->count - enclen));
11105 if (stat < 0) return stat;
11106
11107 fraglen = stat;
11108 enclen += fraglen;
11109 /* encode elements */
11110
11111 for (; xx1 < enclen; xx1++) {
11112 stat = asn1PE_H225AlternateGK (pctxt, ((H225AlternateGK*)pnode->data));
11113 if (stat != ASN_OK) return stat;
11114 pnode = pnode->next;
11115 }
11116 if ( pvalue->count == enclen && fraglen < 16384) {
11117 break;
11118 }
11119 }
11120
11121 return (stat);
11122 }
11123
11124 /**************************************************************/
11125 /* */
11126 /* AltGKInfo */
11127 /* */
11128 /**************************************************************/
11129
11130 EXTERN int asn1PE_H225AltGKInfo (OOCTXT* pctxt, H225AltGKInfo* pvalue)
11131 {
11132 int stat = ASN_OK;
11133 ASN1BOOL extbit;
11134
11135 /* extension bit */
11136
11137 extbit = 0;
11138
11139 encodeBit (pctxt, extbit);
11140
11141 /* encode alternateGatekeeper */
11142
11143 stat = asn1PE_H225_SeqOfH225AlternateGK (pctxt, &pvalue->alternateGatekeeper);
11144 if (stat != ASN_OK) return stat;
11145
11146 /* encode altGKisPermanent */
11147
11148 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->altGKisPermanent);
11149 if (stat != ASN_OK) return stat;
11150
11151 return (stat);
11152 }
11153
11154 /**************************************************************/
11155 /* */
11156 /* SecurityErrors2 */
11157 /* */
11158 /**************************************************************/
11159
11160 EXTERN int asn1PE_H225SecurityErrors2 (OOCTXT* pctxt, H225SecurityErrors2* pvalue)
11161 {
11162 int stat = ASN_OK;
11163 ASN1BOOL extbit;
11164
11165 /* extension bit */
11166
11167 extbit = (ASN1BOOL)(pvalue->t > 6);
11168
11169 encodeBit (pctxt, extbit);
11170
11171 if (!extbit) {
11172
11173 /* Encode choice index value */
11174
11175 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 5);
11176 if (stat != ASN_OK) return stat;
11177
11178 /* Encode root element data value */
11179
11180 switch (pvalue->t)
11181 {
11182 /* securityWrongSyncTime */
11183 case 1:
11184 /* NULL */
11185 break;
11186
11187 /* securityReplay */
11188 case 2:
11189 /* NULL */
11190 break;
11191
11192 /* securityWrongGeneralID */
11193 case 3:
11194 /* NULL */
11195 break;
11196
11197 /* securityWrongSendersID */
11198 case 4:
11199 /* NULL */
11200 break;
11201
11202 /* securityIntegrityFailed */
11203 case 5:
11204 /* NULL */
11205 break;
11206
11207 /* securityWrongOID */
11208 case 6:
11209 /* NULL */
11210 break;
11211
11212 default:
11213 return ASN_E_INVOPT;
11214 }
11215 }
11216 else {
11217 /* Encode extension choice index value */
11218
11219 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 7);
11220 if (stat != ASN_OK) return stat;
11221
11222 /* Encode extension element data value */
11223
11224 }
11225
11226 return (stat);
11227 }
11228
11229 /**************************************************************/
11230 /* */
11231 /* EncryptIntAlg */
11232 /* */
11233 /**************************************************************/
11234
11235 EXTERN int asn1PE_H225EncryptIntAlg (OOCTXT* pctxt, H225EncryptIntAlg* pvalue)
11236 {
11237 int stat = ASN_OK;
11238 ASN1BOOL extbit;
11239
11240 /* extension bit */
11241
11242 extbit = (ASN1BOOL)(pvalue->t > 2);
11243
11244 encodeBit (pctxt, extbit);
11245
11246 if (!extbit) {
11247
11248 /* Encode choice index value */
11249
11250 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
11251 if (stat != ASN_OK) return stat;
11252
11253 /* Encode root element data value */
11254
11255 switch (pvalue->t)
11256 {
11257 /* nonStandard */
11258 case 1:
11259 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
11260 if (stat != ASN_OK) return stat;
11261 break;
11262
11263 /* isoAlgorithm */
11264 case 2:
11265 stat = encodeObjectIdentifier (pctxt, pvalue->u.isoAlgorithm);
11266 if (stat != ASN_OK) return stat;
11267 break;
11268
11269 default:
11270 return ASN_E_INVOPT;
11271 }
11272 }
11273 else {
11274 /* Encode extension choice index value */
11275
11276 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
11277 if (stat != ASN_OK) return stat;
11278
11279 /* Encode extension element data value */
11280
11281 }
11282
11283 return (stat);
11284 }
11285
11286 /**************************************************************/
11287 /* */
11288 /* NonIsoIntegrityMechanism */
11289 /* */
11290 /**************************************************************/
11291
11292 EXTERN int asn1PE_H225NonIsoIntegrityMechanism (OOCTXT* pctxt, H225NonIsoIntegrityMechanism* pvalue)
11293 {
11294 int stat = ASN_OK;
11295 ASN1BOOL extbit;
11296
11297 /* extension bit */
11298
11299 extbit = (ASN1BOOL)(pvalue->t > 4);
11300
11301 encodeBit (pctxt, extbit);
11302
11303 if (!extbit) {
11304
11305 /* Encode choice index value */
11306
11307 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
11308 if (stat != ASN_OK) return stat;
11309
11310 /* Encode root element data value */
11311
11312 switch (pvalue->t)
11313 {
11314 /* hMAC_MD5 */
11315 case 1:
11316 /* NULL */
11317 break;
11318
11319 /* hMAC_iso10118_2_s */
11320 case 2:
11321 stat = asn1PE_H225EncryptIntAlg (pctxt, pvalue->u.hMAC_iso10118_2_s);
11322 if (stat != ASN_OK) return stat;
11323 break;
11324
11325 /* hMAC_iso10118_2_l */
11326 case 3:
11327 stat = asn1PE_H225EncryptIntAlg (pctxt, pvalue->u.hMAC_iso10118_2_l);
11328 if (stat != ASN_OK) return stat;
11329 break;
11330
11331 /* hMAC_iso10118_3 */
11332 case 4:
11333 stat = encodeObjectIdentifier (pctxt, pvalue->u.hMAC_iso10118_3);
11334 if (stat != ASN_OK) return stat;
11335 break;
11336
11337 default:
11338 return ASN_E_INVOPT;
11339 }
11340 }
11341 else {
11342 /* Encode extension choice index value */
11343
11344 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
11345 if (stat != ASN_OK) return stat;
11346
11347 /* Encode extension element data value */
11348
11349 }
11350
11351 return (stat);
11352 }
11353
11354 /**************************************************************/
11355 /* */
11356 /* IntegrityMechanism */
11357 /* */
11358 /**************************************************************/
11359
11360 EXTERN int asn1PE_H225IntegrityMechanism (OOCTXT* pctxt, H225IntegrityMechanism* pvalue)
11361 {
11362 int stat = ASN_OK;
11363 ASN1BOOL extbit;
11364
11365 /* extension bit */
11366
11367 extbit = (ASN1BOOL)(pvalue->t > 4);
11368
11369 encodeBit (pctxt, extbit);
11370
11371 if (!extbit) {
11372
11373 /* Encode choice index value */
11374
11375 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
11376 if (stat != ASN_OK) return stat;
11377
11378 /* Encode root element data value */
11379
11380 switch (pvalue->t)
11381 {
11382 /* nonStandard */
11383 case 1:
11384 stat = asn1PE_H225NonStandardParameter (pctxt, pvalue->u.nonStandard);
11385 if (stat != ASN_OK) return stat;
11386 break;
11387
11388 /* digSig */
11389 case 2:
11390 /* NULL */
11391 break;
11392
11393 /* iso9797 */
11394 case 3:
11395 stat = encodeObjectIdentifier (pctxt, pvalue->u.iso9797);
11396 if (stat != ASN_OK) return stat;
11397 break;
11398
11399 /* nonIsoIM */
11400 case 4:
11401 stat = asn1PE_H225NonIsoIntegrityMechanism (pctxt, pvalue->u.nonIsoIM);
11402 if (stat != ASN_OK) return stat;
11403 break;
11404
11405 default:
11406 return ASN_E_INVOPT;
11407 }
11408 }
11409 else {
11410 /* Encode extension choice index value */
11411
11412 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
11413 if (stat != ASN_OK) return stat;
11414
11415 /* Encode extension element data value */
11416
11417 }
11418
11419 return (stat);
11420 }
11421
11422 /**************************************************************/
11423 /* */
11424 /* ICV */
11425 /* */
11426 /**************************************************************/
11427
11428 EXTERN int asn1PE_H225ICV (OOCTXT* pctxt, H225ICV* pvalue)
11429 {
11430 int stat = ASN_OK;
11431
11432 /* encode algorithmOID */
11433
11434 stat = encodeObjectIdentifier (pctxt, &pvalue->algorithmOID);
11435 if (stat != ASN_OK) return stat;
11436
11437 /* encode icv */
11438
11439 stat = encodeBitString (pctxt, pvalue->icv.numbits, pvalue->icv.data);
11440 if (stat != ASN_OK) return stat;
11441
11442 return (stat);
11443 }
11444
11445 /**************************************************************/
11446 /* */
11447 /* CapacityReportingCapability */
11448 /* */
11449 /**************************************************************/
11450
11451 EXTERN int asn1PE_H225CapacityReportingCapability (OOCTXT* pctxt, H225CapacityReportingCapability* pvalue)
11452 {
11453 int stat = ASN_OK;
11454 ASN1BOOL extbit;
11455
11456 /* extension bit */
11457
11458 extbit = 0;
11459
11460 encodeBit (pctxt, extbit);
11461
11462 /* encode canReportCallCapacity */
11463
11464 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->canReportCallCapacity);
11465 if (stat != ASN_OK) return stat;
11466
11467 return (stat);
11468 }
11469
11470 /**************************************************************/
11471 /* */
11472 /* CapacityReportingSpecification_when */
11473 /* */
11474 /**************************************************************/
11475
11476 EXTERN int asn1PE_H225CapacityReportingSpecification_when (OOCTXT* pctxt, H225CapacityReportingSpecification_when* pvalue)
11477 {
11478 int stat = ASN_OK;
11479 ASN1BOOL extbit;
11480
11481 /* extension bit */
11482
11483 extbit = 0;
11484
11485 encodeBit (pctxt, extbit);
11486
11487 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callStartPresent);
11488
11489 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callEndPresent);
11490
11491 /* encode callStart */
11492
11493 if (pvalue->m.callStartPresent) {
11494 /* NULL */
11495 }
11496
11497 /* encode callEnd */
11498
11499 if (pvalue->m.callEndPresent) {
11500 /* NULL */
11501 }
11502
11503 return (stat);
11504 }
11505
11506 /**************************************************************/
11507 /* */
11508 /* CapacityReportingSpecification */
11509 /* */
11510 /**************************************************************/
11511
11512 EXTERN int asn1PE_H225CapacityReportingSpecification (OOCTXT* pctxt, H225CapacityReportingSpecification* pvalue)
11513 {
11514 int stat = ASN_OK;
11515 ASN1BOOL extbit;
11516
11517 /* extension bit */
11518
11519 extbit = 0;
11520
11521 encodeBit (pctxt, extbit);
11522
11523 /* encode when */
11524
11525 stat = asn1PE_H225CapacityReportingSpecification_when (pctxt, &pvalue->when);
11526 if (stat != ASN_OK) return stat;
11527
11528 return (stat);
11529 }
11530
11531 /**************************************************************/
11532 /* */
11533 /* RasUsageInfoTypes */
11534 /* */
11535 /**************************************************************/
11536
11537 EXTERN int asn1PE_H225RasUsageInfoTypes (OOCTXT* pctxt, H225RasUsageInfoTypes* pvalue)
11538 {
11539 int stat = ASN_OK;
11540 ASN1BOOL extbit;
11541
11542 /* extension bit */
11543
11544 extbit = 0;
11545
11546 encodeBit (pctxt, extbit);
11547
11548 encodeBit (pctxt, (ASN1BOOL)pvalue->m.startTimePresent);
11549
11550 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endTimePresent);
11551
11552 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminationCausePresent);
11553
11554 /* encode nonStandardUsageTypes */
11555
11556 stat = asn1PE_H225_SeqOfH225NonStandardParameter (pctxt, &pvalue->nonStandardUsageTypes);
11557 if (stat != ASN_OK) return stat;
11558
11559 /* encode startTime */
11560
11561 if (pvalue->m.startTimePresent) {
11562 /* NULL */
11563 }
11564
11565 /* encode endTime */
11566
11567 if (pvalue->m.endTimePresent) {
11568 /* NULL */
11569 }
11570
11571 /* encode terminationCause */
11572
11573 if (pvalue->m.terminationCausePresent) {
11574 /* NULL */
11575 }
11576
11577 return (stat);
11578 }
11579
11580 /**************************************************************/
11581 /* */
11582 /* RasUsageSpecification_when */
11583 /* */
11584 /**************************************************************/
11585
11586 EXTERN int asn1PE_H225RasUsageSpecification_when (OOCTXT* pctxt, H225RasUsageSpecification_when* pvalue)
11587 {
11588 int stat = ASN_OK;
11589 ASN1BOOL extbit;
11590
11591 /* extension bit */
11592
11593 extbit = 0;
11594
11595 encodeBit (pctxt, extbit);
11596
11597 encodeBit (pctxt, (ASN1BOOL)pvalue->m.startPresent);
11598
11599 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endPresent);
11600
11601 encodeBit (pctxt, (ASN1BOOL)pvalue->m.inIrrPresent);
11602
11603 /* encode start */
11604
11605 if (pvalue->m.startPresent) {
11606 /* NULL */
11607 }
11608
11609 /* encode end */
11610
11611 if (pvalue->m.endPresent) {
11612 /* NULL */
11613 }
11614
11615 /* encode inIrr */
11616
11617 if (pvalue->m.inIrrPresent) {
11618 /* NULL */
11619 }
11620
11621 return (stat);
11622 }
11623
11624 /**************************************************************/
11625 /* */
11626 /* RasUsageSpecification_callStartingPoint */
11627 /* */
11628 /**************************************************************/
11629
11630 EXTERN int asn1PE_H225RasUsageSpecification_callStartingPoint (OOCTXT* pctxt, H225RasUsageSpecification_callStartingPoint* pvalue)
11631 {
11632 int stat = ASN_OK;
11633 ASN1BOOL extbit;
11634
11635 /* extension bit */
11636
11637 extbit = 0;
11638
11639 encodeBit (pctxt, extbit);
11640
11641 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alertingPresent);
11642
11643 encodeBit (pctxt, (ASN1BOOL)pvalue->m.connectPresent);
11644
11645 /* encode alerting */
11646
11647 if (pvalue->m.alertingPresent) {
11648 /* NULL */
11649 }
11650
11651 /* encode connect */
11652
11653 if (pvalue->m.connectPresent) {
11654 /* NULL */
11655 }
11656
11657 return (stat);
11658 }
11659
11660 /**************************************************************/
11661 /* */
11662 /* RasUsageSpecification */
11663 /* */
11664 /**************************************************************/
11665
11666 EXTERN int asn1PE_H225RasUsageSpecification (OOCTXT* pctxt, H225RasUsageSpecification* pvalue)
11667 {
11668 int stat = ASN_OK;
11669 ASN1BOOL extbit;
11670
11671 /* extension bit */
11672
11673 extbit = 0;
11674
11675 encodeBit (pctxt, extbit);
11676
11677 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callStartingPointPresent);
11678
11679 /* encode when */
11680
11681 stat = asn1PE_H225RasUsageSpecification_when (pctxt, &pvalue->when);
11682 if (stat != ASN_OK) return stat;
11683
11684 /* encode callStartingPoint */
11685
11686 if (pvalue->m.callStartingPointPresent) {
11687 stat = asn1PE_H225RasUsageSpecification_callStartingPoint (pctxt, &pvalue->callStartingPoint);
11688 if (stat != ASN_OK) return stat;
11689 }
11690
11691 /* encode required */
11692
11693 stat = asn1PE_H225RasUsageInfoTypes (pctxt, &pvalue->required);
11694 if (stat != ASN_OK) return stat;
11695
11696 return (stat);
11697 }
11698
11699 /**************************************************************/
11700 /* */
11701 /* RasUsageInformation */
11702 /* */
11703 /**************************************************************/
11704
11705 EXTERN int asn1PE_H225RasUsageInformation (OOCTXT* pctxt, H225RasUsageInformation* pvalue)
11706 {
11707 int stat = ASN_OK;
11708 ASN1BOOL extbit;
11709
11710 /* extension bit */
11711
11712 extbit = 0;
11713
11714 encodeBit (pctxt, extbit);
11715
11716 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alertingTimePresent);
11717
11718 encodeBit (pctxt, (ASN1BOOL)pvalue->m.connectTimePresent);
11719
11720 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endTimePresent);
11721
11722 /* encode nonStandardUsageFields */
11723
11724 stat = asn1PE_H225_SeqOfH225NonStandardParameter (pctxt, &pvalue->nonStandardUsageFields);
11725 if (stat != ASN_OK) return stat;
11726
11727 /* encode alertingTime */
11728
11729 if (pvalue->m.alertingTimePresent) {
11730 stat = asn1PE_H235TimeStamp (pctxt, pvalue->alertingTime);
11731 if (stat != ASN_OK) return stat;
11732 }
11733
11734 /* encode connectTime */
11735
11736 if (pvalue->m.connectTimePresent) {
11737 stat = asn1PE_H235TimeStamp (pctxt, pvalue->connectTime);
11738 if (stat != ASN_OK) return stat;
11739 }
11740
11741 /* encode endTime */
11742
11743 if (pvalue->m.endTimePresent) {
11744 stat = asn1PE_H235TimeStamp (pctxt, pvalue->endTime);
11745 if (stat != ASN_OK) return stat;
11746 }
11747
11748 return (stat);
11749 }
11750
11751 /**************************************************************/
11752 /* */
11753 /* CallTerminationCause */
11754 /* */
11755 /**************************************************************/
11756
11757 EXTERN int asn1PE_H225CallTerminationCause (OOCTXT* pctxt, H225CallTerminationCause* pvalue)
11758 {
11759 int stat = ASN_OK;
11760 ASN1BOOL extbit;
11761
11762 /* extension bit */
11763
11764 extbit = (ASN1BOOL)(pvalue->t > 2);
11765
11766 encodeBit (pctxt, extbit);
11767
11768 if (!extbit) {
11769
11770 /* Encode choice index value */
11771
11772 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
11773 if (stat != ASN_OK) return stat;
11774
11775 /* Encode root element data value */
11776
11777 switch (pvalue->t)
11778 {
11779 /* releaseCompleteReason */
11780 case 1:
11781 stat = asn1PE_H225ReleaseCompleteReason (pctxt, pvalue->u.releaseCompleteReason);
11782 if (stat != ASN_OK) return stat;
11783 break;
11784
11785 /* releaseCompleteCauseIE */
11786 case 2:
11787 stat = asn1PE_H225CallTerminationCause_releaseCompleteCauseIE (pctxt, pvalue->u.releaseCompleteCauseIE);
11788 if (stat != ASN_OK) return stat;
11789 break;
11790
11791 default:
11792 return ASN_E_INVOPT;
11793 }
11794 }
11795 else {
11796 /* Encode extension choice index value */
11797
11798 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
11799 if (stat != ASN_OK) return stat;
11800
11801 /* Encode extension element data value */
11802
11803 }
11804
11805 return (stat);
11806 }
11807
11808 /**************************************************************/
11809 /* */
11810 /* TransportChannelInfo */
11811 /* */
11812 /**************************************************************/
11813
11814 EXTERN int asn1PE_H225TransportChannelInfo (OOCTXT* pctxt, H225TransportChannelInfo* pvalue)
11815 {
11816 int stat = ASN_OK;
11817 ASN1BOOL extbit;
11818
11819 /* extension bit */
11820
11821 extbit = 0;
11822
11823 encodeBit (pctxt, extbit);
11824
11825 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sendAddressPresent);
11826
11827 encodeBit (pctxt, (ASN1BOOL)pvalue->m.recvAddressPresent);
11828
11829 /* encode sendAddress */
11830
11831 if (pvalue->m.sendAddressPresent) {
11832 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->sendAddress);
11833 if (stat != ASN_OK) return stat;
11834 }
11835
11836 /* encode recvAddress */
11837
11838 if (pvalue->m.recvAddressPresent) {
11839 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->recvAddress);
11840 if (stat != ASN_OK) return stat;
11841 }
11842
11843 return (stat);
11844 }
11845
11846 /**************************************************************/
11847 /* */
11848 /* BandwidthDetails */
11849 /* */
11850 /**************************************************************/
11851
11852 EXTERN int asn1PE_H225BandwidthDetails (OOCTXT* pctxt, H225BandwidthDetails* pvalue)
11853 {
11854 int stat = ASN_OK;
11855 ASN1BOOL extbit;
11856
11857 /* extension bit */
11858
11859 extbit = 0;
11860
11861 encodeBit (pctxt, extbit);
11862
11863 /* encode sender */
11864
11865 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->sender);
11866 if (stat != ASN_OK) return stat;
11867
11868 /* encode multicast */
11869
11870 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->multicast);
11871 if (stat != ASN_OK) return stat;
11872
11873 /* encode bandwidth */
11874
11875 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandwidth);
11876 if (stat != ASN_OK) return stat;
11877
11878 /* encode rtcpAddresses */
11879
11880 stat = asn1PE_H225TransportChannelInfo (pctxt, &pvalue->rtcpAddresses);
11881 if (stat != ASN_OK) return stat;
11882
11883 return (stat);
11884 }
11885
11886 /**************************************************************/
11887 /* */
11888 /* CallCreditCapability */
11889 /* */
11890 /**************************************************************/
11891
11892 EXTERN int asn1PE_H225CallCreditCapability (OOCTXT* pctxt, H225CallCreditCapability* pvalue)
11893 {
11894 int stat = ASN_OK;
11895 ASN1BOOL extbit;
11896
11897 /* extension bit */
11898
11899 extbit = 0;
11900
11901 encodeBit (pctxt, extbit);
11902
11903 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canDisplayAmountStringPresent);
11904
11905 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canEnforceDurationLimitPresent);
11906
11907 /* encode canDisplayAmountString */
11908
11909 if (pvalue->m.canDisplayAmountStringPresent) {
11910 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->canDisplayAmountString);
11911 if (stat != ASN_OK) return stat;
11912 }
11913
11914 /* encode canEnforceDurationLimit */
11915
11916 if (pvalue->m.canEnforceDurationLimitPresent) {
11917 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->canEnforceDurationLimit);
11918 if (stat != ASN_OK) return stat;
11919 }
11920
11921 return (stat);
11922 }
11923
11924 /**************************************************************/
11925 /* */
11926 /* RTPSession_associatedSessionIds */
11927 /* */
11928 /**************************************************************/
11929
11930 EXTERN int asn1PE_H225RTPSession_associatedSessionIds (OOCTXT* pctxt, H225RTPSession_associatedSessionIds* pvalue)
11931 {
11932 int stat = ASN_OK;
11933 ASN1UINT xx1;
11934
11935 /* encode length determinant */
11936
11937 stat = encodeLength (pctxt, pvalue->n);
11938 if (stat < 0) return stat;
11939
11940 /* encode elements */
11941
11942 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
11943 stat = encodeConsUnsigned (pctxt, pvalue->elem[xx1], 1U, 255U);
11944 if (stat != ASN_OK) return stat;
11945
11946 }
11947
11948 return (stat);
11949 }
11950
11951 /**************************************************************/
11952 /* */
11953 /* RTPSession */
11954 /* */
11955 /**************************************************************/
11956
11957 EXTERN int asn1PE_H225RTPSession (OOCTXT* pctxt, H225RTPSession* pvalue)
11958 {
11959 int stat = ASN_OK;
11960 ASN1BOOL extbit;
11961 ASN1OpenType openType;
11962 OOCTXT lctxt;
11963
11964 /* extension bit */
11965
11966 extbit = (ASN1BOOL)(pvalue->m.multicastPresent ||
11967 pvalue->m.bandwidthPresent);
11968
11969 encodeBit (pctxt, extbit);
11970
11971 /* encode rtpAddress */
11972
11973 stat = asn1PE_H225TransportChannelInfo (pctxt, &pvalue->rtpAddress);
11974 if (stat != ASN_OK) return stat;
11975
11976 /* encode rtcpAddress */
11977
11978 stat = asn1PE_H225TransportChannelInfo (pctxt, &pvalue->rtcpAddress);
11979 if (stat != ASN_OK) return stat;
11980
11981 /* encode cname */
11982
11983 stat = encodeConstrainedStringEx (pctxt, pvalue->cname, 0, 8, 7, 7);
11984 if (stat != ASN_OK) return stat;
11985
11986 /* encode ssrc */
11987
11988 stat = encodeConsUnsigned (pctxt, pvalue->ssrc, 1U, ASN1UINT_MAX);
11989 if (stat != ASN_OK) return stat;
11990
11991 /* encode sessionId */
11992
11993 stat = encodeConsUnsigned (pctxt, pvalue->sessionId, 1U, 255U);
11994 if (stat != ASN_OK) return stat;
11995
11996 /* encode associatedSessionIds */
11997
11998 stat = asn1PE_H225RTPSession_associatedSessionIds (pctxt, &pvalue->associatedSessionIds);
11999 if (stat != ASN_OK) return stat;
12000
12001 if (extbit) {
12002
12003 /* encode extension optional bits length */
12004
12005 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
12006 if (stat != ASN_OK) return stat;
12007
12008 /* encode optional bits */
12009
12010 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multicastPresent);
12011 encodeBit (pctxt, (ASN1BOOL)pvalue->m.bandwidthPresent);
12012 /* encode extension elements */
12013
12014 if (pvalue->m.multicastPresent) {
12015 initContext (&lctxt);
12016 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12017 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12018
12019 /* NULL */
12020
12021 stat = encodeByteAlign (&lctxt);
12022 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12023
12024 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12025
12026 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12027 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12028
12029 freeContext (&lctxt);
12030 }
12031
12032 if (pvalue->m.bandwidthPresent) {
12033 initContext (&lctxt);
12034 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12035 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12036
12037 stat = asn1PE_H225BandWidth (&lctxt, pvalue->bandwidth);
12038 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12039
12040 stat = encodeByteAlign (&lctxt);
12041 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12042
12043 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12044
12045 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12046 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12047
12048 freeContext (&lctxt);
12049 }
12050
12051 }
12052
12053 return (stat);
12054 }
12055
12056 /**************************************************************/
12057 /* */
12058 /* _SeqOfH225Endpoint */
12059 /* */
12060 /**************************************************************/
12061
12062 EXTERN int asn1PE_H225_SeqOfH225Endpoint (OOCTXT* pctxt, H225_SeqOfH225Endpoint* pvalue)
12063 {
12064 int stat = ASN_OK;
12065 DListNode* pnode;
12066 ASN1UINT xx1;
12067 ASN1UINT enclen, fraglen;
12068
12069 enclen = fraglen = xx1 = 0;
12070 pnode = pvalue->head;
12071 for (;;) {
12072 /* encode length determinant */
12073
12074 stat = encodeLength (pctxt, (pvalue->count - enclen));
12075 if (stat < 0) return stat;
12076
12077 fraglen = stat;
12078 enclen += fraglen;
12079 /* encode elements */
12080
12081 for (; xx1 < enclen; xx1++) {
12082 stat = asn1PE_H225Endpoint (pctxt, ((H225Endpoint*)pnode->data));
12083 if (stat != ASN_OK) return stat;
12084 pnode = pnode->next;
12085 }
12086 if ( pvalue->count == enclen && fraglen < 16384) {
12087 break;
12088 }
12089 }
12090
12091 return (stat);
12092 }
12093
12094 /**************************************************************/
12095 /* */
12096 /* _SeqOfH225AuthenticationMechanism */
12097 /* */
12098 /**************************************************************/
12099
12100 EXTERN int asn1PE_H225_SeqOfH225AuthenticationMechanism (OOCTXT* pctxt, H225_SeqOfH225AuthenticationMechanism* pvalue)
12101 {
12102 int stat = ASN_OK;
12103 DListNode* pnode;
12104 ASN1UINT xx1;
12105 ASN1UINT enclen, fraglen;
12106
12107 enclen = fraglen = xx1 = 0;
12108 pnode = pvalue->head;
12109 for (;;) {
12110 /* encode length determinant */
12111
12112 stat = encodeLength (pctxt, (pvalue->count - enclen));
12113 if (stat < 0) return stat;
12114
12115 fraglen = stat;
12116 enclen += fraglen;
12117 /* encode elements */
12118
12119 for (; xx1 < enclen; xx1++) {
12120 stat = asn1PE_H235AuthenticationMechanism (pctxt, ((H235AuthenticationMechanism*)pnode->data));
12121 if (stat != ASN_OK) return stat;
12122 pnode = pnode->next;
12123 }
12124 if ( pvalue->count == enclen && fraglen < 16384) {
12125 break;
12126 }
12127 }
12128
12129 return (stat);
12130 }
12131
12132 /**************************************************************/
12133 /* */
12134 /* GatekeeperRequest_algorithmOIDs */
12135 /* */
12136 /**************************************************************/
12137
12138 EXTERN int asn1PE_H225GatekeeperRequest_algorithmOIDs (OOCTXT* pctxt, H225GatekeeperRequest_algorithmOIDs* pvalue)
12139 {
12140 int stat = ASN_OK;
12141 ASN1UINT xx1;
12142
12143 /* encode length determinant */
12144
12145 stat = encodeLength (pctxt, pvalue->n);
12146 if (stat < 0) return stat;
12147
12148 /* encode elements */
12149
12150 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
12151 stat = encodeObjectIdentifier (pctxt, &pvalue->elem[xx1]);
12152 if (stat != ASN_OK) return stat;
12153 }
12154
12155 return (stat);
12156 }
12157
12158 /**************************************************************/
12159 /* */
12160 /* _SeqOfH225IntegrityMechanism */
12161 /* */
12162 /**************************************************************/
12163
12164 EXTERN int asn1PE_H225_SeqOfH225IntegrityMechanism (OOCTXT* pctxt, H225_SeqOfH225IntegrityMechanism* pvalue)
12165 {
12166 int stat = ASN_OK;
12167 DListNode* pnode;
12168 ASN1UINT xx1;
12169 ASN1UINT enclen, fraglen;
12170
12171 enclen = fraglen = xx1 = 0;
12172 pnode = pvalue->head;
12173 for (;;) {
12174 /* encode length determinant */
12175
12176 stat = encodeLength (pctxt, (pvalue->count - enclen));
12177 if (stat < 0) return stat;
12178
12179 fraglen = stat;
12180 enclen += fraglen;
12181 /* encode elements */
12182
12183 for (; xx1 < enclen; xx1++) {
12184 stat = asn1PE_H225IntegrityMechanism (pctxt, ((H225IntegrityMechanism*)pnode->data));
12185 if (stat != ASN_OK) return stat;
12186 pnode = pnode->next;
12187 }
12188 if ( pvalue->count == enclen && fraglen < 16384) {
12189 break;
12190 }
12191 }
12192
12193 return (stat);
12194 }
12195
12196 /**************************************************************/
12197 /* */
12198 /* GatekeeperRequest */
12199 /* */
12200 /**************************************************************/
12201
12202 EXTERN int asn1PE_H225GatekeeperRequest (OOCTXT* pctxt, H225GatekeeperRequest* pvalue)
12203 {
12204 int stat = ASN_OK;
12205 ASN1BOOL extbit;
12206 ASN1OpenType openType;
12207 OOCTXT lctxt;
12208
12209 /* extension bit */
12210
12211 extbit = (ASN1BOOL)(pvalue->m.alternateEndpointsPresent ||
12212 pvalue->m.tokensPresent ||
12213 pvalue->m.cryptoTokensPresent ||
12214 pvalue->m.authenticationCapabilityPresent ||
12215 pvalue->m.algorithmOIDsPresent ||
12216 pvalue->m.integrityPresent ||
12217 pvalue->m.integrityCheckValuePresent ||
12218 pvalue->m.supportsAltGKPresent ||
12219 pvalue->m.featureSetPresent ||
12220 pvalue->m.genericDataPresent);
12221
12222 encodeBit (pctxt, extbit);
12223
12224 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
12225
12226 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
12227
12228 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callServicesPresent);
12229
12230 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointAliasPresent);
12231
12232 /* encode requestSeqNum */
12233
12234 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
12235 if (stat != ASN_OK) return stat;
12236
12237 /* encode protocolIdentifier */
12238
12239 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12240 if (stat != ASN_OK) return stat;
12241
12242 /* encode nonStandardData */
12243
12244 if (pvalue->m.nonStandardDataPresent) {
12245 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
12246 if (stat != ASN_OK) return stat;
12247 }
12248
12249 /* encode rasAddress */
12250
12251 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->rasAddress);
12252 if (stat != ASN_OK) return stat;
12253
12254 /* encode endpointType */
12255
12256 stat = asn1PE_H225EndpointType (pctxt, &pvalue->endpointType);
12257 if (stat != ASN_OK) return stat;
12258
12259 /* encode gatekeeperIdentifier */
12260
12261 if (pvalue->m.gatekeeperIdentifierPresent) {
12262 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
12263 if (stat != ASN_OK) return stat;
12264 }
12265
12266 /* encode callServices */
12267
12268 if (pvalue->m.callServicesPresent) {
12269 stat = asn1PE_H225QseriesOptions (pctxt, &pvalue->callServices);
12270 if (stat != ASN_OK) return stat;
12271 }
12272
12273 /* encode endpointAlias */
12274
12275 if (pvalue->m.endpointAliasPresent) {
12276 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
12277 if (stat != ASN_OK) return stat;
12278 }
12279
12280 if (extbit) {
12281
12282 /* encode extension optional bits length */
12283
12284 stat = encodeSmallNonNegWholeNumber (pctxt, 9);
12285 if (stat != ASN_OK) return stat;
12286
12287 /* encode optional bits */
12288
12289 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateEndpointsPresent);
12290 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
12291 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
12292 encodeBit (pctxt, (ASN1BOOL)pvalue->m.authenticationCapabilityPresent);
12293 encodeBit (pctxt, (ASN1BOOL)pvalue->m.algorithmOIDsPresent);
12294 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityPresent);
12295 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
12296 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportsAltGKPresent);
12297 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
12298 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
12299 /* encode extension elements */
12300
12301 if (pvalue->m.alternateEndpointsPresent) {
12302 initContext (&lctxt);
12303 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12304 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12305
12306 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->alternateEndpoints);
12307 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12308
12309 stat = encodeByteAlign (&lctxt);
12310 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12311
12312 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12313
12314 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12315 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12316
12317 freeContext (&lctxt);
12318 }
12319
12320 if (pvalue->m.tokensPresent) {
12321 initContext (&lctxt);
12322 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12323 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12324
12325 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
12326 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12327
12328 stat = encodeByteAlign (&lctxt);
12329 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12330
12331 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12332
12333 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12334 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12335
12336 freeContext (&lctxt);
12337 }
12338
12339 if (pvalue->m.cryptoTokensPresent) {
12340 initContext (&lctxt);
12341 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12342 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12343
12344 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
12345 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12346
12347 stat = encodeByteAlign (&lctxt);
12348 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12349
12350 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12351
12352 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12353 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12354
12355 freeContext (&lctxt);
12356 }
12357
12358 if (pvalue->m.authenticationCapabilityPresent) {
12359 initContext (&lctxt);
12360 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12361 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12362
12363 stat = asn1PE_H225_SeqOfH225AuthenticationMechanism (&lctxt, &pvalue->authenticationCapability);
12364 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12365
12366 stat = encodeByteAlign (&lctxt);
12367 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12368
12369 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12370
12371 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12372 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12373
12374 freeContext (&lctxt);
12375 }
12376
12377 if (pvalue->m.algorithmOIDsPresent) {
12378 initContext (&lctxt);
12379 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12380 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12381
12382 stat = asn1PE_H225GatekeeperRequest_algorithmOIDs (&lctxt, &pvalue->algorithmOIDs);
12383 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12384
12385 stat = encodeByteAlign (&lctxt);
12386 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12387
12388 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12389
12390 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12391 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12392
12393 freeContext (&lctxt);
12394 }
12395
12396 if (pvalue->m.integrityPresent) {
12397 initContext (&lctxt);
12398 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12399 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12400
12401 stat = asn1PE_H225_SeqOfH225IntegrityMechanism (&lctxt, &pvalue->integrity);
12402 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12403
12404 stat = encodeByteAlign (&lctxt);
12405 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12406
12407 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12408
12409 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12410 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12411
12412 freeContext (&lctxt);
12413 }
12414
12415 if (pvalue->m.integrityCheckValuePresent) {
12416 initContext (&lctxt);
12417 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12418 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12419
12420 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
12421 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12422
12423 stat = encodeByteAlign (&lctxt);
12424 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12425
12426 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12427
12428 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12429 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12430
12431 freeContext (&lctxt);
12432 }
12433
12434 if (pvalue->m.supportsAltGKPresent) {
12435 initContext (&lctxt);
12436 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12437 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12438
12439 /* NULL */
12440
12441 stat = encodeByteAlign (&lctxt);
12442 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12443
12444 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12445
12446 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12447 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12448
12449 freeContext (&lctxt);
12450 }
12451
12452 if (pvalue->m.featureSetPresent) {
12453 initContext (&lctxt);
12454 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12455 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12456
12457 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
12458 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12459
12460 stat = encodeByteAlign (&lctxt);
12461 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12462
12463 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12464
12465 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12466 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12467
12468 freeContext (&lctxt);
12469 }
12470
12471 if (pvalue->m.genericDataPresent) {
12472 initContext (&lctxt);
12473 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12474 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12475
12476 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
12477 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12478
12479 stat = encodeByteAlign (&lctxt);
12480 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12481
12482 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12483
12484 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12485 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12486
12487 freeContext (&lctxt);
12488 }
12489
12490 }
12491
12492 return (stat);
12493 }
12494
12495 /**************************************************************/
12496 /* */
12497 /* GatekeeperConfirm */
12498 /* */
12499 /**************************************************************/
12500
12501 EXTERN int asn1PE_H225GatekeeperConfirm (OOCTXT* pctxt, H225GatekeeperConfirm* pvalue)
12502 {
12503 int stat = ASN_OK;
12504 ASN1BOOL extbit;
12505 ASN1OpenType openType;
12506 OOCTXT lctxt;
12507
12508 /* extension bit */
12509
12510 extbit = (ASN1BOOL)(pvalue->m.alternateGatekeeperPresent ||
12511 pvalue->m.authenticationModePresent ||
12512 pvalue->m.tokensPresent ||
12513 pvalue->m.cryptoTokensPresent ||
12514 pvalue->m.algorithmOIDPresent ||
12515 pvalue->m.integrityPresent ||
12516 pvalue->m.integrityCheckValuePresent ||
12517 pvalue->m.featureSetPresent ||
12518 pvalue->m.genericDataPresent);
12519
12520 encodeBit (pctxt, extbit);
12521
12522 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
12523
12524 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
12525
12526 /* encode requestSeqNum */
12527
12528 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
12529 if (stat != ASN_OK) return stat;
12530
12531 /* encode protocolIdentifier */
12532
12533 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12534 if (stat != ASN_OK) return stat;
12535
12536 /* encode nonStandardData */
12537
12538 if (pvalue->m.nonStandardDataPresent) {
12539 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
12540 if (stat != ASN_OK) return stat;
12541 }
12542
12543 /* encode gatekeeperIdentifier */
12544
12545 if (pvalue->m.gatekeeperIdentifierPresent) {
12546 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
12547 if (stat != ASN_OK) return stat;
12548 }
12549
12550 /* encode rasAddress */
12551
12552 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->rasAddress);
12553 if (stat != ASN_OK) return stat;
12554
12555 if (extbit) {
12556
12557 /* encode extension optional bits length */
12558
12559 stat = encodeSmallNonNegWholeNumber (pctxt, 8);
12560 if (stat != ASN_OK) return stat;
12561
12562 /* encode optional bits */
12563
12564 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateGatekeeperPresent);
12565 encodeBit (pctxt, (ASN1BOOL)pvalue->m.authenticationModePresent);
12566 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
12567 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
12568 encodeBit (pctxt, (ASN1BOOL)pvalue->m.algorithmOIDPresent);
12569 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityPresent);
12570 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
12571 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
12572 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
12573 /* encode extension elements */
12574
12575 if (pvalue->m.alternateGatekeeperPresent) {
12576 initContext (&lctxt);
12577 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12578 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12579
12580 stat = asn1PE_H225_SeqOfH225AlternateGK (&lctxt, &pvalue->alternateGatekeeper);
12581 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12582
12583 stat = encodeByteAlign (&lctxt);
12584 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12585
12586 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12587
12588 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12590
12591 freeContext (&lctxt);
12592 }
12593
12594 if (pvalue->m.authenticationModePresent) {
12595 initContext (&lctxt);
12596 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12597 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12598
12599 stat = asn1PE_H235AuthenticationMechanism (&lctxt, &pvalue->authenticationMode);
12600 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12601
12602 stat = encodeByteAlign (&lctxt);
12603 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12604
12605 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12606
12607 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12608 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12609
12610 freeContext (&lctxt);
12611 }
12612
12613 if (pvalue->m.tokensPresent) {
12614 initContext (&lctxt);
12615 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12616 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12617
12618 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
12619 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12620
12621 stat = encodeByteAlign (&lctxt);
12622 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12623
12624 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12625
12626 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12628
12629 freeContext (&lctxt);
12630 }
12631
12632 if (pvalue->m.cryptoTokensPresent) {
12633 initContext (&lctxt);
12634 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12635 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12636
12637 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
12638 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12639
12640 stat = encodeByteAlign (&lctxt);
12641 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12642
12643 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12644
12645 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12647
12648 freeContext (&lctxt);
12649 }
12650
12651 if (pvalue->m.algorithmOIDPresent) {
12652 initContext (&lctxt);
12653 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12654 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12655
12656 stat = encodeObjectIdentifier (&lctxt, &pvalue->algorithmOID);
12657 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12658
12659 stat = encodeByteAlign (&lctxt);
12660 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12661
12662 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12663
12664 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12665 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12666
12667 freeContext (&lctxt);
12668 }
12669
12670 if (pvalue->m.integrityPresent) {
12671 initContext (&lctxt);
12672 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12673 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12674
12675 stat = asn1PE_H225_SeqOfH225IntegrityMechanism (&lctxt, &pvalue->integrity);
12676 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12677
12678 stat = encodeByteAlign (&lctxt);
12679 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12680
12681 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12682
12683 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12684 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12685
12686 freeContext (&lctxt);
12687 }
12688
12689 if (pvalue->m.integrityCheckValuePresent) {
12690 initContext (&lctxt);
12691 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12692 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12693
12694 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
12695 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12696
12697 stat = encodeByteAlign (&lctxt);
12698 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12699
12700 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12701
12702 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12703 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12704
12705 freeContext (&lctxt);
12706 }
12707
12708 if (pvalue->m.featureSetPresent) {
12709 initContext (&lctxt);
12710 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12711 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12712
12713 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
12714 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12715
12716 stat = encodeByteAlign (&lctxt);
12717 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12718
12719 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12720
12721 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12722 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12723
12724 freeContext (&lctxt);
12725 }
12726
12727 if (pvalue->m.genericDataPresent) {
12728 initContext (&lctxt);
12729 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12730 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12731
12732 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
12733 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12734
12735 stat = encodeByteAlign (&lctxt);
12736 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12737
12738 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12739
12740 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12741 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12742
12743 freeContext (&lctxt);
12744 }
12745
12746 }
12747
12748 return (stat);
12749 }
12750
12751 /**************************************************************/
12752 /* */
12753 /* GatekeeperRejectReason */
12754 /* */
12755 /**************************************************************/
12756
12757 EXTERN int asn1PE_H225GatekeeperRejectReason (OOCTXT* pctxt, H225GatekeeperRejectReason* pvalue)
12758 {
12759 int stat = ASN_OK;
12760 OOCTXT lctxt;
12761 ASN1OpenType openType;
12762 ASN1BOOL extbit;
12763
12764 /* extension bit */
12765
12766 extbit = (ASN1BOOL)(pvalue->t > 4);
12767
12768 encodeBit (pctxt, extbit);
12769
12770 if (!extbit) {
12771
12772 /* Encode choice index value */
12773
12774 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
12775 if (stat != ASN_OK) return stat;
12776
12777 /* Encode root element data value */
12778
12779 switch (pvalue->t)
12780 {
12781 /* resourceUnavailable */
12782 case 1:
12783 /* NULL */
12784 break;
12785
12786 /* terminalExcluded */
12787 case 2:
12788 /* NULL */
12789 break;
12790
12791 /* invalidRevision */
12792 case 3:
12793 /* NULL */
12794 break;
12795
12796 /* undefinedReason */
12797 case 4:
12798 /* NULL */
12799 break;
12800
12801 default:
12802 return ASN_E_INVOPT;
12803 }
12804 }
12805 else {
12806 /* Encode extension choice index value */
12807
12808 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
12809 if (stat != ASN_OK) return stat;
12810
12811 /* Encode extension element data value */
12812
12813 initContext (&lctxt);
12814 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12815 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12816
12817 switch (pvalue->t)
12818 {
12819 /* securityDenial */
12820 case 5:
12821 /* NULL */
12822 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12823 break;
12824
12825 /* genericDataReason */
12826 case 6:
12827 /* NULL */
12828 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12829 break;
12830
12831 /* neededFeatureNotSupported */
12832 case 7:
12833 /* NULL */
12834 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12835 break;
12836
12837 /* securityError */
12838 case 8:
12839 stat = asn1PE_H225SecurityErrors (&lctxt, pvalue->u.securityError);
12840 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12841 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12842 break;
12843
12844 default:
12845 ;
12846 }
12847
12848 stat = encodeByteAlign (pctxt);
12849 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12850
12851 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12852 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12853
12854 freeContext (&lctxt);
12855 }
12856
12857 return (stat);
12858 }
12859
12860 /**************************************************************/
12861 /* */
12862 /* GatekeeperReject */
12863 /* */
12864 /**************************************************************/
12865
12866 EXTERN int asn1PE_H225GatekeeperReject (OOCTXT* pctxt, H225GatekeeperReject* pvalue)
12867 {
12868 int stat = ASN_OK;
12869 ASN1BOOL extbit;
12870 ASN1OpenType openType;
12871 OOCTXT lctxt;
12872
12873 /* extension bit */
12874
12875 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
12876 pvalue->m.tokensPresent ||
12877 pvalue->m.cryptoTokensPresent ||
12878 pvalue->m.integrityCheckValuePresent ||
12879 pvalue->m.featureSetPresent ||
12880 pvalue->m.genericDataPresent);
12881
12882 encodeBit (pctxt, extbit);
12883
12884 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
12885
12886 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
12887
12888 /* encode requestSeqNum */
12889
12890 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
12891 if (stat != ASN_OK) return stat;
12892
12893 /* encode protocolIdentifier */
12894
12895 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
12896 if (stat != ASN_OK) return stat;
12897
12898 /* encode nonStandardData */
12899
12900 if (pvalue->m.nonStandardDataPresent) {
12901 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
12902 if (stat != ASN_OK) return stat;
12903 }
12904
12905 /* encode gatekeeperIdentifier */
12906
12907 if (pvalue->m.gatekeeperIdentifierPresent) {
12908 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
12909 if (stat != ASN_OK) return stat;
12910 }
12911
12912 /* encode rejectReason */
12913
12914 stat = asn1PE_H225GatekeeperRejectReason (pctxt, &pvalue->rejectReason);
12915 if (stat != ASN_OK) return stat;
12916
12917 if (extbit) {
12918
12919 /* encode extension optional bits length */
12920
12921 stat = encodeSmallNonNegWholeNumber (pctxt, 5);
12922 if (stat != ASN_OK) return stat;
12923
12924 /* encode optional bits */
12925
12926 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
12927 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
12928 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
12929 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
12930 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
12931 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
12932 /* encode extension elements */
12933
12934 if (pvalue->m.altGKInfoPresent) {
12935 initContext (&lctxt);
12936 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12937 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12938
12939 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
12940 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12941
12942 stat = encodeByteAlign (&lctxt);
12943 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12944
12945 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12946
12947 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12948 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12949
12950 freeContext (&lctxt);
12951 }
12952
12953 if (pvalue->m.tokensPresent) {
12954 initContext (&lctxt);
12955 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12956 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12957
12958 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
12959 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12960
12961 stat = encodeByteAlign (&lctxt);
12962 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12963
12964 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12965
12966 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12967 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12968
12969 freeContext (&lctxt);
12970 }
12971
12972 if (pvalue->m.cryptoTokensPresent) {
12973 initContext (&lctxt);
12974 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12975 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12976
12977 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
12978 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12979
12980 stat = encodeByteAlign (&lctxt);
12981 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12982
12983 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
12984
12985 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
12986 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12987
12988 freeContext (&lctxt);
12989 }
12990
12991 if (pvalue->m.integrityCheckValuePresent) {
12992 initContext (&lctxt);
12993 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
12994 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12995
12996 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
12997 if (stat != ASN_OK) return freeContext (&lctxt), stat;
12998
12999 stat = encodeByteAlign (&lctxt);
13000 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13001
13002 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13003
13004 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13005 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13006
13007 freeContext (&lctxt);
13008 }
13009
13010 if (pvalue->m.featureSetPresent) {
13011 initContext (&lctxt);
13012 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13013 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13014
13015 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
13016 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13017
13018 stat = encodeByteAlign (&lctxt);
13019 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13020
13021 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13022
13023 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13024 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13025
13026 freeContext (&lctxt);
13027 }
13028
13029 if (pvalue->m.genericDataPresent) {
13030 initContext (&lctxt);
13031 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13032 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13033
13034 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
13035 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13036
13037 stat = encodeByteAlign (&lctxt);
13038 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13039
13040 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13041
13042 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13043 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13044
13045 freeContext (&lctxt);
13046 }
13047
13048 }
13049
13050 return (stat);
13051 }
13052
13053 /**************************************************************/
13054 /* */
13055 /* _SeqOfH225AddressPattern */
13056 /* */
13057 /**************************************************************/
13058
13059 EXTERN int asn1PE_H225_SeqOfH225AddressPattern (OOCTXT* pctxt, H225_SeqOfH225AddressPattern* pvalue)
13060 {
13061 int stat = ASN_OK;
13062 DListNode* pnode;
13063 ASN1UINT xx1;
13064 ASN1UINT enclen, fraglen;
13065
13066 enclen = fraglen = xx1 = 0;
13067 pnode = pvalue->head;
13068 for (;;) {
13069 /* encode length determinant */
13070
13071 stat = encodeLength (pctxt, (pvalue->count - enclen));
13072 if (stat < 0) return stat;
13073
13074 fraglen = stat;
13075 enclen += fraglen;
13076 /* encode elements */
13077
13078 for (; xx1 < enclen; xx1++) {
13079 stat = asn1PE_H225AddressPattern (pctxt, ((H225AddressPattern*)pnode->data));
13080 if (stat != ASN_OK) return stat;
13081 pnode = pnode->next;
13082 }
13083 if ( pvalue->count == enclen && fraglen < 16384) {
13084 break;
13085 }
13086 }
13087
13088 return (stat);
13089 }
13090
13091 /**************************************************************/
13092 /* */
13093 /* _SeqOfH225H248PackagesDescriptor */
13094 /* */
13095 /**************************************************************/
13096
13097 EXTERN int asn1PE_H225_SeqOfH225H248PackagesDescriptor (OOCTXT* pctxt, H225_SeqOfH225H248PackagesDescriptor* pvalue)
13098 {
13099 int stat = ASN_OK;
13100 ASN1UINT xx1;
13101
13102 /* encode length determinant */
13103
13104 stat = encodeLength (pctxt, pvalue->n);
13105 if (stat < 0) return stat;
13106
13107 /* encode elements */
13108
13109 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
13110 stat = asn1PE_H225H248PackagesDescriptor (pctxt, pvalue->elem[xx1]);
13111 if (stat != ASN_OK) return stat;
13112 }
13113
13114 return (stat);
13115 }
13116
13117 /**************************************************************/
13118 /* */
13119 /* RegistrationRequest */
13120 /* */
13121 /**************************************************************/
13122
13123 EXTERN int asn1PE_H225RegistrationRequest (OOCTXT* pctxt, H225RegistrationRequest* pvalue)
13124 {
13125 int stat = ASN_OK;
13126 ASN1BOOL extbit;
13127 ASN1OpenType openType;
13128 OOCTXT lctxt;
13129
13130 /* extension bit */
13131
13132 extbit = (ASN1BOOL)(pvalue->m.alternateEndpointsPresent ||
13133 pvalue->m.timeToLivePresent ||
13134 pvalue->m.tokensPresent ||
13135 pvalue->m.cryptoTokensPresent ||
13136 pvalue->m.integrityCheckValuePresent ||
13137 pvalue->m.keepAlivePresent ||
13138 pvalue->m.endpointIdentifierPresent ||
13139 pvalue->m.willSupplyUUIEsPresent ||
13140 pvalue->m.maintainConnectionPresent ||
13141 pvalue->m.alternateTransportAddressesPresent ||
13142 pvalue->m.additiveRegistrationPresent ||
13143 pvalue->m.terminalAliasPatternPresent ||
13144 pvalue->m.supportsAltGKPresent ||
13145 pvalue->m.usageReportingCapabilityPresent ||
13146 pvalue->m.multipleCallsPresent ||
13147 pvalue->m.supportedH248PackagesPresent ||
13148 pvalue->m.callCreditCapabilityPresent ||
13149 pvalue->m.capacityReportingCapabilityPresent ||
13150 pvalue->m.capacityPresent ||
13151 pvalue->m.featureSetPresent ||
13152 pvalue->m.genericDataPresent ||
13153 pvalue->m.restartPresent ||
13154 pvalue->m.supportsACFSequencesPresent);
13155
13156 encodeBit (pctxt, extbit);
13157
13158 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
13159
13160 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPresent);
13161
13162 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
13163
13164 /* encode requestSeqNum */
13165
13166 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
13167 if (stat != ASN_OK) return stat;
13168
13169 /* encode protocolIdentifier */
13170
13171 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
13172 if (stat != ASN_OK) return stat;
13173
13174 /* encode nonStandardData */
13175
13176 if (pvalue->m.nonStandardDataPresent) {
13177 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
13178 if (stat != ASN_OK) return stat;
13179 }
13180
13181 /* encode discoveryComplete */
13182
13183 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->discoveryComplete);
13184 if (stat != ASN_OK) return stat;
13185
13186 /* encode callSignalAddress */
13187
13188 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
13189 if (stat != ASN_OK) return stat;
13190
13191 /* encode rasAddress */
13192
13193 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->rasAddress);
13194 if (stat != ASN_OK) return stat;
13195
13196 /* encode terminalType */
13197
13198 stat = asn1PE_H225EndpointType (pctxt, &pvalue->terminalType);
13199 if (stat != ASN_OK) return stat;
13200
13201 /* encode terminalAlias */
13202
13203 if (pvalue->m.terminalAliasPresent) {
13204 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
13205 if (stat != ASN_OK) return stat;
13206 }
13207
13208 /* encode gatekeeperIdentifier */
13209
13210 if (pvalue->m.gatekeeperIdentifierPresent) {
13211 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
13212 if (stat != ASN_OK) return stat;
13213 }
13214
13215 /* encode endpointVendor */
13216
13217 stat = asn1PE_H225VendorIdentifier (pctxt, &pvalue->endpointVendor);
13218 if (stat != ASN_OK) return stat;
13219
13220 if (extbit) {
13221
13222 /* encode extension optional bits length */
13223
13224 stat = encodeSmallNonNegWholeNumber (pctxt, 22);
13225 if (stat != ASN_OK) return stat;
13226
13227 /* encode optional bits */
13228
13229 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateEndpointsPresent);
13230 encodeBit (pctxt, (ASN1BOOL)pvalue->m.timeToLivePresent);
13231 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
13232 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
13233 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
13234 encodeBit (pctxt, (ASN1BOOL)pvalue->m.keepAlivePresent);
13235 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointIdentifierPresent);
13236 encodeBit (pctxt, (ASN1BOOL)pvalue->m.willSupplyUUIEsPresent);
13237 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
13238 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateTransportAddressesPresent);
13239 encodeBit (pctxt, (ASN1BOOL)pvalue->m.additiveRegistrationPresent);
13240 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPatternPresent);
13241 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportsAltGKPresent);
13242 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageReportingCapabilityPresent);
13243 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
13244 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedH248PackagesPresent);
13245 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callCreditCapabilityPresent);
13246 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityReportingCapabilityPresent);
13247 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
13248 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
13249 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
13250 encodeBit (pctxt, (ASN1BOOL)pvalue->m.restartPresent);
13251 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportsACFSequencesPresent);
13252 /* encode extension elements */
13253
13254 if (pvalue->m.alternateEndpointsPresent) {
13255 initContext (&lctxt);
13256 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13257 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13258
13259 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->alternateEndpoints);
13260 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13261
13262 stat = encodeByteAlign (&lctxt);
13263 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13264
13265 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13266
13267 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13268 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13269
13270 freeContext (&lctxt);
13271 }
13272
13273 if (pvalue->m.timeToLivePresent) {
13274 initContext (&lctxt);
13275 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13276 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13277
13278 stat = asn1PE_H225TimeToLive (&lctxt, pvalue->timeToLive);
13279 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13280
13281 stat = encodeByteAlign (&lctxt);
13282 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13283
13284 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13285
13286 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13287 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13288
13289 freeContext (&lctxt);
13290 }
13291
13292 if (pvalue->m.tokensPresent) {
13293 initContext (&lctxt);
13294 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13295 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13296
13297 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
13298 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13299
13300 stat = encodeByteAlign (&lctxt);
13301 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13302
13303 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13304
13305 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13306 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13307
13308 freeContext (&lctxt);
13309 }
13310
13311 if (pvalue->m.cryptoTokensPresent) {
13312 initContext (&lctxt);
13313 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13314 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13315
13316 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
13317 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13318
13319 stat = encodeByteAlign (&lctxt);
13320 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13321
13322 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13323
13324 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13325 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13326
13327 freeContext (&lctxt);
13328 }
13329
13330 if (pvalue->m.integrityCheckValuePresent) {
13331 initContext (&lctxt);
13332 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13333 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13334
13335 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
13336 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13337
13338 stat = encodeByteAlign (&lctxt);
13339 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13340
13341 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13342
13343 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13344 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13345
13346 freeContext (&lctxt);
13347 }
13348
13349 if (pvalue->m.keepAlivePresent) {
13350 initContext (&lctxt);
13351 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13352 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13353
13354 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->keepAlive);
13355 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13356
13357 stat = encodeByteAlign (&lctxt);
13358 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13359
13360 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13361
13362 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13363 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13364
13365 freeContext (&lctxt);
13366 }
13367
13368 if (pvalue->m.endpointIdentifierPresent) {
13369 initContext (&lctxt);
13370 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13371 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13372
13373 stat = asn1PE_H225EndpointIdentifier (&lctxt, pvalue->endpointIdentifier);
13374 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13375
13376 stat = encodeByteAlign (&lctxt);
13377 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13378
13379 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13380
13381 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13382 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13383
13384 freeContext (&lctxt);
13385 }
13386
13387 if (pvalue->m.willSupplyUUIEsPresent) {
13388 initContext (&lctxt);
13389 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13390 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13391
13392 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->willSupplyUUIEs);
13393 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13394
13395 stat = encodeByteAlign (&lctxt);
13396 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13397
13398 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13399
13400 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13401 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13402
13403 freeContext (&lctxt);
13404 }
13405
13406 if (pvalue->m.maintainConnectionPresent) {
13407 initContext (&lctxt);
13408 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13409 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13410
13411 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
13412 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13413
13414 stat = encodeByteAlign (&lctxt);
13415 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13416
13417 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13418
13419 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13420 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13421
13422 freeContext (&lctxt);
13423 }
13424
13425 if (pvalue->m.alternateTransportAddressesPresent) {
13426 initContext (&lctxt);
13427 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13428 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13429
13430 stat = asn1PE_H225AlternateTransportAddresses (&lctxt, &pvalue->alternateTransportAddresses);
13431 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13432
13433 stat = encodeByteAlign (&lctxt);
13434 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13435
13436 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13437
13438 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13439 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13440
13441 freeContext (&lctxt);
13442 }
13443
13444 if (pvalue->m.additiveRegistrationPresent) {
13445 initContext (&lctxt);
13446 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13447 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13448
13449 /* NULL */
13450
13451 stat = encodeByteAlign (&lctxt);
13452 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13453
13454 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13455
13456 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13457 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13458
13459 freeContext (&lctxt);
13460 }
13461
13462 if (pvalue->m.terminalAliasPatternPresent) {
13463 initContext (&lctxt);
13464 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13465 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13466
13467 stat = asn1PE_H225_SeqOfH225AddressPattern (&lctxt, &pvalue->terminalAliasPattern);
13468 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13469
13470 stat = encodeByteAlign (&lctxt);
13471 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13472
13473 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13474
13475 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13476 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13477
13478 freeContext (&lctxt);
13479 }
13480
13481 if (pvalue->m.supportsAltGKPresent) {
13482 initContext (&lctxt);
13483 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13484 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13485
13486 /* NULL */
13487
13488 stat = encodeByteAlign (&lctxt);
13489 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13490
13491 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13492
13493 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13494 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13495
13496 freeContext (&lctxt);
13497 }
13498
13499 if (pvalue->m.usageReportingCapabilityPresent) {
13500 initContext (&lctxt);
13501 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13502 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13503
13504 stat = asn1PE_H225RasUsageInfoTypes (&lctxt, &pvalue->usageReportingCapability);
13505 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13506
13507 stat = encodeByteAlign (&lctxt);
13508 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13509
13510 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13511
13512 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13513 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13514
13515 freeContext (&lctxt);
13516 }
13517
13518 if (pvalue->m.multipleCallsPresent) {
13519 initContext (&lctxt);
13520 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13521 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13522
13523 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
13524 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13525
13526 stat = encodeByteAlign (&lctxt);
13527 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13528
13529 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13530
13531 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13532 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13533
13534 freeContext (&lctxt);
13535 }
13536
13537 if (pvalue->m.supportedH248PackagesPresent) {
13538 initContext (&lctxt);
13539 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13540 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13541
13542 stat = asn1PE_H225_SeqOfH225H248PackagesDescriptor (&lctxt, &pvalue->supportedH248Packages);
13543 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13544
13545 stat = encodeByteAlign (&lctxt);
13546 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13547
13548 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13549
13550 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13551 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13552
13553 freeContext (&lctxt);
13554 }
13555
13556 if (pvalue->m.callCreditCapabilityPresent) {
13557 initContext (&lctxt);
13558 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13559 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13560
13561 stat = asn1PE_H225CallCreditCapability (&lctxt, &pvalue->callCreditCapability);
13562 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13563
13564 stat = encodeByteAlign (&lctxt);
13565 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13566
13567 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13568
13569 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13570 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13571
13572 freeContext (&lctxt);
13573 }
13574
13575 if (pvalue->m.capacityReportingCapabilityPresent) {
13576 initContext (&lctxt);
13577 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13578 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13579
13580 stat = asn1PE_H225CapacityReportingCapability (&lctxt, &pvalue->capacityReportingCapability);
13581 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13582
13583 stat = encodeByteAlign (&lctxt);
13584 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13585
13586 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13587
13588 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13590
13591 freeContext (&lctxt);
13592 }
13593
13594 if (pvalue->m.capacityPresent) {
13595 initContext (&lctxt);
13596 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13597 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13598
13599 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
13600 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13601
13602 stat = encodeByteAlign (&lctxt);
13603 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13604
13605 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13606
13607 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13608 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13609
13610 freeContext (&lctxt);
13611 }
13612
13613 if (pvalue->m.featureSetPresent) {
13614 initContext (&lctxt);
13615 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13616 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13617
13618 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
13619 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13620
13621 stat = encodeByteAlign (&lctxt);
13622 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13623
13624 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13625
13626 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13628
13629 freeContext (&lctxt);
13630 }
13631
13632 if (pvalue->m.genericDataPresent) {
13633 initContext (&lctxt);
13634 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13635 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13636
13637 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
13638 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13639
13640 stat = encodeByteAlign (&lctxt);
13641 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13642
13643 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13644
13645 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13647
13648 freeContext (&lctxt);
13649 }
13650
13651 if (pvalue->m.restartPresent) {
13652 initContext (&lctxt);
13653 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13654 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13655
13656 /* NULL */
13657
13658 stat = encodeByteAlign (&lctxt);
13659 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13660
13661 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13662
13663 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13664 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13665
13666 freeContext (&lctxt);
13667 }
13668
13669 if (pvalue->m.supportsACFSequencesPresent) {
13670 initContext (&lctxt);
13671 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13672 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13673
13674 /* NULL */
13675
13676 stat = encodeByteAlign (&lctxt);
13677 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13678
13679 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13680
13681 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13682 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13683
13684 freeContext (&lctxt);
13685 }
13686
13687 }
13688
13689 return (stat);
13690 }
13691
13692 /**************************************************************/
13693 /* */
13694 /* RegistrationConfirm_preGrantedARQ */
13695 /* */
13696 /**************************************************************/
13697
13698 EXTERN int asn1PE_H225RegistrationConfirm_preGrantedARQ (OOCTXT* pctxt, H225RegistrationConfirm_preGrantedARQ* pvalue)
13699 {
13700 int stat = ASN_OK;
13701 ASN1BOOL extbit;
13702 ASN1OpenType openType;
13703 OOCTXT lctxt;
13704
13705 /* extension bit */
13706
13707 extbit = (ASN1BOOL)(pvalue->m.irrFrequencyInCallPresent ||
13708 pvalue->m.totalBandwidthRestrictionPresent ||
13709 pvalue->m.alternateTransportAddressesPresent ||
13710 pvalue->m.useSpecifiedTransportPresent);
13711
13712 encodeBit (pctxt, extbit);
13713
13714 /* encode makeCall */
13715
13716 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->makeCall);
13717 if (stat != ASN_OK) return stat;
13718
13719 /* encode useGKCallSignalAddressToMakeCall */
13720
13721 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->useGKCallSignalAddressToMakeCall);
13722 if (stat != ASN_OK) return stat;
13723
13724 /* encode answerCall */
13725
13726 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->answerCall);
13727 if (stat != ASN_OK) return stat;
13728
13729 /* encode useGKCallSignalAddressToAnswer */
13730
13731 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->useGKCallSignalAddressToAnswer);
13732 if (stat != ASN_OK) return stat;
13733
13734 if (extbit) {
13735
13736 /* encode extension optional bits length */
13737
13738 stat = encodeSmallNonNegWholeNumber (pctxt, 3);
13739 if (stat != ASN_OK) return stat;
13740
13741 /* encode optional bits */
13742
13743 encodeBit (pctxt, (ASN1BOOL)pvalue->m.irrFrequencyInCallPresent);
13744 encodeBit (pctxt, (ASN1BOOL)pvalue->m.totalBandwidthRestrictionPresent);
13745 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateTransportAddressesPresent);
13746 encodeBit (pctxt, (ASN1BOOL)pvalue->m.useSpecifiedTransportPresent);
13747 /* encode extension elements */
13748
13749 if (pvalue->m.irrFrequencyInCallPresent) {
13750 initContext (&lctxt);
13751 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13752 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13753
13754 stat = encodeConsUnsigned (&lctxt, pvalue->irrFrequencyInCall, 1U, 65535U);
13755 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13756
13757 stat = encodeByteAlign (&lctxt);
13758 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13759
13760 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13761
13762 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13763 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13764
13765 freeContext (&lctxt);
13766 }
13767
13768 if (pvalue->m.totalBandwidthRestrictionPresent) {
13769 initContext (&lctxt);
13770 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13771 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13772
13773 stat = asn1PE_H225BandWidth (&lctxt, pvalue->totalBandwidthRestriction);
13774 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13775
13776 stat = encodeByteAlign (&lctxt);
13777 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13778
13779 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13780
13781 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13782 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13783
13784 freeContext (&lctxt);
13785 }
13786
13787 if (pvalue->m.alternateTransportAddressesPresent) {
13788 initContext (&lctxt);
13789 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13790 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13791
13792 stat = asn1PE_H225AlternateTransportAddresses (&lctxt, &pvalue->alternateTransportAddresses);
13793 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13794
13795 stat = encodeByteAlign (&lctxt);
13796 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13797
13798 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13799
13800 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13801 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13802
13803 freeContext (&lctxt);
13804 }
13805
13806 if (pvalue->m.useSpecifiedTransportPresent) {
13807 initContext (&lctxt);
13808 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13809 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13810
13811 stat = asn1PE_H225UseSpecifiedTransport (&lctxt, &pvalue->useSpecifiedTransport);
13812 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13813
13814 stat = encodeByteAlign (&lctxt);
13815 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13816
13817 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13818
13819 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13820 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13821
13822 freeContext (&lctxt);
13823 }
13824
13825 }
13826
13827 return (stat);
13828 }
13829
13830 /**************************************************************/
13831 /* */
13832 /* _SeqOfH225RasUsageSpecification */
13833 /* */
13834 /**************************************************************/
13835
13836 EXTERN int asn1PE_H225_SeqOfH225RasUsageSpecification (OOCTXT* pctxt, H225_SeqOfH225RasUsageSpecification* pvalue)
13837 {
13838 int stat = ASN_OK;
13839 DListNode* pnode;
13840 ASN1UINT xx1;
13841 ASN1UINT enclen, fraglen;
13842
13843 enclen = fraglen = xx1 = 0;
13844 pnode = pvalue->head;
13845 for (;;) {
13846 /* encode length determinant */
13847
13848 stat = encodeLength (pctxt, (pvalue->count - enclen));
13849 if (stat < 0) return stat;
13850
13851 fraglen = stat;
13852 enclen += fraglen;
13853 /* encode elements */
13854
13855 for (; xx1 < enclen; xx1++) {
13856 stat = asn1PE_H225RasUsageSpecification (pctxt, ((H225RasUsageSpecification*)pnode->data));
13857 if (stat != ASN_OK) return stat;
13858 pnode = pnode->next;
13859 }
13860 if ( pvalue->count == enclen && fraglen < 16384) {
13861 break;
13862 }
13863 }
13864
13865 return (stat);
13866 }
13867
13868 /**************************************************************/
13869 /* */
13870 /* RegistrationConfirm */
13871 /* */
13872 /**************************************************************/
13873
13874 EXTERN int asn1PE_H225RegistrationConfirm (OOCTXT* pctxt, H225RegistrationConfirm* pvalue)
13875 {
13876 int stat = ASN_OK;
13877 ASN1BOOL extbit;
13878 ASN1OpenType openType;
13879 OOCTXT lctxt;
13880
13881 /* extension bit */
13882
13883 extbit = (ASN1BOOL)(pvalue->m.alternateGatekeeperPresent ||
13884 pvalue->m.timeToLivePresent ||
13885 pvalue->m.tokensPresent ||
13886 pvalue->m.cryptoTokensPresent ||
13887 pvalue->m.integrityCheckValuePresent ||
13888 pvalue->m.willRespondToIRRPresent ||
13889 pvalue->m.preGrantedARQPresent ||
13890 pvalue->m.maintainConnectionPresent ||
13891 pvalue->m.serviceControlPresent ||
13892 pvalue->m.supportsAdditiveRegistrationPresent ||
13893 pvalue->m.terminalAliasPatternPresent ||
13894 pvalue->m.supportedPrefixesPresent ||
13895 pvalue->m.usageSpecPresent ||
13896 pvalue->m.featureServerAliasPresent ||
13897 pvalue->m.capacityReportingSpecPresent ||
13898 pvalue->m.featureSetPresent ||
13899 pvalue->m.genericDataPresent);
13900
13901 encodeBit (pctxt, extbit);
13902
13903 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
13904
13905 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPresent);
13906
13907 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
13908
13909 /* encode requestSeqNum */
13910
13911 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
13912 if (stat != ASN_OK) return stat;
13913
13914 /* encode protocolIdentifier */
13915
13916 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
13917 if (stat != ASN_OK) return stat;
13918
13919 /* encode nonStandardData */
13920
13921 if (pvalue->m.nonStandardDataPresent) {
13922 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
13923 if (stat != ASN_OK) return stat;
13924 }
13925
13926 /* encode callSignalAddress */
13927
13928 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
13929 if (stat != ASN_OK) return stat;
13930
13931 /* encode terminalAlias */
13932
13933 if (pvalue->m.terminalAliasPresent) {
13934 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
13935 if (stat != ASN_OK) return stat;
13936 }
13937
13938 /* encode gatekeeperIdentifier */
13939
13940 if (pvalue->m.gatekeeperIdentifierPresent) {
13941 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
13942 if (stat != ASN_OK) return stat;
13943 }
13944
13945 /* encode endpointIdentifier */
13946
13947 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
13948 if (stat != ASN_OK) return stat;
13949
13950 if (extbit) {
13951
13952 /* encode extension optional bits length */
13953
13954 stat = encodeSmallNonNegWholeNumber (pctxt, 16);
13955 if (stat != ASN_OK) return stat;
13956
13957 /* encode optional bits */
13958
13959 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateGatekeeperPresent);
13960 encodeBit (pctxt, (ASN1BOOL)pvalue->m.timeToLivePresent);
13961 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
13962 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
13963 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
13964 encodeBit (pctxt, (ASN1BOOL)pvalue->m.willRespondToIRRPresent);
13965 encodeBit (pctxt, (ASN1BOOL)pvalue->m.preGrantedARQPresent);
13966 encodeBit (pctxt, (ASN1BOOL)pvalue->m.maintainConnectionPresent);
13967 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
13968 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportsAdditiveRegistrationPresent);
13969 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPatternPresent);
13970 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
13971 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageSpecPresent);
13972 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureServerAliasPresent);
13973 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityReportingSpecPresent);
13974 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
13975 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
13976 /* encode extension elements */
13977
13978 if (pvalue->m.alternateGatekeeperPresent) {
13979 initContext (&lctxt);
13980 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
13981 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13982
13983 stat = asn1PE_H225_SeqOfH225AlternateGK (&lctxt, &pvalue->alternateGatekeeper);
13984 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13985
13986 stat = encodeByteAlign (&lctxt);
13987 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13988
13989 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
13990
13991 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
13992 if (stat != ASN_OK) return freeContext (&lctxt), stat;
13993
13994 freeContext (&lctxt);
13995 }
13996
13997 if (pvalue->m.timeToLivePresent) {
13998 initContext (&lctxt);
13999 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14000 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14001
14002 stat = asn1PE_H225TimeToLive (&lctxt, pvalue->timeToLive);
14003 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14004
14005 stat = encodeByteAlign (&lctxt);
14006 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14007
14008 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14009
14010 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14011 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14012
14013 freeContext (&lctxt);
14014 }
14015
14016 if (pvalue->m.tokensPresent) {
14017 initContext (&lctxt);
14018 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14019 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14020
14021 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
14022 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14023
14024 stat = encodeByteAlign (&lctxt);
14025 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14026
14027 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14028
14029 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14030 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14031
14032 freeContext (&lctxt);
14033 }
14034
14035 if (pvalue->m.cryptoTokensPresent) {
14036 initContext (&lctxt);
14037 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14038 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14039
14040 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
14041 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14042
14043 stat = encodeByteAlign (&lctxt);
14044 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14045
14046 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14047
14048 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14049 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14050
14051 freeContext (&lctxt);
14052 }
14053
14054 if (pvalue->m.integrityCheckValuePresent) {
14055 initContext (&lctxt);
14056 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14057 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14058
14059 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
14060 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14061
14062 stat = encodeByteAlign (&lctxt);
14063 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14064
14065 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14066
14067 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14068 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14069
14070 freeContext (&lctxt);
14071 }
14072
14073 if (pvalue->m.willRespondToIRRPresent) {
14074 initContext (&lctxt);
14075 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14076 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14077
14078 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->willRespondToIRR);
14079 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14080
14081 stat = encodeByteAlign (&lctxt);
14082 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14083
14084 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14085
14086 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14087 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14088
14089 freeContext (&lctxt);
14090 }
14091
14092 if (pvalue->m.preGrantedARQPresent) {
14093 initContext (&lctxt);
14094 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14095 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14096
14097 stat = asn1PE_H225RegistrationConfirm_preGrantedARQ (&lctxt, &pvalue->preGrantedARQ);
14098 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14099
14100 stat = encodeByteAlign (&lctxt);
14101 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14102
14103 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14104
14105 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14106 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14107
14108 freeContext (&lctxt);
14109 }
14110
14111 if (pvalue->m.maintainConnectionPresent) {
14112 initContext (&lctxt);
14113 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14114 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14115
14116 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->maintainConnection);
14117 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14118
14119 stat = encodeByteAlign (&lctxt);
14120 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14121
14122 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14123
14124 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14125 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14126
14127 freeContext (&lctxt);
14128 }
14129
14130 if (pvalue->m.serviceControlPresent) {
14131 initContext (&lctxt);
14132 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14133 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14134
14135 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
14136 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14137
14138 stat = encodeByteAlign (&lctxt);
14139 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14140
14141 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14142
14143 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14144 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14145
14146 freeContext (&lctxt);
14147 }
14148
14149 if (pvalue->m.supportsAdditiveRegistrationPresent) {
14150 initContext (&lctxt);
14151 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14152 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14153
14154 /* NULL */
14155
14156 stat = encodeByteAlign (&lctxt);
14157 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14158
14159 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14160
14161 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14162 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14163
14164 freeContext (&lctxt);
14165 }
14166
14167 if (pvalue->m.terminalAliasPatternPresent) {
14168 initContext (&lctxt);
14169 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14170 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14171
14172 stat = asn1PE_H225_SeqOfH225AddressPattern (&lctxt, &pvalue->terminalAliasPattern);
14173 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14174
14175 stat = encodeByteAlign (&lctxt);
14176 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14177
14178 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14179
14180 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14181 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14182
14183 freeContext (&lctxt);
14184 }
14185
14186 if (pvalue->m.supportedPrefixesPresent) {
14187 initContext (&lctxt);
14188 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14189 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14190
14191 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
14192 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14193
14194 stat = encodeByteAlign (&lctxt);
14195 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14196
14197 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14198
14199 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14200 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14201
14202 freeContext (&lctxt);
14203 }
14204
14205 if (pvalue->m.usageSpecPresent) {
14206 initContext (&lctxt);
14207 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14208 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14209
14210 stat = asn1PE_H225_SeqOfH225RasUsageSpecification (&lctxt, &pvalue->usageSpec);
14211 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14212
14213 stat = encodeByteAlign (&lctxt);
14214 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14215
14216 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14217
14218 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14219 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14220
14221 freeContext (&lctxt);
14222 }
14223
14224 if (pvalue->m.featureServerAliasPresent) {
14225 initContext (&lctxt);
14226 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14227 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14228
14229 stat = asn1PE_H225AliasAddress (&lctxt, &pvalue->featureServerAlias);
14230 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14231
14232 stat = encodeByteAlign (&lctxt);
14233 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14234
14235 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14236
14237 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14238 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14239
14240 freeContext (&lctxt);
14241 }
14242
14243 if (pvalue->m.capacityReportingSpecPresent) {
14244 initContext (&lctxt);
14245 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14246 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14247
14248 stat = asn1PE_H225CapacityReportingSpecification (&lctxt, &pvalue->capacityReportingSpec);
14249 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14250
14251 stat = encodeByteAlign (&lctxt);
14252 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14253
14254 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14255
14256 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14257 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14258
14259 freeContext (&lctxt);
14260 }
14261
14262 if (pvalue->m.featureSetPresent) {
14263 initContext (&lctxt);
14264 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14265 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14266
14267 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
14268 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14269
14270 stat = encodeByteAlign (&lctxt);
14271 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14272
14273 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14274
14275 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14276 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14277
14278 freeContext (&lctxt);
14279 }
14280
14281 if (pvalue->m.genericDataPresent) {
14282 initContext (&lctxt);
14283 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14284 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14285
14286 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
14287 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14288
14289 stat = encodeByteAlign (&lctxt);
14290 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14291
14292 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14293
14294 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14295 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14296
14297 freeContext (&lctxt);
14298 }
14299
14300 }
14301
14302 return (stat);
14303 }
14304
14305 /**************************************************************/
14306 /* */
14307 /* RegistrationRejectReason_invalidTerminalAliases */
14308 /* */
14309 /**************************************************************/
14310
14311 EXTERN int asn1PE_H225RegistrationRejectReason_invalidTerminalAliases (OOCTXT* pctxt, H225RegistrationRejectReason_invalidTerminalAliases* pvalue)
14312 {
14313 int stat = ASN_OK;
14314 ASN1BOOL extbit;
14315
14316 /* extension bit */
14317
14318 extbit = 0;
14319
14320 encodeBit (pctxt, extbit);
14321
14322 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPresent);
14323
14324 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminalAliasPatternPresent);
14325
14326 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
14327
14328 /* encode terminalAlias */
14329
14330 if (pvalue->m.terminalAliasPresent) {
14331 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->terminalAlias);
14332 if (stat != ASN_OK) return stat;
14333 }
14334
14335 /* encode terminalAliasPattern */
14336
14337 if (pvalue->m.terminalAliasPatternPresent) {
14338 stat = asn1PE_H225_SeqOfH225AddressPattern (pctxt, &pvalue->terminalAliasPattern);
14339 if (stat != ASN_OK) return stat;
14340 }
14341
14342 /* encode supportedPrefixes */
14343
14344 if (pvalue->m.supportedPrefixesPresent) {
14345 stat = asn1PE_H225_SeqOfH225SupportedPrefix (pctxt, &pvalue->supportedPrefixes);
14346 if (stat != ASN_OK) return stat;
14347 }
14348
14349 return (stat);
14350 }
14351
14352 /**************************************************************/
14353 /* */
14354 /* RegistrationRejectReason */
14355 /* */
14356 /**************************************************************/
14357
14358 EXTERN int asn1PE_H225RegistrationRejectReason (OOCTXT* pctxt, H225RegistrationRejectReason* pvalue)
14359 {
14360 int stat = ASN_OK;
14361 OOCTXT lctxt;
14362 ASN1OpenType openType;
14363 ASN1BOOL extbit;
14364
14365 /* extension bit */
14366
14367 extbit = (ASN1BOOL)(pvalue->t > 8);
14368
14369 encodeBit (pctxt, extbit);
14370
14371 if (!extbit) {
14372
14373 /* Encode choice index value */
14374
14375 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 7);
14376 if (stat != ASN_OK) return stat;
14377
14378 /* Encode root element data value */
14379
14380 switch (pvalue->t)
14381 {
14382 /* discoveryRequired */
14383 case 1:
14384 /* NULL */
14385 break;
14386
14387 /* invalidRevision */
14388 case 2:
14389 /* NULL */
14390 break;
14391
14392 /* invalidCallSignalAddress */
14393 case 3:
14394 /* NULL */
14395 break;
14396
14397 /* invalidRASAddress */
14398 case 4:
14399 /* NULL */
14400 break;
14401
14402 /* duplicateAlias */
14403 case 5:
14404 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, pvalue->u.duplicateAlias);
14405 if (stat != ASN_OK) return stat;
14406 break;
14407
14408 /* invalidTerminalType */
14409 case 6:
14410 /* NULL */
14411 break;
14412
14413 /* undefinedReason */
14414 case 7:
14415 /* NULL */
14416 break;
14417
14418 /* transportNotSupported */
14419 case 8:
14420 /* NULL */
14421 break;
14422
14423 default:
14424 return ASN_E_INVOPT;
14425 }
14426 }
14427 else {
14428 /* Encode extension choice index value */
14429
14430 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 9);
14431 if (stat != ASN_OK) return stat;
14432
14433 /* Encode extension element data value */
14434
14435 initContext (&lctxt);
14436 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14437 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14438
14439 switch (pvalue->t)
14440 {
14441 /* transportQOSNotSupported */
14442 case 9:
14443 /* NULL */
14444 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14445 break;
14446
14447 /* resourceUnavailable */
14448 case 10:
14449 /* NULL */
14450 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14451 break;
14452
14453 /* invalidAlias */
14454 case 11:
14455 /* NULL */
14456 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14457 break;
14458
14459 /* securityDenial */
14460 case 12:
14461 /* NULL */
14462 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14463 break;
14464
14465 /* fullRegistrationRequired */
14466 case 13:
14467 /* NULL */
14468 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14469 break;
14470
14471 /* additiveRegistrationNotSupported */
14472 case 14:
14473 /* NULL */
14474 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14475 break;
14476
14477 /* invalidTerminalAliases */
14478 case 15:
14479 stat = asn1PE_H225RegistrationRejectReason_invalidTerminalAliases (&lctxt, pvalue->u.invalidTerminalAliases);
14480 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14481 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14482 break;
14483
14484 /* genericDataReason */
14485 case 16:
14486 /* NULL */
14487 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14488 break;
14489
14490 /* neededFeatureNotSupported */
14491 case 17:
14492 /* NULL */
14493 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14494 break;
14495
14496 /* securityError */
14497 case 18:
14498 stat = asn1PE_H225SecurityErrors (&lctxt, pvalue->u.securityError);
14499 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14500 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14501 break;
14502
14503 default:
14504 ;
14505 }
14506
14507 stat = encodeByteAlign (pctxt);
14508 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14509
14510 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14511 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14512
14513 freeContext (&lctxt);
14514 }
14515
14516 return (stat);
14517 }
14518
14519 /**************************************************************/
14520 /* */
14521 /* RegistrationReject */
14522 /* */
14523 /**************************************************************/
14524
14525 EXTERN int asn1PE_H225RegistrationReject (OOCTXT* pctxt, H225RegistrationReject* pvalue)
14526 {
14527 int stat = ASN_OK;
14528 ASN1BOOL extbit;
14529 ASN1OpenType openType;
14530 OOCTXT lctxt;
14531
14532 /* extension bit */
14533
14534 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
14535 pvalue->m.tokensPresent ||
14536 pvalue->m.cryptoTokensPresent ||
14537 pvalue->m.integrityCheckValuePresent ||
14538 pvalue->m.featureSetPresent ||
14539 pvalue->m.genericDataPresent);
14540
14541 encodeBit (pctxt, extbit);
14542
14543 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
14544
14545 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
14546
14547 /* encode requestSeqNum */
14548
14549 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
14550 if (stat != ASN_OK) return stat;
14551
14552 /* encode protocolIdentifier */
14553
14554 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
14555 if (stat != ASN_OK) return stat;
14556
14557 /* encode nonStandardData */
14558
14559 if (pvalue->m.nonStandardDataPresent) {
14560 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
14561 if (stat != ASN_OK) return stat;
14562 }
14563
14564 /* encode rejectReason */
14565
14566 stat = asn1PE_H225RegistrationRejectReason (pctxt, &pvalue->rejectReason);
14567 if (stat != ASN_OK) return stat;
14568
14569 /* encode gatekeeperIdentifier */
14570
14571 if (pvalue->m.gatekeeperIdentifierPresent) {
14572 stat = asn1PE_H225GatekeeperIdentifier (pctxt, pvalue->gatekeeperIdentifier);
14573 if (stat != ASN_OK) return stat;
14574 }
14575
14576 if (extbit) {
14577
14578 /* encode extension optional bits length */
14579
14580 stat = encodeSmallNonNegWholeNumber (pctxt, 5);
14581 if (stat != ASN_OK) return stat;
14582
14583 /* encode optional bits */
14584
14585 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
14586 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
14587 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
14588 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
14589 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
14590 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
14591 /* encode extension elements */
14592
14593 if (pvalue->m.altGKInfoPresent) {
14594 initContext (&lctxt);
14595 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14596 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14597
14598 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
14599 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14600
14601 stat = encodeByteAlign (&lctxt);
14602 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14603
14604 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14605
14606 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14607 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14608
14609 freeContext (&lctxt);
14610 }
14611
14612 if (pvalue->m.tokensPresent) {
14613 initContext (&lctxt);
14614 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14615 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14616
14617 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
14618 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14619
14620 stat = encodeByteAlign (&lctxt);
14621 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14622
14623 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14624
14625 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14626 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14627
14628 freeContext (&lctxt);
14629 }
14630
14631 if (pvalue->m.cryptoTokensPresent) {
14632 initContext (&lctxt);
14633 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14634 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14635
14636 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
14637 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14638
14639 stat = encodeByteAlign (&lctxt);
14640 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14641
14642 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14643
14644 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14645 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14646
14647 freeContext (&lctxt);
14648 }
14649
14650 if (pvalue->m.integrityCheckValuePresent) {
14651 initContext (&lctxt);
14652 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14653 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14654
14655 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
14656 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14657
14658 stat = encodeByteAlign (&lctxt);
14659 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14660
14661 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14662
14663 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14664 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14665
14666 freeContext (&lctxt);
14667 }
14668
14669 if (pvalue->m.featureSetPresent) {
14670 initContext (&lctxt);
14671 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14672 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14673
14674 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
14675 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14676
14677 stat = encodeByteAlign (&lctxt);
14678 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14679
14680 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14681
14682 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14683 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14684
14685 freeContext (&lctxt);
14686 }
14687
14688 if (pvalue->m.genericDataPresent) {
14689 initContext (&lctxt);
14690 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14691 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14692
14693 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
14694 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14695
14696 stat = encodeByteAlign (&lctxt);
14697 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14698
14699 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14700
14701 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14702 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14703
14704 freeContext (&lctxt);
14705 }
14706
14707 }
14708
14709 return (stat);
14710 }
14711
14712 /**************************************************************/
14713 /* */
14714 /* UnregRequestReason */
14715 /* */
14716 /**************************************************************/
14717
14718 EXTERN int asn1PE_H225UnregRequestReason (OOCTXT* pctxt, H225UnregRequestReason* pvalue)
14719 {
14720 int stat = ASN_OK;
14721 OOCTXT lctxt;
14722 ASN1OpenType openType;
14723 ASN1BOOL extbit;
14724
14725 /* extension bit */
14726
14727 extbit = (ASN1BOOL)(pvalue->t > 4);
14728
14729 encodeBit (pctxt, extbit);
14730
14731 if (!extbit) {
14732
14733 /* Encode choice index value */
14734
14735 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
14736 if (stat != ASN_OK) return stat;
14737
14738 /* Encode root element data value */
14739
14740 switch (pvalue->t)
14741 {
14742 /* reregistrationRequired */
14743 case 1:
14744 /* NULL */
14745 break;
14746
14747 /* ttlExpired */
14748 case 2:
14749 /* NULL */
14750 break;
14751
14752 /* securityDenial */
14753 case 3:
14754 /* NULL */
14755 break;
14756
14757 /* undefinedReason */
14758 case 4:
14759 /* NULL */
14760 break;
14761
14762 default:
14763 return ASN_E_INVOPT;
14764 }
14765 }
14766 else {
14767 /* Encode extension choice index value */
14768
14769 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
14770 if (stat != ASN_OK) return stat;
14771
14772 /* Encode extension element data value */
14773
14774 initContext (&lctxt);
14775 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14776 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14777
14778 switch (pvalue->t)
14779 {
14780 /* maintenance */
14781 case 5:
14782 /* NULL */
14783 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14784 break;
14785
14786 /* securityError */
14787 case 6:
14788 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
14789 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14790 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14791 break;
14792
14793 default:
14794 ;
14795 }
14796
14797 stat = encodeByteAlign (pctxt);
14798 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14799
14800 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14801 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14802
14803 freeContext (&lctxt);
14804 }
14805
14806 return (stat);
14807 }
14808
14809 /**************************************************************/
14810 /* */
14811 /* UnregistrationRequest */
14812 /* */
14813 /**************************************************************/
14814
14815 EXTERN int asn1PE_H225UnregistrationRequest (OOCTXT* pctxt, H225UnregistrationRequest* pvalue)
14816 {
14817 int stat = ASN_OK;
14818 ASN1BOOL extbit;
14819 ASN1OpenType openType;
14820 OOCTXT lctxt;
14821
14822 /* extension bit */
14823
14824 extbit = (ASN1BOOL)(pvalue->m.alternateEndpointsPresent ||
14825 pvalue->m.gatekeeperIdentifierPresent ||
14826 pvalue->m.tokensPresent ||
14827 pvalue->m.cryptoTokensPresent ||
14828 pvalue->m.integrityCheckValuePresent ||
14829 pvalue->m.reasonPresent ||
14830 pvalue->m.endpointAliasPatternPresent ||
14831 pvalue->m.supportedPrefixesPresent ||
14832 pvalue->m.alternateGatekeeperPresent ||
14833 pvalue->m.genericDataPresent);
14834
14835 encodeBit (pctxt, extbit);
14836
14837 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointAliasPresent);
14838
14839 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
14840
14841 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointIdentifierPresent);
14842
14843 /* encode requestSeqNum */
14844
14845 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
14846 if (stat != ASN_OK) return stat;
14847
14848 /* encode callSignalAddress */
14849
14850 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
14851 if (stat != ASN_OK) return stat;
14852
14853 /* encode endpointAlias */
14854
14855 if (pvalue->m.endpointAliasPresent) {
14856 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
14857 if (stat != ASN_OK) return stat;
14858 }
14859
14860 /* encode nonStandardData */
14861
14862 if (pvalue->m.nonStandardDataPresent) {
14863 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
14864 if (stat != ASN_OK) return stat;
14865 }
14866
14867 /* encode endpointIdentifier */
14868
14869 if (pvalue->m.endpointIdentifierPresent) {
14870 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
14871 if (stat != ASN_OK) return stat;
14872 }
14873
14874 if (extbit) {
14875
14876 /* encode extension optional bits length */
14877
14878 stat = encodeSmallNonNegWholeNumber (pctxt, 9);
14879 if (stat != ASN_OK) return stat;
14880
14881 /* encode optional bits */
14882
14883 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateEndpointsPresent);
14884 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
14885 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
14886 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
14887 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
14888 encodeBit (pctxt, (ASN1BOOL)pvalue->m.reasonPresent);
14889 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointAliasPatternPresent);
14890 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedPrefixesPresent);
14891 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateGatekeeperPresent);
14892 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
14893 /* encode extension elements */
14894
14895 if (pvalue->m.alternateEndpointsPresent) {
14896 initContext (&lctxt);
14897 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14898 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14899
14900 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->alternateEndpoints);
14901 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14902
14903 stat = encodeByteAlign (&lctxt);
14904 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14905
14906 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14907
14908 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14909 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14910
14911 freeContext (&lctxt);
14912 }
14913
14914 if (pvalue->m.gatekeeperIdentifierPresent) {
14915 initContext (&lctxt);
14916 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14917 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14918
14919 stat = asn1PE_H225GatekeeperIdentifier (&lctxt, pvalue->gatekeeperIdentifier);
14920 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14921
14922 stat = encodeByteAlign (&lctxt);
14923 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14924
14925 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14926
14927 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14928 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14929
14930 freeContext (&lctxt);
14931 }
14932
14933 if (pvalue->m.tokensPresent) {
14934 initContext (&lctxt);
14935 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14936 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14937
14938 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
14939 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14940
14941 stat = encodeByteAlign (&lctxt);
14942 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14943
14944 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14945
14946 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14947 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14948
14949 freeContext (&lctxt);
14950 }
14951
14952 if (pvalue->m.cryptoTokensPresent) {
14953 initContext (&lctxt);
14954 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14955 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14956
14957 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
14958 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14959
14960 stat = encodeByteAlign (&lctxt);
14961 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14962
14963 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14964
14965 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14966 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14967
14968 freeContext (&lctxt);
14969 }
14970
14971 if (pvalue->m.integrityCheckValuePresent) {
14972 initContext (&lctxt);
14973 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14974 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14975
14976 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
14977 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14978
14979 stat = encodeByteAlign (&lctxt);
14980 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14981
14982 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
14983
14984 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
14985 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14986
14987 freeContext (&lctxt);
14988 }
14989
14990 if (pvalue->m.reasonPresent) {
14991 initContext (&lctxt);
14992 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
14993 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14994
14995 stat = asn1PE_H225UnregRequestReason (&lctxt, &pvalue->reason);
14996 if (stat != ASN_OK) return freeContext (&lctxt), stat;
14997
14998 stat = encodeByteAlign (&lctxt);
14999 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15000
15001 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15002
15003 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15004 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15005
15006 freeContext (&lctxt);
15007 }
15008
15009 if (pvalue->m.endpointAliasPatternPresent) {
15010 initContext (&lctxt);
15011 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15012 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15013
15014 stat = asn1PE_H225_SeqOfH225AddressPattern (&lctxt, &pvalue->endpointAliasPattern);
15015 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15016
15017 stat = encodeByteAlign (&lctxt);
15018 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15019
15020 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15021
15022 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15023 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15024
15025 freeContext (&lctxt);
15026 }
15027
15028 if (pvalue->m.supportedPrefixesPresent) {
15029 initContext (&lctxt);
15030 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15031 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15032
15033 stat = asn1PE_H225_SeqOfH225SupportedPrefix (&lctxt, &pvalue->supportedPrefixes);
15034 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15035
15036 stat = encodeByteAlign (&lctxt);
15037 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15038
15039 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15040
15041 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15042 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15043
15044 freeContext (&lctxt);
15045 }
15046
15047 if (pvalue->m.alternateGatekeeperPresent) {
15048 initContext (&lctxt);
15049 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15050 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15051
15052 stat = asn1PE_H225_SeqOfH225AlternateGK (&lctxt, &pvalue->alternateGatekeeper);
15053 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15054
15055 stat = encodeByteAlign (&lctxt);
15056 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15057
15058 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15059
15060 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15061 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15062
15063 freeContext (&lctxt);
15064 }
15065
15066 if (pvalue->m.genericDataPresent) {
15067 initContext (&lctxt);
15068 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15069 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15070
15071 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
15072 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15073
15074 stat = encodeByteAlign (&lctxt);
15075 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15076
15077 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15078
15079 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15080 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15081
15082 freeContext (&lctxt);
15083 }
15084
15085 }
15086
15087 return (stat);
15088 }
15089
15090 /**************************************************************/
15091 /* */
15092 /* UnregistrationConfirm */
15093 /* */
15094 /**************************************************************/
15095
15096 EXTERN int asn1PE_H225UnregistrationConfirm (OOCTXT* pctxt, H225UnregistrationConfirm* pvalue)
15097 {
15098 int stat = ASN_OK;
15099 ASN1BOOL extbit;
15100 ASN1OpenType openType;
15101 OOCTXT lctxt;
15102
15103 /* extension bit */
15104
15105 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
15106 pvalue->m.cryptoTokensPresent ||
15107 pvalue->m.integrityCheckValuePresent ||
15108 pvalue->m.genericDataPresent);
15109
15110 encodeBit (pctxt, extbit);
15111
15112 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
15113
15114 /* encode requestSeqNum */
15115
15116 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
15117 if (stat != ASN_OK) return stat;
15118
15119 /* encode nonStandardData */
15120
15121 if (pvalue->m.nonStandardDataPresent) {
15122 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
15123 if (stat != ASN_OK) return stat;
15124 }
15125
15126 if (extbit) {
15127
15128 /* encode extension optional bits length */
15129
15130 stat = encodeSmallNonNegWholeNumber (pctxt, 3);
15131 if (stat != ASN_OK) return stat;
15132
15133 /* encode optional bits */
15134
15135 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
15136 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
15137 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
15138 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
15139 /* encode extension elements */
15140
15141 if (pvalue->m.tokensPresent) {
15142 initContext (&lctxt);
15143 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15144 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15145
15146 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
15147 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15148
15149 stat = encodeByteAlign (&lctxt);
15150 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15151
15152 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15153
15154 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15155 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15156
15157 freeContext (&lctxt);
15158 }
15159
15160 if (pvalue->m.cryptoTokensPresent) {
15161 initContext (&lctxt);
15162 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15163 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15164
15165 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
15166 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15167
15168 stat = encodeByteAlign (&lctxt);
15169 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15170
15171 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15172
15173 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15174 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15175
15176 freeContext (&lctxt);
15177 }
15178
15179 if (pvalue->m.integrityCheckValuePresent) {
15180 initContext (&lctxt);
15181 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15182 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15183
15184 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
15185 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15186
15187 stat = encodeByteAlign (&lctxt);
15188 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15189
15190 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15191
15192 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15193 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15194
15195 freeContext (&lctxt);
15196 }
15197
15198 if (pvalue->m.genericDataPresent) {
15199 initContext (&lctxt);
15200 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15201 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15202
15203 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
15204 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15205
15206 stat = encodeByteAlign (&lctxt);
15207 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15208
15209 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15210
15211 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15212 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15213
15214 freeContext (&lctxt);
15215 }
15216
15217 }
15218
15219 return (stat);
15220 }
15221
15222 /**************************************************************/
15223 /* */
15224 /* UnregRejectReason */
15225 /* */
15226 /**************************************************************/
15227
15228 EXTERN int asn1PE_H225UnregRejectReason (OOCTXT* pctxt, H225UnregRejectReason* pvalue)
15229 {
15230 int stat = ASN_OK;
15231 OOCTXT lctxt;
15232 ASN1OpenType openType;
15233 ASN1BOOL extbit;
15234
15235 /* extension bit */
15236
15237 extbit = (ASN1BOOL)(pvalue->t > 3);
15238
15239 encodeBit (pctxt, extbit);
15240
15241 if (!extbit) {
15242
15243 /* Encode choice index value */
15244
15245 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
15246 if (stat != ASN_OK) return stat;
15247
15248 /* Encode root element data value */
15249
15250 switch (pvalue->t)
15251 {
15252 /* notCurrentlyRegistered */
15253 case 1:
15254 /* NULL */
15255 break;
15256
15257 /* callInProgress */
15258 case 2:
15259 /* NULL */
15260 break;
15261
15262 /* undefinedReason */
15263 case 3:
15264 /* NULL */
15265 break;
15266
15267 default:
15268 return ASN_E_INVOPT;
15269 }
15270 }
15271 else {
15272 /* Encode extension choice index value */
15273
15274 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
15275 if (stat != ASN_OK) return stat;
15276
15277 /* Encode extension element data value */
15278
15279 initContext (&lctxt);
15280 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15281 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15282
15283 switch (pvalue->t)
15284 {
15285 /* permissionDenied */
15286 case 4:
15287 /* NULL */
15288 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15289 break;
15290
15291 /* securityDenial */
15292 case 5:
15293 /* NULL */
15294 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15295 break;
15296
15297 /* securityError */
15298 case 6:
15299 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
15300 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15301 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15302 break;
15303
15304 default:
15305 ;
15306 }
15307
15308 stat = encodeByteAlign (pctxt);
15309 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15310
15311 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15312 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15313
15314 freeContext (&lctxt);
15315 }
15316
15317 return (stat);
15318 }
15319
15320 /**************************************************************/
15321 /* */
15322 /* UnregistrationReject */
15323 /* */
15324 /**************************************************************/
15325
15326 EXTERN int asn1PE_H225UnregistrationReject (OOCTXT* pctxt, H225UnregistrationReject* pvalue)
15327 {
15328 int stat = ASN_OK;
15329 ASN1BOOL extbit;
15330 ASN1OpenType openType;
15331 OOCTXT lctxt;
15332
15333 /* extension bit */
15334
15335 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
15336 pvalue->m.tokensPresent ||
15337 pvalue->m.cryptoTokensPresent ||
15338 pvalue->m.integrityCheckValuePresent ||
15339 pvalue->m.genericDataPresent);
15340
15341 encodeBit (pctxt, extbit);
15342
15343 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
15344
15345 /* encode requestSeqNum */
15346
15347 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
15348 if (stat != ASN_OK) return stat;
15349
15350 /* encode rejectReason */
15351
15352 stat = asn1PE_H225UnregRejectReason (pctxt, &pvalue->rejectReason);
15353 if (stat != ASN_OK) return stat;
15354
15355 /* encode nonStandardData */
15356
15357 if (pvalue->m.nonStandardDataPresent) {
15358 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
15359 if (stat != ASN_OK) return stat;
15360 }
15361
15362 if (extbit) {
15363
15364 /* encode extension optional bits length */
15365
15366 stat = encodeSmallNonNegWholeNumber (pctxt, 4);
15367 if (stat != ASN_OK) return stat;
15368
15369 /* encode optional bits */
15370
15371 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
15372 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
15373 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
15374 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
15375 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
15376 /* encode extension elements */
15377
15378 if (pvalue->m.altGKInfoPresent) {
15379 initContext (&lctxt);
15380 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15381 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15382
15383 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
15384 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15385
15386 stat = encodeByteAlign (&lctxt);
15387 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15388
15389 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15390
15391 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15392 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15393
15394 freeContext (&lctxt);
15395 }
15396
15397 if (pvalue->m.tokensPresent) {
15398 initContext (&lctxt);
15399 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15400 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15401
15402 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
15403 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15404
15405 stat = encodeByteAlign (&lctxt);
15406 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15407
15408 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15409
15410 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15411 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15412
15413 freeContext (&lctxt);
15414 }
15415
15416 if (pvalue->m.cryptoTokensPresent) {
15417 initContext (&lctxt);
15418 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15419 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15420
15421 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
15422 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15423
15424 stat = encodeByteAlign (&lctxt);
15425 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15426
15427 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15428
15429 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15430 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15431
15432 freeContext (&lctxt);
15433 }
15434
15435 if (pvalue->m.integrityCheckValuePresent) {
15436 initContext (&lctxt);
15437 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15438 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15439
15440 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
15441 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15442
15443 stat = encodeByteAlign (&lctxt);
15444 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15445
15446 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15447
15448 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15449 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15450
15451 freeContext (&lctxt);
15452 }
15453
15454 if (pvalue->m.genericDataPresent) {
15455 initContext (&lctxt);
15456 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15457 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15458
15459 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
15460 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15461
15462 stat = encodeByteAlign (&lctxt);
15463 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15464
15465 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15466
15467 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15468 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15469
15470 freeContext (&lctxt);
15471 }
15472
15473 }
15474
15475 return (stat);
15476 }
15477
15478 /**************************************************************/
15479 /* */
15480 /* CallModel */
15481 /* */
15482 /**************************************************************/
15483
15484 EXTERN int asn1PE_H225CallModel (OOCTXT* pctxt, H225CallModel* pvalue)
15485 {
15486 int stat = ASN_OK;
15487 ASN1BOOL extbit;
15488
15489 /* extension bit */
15490
15491 extbit = (ASN1BOOL)(pvalue->t > 2);
15492
15493 encodeBit (pctxt, extbit);
15494
15495 if (!extbit) {
15496
15497 /* Encode choice index value */
15498
15499 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
15500 if (stat != ASN_OK) return stat;
15501
15502 /* Encode root element data value */
15503
15504 switch (pvalue->t)
15505 {
15506 /* direct */
15507 case 1:
15508 /* NULL */
15509 break;
15510
15511 /* gatekeeperRouted */
15512 case 2:
15513 /* NULL */
15514 break;
15515
15516 default:
15517 return ASN_E_INVOPT;
15518 }
15519 }
15520 else {
15521 /* Encode extension choice index value */
15522
15523 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
15524 if (stat != ASN_OK) return stat;
15525
15526 /* Encode extension element data value */
15527
15528 }
15529
15530 return (stat);
15531 }
15532
15533 /**************************************************************/
15534 /* */
15535 /* TransportQOS */
15536 /* */
15537 /**************************************************************/
15538
15539 EXTERN int asn1PE_H225TransportQOS (OOCTXT* pctxt, H225TransportQOS* pvalue)
15540 {
15541 int stat = ASN_OK;
15542 ASN1BOOL extbit;
15543
15544 /* extension bit */
15545
15546 extbit = (ASN1BOOL)(pvalue->t > 3);
15547
15548 encodeBit (pctxt, extbit);
15549
15550 if (!extbit) {
15551
15552 /* Encode choice index value */
15553
15554 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
15555 if (stat != ASN_OK) return stat;
15556
15557 /* Encode root element data value */
15558
15559 switch (pvalue->t)
15560 {
15561 /* endpointControlled */
15562 case 1:
15563 /* NULL */
15564 break;
15565
15566 /* gatekeeperControlled */
15567 case 2:
15568 /* NULL */
15569 break;
15570
15571 /* noControl */
15572 case 3:
15573 /* NULL */
15574 break;
15575
15576 default:
15577 return ASN_E_INVOPT;
15578 }
15579 }
15580 else {
15581 /* Encode extension choice index value */
15582
15583 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
15584 if (stat != ASN_OK) return stat;
15585
15586 /* Encode extension element data value */
15587
15588 }
15589
15590 return (stat);
15591 }
15592
15593 /**************************************************************/
15594 /* */
15595 /* AdmissionRequest */
15596 /* */
15597 /**************************************************************/
15598
15599 EXTERN int asn1PE_H225AdmissionRequest (OOCTXT* pctxt, H225AdmissionRequest* pvalue)
15600 {
15601 int stat = ASN_OK;
15602 ASN1BOOL extbit;
15603 ASN1OpenType openType;
15604 OOCTXT lctxt;
15605
15606 /* extension bit */
15607
15608 extbit = (ASN1BOOL)(pvalue->m.canMapAliasPresent ||
15609 pvalue->m.callIdentifierPresent ||
15610 pvalue->m.srcAlternativesPresent ||
15611 pvalue->m.destAlternativesPresent ||
15612 pvalue->m.gatekeeperIdentifierPresent ||
15613 pvalue->m.tokensPresent ||
15614 pvalue->m.cryptoTokensPresent ||
15615 pvalue->m.integrityCheckValuePresent ||
15616 pvalue->m.transportQOSPresent ||
15617 pvalue->m.willSupplyUUIEsPresent ||
15618 pvalue->m.callLinkagePresent ||
15619 pvalue->m.gatewayDataRatePresent ||
15620 pvalue->m.capacityPresent ||
15621 pvalue->m.circuitInfoPresent ||
15622 pvalue->m.desiredProtocolsPresent ||
15623 pvalue->m.desiredTunnelledProtocolPresent ||
15624 pvalue->m.featureSetPresent ||
15625 pvalue->m.genericDataPresent ||
15626 pvalue->m.canMapSrcAliasPresent);
15627
15628 encodeBit (pctxt, extbit);
15629
15630 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callModelPresent);
15631
15632 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationInfoPresent);
15633
15634 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destCallSignalAddressPresent);
15635
15636 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
15637
15638 encodeBit (pctxt, (ASN1BOOL)pvalue->m.srcCallSignalAddressPresent);
15639
15640 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
15641
15642 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callServicesPresent);
15643
15644 /* encode requestSeqNum */
15645
15646 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
15647 if (stat != ASN_OK) return stat;
15648
15649 /* encode callType */
15650
15651 stat = asn1PE_H225CallType (pctxt, &pvalue->callType);
15652 if (stat != ASN_OK) return stat;
15653
15654 /* encode callModel */
15655
15656 if (pvalue->m.callModelPresent) {
15657 stat = asn1PE_H225CallModel (pctxt, &pvalue->callModel);
15658 if (stat != ASN_OK) return stat;
15659 }
15660
15661 /* encode endpointIdentifier */
15662
15663 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
15664 if (stat != ASN_OK) return stat;
15665
15666 /* encode destinationInfo */
15667
15668 if (pvalue->m.destinationInfoPresent) {
15669 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
15670 if (stat != ASN_OK) return stat;
15671 }
15672
15673 /* encode destCallSignalAddress */
15674
15675 if (pvalue->m.destCallSignalAddressPresent) {
15676 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
15677 if (stat != ASN_OK) return stat;
15678 }
15679
15680 /* encode destExtraCallInfo */
15681
15682 if (pvalue->m.destExtraCallInfoPresent) {
15683 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destExtraCallInfo);
15684 if (stat != ASN_OK) return stat;
15685 }
15686
15687 /* encode srcInfo */
15688
15689 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->srcInfo);
15690 if (stat != ASN_OK) return stat;
15691
15692 /* encode srcCallSignalAddress */
15693
15694 if (pvalue->m.srcCallSignalAddressPresent) {
15695 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->srcCallSignalAddress);
15696 if (stat != ASN_OK) return stat;
15697 }
15698
15699 /* encode bandWidth */
15700
15701 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandWidth);
15702 if (stat != ASN_OK) return stat;
15703
15704 /* encode callReferenceValue */
15705
15706 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->callReferenceValue);
15707 if (stat != ASN_OK) return stat;
15708
15709 /* encode nonStandardData */
15710
15711 if (pvalue->m.nonStandardDataPresent) {
15712 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
15713 if (stat != ASN_OK) return stat;
15714 }
15715
15716 /* encode callServices */
15717
15718 if (pvalue->m.callServicesPresent) {
15719 stat = asn1PE_H225QseriesOptions (pctxt, &pvalue->callServices);
15720 if (stat != ASN_OK) return stat;
15721 }
15722
15723 /* encode conferenceID */
15724
15725 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
15726 if (stat != ASN_OK) return stat;
15727
15728 /* encode activeMC */
15729
15730 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->activeMC);
15731 if (stat != ASN_OK) return stat;
15732
15733 /* encode answerCall */
15734
15735 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->answerCall);
15736 if (stat != ASN_OK) return stat;
15737
15738 if (extbit) {
15739
15740 /* encode extension optional bits length */
15741
15742 stat = encodeSmallNonNegWholeNumber (pctxt, 18);
15743 if (stat != ASN_OK) return stat;
15744
15745 /* encode optional bits */
15746
15747 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canMapAliasPresent);
15748 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
15749 encodeBit (pctxt, (ASN1BOOL)pvalue->m.srcAlternativesPresent);
15750 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destAlternativesPresent);
15751 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
15752 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
15753 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
15754 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
15755 encodeBit (pctxt, (ASN1BOOL)pvalue->m.transportQOSPresent);
15756 encodeBit (pctxt, (ASN1BOOL)pvalue->m.willSupplyUUIEsPresent);
15757 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
15758 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatewayDataRatePresent);
15759 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
15760 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
15761 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredProtocolsPresent);
15762 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredTunnelledProtocolPresent);
15763 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
15764 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
15765 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canMapSrcAliasPresent);
15766 /* encode extension elements */
15767
15768 if (pvalue->m.canMapAliasPresent) {
15769 initContext (&lctxt);
15770 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15771 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15772
15773 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->canMapAlias);
15774 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15775
15776 stat = encodeByteAlign (&lctxt);
15777 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15778
15779 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15780
15781 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15782 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15783
15784 freeContext (&lctxt);
15785 }
15786
15787 if (pvalue->m.callIdentifierPresent) {
15788 initContext (&lctxt);
15789 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15790 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15791
15792 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
15793 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15794
15795 stat = encodeByteAlign (&lctxt);
15796 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15797
15798 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15799
15800 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15801 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15802
15803 freeContext (&lctxt);
15804 }
15805
15806 if (pvalue->m.srcAlternativesPresent) {
15807 initContext (&lctxt);
15808 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15809 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15810
15811 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->srcAlternatives);
15812 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15813
15814 stat = encodeByteAlign (&lctxt);
15815 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15816
15817 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15818
15819 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15820 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15821
15822 freeContext (&lctxt);
15823 }
15824
15825 if (pvalue->m.destAlternativesPresent) {
15826 initContext (&lctxt);
15827 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15828 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15829
15830 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->destAlternatives);
15831 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15832
15833 stat = encodeByteAlign (&lctxt);
15834 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15835
15836 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15837
15838 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15839 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15840
15841 freeContext (&lctxt);
15842 }
15843
15844 if (pvalue->m.gatekeeperIdentifierPresent) {
15845 initContext (&lctxt);
15846 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15847 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15848
15849 stat = asn1PE_H225GatekeeperIdentifier (&lctxt, pvalue->gatekeeperIdentifier);
15850 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15851
15852 stat = encodeByteAlign (&lctxt);
15853 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15854
15855 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15856
15857 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15858 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15859
15860 freeContext (&lctxt);
15861 }
15862
15863 if (pvalue->m.tokensPresent) {
15864 initContext (&lctxt);
15865 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15866 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15867
15868 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
15869 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15870
15871 stat = encodeByteAlign (&lctxt);
15872 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15873
15874 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15875
15876 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15877 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15878
15879 freeContext (&lctxt);
15880 }
15881
15882 if (pvalue->m.cryptoTokensPresent) {
15883 initContext (&lctxt);
15884 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15885 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15886
15887 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
15888 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15889
15890 stat = encodeByteAlign (&lctxt);
15891 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15892
15893 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15894
15895 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15896 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15897
15898 freeContext (&lctxt);
15899 }
15900
15901 if (pvalue->m.integrityCheckValuePresent) {
15902 initContext (&lctxt);
15903 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15904 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15905
15906 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
15907 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15908
15909 stat = encodeByteAlign (&lctxt);
15910 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15911
15912 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15913
15914 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15915 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15916
15917 freeContext (&lctxt);
15918 }
15919
15920 if (pvalue->m.transportQOSPresent) {
15921 initContext (&lctxt);
15922 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15923 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15924
15925 stat = asn1PE_H225TransportQOS (&lctxt, &pvalue->transportQOS);
15926 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15927
15928 stat = encodeByteAlign (&lctxt);
15929 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15930
15931 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15932
15933 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15934 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15935
15936 freeContext (&lctxt);
15937 }
15938
15939 if (pvalue->m.willSupplyUUIEsPresent) {
15940 initContext (&lctxt);
15941 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15942 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15943
15944 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->willSupplyUUIEs);
15945 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15946
15947 stat = encodeByteAlign (&lctxt);
15948 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15949
15950 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15951
15952 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15953 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15954
15955 freeContext (&lctxt);
15956 }
15957
15958 if (pvalue->m.callLinkagePresent) {
15959 initContext (&lctxt);
15960 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15961 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15962
15963 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
15964 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15965
15966 stat = encodeByteAlign (&lctxt);
15967 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15968
15969 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15970
15971 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15972 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15973
15974 freeContext (&lctxt);
15975 }
15976
15977 if (pvalue->m.gatewayDataRatePresent) {
15978 initContext (&lctxt);
15979 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15980 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15981
15982 stat = asn1PE_H225DataRate (&lctxt, &pvalue->gatewayDataRate);
15983 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15984
15985 stat = encodeByteAlign (&lctxt);
15986 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15987
15988 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
15989
15990 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
15991 if (stat != ASN_OK) return freeContext (&lctxt), stat;
15992
15993 freeContext (&lctxt);
15994 }
15995
15996 if (pvalue->m.capacityPresent) {
15997 initContext (&lctxt);
15998 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
15999 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16000
16001 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
16002 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16003
16004 stat = encodeByteAlign (&lctxt);
16005 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16006
16007 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16008
16009 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16010 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16011
16012 freeContext (&lctxt);
16013 }
16014
16015 if (pvalue->m.circuitInfoPresent) {
16016 initContext (&lctxt);
16017 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16018 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16019
16020 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
16021 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16022
16023 stat = encodeByteAlign (&lctxt);
16024 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16025
16026 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16027
16028 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16029 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16030
16031 freeContext (&lctxt);
16032 }
16033
16034 if (pvalue->m.desiredProtocolsPresent) {
16035 initContext (&lctxt);
16036 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16037 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16038
16039 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->desiredProtocols);
16040 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16041
16042 stat = encodeByteAlign (&lctxt);
16043 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16044
16045 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16046
16047 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16048 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16049
16050 freeContext (&lctxt);
16051 }
16052
16053 if (pvalue->m.desiredTunnelledProtocolPresent) {
16054 initContext (&lctxt);
16055 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16056 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16057
16058 stat = asn1PE_H225TunnelledProtocol (&lctxt, &pvalue->desiredTunnelledProtocol);
16059 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16060
16061 stat = encodeByteAlign (&lctxt);
16062 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16063
16064 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16065
16066 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16067 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16068
16069 freeContext (&lctxt);
16070 }
16071
16072 if (pvalue->m.featureSetPresent) {
16073 initContext (&lctxt);
16074 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16075 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16076
16077 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
16078 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16079
16080 stat = encodeByteAlign (&lctxt);
16081 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16082
16083 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16084
16085 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16086 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16087
16088 freeContext (&lctxt);
16089 }
16090
16091 if (pvalue->m.genericDataPresent) {
16092 initContext (&lctxt);
16093 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16094 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16095
16096 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
16097 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16098
16099 stat = encodeByteAlign (&lctxt);
16100 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16101
16102 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16103
16104 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16105 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16106
16107 freeContext (&lctxt);
16108 }
16109
16110 if (pvalue->m.canMapSrcAliasPresent) {
16111 initContext (&lctxt);
16112 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16113 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16114
16115 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->canMapSrcAlias);
16116 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16117
16118 stat = encodeByteAlign (&lctxt);
16119 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16120
16121 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16122
16123 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16124 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16125
16126 freeContext (&lctxt);
16127 }
16128
16129 }
16130
16131 return (stat);
16132 }
16133
16134 /**************************************************************/
16135 /* */
16136 /* UUIEsRequested */
16137 /* */
16138 /**************************************************************/
16139
16140 EXTERN int asn1PE_H225UUIEsRequested (OOCTXT* pctxt, H225UUIEsRequested* pvalue)
16141 {
16142 int stat = ASN_OK;
16143 ASN1BOOL extbit;
16144 ASN1OpenType openType;
16145 OOCTXT lctxt;
16146
16147 /* extension bit */
16148
16149 extbit = (ASN1BOOL)(pvalue->m.statusPresent ||
16150 pvalue->m.statusInquiryPresent ||
16151 pvalue->m.setupAcknowledgePresent ||
16152 pvalue->m.notifyPresent);
16153
16154 encodeBit (pctxt, extbit);
16155
16156 /* encode setup */
16157
16158 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->setup);
16159 if (stat != ASN_OK) return stat;
16160
16161 /* encode callProceeding */
16162
16163 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->callProceeding);
16164 if (stat != ASN_OK) return stat;
16165
16166 /* encode connect */
16167
16168 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->connect);
16169 if (stat != ASN_OK) return stat;
16170
16171 /* encode alerting */
16172
16173 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->alerting);
16174 if (stat != ASN_OK) return stat;
16175
16176 /* encode information */
16177
16178 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->information);
16179 if (stat != ASN_OK) return stat;
16180
16181 /* encode releaseComplete */
16182
16183 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->releaseComplete);
16184 if (stat != ASN_OK) return stat;
16185
16186 /* encode facility */
16187
16188 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->facility);
16189 if (stat != ASN_OK) return stat;
16190
16191 /* encode progress */
16192
16193 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->progress);
16194 if (stat != ASN_OK) return stat;
16195
16196 /* encode empty */
16197
16198 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->empty);
16199 if (stat != ASN_OK) return stat;
16200
16201 if (extbit) {
16202
16203 /* encode extension optional bits length */
16204
16205 stat = encodeSmallNonNegWholeNumber (pctxt, 3);
16206 if (stat != ASN_OK) return stat;
16207
16208 /* encode optional bits */
16209
16210 encodeBit (pctxt, (ASN1BOOL)pvalue->m.statusPresent);
16211 encodeBit (pctxt, (ASN1BOOL)pvalue->m.statusInquiryPresent);
16212 encodeBit (pctxt, (ASN1BOOL)pvalue->m.setupAcknowledgePresent);
16213 encodeBit (pctxt, (ASN1BOOL)pvalue->m.notifyPresent);
16214 /* encode extension elements */
16215
16216 if (pvalue->m.statusPresent) {
16217 initContext (&lctxt);
16218 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16219 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16220
16221 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->status);
16222 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16223
16224 stat = encodeByteAlign (&lctxt);
16225 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16226
16227 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16228
16229 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16230 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16231
16232 freeContext (&lctxt);
16233 }
16234
16235 if (pvalue->m.statusInquiryPresent) {
16236 initContext (&lctxt);
16237 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16238 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16239
16240 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->statusInquiry);
16241 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16242
16243 stat = encodeByteAlign (&lctxt);
16244 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16245
16246 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16247
16248 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16249 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16250
16251 freeContext (&lctxt);
16252 }
16253
16254 if (pvalue->m.setupAcknowledgePresent) {
16255 initContext (&lctxt);
16256 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16257 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16258
16259 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->setupAcknowledge);
16260 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16261
16262 stat = encodeByteAlign (&lctxt);
16263 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16264
16265 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16266
16267 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16268 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16269
16270 freeContext (&lctxt);
16271 }
16272
16273 if (pvalue->m.notifyPresent) {
16274 initContext (&lctxt);
16275 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16276 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16277
16278 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->notify);
16279 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16280
16281 stat = encodeByteAlign (&lctxt);
16282 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16283
16284 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16285
16286 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16287 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16288
16289 freeContext (&lctxt);
16290 }
16291
16292 }
16293
16294 return (stat);
16295 }
16296
16297 /**************************************************************/
16298 /* */
16299 /* AdmissionConfirm_language */
16300 /* */
16301 /**************************************************************/
16302
16303 EXTERN int asn1PE_H225AdmissionConfirm_language (OOCTXT* pctxt, H225AdmissionConfirm_language* pvalue)
16304 {
16305 static Asn1SizeCnst element_lsize1 = { 0, 1, 32, 0 };
16306 int stat = ASN_OK;
16307 ASN1UINT xx1;
16308
16309 /* encode length determinant */
16310
16311 stat = encodeLength (pctxt, pvalue->n);
16312 if (stat < 0) return stat;
16313
16314 /* encode elements */
16315
16316 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
16317 addSizeConstraint (pctxt, &element_lsize1);
16318
16319 stat = encodeConstrainedStringEx (pctxt, pvalue->elem[xx1], 0, 8, 7, 7);
16320 if (stat != ASN_OK) return stat;
16321 }
16322
16323 return (stat);
16324 }
16325
16326 /**************************************************************/
16327 /* */
16328 /* AdmissionConfirm */
16329 /* */
16330 /**************************************************************/
16331
16332 EXTERN int asn1PE_H225AdmissionConfirm (OOCTXT* pctxt, H225AdmissionConfirm* pvalue)
16333 {
16334 int stat = ASN_OK;
16335 ASN1BOOL extbit;
16336 ASN1OpenType openType;
16337 OOCTXT lctxt;
16338
16339 /* extension bit */
16340
16341 extbit = (ASN1BOOL)(pvalue->m.destinationInfoPresent ||
16342 pvalue->m.destExtraCallInfoPresent ||
16343 pvalue->m.destinationTypePresent ||
16344 pvalue->m.remoteExtensionAddressPresent ||
16345 pvalue->m.alternateEndpointsPresent ||
16346 pvalue->m.tokensPresent ||
16347 pvalue->m.cryptoTokensPresent ||
16348 pvalue->m.integrityCheckValuePresent ||
16349 pvalue->m.transportQOSPresent ||
16350 pvalue->m.willRespondToIRRPresent ||
16351 pvalue->m.uuiesRequestedPresent ||
16352 pvalue->m.languagePresent ||
16353 pvalue->m.alternateTransportAddressesPresent ||
16354 pvalue->m.useSpecifiedTransportPresent ||
16355 pvalue->m.circuitInfoPresent ||
16356 pvalue->m.usageSpecPresent ||
16357 pvalue->m.supportedProtocolsPresent ||
16358 pvalue->m.serviceControlPresent ||
16359 pvalue->m.multipleCallsPresent ||
16360 pvalue->m.featureSetPresent ||
16361 pvalue->m.genericDataPresent ||
16362 pvalue->m.modifiedSrcInfoPresent);
16363
16364 encodeBit (pctxt, extbit);
16365
16366 encodeBit (pctxt, (ASN1BOOL)pvalue->m.irrFrequencyPresent);
16367
16368 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
16369
16370 /* encode requestSeqNum */
16371
16372 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
16373 if (stat != ASN_OK) return stat;
16374
16375 /* encode bandWidth */
16376
16377 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandWidth);
16378 if (stat != ASN_OK) return stat;
16379
16380 /* encode callModel */
16381
16382 stat = asn1PE_H225CallModel (pctxt, &pvalue->callModel);
16383 if (stat != ASN_OK) return stat;
16384
16385 /* encode destCallSignalAddress */
16386
16387 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->destCallSignalAddress);
16388 if (stat != ASN_OK) return stat;
16389
16390 /* encode irrFrequency */
16391
16392 if (pvalue->m.irrFrequencyPresent) {
16393 stat = encodeConsUnsigned (pctxt, pvalue->irrFrequency, 1U, 65535U);
16394 if (stat != ASN_OK) return stat;
16395
16396 }
16397
16398 /* encode nonStandardData */
16399
16400 if (pvalue->m.nonStandardDataPresent) {
16401 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
16402 if (stat != ASN_OK) return stat;
16403 }
16404
16405 if (extbit) {
16406
16407 /* encode extension optional bits length */
16408
16409 stat = encodeSmallNonNegWholeNumber (pctxt, 21);
16410 if (stat != ASN_OK) return stat;
16411
16412 /* encode optional bits */
16413
16414 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationInfoPresent);
16415 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
16416 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationTypePresent);
16417 encodeBit (pctxt, (ASN1BOOL)pvalue->m.remoteExtensionAddressPresent);
16418 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateEndpointsPresent);
16419 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
16420 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
16421 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
16422 encodeBit (pctxt, (ASN1BOOL)pvalue->m.transportQOSPresent);
16423 encodeBit (pctxt, (ASN1BOOL)pvalue->m.willRespondToIRRPresent);
16424 encodeBit (pctxt, (ASN1BOOL)pvalue->m.uuiesRequestedPresent);
16425 encodeBit (pctxt, (ASN1BOOL)pvalue->m.languagePresent);
16426 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateTransportAddressesPresent);
16427 encodeBit (pctxt, (ASN1BOOL)pvalue->m.useSpecifiedTransportPresent);
16428 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
16429 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageSpecPresent);
16430 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedProtocolsPresent);
16431 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
16432 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
16433 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
16434 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
16435 encodeBit (pctxt, (ASN1BOOL)pvalue->m.modifiedSrcInfoPresent);
16436 /* encode extension elements */
16437
16438 if (pvalue->m.destinationInfoPresent) {
16439 initContext (&lctxt);
16440 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16441 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16442
16443 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->destinationInfo);
16444 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16445
16446 stat = encodeByteAlign (&lctxt);
16447 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16448
16449 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16450
16451 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16452 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16453
16454 freeContext (&lctxt);
16455 }
16456
16457 if (pvalue->m.destExtraCallInfoPresent) {
16458 initContext (&lctxt);
16459 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16460 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16461
16462 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->destExtraCallInfo);
16463 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16464
16465 stat = encodeByteAlign (&lctxt);
16466 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16467
16468 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16469
16470 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16471 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16472
16473 freeContext (&lctxt);
16474 }
16475
16476 if (pvalue->m.destinationTypePresent) {
16477 initContext (&lctxt);
16478 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16479 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16480
16481 stat = asn1PE_H225EndpointType (&lctxt, &pvalue->destinationType);
16482 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16483
16484 stat = encodeByteAlign (&lctxt);
16485 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16486
16487 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16488
16489 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16490 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16491
16492 freeContext (&lctxt);
16493 }
16494
16495 if (pvalue->m.remoteExtensionAddressPresent) {
16496 initContext (&lctxt);
16497 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16498 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16499
16500 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->remoteExtensionAddress);
16501 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16502
16503 stat = encodeByteAlign (&lctxt);
16504 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16505
16506 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16507
16508 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16509 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16510
16511 freeContext (&lctxt);
16512 }
16513
16514 if (pvalue->m.alternateEndpointsPresent) {
16515 initContext (&lctxt);
16516 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16517 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16518
16519 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->alternateEndpoints);
16520 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16521
16522 stat = encodeByteAlign (&lctxt);
16523 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16524
16525 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16526
16527 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16528 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16529
16530 freeContext (&lctxt);
16531 }
16532
16533 if (pvalue->m.tokensPresent) {
16534 initContext (&lctxt);
16535 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16536 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16537
16538 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
16539 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16540
16541 stat = encodeByteAlign (&lctxt);
16542 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16543
16544 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16545
16546 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16547 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16548
16549 freeContext (&lctxt);
16550 }
16551
16552 if (pvalue->m.cryptoTokensPresent) {
16553 initContext (&lctxt);
16554 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16555 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16556
16557 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
16558 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16559
16560 stat = encodeByteAlign (&lctxt);
16561 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16562
16563 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16564
16565 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16566 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16567
16568 freeContext (&lctxt);
16569 }
16570
16571 if (pvalue->m.integrityCheckValuePresent) {
16572 initContext (&lctxt);
16573 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16574 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16575
16576 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
16577 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16578
16579 stat = encodeByteAlign (&lctxt);
16580 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16581
16582 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16583
16584 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16585 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16586
16587 freeContext (&lctxt);
16588 }
16589
16590 if (pvalue->m.transportQOSPresent) {
16591 initContext (&lctxt);
16592 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16593 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16594
16595 stat = asn1PE_H225TransportQOS (&lctxt, &pvalue->transportQOS);
16596 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16597
16598 stat = encodeByteAlign (&lctxt);
16599 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16600
16601 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16602
16603 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16604 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16605
16606 freeContext (&lctxt);
16607 }
16608
16609 if (pvalue->m.willRespondToIRRPresent) {
16610 initContext (&lctxt);
16611 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16612 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16613
16614 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->willRespondToIRR);
16615 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16616
16617 stat = encodeByteAlign (&lctxt);
16618 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16619
16620 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16621
16622 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16623 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16624
16625 freeContext (&lctxt);
16626 }
16627
16628 if (pvalue->m.uuiesRequestedPresent) {
16629 initContext (&lctxt);
16630 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16631 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16632
16633 stat = asn1PE_H225UUIEsRequested (&lctxt, &pvalue->uuiesRequested);
16634 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16635
16636 stat = encodeByteAlign (&lctxt);
16637 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16638
16639 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16640
16641 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16642 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16643
16644 freeContext (&lctxt);
16645 }
16646
16647 if (pvalue->m.languagePresent) {
16648 initContext (&lctxt);
16649 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16650 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16651
16652 stat = asn1PE_H225AdmissionConfirm_language (&lctxt, &pvalue->language);
16653 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16654
16655 stat = encodeByteAlign (&lctxt);
16656 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16657
16658 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16659
16660 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16661 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16662
16663 freeContext (&lctxt);
16664 }
16665
16666 if (pvalue->m.alternateTransportAddressesPresent) {
16667 initContext (&lctxt);
16668 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16669 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16670
16671 stat = asn1PE_H225AlternateTransportAddresses (&lctxt, &pvalue->alternateTransportAddresses);
16672 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16673
16674 stat = encodeByteAlign (&lctxt);
16675 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16676
16677 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16678
16679 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16680 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16681
16682 freeContext (&lctxt);
16683 }
16684
16685 if (pvalue->m.useSpecifiedTransportPresent) {
16686 initContext (&lctxt);
16687 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16688 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16689
16690 stat = asn1PE_H225UseSpecifiedTransport (&lctxt, &pvalue->useSpecifiedTransport);
16691 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16692
16693 stat = encodeByteAlign (&lctxt);
16694 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16695
16696 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16697
16698 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16699 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16700
16701 freeContext (&lctxt);
16702 }
16703
16704 if (pvalue->m.circuitInfoPresent) {
16705 initContext (&lctxt);
16706 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16707 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16708
16709 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
16710 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16711
16712 stat = encodeByteAlign (&lctxt);
16713 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16714
16715 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16716
16717 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16718 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16719
16720 freeContext (&lctxt);
16721 }
16722
16723 if (pvalue->m.usageSpecPresent) {
16724 initContext (&lctxt);
16725 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16726 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16727
16728 stat = asn1PE_H225_SeqOfH225RasUsageSpecification (&lctxt, &pvalue->usageSpec);
16729 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16730
16731 stat = encodeByteAlign (&lctxt);
16732 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16733
16734 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16735
16736 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16737 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16738
16739 freeContext (&lctxt);
16740 }
16741
16742 if (pvalue->m.supportedProtocolsPresent) {
16743 initContext (&lctxt);
16744 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16745 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16746
16747 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->supportedProtocols);
16748 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16749
16750 stat = encodeByteAlign (&lctxt);
16751 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16752
16753 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16754
16755 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16756 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16757
16758 freeContext (&lctxt);
16759 }
16760
16761 if (pvalue->m.serviceControlPresent) {
16762 initContext (&lctxt);
16763 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16764 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16765
16766 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
16767 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16768
16769 stat = encodeByteAlign (&lctxt);
16770 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16771
16772 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16773
16774 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16775 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16776
16777 freeContext (&lctxt);
16778 }
16779
16780 if (pvalue->m.multipleCallsPresent) {
16781 initContext (&lctxt);
16782 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16783 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16784
16785 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
16786 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16787
16788 stat = encodeByteAlign (&lctxt);
16789 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16790
16791 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16792
16793 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16794 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16795
16796 freeContext (&lctxt);
16797 }
16798
16799 if (pvalue->m.featureSetPresent) {
16800 initContext (&lctxt);
16801 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16802 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16803
16804 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
16805 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16806
16807 stat = encodeByteAlign (&lctxt);
16808 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16809
16810 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16811
16812 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16813 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16814
16815 freeContext (&lctxt);
16816 }
16817
16818 if (pvalue->m.genericDataPresent) {
16819 initContext (&lctxt);
16820 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16821 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16822
16823 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
16824 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16825
16826 stat = encodeByteAlign (&lctxt);
16827 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16828
16829 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16830
16831 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16832 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16833
16834 freeContext (&lctxt);
16835 }
16836
16837 if (pvalue->m.modifiedSrcInfoPresent) {
16838 initContext (&lctxt);
16839 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16840 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16841
16842 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->modifiedSrcInfo);
16843 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16844
16845 stat = encodeByteAlign (&lctxt);
16846 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16847
16848 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16849
16850 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
16851 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16852
16853 freeContext (&lctxt);
16854 }
16855
16856 }
16857
16858 return (stat);
16859 }
16860
16861 /**************************************************************/
16862 /* */
16863 /* _SeqOfH225PartyNumber */
16864 /* */
16865 /**************************************************************/
16866
16867 EXTERN int asn1PE_H225_SeqOfH225PartyNumber (OOCTXT* pctxt, H225_SeqOfH225PartyNumber* pvalue)
16868 {
16869 int stat = ASN_OK;
16870 DListNode* pnode;
16871 ASN1UINT xx1;
16872 ASN1UINT enclen, fraglen;
16873
16874 enclen = fraglen = xx1 = 0;
16875 pnode = pvalue->head;
16876 for (;;) {
16877 /* encode length determinant */
16878
16879 stat = encodeLength (pctxt, (pvalue->count - enclen));
16880 if (stat < 0) return stat;
16881
16882 fraglen = stat;
16883 enclen += fraglen;
16884 /* encode elements */
16885
16886 for (; xx1 < enclen; xx1++) {
16887 stat = asn1PE_H225PartyNumber (pctxt, ((H225PartyNumber*)pnode->data));
16888 if (stat != ASN_OK) return stat;
16889 pnode = pnode->next;
16890 }
16891 if ( pvalue->count == enclen && fraglen < 16384) {
16892 break;
16893 }
16894 }
16895
16896 return (stat);
16897 }
16898
16899 /**************************************************************/
16900 /* */
16901 /* AdmissionRejectReason */
16902 /* */
16903 /**************************************************************/
16904
16905 EXTERN int asn1PE_H225AdmissionRejectReason (OOCTXT* pctxt, H225AdmissionRejectReason* pvalue)
16906 {
16907 int stat = ASN_OK;
16908 OOCTXT lctxt;
16909 ASN1OpenType openType;
16910 ASN1BOOL extbit;
16911
16912 /* extension bit */
16913
16914 extbit = (ASN1BOOL)(pvalue->t > 8);
16915
16916 encodeBit (pctxt, extbit);
16917
16918 if (!extbit) {
16919
16920 /* Encode choice index value */
16921
16922 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 7);
16923 if (stat != ASN_OK) return stat;
16924
16925 /* Encode root element data value */
16926
16927 switch (pvalue->t)
16928 {
16929 /* calledPartyNotRegistered */
16930 case 1:
16931 /* NULL */
16932 break;
16933
16934 /* invalidPermission */
16935 case 2:
16936 /* NULL */
16937 break;
16938
16939 /* requestDenied */
16940 case 3:
16941 /* NULL */
16942 break;
16943
16944 /* undefinedReason */
16945 case 4:
16946 /* NULL */
16947 break;
16948
16949 /* callerNotRegistered */
16950 case 5:
16951 /* NULL */
16952 break;
16953
16954 /* routeCallToGatekeeper */
16955 case 6:
16956 /* NULL */
16957 break;
16958
16959 /* invalidEndpointIdentifier */
16960 case 7:
16961 /* NULL */
16962 break;
16963
16964 /* resourceUnavailable */
16965 case 8:
16966 /* NULL */
16967 break;
16968
16969 default:
16970 return ASN_E_INVOPT;
16971 }
16972 }
16973 else {
16974 /* Encode extension choice index value */
16975
16976 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 9);
16977 if (stat != ASN_OK) return stat;
16978
16979 /* Encode extension element data value */
16980
16981 initContext (&lctxt);
16982 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
16983 if (stat != ASN_OK) return freeContext (&lctxt), stat;
16984
16985 switch (pvalue->t)
16986 {
16987 /* securityDenial */
16988 case 9:
16989 /* NULL */
16990 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16991 break;
16992
16993 /* qosControlNotSupported */
16994 case 10:
16995 /* NULL */
16996 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
16997 break;
16998
16999 /* incompleteAddress */
17000 case 11:
17001 /* NULL */
17002 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17003 break;
17004
17005 /* aliasesInconsistent */
17006 case 12:
17007 /* NULL */
17008 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17009 break;
17010
17011 /* routeCallToSCN */
17012 case 13:
17013 stat = asn1PE_H225_SeqOfH225PartyNumber (&lctxt, pvalue->u.routeCallToSCN);
17014 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17015 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17016 break;
17017
17018 /* exceedsCallCapacity */
17019 case 14:
17020 /* NULL */
17021 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17022 break;
17023
17024 /* collectDestination */
17025 case 15:
17026 /* NULL */
17027 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17028 break;
17029
17030 /* collectPIN */
17031 case 16:
17032 /* NULL */
17033 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17034 break;
17035
17036 /* genericDataReason */
17037 case 17:
17038 /* NULL */
17039 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17040 break;
17041
17042 /* neededFeatureNotSupported */
17043 case 18:
17044 /* NULL */
17045 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17046 break;
17047
17048 /* securityErrors */
17049 case 19:
17050 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityErrors);
17051 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17052 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17053 break;
17054
17055 /* securityDHmismatch */
17056 case 20:
17057 /* NULL */
17058 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17059 break;
17060
17061 /* noRouteToDestination */
17062 case 21:
17063 /* NULL */
17064 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17065 break;
17066
17067 /* unallocatedNumber */
17068 case 22:
17069 /* NULL */
17070 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17071 break;
17072
17073 default:
17074 ;
17075 }
17076
17077 stat = encodeByteAlign (pctxt);
17078 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17079
17080 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17081 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17082
17083 freeContext (&lctxt);
17084 }
17085
17086 return (stat);
17087 }
17088
17089 /**************************************************************/
17090 /* */
17091 /* AdmissionReject */
17092 /* */
17093 /**************************************************************/
17094
17095 EXTERN int asn1PE_H225AdmissionReject (OOCTXT* pctxt, H225AdmissionReject* pvalue)
17096 {
17097 int stat = ASN_OK;
17098 ASN1BOOL extbit;
17099 ASN1OpenType openType;
17100 OOCTXT lctxt;
17101
17102 /* extension bit */
17103
17104 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
17105 pvalue->m.tokensPresent ||
17106 pvalue->m.cryptoTokensPresent ||
17107 pvalue->m.callSignalAddressPresent ||
17108 pvalue->m.integrityCheckValuePresent ||
17109 pvalue->m.serviceControlPresent ||
17110 pvalue->m.featureSetPresent ||
17111 pvalue->m.genericDataPresent);
17112
17113 encodeBit (pctxt, extbit);
17114
17115 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
17116
17117 /* encode requestSeqNum */
17118
17119 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
17120 if (stat != ASN_OK) return stat;
17121
17122 /* encode rejectReason */
17123
17124 stat = asn1PE_H225AdmissionRejectReason (pctxt, &pvalue->rejectReason);
17125 if (stat != ASN_OK) return stat;
17126
17127 /* encode nonStandardData */
17128
17129 if (pvalue->m.nonStandardDataPresent) {
17130 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17131 if (stat != ASN_OK) return stat;
17132 }
17133
17134 if (extbit) {
17135
17136 /* encode extension optional bits length */
17137
17138 stat = encodeSmallNonNegWholeNumber (pctxt, 7);
17139 if (stat != ASN_OK) return stat;
17140
17141 /* encode optional bits */
17142
17143 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
17144 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
17145 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
17146 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callSignalAddressPresent);
17147 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
17148 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
17149 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
17150 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
17151 /* encode extension elements */
17152
17153 if (pvalue->m.altGKInfoPresent) {
17154 initContext (&lctxt);
17155 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17156 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17157
17158 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
17159 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17160
17161 stat = encodeByteAlign (&lctxt);
17162 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17163
17164 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17165
17166 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17167 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17168
17169 freeContext (&lctxt);
17170 }
17171
17172 if (pvalue->m.tokensPresent) {
17173 initContext (&lctxt);
17174 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17175 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17176
17177 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
17178 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17179
17180 stat = encodeByteAlign (&lctxt);
17181 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17182
17183 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17184
17185 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17186 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17187
17188 freeContext (&lctxt);
17189 }
17190
17191 if (pvalue->m.cryptoTokensPresent) {
17192 initContext (&lctxt);
17193 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17194 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17195
17196 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
17197 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17198
17199 stat = encodeByteAlign (&lctxt);
17200 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17201
17202 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17203
17204 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17205 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17206
17207 freeContext (&lctxt);
17208 }
17209
17210 if (pvalue->m.callSignalAddressPresent) {
17211 initContext (&lctxt);
17212 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17213 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17214
17215 stat = asn1PE_H225_SeqOfH225TransportAddress (&lctxt, &pvalue->callSignalAddress);
17216 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17217
17218 stat = encodeByteAlign (&lctxt);
17219 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17220
17221 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17222
17223 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17224 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17225
17226 freeContext (&lctxt);
17227 }
17228
17229 if (pvalue->m.integrityCheckValuePresent) {
17230 initContext (&lctxt);
17231 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17232 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17233
17234 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
17235 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17236
17237 stat = encodeByteAlign (&lctxt);
17238 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17239
17240 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17241
17242 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17243 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17244
17245 freeContext (&lctxt);
17246 }
17247
17248 if (pvalue->m.serviceControlPresent) {
17249 initContext (&lctxt);
17250 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17251 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17252
17253 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
17254 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17255
17256 stat = encodeByteAlign (&lctxt);
17257 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17258
17259 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17260
17261 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17262 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17263
17264 freeContext (&lctxt);
17265 }
17266
17267 if (pvalue->m.featureSetPresent) {
17268 initContext (&lctxt);
17269 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17270 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17271
17272 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
17273 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17274
17275 stat = encodeByteAlign (&lctxt);
17276 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17277
17278 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17279
17280 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17281 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17282
17283 freeContext (&lctxt);
17284 }
17285
17286 if (pvalue->m.genericDataPresent) {
17287 initContext (&lctxt);
17288 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17289 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17290
17291 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
17292 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17293
17294 stat = encodeByteAlign (&lctxt);
17295 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17296
17297 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17298
17299 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17300 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17301
17302 freeContext (&lctxt);
17303 }
17304
17305 }
17306
17307 return (stat);
17308 }
17309
17310 /**************************************************************/
17311 /* */
17312 /* _SeqOfH225BandwidthDetails */
17313 /* */
17314 /**************************************************************/
17315
17316 EXTERN int asn1PE_H225_SeqOfH225BandwidthDetails (OOCTXT* pctxt, H225_SeqOfH225BandwidthDetails* pvalue)
17317 {
17318 int stat = ASN_OK;
17319 DListNode* pnode;
17320 ASN1UINT xx1;
17321 ASN1UINT enclen, fraglen;
17322
17323 enclen = fraglen = xx1 = 0;
17324 pnode = pvalue->head;
17325 for (;;) {
17326 /* encode length determinant */
17327
17328 stat = encodeLength (pctxt, (pvalue->count - enclen));
17329 if (stat < 0) return stat;
17330
17331 fraglen = stat;
17332 enclen += fraglen;
17333 /* encode elements */
17334
17335 for (; xx1 < enclen; xx1++) {
17336 stat = asn1PE_H225BandwidthDetails (pctxt, ((H225BandwidthDetails*)pnode->data));
17337 if (stat != ASN_OK) return stat;
17338 pnode = pnode->next;
17339 }
17340 if ( pvalue->count == enclen && fraglen < 16384) {
17341 break;
17342 }
17343 }
17344
17345 return (stat);
17346 }
17347
17348 /**************************************************************/
17349 /* */
17350 /* BandwidthRequest */
17351 /* */
17352 /**************************************************************/
17353
17354 EXTERN int asn1PE_H225BandwidthRequest (OOCTXT* pctxt, H225BandwidthRequest* pvalue)
17355 {
17356 int stat = ASN_OK;
17357 ASN1BOOL extbit;
17358 ASN1OpenType openType;
17359 OOCTXT lctxt;
17360
17361 /* extension bit */
17362
17363 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
17364 pvalue->m.gatekeeperIdentifierPresent ||
17365 pvalue->m.tokensPresent ||
17366 pvalue->m.cryptoTokensPresent ||
17367 pvalue->m.integrityCheckValuePresent ||
17368 pvalue->m.answeredCallPresent ||
17369 pvalue->m.callLinkagePresent ||
17370 pvalue->m.capacityPresent ||
17371 pvalue->m.usageInformationPresent ||
17372 pvalue->m.bandwidthDetailsPresent ||
17373 pvalue->m.genericDataPresent);
17374
17375 encodeBit (pctxt, extbit);
17376
17377 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callTypePresent);
17378
17379 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
17380
17381 /* encode requestSeqNum */
17382
17383 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
17384 if (stat != ASN_OK) return stat;
17385
17386 /* encode endpointIdentifier */
17387
17388 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
17389 if (stat != ASN_OK) return stat;
17390
17391 /* encode conferenceID */
17392
17393 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
17394 if (stat != ASN_OK) return stat;
17395
17396 /* encode callReferenceValue */
17397
17398 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->callReferenceValue);
17399 if (stat != ASN_OK) return stat;
17400
17401 /* encode callType */
17402
17403 if (pvalue->m.callTypePresent) {
17404 stat = asn1PE_H225CallType (pctxt, &pvalue->callType);
17405 if (stat != ASN_OK) return stat;
17406 }
17407
17408 /* encode bandWidth */
17409
17410 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandWidth);
17411 if (stat != ASN_OK) return stat;
17412
17413 /* encode nonStandardData */
17414
17415 if (pvalue->m.nonStandardDataPresent) {
17416 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17417 if (stat != ASN_OK) return stat;
17418 }
17419
17420 if (extbit) {
17421
17422 /* encode extension optional bits length */
17423
17424 stat = encodeSmallNonNegWholeNumber (pctxt, 10);
17425 if (stat != ASN_OK) return stat;
17426
17427 /* encode optional bits */
17428
17429 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
17430 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
17431 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
17432 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
17433 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
17434 encodeBit (pctxt, (ASN1BOOL)pvalue->m.answeredCallPresent);
17435 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
17436 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
17437 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageInformationPresent);
17438 encodeBit (pctxt, (ASN1BOOL)pvalue->m.bandwidthDetailsPresent);
17439 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
17440 /* encode extension elements */
17441
17442 if (pvalue->m.callIdentifierPresent) {
17443 initContext (&lctxt);
17444 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17445 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17446
17447 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
17448 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17449
17450 stat = encodeByteAlign (&lctxt);
17451 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17452
17453 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17454
17455 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17456 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17457
17458 freeContext (&lctxt);
17459 }
17460
17461 if (pvalue->m.gatekeeperIdentifierPresent) {
17462 initContext (&lctxt);
17463 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17464 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17465
17466 stat = asn1PE_H225GatekeeperIdentifier (&lctxt, pvalue->gatekeeperIdentifier);
17467 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17468
17469 stat = encodeByteAlign (&lctxt);
17470 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17471
17472 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17473
17474 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17475 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17476
17477 freeContext (&lctxt);
17478 }
17479
17480 if (pvalue->m.tokensPresent) {
17481 initContext (&lctxt);
17482 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17483 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17484
17485 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
17486 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17487
17488 stat = encodeByteAlign (&lctxt);
17489 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17490
17491 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17492
17493 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17494 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17495
17496 freeContext (&lctxt);
17497 }
17498
17499 if (pvalue->m.cryptoTokensPresent) {
17500 initContext (&lctxt);
17501 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17502 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17503
17504 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
17505 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17506
17507 stat = encodeByteAlign (&lctxt);
17508 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17509
17510 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17511
17512 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17513 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17514
17515 freeContext (&lctxt);
17516 }
17517
17518 if (pvalue->m.integrityCheckValuePresent) {
17519 initContext (&lctxt);
17520 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17521 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17522
17523 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
17524 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17525
17526 stat = encodeByteAlign (&lctxt);
17527 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17528
17529 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17530
17531 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17532 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17533
17534 freeContext (&lctxt);
17535 }
17536
17537 if (pvalue->m.answeredCallPresent) {
17538 initContext (&lctxt);
17539 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17540 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17541
17542 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->answeredCall);
17543 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17544
17545 stat = encodeByteAlign (&lctxt);
17546 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17547
17548 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17549
17550 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17551 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17552
17553 freeContext (&lctxt);
17554 }
17555
17556 if (pvalue->m.callLinkagePresent) {
17557 initContext (&lctxt);
17558 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17559 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17560
17561 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
17562 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17563
17564 stat = encodeByteAlign (&lctxt);
17565 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17566
17567 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17568
17569 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17570 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17571
17572 freeContext (&lctxt);
17573 }
17574
17575 if (pvalue->m.capacityPresent) {
17576 initContext (&lctxt);
17577 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17578 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17579
17580 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
17581 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17582
17583 stat = encodeByteAlign (&lctxt);
17584 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17585
17586 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17587
17588 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17590
17591 freeContext (&lctxt);
17592 }
17593
17594 if (pvalue->m.usageInformationPresent) {
17595 initContext (&lctxt);
17596 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17597 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17598
17599 stat = asn1PE_H225RasUsageInformation (&lctxt, &pvalue->usageInformation);
17600 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17601
17602 stat = encodeByteAlign (&lctxt);
17603 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17604
17605 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17606
17607 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17608 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17609
17610 freeContext (&lctxt);
17611 }
17612
17613 if (pvalue->m.bandwidthDetailsPresent) {
17614 initContext (&lctxt);
17615 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17616 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17617
17618 stat = asn1PE_H225_SeqOfH225BandwidthDetails (&lctxt, &pvalue->bandwidthDetails);
17619 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17620
17621 stat = encodeByteAlign (&lctxt);
17622 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17623
17624 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17625
17626 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17628
17629 freeContext (&lctxt);
17630 }
17631
17632 if (pvalue->m.genericDataPresent) {
17633 initContext (&lctxt);
17634 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17635 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17636
17637 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
17638 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17639
17640 stat = encodeByteAlign (&lctxt);
17641 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17642
17643 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17644
17645 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17647
17648 freeContext (&lctxt);
17649 }
17650
17651 }
17652
17653 return (stat);
17654 }
17655
17656 /**************************************************************/
17657 /* */
17658 /* BandwidthConfirm */
17659 /* */
17660 /**************************************************************/
17661
17662 EXTERN int asn1PE_H225BandwidthConfirm (OOCTXT* pctxt, H225BandwidthConfirm* pvalue)
17663 {
17664 int stat = ASN_OK;
17665 ASN1BOOL extbit;
17666 ASN1OpenType openType;
17667 OOCTXT lctxt;
17668
17669 /* extension bit */
17670
17671 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
17672 pvalue->m.cryptoTokensPresent ||
17673 pvalue->m.integrityCheckValuePresent ||
17674 pvalue->m.capacityPresent ||
17675 pvalue->m.genericDataPresent);
17676
17677 encodeBit (pctxt, extbit);
17678
17679 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
17680
17681 /* encode requestSeqNum */
17682
17683 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
17684 if (stat != ASN_OK) return stat;
17685
17686 /* encode bandWidth */
17687
17688 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandWidth);
17689 if (stat != ASN_OK) return stat;
17690
17691 /* encode nonStandardData */
17692
17693 if (pvalue->m.nonStandardDataPresent) {
17694 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17695 if (stat != ASN_OK) return stat;
17696 }
17697
17698 if (extbit) {
17699
17700 /* encode extension optional bits length */
17701
17702 stat = encodeSmallNonNegWholeNumber (pctxt, 4);
17703 if (stat != ASN_OK) return stat;
17704
17705 /* encode optional bits */
17706
17707 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
17708 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
17709 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
17710 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
17711 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
17712 /* encode extension elements */
17713
17714 if (pvalue->m.tokensPresent) {
17715 initContext (&lctxt);
17716 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17717 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17718
17719 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
17720 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17721
17722 stat = encodeByteAlign (&lctxt);
17723 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17724
17725 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17726
17727 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17728 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17729
17730 freeContext (&lctxt);
17731 }
17732
17733 if (pvalue->m.cryptoTokensPresent) {
17734 initContext (&lctxt);
17735 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17736 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17737
17738 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
17739 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17740
17741 stat = encodeByteAlign (&lctxt);
17742 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17743
17744 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17745
17746 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17747 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17748
17749 freeContext (&lctxt);
17750 }
17751
17752 if (pvalue->m.integrityCheckValuePresent) {
17753 initContext (&lctxt);
17754 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17755 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17756
17757 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
17758 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17759
17760 stat = encodeByteAlign (&lctxt);
17761 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17762
17763 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17764
17765 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17766 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17767
17768 freeContext (&lctxt);
17769 }
17770
17771 if (pvalue->m.capacityPresent) {
17772 initContext (&lctxt);
17773 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17774 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17775
17776 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
17777 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17778
17779 stat = encodeByteAlign (&lctxt);
17780 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17781
17782 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17783
17784 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17785 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17786
17787 freeContext (&lctxt);
17788 }
17789
17790 if (pvalue->m.genericDataPresent) {
17791 initContext (&lctxt);
17792 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17793 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17794
17795 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
17796 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17797
17798 stat = encodeByteAlign (&lctxt);
17799 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17800
17801 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17802
17803 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17804 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17805
17806 freeContext (&lctxt);
17807 }
17808
17809 }
17810
17811 return (stat);
17812 }
17813
17814 /**************************************************************/
17815 /* */
17816 /* BandRejectReason */
17817 /* */
17818 /**************************************************************/
17819
17820 EXTERN int asn1PE_H225BandRejectReason (OOCTXT* pctxt, H225BandRejectReason* pvalue)
17821 {
17822 int stat = ASN_OK;
17823 OOCTXT lctxt;
17824 ASN1OpenType openType;
17825 ASN1BOOL extbit;
17826
17827 /* extension bit */
17828
17829 extbit = (ASN1BOOL)(pvalue->t > 6);
17830
17831 encodeBit (pctxt, extbit);
17832
17833 if (!extbit) {
17834
17835 /* Encode choice index value */
17836
17837 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 5);
17838 if (stat != ASN_OK) return stat;
17839
17840 /* Encode root element data value */
17841
17842 switch (pvalue->t)
17843 {
17844 /* notBound */
17845 case 1:
17846 /* NULL */
17847 break;
17848
17849 /* invalidConferenceID */
17850 case 2:
17851 /* NULL */
17852 break;
17853
17854 /* invalidPermission */
17855 case 3:
17856 /* NULL */
17857 break;
17858
17859 /* insufficientResources */
17860 case 4:
17861 /* NULL */
17862 break;
17863
17864 /* invalidRevision */
17865 case 5:
17866 /* NULL */
17867 break;
17868
17869 /* undefinedReason */
17870 case 6:
17871 /* NULL */
17872 break;
17873
17874 default:
17875 return ASN_E_INVOPT;
17876 }
17877 }
17878 else {
17879 /* Encode extension choice index value */
17880
17881 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 7);
17882 if (stat != ASN_OK) return stat;
17883
17884 /* Encode extension element data value */
17885
17886 initContext (&lctxt);
17887 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17888 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17889
17890 switch (pvalue->t)
17891 {
17892 /* securityDenial */
17893 case 7:
17894 /* NULL */
17895 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17896 break;
17897
17898 /* securityError */
17899 case 8:
17900 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
17901 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17902 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17903 break;
17904
17905 default:
17906 ;
17907 }
17908
17909 stat = encodeByteAlign (pctxt);
17910 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17911
17912 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17913 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17914
17915 freeContext (&lctxt);
17916 }
17917
17918 return (stat);
17919 }
17920
17921 /**************************************************************/
17922 /* */
17923 /* BandwidthReject */
17924 /* */
17925 /**************************************************************/
17926
17927 EXTERN int asn1PE_H225BandwidthReject (OOCTXT* pctxt, H225BandwidthReject* pvalue)
17928 {
17929 int stat = ASN_OK;
17930 ASN1BOOL extbit;
17931 ASN1OpenType openType;
17932 OOCTXT lctxt;
17933
17934 /* extension bit */
17935
17936 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
17937 pvalue->m.tokensPresent ||
17938 pvalue->m.cryptoTokensPresent ||
17939 pvalue->m.integrityCheckValuePresent ||
17940 pvalue->m.genericDataPresent);
17941
17942 encodeBit (pctxt, extbit);
17943
17944 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
17945
17946 /* encode requestSeqNum */
17947
17948 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
17949 if (stat != ASN_OK) return stat;
17950
17951 /* encode rejectReason */
17952
17953 stat = asn1PE_H225BandRejectReason (pctxt, &pvalue->rejectReason);
17954 if (stat != ASN_OK) return stat;
17955
17956 /* encode allowedBandWidth */
17957
17958 stat = asn1PE_H225BandWidth (pctxt, pvalue->allowedBandWidth);
17959 if (stat != ASN_OK) return stat;
17960
17961 /* encode nonStandardData */
17962
17963 if (pvalue->m.nonStandardDataPresent) {
17964 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
17965 if (stat != ASN_OK) return stat;
17966 }
17967
17968 if (extbit) {
17969
17970 /* encode extension optional bits length */
17971
17972 stat = encodeSmallNonNegWholeNumber (pctxt, 4);
17973 if (stat != ASN_OK) return stat;
17974
17975 /* encode optional bits */
17976
17977 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
17978 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
17979 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
17980 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
17981 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
17982 /* encode extension elements */
17983
17984 if (pvalue->m.altGKInfoPresent) {
17985 initContext (&lctxt);
17986 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
17987 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17988
17989 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
17990 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17991
17992 stat = encodeByteAlign (&lctxt);
17993 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17994
17995 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
17996
17997 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
17998 if (stat != ASN_OK) return freeContext (&lctxt), stat;
17999
18000 freeContext (&lctxt);
18001 }
18002
18003 if (pvalue->m.tokensPresent) {
18004 initContext (&lctxt);
18005 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18006 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18007
18008 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
18009 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18010
18011 stat = encodeByteAlign (&lctxt);
18012 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18013
18014 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18015
18016 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18017 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18018
18019 freeContext (&lctxt);
18020 }
18021
18022 if (pvalue->m.cryptoTokensPresent) {
18023 initContext (&lctxt);
18024 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18025 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18026
18027 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
18028 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18029
18030 stat = encodeByteAlign (&lctxt);
18031 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18032
18033 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18034
18035 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18036 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18037
18038 freeContext (&lctxt);
18039 }
18040
18041 if (pvalue->m.integrityCheckValuePresent) {
18042 initContext (&lctxt);
18043 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18044 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18045
18046 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
18047 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18048
18049 stat = encodeByteAlign (&lctxt);
18050 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18051
18052 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18053
18054 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18055 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18056
18057 freeContext (&lctxt);
18058 }
18059
18060 if (pvalue->m.genericDataPresent) {
18061 initContext (&lctxt);
18062 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18063 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18064
18065 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
18066 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18067
18068 stat = encodeByteAlign (&lctxt);
18069 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18070
18071 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18072
18073 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18074 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18075
18076 freeContext (&lctxt);
18077 }
18078
18079 }
18080
18081 return (stat);
18082 }
18083
18084 /**************************************************************/
18085 /* */
18086 /* DisengageReason */
18087 /* */
18088 /**************************************************************/
18089
18090 EXTERN int asn1PE_H225DisengageReason (OOCTXT* pctxt, H225DisengageReason* pvalue)
18091 {
18092 int stat = ASN_OK;
18093 ASN1BOOL extbit;
18094
18095 /* extension bit */
18096
18097 extbit = (ASN1BOOL)(pvalue->t > 3);
18098
18099 encodeBit (pctxt, extbit);
18100
18101 if (!extbit) {
18102
18103 /* Encode choice index value */
18104
18105 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
18106 if (stat != ASN_OK) return stat;
18107
18108 /* Encode root element data value */
18109
18110 switch (pvalue->t)
18111 {
18112 /* forcedDrop */
18113 case 1:
18114 /* NULL */
18115 break;
18116
18117 /* normalDrop */
18118 case 2:
18119 /* NULL */
18120 break;
18121
18122 /* undefinedReason */
18123 case 3:
18124 /* NULL */
18125 break;
18126
18127 default:
18128 return ASN_E_INVOPT;
18129 }
18130 }
18131 else {
18132 /* Encode extension choice index value */
18133
18134 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
18135 if (stat != ASN_OK) return stat;
18136
18137 /* Encode extension element data value */
18138
18139 }
18140
18141 return (stat);
18142 }
18143
18144 /**************************************************************/
18145 /* */
18146 /* DisengageRequest */
18147 /* */
18148 /**************************************************************/
18149
18150 EXTERN int asn1PE_H225DisengageRequest (OOCTXT* pctxt, H225DisengageRequest* pvalue)
18151 {
18152 int stat = ASN_OK;
18153 ASN1BOOL extbit;
18154 ASN1OpenType openType;
18155 OOCTXT lctxt;
18156
18157 /* extension bit */
18158
18159 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
18160 pvalue->m.gatekeeperIdentifierPresent ||
18161 pvalue->m.tokensPresent ||
18162 pvalue->m.cryptoTokensPresent ||
18163 pvalue->m.integrityCheckValuePresent ||
18164 pvalue->m.answeredCallPresent ||
18165 pvalue->m.callLinkagePresent ||
18166 pvalue->m.capacityPresent ||
18167 pvalue->m.circuitInfoPresent ||
18168 pvalue->m.usageInformationPresent ||
18169 pvalue->m.terminationCausePresent ||
18170 pvalue->m.serviceControlPresent ||
18171 pvalue->m.genericDataPresent);
18172
18173 encodeBit (pctxt, extbit);
18174
18175 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
18176
18177 /* encode requestSeqNum */
18178
18179 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
18180 if (stat != ASN_OK) return stat;
18181
18182 /* encode endpointIdentifier */
18183
18184 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
18185 if (stat != ASN_OK) return stat;
18186
18187 /* encode conferenceID */
18188
18189 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
18190 if (stat != ASN_OK) return stat;
18191
18192 /* encode callReferenceValue */
18193
18194 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->callReferenceValue);
18195 if (stat != ASN_OK) return stat;
18196
18197 /* encode disengageReason */
18198
18199 stat = asn1PE_H225DisengageReason (pctxt, &pvalue->disengageReason);
18200 if (stat != ASN_OK) return stat;
18201
18202 /* encode nonStandardData */
18203
18204 if (pvalue->m.nonStandardDataPresent) {
18205 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18206 if (stat != ASN_OK) return stat;
18207 }
18208
18209 if (extbit) {
18210
18211 /* encode extension optional bits length */
18212
18213 stat = encodeSmallNonNegWholeNumber (pctxt, 12);
18214 if (stat != ASN_OK) return stat;
18215
18216 /* encode optional bits */
18217
18218 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
18219 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
18220 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
18221 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
18222 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
18223 encodeBit (pctxt, (ASN1BOOL)pvalue->m.answeredCallPresent);
18224 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
18225 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
18226 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
18227 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageInformationPresent);
18228 encodeBit (pctxt, (ASN1BOOL)pvalue->m.terminationCausePresent);
18229 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
18230 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
18231 /* encode extension elements */
18232
18233 if (pvalue->m.callIdentifierPresent) {
18234 initContext (&lctxt);
18235 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18236 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18237
18238 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
18239 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18240
18241 stat = encodeByteAlign (&lctxt);
18242 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18243
18244 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18245
18246 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18247 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18248
18249 freeContext (&lctxt);
18250 }
18251
18252 if (pvalue->m.gatekeeperIdentifierPresent) {
18253 initContext (&lctxt);
18254 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18255 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18256
18257 stat = asn1PE_H225GatekeeperIdentifier (&lctxt, pvalue->gatekeeperIdentifier);
18258 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18259
18260 stat = encodeByteAlign (&lctxt);
18261 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18262
18263 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18264
18265 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18266 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18267
18268 freeContext (&lctxt);
18269 }
18270
18271 if (pvalue->m.tokensPresent) {
18272 initContext (&lctxt);
18273 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18274 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18275
18276 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
18277 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18278
18279 stat = encodeByteAlign (&lctxt);
18280 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18281
18282 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18283
18284 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18285 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18286
18287 freeContext (&lctxt);
18288 }
18289
18290 if (pvalue->m.cryptoTokensPresent) {
18291 initContext (&lctxt);
18292 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18293 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18294
18295 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
18296 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18297
18298 stat = encodeByteAlign (&lctxt);
18299 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18300
18301 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18302
18303 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18304 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18305
18306 freeContext (&lctxt);
18307 }
18308
18309 if (pvalue->m.integrityCheckValuePresent) {
18310 initContext (&lctxt);
18311 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18312 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18313
18314 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
18315 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18316
18317 stat = encodeByteAlign (&lctxt);
18318 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18319
18320 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18321
18322 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18323 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18324
18325 freeContext (&lctxt);
18326 }
18327
18328 if (pvalue->m.answeredCallPresent) {
18329 initContext (&lctxt);
18330 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18331 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18332
18333 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->answeredCall);
18334 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18335
18336 stat = encodeByteAlign (&lctxt);
18337 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18338
18339 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18340
18341 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18342 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18343
18344 freeContext (&lctxt);
18345 }
18346
18347 if (pvalue->m.callLinkagePresent) {
18348 initContext (&lctxt);
18349 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18350 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18351
18352 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
18353 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18354
18355 stat = encodeByteAlign (&lctxt);
18356 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18357
18358 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18359
18360 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18361 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18362
18363 freeContext (&lctxt);
18364 }
18365
18366 if (pvalue->m.capacityPresent) {
18367 initContext (&lctxt);
18368 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18369 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18370
18371 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
18372 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18373
18374 stat = encodeByteAlign (&lctxt);
18375 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18376
18377 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18378
18379 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18380 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18381
18382 freeContext (&lctxt);
18383 }
18384
18385 if (pvalue->m.circuitInfoPresent) {
18386 initContext (&lctxt);
18387 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18388 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18389
18390 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
18391 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18392
18393 stat = encodeByteAlign (&lctxt);
18394 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18395
18396 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18397
18398 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18399 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18400
18401 freeContext (&lctxt);
18402 }
18403
18404 if (pvalue->m.usageInformationPresent) {
18405 initContext (&lctxt);
18406 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18407 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18408
18409 stat = asn1PE_H225RasUsageInformation (&lctxt, &pvalue->usageInformation);
18410 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18411
18412 stat = encodeByteAlign (&lctxt);
18413 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18414
18415 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18416
18417 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18418 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18419
18420 freeContext (&lctxt);
18421 }
18422
18423 if (pvalue->m.terminationCausePresent) {
18424 initContext (&lctxt);
18425 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18426 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18427
18428 stat = asn1PE_H225CallTerminationCause (&lctxt, &pvalue->terminationCause);
18429 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18430
18431 stat = encodeByteAlign (&lctxt);
18432 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18433
18434 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18435
18436 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18437 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18438
18439 freeContext (&lctxt);
18440 }
18441
18442 if (pvalue->m.serviceControlPresent) {
18443 initContext (&lctxt);
18444 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18445 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18446
18447 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
18448 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18449
18450 stat = encodeByteAlign (&lctxt);
18451 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18452
18453 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18454
18455 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18456 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18457
18458 freeContext (&lctxt);
18459 }
18460
18461 if (pvalue->m.genericDataPresent) {
18462 initContext (&lctxt);
18463 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18464 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18465
18466 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
18467 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18468
18469 stat = encodeByteAlign (&lctxt);
18470 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18471
18472 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18473
18474 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18475 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18476
18477 freeContext (&lctxt);
18478 }
18479
18480 }
18481
18482 return (stat);
18483 }
18484
18485 /**************************************************************/
18486 /* */
18487 /* DisengageConfirm */
18488 /* */
18489 /**************************************************************/
18490
18491 EXTERN int asn1PE_H225DisengageConfirm (OOCTXT* pctxt, H225DisengageConfirm* pvalue)
18492 {
18493 int stat = ASN_OK;
18494 ASN1BOOL extbit;
18495 ASN1OpenType openType;
18496 OOCTXT lctxt;
18497
18498 /* extension bit */
18499
18500 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
18501 pvalue->m.cryptoTokensPresent ||
18502 pvalue->m.integrityCheckValuePresent ||
18503 pvalue->m.capacityPresent ||
18504 pvalue->m.circuitInfoPresent ||
18505 pvalue->m.usageInformationPresent ||
18506 pvalue->m.genericDataPresent);
18507
18508 encodeBit (pctxt, extbit);
18509
18510 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
18511
18512 /* encode requestSeqNum */
18513
18514 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
18515 if (stat != ASN_OK) return stat;
18516
18517 /* encode nonStandardData */
18518
18519 if (pvalue->m.nonStandardDataPresent) {
18520 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18521 if (stat != ASN_OK) return stat;
18522 }
18523
18524 if (extbit) {
18525
18526 /* encode extension optional bits length */
18527
18528 stat = encodeSmallNonNegWholeNumber (pctxt, 6);
18529 if (stat != ASN_OK) return stat;
18530
18531 /* encode optional bits */
18532
18533 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
18534 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
18535 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
18536 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
18537 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
18538 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageInformationPresent);
18539 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
18540 /* encode extension elements */
18541
18542 if (pvalue->m.tokensPresent) {
18543 initContext (&lctxt);
18544 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18545 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18546
18547 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
18548 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18549
18550 stat = encodeByteAlign (&lctxt);
18551 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18552
18553 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18554
18555 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18556 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18557
18558 freeContext (&lctxt);
18559 }
18560
18561 if (pvalue->m.cryptoTokensPresent) {
18562 initContext (&lctxt);
18563 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18564 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18565
18566 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
18567 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18568
18569 stat = encodeByteAlign (&lctxt);
18570 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18571
18572 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18573
18574 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18575 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18576
18577 freeContext (&lctxt);
18578 }
18579
18580 if (pvalue->m.integrityCheckValuePresent) {
18581 initContext (&lctxt);
18582 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18583 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18584
18585 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
18586 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18587
18588 stat = encodeByteAlign (&lctxt);
18589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18590
18591 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18592
18593 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18594 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18595
18596 freeContext (&lctxt);
18597 }
18598
18599 if (pvalue->m.capacityPresent) {
18600 initContext (&lctxt);
18601 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18602 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18603
18604 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
18605 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18606
18607 stat = encodeByteAlign (&lctxt);
18608 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18609
18610 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18611
18612 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18613 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18614
18615 freeContext (&lctxt);
18616 }
18617
18618 if (pvalue->m.circuitInfoPresent) {
18619 initContext (&lctxt);
18620 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18621 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18622
18623 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
18624 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18625
18626 stat = encodeByteAlign (&lctxt);
18627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18628
18629 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18630
18631 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18632 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18633
18634 freeContext (&lctxt);
18635 }
18636
18637 if (pvalue->m.usageInformationPresent) {
18638 initContext (&lctxt);
18639 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18640 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18641
18642 stat = asn1PE_H225RasUsageInformation (&lctxt, &pvalue->usageInformation);
18643 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18644
18645 stat = encodeByteAlign (&lctxt);
18646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18647
18648 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18649
18650 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18651 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18652
18653 freeContext (&lctxt);
18654 }
18655
18656 if (pvalue->m.genericDataPresent) {
18657 initContext (&lctxt);
18658 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18659 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18660
18661 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
18662 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18663
18664 stat = encodeByteAlign (&lctxt);
18665 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18666
18667 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18668
18669 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18670 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18671
18672 freeContext (&lctxt);
18673 }
18674
18675 }
18676
18677 return (stat);
18678 }
18679
18680 /**************************************************************/
18681 /* */
18682 /* DisengageRejectReason */
18683 /* */
18684 /**************************************************************/
18685
18686 EXTERN int asn1PE_H225DisengageRejectReason (OOCTXT* pctxt, H225DisengageRejectReason* pvalue)
18687 {
18688 int stat = ASN_OK;
18689 OOCTXT lctxt;
18690 ASN1OpenType openType;
18691 ASN1BOOL extbit;
18692
18693 /* extension bit */
18694
18695 extbit = (ASN1BOOL)(pvalue->t > 2);
18696
18697 encodeBit (pctxt, extbit);
18698
18699 if (!extbit) {
18700
18701 /* Encode choice index value */
18702
18703 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 1);
18704 if (stat != ASN_OK) return stat;
18705
18706 /* Encode root element data value */
18707
18708 switch (pvalue->t)
18709 {
18710 /* notRegistered */
18711 case 1:
18712 /* NULL */
18713 break;
18714
18715 /* requestToDropOther */
18716 case 2:
18717 /* NULL */
18718 break;
18719
18720 default:
18721 return ASN_E_INVOPT;
18722 }
18723 }
18724 else {
18725 /* Encode extension choice index value */
18726
18727 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 3);
18728 if (stat != ASN_OK) return stat;
18729
18730 /* Encode extension element data value */
18731
18732 initContext (&lctxt);
18733 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18734 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18735
18736 switch (pvalue->t)
18737 {
18738 /* securityDenial */
18739 case 3:
18740 /* NULL */
18741 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18742 break;
18743
18744 /* securityError */
18745 case 4:
18746 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
18747 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18748 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18749 break;
18750
18751 default:
18752 ;
18753 }
18754
18755 stat = encodeByteAlign (pctxt);
18756 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18757
18758 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18759 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18760
18761 freeContext (&lctxt);
18762 }
18763
18764 return (stat);
18765 }
18766
18767 /**************************************************************/
18768 /* */
18769 /* DisengageReject */
18770 /* */
18771 /**************************************************************/
18772
18773 EXTERN int asn1PE_H225DisengageReject (OOCTXT* pctxt, H225DisengageReject* pvalue)
18774 {
18775 int stat = ASN_OK;
18776 ASN1BOOL extbit;
18777 ASN1OpenType openType;
18778 OOCTXT lctxt;
18779
18780 /* extension bit */
18781
18782 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
18783 pvalue->m.tokensPresent ||
18784 pvalue->m.cryptoTokensPresent ||
18785 pvalue->m.integrityCheckValuePresent ||
18786 pvalue->m.genericDataPresent);
18787
18788 encodeBit (pctxt, extbit);
18789
18790 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
18791
18792 /* encode requestSeqNum */
18793
18794 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
18795 if (stat != ASN_OK) return stat;
18796
18797 /* encode rejectReason */
18798
18799 stat = asn1PE_H225DisengageRejectReason (pctxt, &pvalue->rejectReason);
18800 if (stat != ASN_OK) return stat;
18801
18802 /* encode nonStandardData */
18803
18804 if (pvalue->m.nonStandardDataPresent) {
18805 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18806 if (stat != ASN_OK) return stat;
18807 }
18808
18809 if (extbit) {
18810
18811 /* encode extension optional bits length */
18812
18813 stat = encodeSmallNonNegWholeNumber (pctxt, 4);
18814 if (stat != ASN_OK) return stat;
18815
18816 /* encode optional bits */
18817
18818 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
18819 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
18820 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
18821 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
18822 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
18823 /* encode extension elements */
18824
18825 if (pvalue->m.altGKInfoPresent) {
18826 initContext (&lctxt);
18827 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18828 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18829
18830 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
18831 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18832
18833 stat = encodeByteAlign (&lctxt);
18834 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18835
18836 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18837
18838 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18839 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18840
18841 freeContext (&lctxt);
18842 }
18843
18844 if (pvalue->m.tokensPresent) {
18845 initContext (&lctxt);
18846 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18847 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18848
18849 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
18850 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18851
18852 stat = encodeByteAlign (&lctxt);
18853 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18854
18855 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18856
18857 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18858 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18859
18860 freeContext (&lctxt);
18861 }
18862
18863 if (pvalue->m.cryptoTokensPresent) {
18864 initContext (&lctxt);
18865 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18866 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18867
18868 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
18869 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18870
18871 stat = encodeByteAlign (&lctxt);
18872 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18873
18874 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18875
18876 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18877 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18878
18879 freeContext (&lctxt);
18880 }
18881
18882 if (pvalue->m.integrityCheckValuePresent) {
18883 initContext (&lctxt);
18884 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18885 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18886
18887 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
18888 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18889
18890 stat = encodeByteAlign (&lctxt);
18891 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18892
18893 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18894
18895 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18896 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18897
18898 freeContext (&lctxt);
18899 }
18900
18901 if (pvalue->m.genericDataPresent) {
18902 initContext (&lctxt);
18903 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
18904 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18905
18906 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
18907 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18908
18909 stat = encodeByteAlign (&lctxt);
18910 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18911
18912 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
18913
18914 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
18915 if (stat != ASN_OK) return freeContext (&lctxt), stat;
18916
18917 freeContext (&lctxt);
18918 }
18919
18920 }
18921
18922 return (stat);
18923 }
18924
18925 /**************************************************************/
18926 /* */
18927 /* LocationRequest */
18928 /* */
18929 /**************************************************************/
18930
18931 EXTERN int asn1PE_H225LocationRequest (OOCTXT* pctxt, H225LocationRequest* pvalue)
18932 {
18933 int stat = ASN_OK;
18934 ASN1BOOL extbit;
18935 ASN1OpenType openType;
18936 OOCTXT lctxt;
18937
18938 /* extension bit */
18939
18940 extbit = (ASN1BOOL)(pvalue->m.sourceInfoPresent ||
18941 pvalue->m.canMapAliasPresent ||
18942 pvalue->m.gatekeeperIdentifierPresent ||
18943 pvalue->m.tokensPresent ||
18944 pvalue->m.cryptoTokensPresent ||
18945 pvalue->m.integrityCheckValuePresent ||
18946 pvalue->m.desiredProtocolsPresent ||
18947 pvalue->m.desiredTunnelledProtocolPresent ||
18948 pvalue->m.featureSetPresent ||
18949 pvalue->m.genericDataPresent ||
18950 pvalue->m.hopCountPresent ||
18951 pvalue->m.circuitInfoPresent ||
18952 pvalue->m.callIdentifierPresent ||
18953 pvalue->m.bandWidthPresent ||
18954 pvalue->m.sourceEndpointInfoPresent ||
18955 pvalue->m.canMapSrcAliasPresent);
18956
18957 encodeBit (pctxt, extbit);
18958
18959 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointIdentifierPresent);
18960
18961 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
18962
18963 /* encode requestSeqNum */
18964
18965 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
18966 if (stat != ASN_OK) return stat;
18967
18968 /* encode endpointIdentifier */
18969
18970 if (pvalue->m.endpointIdentifierPresent) {
18971 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
18972 if (stat != ASN_OK) return stat;
18973 }
18974
18975 /* encode destinationInfo */
18976
18977 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->destinationInfo);
18978 if (stat != ASN_OK) return stat;
18979
18980 /* encode nonStandardData */
18981
18982 if (pvalue->m.nonStandardDataPresent) {
18983 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
18984 if (stat != ASN_OK) return stat;
18985 }
18986
18987 /* encode replyAddress */
18988
18989 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->replyAddress);
18990 if (stat != ASN_OK) return stat;
18991
18992 if (extbit) {
18993
18994 /* encode extension optional bits length */
18995
18996 stat = encodeSmallNonNegWholeNumber (pctxt, 15);
18997 if (stat != ASN_OK) return stat;
18998
18999 /* encode optional bits */
19000
19001 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sourceInfoPresent);
19002 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canMapAliasPresent);
19003 encodeBit (pctxt, (ASN1BOOL)pvalue->m.gatekeeperIdentifierPresent);
19004 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
19005 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
19006 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
19007 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredProtocolsPresent);
19008 encodeBit (pctxt, (ASN1BOOL)pvalue->m.desiredTunnelledProtocolPresent);
19009 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
19010 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
19011 encodeBit (pctxt, (ASN1BOOL)pvalue->m.hopCountPresent);
19012 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
19013 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
19014 encodeBit (pctxt, (ASN1BOOL)pvalue->m.bandWidthPresent);
19015 encodeBit (pctxt, (ASN1BOOL)pvalue->m.sourceEndpointInfoPresent);
19016 encodeBit (pctxt, (ASN1BOOL)pvalue->m.canMapSrcAliasPresent);
19017 /* encode extension elements */
19018
19019 if (pvalue->m.sourceInfoPresent) {
19020 initContext (&lctxt);
19021 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19022 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19023
19024 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->sourceInfo);
19025 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19026
19027 stat = encodeByteAlign (&lctxt);
19028 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19029
19030 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19031
19032 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19033 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19034
19035 freeContext (&lctxt);
19036 }
19037
19038 if (pvalue->m.canMapAliasPresent) {
19039 initContext (&lctxt);
19040 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19041 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19042
19043 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->canMapAlias);
19044 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19045
19046 stat = encodeByteAlign (&lctxt);
19047 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19048
19049 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19050
19051 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19052 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19053
19054 freeContext (&lctxt);
19055 }
19056
19057 if (pvalue->m.gatekeeperIdentifierPresent) {
19058 initContext (&lctxt);
19059 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19060 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19061
19062 stat = asn1PE_H225GatekeeperIdentifier (&lctxt, pvalue->gatekeeperIdentifier);
19063 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19064
19065 stat = encodeByteAlign (&lctxt);
19066 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19067
19068 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19069
19070 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19071 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19072
19073 freeContext (&lctxt);
19074 }
19075
19076 if (pvalue->m.tokensPresent) {
19077 initContext (&lctxt);
19078 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19079 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19080
19081 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
19082 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19083
19084 stat = encodeByteAlign (&lctxt);
19085 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19086
19087 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19088
19089 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19090 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19091
19092 freeContext (&lctxt);
19093 }
19094
19095 if (pvalue->m.cryptoTokensPresent) {
19096 initContext (&lctxt);
19097 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19098 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19099
19100 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
19101 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19102
19103 stat = encodeByteAlign (&lctxt);
19104 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19105
19106 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19107
19108 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19109 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19110
19111 freeContext (&lctxt);
19112 }
19113
19114 if (pvalue->m.integrityCheckValuePresent) {
19115 initContext (&lctxt);
19116 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19117 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19118
19119 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
19120 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19121
19122 stat = encodeByteAlign (&lctxt);
19123 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19124
19125 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19126
19127 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19128 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19129
19130 freeContext (&lctxt);
19131 }
19132
19133 if (pvalue->m.desiredProtocolsPresent) {
19134 initContext (&lctxt);
19135 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19136 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19137
19138 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->desiredProtocols);
19139 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19140
19141 stat = encodeByteAlign (&lctxt);
19142 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19143
19144 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19145
19146 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19147 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19148
19149 freeContext (&lctxt);
19150 }
19151
19152 if (pvalue->m.desiredTunnelledProtocolPresent) {
19153 initContext (&lctxt);
19154 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19155 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19156
19157 stat = asn1PE_H225TunnelledProtocol (&lctxt, &pvalue->desiredTunnelledProtocol);
19158 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19159
19160 stat = encodeByteAlign (&lctxt);
19161 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19162
19163 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19164
19165 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19166 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19167
19168 freeContext (&lctxt);
19169 }
19170
19171 if (pvalue->m.featureSetPresent) {
19172 initContext (&lctxt);
19173 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19174 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19175
19176 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
19177 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19178
19179 stat = encodeByteAlign (&lctxt);
19180 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19181
19182 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19183
19184 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19185 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19186
19187 freeContext (&lctxt);
19188 }
19189
19190 if (pvalue->m.genericDataPresent) {
19191 initContext (&lctxt);
19192 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19193 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19194
19195 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
19196 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19197
19198 stat = encodeByteAlign (&lctxt);
19199 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19200
19201 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19202
19203 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19204 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19205
19206 freeContext (&lctxt);
19207 }
19208
19209 if (pvalue->m.hopCountPresent) {
19210 initContext (&lctxt);
19211 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19212 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19213
19214 stat = encodeConsUnsigned (&lctxt, pvalue->hopCount, 1U, 255U);
19215 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19216
19217 stat = encodeByteAlign (&lctxt);
19218 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19219
19220 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19221
19222 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19223 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19224
19225 freeContext (&lctxt);
19226 }
19227
19228 if (pvalue->m.circuitInfoPresent) {
19229 initContext (&lctxt);
19230 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19231 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19232
19233 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
19234 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19235
19236 stat = encodeByteAlign (&lctxt);
19237 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19238
19239 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19240
19241 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19242 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19243
19244 freeContext (&lctxt);
19245 }
19246
19247 if (pvalue->m.callIdentifierPresent) {
19248 initContext (&lctxt);
19249 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19250 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19251
19252 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
19253 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19254
19255 stat = encodeByteAlign (&lctxt);
19256 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19257
19258 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19259
19260 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19261 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19262
19263 freeContext (&lctxt);
19264 }
19265
19266 if (pvalue->m.bandWidthPresent) {
19267 initContext (&lctxt);
19268 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19269 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19270
19271 stat = asn1PE_H225BandWidth (&lctxt, pvalue->bandWidth);
19272 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19273
19274 stat = encodeByteAlign (&lctxt);
19275 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19276
19277 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19278
19279 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19280 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19281
19282 freeContext (&lctxt);
19283 }
19284
19285 if (pvalue->m.sourceEndpointInfoPresent) {
19286 initContext (&lctxt);
19287 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19288 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19289
19290 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->sourceEndpointInfo);
19291 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19292
19293 stat = encodeByteAlign (&lctxt);
19294 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19295
19296 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19297
19298 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19299 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19300
19301 freeContext (&lctxt);
19302 }
19303
19304 if (pvalue->m.canMapSrcAliasPresent) {
19305 initContext (&lctxt);
19306 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19307 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19308
19309 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->canMapSrcAlias);
19310 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19311
19312 stat = encodeByteAlign (&lctxt);
19313 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19314
19315 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19316
19317 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19318 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19319
19320 freeContext (&lctxt);
19321 }
19322
19323 }
19324
19325 return (stat);
19326 }
19327
19328 /**************************************************************/
19329 /* */
19330 /* LocationConfirm */
19331 /* */
19332 /**************************************************************/
19333
19334 EXTERN int asn1PE_H225LocationConfirm (OOCTXT* pctxt, H225LocationConfirm* pvalue)
19335 {
19336 int stat = ASN_OK;
19337 ASN1BOOL extbit;
19338 ASN1OpenType openType;
19339 OOCTXT lctxt;
19340
19341 /* extension bit */
19342
19343 extbit = (ASN1BOOL)(pvalue->m.destinationInfoPresent ||
19344 pvalue->m.destExtraCallInfoPresent ||
19345 pvalue->m.destinationTypePresent ||
19346 pvalue->m.remoteExtensionAddressPresent ||
19347 pvalue->m.alternateEndpointsPresent ||
19348 pvalue->m.tokensPresent ||
19349 pvalue->m.cryptoTokensPresent ||
19350 pvalue->m.integrityCheckValuePresent ||
19351 pvalue->m.alternateTransportAddressesPresent ||
19352 pvalue->m.supportedProtocolsPresent ||
19353 pvalue->m.multipleCallsPresent ||
19354 pvalue->m.featureSetPresent ||
19355 pvalue->m.genericDataPresent ||
19356 pvalue->m.circuitInfoPresent ||
19357 pvalue->m.serviceControlPresent ||
19358 pvalue->m.modifiedSrcInfoPresent ||
19359 pvalue->m.bandWidthPresent);
19360
19361 encodeBit (pctxt, extbit);
19362
19363 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
19364
19365 /* encode requestSeqNum */
19366
19367 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
19368 if (stat != ASN_OK) return stat;
19369
19370 /* encode callSignalAddress */
19371
19372 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->callSignalAddress);
19373 if (stat != ASN_OK) return stat;
19374
19375 /* encode rasAddress */
19376
19377 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->rasAddress);
19378 if (stat != ASN_OK) return stat;
19379
19380 /* encode nonStandardData */
19381
19382 if (pvalue->m.nonStandardDataPresent) {
19383 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19384 if (stat != ASN_OK) return stat;
19385 }
19386
19387 if (extbit) {
19388
19389 /* encode extension optional bits length */
19390
19391 stat = encodeSmallNonNegWholeNumber (pctxt, 16);
19392 if (stat != ASN_OK) return stat;
19393
19394 /* encode optional bits */
19395
19396 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationInfoPresent);
19397 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destExtraCallInfoPresent);
19398 encodeBit (pctxt, (ASN1BOOL)pvalue->m.destinationTypePresent);
19399 encodeBit (pctxt, (ASN1BOOL)pvalue->m.remoteExtensionAddressPresent);
19400 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateEndpointsPresent);
19401 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
19402 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
19403 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
19404 encodeBit (pctxt, (ASN1BOOL)pvalue->m.alternateTransportAddressesPresent);
19405 encodeBit (pctxt, (ASN1BOOL)pvalue->m.supportedProtocolsPresent);
19406 encodeBit (pctxt, (ASN1BOOL)pvalue->m.multipleCallsPresent);
19407 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
19408 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
19409 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
19410 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
19411 encodeBit (pctxt, (ASN1BOOL)pvalue->m.modifiedSrcInfoPresent);
19412 encodeBit (pctxt, (ASN1BOOL)pvalue->m.bandWidthPresent);
19413 /* encode extension elements */
19414
19415 if (pvalue->m.destinationInfoPresent) {
19416 initContext (&lctxt);
19417 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19418 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19419
19420 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->destinationInfo);
19421 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19422
19423 stat = encodeByteAlign (&lctxt);
19424 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19425
19426 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19427
19428 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19429 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19430
19431 freeContext (&lctxt);
19432 }
19433
19434 if (pvalue->m.destExtraCallInfoPresent) {
19435 initContext (&lctxt);
19436 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19437 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19438
19439 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->destExtraCallInfo);
19440 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19441
19442 stat = encodeByteAlign (&lctxt);
19443 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19444
19445 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19446
19447 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19448 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19449
19450 freeContext (&lctxt);
19451 }
19452
19453 if (pvalue->m.destinationTypePresent) {
19454 initContext (&lctxt);
19455 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19456 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19457
19458 stat = asn1PE_H225EndpointType (&lctxt, &pvalue->destinationType);
19459 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19460
19461 stat = encodeByteAlign (&lctxt);
19462 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19463
19464 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19465
19466 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19467 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19468
19469 freeContext (&lctxt);
19470 }
19471
19472 if (pvalue->m.remoteExtensionAddressPresent) {
19473 initContext (&lctxt);
19474 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19475 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19476
19477 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->remoteExtensionAddress);
19478 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19479
19480 stat = encodeByteAlign (&lctxt);
19481 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19482
19483 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19484
19485 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19486 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19487
19488 freeContext (&lctxt);
19489 }
19490
19491 if (pvalue->m.alternateEndpointsPresent) {
19492 initContext (&lctxt);
19493 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19494 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19495
19496 stat = asn1PE_H225_SeqOfH225Endpoint (&lctxt, &pvalue->alternateEndpoints);
19497 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19498
19499 stat = encodeByteAlign (&lctxt);
19500 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19501
19502 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19503
19504 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19505 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19506
19507 freeContext (&lctxt);
19508 }
19509
19510 if (pvalue->m.tokensPresent) {
19511 initContext (&lctxt);
19512 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19513 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19514
19515 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
19516 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19517
19518 stat = encodeByteAlign (&lctxt);
19519 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19520
19521 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19522
19523 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19524 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19525
19526 freeContext (&lctxt);
19527 }
19528
19529 if (pvalue->m.cryptoTokensPresent) {
19530 initContext (&lctxt);
19531 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19532 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19533
19534 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
19535 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19536
19537 stat = encodeByteAlign (&lctxt);
19538 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19539
19540 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19541
19542 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19543 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19544
19545 freeContext (&lctxt);
19546 }
19547
19548 if (pvalue->m.integrityCheckValuePresent) {
19549 initContext (&lctxt);
19550 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19551 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19552
19553 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
19554 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19555
19556 stat = encodeByteAlign (&lctxt);
19557 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19558
19559 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19560
19561 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19562 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19563
19564 freeContext (&lctxt);
19565 }
19566
19567 if (pvalue->m.alternateTransportAddressesPresent) {
19568 initContext (&lctxt);
19569 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19570 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19571
19572 stat = asn1PE_H225AlternateTransportAddresses (&lctxt, &pvalue->alternateTransportAddresses);
19573 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19574
19575 stat = encodeByteAlign (&lctxt);
19576 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19577
19578 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19579
19580 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19581 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19582
19583 freeContext (&lctxt);
19584 }
19585
19586 if (pvalue->m.supportedProtocolsPresent) {
19587 initContext (&lctxt);
19588 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19590
19591 stat = asn1PE_H225_SeqOfH225SupportedProtocols (&lctxt, &pvalue->supportedProtocols);
19592 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19593
19594 stat = encodeByteAlign (&lctxt);
19595 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19596
19597 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19598
19599 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19600 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19601
19602 freeContext (&lctxt);
19603 }
19604
19605 if (pvalue->m.multipleCallsPresent) {
19606 initContext (&lctxt);
19607 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19608 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19609
19610 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->multipleCalls);
19611 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19612
19613 stat = encodeByteAlign (&lctxt);
19614 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19615
19616 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19617
19618 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19619 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19620
19621 freeContext (&lctxt);
19622 }
19623
19624 if (pvalue->m.featureSetPresent) {
19625 initContext (&lctxt);
19626 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19627 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19628
19629 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
19630 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19631
19632 stat = encodeByteAlign (&lctxt);
19633 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19634
19635 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19636
19637 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19638 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19639
19640 freeContext (&lctxt);
19641 }
19642
19643 if (pvalue->m.genericDataPresent) {
19644 initContext (&lctxt);
19645 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19646 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19647
19648 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
19649 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19650
19651 stat = encodeByteAlign (&lctxt);
19652 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19653
19654 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19655
19656 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19657 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19658
19659 freeContext (&lctxt);
19660 }
19661
19662 if (pvalue->m.circuitInfoPresent) {
19663 initContext (&lctxt);
19664 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19665 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19666
19667 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
19668 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19669
19670 stat = encodeByteAlign (&lctxt);
19671 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19672
19673 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19674
19675 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19676 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19677
19678 freeContext (&lctxt);
19679 }
19680
19681 if (pvalue->m.serviceControlPresent) {
19682 initContext (&lctxt);
19683 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19684 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19685
19686 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
19687 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19688
19689 stat = encodeByteAlign (&lctxt);
19690 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19691
19692 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19693
19694 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19695 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19696
19697 freeContext (&lctxt);
19698 }
19699
19700 if (pvalue->m.modifiedSrcInfoPresent) {
19701 initContext (&lctxt);
19702 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19703 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19704
19705 stat = asn1PE_H225_SeqOfH225AliasAddress (&lctxt, &pvalue->modifiedSrcInfo);
19706 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19707
19708 stat = encodeByteAlign (&lctxt);
19709 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19710
19711 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19712
19713 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19714 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19715
19716 freeContext (&lctxt);
19717 }
19718
19719 if (pvalue->m.bandWidthPresent) {
19720 initContext (&lctxt);
19721 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19722 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19723
19724 stat = asn1PE_H225BandWidth (&lctxt, pvalue->bandWidth);
19725 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19726
19727 stat = encodeByteAlign (&lctxt);
19728 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19729
19730 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19731
19732 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19733 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19734
19735 freeContext (&lctxt);
19736 }
19737
19738 }
19739
19740 return (stat);
19741 }
19742
19743 /**************************************************************/
19744 /* */
19745 /* LocationRejectReason */
19746 /* */
19747 /**************************************************************/
19748
19749 EXTERN int asn1PE_H225LocationRejectReason (OOCTXT* pctxt, H225LocationRejectReason* pvalue)
19750 {
19751 int stat = ASN_OK;
19752 OOCTXT lctxt;
19753 ASN1OpenType openType;
19754 ASN1BOOL extbit;
19755
19756 /* extension bit */
19757
19758 extbit = (ASN1BOOL)(pvalue->t > 4);
19759
19760 encodeBit (pctxt, extbit);
19761
19762 if (!extbit) {
19763
19764 /* Encode choice index value */
19765
19766 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
19767 if (stat != ASN_OK) return stat;
19768
19769 /* Encode root element data value */
19770
19771 switch (pvalue->t)
19772 {
19773 /* notRegistered */
19774 case 1:
19775 /* NULL */
19776 break;
19777
19778 /* invalidPermission */
19779 case 2:
19780 /* NULL */
19781 break;
19782
19783 /* requestDenied */
19784 case 3:
19785 /* NULL */
19786 break;
19787
19788 /* undefinedReason */
19789 case 4:
19790 /* NULL */
19791 break;
19792
19793 default:
19794 return ASN_E_INVOPT;
19795 }
19796 }
19797 else {
19798 /* Encode extension choice index value */
19799
19800 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
19801 if (stat != ASN_OK) return stat;
19802
19803 /* Encode extension element data value */
19804
19805 initContext (&lctxt);
19806 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19807 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19808
19809 switch (pvalue->t)
19810 {
19811 /* securityDenial */
19812 case 5:
19813 /* NULL */
19814 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19815 break;
19816
19817 /* aliasesInconsistent */
19818 case 6:
19819 /* NULL */
19820 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19821 break;
19822
19823 /* routeCalltoSCN */
19824 case 7:
19825 stat = asn1PE_H225_SeqOfH225PartyNumber (&lctxt, pvalue->u.routeCalltoSCN);
19826 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19827 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19828 break;
19829
19830 /* resourceUnavailable */
19831 case 8:
19832 /* NULL */
19833 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19834 break;
19835
19836 /* genericDataReason */
19837 case 9:
19838 /* NULL */
19839 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19840 break;
19841
19842 /* neededFeatureNotSupported */
19843 case 10:
19844 /* NULL */
19845 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19846 break;
19847
19848 /* hopCountExceeded */
19849 case 11:
19850 /* NULL */
19851 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19852 break;
19853
19854 /* incompleteAddress */
19855 case 12:
19856 /* NULL */
19857 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19858 break;
19859
19860 /* securityError */
19861 case 13:
19862 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
19863 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19864 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19865 break;
19866
19867 /* securityDHmismatch */
19868 case 14:
19869 /* NULL */
19870 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19871 break;
19872
19873 /* noRouteToDestination */
19874 case 15:
19875 /* NULL */
19876 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19877 break;
19878
19879 /* unallocatedNumber */
19880 case 16:
19881 /* NULL */
19882 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19883 break;
19884
19885 default:
19886 ;
19887 }
19888
19889 stat = encodeByteAlign (pctxt);
19890 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19891
19892 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19893 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19894
19895 freeContext (&lctxt);
19896 }
19897
19898 return (stat);
19899 }
19900
19901 /**************************************************************/
19902 /* */
19903 /* LocationReject */
19904 /* */
19905 /**************************************************************/
19906
19907 EXTERN int asn1PE_H225LocationReject (OOCTXT* pctxt, H225LocationReject* pvalue)
19908 {
19909 int stat = ASN_OK;
19910 ASN1BOOL extbit;
19911 ASN1OpenType openType;
19912 OOCTXT lctxt;
19913
19914 /* extension bit */
19915
19916 extbit = (ASN1BOOL)(pvalue->m.altGKInfoPresent ||
19917 pvalue->m.tokensPresent ||
19918 pvalue->m.cryptoTokensPresent ||
19919 pvalue->m.integrityCheckValuePresent ||
19920 pvalue->m.featureSetPresent ||
19921 pvalue->m.genericDataPresent ||
19922 pvalue->m.serviceControlPresent);
19923
19924 encodeBit (pctxt, extbit);
19925
19926 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
19927
19928 /* encode requestSeqNum */
19929
19930 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
19931 if (stat != ASN_OK) return stat;
19932
19933 /* encode rejectReason */
19934
19935 stat = asn1PE_H225LocationRejectReason (pctxt, &pvalue->rejectReason);
19936 if (stat != ASN_OK) return stat;
19937
19938 /* encode nonStandardData */
19939
19940 if (pvalue->m.nonStandardDataPresent) {
19941 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
19942 if (stat != ASN_OK) return stat;
19943 }
19944
19945 if (extbit) {
19946
19947 /* encode extension optional bits length */
19948
19949 stat = encodeSmallNonNegWholeNumber (pctxt, 6);
19950 if (stat != ASN_OK) return stat;
19951
19952 /* encode optional bits */
19953
19954 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
19955 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
19956 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
19957 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
19958 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
19959 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
19960 encodeBit (pctxt, (ASN1BOOL)pvalue->m.serviceControlPresent);
19961 /* encode extension elements */
19962
19963 if (pvalue->m.altGKInfoPresent) {
19964 initContext (&lctxt);
19965 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19966 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19967
19968 stat = asn1PE_H225AltGKInfo (&lctxt, &pvalue->altGKInfo);
19969 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19970
19971 stat = encodeByteAlign (&lctxt);
19972 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19973
19974 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19975
19976 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19977 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19978
19979 freeContext (&lctxt);
19980 }
19981
19982 if (pvalue->m.tokensPresent) {
19983 initContext (&lctxt);
19984 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
19985 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19986
19987 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
19988 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19989
19990 stat = encodeByteAlign (&lctxt);
19991 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19992
19993 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
19994
19995 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
19996 if (stat != ASN_OK) return freeContext (&lctxt), stat;
19997
19998 freeContext (&lctxt);
19999 }
20000
20001 if (pvalue->m.cryptoTokensPresent) {
20002 initContext (&lctxt);
20003 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20004 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20005
20006 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
20007 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20008
20009 stat = encodeByteAlign (&lctxt);
20010 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20011
20012 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20013
20014 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20015 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20016
20017 freeContext (&lctxt);
20018 }
20019
20020 if (pvalue->m.integrityCheckValuePresent) {
20021 initContext (&lctxt);
20022 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20023 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20024
20025 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
20026 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20027
20028 stat = encodeByteAlign (&lctxt);
20029 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20030
20031 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20032
20033 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20034 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20035
20036 freeContext (&lctxt);
20037 }
20038
20039 if (pvalue->m.featureSetPresent) {
20040 initContext (&lctxt);
20041 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20042 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20043
20044 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
20045 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20046
20047 stat = encodeByteAlign (&lctxt);
20048 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20049
20050 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20051
20052 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20053 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20054
20055 freeContext (&lctxt);
20056 }
20057
20058 if (pvalue->m.genericDataPresent) {
20059 initContext (&lctxt);
20060 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20061 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20062
20063 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
20064 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20065
20066 stat = encodeByteAlign (&lctxt);
20067 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20068
20069 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20070
20071 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20072 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20073
20074 freeContext (&lctxt);
20075 }
20076
20077 if (pvalue->m.serviceControlPresent) {
20078 initContext (&lctxt);
20079 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20080 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20081
20082 stat = asn1PE_H225_SeqOfH225ServiceControlSession (&lctxt, &pvalue->serviceControl);
20083 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20084
20085 stat = encodeByteAlign (&lctxt);
20086 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20087
20088 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20089
20090 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20091 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20092
20093 freeContext (&lctxt);
20094 }
20095
20096 }
20097
20098 return (stat);
20099 }
20100
20101 /**************************************************************/
20102 /* */
20103 /* InfoRequest */
20104 /* */
20105 /**************************************************************/
20106
20107 EXTERN int asn1PE_H225InfoRequest (OOCTXT* pctxt, H225InfoRequest* pvalue)
20108 {
20109 int stat = ASN_OK;
20110 ASN1BOOL extbit;
20111 ASN1OpenType openType;
20112 OOCTXT lctxt;
20113
20114 /* extension bit */
20115
20116 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
20117 pvalue->m.tokensPresent ||
20118 pvalue->m.cryptoTokensPresent ||
20119 pvalue->m.integrityCheckValuePresent ||
20120 pvalue->m.uuiesRequestedPresent ||
20121 pvalue->m.callLinkagePresent ||
20122 pvalue->m.usageInfoRequestedPresent ||
20123 pvalue->m.segmentedResponseSupportedPresent ||
20124 pvalue->m.nextSegmentRequestedPresent ||
20125 pvalue->m.capacityInfoRequestedPresent ||
20126 pvalue->m.genericDataPresent);
20127
20128 encodeBit (pctxt, extbit);
20129
20130 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
20131
20132 encodeBit (pctxt, (ASN1BOOL)pvalue->m.replyAddressPresent);
20133
20134 /* encode requestSeqNum */
20135
20136 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
20137 if (stat != ASN_OK) return stat;
20138
20139 /* encode callReferenceValue */
20140
20141 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->callReferenceValue);
20142 if (stat != ASN_OK) return stat;
20143
20144 /* encode nonStandardData */
20145
20146 if (pvalue->m.nonStandardDataPresent) {
20147 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
20148 if (stat != ASN_OK) return stat;
20149 }
20150
20151 /* encode replyAddress */
20152
20153 if (pvalue->m.replyAddressPresent) {
20154 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->replyAddress);
20155 if (stat != ASN_OK) return stat;
20156 }
20157
20158 if (extbit) {
20159
20160 /* encode extension optional bits length */
20161
20162 stat = encodeSmallNonNegWholeNumber (pctxt, 10);
20163 if (stat != ASN_OK) return stat;
20164
20165 /* encode optional bits */
20166
20167 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
20168 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
20169 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
20170 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
20171 encodeBit (pctxt, (ASN1BOOL)pvalue->m.uuiesRequestedPresent);
20172 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
20173 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageInfoRequestedPresent);
20174 encodeBit (pctxt, (ASN1BOOL)pvalue->m.segmentedResponseSupportedPresent);
20175 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nextSegmentRequestedPresent);
20176 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityInfoRequestedPresent);
20177 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
20178 /* encode extension elements */
20179
20180 if (pvalue->m.callIdentifierPresent) {
20181 initContext (&lctxt);
20182 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20183 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20184
20185 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
20186 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20187
20188 stat = encodeByteAlign (&lctxt);
20189 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20190
20191 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20192
20193 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20194 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20195
20196 freeContext (&lctxt);
20197 }
20198
20199 if (pvalue->m.tokensPresent) {
20200 initContext (&lctxt);
20201 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20202 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20203
20204 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
20205 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20206
20207 stat = encodeByteAlign (&lctxt);
20208 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20209
20210 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20211
20212 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20213 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20214
20215 freeContext (&lctxt);
20216 }
20217
20218 if (pvalue->m.cryptoTokensPresent) {
20219 initContext (&lctxt);
20220 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20221 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20222
20223 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
20224 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20225
20226 stat = encodeByteAlign (&lctxt);
20227 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20228
20229 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20230
20231 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20232 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20233
20234 freeContext (&lctxt);
20235 }
20236
20237 if (pvalue->m.integrityCheckValuePresent) {
20238 initContext (&lctxt);
20239 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20240 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20241
20242 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
20243 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20244
20245 stat = encodeByteAlign (&lctxt);
20246 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20247
20248 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20249
20250 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20251 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20252
20253 freeContext (&lctxt);
20254 }
20255
20256 if (pvalue->m.uuiesRequestedPresent) {
20257 initContext (&lctxt);
20258 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20259 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20260
20261 stat = asn1PE_H225UUIEsRequested (&lctxt, &pvalue->uuiesRequested);
20262 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20263
20264 stat = encodeByteAlign (&lctxt);
20265 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20266
20267 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20268
20269 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20270 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20271
20272 freeContext (&lctxt);
20273 }
20274
20275 if (pvalue->m.callLinkagePresent) {
20276 initContext (&lctxt);
20277 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20278 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20279
20280 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
20281 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20282
20283 stat = encodeByteAlign (&lctxt);
20284 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20285
20286 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20287
20288 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20289 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20290
20291 freeContext (&lctxt);
20292 }
20293
20294 if (pvalue->m.usageInfoRequestedPresent) {
20295 initContext (&lctxt);
20296 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20297 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20298
20299 stat = asn1PE_H225RasUsageInfoTypes (&lctxt, &pvalue->usageInfoRequested);
20300 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20301
20302 stat = encodeByteAlign (&lctxt);
20303 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20304
20305 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20306
20307 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20308 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20309
20310 freeContext (&lctxt);
20311 }
20312
20313 if (pvalue->m.segmentedResponseSupportedPresent) {
20314 initContext (&lctxt);
20315 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20316 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20317
20318 /* NULL */
20319
20320 stat = encodeByteAlign (&lctxt);
20321 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20322
20323 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20324
20325 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20326 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20327
20328 freeContext (&lctxt);
20329 }
20330
20331 if (pvalue->m.nextSegmentRequestedPresent) {
20332 initContext (&lctxt);
20333 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20334 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20335
20336 stat = encodeConsUnsigned (&lctxt, pvalue->nextSegmentRequested, 0U, 65535U);
20337 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20338
20339 stat = encodeByteAlign (&lctxt);
20340 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20341
20342 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20343
20344 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20345 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20346
20347 freeContext (&lctxt);
20348 }
20349
20350 if (pvalue->m.capacityInfoRequestedPresent) {
20351 initContext (&lctxt);
20352 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20353 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20354
20355 /* NULL */
20356
20357 stat = encodeByteAlign (&lctxt);
20358 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20359
20360 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20361
20362 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20363 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20364
20365 freeContext (&lctxt);
20366 }
20367
20368 if (pvalue->m.genericDataPresent) {
20369 initContext (&lctxt);
20370 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20371 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20372
20373 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
20374 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20375
20376 stat = encodeByteAlign (&lctxt);
20377 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20378
20379 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20380
20381 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20382 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20383
20384 freeContext (&lctxt);
20385 }
20386
20387 }
20388
20389 return (stat);
20390 }
20391
20392 /**************************************************************/
20393 /* */
20394 /* _SeqOfH225RTPSession */
20395 /* */
20396 /**************************************************************/
20397
20398 EXTERN int asn1PE_H225_SeqOfH225RTPSession (OOCTXT* pctxt, H225_SeqOfH225RTPSession* pvalue)
20399 {
20400 int stat = ASN_OK;
20401 DListNode* pnode;
20402 ASN1UINT xx1;
20403 ASN1UINT enclen, fraglen;
20404
20405 enclen = fraglen = xx1 = 0;
20406 pnode = pvalue->head;
20407 for (;;) {
20408 /* encode length determinant */
20409
20410 stat = encodeLength (pctxt, (pvalue->count - enclen));
20411 if (stat < 0) return stat;
20412
20413 fraglen = stat;
20414 enclen += fraglen;
20415 /* encode elements */
20416
20417 for (; xx1 < enclen; xx1++) {
20418 stat = asn1PE_H225RTPSession (pctxt, ((H225RTPSession*)pnode->data));
20419 if (stat != ASN_OK) return stat;
20420 pnode = pnode->next;
20421 }
20422 if ( pvalue->count == enclen && fraglen < 16384) {
20423 break;
20424 }
20425 }
20426
20427 return (stat);
20428 }
20429
20430 /**************************************************************/
20431 /* */
20432 /* _SeqOfH225TransportChannelInfo */
20433 /* */
20434 /**************************************************************/
20435
20436 EXTERN int asn1PE_H225_SeqOfH225TransportChannelInfo (OOCTXT* pctxt, H225_SeqOfH225TransportChannelInfo* pvalue)
20437 {
20438 int stat = ASN_OK;
20439 DListNode* pnode;
20440 ASN1UINT xx1;
20441 ASN1UINT enclen, fraglen;
20442
20443 enclen = fraglen = xx1 = 0;
20444 pnode = pvalue->head;
20445 for (;;) {
20446 /* encode length determinant */
20447
20448 stat = encodeLength (pctxt, (pvalue->count - enclen));
20449 if (stat < 0) return stat;
20450
20451 fraglen = stat;
20452 enclen += fraglen;
20453 /* encode elements */
20454
20455 for (; xx1 < enclen; xx1++) {
20456 stat = asn1PE_H225TransportChannelInfo (pctxt, ((H225TransportChannelInfo*)pnode->data));
20457 if (stat != ASN_OK) return stat;
20458 pnode = pnode->next;
20459 }
20460 if ( pvalue->count == enclen && fraglen < 16384) {
20461 break;
20462 }
20463 }
20464
20465 return (stat);
20466 }
20467
20468 /**************************************************************/
20469 /* */
20470 /* _SeqOfH225ConferenceIdentifier */
20471 /* */
20472 /**************************************************************/
20473
20474 EXTERN int asn1PE_H225_SeqOfH225ConferenceIdentifier (OOCTXT* pctxt, H225_SeqOfH225ConferenceIdentifier* pvalue)
20475 {
20476 int stat = ASN_OK;
20477 ASN1UINT xx1;
20478
20479 /* encode length determinant */
20480
20481 stat = encodeLength (pctxt, pvalue->n);
20482 if (stat < 0) return stat;
20483
20484 /* encode elements */
20485
20486 for (xx1 = 0; xx1 < pvalue->n; xx1++) {
20487 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->elem[xx1]);
20488 if (stat != ASN_OK) return stat;
20489 }
20490
20491 return (stat);
20492 }
20493
20494 /**************************************************************/
20495 /* */
20496 /* InfoRequestResponse_perCallInfo_element_pdu_element */
20497 /* */
20498 /**************************************************************/
20499
20500 EXTERN int asn1PE_H225InfoRequestResponse_perCallInfo_element_pdu_element (OOCTXT* pctxt, H225InfoRequestResponse_perCallInfo_element_pdu_element* pvalue)
20501 {
20502 int stat = ASN_OK;
20503
20504 /* encode h323pdu */
20505
20506 stat = asn1PE_H225H323_UU_PDU (pctxt, &pvalue->h323pdu);
20507 if (stat != ASN_OK) return stat;
20508
20509 /* encode sent */
20510
20511 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->sent);
20512 if (stat != ASN_OK) return stat;
20513
20514 return (stat);
20515 }
20516
20517 /**************************************************************/
20518 /* */
20519 /* _SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_el */
20520 /* */
20521 /**************************************************************/
20522
20523 EXTERN int asn1PE_H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element (OOCTXT* pctxt, H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element* pvalue)
20524 {
20525 int stat = ASN_OK;
20526 DListNode* pnode;
20527 ASN1UINT xx1;
20528 ASN1UINT enclen, fraglen;
20529
20530 enclen = fraglen = xx1 = 0;
20531 pnode = pvalue->head;
20532 for (;;) {
20533 /* encode length determinant */
20534
20535 stat = encodeLength (pctxt, (pvalue->count - enclen));
20536 if (stat < 0) return stat;
20537
20538 fraglen = stat;
20539 enclen += fraglen;
20540 /* encode elements */
20541
20542 for (; xx1 < enclen; xx1++) {
20543 stat = asn1PE_H225InfoRequestResponse_perCallInfo_element_pdu_element (pctxt, ((H225InfoRequestResponse_perCallInfo_element_pdu_element*)pnode->data));
20544 if (stat != ASN_OK) return stat;
20545 pnode = pnode->next;
20546 }
20547 if ( pvalue->count == enclen && fraglen < 16384) {
20548 break;
20549 }
20550 }
20551
20552 return (stat);
20553 }
20554
20555 /**************************************************************/
20556 /* */
20557 /* InfoRequestResponse_perCallInfo_element */
20558 /* */
20559 /**************************************************************/
20560
20561 EXTERN int asn1PE_H225InfoRequestResponse_perCallInfo_element (OOCTXT* pctxt, H225InfoRequestResponse_perCallInfo_element* pvalue)
20562 {
20563 int stat = ASN_OK;
20564 ASN1BOOL extbit;
20565 ASN1OpenType openType;
20566 OOCTXT lctxt;
20567
20568 /* extension bit */
20569
20570 extbit = (ASN1BOOL)(pvalue->m.callIdentifierPresent ||
20571 pvalue->m.tokensPresent ||
20572 pvalue->m.cryptoTokensPresent ||
20573 pvalue->m.substituteConfIDsPresent ||
20574 pvalue->m.pduPresent ||
20575 pvalue->m.callLinkagePresent ||
20576 pvalue->m.usageInformationPresent ||
20577 pvalue->m.circuitInfoPresent);
20578
20579 encodeBit (pctxt, extbit);
20580
20581 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
20582
20583 encodeBit (pctxt, (ASN1BOOL)pvalue->m.originatorPresent);
20584
20585 encodeBit (pctxt, (ASN1BOOL)pvalue->m.audioPresent);
20586
20587 encodeBit (pctxt, (ASN1BOOL)pvalue->m.videoPresent);
20588
20589 encodeBit (pctxt, (ASN1BOOL)pvalue->m.dataPresent);
20590
20591 /* encode nonStandardData */
20592
20593 if (pvalue->m.nonStandardDataPresent) {
20594 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
20595 if (stat != ASN_OK) return stat;
20596 }
20597
20598 /* encode callReferenceValue */
20599
20600 stat = asn1PE_H225CallReferenceValue (pctxt, pvalue->callReferenceValue);
20601 if (stat != ASN_OK) return stat;
20602
20603 /* encode conferenceID */
20604
20605 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
20606 if (stat != ASN_OK) return stat;
20607
20608 /* encode originator */
20609
20610 if (pvalue->m.originatorPresent) {
20611 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->originator);
20612 if (stat != ASN_OK) return stat;
20613 }
20614
20615 /* encode audio */
20616
20617 if (pvalue->m.audioPresent) {
20618 stat = asn1PE_H225_SeqOfH225RTPSession (pctxt, &pvalue->audio);
20619 if (stat != ASN_OK) return stat;
20620 }
20621
20622 /* encode video */
20623
20624 if (pvalue->m.videoPresent) {
20625 stat = asn1PE_H225_SeqOfH225RTPSession (pctxt, &pvalue->video);
20626 if (stat != ASN_OK) return stat;
20627 }
20628
20629 /* encode data */
20630
20631 if (pvalue->m.dataPresent) {
20632 stat = asn1PE_H225_SeqOfH225TransportChannelInfo (pctxt, &pvalue->data);
20633 if (stat != ASN_OK) return stat;
20634 }
20635
20636 /* encode h245 */
20637
20638 stat = asn1PE_H225TransportChannelInfo (pctxt, &pvalue->h245);
20639 if (stat != ASN_OK) return stat;
20640
20641 /* encode callSignaling */
20642
20643 stat = asn1PE_H225TransportChannelInfo (pctxt, &pvalue->callSignaling);
20644 if (stat != ASN_OK) return stat;
20645
20646 /* encode callType */
20647
20648 stat = asn1PE_H225CallType (pctxt, &pvalue->callType);
20649 if (stat != ASN_OK) return stat;
20650
20651 /* encode bandWidth */
20652
20653 stat = asn1PE_H225BandWidth (pctxt, pvalue->bandWidth);
20654 if (stat != ASN_OK) return stat;
20655
20656 /* encode callModel */
20657
20658 stat = asn1PE_H225CallModel (pctxt, &pvalue->callModel);
20659 if (stat != ASN_OK) return stat;
20660
20661 if (extbit) {
20662
20663 /* encode extension optional bits length */
20664
20665 stat = encodeSmallNonNegWholeNumber (pctxt, 7);
20666 if (stat != ASN_OK) return stat;
20667
20668 /* encode optional bits */
20669
20670 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callIdentifierPresent);
20671 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
20672 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
20673 encodeBit (pctxt, (ASN1BOOL)pvalue->m.substituteConfIDsPresent);
20674 encodeBit (pctxt, (ASN1BOOL)pvalue->m.pduPresent);
20675 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callLinkagePresent);
20676 encodeBit (pctxt, (ASN1BOOL)pvalue->m.usageInformationPresent);
20677 encodeBit (pctxt, (ASN1BOOL)pvalue->m.circuitInfoPresent);
20678 /* encode extension elements */
20679
20680 if (pvalue->m.callIdentifierPresent) {
20681 initContext (&lctxt);
20682 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20683 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20684
20685 stat = asn1PE_H225CallIdentifier (&lctxt, &pvalue->callIdentifier);
20686 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20687
20688 stat = encodeByteAlign (&lctxt);
20689 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20690
20691 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20692
20693 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20694 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20695
20696 freeContext (&lctxt);
20697 }
20698
20699 if (pvalue->m.tokensPresent) {
20700 initContext (&lctxt);
20701 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20702 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20703
20704 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
20705 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20706
20707 stat = encodeByteAlign (&lctxt);
20708 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20709
20710 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20711
20712 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20713 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20714
20715 freeContext (&lctxt);
20716 }
20717
20718 if (pvalue->m.cryptoTokensPresent) {
20719 initContext (&lctxt);
20720 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20721 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20722
20723 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
20724 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20725
20726 stat = encodeByteAlign (&lctxt);
20727 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20728
20729 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20730
20731 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20732 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20733
20734 freeContext (&lctxt);
20735 }
20736
20737 if (pvalue->m.substituteConfIDsPresent) {
20738 initContext (&lctxt);
20739 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20740 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20741
20742 stat = asn1PE_H225_SeqOfH225ConferenceIdentifier (&lctxt, &pvalue->substituteConfIDs);
20743 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20744
20745 stat = encodeByteAlign (&lctxt);
20746 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20747
20748 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20749
20750 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20751 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20752
20753 freeContext (&lctxt);
20754 }
20755
20756 if (pvalue->m.pduPresent) {
20757 initContext (&lctxt);
20758 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20759 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20760
20761 stat = asn1PE_H225_SeqOfH225InfoRequestResponse_perCallInfo_element_pdu_element (&lctxt, &pvalue->pdu);
20762 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20763
20764 stat = encodeByteAlign (&lctxt);
20765 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20766
20767 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20768
20769 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20770 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20771
20772 freeContext (&lctxt);
20773 }
20774
20775 if (pvalue->m.callLinkagePresent) {
20776 initContext (&lctxt);
20777 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20778 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20779
20780 stat = asn1PE_H225CallLinkage (&lctxt, &pvalue->callLinkage);
20781 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20782
20783 stat = encodeByteAlign (&lctxt);
20784 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20785
20786 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20787
20788 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20789 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20790
20791 freeContext (&lctxt);
20792 }
20793
20794 if (pvalue->m.usageInformationPresent) {
20795 initContext (&lctxt);
20796 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20797 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20798
20799 stat = asn1PE_H225RasUsageInformation (&lctxt, &pvalue->usageInformation);
20800 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20801
20802 stat = encodeByteAlign (&lctxt);
20803 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20804
20805 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20806
20807 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20808 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20809
20810 freeContext (&lctxt);
20811 }
20812
20813 if (pvalue->m.circuitInfoPresent) {
20814 initContext (&lctxt);
20815 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
20816 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20817
20818 stat = asn1PE_H225CircuitInfo (&lctxt, &pvalue->circuitInfo);
20819 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20820
20821 stat = encodeByteAlign (&lctxt);
20822 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20823
20824 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
20825
20826 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
20827 if (stat != ASN_OK) return freeContext (&lctxt), stat;
20828
20829 freeContext (&lctxt);
20830 }
20831
20832 }
20833
20834 return (stat);
20835 }
20836
20837 /**************************************************************/
20838 /* */
20839 /* _SeqOfH225InfoRequestResponse_perCallInfo_element */
20840 /* */
20841 /**************************************************************/
20842
20843 EXTERN int asn1PE_H225_SeqOfH225InfoRequestResponse_perCallInfo_element (OOCTXT* pctxt, H225_SeqOfH225InfoRequestResponse_perCallInfo_element* pvalue)
20844 {
20845 int stat = ASN_OK;
20846 DListNode* pnode;
20847 ASN1UINT xx1;
20848 ASN1UINT enclen, fraglen;
20849
20850 enclen = fraglen = xx1 = 0;
20851 pnode = pvalue->head;
20852 for (;;) {
20853 /* encode length determinant */
20854
20855 stat = encodeLength (pctxt, (pvalue->count - enclen));
20856 if (stat < 0) return stat;
20857
20858 fraglen = stat;
20859 enclen += fraglen;
20860 /* encode elements */
20861
20862 for (; xx1 < enclen; xx1++) {
20863 stat = asn1PE_H225InfoRequestResponse_perCallInfo_element (pctxt, ((H225InfoRequestResponse_perCallInfo_element*)pnode->data));
20864 if (stat != ASN_OK) return stat;
20865 pnode = pnode->next;
20866 }
20867 if ( pvalue->count == enclen && fraglen < 16384) {
20868 break;
20869 }
20870 }
20871
20872 return (stat);
20873 }
20874
20875 /**************************************************************/
20876 /* */
20877 /* InfoRequestResponseStatus */
20878 /* */
20879 /**************************************************************/
20880
20881 EXTERN int asn1PE_H225InfoRequestResponseStatus (OOCTXT* pctxt, H225InfoRequestResponseStatus* pvalue)
20882 {
20883 int stat = ASN_OK;
20884 ASN1BOOL extbit;
20885
20886 /* extension bit */
20887
20888 extbit = (ASN1BOOL)(pvalue->t > 4);
20889
20890 encodeBit (pctxt, extbit);
20891
20892 if (!extbit) {
20893
20894 /* Encode choice index value */
20895
20896 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 3);
20897 if (stat != ASN_OK) return stat;
20898
20899 /* Encode root element data value */
20900
20901 switch (pvalue->t)
20902 {
20903 /* complete */
20904 case 1:
20905 /* NULL */
20906 break;
20907
20908 /* incomplete */
20909 case 2:
20910 /* NULL */
20911 break;
20912
20913 /* segment */
20914 case 3:
20915 stat = encodeConsUnsigned (pctxt, pvalue->u.segment, 0U, 65535U);
20916 if (stat != ASN_OK) return stat;
20917
20918 break;
20919
20920 /* invalidCall */
20921 case 4:
20922 /* NULL */
20923 break;
20924
20925 default:
20926 return ASN_E_INVOPT;
20927 }
20928 }
20929 else {
20930 /* Encode extension choice index value */
20931
20932 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 5);
20933 if (stat != ASN_OK) return stat;
20934
20935 /* Encode extension element data value */
20936
20937 }
20938
20939 return (stat);
20940 }
20941
20942 /**************************************************************/
20943 /* */
20944 /* InfoRequestResponse */
20945 /* */
20946 /**************************************************************/
20947
20948 EXTERN int asn1PE_H225InfoRequestResponse (OOCTXT* pctxt, H225InfoRequestResponse* pvalue)
20949 {
20950 int stat = ASN_OK;
20951 ASN1BOOL extbit;
20952 ASN1OpenType openType;
20953 OOCTXT lctxt;
20954
20955 /* extension bit */
20956
20957 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
20958 pvalue->m.cryptoTokensPresent ||
20959 pvalue->m.integrityCheckValuePresent ||
20960 pvalue->m.needResponsePresent ||
20961 pvalue->m.capacityPresent ||
20962 pvalue->m.irrStatusPresent ||
20963 pvalue->m.unsolicitedPresent ||
20964 pvalue->m.genericDataPresent);
20965
20966 encodeBit (pctxt, extbit);
20967
20968 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
20969
20970 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointAliasPresent);
20971
20972 encodeBit (pctxt, (ASN1BOOL)pvalue->m.perCallInfoPresent);
20973
20974 /* encode nonStandardData */
20975
20976 if (pvalue->m.nonStandardDataPresent) {
20977 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
20978 if (stat != ASN_OK) return stat;
20979 }
20980
20981 /* encode requestSeqNum */
20982
20983 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
20984 if (stat != ASN_OK) return stat;
20985
20986 /* encode endpointType */
20987
20988 stat = asn1PE_H225EndpointType (pctxt, &pvalue->endpointType);
20989 if (stat != ASN_OK) return stat;
20990
20991 /* encode endpointIdentifier */
20992
20993 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
20994 if (stat != ASN_OK) return stat;
20995
20996 /* encode rasAddress */
20997
20998 stat = asn1PE_H225TransportAddress (pctxt, &pvalue->rasAddress);
20999 if (stat != ASN_OK) return stat;
21000
21001 /* encode callSignalAddress */
21002
21003 stat = asn1PE_H225_SeqOfH225TransportAddress (pctxt, &pvalue->callSignalAddress);
21004 if (stat != ASN_OK) return stat;
21005
21006 /* encode endpointAlias */
21007
21008 if (pvalue->m.endpointAliasPresent) {
21009 stat = asn1PE_H225_SeqOfH225AliasAddress (pctxt, &pvalue->endpointAlias);
21010 if (stat != ASN_OK) return stat;
21011 }
21012
21013 /* encode perCallInfo */
21014
21015 if (pvalue->m.perCallInfoPresent) {
21016 stat = asn1PE_H225_SeqOfH225InfoRequestResponse_perCallInfo_element (pctxt, &pvalue->perCallInfo);
21017 if (stat != ASN_OK) return stat;
21018 }
21019
21020 if (extbit) {
21021
21022 /* encode extension optional bits length */
21023
21024 stat = encodeSmallNonNegWholeNumber (pctxt, 7);
21025 if (stat != ASN_OK) return stat;
21026
21027 /* encode optional bits */
21028
21029 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21030 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21031 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21032 encodeBit (pctxt, (ASN1BOOL)pvalue->m.needResponsePresent);
21033 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
21034 encodeBit (pctxt, (ASN1BOOL)pvalue->m.irrStatusPresent);
21035 encodeBit (pctxt, (ASN1BOOL)pvalue->m.unsolicitedPresent);
21036 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
21037 /* encode extension elements */
21038
21039 if (pvalue->m.tokensPresent) {
21040 initContext (&lctxt);
21041 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21042 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21043
21044 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
21045 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21046
21047 stat = encodeByteAlign (&lctxt);
21048 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21049
21050 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21051
21052 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21053 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21054
21055 freeContext (&lctxt);
21056 }
21057
21058 if (pvalue->m.cryptoTokensPresent) {
21059 initContext (&lctxt);
21060 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21061 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21062
21063 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
21064 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21065
21066 stat = encodeByteAlign (&lctxt);
21067 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21068
21069 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21070
21071 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21072 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21073
21074 freeContext (&lctxt);
21075 }
21076
21077 if (pvalue->m.integrityCheckValuePresent) {
21078 initContext (&lctxt);
21079 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21080 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21081
21082 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
21083 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21084
21085 stat = encodeByteAlign (&lctxt);
21086 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21087
21088 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21089
21090 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21091 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21092
21093 freeContext (&lctxt);
21094 }
21095
21096 if (pvalue->m.needResponsePresent) {
21097 initContext (&lctxt);
21098 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21099 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21100
21101 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->needResponse);
21102 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21103
21104 stat = encodeByteAlign (&lctxt);
21105 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21106
21107 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21108
21109 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21110 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21111
21112 freeContext (&lctxt);
21113 }
21114
21115 if (pvalue->m.capacityPresent) {
21116 initContext (&lctxt);
21117 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21118 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21119
21120 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
21121 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21122
21123 stat = encodeByteAlign (&lctxt);
21124 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21125
21126 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21127
21128 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21129 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21130
21131 freeContext (&lctxt);
21132 }
21133
21134 if (pvalue->m.irrStatusPresent) {
21135 initContext (&lctxt);
21136 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21137 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21138
21139 stat = asn1PE_H225InfoRequestResponseStatus (&lctxt, &pvalue->irrStatus);
21140 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21141
21142 stat = encodeByteAlign (&lctxt);
21143 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21144
21145 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21146
21147 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21148 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21149
21150 freeContext (&lctxt);
21151 }
21152
21153 if (pvalue->m.unsolicitedPresent) {
21154 initContext (&lctxt);
21155 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21156 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21157
21158 stat = encodeBit (&lctxt, (ASN1BOOL)pvalue->unsolicited);
21159 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21160
21161 stat = encodeByteAlign (&lctxt);
21162 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21163
21164 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21165
21166 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21167 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21168
21169 freeContext (&lctxt);
21170 }
21171
21172 if (pvalue->m.genericDataPresent) {
21173 initContext (&lctxt);
21174 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21175 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21176
21177 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
21178 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21179
21180 stat = encodeByteAlign (&lctxt);
21181 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21182
21183 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21184
21185 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21186 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21187
21188 freeContext (&lctxt);
21189 }
21190
21191 }
21192
21193 return (stat);
21194 }
21195
21196 /**************************************************************/
21197 /* */
21198 /* NonStandardMessage */
21199 /* */
21200 /**************************************************************/
21201
21202 EXTERN int asn1PE_H225NonStandardMessage (OOCTXT* pctxt, H225NonStandardMessage* pvalue)
21203 {
21204 int stat = ASN_OK;
21205 ASN1BOOL extbit;
21206 ASN1OpenType openType;
21207 OOCTXT lctxt;
21208
21209 /* extension bit */
21210
21211 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
21212 pvalue->m.cryptoTokensPresent ||
21213 pvalue->m.integrityCheckValuePresent ||
21214 pvalue->m.featureSetPresent ||
21215 pvalue->m.genericDataPresent);
21216
21217 encodeBit (pctxt, extbit);
21218
21219 /* encode requestSeqNum */
21220
21221 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21222 if (stat != ASN_OK) return stat;
21223
21224 /* encode nonStandardData */
21225
21226 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21227 if (stat != ASN_OK) return stat;
21228
21229 if (extbit) {
21230
21231 /* encode extension optional bits length */
21232
21233 stat = encodeSmallNonNegWholeNumber (pctxt, 4);
21234 if (stat != ASN_OK) return stat;
21235
21236 /* encode optional bits */
21237
21238 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21239 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21240 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21241 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
21242 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
21243 /* encode extension elements */
21244
21245 if (pvalue->m.tokensPresent) {
21246 initContext (&lctxt);
21247 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21248 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21249
21250 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
21251 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21252
21253 stat = encodeByteAlign (&lctxt);
21254 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21255
21256 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21257
21258 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21259 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21260
21261 freeContext (&lctxt);
21262 }
21263
21264 if (pvalue->m.cryptoTokensPresent) {
21265 initContext (&lctxt);
21266 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21267 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21268
21269 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
21270 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21271
21272 stat = encodeByteAlign (&lctxt);
21273 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21274
21275 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21276
21277 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21278 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21279
21280 freeContext (&lctxt);
21281 }
21282
21283 if (pvalue->m.integrityCheckValuePresent) {
21284 initContext (&lctxt);
21285 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21286 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21287
21288 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
21289 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21290
21291 stat = encodeByteAlign (&lctxt);
21292 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21293
21294 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21295
21296 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21297 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21298
21299 freeContext (&lctxt);
21300 }
21301
21302 if (pvalue->m.featureSetPresent) {
21303 initContext (&lctxt);
21304 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21305 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21306
21307 stat = asn1PE_H225FeatureSet (&lctxt, &pvalue->featureSet);
21308 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21309
21310 stat = encodeByteAlign (&lctxt);
21311 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21312
21313 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21314
21315 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21316 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21317
21318 freeContext (&lctxt);
21319 }
21320
21321 if (pvalue->m.genericDataPresent) {
21322 initContext (&lctxt);
21323 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21324 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21325
21326 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
21327 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21328
21329 stat = encodeByteAlign (&lctxt);
21330 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21331
21332 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21333
21334 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21335 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21336
21337 freeContext (&lctxt);
21338 }
21339
21340 }
21341
21342 return (stat);
21343 }
21344
21345 /**************************************************************/
21346 /* */
21347 /* UnknownMessageResponse */
21348 /* */
21349 /**************************************************************/
21350
21351 EXTERN int asn1PE_H225UnknownMessageResponse (OOCTXT* pctxt, H225UnknownMessageResponse* pvalue)
21352 {
21353 int stat = ASN_OK;
21354 ASN1BOOL extbit;
21355 ASN1OpenType openType;
21356 OOCTXT lctxt;
21357
21358 /* extension bit */
21359
21360 extbit = (ASN1BOOL)(pvalue->m.tokensPresent ||
21361 pvalue->m.cryptoTokensPresent ||
21362 pvalue->m.integrityCheckValuePresent ||
21363 pvalue->m.messageNotUnderstoodPresent);
21364
21365 encodeBit (pctxt, extbit);
21366
21367 /* encode requestSeqNum */
21368
21369 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21370 if (stat != ASN_OK) return stat;
21371
21372 if (extbit) {
21373
21374 /* encode extension optional bits length */
21375
21376 stat = encodeSmallNonNegWholeNumber (pctxt, 3);
21377 if (stat != ASN_OK) return stat;
21378
21379 /* encode optional bits */
21380
21381 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21382 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21383 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21384 encodeBit (pctxt, (ASN1BOOL)pvalue->m.messageNotUnderstoodPresent);
21385 /* encode extension elements */
21386
21387 if (pvalue->m.tokensPresent) {
21388 initContext (&lctxt);
21389 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21390 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21391
21392 stat = asn1PE_H225_SeqOfH225ClearToken (&lctxt, &pvalue->tokens);
21393 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21394
21395 stat = encodeByteAlign (&lctxt);
21396 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21397
21398 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21399
21400 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21401 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21402
21403 freeContext (&lctxt);
21404 }
21405
21406 if (pvalue->m.cryptoTokensPresent) {
21407 initContext (&lctxt);
21408 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21409 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21410
21411 stat = asn1PE_H225_SeqOfH225CryptoH323Token (&lctxt, &pvalue->cryptoTokens);
21412 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21413
21414 stat = encodeByteAlign (&lctxt);
21415 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21416
21417 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21418
21419 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21420 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21421
21422 freeContext (&lctxt);
21423 }
21424
21425 if (pvalue->m.integrityCheckValuePresent) {
21426 initContext (&lctxt);
21427 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21428 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21429
21430 stat = asn1PE_H225ICV (&lctxt, &pvalue->integrityCheckValue);
21431 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21432
21433 stat = encodeByteAlign (&lctxt);
21434 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21435
21436 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21437
21438 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21439 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21440
21441 freeContext (&lctxt);
21442 }
21443
21444 if (pvalue->m.messageNotUnderstoodPresent) {
21445 initContext (&lctxt);
21446 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21447 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21448
21449 stat = encodeOctetString (&lctxt, pvalue->messageNotUnderstood.numocts, pvalue->messageNotUnderstood.data);
21450 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21451
21452 stat = encodeByteAlign (&lctxt);
21453 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21454
21455 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21456
21457 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21458 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21459
21460 freeContext (&lctxt);
21461 }
21462
21463 }
21464
21465 return (stat);
21466 }
21467
21468 /**************************************************************/
21469 /* */
21470 /* RequestInProgress */
21471 /* */
21472 /**************************************************************/
21473
21474 EXTERN int asn1PE_H225RequestInProgress (OOCTXT* pctxt, H225RequestInProgress* pvalue)
21475 {
21476 int stat = ASN_OK;
21477 ASN1BOOL extbit;
21478
21479 /* extension bit */
21480
21481 extbit = 0;
21482
21483 encodeBit (pctxt, extbit);
21484
21485 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
21486
21487 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21488
21489 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21490
21491 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21492
21493 /* encode requestSeqNum */
21494
21495 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21496 if (stat != ASN_OK) return stat;
21497
21498 /* encode nonStandardData */
21499
21500 if (pvalue->m.nonStandardDataPresent) {
21501 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21502 if (stat != ASN_OK) return stat;
21503 }
21504
21505 /* encode tokens */
21506
21507 if (pvalue->m.tokensPresent) {
21508 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21509 if (stat != ASN_OK) return stat;
21510 }
21511
21512 /* encode cryptoTokens */
21513
21514 if (pvalue->m.cryptoTokensPresent) {
21515 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21516 if (stat != ASN_OK) return stat;
21517 }
21518
21519 /* encode integrityCheckValue */
21520
21521 if (pvalue->m.integrityCheckValuePresent) {
21522 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
21523 if (stat != ASN_OK) return stat;
21524 }
21525
21526 /* encode delay */
21527
21528 stat = encodeConsUnsigned (pctxt, pvalue->delay, 1U, 65535U);
21529 if (stat != ASN_OK) return stat;
21530
21531 return (stat);
21532 }
21533
21534 /**************************************************************/
21535 /* */
21536 /* ResourcesAvailableIndicate */
21537 /* */
21538 /**************************************************************/
21539
21540 EXTERN int asn1PE_H225ResourcesAvailableIndicate (OOCTXT* pctxt, H225ResourcesAvailableIndicate* pvalue)
21541 {
21542 int stat = ASN_OK;
21543 ASN1BOOL extbit;
21544 ASN1OpenType openType;
21545 OOCTXT lctxt;
21546
21547 /* extension bit */
21548
21549 extbit = (ASN1BOOL)(pvalue->m.capacityPresent ||
21550 pvalue->m.genericDataPresent);
21551
21552 encodeBit (pctxt, extbit);
21553
21554 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
21555
21556 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21557
21558 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21559
21560 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21561
21562 /* encode requestSeqNum */
21563
21564 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21565 if (stat != ASN_OK) return stat;
21566
21567 /* encode protocolIdentifier */
21568
21569 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
21570 if (stat != ASN_OK) return stat;
21571
21572 /* encode nonStandardData */
21573
21574 if (pvalue->m.nonStandardDataPresent) {
21575 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21576 if (stat != ASN_OK) return stat;
21577 }
21578
21579 /* encode endpointIdentifier */
21580
21581 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
21582 if (stat != ASN_OK) return stat;
21583
21584 /* encode protocols */
21585
21586 stat = asn1PE_H225_SeqOfH225SupportedProtocols (pctxt, &pvalue->protocols);
21587 if (stat != ASN_OK) return stat;
21588
21589 /* encode almostOutOfResources */
21590
21591 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->almostOutOfResources);
21592 if (stat != ASN_OK) return stat;
21593
21594 /* encode tokens */
21595
21596 if (pvalue->m.tokensPresent) {
21597 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21598 if (stat != ASN_OK) return stat;
21599 }
21600
21601 /* encode cryptoTokens */
21602
21603 if (pvalue->m.cryptoTokensPresent) {
21604 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21605 if (stat != ASN_OK) return stat;
21606 }
21607
21608 /* encode integrityCheckValue */
21609
21610 if (pvalue->m.integrityCheckValuePresent) {
21611 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
21612 if (stat != ASN_OK) return stat;
21613 }
21614
21615 if (extbit) {
21616
21617 /* encode extension optional bits length */
21618
21619 stat = encodeSmallNonNegWholeNumber (pctxt, 1);
21620 if (stat != ASN_OK) return stat;
21621
21622 /* encode optional bits */
21623
21624 encodeBit (pctxt, (ASN1BOOL)pvalue->m.capacityPresent);
21625 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
21626 /* encode extension elements */
21627
21628 if (pvalue->m.capacityPresent) {
21629 initContext (&lctxt);
21630 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21631 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21632
21633 stat = asn1PE_H225CallCapacity (&lctxt, &pvalue->capacity);
21634 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21635
21636 stat = encodeByteAlign (&lctxt);
21637 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21638
21639 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21640
21641 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21642 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21643
21644 freeContext (&lctxt);
21645 }
21646
21647 if (pvalue->m.genericDataPresent) {
21648 initContext (&lctxt);
21649 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21650 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21651
21652 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
21653 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21654
21655 stat = encodeByteAlign (&lctxt);
21656 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21657
21658 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21659
21660 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21661 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21662
21663 freeContext (&lctxt);
21664 }
21665
21666 }
21667
21668 return (stat);
21669 }
21670
21671 /**************************************************************/
21672 /* */
21673 /* ResourcesAvailableConfirm */
21674 /* */
21675 /**************************************************************/
21676
21677 EXTERN int asn1PE_H225ResourcesAvailableConfirm (OOCTXT* pctxt, H225ResourcesAvailableConfirm* pvalue)
21678 {
21679 int stat = ASN_OK;
21680 ASN1BOOL extbit;
21681 ASN1OpenType openType;
21682 OOCTXT lctxt;
21683
21684 /* extension bit */
21685
21686 extbit = (ASN1BOOL)(pvalue->m.genericDataPresent);
21687
21688 encodeBit (pctxt, extbit);
21689
21690 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
21691
21692 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21693
21694 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21695
21696 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21697
21698 /* encode requestSeqNum */
21699
21700 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21701 if (stat != ASN_OK) return stat;
21702
21703 /* encode protocolIdentifier */
21704
21705 stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
21706 if (stat != ASN_OK) return stat;
21707
21708 /* encode nonStandardData */
21709
21710 if (pvalue->m.nonStandardDataPresent) {
21711 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21712 if (stat != ASN_OK) return stat;
21713 }
21714
21715 /* encode tokens */
21716
21717 if (pvalue->m.tokensPresent) {
21718 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21719 if (stat != ASN_OK) return stat;
21720 }
21721
21722 /* encode cryptoTokens */
21723
21724 if (pvalue->m.cryptoTokensPresent) {
21725 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21726 if (stat != ASN_OK) return stat;
21727 }
21728
21729 /* encode integrityCheckValue */
21730
21731 if (pvalue->m.integrityCheckValuePresent) {
21732 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
21733 if (stat != ASN_OK) return stat;
21734 }
21735
21736 if (extbit) {
21737
21738 /* encode extension optional bits length */
21739
21740 stat = encodeSmallNonNegWholeNumber (pctxt, 0);
21741 if (stat != ASN_OK) return stat;
21742
21743 /* encode optional bits */
21744
21745 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
21746 /* encode extension elements */
21747
21748 if (pvalue->m.genericDataPresent) {
21749 initContext (&lctxt);
21750 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21751 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21752
21753 stat = asn1PE_H225_SeqOfH225GenericData (&lctxt, &pvalue->genericData);
21754 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21755
21756 stat = encodeByteAlign (&lctxt);
21757 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21758
21759 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21760
21761 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21762 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21763
21764 freeContext (&lctxt);
21765 }
21766
21767 }
21768
21769 return (stat);
21770 }
21771
21772 /**************************************************************/
21773 /* */
21774 /* InfoRequestAck */
21775 /* */
21776 /**************************************************************/
21777
21778 EXTERN int asn1PE_H225InfoRequestAck (OOCTXT* pctxt, H225InfoRequestAck* pvalue)
21779 {
21780 int stat = ASN_OK;
21781 ASN1BOOL extbit;
21782
21783 /* extension bit */
21784
21785 extbit = 0;
21786
21787 encodeBit (pctxt, extbit);
21788
21789 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
21790
21791 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21792
21793 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21794
21795 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21796
21797 /* encode requestSeqNum */
21798
21799 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21800 if (stat != ASN_OK) return stat;
21801
21802 /* encode nonStandardData */
21803
21804 if (pvalue->m.nonStandardDataPresent) {
21805 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21806 if (stat != ASN_OK) return stat;
21807 }
21808
21809 /* encode tokens */
21810
21811 if (pvalue->m.tokensPresent) {
21812 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21813 if (stat != ASN_OK) return stat;
21814 }
21815
21816 /* encode cryptoTokens */
21817
21818 if (pvalue->m.cryptoTokensPresent) {
21819 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21820 if (stat != ASN_OK) return stat;
21821 }
21822
21823 /* encode integrityCheckValue */
21824
21825 if (pvalue->m.integrityCheckValuePresent) {
21826 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
21827 if (stat != ASN_OK) return stat;
21828 }
21829
21830 return (stat);
21831 }
21832
21833 /**************************************************************/
21834 /* */
21835 /* InfoRequestNakReason */
21836 /* */
21837 /**************************************************************/
21838
21839 EXTERN int asn1PE_H225InfoRequestNakReason (OOCTXT* pctxt, H225InfoRequestNakReason* pvalue)
21840 {
21841 int stat = ASN_OK;
21842 OOCTXT lctxt;
21843 ASN1OpenType openType;
21844 ASN1BOOL extbit;
21845
21846 /* extension bit */
21847
21848 extbit = (ASN1BOOL)(pvalue->t > 3);
21849
21850 encodeBit (pctxt, extbit);
21851
21852 if (!extbit) {
21853
21854 /* Encode choice index value */
21855
21856 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 2);
21857 if (stat != ASN_OK) return stat;
21858
21859 /* Encode root element data value */
21860
21861 switch (pvalue->t)
21862 {
21863 /* notRegistered */
21864 case 1:
21865 /* NULL */
21866 break;
21867
21868 /* securityDenial */
21869 case 2:
21870 /* NULL */
21871 break;
21872
21873 /* undefinedReason */
21874 case 3:
21875 /* NULL */
21876 break;
21877
21878 default:
21879 return ASN_E_INVOPT;
21880 }
21881 }
21882 else {
21883 /* Encode extension choice index value */
21884
21885 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 4);
21886 if (stat != ASN_OK) return stat;
21887
21888 /* Encode extension element data value */
21889
21890 initContext (&lctxt);
21891 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
21892 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21893
21894 switch (pvalue->t)
21895 {
21896 /* securityError */
21897 case 4:
21898 stat = asn1PE_H225SecurityErrors2 (&lctxt, pvalue->u.securityError);
21899 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21900 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
21901 break;
21902
21903 default:
21904 ;
21905 }
21906
21907 stat = encodeByteAlign (pctxt);
21908 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21909
21910 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
21911 if (stat != ASN_OK) return freeContext (&lctxt), stat;
21912
21913 freeContext (&lctxt);
21914 }
21915
21916 return (stat);
21917 }
21918
21919 /**************************************************************/
21920 /* */
21921 /* InfoRequestNak */
21922 /* */
21923 /**************************************************************/
21924
21925 EXTERN int asn1PE_H225InfoRequestNak (OOCTXT* pctxt, H225InfoRequestNak* pvalue)
21926 {
21927 int stat = ASN_OK;
21928 ASN1BOOL extbit;
21929
21930 /* extension bit */
21931
21932 extbit = 0;
21933
21934 encodeBit (pctxt, extbit);
21935
21936 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
21937
21938 encodeBit (pctxt, (ASN1BOOL)pvalue->m.altGKInfoPresent);
21939
21940 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
21941
21942 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
21943
21944 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
21945
21946 /* encode requestSeqNum */
21947
21948 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
21949 if (stat != ASN_OK) return stat;
21950
21951 /* encode nonStandardData */
21952
21953 if (pvalue->m.nonStandardDataPresent) {
21954 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
21955 if (stat != ASN_OK) return stat;
21956 }
21957
21958 /* encode nakReason */
21959
21960 stat = asn1PE_H225InfoRequestNakReason (pctxt, &pvalue->nakReason);
21961 if (stat != ASN_OK) return stat;
21962
21963 /* encode altGKInfo */
21964
21965 if (pvalue->m.altGKInfoPresent) {
21966 stat = asn1PE_H225AltGKInfo (pctxt, &pvalue->altGKInfo);
21967 if (stat != ASN_OK) return stat;
21968 }
21969
21970 /* encode tokens */
21971
21972 if (pvalue->m.tokensPresent) {
21973 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
21974 if (stat != ASN_OK) return stat;
21975 }
21976
21977 /* encode cryptoTokens */
21978
21979 if (pvalue->m.cryptoTokensPresent) {
21980 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
21981 if (stat != ASN_OK) return stat;
21982 }
21983
21984 /* encode integrityCheckValue */
21985
21986 if (pvalue->m.integrityCheckValuePresent) {
21987 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
21988 if (stat != ASN_OK) return stat;
21989 }
21990
21991 return (stat);
21992 }
21993
21994 /**************************************************************/
21995 /* */
21996 /* ServiceControlIndication_callSpecific */
21997 /* */
21998 /**************************************************************/
21999
22000 EXTERN int asn1PE_H225ServiceControlIndication_callSpecific (OOCTXT* pctxt, H225ServiceControlIndication_callSpecific* pvalue)
22001 {
22002 int stat = ASN_OK;
22003 ASN1BOOL extbit;
22004
22005 /* extension bit */
22006
22007 extbit = 0;
22008
22009 encodeBit (pctxt, extbit);
22010
22011 /* encode callIdentifier */
22012
22013 stat = asn1PE_H225CallIdentifier (pctxt, &pvalue->callIdentifier);
22014 if (stat != ASN_OK) return stat;
22015
22016 /* encode conferenceID */
22017
22018 stat = asn1PE_H225ConferenceIdentifier (pctxt, &pvalue->conferenceID);
22019 if (stat != ASN_OK) return stat;
22020
22021 /* encode answeredCall */
22022
22023 stat = encodeBit (pctxt, (ASN1BOOL)pvalue->answeredCall);
22024 if (stat != ASN_OK) return stat;
22025
22026 return (stat);
22027 }
22028
22029 /**************************************************************/
22030 /* */
22031 /* ServiceControlIndication */
22032 /* */
22033 /**************************************************************/
22034
22035 EXTERN int asn1PE_H225ServiceControlIndication (OOCTXT* pctxt, H225ServiceControlIndication* pvalue)
22036 {
22037 int stat = ASN_OK;
22038 ASN1BOOL extbit;
22039
22040 /* extension bit */
22041
22042 extbit = 0;
22043
22044 encodeBit (pctxt, extbit);
22045
22046 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
22047
22048 encodeBit (pctxt, (ASN1BOOL)pvalue->m.endpointIdentifierPresent);
22049
22050 encodeBit (pctxt, (ASN1BOOL)pvalue->m.callSpecificPresent);
22051
22052 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
22053
22054 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
22055
22056 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
22057
22058 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
22059
22060 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
22061
22062 /* encode requestSeqNum */
22063
22064 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
22065 if (stat != ASN_OK) return stat;
22066
22067 /* encode nonStandardData */
22068
22069 if (pvalue->m.nonStandardDataPresent) {
22070 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22071 if (stat != ASN_OK) return stat;
22072 }
22073
22074 /* encode serviceControl */
22075
22076 stat = asn1PE_H225_SeqOfH225ServiceControlSession (pctxt, &pvalue->serviceControl);
22077 if (stat != ASN_OK) return stat;
22078
22079 /* encode endpointIdentifier */
22080
22081 if (pvalue->m.endpointIdentifierPresent) {
22082 stat = asn1PE_H225EndpointIdentifier (pctxt, pvalue->endpointIdentifier);
22083 if (stat != ASN_OK) return stat;
22084 }
22085
22086 /* encode callSpecific */
22087
22088 if (pvalue->m.callSpecificPresent) {
22089 stat = asn1PE_H225ServiceControlIndication_callSpecific (pctxt, &pvalue->callSpecific);
22090 if (stat != ASN_OK) return stat;
22091 }
22092
22093 /* encode tokens */
22094
22095 if (pvalue->m.tokensPresent) {
22096 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22097 if (stat != ASN_OK) return stat;
22098 }
22099
22100 /* encode cryptoTokens */
22101
22102 if (pvalue->m.cryptoTokensPresent) {
22103 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22104 if (stat != ASN_OK) return stat;
22105 }
22106
22107 /* encode integrityCheckValue */
22108
22109 if (pvalue->m.integrityCheckValuePresent) {
22110 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
22111 if (stat != ASN_OK) return stat;
22112 }
22113
22114 /* encode featureSet */
22115
22116 if (pvalue->m.featureSetPresent) {
22117 stat = asn1PE_H225FeatureSet (pctxt, &pvalue->featureSet);
22118 if (stat != ASN_OK) return stat;
22119 }
22120
22121 /* encode genericData */
22122
22123 if (pvalue->m.genericDataPresent) {
22124 stat = asn1PE_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22125 if (stat != ASN_OK) return stat;
22126 }
22127
22128 return (stat);
22129 }
22130
22131 /**************************************************************/
22132 /* */
22133 /* ServiceControlResponse_result */
22134 /* */
22135 /**************************************************************/
22136
22137 EXTERN int asn1PE_H225ServiceControlResponse_result (OOCTXT* pctxt, H225ServiceControlResponse_result* pvalue)
22138 {
22139 int stat = ASN_OK;
22140 ASN1BOOL extbit;
22141
22142 /* extension bit */
22143
22144 extbit = (ASN1BOOL)(pvalue->t > 5);
22145
22146 encodeBit (pctxt, extbit);
22147
22148 if (!extbit) {
22149
22150 /* Encode choice index value */
22151
22152 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 4);
22153 if (stat != ASN_OK) return stat;
22154
22155 /* Encode root element data value */
22156
22157 switch (pvalue->t)
22158 {
22159 /* started */
22160 case 1:
22161 /* NULL */
22162 break;
22163
22164 /* failed */
22165 case 2:
22166 /* NULL */
22167 break;
22168
22169 /* stopped */
22170 case 3:
22171 /* NULL */
22172 break;
22173
22174 /* notAvailable */
22175 case 4:
22176 /* NULL */
22177 break;
22178
22179 /* neededFeatureNotSupported */
22180 case 5:
22181 /* NULL */
22182 break;
22183
22184 default:
22185 return ASN_E_INVOPT;
22186 }
22187 }
22188 else {
22189 /* Encode extension choice index value */
22190
22191 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 6);
22192 if (stat != ASN_OK) return stat;
22193
22194 /* Encode extension element data value */
22195
22196 }
22197
22198 return (stat);
22199 }
22200
22201 /**************************************************************/
22202 /* */
22203 /* ServiceControlResponse */
22204 /* */
22205 /**************************************************************/
22206
22207 EXTERN int asn1PE_H225ServiceControlResponse (OOCTXT* pctxt, H225ServiceControlResponse* pvalue)
22208 {
22209 int stat = ASN_OK;
22210 ASN1BOOL extbit;
22211
22212 /* extension bit */
22213
22214 extbit = 0;
22215
22216 encodeBit (pctxt, extbit);
22217
22218 encodeBit (pctxt, (ASN1BOOL)pvalue->m.resultPresent);
22219
22220 encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent);
22221
22222 encodeBit (pctxt, (ASN1BOOL)pvalue->m.tokensPresent);
22223
22224 encodeBit (pctxt, (ASN1BOOL)pvalue->m.cryptoTokensPresent);
22225
22226 encodeBit (pctxt, (ASN1BOOL)pvalue->m.integrityCheckValuePresent);
22227
22228 encodeBit (pctxt, (ASN1BOOL)pvalue->m.featureSetPresent);
22229
22230 encodeBit (pctxt, (ASN1BOOL)pvalue->m.genericDataPresent);
22231
22232 /* encode requestSeqNum */
22233
22234 stat = asn1PE_H225RequestSeqNum (pctxt, pvalue->requestSeqNum);
22235 if (stat != ASN_OK) return stat;
22236
22237 /* encode result */
22238
22239 if (pvalue->m.resultPresent) {
22240 stat = asn1PE_H225ServiceControlResponse_result (pctxt, &pvalue->result);
22241 if (stat != ASN_OK) return stat;
22242 }
22243
22244 /* encode nonStandardData */
22245
22246 if (pvalue->m.nonStandardDataPresent) {
22247 stat = asn1PE_H225NonStandardParameter (pctxt, &pvalue->nonStandardData);
22248 if (stat != ASN_OK) return stat;
22249 }
22250
22251 /* encode tokens */
22252
22253 if (pvalue->m.tokensPresent) {
22254 stat = asn1PE_H225_SeqOfH225ClearToken (pctxt, &pvalue->tokens);
22255 if (stat != ASN_OK) return stat;
22256 }
22257
22258 /* encode cryptoTokens */
22259
22260 if (pvalue->m.cryptoTokensPresent) {
22261 stat = asn1PE_H225_SeqOfH225CryptoH323Token (pctxt, &pvalue->cryptoTokens);
22262 if (stat != ASN_OK) return stat;
22263 }
22264
22265 /* encode integrityCheckValue */
22266
22267 if (pvalue->m.integrityCheckValuePresent) {
22268 stat = asn1PE_H225ICV (pctxt, &pvalue->integrityCheckValue);
22269 if (stat != ASN_OK) return stat;
22270 }
22271
22272 /* encode featureSet */
22273
22274 if (pvalue->m.featureSetPresent) {
22275 stat = asn1PE_H225FeatureSet (pctxt, &pvalue->featureSet);
22276 if (stat != ASN_OK) return stat;
22277 }
22278
22279 /* encode genericData */
22280
22281 if (pvalue->m.genericDataPresent) {
22282 stat = asn1PE_H225_SeqOfH225GenericData (pctxt, &pvalue->genericData);
22283 if (stat != ASN_OK) return stat;
22284 }
22285
22286 return (stat);
22287 }
22288
22289 /**************************************************************/
22290 /* */
22291 /* _SeqOfH225AdmissionConfirm */
22292 /* */
22293 /**************************************************************/
22294
22295 EXTERN int asn1PE_H225_SeqOfH225AdmissionConfirm (OOCTXT* pctxt, H225_SeqOfH225AdmissionConfirm* pvalue)
22296 {
22297 int stat = ASN_OK;
22298 DListNode* pnode;
22299 ASN1UINT xx1;
22300 ASN1UINT enclen, fraglen;
22301
22302 enclen = fraglen = xx1 = 0;
22303 pnode = pvalue->head;
22304 for (;;) {
22305 /* encode length determinant */
22306
22307 stat = encodeLength (pctxt, (pvalue->count - enclen));
22308 if (stat < 0) return stat;
22309
22310 fraglen = stat;
22311 enclen += fraglen;
22312 /* encode elements */
22313
22314 for (; xx1 < enclen; xx1++) {
22315 stat = asn1PE_H225AdmissionConfirm (pctxt, ((H225AdmissionConfirm*)pnode->data));
22316 if (stat != ASN_OK) return stat;
22317 pnode = pnode->next;
22318 }
22319 if ( pvalue->count == enclen && fraglen < 16384) {
22320 break;
22321 }
22322 }
22323
22324 return (stat);
22325 }
22326
22327 /**************************************************************/
22328 /* */
22329 /* RasMessage */
22330 /* */
22331 /**************************************************************/
22332
22333 EXTERN int asn1PE_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
22334 {
22335 int stat = ASN_OK;
22336 OOCTXT lctxt;
22337 ASN1OpenType openType;
22338 ASN1BOOL extbit;
22339
22340 /* extension bit */
22341
22342 extbit = (ASN1BOOL)(pvalue->t > 25);
22343
22344 encodeBit (pctxt, extbit);
22345
22346 if (!extbit) {
22347
22348 /* Encode choice index value */
22349
22350 stat = encodeConsUnsigned (pctxt, pvalue->t - 1, 0, 24);
22351 if (stat != ASN_OK) return stat;
22352
22353 /* Encode root element data value */
22354
22355 switch (pvalue->t)
22356 {
22357 /* gatekeeperRequest */
22358 case 1:
22359 stat = asn1PE_H225GatekeeperRequest (pctxt, pvalue->u.gatekeeperRequest);
22360 if (stat != ASN_OK) return stat;
22361 break;
22362
22363 /* gatekeeperConfirm */
22364 case 2:
22365 stat = asn1PE_H225GatekeeperConfirm (pctxt, pvalue->u.gatekeeperConfirm);
22366 if (stat != ASN_OK) return stat;
22367 break;
22368
22369 /* gatekeeperReject */
22370 case 3:
22371 stat = asn1PE_H225GatekeeperReject (pctxt, pvalue->u.gatekeeperReject);
22372 if (stat != ASN_OK) return stat;
22373 break;
22374
22375 /* registrationRequest */
22376 case 4:
22377 stat = asn1PE_H225RegistrationRequest (pctxt, pvalue->u.registrationRequest);
22378 if (stat != ASN_OK) return stat;
22379 break;
22380
22381 /* registrationConfirm */
22382 case 5:
22383 stat = asn1PE_H225RegistrationConfirm (pctxt, pvalue->u.registrationConfirm);
22384 if (stat != ASN_OK) return stat;
22385 break;
22386
22387 /* registrationReject */
22388 case 6:
22389 stat = asn1PE_H225RegistrationReject (pctxt, pvalue->u.registrationReject);
22390 if (stat != ASN_OK) return stat;
22391 break;
22392
22393 /* unregistrationRequest */
22394 case 7:
22395 stat = asn1PE_H225UnregistrationRequest (pctxt, pvalue->u.unregistrationRequest);
22396 if (stat != ASN_OK) return stat;
22397 break;
22398
22399 /* unregistrationConfirm */
22400 case 8:
22401 stat = asn1PE_H225UnregistrationConfirm (pctxt, pvalue->u.unregistrationConfirm);
22402 if (stat != ASN_OK) return stat;
22403 break;
22404
22405 /* unregistrationReject */
22406 case 9:
22407 stat = asn1PE_H225UnregistrationReject (pctxt, pvalue->u.unregistrationReject);
22408 if (stat != ASN_OK) return stat;
22409 break;
22410
22411 /* admissionRequest */
22412 case 10:
22413 stat = asn1PE_H225AdmissionRequest (pctxt, pvalue->u.admissionRequest);
22414 if (stat != ASN_OK) return stat;
22415 break;
22416
22417 /* admissionConfirm */
22418 case 11:
22419 stat = asn1PE_H225AdmissionConfirm (pctxt, pvalue->u.admissionConfirm);
22420 if (stat != ASN_OK) return stat;
22421 break;
22422
22423 /* admissionReject */
22424 case 12:
22425 stat = asn1PE_H225AdmissionReject (pctxt, pvalue->u.admissionReject);
22426 if (stat != ASN_OK) return stat;
22427 break;
22428
22429 /* bandwidthRequest */
22430 case 13:
22431 stat = asn1PE_H225BandwidthRequest (pctxt, pvalue->u.bandwidthRequest);
22432 if (stat != ASN_OK) return stat;
22433 break;
22434
22435 /* bandwidthConfirm */
22436 case 14:
22437 stat = asn1PE_H225BandwidthConfirm (pctxt, pvalue->u.bandwidthConfirm);
22438 if (stat != ASN_OK) return stat;
22439 break;
22440
22441 /* bandwidthReject */
22442 case 15:
22443 stat = asn1PE_H225BandwidthReject (pctxt, pvalue->u.bandwidthReject);
22444 if (stat != ASN_OK) return stat;
22445 break;
22446
22447 /* disengageRequest */
22448 case 16:
22449 stat = asn1PE_H225DisengageRequest (pctxt, pvalue->u.disengageRequest);
22450 if (stat != ASN_OK) return stat;
22451 break;
22452
22453 /* disengageConfirm */
22454 case 17:
22455 stat = asn1PE_H225DisengageConfirm (pctxt, pvalue->u.disengageConfirm);
22456 if (stat != ASN_OK) return stat;
22457 break;
22458
22459 /* disengageReject */
22460 case 18:
22461 stat = asn1PE_H225DisengageReject (pctxt, pvalue->u.disengageReject);
22462 if (stat != ASN_OK) return stat;
22463 break;
22464
22465 /* locationRequest */
22466 case 19:
22467 stat = asn1PE_H225LocationRequest (pctxt, pvalue->u.locationRequest);
22468 if (stat != ASN_OK) return stat;
22469 break;
22470
22471 /* locationConfirm */
22472 case 20:
22473 stat = asn1PE_H225LocationConfirm (pctxt, pvalue->u.locationConfirm);
22474 if (stat != ASN_OK) return stat;
22475 break;
22476
22477 /* locationReject */
22478 case 21:
22479 stat = asn1PE_H225LocationReject (pctxt, pvalue->u.locationReject);
22480 if (stat != ASN_OK) return stat;
22481 break;
22482
22483 /* infoRequest */
22484 case 22:
22485 stat = asn1PE_H225InfoRequest (pctxt, pvalue->u.infoRequest);
22486 if (stat != ASN_OK) return stat;
22487 break;
22488
22489 /* infoRequestResponse */
22490 case 23:
22491 stat = asn1PE_H225InfoRequestResponse (pctxt, pvalue->u.infoRequestResponse);
22492 if (stat != ASN_OK) return stat;
22493 break;
22494
22495 /* nonStandardMessage */
22496 case 24:
22497 stat = asn1PE_H225NonStandardMessage (pctxt, pvalue->u.nonStandardMessage);
22498 if (stat != ASN_OK) return stat;
22499 break;
22500
22501 /* unknownMessageResponse */
22502 case 25:
22503 stat = asn1PE_H225UnknownMessageResponse (pctxt, pvalue->u.unknownMessageResponse);
22504 if (stat != ASN_OK) return stat;
22505 break;
22506
22507 default:
22508 return ASN_E_INVOPT;
22509 }
22510 }
22511 else {
22512 /* Encode extension choice index value */
22513
22514 stat = encodeSmallNonNegWholeNumber (pctxt, pvalue->t - 26);
22515 if (stat != ASN_OK) return stat;
22516
22517 /* Encode extension element data value */
22518
22519 initContext (&lctxt);
22520 stat = setPERBuffer (&lctxt, 0, 0, TRUE);
22521 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22522
22523 switch (pvalue->t)
22524 {
22525 /* requestInProgress */
22526 case 26:
22527 stat = asn1PE_H225RequestInProgress (&lctxt, pvalue->u.requestInProgress);
22528 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22529 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22530 break;
22531
22532 /* resourcesAvailableIndicate */
22533 case 27:
22534 stat = asn1PE_H225ResourcesAvailableIndicate (&lctxt, pvalue->u.resourcesAvailableIndicate);
22535 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22536 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22537 break;
22538
22539 /* resourcesAvailableConfirm */
22540 case 28:
22541 stat = asn1PE_H225ResourcesAvailableConfirm (&lctxt, pvalue->u.resourcesAvailableConfirm);
22542 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22543 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22544 break;
22545
22546 /* infoRequestAck */
22547 case 29:
22548 stat = asn1PE_H225InfoRequestAck (&lctxt, pvalue->u.infoRequestAck);
22549 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22550 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22551 break;
22552
22553 /* infoRequestNak */
22554 case 30:
22555 stat = asn1PE_H225InfoRequestNak (&lctxt, pvalue->u.infoRequestNak);
22556 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22557 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22558 break;
22559
22560 /* serviceControlIndication */
22561 case 31:
22562 stat = asn1PE_H225ServiceControlIndication (&lctxt, pvalue->u.serviceControlIndication);
22563 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22564 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22565 break;
22566
22567 /* serviceControlResponse */
22568 case 32:
22569 stat = asn1PE_H225ServiceControlResponse (&lctxt, pvalue->u.serviceControlResponse);
22570 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22571 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22572 break;
22573
22574 /* admissionConfirmSequence */
22575 case 33:
22576 stat = asn1PE_H225_SeqOfH225AdmissionConfirm (&lctxt, pvalue->u.admissionConfirmSequence);
22577 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22578 openType.data = encodeGetMsgPtr (&lctxt, (int*)&openType.numocts);
22579 break;
22580
22581 default:
22582 ;
22583 }
22584
22585 stat = encodeByteAlign (pctxt);
22586 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22587
22588 stat = encodeOpenType (pctxt, openType.numocts, openType.data);
22589 if (stat != ASN_OK) return freeContext (&lctxt), stat;
22590
22591 freeContext (&lctxt);
22592 }
22593
22594 return (stat);
22595 }